query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
/ generateRangeURL Input: Instance ID of the Data Center startRange starting range (targetID) endRange ending range (targetID) Returns: URL which can be used to retrieve the details of all targets in the range from the data center instance Additional info: the details of the last 10,000 targets are cached in the database instance
private String generateRangeURL(Integer instanceID, Integer startRange, Integer endRange) { return "http://" + databaseInstances[instanceID] + "/range?start_range=" + Integer.toString(startRange) + "&end_range=" + Integer.toString(endRange); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void getRange()\n\t{\n\t\tint start = randInt(0, 9);\n\t\tint end = randInt(0, 9);\t\t\n\t\tint startNode = start<=end?start:end;\n\t\tint endNode = start>end?start:end;\n\t\tSystem.out.println(\"Start : \"+startNode+\" End : \"+endNode);\n\t}", "private String generateURL(Integer instanceID, String key) {\n\t\treturn \"http://\" + databaseInstances[instanceID] + \"/target?targetID=\" + key;\n\t}", "public void setRange(Uri range)\n {\n this.range = range;\n }", "public List<IdRange> calculateRangesForType(MigrationType migrationType, long minimumId, long maximumId, long optimalNumberOfRows);", "java.lang.String getDestRange();", "public Uri getRange()\n {\n return range;\n }", "private String genFeedURL(String startDate, String endDate) {\n\t\treturn String.format(\"%sfeed?start_date=%s&end_date=%s&detailed=false&api_key=%s\", \n\t\t\t\tconfig.getApiBaseURL(), startDate, endDate, config.getAPIKey());\n\t}", "public double generateAltitude(Double startRange, Double endRange);", "String getEndRange();", "public void setRange(int startRange, int endRange) {\r\n\t\tsetValue(Params.START_RANGE, startRange);\r\n\t\tsetValue(Params.END_RANGE, endRange);\r\n\t}", "void setEndRange( String endRange );", "public List<cn.edu.nju.teamwiki.jooq.tables.pojos.Document> fetchRangeOfUrl(String lowerInclusive, String upperInclusive) {\n return fetchRange(Document.DOCUMENT.URL, lowerInclusive, upperInclusive);\n }", "public final CQLParser.rangeFunction_return rangeFunction() throws RecognitionException {\n CQLParser.rangeFunction_return retval = new CQLParser.rangeFunction_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token openType=null;\n Token closeType=null;\n Token RANGE148=null;\n Token char_literal149=null;\n CQLParser.expression_return e = null;\n\n CQLParser.expression_return rangeStart = null;\n\n CQLParser.expression_return rangeEnd = null;\n\n\n Object openType_tree=null;\n Object closeType_tree=null;\n Object RANGE148_tree=null;\n Object char_literal149_tree=null;\n RewriteRuleTokenStream stream_116=new RewriteRuleTokenStream(adaptor,\"token 116\");\n RewriteRuleTokenStream stream_117=new RewriteRuleTokenStream(adaptor,\"token 117\");\n RewriteRuleTokenStream stream_114=new RewriteRuleTokenStream(adaptor,\"token 114\");\n RewriteRuleTokenStream stream_RANGE=new RewriteRuleTokenStream(adaptor,\"token RANGE\");\n RewriteRuleTokenStream stream_115=new RewriteRuleTokenStream(adaptor,\"token 115\");\n RewriteRuleTokenStream stream_118=new RewriteRuleTokenStream(adaptor,\"token 118\");\n RewriteRuleSubtreeStream stream_expression=new RewriteRuleSubtreeStream(adaptor,\"rule expression\");\n errorMessageStack.push(\"RANGE definition\"); \n try {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:2: ( RANGE e= expression ( (openType= '[' ) | (openType= '(' ) ) rangeStart= expression ',' rangeEnd= expression (closeType= ')' | closeType= ']' ) -> ^( RANGE $e $openType $closeType $rangeStart $rangeEnd) )\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:4: RANGE e= expression ( (openType= '[' ) | (openType= '(' ) ) rangeStart= expression ',' rangeEnd= expression (closeType= ')' | closeType= ']' )\n {\n RANGE148=(Token)match(input,RANGE,FOLLOW_RANGE_in_rangeFunction2480); \n stream_RANGE.add(RANGE148);\n\n pushFollow(FOLLOW_expression_in_rangeFunction2484);\n e=expression();\n\n state._fsp--;\n\n stream_expression.add(e.getTree());\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:23: ( (openType= '[' ) | (openType= '(' ) )\n int alt41=2;\n int LA41_0 = input.LA(1);\n\n if ( (LA41_0==117) ) {\n alt41=1;\n }\n else if ( (LA41_0==114) ) {\n alt41=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 41, 0, input);\n\n throw nvae;\n }\n switch (alt41) {\n case 1 :\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:24: (openType= '[' )\n {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:24: (openType= '[' )\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:25: openType= '['\n {\n openType=(Token)match(input,117,FOLLOW_117_in_rangeFunction2490); \n stream_117.add(openType);\n\n\n }\n\n\n }\n break;\n case 2 :\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:41: (openType= '(' )\n {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:41: (openType= '(' )\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:42: openType= '('\n {\n openType=(Token)match(input,114,FOLLOW_114_in_rangeFunction2498); \n stream_114.add(openType);\n\n\n }\n\n\n }\n break;\n\n }\n\n pushFollow(FOLLOW_expression_in_rangeFunction2504);\n rangeStart=expression();\n\n state._fsp--;\n\n stream_expression.add(rangeStart.getTree());\n char_literal149=(Token)match(input,115,FOLLOW_115_in_rangeFunction2506); \n stream_115.add(char_literal149);\n\n pushFollow(FOLLOW_expression_in_rangeFunction2510);\n rangeEnd=expression();\n\n state._fsp--;\n\n stream_expression.add(rangeEnd.getTree());\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:103: (closeType= ')' | closeType= ']' )\n int alt42=2;\n int LA42_0 = input.LA(1);\n\n if ( (LA42_0==116) ) {\n alt42=1;\n }\n else if ( (LA42_0==118) ) {\n alt42=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 42, 0, input);\n\n throw nvae;\n }\n switch (alt42) {\n case 1 :\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:104: closeType= ')'\n {\n closeType=(Token)match(input,116,FOLLOW_116_in_rangeFunction2515); \n stream_116.add(closeType);\n\n\n }\n break;\n case 2 :\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:119: closeType= ']'\n {\n closeType=(Token)match(input,118,FOLLOW_118_in_rangeFunction2520); \n stream_118.add(closeType);\n\n\n }\n break;\n\n }\n\n\n\n // AST REWRITE\n // elements: openType, e, rangeEnd, rangeStart, closeType, RANGE\n // token labels: closeType, openType\n // rule labels: retval, e, rangeStart, rangeEnd\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleTokenStream stream_closeType=new RewriteRuleTokenStream(adaptor,\"token closeType\",closeType);\n RewriteRuleTokenStream stream_openType=new RewriteRuleTokenStream(adaptor,\"token openType\",openType);\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n RewriteRuleSubtreeStream stream_e=new RewriteRuleSubtreeStream(adaptor,\"rule e\",e!=null?e.tree:null);\n RewriteRuleSubtreeStream stream_rangeStart=new RewriteRuleSubtreeStream(adaptor,\"rule rangeStart\",rangeStart!=null?rangeStart.tree:null);\n RewriteRuleSubtreeStream stream_rangeEnd=new RewriteRuleSubtreeStream(adaptor,\"rule rangeEnd\",rangeEnd!=null?rangeEnd.tree:null);\n\n root_0 = (Object)adaptor.nil();\n // 505:3: -> ^( RANGE $e $openType $closeType $rangeStart $rangeEnd)\n {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:505:6: ^( RANGE $e $openType $closeType $rangeStart $rangeEnd)\n {\n Object root_1 = (Object)adaptor.nil();\n root_1 = (Object)adaptor.becomeRoot(stream_RANGE.nextNode(), root_1);\n\n adaptor.addChild(root_1, stream_e.nextTree());\n adaptor.addChild(root_1, stream_openType.nextNode());\n adaptor.addChild(root_1, stream_closeType.nextNode());\n adaptor.addChild(root_1, stream_rangeStart.nextTree());\n adaptor.addChild(root_1, stream_rangeEnd.nextTree());\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n errorMessageStack.pop(); \n }\n \t\n \tcatch(RecognitionException re)\n \t{\t\n \t\treportError(re);\n \t\tthrow re;\n \t}\n finally {\n }\n return retval;\n }", "Range createRange();", "abstract public Range createRange();", "com.google.protobuf.ByteString getDestRangeBytes();", "public static List <Index> rangeOf(int start, int end) {\r\n FastTable <Index> list = FastTable.newInstance();\r\n for (int i=start; i < end; i++) {\r\n list.add(Index.valueOf(i));\r\n }\r\n return list;\r\n }", "public void run(String url, String range, String imageColumn) throws IOException {\n this.url = url;\n this.range = range;\n this.imageColumn = imageColumn;\n\n LOGGER.info(\"Validating input\");\n\n validateInput();\n\n LOGGER.info(\"Beginning to retrieve data from spreadsheet={} with range={}\", url, range);\n List<List<Object>> data = dataParser.retrieveData(url, range);\n\n int imageIndex = imageColumn.toUpperCase().charAt(0) - range.charAt(RANGE_COLUMN_START_INDEX);\n LOGGER.info(\"Picture link is at index={}\", imageIndex);\n\n LOGGER.info(\"Beginning to parse through retrieved data\");\n List<Person> people = dataParser.parseData(data, imageIndex);\n\n LOGGER.info(\"Beginning to generate files\");\n fileGenerator.generateFiles(people);\n }", "@Override\r\n public String toString() {\r\n return \"Range [\" + \"min=\" + min + \", max=\" + max + \"]\";\r\n }", "public String getRange() {\n return this.range;\n }", "public List<com.hexarchbootdemo.adapter.output.persistence.h2.generated_sources.jooq.tables.pojos.Voter> fetchRangeOfId(UUID lowerInclusive, UUID upperInclusive) {\n return fetchRange(Voter.VOTER.ID, lowerInclusive, upperInclusive);\n }", "public List<JRepositoryPojo> fetchRangeOfJUrl(String lowerInclusive, String upperInclusive) {\n return fetchRange(JRepository.REPOSITORY.URL, lowerInclusive, upperInclusive);\n }", "private static String buildUrl(LatLng minPoint, LatLng maxPoint, int page){\n Uri.Builder uriBuilder = END_POINT.buildUpon()\n .appendQueryParameter(\"method\", SEARCH_METHOD)\n .appendQueryParameter(\"bbox\", minPoint.longitude + \",\" + minPoint.latitude + \",\" + maxPoint.longitude + \",\" + maxPoint.latitude) // box in which we are searching\n .appendQueryParameter(\"extras\", \"geo, url_o, url_c, url_m, url_s, description\") // extra additional parameters\n .appendQueryParameter(\"page\", \"\" + page); // page number to return\n return uriBuilder.build().toString();\n }", "public void setRanges(List<Range> ranges) {\n this.ranges = ranges;\n }", "public List<Long> findByNumberRange(String tableName, Long start, Long end) {\n String numberColName = \"number\";\n if (!tableName.equals(\"blocks\")) {\n numberColName = \"block_number\";\n }\n\n String sql =\n \"SELECT %s FROM %s.%s \"\n + \"WHERE %s BETWEEN %s AND %s\";\n String query = String.format(sql, numberColName, schema, tableName, numberColName, start, end);\n // String used in lambda expressions need to be final or effectively final\n String _numberColName = numberColName;\n return jdbcTemplate.query(query, (resultSet, i) -> resultSet.getLong(_numberColName));\n }", "public void setRange(AddressInfo range) {\r\n this.range = range;\r\n }", "public AddressInfo getRange() {\r\n return range;\r\n }", "public synchronized void setTargetRange(double minTarget, double maxTarget)\n {\n final String funcName = \"setTargetRange\";\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API, \"min=%f,max=%f\", minTarget, maxTarget);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API);\n }\n\n this.minTarget = minTarget;\n this.maxTarget = maxTarget;\n }", "public java.lang.String getRange() {\n\t\treturn _range;\n\t}", "public JsonArray getRangeInfo() {\r\n\t\t\r\n\t\tif (restClient == null)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\t\r\n\t\tJsonArray arrayIPv4 = null;\r\n\t\tJsonArray arrayIPv6 = null;\r\n\t\t\r\n\t\t// IPv4 Range\r\n\t\t{\r\n\t\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\t\r\n\t\t\tsb.append(\"/wapi/v1.0/range\");\r\n\t\t\tsb.append(\"?_return_type=json\");\r\n\t\t\tsb.append(\"&_return_fields=network,network_view,start_addr,end_addr,comment,disable\");\r\n\t\t\t\r\n\t\t\tString value = restClient.Get(sb.toString(), null);\r\n\t\t\t\r\n\t\t\tif (value == null)\r\n\t\t\t\treturn null;\r\n\t\t\t\r\n\t\t\t// Change unescape-unicode\r\n\t\t\tvalue = StringUtils.unescapeUnicodeString(value);\r\n\t\t\t\r\n\t\t\tif (value != null) {\r\n\t\t\t\tvalue = StringUtils.unescapeUnicodeString(value);\r\n\t\t\t\tarrayIPv4 = JsonUtils.parseJsonArray(value);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// IPv6 Range\r\n\t\t{\r\n\t\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\t\r\n\t\t\tsb.append(\"/wapi/v1.0/ipv6range\");\r\n\t\t\tsb.append(\"?_return_type=json\");\r\n\t\t\tsb.append(\"&_return_fields=network,network_view,start_addr,end_addr,comment,disable\");\r\n\t\t\t\r\n\t\t\tString value = restClient.Get(sb.toString(), null);\r\n\t\t\t\r\n\t\t\tif (value == null)\r\n\t\t\t\treturn null;\r\n\t\t\t\r\n\t\t\t// Change unescape-unicode\r\n\t\t\tvalue = StringUtils.unescapeUnicodeString(value);\r\n\t\t\t\r\n\t\t\tif (value != null) {\r\n\t\t\t\tvalue = StringUtils.unescapeUnicodeString(value);\r\n\t\t\t\tarrayIPv6 = JsonUtils.parseJsonArray(value);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Merge\r\n\t\tJsonArray array = new JsonArray();\r\n\t\t\r\n\t\tif (arrayIPv4 != null)\r\n\t\t\tarray.addAll(arrayIPv4);\r\n\t\t\r\n\t\tif (arrayIPv6 != null)\r\n\t\t\tarray.addAll(arrayIPv6);\r\n\t\t\r\n\t\treturn array;\r\n\t}", "public HttpRange getRange() {\n return range;\n }", "public interface TargetRange extends Data {\n\n\t/**\n\t * Control setpoint for the value. This values shall be reached by\n\t * actions of an OGEMA application, no action based on this value is\n\t * performed by the framework itself. If no setpoint is given, an estimate\n\t * may be guessed from taking the center point of the {@link #targetRange()},\n\t * the {@link #controlLimits() } or the {@link #alarmLimits() } (in descending\n\t * order of relevance).\n\t * Models inheriting from this prototype must override\n\t * this with a suitable simple resource to define the meaning and the unit\n\t * of measurement.\n\t */\n\tValueResource setpoint();\n\n\t/**\n\t * Range which the sensor value shall lie as a result of control, if possible. The range is considered as soft\n\t * limits, i.e. contrary to the {@link #controlLimits() controlLimits} the so-defined ambient range may be left. If\n\t * not targetRange is given, the {@link #setpoint() setpoint} may indicate where the range lies.\n\t */\n\tRange targetRange();\n\n\t/**\n\t * Limits for the sensor value that shall be used for the control of the relevant device. Usually the controlLimits\n\t * should be held for sure.\n\t */\n\tRange controlLimits();\n\n\t/**\n\t * The resource shall only be used for limits that shall be integrated into an alarm logging and/or alarm handling\n\t * OGEMA application. It is NOT intended for limits that just trigger control signals.<br>\n\t * Note: No alarm events are generated by the OGEMA framework itself.<br>\n\t * For sensors providing information not represented as float, a resource of the relevant range type named\n\t * <code>alarmLimits</code> can be added as decorator.\n\t */\n\tRange alarmLimits();\n}", "public int getEndRange() {\r\n\t\treturn lookupValue(Params.END_RANGE);\r\n\t}", "private String useRangeFormat(Unit units, int lowerBound, int upperBound) {\n return lowerBound + \" to \" + upperBound + getUnits(units, upperBound);\n }", "public List<String> lrange(String key, long start, long end) {\n Jedis jedis = null;\n try {\n jedis = jedisPool.getResource();\n return jedis.lrange(key, start, end);\n } finally {\n if (jedis != null) {\n jedis.close();\n }\n }\n }", "public String toString() {\n/* 387 */ if (this.toString == null) {\n/* 388 */ StrBuilder buf = new StrBuilder(32);\n/* 389 */ buf.append(\"Range[\");\n/* 390 */ buf.append(this.min);\n/* 391 */ buf.append(',');\n/* 392 */ buf.append(this.max);\n/* 393 */ buf.append(']');\n/* 394 */ this.toString = buf.toString();\n/* */ } \n/* 396 */ return this.toString;\n/* */ }", "public StringBuffer rangeToString(Key low, Key high)\n {\n \t\n \tStringBuffer str=new StringBuffer();\n \t\n \tint l=(int) low;\n \tint h=(int) high;\n \tfor(int ch=l;ch<=h;ch++)\n \tstr.append(ch);\n \treturn str;\n \t \t\n }", "public RealRange getReferenceRange(RealRange referenceRange);", "@Override\n\tpublic int getRange() {\n\t\treturn range;\n\t}", "public final ANTLRv3Parser.range_return range() throws RecognitionException {\r\n ANTLRv3Parser.range_return retval = new ANTLRv3Parser.range_return();\r\n retval.start = input.LT(1);\r\n\r\n\r\n CommonTree root_0 = null;\r\n\r\n Token c1=null;\r\n Token c2=null;\r\n Token RANGE133=null;\r\n ANTLRv3Parser.elementOptions_return elementOptions134 =null;\r\n\r\n\r\n CommonTree c1_tree=null;\r\n CommonTree c2_tree=null;\r\n CommonTree RANGE133_tree=null;\r\n RewriteRuleTokenStream stream_RANGE=new RewriteRuleTokenStream(adaptor,\"token RANGE\");\r\n RewriteRuleTokenStream stream_CHAR_LITERAL=new RewriteRuleTokenStream(adaptor,\"token CHAR_LITERAL\");\r\n RewriteRuleSubtreeStream stream_elementOptions=new RewriteRuleSubtreeStream(adaptor,\"rule elementOptions\");\r\n try {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:297:2: (c1= CHAR_LITERAL RANGE c2= CHAR_LITERAL ( elementOptions )? -> ^( CHAR_RANGE[$c1,\\\"..\\\"] $c1 $c2 ( elementOptions )? ) )\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:297:4: c1= CHAR_LITERAL RANGE c2= CHAR_LITERAL ( elementOptions )?\r\n {\r\n c1=(Token)match(input,CHAR_LITERAL,FOLLOW_CHAR_LITERAL_in_range2159); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_CHAR_LITERAL.add(c1);\r\n\r\n\r\n RANGE133=(Token)match(input,RANGE,FOLLOW_RANGE_in_range2161); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_RANGE.add(RANGE133);\r\n\r\n\r\n c2=(Token)match(input,CHAR_LITERAL,FOLLOW_CHAR_LITERAL_in_range2165); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_CHAR_LITERAL.add(c2);\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:297:42: ( elementOptions )?\r\n int alt61=2;\r\n int LA61_0 = input.LA(1);\r\n\r\n if ( (LA61_0==77) ) {\r\n alt61=1;\r\n }\r\n switch (alt61) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:297:42: elementOptions\r\n {\r\n pushFollow(FOLLOW_elementOptions_in_range2167);\r\n elementOptions134=elementOptions();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_elementOptions.add(elementOptions134.getTree());\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // AST REWRITE\r\n // elements: c2, c1, elementOptions\r\n // token labels: c1, c2\r\n // rule labels: retval\r\n // token list labels: \r\n // rule list labels: \r\n // wildcard labels: \r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = root_0;\r\n RewriteRuleTokenStream stream_c1=new RewriteRuleTokenStream(adaptor,\"token c1\",c1);\r\n RewriteRuleTokenStream stream_c2=new RewriteRuleTokenStream(adaptor,\"token c2\",c2);\r\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\r\n\r\n root_0 = (CommonTree)adaptor.nil();\r\n // 298:3: -> ^( CHAR_RANGE[$c1,\\\"..\\\"] $c1 $c2 ( elementOptions )? )\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:298:6: ^( CHAR_RANGE[$c1,\\\"..\\\"] $c1 $c2 ( elementOptions )? )\r\n {\r\n CommonTree root_1 = (CommonTree)adaptor.nil();\r\n root_1 = (CommonTree)adaptor.becomeRoot(\r\n (CommonTree)adaptor.create(CHAR_RANGE, c1, \"..\")\r\n , root_1);\r\n\r\n adaptor.addChild(root_1, stream_c1.nextNode());\r\n\r\n adaptor.addChild(root_1, stream_c2.nextNode());\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:298:37: ( elementOptions )?\r\n if ( stream_elementOptions.hasNext() ) {\r\n adaptor.addChild(root_1, stream_elementOptions.nextTree());\r\n\r\n }\r\n stream_elementOptions.reset();\r\n\r\n adaptor.addChild(root_0, root_1);\r\n }\r\n\r\n }\r\n\r\n\r\n retval.tree = root_0;\r\n }\r\n\r\n }\r\n\r\n retval.stop = input.LT(-1);\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r\n\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return retval;\r\n }", "String getRangeUri(PropertyIdValue propertyIdValue) {\n\t\tString datatype = this.propertyRegister\n\t\t\t\t.getPropertyType(propertyIdValue);\n\n\t\tif (datatype == null)\n\t\t\treturn null;\n\n\t\tswitch (datatype) {\n\t\tcase DatatypeIdValue.DT_MONOLINGUAL_TEXT:\n\t\t\tthis.rdfConversionBuffer.addDatatypeProperty(propertyIdValue);\n\t\t\treturn Vocabulary.RDF_LANG_STRING;\n\t\tcase DatatypeIdValue.DT_STRING:\n\t\tcase DatatypeIdValue.DT_EXTERNAL_ID:\n\t\tcase DatatypeIdValue.DT_MATH:\n\t\t\tthis.rdfConversionBuffer.addDatatypeProperty(propertyIdValue);\n\t\t\treturn Vocabulary.XSD_STRING;\n\t\tcase DatatypeIdValue.DT_COMMONS_MEDIA:\n\t\tcase DatatypeIdValue.DT_GLOBE_COORDINATES:\n\t\tcase DatatypeIdValue.DT_ITEM:\n\t\tcase DatatypeIdValue.DT_PROPERTY:\n\t\tcase DatatypeIdValue.DT_LEXEME:\n\t\tcase DatatypeIdValue.DT_FORM:\n\t\tcase DatatypeIdValue.DT_SENSE:\n\t\tcase DatatypeIdValue.DT_TIME:\n\t\tcase DatatypeIdValue.DT_URL:\n\t\tcase DatatypeIdValue.DT_GEO_SHAPE:\n\t\tcase DatatypeIdValue.DT_TABULAR_DATA:\n\t\tcase DatatypeIdValue.DT_QUANTITY:\n\t\t\tthis.rdfConversionBuffer.addObjectProperty(propertyIdValue);\n\t\t\treturn Vocabulary.OWL_THING;\n\t\tdefault:\n\t\t\treturn null;\n\t\t}\n\t}", "RangeValue createRangeValue();", "public DoubleGenerator range(double min, double max) {\n this.max = max;\n this.min = min;\n return this;\n }", "int getRange();", "@RequestMapping(value = \"/{start}/{end}\", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\r\n\tpublic @ResponseBody String viewBranchManagersRange(@PathVariable(\"start\") int start, @PathVariable(\"end\") int end) throws JsonProcessingException {\r\n\r\n\t\treturn branchManagerService.viewBranchManagersRange(start, end);\r\n\t}", "public Map<Range, List<EndPoint>> getRangeToEndpointMap()\n {\n return ssProxy.getRangeToEndPointMap();\n }", "private static int[] generateArray(int size, int startRange, int endRange) {\n\t\tint[] array = new int[size];\n\t\tfor(int i = 0; i < array.length; i++) {\n\t\t\tarray[i] = (int)((Math.random()*(endRange - startRange + 1)) + startRange);\n\t\t}\n\t\treturn array;\n\t}", "private static String createRandomInteger(int aStart, long aEnd,Random aRandom){\n \tif ( aStart > aEnd ) {\n\t throw new IllegalArgumentException(\"Start cannot exceed End.\");\n\t }\n\t long range = aEnd - (long)aStart + 1;\n\t long fraction = (long)(range * aRandom.nextDouble());\n\t long randomNumber = fraction + (long)aStart;\n\t return Long.toString(randomNumber);\n\t }", "public void setRange(String new_range) {\n\t\t_range = new_range;\n\t}", "public List<moneytree.persist.db.generated.tables.pojos.Income> fetchRangeOfId(UUID lowerInclusive, UUID upperInclusive) {\n return fetchRange(Income.INCOME.ID, lowerInclusive, upperInclusive);\n }", "public String getChecksumForIdRange(MigrationType type, String salt, long minId, long maxId);", "public float getTargetRange() {\n\t\treturn targetRange;\n\t}", "public List<cn.edu.nju.teamwiki.jooq.tables.pojos.Document> fetchRangeOfSourceId(Integer lowerInclusive, Integer upperInclusive) {\n return fetchRange(Document.DOCUMENT.SOURCE_ID, lowerInclusive, upperInclusive);\n }", "protected abstract R toRange(D lower, D upper);", "public native RecordList getRangeAsRecordList(int start, int end) /*-{\r\n var self = [email protected]::getOrCreateJsObj()();\r\n var recordsJS = self.getRange(start, end);\r\n return (recordsJS == null || recordsJS === undefined) ? null :\r\n @com.smartgwt.client.data.RecordList::new(Lcom/google/gwt/core/client/JavaScriptObject;)(recordsJS);\r\n }-*/;", "public String makeURL(double sourcelat, double sourcelog, double destlat,\n\t\t\tdouble destlog) {\n\t\tStringBuilder urlString = new StringBuilder();\n\t\turlString.append(\"http://maps.googleapis.com/maps/api/directions/json\");\n\t\turlString.append(\"?origin=\");// from\n\t\turlString.append(Double.toString(sourcelat));\n\t\turlString.append(\",\");\n\t\turlString.append(Double.toString(sourcelog));\n\t\turlString.append(\"&destination=\");// to\n\t\turlString.append(Double.toString(destlat));\n\t\turlString.append(\",\");\n\t\turlString.append(Double.toString(destlog));\n\t\turlString.append(\"&sensor=false&mode=driving&alternatives=true\");\n\t\treturn urlString.toString();\n\t}", "private DescriptiveStatistics calculateStatsForRange(List<JsonObject> datapoints, String targetName, Range range) {\n\n return datapoints.stream()\n .filter(js -> targetName.equals(js.getJsonObject(\"t\").getString(\"name\"))\n && range.contains(js.getJsonObject(\"n\").getLong(\"begin\")))\n .map(js -> js.getJsonObject(\"n\").getLong(\"value\"))\n .map(Long::doubleValue)\n .collect(descStatsCollector());\n }", "public int getRange()\n\t{\n\t\treturn Range;\n\t}", "public <T> List<T> lrange(String key, long start, long end, Class<T> clazz) {\n Jedis jedis = null;\n try {\n jedis = jedisPool.getResource();\n List<byte[]> list = jedis.lrange(key.getBytes(), start, end);\n if (list != null && list.size() > 0) {\n List<T> results = new ArrayList<T>();\n for (byte[] bytes : list) {\n results.add(fromJsonByteArray(bytes, clazz));\n }\n return results;\n }\n return null;\n } finally {\n if (jedis != null) {\n jedis.close();\n }\n }\n }", "public StrColumn getRangeId2() {\n return delegate.getColumn(\"range_id_2\", DelegatingStrColumn::new);\n }", "public DateRange getDateRange();", "public double getRange(){\n\t\treturn range;\n\t}", "public KeyRange(String start,\n boolean startInclusive,\n String end,\n boolean endInclusive) {\n if (start == null && end == null) {\n throw new IllegalArgumentException\n (\"start or end must be non-null\");\n }\n\n if (start != null &&\n end != null &&\n ((start.compareTo(end) > 0) ||\n ((start.compareTo(end) == 0) &&\n !(startInclusive && endInclusive)))) {\n throw new IllegalArgumentException\n (\"start key must be less than the end key. (\" + start + \",\" +\n end + \")\");\n }\n\n this.start = start;\n this.startInclusive = startInclusive;\n this.end = end;\n this.endInclusive = endInclusive;\n }", "public default double getTargetRange(Entity casterIn){ return RangeType.getRange(casterIn, this); }", "public void setTargetRange(float targetRange) {\n\t\tthis.targetRange = targetRange;\n\t}", "private void checkRangeGet(final String content, final int lowRange, final int highRange) throws Throwable {\n String key = \"encrytion-client-test-range-get-\" + String.valueOf(lowRange) + \"~\" + String.valueOf(highRange);\n PutObjectRequest req = new PutObjectRequest(bucketName, key, new ByteArrayInputStream(content.getBytes()));\n ossEncryptionClient.putObject(req);\n GetObjectRequest getObjectRequest = new GetObjectRequest(bucketName, key);\n getObjectRequest.setRange(lowRange, highRange);\n OSSObject ossObject = ossEncryptionClient.getObject(getObjectRequest);\n String result1 = readOSSObject(ossObject);\n\n // oss client do range-get\n key = \"normal-client-test-range-get-\" + String.valueOf(lowRange) + \"~\" + String.valueOf(highRange);\n req = new PutObjectRequest(bucketName, key, new ByteArrayInputStream(content.getBytes()));\n ossClient.putObject(req);\n getObjectRequest = new GetObjectRequest(bucketName, key);\n getObjectRequest.setRange(lowRange, highRange);\n ossObject = ossClient.getObject(getObjectRequest);\n String result2 = readOSSObject(ossObject);\n\n Assert.assertEquals(result2, result1);\n }", "VocNoun getRange();", "public List<cn.edu.nju.teamwiki.jooq.tables.pojos.Document> fetchRangeOfDId(String lowerInclusive, String upperInclusive) {\n return fetchRange(Document.DOCUMENT.D_ID, lowerInclusive, upperInclusive);\n }", "protected static String expectedRangeString(Object minValue, boolean minInclusive, Object maxValue, boolean maxInclusive) {\n // A means for a return value\n String retVal;\n\n // Start with the proper symbol for the lower bound\n if (minInclusive) {\n retVal = \"[\";\n } else {\n retVal = \"(\";\n }\n\n // Add in the minimum and maximum values\n retVal += minValue + \" .. \" + maxValue;\n\n // End with the proper symbol for the upper bound\n if (maxInclusive) {\n retVal += \"]\";\n } else {\n retVal += \")\";\n }\n\n // Return the formatted string\n return retVal;\n }", "private int randBetween(int start, int end) {\n\t\treturn start + (int)Math.round(Math.random() * (end - start));\n\t}", "@TargetMethod.Export(\"Between\")\n\t\t\t\t\t\t\tpublic CompletableFuture<Void> between(\n\t\t\t\t\t\t\t\t\[email protected](\n\t\t\t\t\t\t\t\t\t\tdescription = \"The starting address\",\n\t\t\t\t\t\t\t\t\t\tdisplay = \"Start\",\n\t\t\t\t\t\t\t\t\t\tname = \"start\") Address start,\n\t\t\t\t\t\t\t\t\[email protected](\n\t\t\t\t\t\t\t\t\t\tdescription = \"The ending address\",\n\t\t\t\t\t\t\t\t\t\tdisplay = \"End\",\n\t\t\t\t\t\t\t\t\t\tname = \"end\") Address end) {\n\t\t\t\t\t\t\t\tcommands.add(\"between(\" + start + \",\" + end + \")\");\n\t\t\t\t\t\t\t\treturn AsyncUtils.NIL;\n\t\t\t\t\t\t\t}", "public static int randBetween(int start, int end) {\n return start + (int)Math.round(Math.random() * (end - start));\n }", "@Test\n\tpublic void testCorrectURL_forDateRange() {\n\t\tString startDate =\"2017-10-01\";\n\t\tString endDate=\"2017-10-02\";\n\t\tString result=urlHelper.getURLByDateRange(startDate, endDate);\n\t\tString expected = genFeedURL(startDate, endDate);\n\t\tassertEquals(result,expected);\n\t}", "public ReferenceRange() {\n\t\tsuper();\n\t\tmRr = CDAFactory.eINSTANCE.createReferenceRange();\n\t\tmRr.setObservationRange(getObsR());\n\t\tmRr.setTypeCode(ActRelationshipType.REFV);\n\t\tthis.setInterpretationCode(ObservationInterpretation.NORMAL);\n\t}", "String getPortRange();", "public void setRange(Range range) { setRange(range, true, true); }", "DbQuery setRangeFilter(long startValue, long endValue) {\n return setRangeFilter((double) startValue, (double) endValue);\n }", "public static int generatesRandomIntBetween(int start, int end) {\n return start + (int) Math.round(Math.random() * (end - start));\n }", "public void createTable(DBTableDescriptor desc, byte [] startKey,\n byte [] endKey, int numRegions) throws IOException {\n DBTableDescriptor.isLegalTableName(desc.getName());\n if(numRegions < 3) {\n throw new IllegalArgumentException(\"Must create at least three regions\");\n } else if(Bytes.compareTo(startKey, endKey) >= 0) {\n throw new IllegalArgumentException(\"Start key must be smaller than end key\");\n }\n byte [][] splitKeys = Bytes.split(startKey, endKey, numRegions - 3);\n if(splitKeys == null || splitKeys.length != numRegions - 1) {\n throw new IllegalArgumentException(\"Unable to split key range into enough regions\");\n }\n createTable(desc, splitKeys);\n }", "public static Automaton.List rangeOf(Automaton automaton,\n\t\t\tAutomaton.Int _start, Automaton.Int _end) {\n\t\t// FIXME: there is a bug here for big integer values.\n\t\tint start = _start.intValue();\n\t\tint end = _end.intValue();\n\t\tint[] children = new int[end - start];\n\t\tfor (int i = 0; i < children.length; ++i, ++start) {\n\t\t\tchildren[i] = automaton.add(new Automaton.Int(start));\n\t\t}\n\t\treturn new Automaton.List(children);\n\t}", "List<String> queryUniqueDomains(Long from, Long to);", "public int getRange() {\n return mRange;\n }", "DbQuery setRangeFilter(int startValue, int endValue) {\n return setRangeFilter((double) startValue, (double) endValue);\n }", "@java.lang.Deprecated\n public java.util.List<io.kubernetes.client.openapi.models.V1beta1IDRange> getRanges();", "void calculateRange() {\n //TODO: See Rules\n }", "public List<String> nodesAtRange(String id, int range)\n\t{\n\t\tSet<Node> visited = new HashSet<Node>();\n\t\tSet<Node> next = new HashSet<Node>();\n\t\tnext.add(getNode(id));\n\n\t\tint r = 0;\n\n\t\twhile (r < range && !next.isEmpty())\n\t\t{\n\t\t\tfor (Node n : next)\n\t\t\t\tvisited.add(n);\n\t\t\tnext.clear();\n\n\t\t\tfor (Node n : visited)\n\t\t\t{\n\t\t\t\tfor (Edge e : n.neighbors.values())\n\t\t\t\t{\n\t\t\t\t\tif (!visited.contains(e.end) && !next.contains(e.end))\n\t\t\t\t\t\tnext.add(e.end);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t++r;\n\t\t}\n\n\t\tList<String> nodes = new ArrayList<String>();\n\t\tfor (Node n : next)\n\t\t\tnodes.add(n.id);\n\n\n\t\treturn nodes;\n\t}", "public Collection getPosts_fromIDRange(int fromID, int toID)\r\n throws IllegalArgumentException, DatabaseException;", "public void setRange(int start, int end) {\n\t\tmStart = start;\n\t\tmEnd = end;\n\t\tmCurrent = start;\n\t\tupdateView();\n\t}", "public List<com.wuda.foundation.jooq.code.generation.user.tables.pojos.UserEmail> fetchRangeOfId(ULong lowerInclusive, ULong upperInclusive) {\n return fetchRange(UserEmail.USER_EMAIL.ID, lowerInclusive, upperInclusive);\n }", "DbQuery setRangeFilter(double startValue, double endValue) {\n filter = Filter.RANGE;\n filterType = FilterType.DOUBLE;\n this.startAt = startValue;\n this.endAt = endValue;\n return this;\n }", "protected String getTargetUrl() {\n // Get the next target URL\n String target = this.endpointUrls.get(this.nextTarget);\n LOGGER.trace(\"Current nextTarget: \\\"{}\\\", targetUrl: \\\"{}\\\"\", this.nextTarget, target);\n // Update next pointer\n this.nextTarget = this.nextTarget == this.endpointUrls.size() - 1 ? 0 : this.nextTarget + 1;\n LOGGER.trace(\"New nextTarget: \\\"{}\\\"\", this.nextTarget);\n return target;\n }", "public void getRangeShowsList(JsonHttpResponseHandler handler, int page, String fromDate, String toDate) {\n RANGE_PAGE = page;\n client.get(RANGE_SHOWS_URL(fromDate, toDate), handler);\n }", "private static int randomNumberBetween(final int start, final int end) {\n\t\treturn start + (int) Math.round(Math.random() * (end - start));\n\t}", "public Set<String> zrevrange(String key, long start, long end) {\n Jedis jedis = null;\n try {\n jedis = jedisPool.getResource();\n return jedis.zrevrange(key, start, end);\n } finally {\n if (jedis != null) {\n jedis.close();\n }\n }\n }", "public void addDataRange(long beginning, long ending, Line line){\n }", "private void downloadRange() throws IOException{\n HttpURLConnection httpURLConnection = (HttpURLConnection) new URL(urlString).openConnection();\n httpURLConnection.setConnectTimeout(CONNECT_TIMEOUT);\n httpURLConnection.setReadTimeout(READ_TIMEOUT);\n httpURLConnection.setRequestProperty(\"Range\", \"bytes=\" + range.getStart() + \"-\" + range.getEnd());\n int responseCode = httpURLConnection.getResponseCode();\n InputStream inputStream = null;\n for (int i = 1 ; i <= MAX_RETRIES ; i++) {\n try {\n inputStream = httpURLConnection.getInputStream();\n break;\n }catch (SocketTimeoutException e){\n if (i == MAX_RETRIES){\n //TODO find how to stop all threads\n System.err.println(\"got timeout exception. shutting down...\");\n System.exit(1);\n }\n }\n }\n System.out.println(\"DEBUG: Range: start:\" + range.getStart() + \" end: \" + range.getEnd() + \" Response code: \" + responseCode);\n// httpURLConnection.setRequestMethod(\"GET\");\n int lastChunkSize = range.getLength().intValue() % CHUNK_SIZE;\n int i = 0;\n long rangeLength = range.getLength();\n int chunkSize = CHUNK_SIZE;\n long rangesum = range.getStart();\n int part = (int) Math.ceil(rangeLength / (double) CHUNK_SIZE); //calculate how many times we need to iterate to read X chunks in the given range\n //inputStream.skip(range.getStart());\n int getSize = chunkSize;\n while(true) {\n try {\n byte[] byteChunk = new byte[CHUNK_SIZE];\n //jump to the right place in the range to read the next chunk\n //check whether are there enough tokens to read the chunk\n if (limitDownload) {\n tokenBucket.take(CHUNK_SIZE);\n }\n //case: last chunk is smaller than chunk_size\n// if (lastChunkSize != 0 && i == (part - 1)) {\n// chunkSize = lastChunkSize;\n// }\n if (fileSize == range.getStart() + (CHUNK_SIZE * i) + (rangeLength % CHUNK_SIZE)) {\n chunkSize = (int) rangeLength % CHUNK_SIZE;\n byteChunk = new byte[chunkSize];\n }\n //reDo the read operation if the operation reads less than the bytes it should read\n int output = inputStream.read(byteChunk, 0, chunkSize);\n if (range.getEnd() < rangesum) {\n break;\n } else if (output == -1) {\n break;\n } else if (output != chunkSize) {\n int output1 = inputStream.read(byteChunk, output, chunkSize - output);\n if (output1 != chunkSize - output) {\n inputStream.read(byteChunk, output, chunkSize - output - output1);\n }\n }\n outQueue.add(new Chunk(byteChunk, range.getStart() + (CHUNK_SIZE * i), chunkSize));\n i++;\n rangesum += 4096;\n } catch (SocketTimeoutException e){\n System.err.println(\"got timeout exception. shutting down...\");\n System.exit(1);\n }\n }\n\n System.out.println(\"finished download\");\n }", "DbQuery setRangeFilter(String startValue, String endValue) {\n filter = Filter.RANGE;\n filterType = FilterType.STRING;\n this.startAt = startValue;\n this.endAt = endValue;\n return this;\n }", "public int randBetween(int start, int end) {\n\t\treturn start + (int) Math.round(Math.random() * (end - start));\n\t}", "@UsesAdsUtilities({AdsUtility.SELECTOR_BUILDER})\n SelectorBuilderInterface<SelectorT> forDateRange(DateTime start, DateTime end);", "public static void pinAddressesInRange(HashMap<String, Object> argVals,HashMap<String, Object> retVals) \n\t\tthrows IOException, ParserConfigurationException, SAXException{\n\t\t\n\t\tString origin = (String)argVals.get(\"startAddress\");\n\t\tlong range = (java.lang.Long)argVals.get(\"range\");\n\t\tLinkedList<String> addresses = (LinkedList<String>)argVals.get(\"address\");\n\t\tLinkedList<String> comments = (LinkedList<String>)argVals.get(\"addressInfo\");\n\t\tLinkedList<String> survivedComments = new LinkedList<String>();\n\t\tLinkedList<String> survivedAddr = new LinkedList<String>();\n\t\t\n\t\tfor(int i=0;i<addresses.size();i++){\n\t\t\tString addr = addresses.get(i);\n\t\t\tif(getShortestDistance(origin, addr) < range){\n\t\t\t\tsurvivedAddr.add(addr);\n\t\t\t\tif(comments.size()>i)\n\t\t\t\t\tsurvivedComments.add(comments.get(i));\n\t\t\t}\n\t\t}\n\t\tsurvivedAddr.add(origin);\n\t\t\n\t\tString url = \"\";\n\t\t\n\t\tfor(int i=0;i<survivedAddr.size();i++){\n\t\t\tif(survivedAddr.get(i)!=null){\n\t\t\t\tif(i==0){\n\t\t\t\t\turl = ((String)survivedAddr.get(i)).replace(\" \", \"+\")+'&';\n\t\t\t\t}\n\t\t\t\turl += ((String)survivedAddr.get(i)).replace(\" \", \"+\")+'&';\n\t\t\t}\n\t\t}\n\t\tshowMap(survivedAddr,survivedComments,true);\n\t\t\n\t}" ]
[ "0.5516599", "0.5477237", "0.5441002", "0.5312919", "0.5297739", "0.5290284", "0.5273656", "0.5250896", "0.52021384", "0.5087766", "0.50804836", "0.5076426", "0.5041433", "0.5027427", "0.50074774", "0.4982546", "0.49763733", "0.49494335", "0.49341545", "0.49011123", "0.49007928", "0.48988062", "0.48544", "0.48435843", "0.4836761", "0.4832549", "0.48189655", "0.48159567", "0.4777028", "0.4776992", "0.47091785", "0.46989837", "0.4695244", "0.46881494", "0.4687976", "0.4685409", "0.46854067", "0.46852398", "0.46763626", "0.46644297", "0.4650908", "0.4645217", "0.4636731", "0.46351358", "0.46269986", "0.46258822", "0.46038136", "0.45888442", "0.4583463", "0.45540634", "0.4551064", "0.45412692", "0.45408124", "0.45365384", "0.45363805", "0.4536195", "0.45266327", "0.45227766", "0.4511817", "0.45036232", "0.44902107", "0.4477405", "0.44759667", "0.4469891", "0.44579688", "0.4448827", "0.4445671", "0.4444037", "0.44438004", "0.44368306", "0.442037", "0.44196668", "0.44075486", "0.44054058", "0.44011453", "0.43951762", "0.43932533", "0.43879554", "0.43814003", "0.43803707", "0.43798265", "0.43777543", "0.43772927", "0.43725193", "0.43670925", "0.43647143", "0.43639764", "0.43614483", "0.43576342", "0.43574062", "0.4356915", "0.43548724", "0.43499127", "0.4347942", "0.4343179", "0.43402037", "0.43391287", "0.43332225", "0.43323046", "0.43318278" ]
0.8428174
0
/ processRequest calls the retrieveDetails function with the targetID
private void processRequest(String targetID, HttpServerRequest req) throws Exception { String result = retrieveDetails(targetID); if(result != null) req.response().end(result); else req.response().end("No resopnse received"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void processRequestRange(String targetID, HttpServerRequest req) throws Exception {\n\t\tString result = retrieveDetails(targetID);\n\t\tif(result != null)\n\t\t\treq.response().end(result);\n\t\telse\n\t\t\treq.response().end(\"No resopnse received\");\n\t}", "RequestDetail getRequestDetail(String requestId) throws SAXException, IOException;", "public Request loadRequestDetail(long _requestId) throws RequestManagerException, PersistenceResourceAccessException;", "private void getTransactionDetailsRequest() {\r\n\t\tBasicXmlDocument document = new BasicXmlDocument();\r\n\t\tdocument.parseString(\"<\" + TransactionType.GET_TRANSACTION_DETAILS.getValue()\r\n\t\t\t\t+ \" xmlns = \\\"\" + XML_NAMESPACE + \"\\\" />\");\r\n\r\n\t\taddAuthentication(document);\r\n\t\taddReportingTransactionId(document);\r\n\r\n\t\tcurrentRequest = document;\r\n\t}", "public abstract String getRequestTarget(final int requestNumber);", "@Override\r\n\t\t\tpublic void retrieved(ID target) {\n\t\t\t\t\r\n\t\t\t}", "Request<UserInfoDetailsProxy> findUserInfoDetails(Long id);", "@Override\n\tpublic void setTargetDetailOne(int id, HttpServletRequest request) {\n\t\t\n\t}", "public void postDoRetrieve(ID id)\n {\n }", "Request<UserInfoDetailsProxy> findDetailsFromUser(Long id);", "public void handleRequest(ExtractionRequest request);", "@Override\n\tpublic void setTargetDetailTwo(int id, HttpServletRequest request) {\n\t\t\n\t}", "private void getQueueDetails(RoutingContext routingContext) {\n LOGGER.debug(\"Info: getQueueDetails method started;\");\n JsonObject requestJson = new JsonObject();\n HttpServerRequest request = routingContext.request();\n HttpServerResponse response = routingContext.response();\n String instanceID = request.getHeader(HEADER_HOST);\n JsonObject authenticationInfo = new JsonObject();\n authenticationInfo.put(API_ENDPOINT, \"/management/queue\");\n requestJson.put(JSON_INSTANCEID, instanceID);\n String queueId = routingContext.request().getParam(\"queueId\");\n if (request.headers().contains(HEADER_TOKEN)) {\n authenticationInfo.put(HEADER_TOKEN, request.getHeader(HEADER_TOKEN));\n authenticator.tokenInterospect(requestJson, authenticationInfo, authHandler -> {\n LOGGER.debug(\"Info: Authenticating response;\".concat(authHandler.result().toString()));\n if (authHandler.succeeded()) {\n Future<JsonObject> brokerResult = managementApi.getQueueDetails(queueId, databroker);\n brokerResult.onComplete(brokerResultHandler -> {\n if (brokerResultHandler.succeeded()) {\n LOGGER.info(\"Success: Getting Queue Details\");\n handleSuccessResponse(response, ResponseType.Ok.getCode(),\n brokerResultHandler.result().toString());\n } else if (brokerResultHandler.failed()) {\n LOGGER.error(\"Fail: Bad Request;\" + brokerResultHandler.cause());\n processBackendResponse(response, brokerResultHandler.cause().getMessage());\n }\n });\n } else {\n LOGGER.error(\"Fail: Unauthorized;\" + authHandler.cause().getMessage());\n handleResponse(response, ResponseType.AuthenticationFailure);\n }\n });\n } else {\n LOGGER.error(\"Fail: Unauthorized\");\n handleResponse(response, ResponseType.AuthenticationFailure);\n }\n }", "public void setTargetid(Integer targetid) {\n this.targetid = targetid;\n }", "private void forwardRequest(String recordId, String body) {\n\t\tSystem.out.println(\"recordId : \"+recordId + \" body : \"+body);\n\n\t}", "private void getExchangeDetails(RoutingContext routingContext) {\n LOGGER.debug(\"Info: getExchange method started;\");\n JsonObject requestJson = new JsonObject();\n HttpServerRequest request = routingContext.request();\n JsonObject authenticationInfo = new JsonObject();\n authenticationInfo.put(API_ENDPOINT, \"/management/exchange\");\n LOGGER.debug(\"Info: request :: ;\" + request);\n LOGGER.debug(\"Info: request json :: ;\" + requestJson);\n String exchangeId = request.getParam(EXCHANGE_ID);\n String instanceID = request.getHeader(HEADER_HOST);\n requestJson.put(JSON_INSTANCEID, instanceID);\n HttpServerResponse response = routingContext.response();\n if (request.headers().contains(HEADER_TOKEN)) {\n authenticationInfo.put(HEADER_TOKEN, request.getHeader(HEADER_TOKEN));\n authenticator.tokenInterospect(requestJson, authenticationInfo, authHandler -> {\n if (authHandler.succeeded()) {\n Future<JsonObject> brokerResult =\n managementApi.getExchangeDetails(exchangeId, databroker);\n brokerResult.onComplete(brokerResultHandler -> {\n if (brokerResultHandler.succeeded()) {\n LOGGER.info(\"Success: Getting exchange details\");\n handleSuccessResponse(response, ResponseType.Ok.getCode(),\n brokerResultHandler.result().toString());\n } else if (brokerResultHandler.failed()) {\n LOGGER.error(\"Fail: Bad request\" + brokerResultHandler.cause().getMessage());\n processBackendResponse(response, brokerResultHandler.cause().getMessage());\n }\n });\n } else if (authHandler.failed()) {\n LOGGER.error(\"Fail: Unauthorized\" + authHandler.cause().getMessage());\n handleResponse(response, ResponseType.AuthenticationFailure);\n }\n });\n } else {\n LOGGER.error(\"Fail: Unauthorized\");\n handleResponse(response, ResponseType.AuthenticationFailure);\n }\n }", "public DataHolder processRequest(DataHolder indataholder) throws java.rmi.RemoteException;", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n\n HttpSession session = request.getSession(true);\n AuthTest testauth = new AuthTest();\n boolean authExist = testauth.auth(session);\n\n if (authExist) {\n\n try {\n String idRequest = request.getParameter(\"id_request\");\n HashMap<Integer, Request> history = (HashMap<Integer, Request>) session.getAttribute(\"history\");\n if (idRequest == null || history == null) {\n\n request.getRequestDispatcher(\"/WEB-INF/history.jsp\").forward(request, response);\n } else {\n try {\n\n int id = Integer.parseInt(idRequest);\n Request req = history.get(id);\n if (req == null) {\n throw new ObjectNotFoundException(\"history\", \"request_id\", idRequest);\n }\n session.setAttribute(\"request\", req);\n request.getRequestDispatcher(\"/WEB-INF/details.jsp\").forward(request, response);\n// response.sendRedirect(\"WEB-INF/details.jsp\");\n } catch (NumberFormatException ex) {\n throw new InvalidArgumentException(\"id_request\", idRequest);\n }\n }\n\n } catch (InvalidArgumentException | ObjectNotFoundException ex) {\n Logger.getLogger(Monitor.class.getName()).log(Level.SEVERE, null, ex);\n request.setAttribute(\"error\", ex);\n request.getRequestDispatcher(\"/WEB-INF/error.jsp\").forward(request, response);\n } catch (Exception ex) {\n Logger.getLogger(Monitor.class.getName()).log(Level.SEVERE, null, ex);\n request.setAttribute(\"error\", new UnexpectedErrorException(ex));\n request.getRequestDispatcher(\"/WEB-INF/error.jsp\").forward(request, response);\n }\n } else {\n request.getRequestDispatcher(\"/WEB-INF/errorAuth.jsp\").forward(request, response);\n }\n }", "@Override\r\n\tpublic List<Map<String, Object>> selectTargetUser(HttpServletRequest request) throws Exception {\n\t\tString target = request.getParameter(\"target\");\r\n\t\tString insa_code = SessionUtil.getSession(\"memberSession\", \"INSA_CODE\");\r\n\t\t\r\n\t\tMap<String, Object> map = new HashMap<String, Object>();\r\n\t\tmap.put(\"target\", target);\r\n\t\tmap.put(\"insa_code\", insa_code);\r\n\t\t\r\n\t\treturn dao.selectTargetUser(map);\r\n\t}", "public Integer getTargetid() {\n return targetid;\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n PrintWriter out = response.getWriter();\n String id = request.getParameter(\"id\");\n String url = DEFAULT_URL;\n int productId = 0;\n boolean access = false;\n try {\n /* TODO output your page here. You may use following sample code. */\n HttpSession session = request.getSession(false);\n TblUserDTO user = null;\n if (session != null) {\n user = (TblUserDTO) session.getAttribute(\"RESULTLOGIN\");\n if (user != null) {\n if (user.getRole() == 1) {\n access = true;\n }\n }\n }\n if (access) {\n url = URL_FORWARD;\n try {\n productId = Integer.parseInt(id);\n } catch (NumberFormatException e) {\n log(\"GetProductDetailServlet_NumberFormatException:\" + e.getMessage());\n }\n TblProductDAO dao = new TblProductDAO();\n TblProductDTO dto = dao.findProductById(productId, 1);\n if (dto != null) {\n request.setAttribute(\"PRODUCTDETAIL\", dto);\n }\n }\n } catch (NamingException ex) {\n log(\"GetProductDetailServlet_NamingException:\" + ex.getMessage());\n } catch (SQLException ex) {\n log(\"GetProductDetailServlet_SQLException:\" + ex.getMessage());\n } finally {\n RequestDispatcher rd = request.getRequestDispatcher(URL_FORWARD);\n rd.forward(request, response);\n out.close();\n }\n }", "public void getEventDetails() {\r\n\t\t// Query DB to get specific event information based on EventID.\r\n\t}", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n String url = ERROR;\n String strId = request.getParameter(\"id\");\n try {\n Connection con = DbConnection.getConnection();\n ProductRepository pRepo = new ProductRepository(con);\n int id = Integer.parseInt(strId);\n Product objFromdb = pRepo.get(id);\n request.setAttribute(SD.PRODUCT, objFromdb);\n url = SUCCESS;\n } catch (Exception e) {\n log(\"Error at DetailController: \" + e.toString());\n log(e.getMessage());\n } finally {\n request.getRequestDispatcher(url).forward(request, response);\n }\n }", "void addIdentificationRequest(Identification request);", "@Override\r\n\tpublic List<ParamInfo> queryParamInfoByTargetId(String targetId) {\n\t\treturn pm.selectByTargetId(targetId);\r\n\t}", "@Experimental\n @Returns(\"targetInfo\")\n TargetInfo getTargetInfo(@Optional @ParamName(\"targetId\") String targetId);", "private void sendRequestDetails(){\n\n\n\n // Request a string response from the provided URL.\n StringRequest stringRequest = new StringRequest(Request.Method.GET, sURL,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n mTextView.setText(\"Fetching shape...\");\n Log.w(TAG, \"Token verified by server\");\n Log.w(TAG, \"Response: \" + response);\n\n // Send intent to change to logged in activity\n Intent intent = new Intent(getBaseContext(), DisplayShape.class);\n intent.putExtra(\"Shape\", response);\n startActivity(intent);\n finish();\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n if (mLastToken.isEmpty()){\n mTextView.setText(\"Request details incorrect. Please try again.\");\n Log.w(TAG, \"Got empty token!\");\n } else {\n mTextView.setText(\"Unknown server error. Please try again.\");\n Log.w(TAG, \"That didn't work!\");\n error.printStackTrace();\n }\n }\n }){\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"ApproovToken\", mLastToken);\n return params;\n }\n };\n // Add the request to the RequestQueue.\n mQueue.add(stringRequest);\n\n }", "@Override\r\n\tpublic List<Targets> getTarget_info(int id) {\n\t\treturn target_infoDao.getTarget_info(id);\r\n\t}", "public void retrievePaymentRecord(String payId, Handler<AsyncResult<Payment>> resultHandler) { \n delegate.retrievePaymentRecord(payId, resultHandler);\n }", "public Long getTargetId() {\r\n return targetId;\r\n }", "public long getTargetId() {\n return targetId;\n }", "public String targetId() {\n return this.targetId;\n }", "@Override\n\tprotected void updateTargetRequest() {\n\t}", "java.lang.String getRequestID();", "public void setTargetId(Long targetId) {\r\n this.targetId = targetId;\r\n }", "@Returns(\"sessionId\")\n String attachToTarget(@ParamName(\"targetId\") String targetId);", "@When(\"^I send the request to Address Management API 'GET AddressUnitId' endpoint$\")\n public void getAddressUnitId() {\n RequestSpecBuilder request = (RequestSpecBuilder) scenarioSession.getData(SessionKey.REQUEST);\n\n //send the request and get the response\n Response response = addressManagementApi.getAddressUnitId(request);\n\n //store the response for use in later steps\n scenarioSession.putData(SessionKey.LATEST_RESPONSE, response);\n }", "@Override\n\tpublic void setTargetDetailThree(int id, HttpServletRequest request) {\n\t\t\n\t}", "private String doQueryById(HttpServletRequest request,\n HttpServletResponse response) {\n return null;\n }", "public void runSample(HttpServletRequest request) {\n try {\n this.printMessage(\"<html><head><title>Simple checkout result</title></head><body><div><pre>\");\n example.addOrderReferenceDetails(request.getParameter(\"SellerNote\"),\n request.getParameter(\"OrderReferenceId\"), request.getParameter(\"CustomNote\"),\n request.getParameter(\"StoreName\"), request.getParameter(\"Subtotal\"),\n request.getParameter(\"ShippingType\"), request.getParameter(\"RequestPaymentAuthorization\"));\n\n this.printMessage(\"Order Reference is set with provided details.\");\n this.printMessage(\"Now confirming this order reference...\");\n\n example.confirmOrderReference();\n this.printMessage(\"Order Reference is confirmed and \" + \"moved to 'OPEN' state\");\n this.printMessage(\"Now getting details for Authorization...\");\n\n int authOption = Integer.parseInt(request.getParameter(\"AuthorizeOption\"));\n if (!(authOption == 1 || authOption == 2)) {\n throw new OffAmazonPaymentsServiceException(\"Invalid Authorization Option.\");\n }\n\n boolean captureNow = false;\n String captureNowString = request.getParameter(\"DirectCapture\");\n if (captureNowString != null && captureNowString.equals(\"on\")) {\n captureNow = true;\n }\n String softDescriptor = request.getParameter(\"SoftDescriptor\");\n String sellerAuthorizationNote = request.getParameter(\"SellerAuthorizationNote\");\n String providerId = request.getParameter(\"ProviderId\");\n String creditAmount = request.getParameter(\"CreditAmount\");\n\n example.authorize(captureNow, authOption, softDescriptor, sellerAuthorizationNote, providerId, creditAmount);\n AuthorizationDetails authDetails = this.waitForAuthorizationNotification(captureNow);\n\n this.getPostAuthDetails();\n\n if (captureNow) {\n this.printMessage(\"Authorization with Capture is complete\");\n } else {\n CaptureResponse captureResponse = this.capture(authDetails, request.getParameter(\"softDescriptor\"),\n request.getParameter(\"sellerCaptureNote\"), providerId, creditAmount);\n this.waitForCaptureNotification(captureResponse.getCaptureResult().getCaptureDetails()\n .getAmazonCaptureId());\n this.printMessage(\"Capture for this Order Reference is complete\");\n\n ProviderCreditSummaryList providerCreditSummaryList = null;\n if (providerId != null && creditAmount != null) {\n providerCreditSummaryList = this.waitForCaptureDetailsWithProviderCreditSummaryList(captureResponse\n .getCaptureResult().getCaptureDetails().getAmazonCaptureId());\n getProviderCreditDetails(providerCreditSummaryList);\n }\n }\n this.printMessage(\"Now Closing the Order Reference...\");\n example.closeOrder();\n this.printMessage(\"Order Refernce Moved to CLOSED state.\");\n this.printMessage(\"Simple Checkout Example is complete.\");\n\n } catch (OffAmazonPaymentsServiceException ex) {\n outStream.println(\"Caught Exception: \" + ex.getMessage());\n outStream.println(\"Response Status Code: \" + ex.getStatusCode());\n outStream.println(\"Error Code: \" + ex.getErrorCode());\n outStream.println(\"Error Type: \" + ex.getErrorType());\n outStream.println(\"Request ID: \" + ex.getRequestId());\n outStream.println(\"XML: \" + ex.getXML());\n outStream.println(\"ResponseHeaderMetadata: \" + ex.getResponseHeaderMetadata());\n ex.printStackTrace(outStream);\n } finally {\n this.printMessage(\"</pre></div></body></html>\");\n }\n\n }", "public void getAdapterDetails(RoutingContext routingContext) {\n LOGGER.info(\"getAdapterDetails method starts\");\n HttpServerRequest request = routingContext.request();\n HttpServerResponse response = routingContext.response();\n String domain = request.getParam(JSON_DOMAIN);\n String usersha = request.getParam(JSON_USERSHA);\n String resourceGroup = request.getParam(JSON_RESOURCE_GROUP);\n String resourceServer = request.getParam(JSON_RESOURCE_SERVER);\n String adapterId = domain + \"/\" + usersha + \"/\" + resourceServer + \"/\" + resourceGroup;\n Future<JsonObject> brokerResult = managementApi.getAdapterDetails(adapterId, databroker);\n brokerResult.onComplete(brokerResultHandler -> {\n if (brokerResultHandler.succeeded()) {\n handleSuccessResponse(response, ResponseType.Ok.getCode(),\n brokerResultHandler.result().toString());\n } else {\n processBackendResponse(response, brokerResultHandler.cause().getMessage());\n }\n });\n\n }", "public String getDetailsRequest(String correlationId) {\n\t\tString dtlTemplate = StringUtils.replace(\r\n\t\t\t\tDetailsTemplateConstant.INSTANCE.DTL_JMS, \"#!CORRELATIONID!#\", correlationId);\r\n\t\treturn dtlTemplate;\r\n\t}", "public Integer getTargetID()\r\n\t\t{ return mapping.getTargetId(); }", "private String processQueryRequest(UserTransaction transaction,int transactionTimeout,DataSourceLookup dsLookup,SetFinderDAOFactory sfDAOFactory,String xmlRequest,String sqlString, String sessionId, String queryInstanceId, String patientSetId) \n\t\tthrows I2B2DAOException,I2B2Exception {\n\t\t\tQueryDefinitionRequestType qdRequestType = getQueryDefinitionRequestType(xmlRequest);\n\t\t\tResultOutputOptionListType resultOutputList = qdRequestType.getResultOutputList();\n\t\t\tDataSource dataSource = ServiceLocator.getInstance().getAppServerDataSource(dsLookup.getDataSource());\n\t\t\tQueryExecutorDao queryExDao = new QueryExecutorDao(dataSource,dsLookup);\n\t\t\t\n\t\t\tqueryExDao.executeSQL(transaction,transactionTimeout,dsLookup, sfDAOFactory, sqlString, queryInstanceId, patientSetId,resultOutputList);\n\t\t\treturn patientSetId;\n\t}", "public void process()\n {\n ClientRequest clientRequest = threadPool.remove();\n\n if (clientRequest == null)\n {\n return;\n }\n\n\n // Do the work\n // Create new Client\n ServiceLogger.LOGGER.info(\"Building client...\");\n Client client = ClientBuilder.newClient();\n client.register(JacksonFeature.class);\n\n // Get uri\n ServiceLogger.LOGGER.info(\"Getting URI...\");\n String URI = clientRequest.getURI();\n\n ServiceLogger.LOGGER.info(\"Getting endpoint...\");\n String endpointPath = clientRequest.getEndpoint();\n\n // Create WebTarget\n ServiceLogger.LOGGER.info(\"Building WebTarget...\");\n WebTarget webTarget = client.target(URI).path(endpointPath);\n\n // Send the request and save it to a Response\n ServiceLogger.LOGGER.info(\"Sending request...\");\n Response response = null;\n if (clientRequest.getHttpMethodType() == Constants.getRequest)\n {\n // Create InvocationBuilder\n ServiceLogger.LOGGER.info(\"Starting invocation builder...\");\n Map<String, Object> queryMap = clientRequest.getQueryParams();\n String pathParam = clientRequest.getPathParam();\n\n if (pathParam != null)\n {\n webTarget = webTarget.path(pathParam);\n }\n\n if (queryMap != null)\n {\n ServiceLogger.LOGGER.info(\"QUERY MAP NOT NULL.\");\n for (Map.Entry<String, Object> entry : queryMap.entrySet())\n {\n webTarget = webTarget.queryParam(entry.getKey(), entry.getValue());\n }\n }\n ServiceLogger.LOGGER.info(\"WEBTARGET: \" + webTarget.toString());\n\n Invocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON);\n\n ServiceLogger.LOGGER.info(\"Got a GET request.\");\n response = invocationBuilder\n .header(\"email\", clientRequest.getEmail())\n .header(\"sessionID\", clientRequest.getSessionID())\n .header(\"transactionID\", clientRequest.getTransactionID())\n .get();\n }\n else if (clientRequest.getHttpMethodType() == Constants.postRequest)\n {\n // Create InvocationBuilder\n ServiceLogger.LOGGER.info(\"Starting invocation builder...\");\n Invocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON);\n Map<String, Object> queryMap = clientRequest.getQueryParams();\n\n if (queryMap != null)\n {\n ServiceLogger.LOGGER.info(\"QUERY MAP NOT NULL.\");\n for (Map.Entry<String, Object> entry : queryMap.entrySet())\n {\n webTarget = webTarget.queryParam(entry.getKey(), entry.getValue());\n }\n }\n ServiceLogger.LOGGER.info(\"WEBTARGET: \" + webTarget.toString());\n\n ServiceLogger.LOGGER.info(\"Got a POST request.\");\n response = invocationBuilder\n .header(\"email\", clientRequest.getEmail())\n .header(\"sessionID\", clientRequest.getSessionID())\n .header(\"transactionID\", clientRequest.getTransactionID())\n .post(Entity.entity(clientRequest.getRequest(), MediaType.APPLICATION_JSON));\n }\n else if (clientRequest.getHttpMethodType() == Constants.deleteRequest)\n {\n String pathParam = clientRequest.getPathParam();\n if (pathParam != null)\n {\n webTarget = webTarget.path(pathParam);\n }\n Invocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON);\n\n ServiceLogger.LOGGER.info(\"Got a DELETE request.\");\n response = invocationBuilder\n .header(\"email\", clientRequest.getEmail())\n .header(\"sessionID\", clientRequest.getSessionID())\n .header(\"transactionID\", clientRequest.getTransactionID())\n .delete();\n }\n else\n {\n ServiceLogger.LOGGER.warning(ANSI_YELLOW + \"Request was not sent successfully\");\n }\n ServiceLogger.LOGGER.info(ANSI_GREEN + \"Sent!\" + ANSI_RESET);\n\n // Check status code of request\n String jsonText = \"\";\n int httpstatus = response.getStatus();\n\n jsonText = response.readEntity(String.class);\n\n // Add response to database\n String email = clientRequest.getEmail();\n String sessionID = clientRequest.getSessionID();\n ResponseDatabase.insertResponseIntoDB(clientRequest.getTransactionID(), jsonText, email, sessionID, httpstatus);\n\n }", "private void fetchIncomingData() {\n Bundle bundle = getIntent().getExtras();\n if (bundle.containsKey(\"TAX_ID\") && bundle.containsKey(\"TAX_NAME\")) {\n INCOMING_TAX_NAME = bundle.getString(\"TAX_NAME\");\n INCOMING_TAX_ID = bundle.getString(\"TAX_ID\");\n if (INCOMING_TAX_ID != null) {\n new fetchTaxDetails().execute();\n } else {\n //TODO: SHOW AN ERROR\n }\n } else {\n //TODO: SHOW AN ERROR\n }\n }", "private void processRequest(HttpServletRequest request, HttpServletResponse response) {\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException\r\n {\r\n response.setContentType(\"text/html;charset=UTF-8\");\r\n PrintWriter out = response.getWriter();\r\n try\r\n {\r\n // A user is not needed for this query, so we don't check for him.\r\n // The response is the id of the latest reservation. If an error\r\n // occurs we send back 'error'.\r\n int mi = Delphi.Inst().getResMaxID();\r\n out.print(Integer.toString(mi));\r\n }\r\n catch (Exception ex) \r\n {\r\n AppLog.Instance().Error(\"ResGetMaxID \" + ex.getMessage());\r\n out.print(\"error\");\r\n }\r\n finally\r\n {\r\n out.close();\r\n }\r\n }", "public List<PaymentRequestDocument> getPaymentRequestsToExtract(String campusCode, Integer paymentRequestIdentifier, Integer purchaseOrderIdentifier, Integer vendorHeaderGeneratedIdentifier, Integer vendorDetailAssignedIdentifier, Date currentSqlDateMidnight);", "public Integer getTargetId() {\n\t\treturn targetId;\n\t}", "private void requestHandler(Object context)\n {\n final String funcName = \"requestHandler\";\n @SuppressWarnings(\"unchecked\")\n TrcRequestQueue<Request>.RequestEntry entry = (TrcRequestQueue<Request>.RequestEntry) context;\n Request request = entry.getRequest();\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.TASK, \"request=%s\", request);\n }\n\n request.canceled = entry.isCanceled();\n if (!request.canceled)\n {\n if (request.readRequest)\n {\n request.buffer = readData(request.address, request.length);\n if (debugEnabled)\n {\n if (request.buffer != null)\n {\n dbgTrace.traceInfo(funcName, \"readData(addr=0x%x,len=%d)=%s\",\n request.address, request.length, Arrays.toString(request.buffer));\n \n }\n }\n }\n else\n {\n request.length = writeData(request.address, request.buffer, request.length);\n }\n }\n\n if (request.completionEvent != null)\n {\n request.completionEvent.set(true);\n }\n\n if (request.completionHandler != null)\n {\n request.completionHandler.notify(request);\n }\n\n if (debugEnabled)\n {\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.TASK);\n }\n }", "@Override\n\tpublic List<Map<String,String>> dispatchRequest(Map<String, String[]> request) {\n\n\t\t// ********* LOGGING ********* \n\t\tSystem.out.println(\"reached DispatchRequest\");\n\t\tSystem.out.println(\"Request Keys : \");\n\t\tSystem.out.println(request.keySet());\n\t\t// ********* LOGGING ********* \n\n\n\t\tString classPrefix = request.get(\"requestID\")[0]; \n\n\t\t// ********* LOGGING ********* \n\t\tSystem.out.println(\"class name : \"+PACKAGE_NAME+classPrefix+CLASS_SUFFIX);\n\t\t// ********* LOGGING ********* \n\n\t\t// obtain class reference\t\t\n\t\tiManagementRequestHandlerObject = (IManagementRequestHandler) \n\t\t\t\tiReflectionManagerObject.getClass(PACKAGE_NAME+classPrefix+CLASS_SUFFIX);\n\n\t\t// ********* LOGGING *********\n\t\tSystem.out.println(\"object reference : \"+ iManagementRequestHandlerObject);\n\t\t// ********* LOGGING *********\n\n\t\t// Delegate the request to the appropriate class.\n\t\treturn (iManagementRequestHandlerObject.handleManagementRequest(request));\n\n\t}", "void requestId(long requestId);", "void requestId(long requestId);", "public void setTargetObjectId(String targetObjectId) {\n this.targetObjectId = targetObjectId;\n }", "public Entity.ID getTargetID() {\n return targetID;\n }", "RecordResult retrieveRecord(String recordID) throws RepoxException;", "public StateID GetTarget()\n {\n return targetID;\n }", "@Override\n\tpublic void retrieved(ID target) {\n\t\tfinal Boolean handleHit = handleHit(target, chordImpl.getLastReceivedTransactionID() + 1);\n\t\tchordImpl.broadcast(target, handleHit);\n\t\tif (handleHit) {\n\t\t\tGUIMessageQueue.getInstance().addMessage(\"The Shoot on the ID: \" + target + \" was a hit!\");\n\t\t}\n\t\tif (ownPlayer.getRemainingShips() > 0) {\n\t\t\tshoot();\n\t\t} else {\n\t\t\tGUIMessageQueue.getInstance()\n\t\t\t\t\t.addMessage(WIN_LOSE_SEPERATOR + \"I lose!!! Game Over!!!\" + WIN_LOSE_SEPERATOR);\n\t\t}\n\t}", "public void incomingSearchRequest(APDUEvent e)\n {\n LOGGER.finer(\"Processing incomingSearch_Request\");\n \n SearchRequest_type search_request = (SearchRequest_type) (e.getPDU().o);\n \n // Create a search response\n PDU_type pdu = new PDU_type();\n pdu.which=PDU_type.searchresponse_CID;\n SearchResponse_type response = new SearchResponse_type();\n pdu.o = response;\n \n int ssub = search_request.smallSetUpperBound.intValue();\n int lslb = search_request.largeSetLowerBound.intValue();\n int mspn = search_request.mediumSetPresentNumber.intValue();\n \n LOGGER.finer(\"ssub = \" + ssub + \" lslb = \" + lslb + \" mspn = \" + mspn);\n \n response.referenceId = search_request.referenceId; \n \n // Assume failure unless something below sets to true\n response.searchStatus = Boolean.FALSE;\n \n RootNode rn = null;\n \n try\n {\n switch(search_request.query.which)\n {\n case Query_type.type_0_CID:\n LOGGER.finer(\"Processing Any Query\");\n // Any\n break;\n case Query_type.type_1_CID:\n case Query_type.type_101_CID:\n // RPN query\n LOGGER.finer(\"Processing RPN Query\");\n rn = com.k_int.z3950.util.RPN2Internal.zRPNStructure2RootNode\n \t ((RPNQuery_type)(search_request.query.o));\n break;\n case Query_type.type_2_CID:\n case Query_type.type_100_CID:\n case Query_type.type_102_CID:\n LOGGER.finer(\"Processing OctetString Query\");\n // Octet String\n break;\n }\n \n if ( rn != null )\n {\n LOGGER.finer(\"Got root node\");\n \n IRQuery q = new IRQuery();\n q.collections = search_request.databaseNames;\n q.query = new com.k_int.IR.QueryModels.RPNTree(rn);\n \n // Process the query\n LOGGER.finer(\"Create Search Task with query:\" + q);\n SearchTask st = search_service.createTask\n \t (q, search_request.referenceId);\n \t\n \n // Evaluate the query, waiting 10 seconds for the task to complete. \n \t//We really want to be\n // able to pass in a predicate to wait for here, \n \t//e.g. evaluate(10000, \"NumHits > 100 OR Status=Complete\");\n LOGGER.finer(\"Evaluate Search Task\");\n try\n {\n st.evaluate(10000);\n }\n catch ( TimeoutExceededException tee )\n {\n LOGGER.finer(\"Timeout exceeded waiting for search to complete\");\n }\n \n if ( search_request.resultSetName != null ) {\n \t LOGGER.finer(\"putting st with name \" + \n \t\t\t search_request.resultSetName);\n \t active_searches.put(search_request.resultSetName, st);\n \t}\n \tactive_searches.put(\"Default\", st);\n \t\n // Result records processing\n int result_count = st.getTaskResultSet().getFragmentCount();\n LOGGER.finer(\"result count is \"+result_count);\n \n // Number of hits\n response.resultCount = BigInteger.valueOf(result_count);\n \n // Figure out Search Status\n if ( ( st.getTaskStatusCode() != SearchTask.TASK_FAILURE ) )\n {\n response.searchStatus = Boolean.TRUE;\n }\n else\n {\n // Figure out Result Set Status\n switch ( st.getTaskStatusCode() )\n {\n case SearchTask.TASK_EXECUTING_ASYNC:\n case SearchTask.TASK_EXECUTING_SYNC:\n // resultSetStatus = 2 (interim) Partial results available, \n \t\t//not necessarily valid\n response.resultSetStatus = BigInteger.valueOf(2);\n break;\n case SearchTask.TASK_FAILURE:\n // resultSetStatus = 3 (none) No result set\n response.resultSetStatus = BigInteger.valueOf(3);\n break;\n }\n }\n \n LOGGER.finer(\"Is \"+result_count+\" <= \"+lslb +\" or <= \"+ssub);\n \n if ( ( result_count <= lslb ) || ( result_count <= ssub ) )\n {\n LOGGER.finer(\"Yep\");\n \n int start = 1;\n int count = ( result_count <= ssub ? result_count : mspn );\n \n if ( count > 0 )\n \t {\n \t\t LOGGER.finer(\"Asking for \"+count+\n \t\t\t \" response records from \"+start);\n \t\t LOGGER.finer(\"Search request default = \" \n \t\t\t + search_request.preferredRecordSyntax);\n \t\t response.records = createRecordsFor\n \t\t (st, search_request.preferredRecordSyntax, start, \n \t\t count, GeoProfile.BREIF_SET);\n \t\t \n \n \t\t if (response.records.which == \n \t\t Records_type.responserecords_CID ){\n \t\t LOGGER.finer(\"We have records\");\n \t\t \n \t\t // Looks like we managed to present some records OK..\n \t\t response.numberOfRecordsReturned = \n \t\t\t BigInteger.valueOf(((Vector)\n \t\t\t\t\t (response.records.o)).size());\n \t\t response.nextResultSetPosition = \n \t\t\t BigInteger.valueOf(count+1);\n \t\t response.presentStatus = BigInteger.valueOf(0);\n \t\t } else { // Non surrogate diagnostics ( Single or Multiple )\n \t\t \n \t\t LOGGER.finer(\"Diagnostics\");\n \t\t response.presentStatus = BigInteger.valueOf(5);\n \t\t response.numberOfRecordsReturned = \n \t\t\t BigInteger.valueOf(0);\n \t\t response.nextResultSetPosition = \n \t\t\t BigInteger.valueOf(1);\n \t\t }\n \t } else {\n \t\t LOGGER.finer(\"No need to piggyback records....\");\n \t\t response.numberOfRecordsReturned = BigInteger.valueOf(0);\n \t\t response.nextResultSetPosition = BigInteger.valueOf(1);\n \t\t response.presentStatus = BigInteger.valueOf(0);\n \t }\n } else {\n \t response.presentStatus = BigInteger.valueOf(5);\n \t response.numberOfRecordsReturned = BigInteger.valueOf(0);\n \t response.nextResultSetPosition = BigInteger.valueOf(1); \t\n \t}\n }\n else\n \t LOGGER.finer(\"Unable to process query into root node\");\n }\n catch ( com.k_int.IR.InvalidQueryException iqe )\n \t{\n \t // Need to send a diagnostic\n \t iqe.printStackTrace();\n \t response.resultCount = BigInteger.valueOf(0);\n \t response.presentStatus = BigInteger.valueOf(5); // Failure\n \t response.numberOfRecordsReturned = BigInteger.valueOf(0);\n \t response.nextResultSetPosition = BigInteger.valueOf(0);\n \t response.resultSetStatus = BigInteger.valueOf(3);\n \t // No result set available\n \t response.records = createNSD(null, iqe.toString());\n \t}\n catch ( SearchException se )\n \t{\n \t // We need to populate a diagnostic here\n \t LOGGER.finer(\"Search returning diagnostic. Reason:\"+se.toString());\n \t se.printStackTrace();\n \t response.resultCount = BigInteger.valueOf(0);\n \t response.presentStatus = BigInteger.valueOf(5); // Failure\n \t response.numberOfRecordsReturned = BigInteger.valueOf(0);\n \t response.nextResultSetPosition = BigInteger.valueOf(0);\n \t response.resultSetStatus = BigInteger.valueOf(3); \n \t // No result set available\n \t response.records = createNSD((String)(se.additional), \n \t\t\t\t\t se.toString());\n \t}\n \n LOGGER.finer(\"Send search response : \");\n try\n \t{\n \t assoc.encodeAndSend(pdu);\n \t}\n catch ( java.io.IOException ioe )\n \t{\n \t ioe.printStackTrace();\n \t} \n }", "public void Large_Req_detail()\n {\n\t boolean largereqpresent =lareqdetails.size()>0;\n\t if(largereqpresent)\n\t {\n\t\t// System.out.println(\"Large Request details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Large Request details report is not present\");\n\t }\n }", "public void handle_request(Request request){\n currentRequest.add(request);\n System.out.println(\"[Worker\"+String.valueOf(id)+\"] Received request of client \"+String.valueOf(request.getId()));\n }", "ThingsResponse loadThingsDetails(ThingsRequest request);", "public void getDetails() {\n presenter = new SkillPresenter(this, this);\n try {\n if (getIntent().getExtras().get(\"from\").toString().equalsIgnoreCase(\"notification\")) {\n presenter.getSkillsNotification(this, getIntent().getIntExtra(\"notification_id\", 0));\n } else if (getIntent().getExtras().get(\"from\").toString().equalsIgnoreCase(\"notificationAdapter\")) {\n presenter.getSkillsNotification(this, getIntent().getIntExtra(\"notification_id\", 0));\n } else {\n presenter.getSkills(this);\n }\n }catch (Exception e){\n e.printStackTrace();\n presenter.getSkills(this);\n }\n }", "public int getR_Request_ID();", "public RecordSet loadAllProcessingDetail(Record inputRecord);", "@Override\n\tprotected Object handleUserinfoEndpointRequest(String requestId) {\n\t\tif(!receivedRefreshRequest) {\n\t\t\t//we don't want the test to be marked as completed if the client sends a userinfo\n\t\t\t//request before sending a refresh request\n\t\t\t//this is not the userinfo request we are looking for\n\t\t\treceivedUserinfoRequest = false;\n\t\t}\n\t\treturn super.handleUserinfoEndpointRequest(requestId);\n\t}", "private static HashMap<String, Object> fetchReferralRecruitmentData(HashMap<String, Object> parameterMap) {\n\t\t//BEGIN-PROCEDURE HR05-GET-REFERRAL-SOURCE\n\t\tPsPersonalApplicantReferral psReferralSource = PsPersonalApplicantReferral.findByEmployeeIdAndEffectiveDate((String)parameterMap.get(\"employeeId\"), (Date)parameterMap.get(\"effectiveDate\")); //PS_PERS_APPL_REF\n\t\tBigInteger referralSourceId = psReferralSource.getSourceId();\n\t\tPsRecruitmentSource psRecruitmentSource = PsRecruitmentSource.findBySourceId(referralSourceId); //PS_HRS_SOURCE_I\n\t\tString referralSourceDescription = psRecruitmentSource.getSourceDescription();\n//\t\tPsRecruitmentSource psRecruitmentSource = PsRecruitmentSource.findByRecruitmentSourceId(recruitmentSourceId); //PS_HRS_SOURCE_I\n\t\t//LET $PSRecruit_Source_Code = LTRIM(RTRIM(&CHSI2.HRS_SOURCE_NAME,' '),' ') \n\t\tString referralSourceName = psRecruitmentSource.getSourceName();\n\t\tString psSpecificReferralSource = \"\";\n\t\t//DO HR05-FORMAT-REFERRAL-SOURCE \n\t\t\t//BEGIN-PROCEDURE HR05-FORMAT-REFERRAL-SOURCE\n\t\t\t//Let $Found = 'N' !Initialize the found indicator\n\t\t\t//!Based on the value in the PeopleSoft Recruit Source Code assign the\n\t\t\t//!corresponding legacy system code that will be passed.\n\t\t\t//Let $PSReferral_Source = &CPT101.ZHRF_LEGRECRUITSRC\n\t\t\tString referralSource = CrossReferenceReferralSource.findActiveLegacyRecruiterSourceByReferralSource(referralSourceName); //PS_ZHRT_RFSRC_CREF\n\t\t\t//IF ($Found = 'N')\n\t\t\tif(referralSource == null) {\n\t\t\t\t//LET $PSReferral_Source = ' '\n\t\t\t\treferralSource = \"\";\n\t\t\t\t//IF $PSRecruit_Source_Code = ' ' !If the Referral Source code was not entered in PS\n\t\t\t\tif(referralSourceName == null || referralSourceName.isEmpty()) {\n\t\t\t\t\tparameterMap.put(\"errorProgram\", \"ZHRI105A\");\n\t\t\t\t\t//LET $ErrorMessageParm = 'Referral source not selected in PeopleSoft.'\n\t\t\t\t\tparameterMap.put(\"errorMessage\", \"Referral source not selected in PeopleSoft.\");\n\t\t\t\t\t//DO Prepare-Error-Parms ! JHV 09/11/02 fix Date Mask error ZHR_PRDSPT_INTF_ERROR\n\t\t\t\t\t//DO Call-Error-Routine !From ZHRI100A.SQR\n\t\t\t\t\tMain.doErrorCommand(parameterMap);\n\t\t\t\t}\n\t\t\t\t//ELSE\n\t\t\t\telse {\n\t\t\t\t\t//LET $PSSpecific_Refer_Src = SUBSTR($PSRefSourceDescr,1,35)\n\t\t\t\t\tpsSpecificReferralSource = referralSourceDescription;\n//\t\t\t\t\tPSSpecific_Refer_Src = PSRefSourceDescr;\n\t\t\t\t//END-IF !$PSRecruit_Source_Code = ' '\n\t\t\t\t}\n\t\t\t//END-IF !$Found = 'N'\n\t\t\t}\n\t\t\t//!Make sure not less than 35 long\n\t\t\t//LET $PSSpecific_Refer_Src = SUBSTR($PSRefSourceDescr,1,35) \n\t\t\t//TODO: //LET $PSSpecific_Refer_Src = RPAD($PSSpecific_Refer_Src,35,' ')\n\t\t\tpsSpecificReferralSource = psSpecificReferralSource.substring(0, 35);\n\t\t\tString recruitmentSourceId = psRecruitmentSource.getSourceDescription();\n\t\t\tif(recruitmentSourceId != null) {\n\t\t\t\trecruitmentSourceId = recruitmentSourceId.trim();\n\t\t\t\trecruitmentSourceId = String.format(\"%1$-35s\", recruitmentSourceId);\n\t\t\t}\n\t\t\tparameterMap.put(\"recruitmentSourceId\", recruitmentSourceId);\n\t\t\t//END-PROCEDURE HR05-FORMAT-REFERRAL-SOURCE\n\t\t//Let $PSReferralSource = LTRIM(RTRIM(&CHSI2.HRS_SOURCE_NAME,' '),' ') \n//\t\tString PSReferralSource = psRecruitmentSource.getSourceName();\n\t\t//END-PROCEDURE HR05-GET-REFERRAL-SOURCE\n\t\treferralSource = referralSource != null ? referralSource.trim() : referralSource;\n\t\tparameterMap.put(\"referralSource\", referralSource);\n\t\treturn parameterMap;\n\t}", "private void processRequest(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response) {\n\r\n\t}", "private void requestOrderDetail() {\n\n ModelHandler.OrderRequestor.requestOrderDetail(client, mViewData.getOrder().getId(), (order) -> {\n mViewData.setOrder(order);\n onViewDataChanged();\n }, this::showErrorMessage);\n }", "Response get(URL target, QueryInput input, List<? extends HttpAuthentication> auth)\n throws IOException, DataRetrievalException;", "private void requestRecord() throws IOException {\n\n String targetCamCode = dis.readUTF();\n\n Cam targetCam = CamRegister.findRegisteredCam(targetCamCode);\n\n try {\n DataOutputStream targetDos = new DataOutputStream(targetCam.getCamSocket().getOutputStream());\n targetDos.writeInt(RECORD_CAM_COMMAND);\n targetDos.flush();\n\n dos.writeInt(SUCCESS_CODE);\n dos.flush();\n } catch (Exception e) {\n dos.writeInt(NOT_FOUND_CODE);\n dos.flush();\n }\n }", "@Override\n public void onCollectInformationRequest(CollectInformationRequest arg0) {\n\n }", "IRequestTarget resolveRequestTarget(String requestedUrl);", "public MeasureRequestedEvent(String id, String measureId, String targetGroup, Map<String, Object> context) {\n\t\tsuper(id, MODEL_ID, Type.SERVICE);\n\t\tgetPayload().put(\"measureId\", measureId);\n\t\tgetPayload().put(\"targetGroup\", targetGroup);\n\t\tif (context != null) getPayload().put(\"context\", context);\n\t}", "@PayloadRoot(namespace = \"http://wsguardian.com/courses\", localPart = \"GetCourseDetailsRequest\")\n\t@ResponsePayload\n\tpublic GetCourseDetailsResponse processCourseDetailsRequest(@RequestPayload GetCourseDetailsRequest request,MessageContext context) {\n\t\t//Extraer request del message context\n\t\n\t\tByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n\t try {\n\t context.getRequest().writeTo(outputStream);\n\t String httpMessage = new String(outputStream.toByteArray());\n\t System.out.println(\"message context :::::: \"+ httpMessage);\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t \n\t // a byte para base 64\n\t String encodedString = Base64.getEncoder().encodeToString(outputStream.toByteArray());\n\t System.out.println(\"message context en Base 64:::::: \"+ encodedString);\n\t\t\n\t //rest llamado\n\t RestTemplate rt = new RestTemplate();\n rt.getMessageConverters().add(new MappingJackson2HttpMessageConverter());\n rt.getMessageConverters().add(new StringHttpMessageConverter());\n\n String uri = new String(\"http://localhost:9090/signature\");\n\t \n ResponseEntity<Boolean> validacion = rt.postForEntity(uri, encodedString,boolean.class);\n System.out.println(\"Respuesta validacion firma:::::: \"+ validacion.getBody());\n \n\t\t//logica para realizar la respuesta de la peticion de getcoursedetails \n\t\tCourse course = service.findById(request.getId());\n\t\t\n\t\tif(course == null) {\n\t\t\tthrow new CourseNotFoundException(\"Invalid course id \" + request.getId());\n\t\t}\n\t\treturn mapCourseDetails(course);\n\t}", "public void setToRefid(String targetid) {\n this.targetid = targetid;\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n\n \n String counselorID = request.getParameter(\"counselorID\");\n String dateTime = request.getParameter(\"dateTime\");\n String firstName = request.getParameter(\"firstName\");\n String city = request.getParameter(\"city\");\n String lastName = request.getParameter(\"lastName\");\n String state = request.getParameter(\"state\");\n String phone = request.getParameter(\"phone\");\n String zip = request.getParameter(\"zip\");\n String address = request.getParameter(\"address\");\n String description = request.getParameter(\"description\");\n String callType = request.getParameter(\"callType\");\n\n Caller _caller = new Caller();\n _caller.setFirstName(firstName);\n _caller.setLastName(lastName);\n _caller.setPhone(phone);\n _caller.setCity(city);\n _caller.setState(state);\n _caller.setZip(zip);\n _caller.setAddress(address);\n\n CallRecord _callRecord = new CallRecord();\n \n _callRecord.setStartTime(dateTime);\n _callRecord.setCallDescription(description);\n _callRecord.setCallTypeID(callType);\n _callRecord.setCounselorID(Integer.parseInt(counselorID));\n\n if (request.getParameter(\"btnCreate\") != null) {\n // handle create stuff here!\n try {\n _caller.setCallerID(CallerAccessor.createCallRecord(_caller, _callRecord)); \n// CallerAccessor.insertCallRecord(_caller, _callRecord);\n } catch (Exception e) {\n System.err.println(e.getMessage());\n }\n\n request.getRequestDispatcher(\"CallRecord.jsp\").forward(request, response);\n } else if (request.getParameter(\"btnUpdate\") != null) {\n // handle update stuff here.\n request.getRequestDispatcher(\"CallRecord.jsp\").forward(request, response);\n }\n\n// try (PrintWriter out = response.getWriter()) {\n// /* TODO output your page here. You may use following sample code. */\n// out.println(\"<!DOCTYPE html>\");\n// out.println(\"<html>\");\n// out.println(\"<head>\");\n// out.println(\"Servlet CallRecordHandler \" + callType); \n// out.println(\"</head>\");\n// out.println(\"<body>\");\n// out.println(\"<h1>Servlet CallRecordHandler at \" + request.getContextPath() + \"</h1>\");\n// out.println(\"</body>\");\n// out.println(\"</html>\");\n// }\n }", "DescribeRecordResult describeRecord(DescribeRecordRequest describeRecordRequest);", "@Override\n protected void executeFetch(final String requestId, DSRequest request, final DSResponse response)\n {\n final int startIndex = (request.getStartRow() < 0) ? 0 : request.getStartRow();\n final int endIndex = (request.getEndRow() == null) ? -1 : request.getEndRow();\n\n String userId = request.getCriteria().getAttribute(\"userId\");\n UserDTO userDto = new UserDTO();\n userDto.setId(Long.parseLong(userId));\n\n service.fetch(userDto, new AsyncCallback<List<ContactDTO>>()\n {\n public void onFailure(Throwable caught)\n {\n caught.printStackTrace();\n response.setStatus(RPCResponse.STATUS_FAILURE);\n processResponse(requestId, response);\n }\n\n public void onSuccess(List<ContactDTO> result)\n {\n // Calculating size of return list\n int size = result.size();\n if (endIndex >= 0)\n {\n if (endIndex < startIndex)\n {\n size = 0;\n }\n else\n {\n size = endIndex - startIndex + 1;\n }\n }\n // Create list for return - it is just requested records\n ListGridRecord[] list = new ListGridRecord[size];\n if (size > 0)\n {\n for (int i = 0; i < result.size(); i++)\n {\n if (i >= startIndex && i <= endIndex)\n {\n ListGridRecord record = new ListGridRecord();\n copyValues(result.get(i), record);\n list[i - startIndex] = record;\n }\n }\n }\n response.setStatus(RPCResponse.STATUS_SUCCESS);\n response.setData(list);\n // IMPORTANT: for paging to work we have to specify size of full\n // result set\n response.setTotalRows(result.size());\n processResponse(requestId, response);\n }\n });\n }", "CompletableFuture<RestoreInfoResponse> requestRestoreInfo(\n MemberId server, RestoreInfoRequest request);", "void handleRequest();", "void setRequestID(java.lang.String requestID);", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n long id = new Integer(request.getParameter(\"id\"));\n\n \n ResourcePOJO res = null;\n// try {\n res = manager.getResource(id, false);\n// } catch (JAXBException e) {\n// throw new IOException(e.getMessage());\n// }\n LayerManager layerBean = new LayerManager(res);\n \n try {\n \n request.setAttribute(\"layer\", layerBean);\n \n String layerName = layerBean.getName();\n \n List<ResourcePOJO> relatedStatsDefs = manager.searchStatsDefByLayer(layerName);\n request.setAttribute(\"statsDefs\", relatedStatsDefs);\n \n List<ResourcePOJO> relatedLayerUpdates = manager.searchLayerUpdatesByLayerName(layerName);\n request.setAttribute(\"layerUpdates\", relatedLayerUpdates);\n \n String data = manager.getData(id, MediaType.WILDCARD_TYPE.toString());\n layerBean.setData(data);\n \n request.setAttribute(\"storedData\", data);\n \n } catch (Exception ex) {\n Logger.getLogger(LayerShow.class.getName()).log(Level.SEVERE, null, ex);\n }\n String outputPage = getServletConfig().getInitParameter(\"outputPage\");\n RequestDispatcher rd = request.getRequestDispatcher(outputPage);\n rd.forward(request, response);\n }", "public HashMap<String, Object> getPatientLabRequestById(HashMap<String, Object> patientLabRequestId);", "private void showRequestDetails() {\n\t\tlblExamID.setText(req.getExamID());\n\t\tlblDuration.setText(String.valueOf(req.getOldDur()));\n\t\tlblNewDuration.setText(String.valueOf(req.getNewDur()));\n\t\ttxtAreaExplanation.setText(req.getExplanation());\n\t}", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n ResponseResult result = null;\n\n try {\n P2PBridgeWebServiceStub stub = new P2PBridgeWebServiceStub();\n GetStatus stat = new GetStatus();\n stat.setIpAddress(request.getParameter(\"ip_address\"));\n stat.setMake(request.getParameter(\"device\"));\n stat.setModel(request.getParameter(\"model\"));\n stat.setUserName(request.getParameter(\"username\"));\n stat.setPassword(request.getParameter(\"password\"));\n\n GetStatusResponse res = stub.getStatus(stat);\n result = res.get_return();\n\n System.out.println(result.getResult());\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n Utils.generateResponse(result, response);\n }", "long requestId();", "long requestId();", "public void getRequest(Request request, Response response) {\n\t\tretrieveObject(request, response);\n\t}", "public String getToRefid() {\n return targetid;\n }", "private List loadTargetList(HttpServletRequest request) {\n\t\tTargetDao targetDao = (TargetDao) getBean(\"TargetDao\");\n\t\treturn targetDao.getTargets(AgnUtils.getCompanyID(request));\n\t\t\n\t}", "public void getDetail(int id) {\n\t\t\n\t}", "@SuppressWarnings(\"all\")\n private Record findTarget() {\n final ConcurrentMap<String, Record> address = ORIGIN.getRegistryData();\n final String target = this.getValue(\"to\");\n final String name = this.getValue(\"name\");\n // 1. Find service names\n final List<Record> records = this.findRecords();\n final Record record = records.stream().filter(item ->\n target.equals(item.getMetadata().getString(\"path\")))\n .findAny().orElse(null);\n // Service Name\n Fn.outWeb(null == record, this.logger,\n _501RpcImplementException.class, this.getClass(),\n name, target, this.event);\n // Address Wrong\n Fn.outWeb(null == record.getMetadata() ||\n !target.equals(record.getMetadata().getString(\"path\")), this.logger,\n _501RpcAddressWrongException.class, this.getClass(),\n target, name);\n this.logger.info(Info.RECORD_FOUND, record.toJson());\n return record;\n }", "@Override\r\n\tprotected void processTarget() {\n\r\n\t}", "@Override\r\n\tprotected void processTarget() {\n\r\n\t}", "protected void doInvocation(){\n org.omg.CORBA.portable.Delegate delegate=StubAdapter.getDelegate(\n _target);\n // Initiate Client Portable Interceptors. Inform the PIHandler that\n // this is a DII request so that it knows to ignore the second\n // inevitable call to initiateClientPIRequest in createRequest.\n // Also, save the RequestImpl object for later use.\n _orb.getPIHandler().initiateClientPIRequest(true);\n _orb.getPIHandler().setClientPIInfo(this);\n InputStream $in=null;\n try{\n OutputStream $out=delegate.request(null,_opName,!_isOneWay);\n // Marshal args\n try{\n for(int i=0;i<_arguments.count();i++){\n NamedValue nv=_arguments.item(i);\n switch(nv.flags()){\n case ARG_IN.value:\n nv.value().write_value($out);\n break;\n case ARG_OUT.value:\n break;\n case ARG_INOUT.value:\n nv.value().write_value($out);\n break;\n }\n }\n }catch(Bounds ex){\n throw _wrapper.boundsErrorInDiiRequest(ex);\n }\n $in=delegate.invoke(null,$out);\n }catch(ApplicationException e){\n // REVISIT - minor code.\n // This is already handled in subcontract.\n // REVISIT - uncomment.\n //throw new INTERNAL();\n }catch(RemarshalException e){\n doInvocation();\n }catch(SystemException ex){\n _env.exception(ex);\n // NOTE: The exception should not be thrown.\n // However, JDK 1.4 and earlier threw the exception,\n // so we keep the behavior to be compatible.\n throw ex;\n }finally{\n delegate.releaseReply(null,$in);\n }\n }", "@SuppressWarnings(\"unchecked\")\n @Override\n public void onReceive(Request request) throws Throwable {\n Util.initializeContext(request, TelemetryEnvKey.USER);\n // set request id fto thread loacl...\n ExecutionContext.setRequestId(request.getRequestId());\n\n Response response = new Response();\n if (request.getOperation().equalsIgnoreCase(ActorOperations.ADD_CONTENT.getValue())) {\n Util.DbInfo dbInfo = Util.dbInfoMap.get(JsonKey.LEARNER_CONTENT_DB);\n Util.DbInfo batchdbInfo = Util.dbInfoMap.get(JsonKey.COURSE_BATCH_DB);\n // objects of telemetry event...\n Map<String, Object> targetObject = null;\n List<Map<String, Object>> correlatedObject = null;\n\n String userId = (String) request.getRequest().get(JsonKey.USER_ID);\n List<Map<String, Object>> requestedcontentList =\n (List<Map<String, Object>>) request.getRequest().get(JsonKey.CONTENTS);\n CopyOnWriteArrayList<Map<String, Object>> contentList =\n new CopyOnWriteArrayList<>(requestedcontentList);\n request.getRequest().put(JsonKey.CONTENTS, contentList);\n // map to hold the status of requested state of contents\n Map<String, Integer> contentStatusHolder = new HashMap<>();\n\n if (!(contentList.isEmpty())) {\n for (Map<String, Object> map : contentList) {\n // replace the course id (equivalent to Ekstep content id) with One way hashing\n // of\n // userId#courseId , bcoz in cassndra we are saving course id as userId#courseId\n\n String batchId = (String) map.get(JsonKey.BATCH_ID);\n boolean flag = true;\n\n // code to validate the whether request for valid batch range(start and end\n // date)\n if (!(StringUtils.isBlank(batchId))) {\n Response batchResponse =\n cassandraOperation.getRecordById(\n batchdbInfo.getKeySpace(), batchdbInfo.getTableName(), batchId);\n List<Map<String, Object>> batches =\n (List<Map<String, Object>>) batchResponse.getResult().get(JsonKey.RESPONSE);\n if (batches.isEmpty()) {\n flag = false;\n } else {\n Map<String, Object> batchInfo = batches.get(0);\n flag = validateBatchRange(batchInfo);\n }\n\n if (!flag) {\n response\n .getResult()\n .put((String) map.get(JsonKey.CONTENT_ID), \"BATCH NOT STARTED OR BATCH CLOSED\");\n contentList.remove(map);\n continue;\n }\n }\n map.putIfAbsent(JsonKey.COURSE_ID, JsonKey.NOT_AVAILABLE);\n preOperation(map, userId, contentStatusHolder);\n map.put(JsonKey.USER_ID, userId);\n map.put(JsonKey.DATE_TIME, new Timestamp(new Date().getTime()));\n\n try {\n ProjectLogger.log(\n \"LearnerStateUpdateActor:onReceive: map \" + map, LoggerEnum.INFO.name());\n cassandraOperation.upsertRecord(dbInfo.getKeySpace(), dbInfo.getTableName(), map);\n response.getResult().put((String) map.get(JsonKey.CONTENT_ID), JsonKey.SUCCESS);\n // create telemetry for user for each content ...\n targetObject =\n TelemetryUtil.generateTargetObject(\n (String) map.get(JsonKey.BATCH_ID), JsonKey.BATCH, JsonKey.CREATE, null);\n // since this event will generate multiple times so nedd to recreate correlated\n // objects every time ...\n correlatedObject = new ArrayList<>();\n TelemetryUtil.generateCorrelatedObject(\n (String) map.get(JsonKey.CONTENT_ID), JsonKey.CONTENT, null, correlatedObject);\n TelemetryUtil.generateCorrelatedObject(\n (String) map.get(JsonKey.COURSE_ID), JsonKey.COURSE, null, correlatedObject);\n TelemetryUtil.generateCorrelatedObject(\n (String) map.get(JsonKey.BATCH_ID), JsonKey.BATCH, null, correlatedObject);\n Map<String, String> rollUp = new HashMap<>();\n rollUp.put(\"l1\", (String) map.get(JsonKey.COURSE_ID));\n rollUp.put(\"l2\", (String) map.get(JsonKey.CONTENT_ID));\n TelemetryUtil.addTargetObjectRollUp(rollUp, targetObject);\n TelemetryUtil.telemetryProcessingCall(\n request.getRequest(), targetObject, correlatedObject);\n } catch (Exception ex) {\n response.getResult().put((String) map.get(JsonKey.CONTENT_ID), JsonKey.FAILED);\n contentList.remove(map);\n }\n }\n }\n sender().tell(response, self());\n // call to update the corresponding course\n ProjectLogger.log(\"Calling background job to update learner state\");\n request.getRequest().put(CONTENT_STATE_INFO, contentStatusHolder);\n request.setOperation(ActorOperations.UPDATE_LEARNER_STATE.getValue());\n tellToAnother(request);\n } else {\n onReceiveUnsupportedOperation(request.getOperation());\n }\n }", "private String requestInfo(Long vehicleId) {\n return \"vehicleId(\" + vehicleId + \") \";\n }", "public void retrieveInvoice(final DriverDisplayInvoiceInteractor.onDisplayDataFinishedListener listener, final String userID, final String invoiceID, Context context){\n { com.android.volley.RequestQueue ExampleRequestQueue = Volley.newRequestQueue(context);\n String url = \"https://us-central1-csc207-tli.cloudfunctions.net/get_invoice_information?userID=\"+userID+\"&invoiceID=\"+invoiceID;\n StringRequest ExampleStringRequest = new StringRequest(Request.Method.GET, url, new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n //returns all the invoice info in a string so it now has to be parsed\n String[] info = response.split(\",\");\n //now we know how many invoices do we need to create the same number of buttons\n System.out.println(info);\n listener.onInvoiceRetrievalSuccess(info);\n }\n }, new Response.ErrorListener() { //Create an error listener to handle errors appropriately.\n @Override\n public void onErrorResponse(VolleyError error) {\n }\n });\n ExampleRequestQueue.add(ExampleStringRequest);\n }\n }" ]
[ "0.64813447", "0.6210238", "0.5954467", "0.58514464", "0.5678795", "0.5585127", "0.55485505", "0.5519924", "0.5509859", "0.54636854", "0.5438041", "0.53597003", "0.5308958", "0.5233769", "0.51931703", "0.5142915", "0.5137236", "0.5129423", "0.51143575", "0.51057935", "0.50878996", "0.5078909", "0.50734067", "0.5054327", "0.50477177", "0.5040886", "0.5008745", "0.49986196", "0.49963647", "0.49883428", "0.49880028", "0.49715573", "0.4959398", "0.49226928", "0.49103495", "0.49078715", "0.49055895", "0.4905534", "0.4894975", "0.4891528", "0.48816496", "0.48771167", "0.48706383", "0.4863277", "0.48553103", "0.4841094", "0.48346177", "0.48333952", "0.48274267", "0.48050103", "0.47904646", "0.47879034", "0.4787736", "0.4787736", "0.47782952", "0.47748584", "0.47575313", "0.47563303", "0.4753564", "0.4745204", "0.4744796", "0.47306272", "0.47278288", "0.47267115", "0.47202963", "0.4709789", "0.4700772", "0.46832833", "0.46830106", "0.46817484", "0.467673", "0.4665754", "0.46633527", "0.466281", "0.46561494", "0.46545568", "0.46500725", "0.46450052", "0.46430942", "0.46422708", "0.46409592", "0.4634594", "0.46345058", "0.46287483", "0.46267644", "0.46202454", "0.46165332", "0.46123433", "0.46123433", "0.46107864", "0.4605381", "0.46028322", "0.4602559", "0.46024832", "0.460061", "0.460061", "0.45949918", "0.4591049", "0.45731255", "0.4571379" ]
0.7494852
0
/ processRequest calls the retrieveDetails function with the targetID
private void processRequestRange(String targetID, HttpServerRequest req) throws Exception { String result = retrieveDetails(targetID); if(result != null) req.response().end(result); else req.response().end("No resopnse received"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void processRequest(String targetID, HttpServerRequest req) throws Exception {\n\t\tString result = retrieveDetails(targetID);\n\t\tif(result != null)\n\t\t\treq.response().end(result);\t\n\t\telse\n\t\t\treq.response().end(\"No resopnse received\");\n\t}", "RequestDetail getRequestDetail(String requestId) throws SAXException, IOException;", "public Request loadRequestDetail(long _requestId) throws RequestManagerException, PersistenceResourceAccessException;", "private void getTransactionDetailsRequest() {\r\n\t\tBasicXmlDocument document = new BasicXmlDocument();\r\n\t\tdocument.parseString(\"<\" + TransactionType.GET_TRANSACTION_DETAILS.getValue()\r\n\t\t\t\t+ \" xmlns = \\\"\" + XML_NAMESPACE + \"\\\" />\");\r\n\r\n\t\taddAuthentication(document);\r\n\t\taddReportingTransactionId(document);\r\n\r\n\t\tcurrentRequest = document;\r\n\t}", "public abstract String getRequestTarget(final int requestNumber);", "@Override\r\n\t\t\tpublic void retrieved(ID target) {\n\t\t\t\t\r\n\t\t\t}", "Request<UserInfoDetailsProxy> findUserInfoDetails(Long id);", "@Override\n\tpublic void setTargetDetailOne(int id, HttpServletRequest request) {\n\t\t\n\t}", "public void postDoRetrieve(ID id)\n {\n }", "Request<UserInfoDetailsProxy> findDetailsFromUser(Long id);", "public void handleRequest(ExtractionRequest request);", "@Override\n\tpublic void setTargetDetailTwo(int id, HttpServletRequest request) {\n\t\t\n\t}", "private void getQueueDetails(RoutingContext routingContext) {\n LOGGER.debug(\"Info: getQueueDetails method started;\");\n JsonObject requestJson = new JsonObject();\n HttpServerRequest request = routingContext.request();\n HttpServerResponse response = routingContext.response();\n String instanceID = request.getHeader(HEADER_HOST);\n JsonObject authenticationInfo = new JsonObject();\n authenticationInfo.put(API_ENDPOINT, \"/management/queue\");\n requestJson.put(JSON_INSTANCEID, instanceID);\n String queueId = routingContext.request().getParam(\"queueId\");\n if (request.headers().contains(HEADER_TOKEN)) {\n authenticationInfo.put(HEADER_TOKEN, request.getHeader(HEADER_TOKEN));\n authenticator.tokenInterospect(requestJson, authenticationInfo, authHandler -> {\n LOGGER.debug(\"Info: Authenticating response;\".concat(authHandler.result().toString()));\n if (authHandler.succeeded()) {\n Future<JsonObject> brokerResult = managementApi.getQueueDetails(queueId, databroker);\n brokerResult.onComplete(brokerResultHandler -> {\n if (brokerResultHandler.succeeded()) {\n LOGGER.info(\"Success: Getting Queue Details\");\n handleSuccessResponse(response, ResponseType.Ok.getCode(),\n brokerResultHandler.result().toString());\n } else if (brokerResultHandler.failed()) {\n LOGGER.error(\"Fail: Bad Request;\" + brokerResultHandler.cause());\n processBackendResponse(response, brokerResultHandler.cause().getMessage());\n }\n });\n } else {\n LOGGER.error(\"Fail: Unauthorized;\" + authHandler.cause().getMessage());\n handleResponse(response, ResponseType.AuthenticationFailure);\n }\n });\n } else {\n LOGGER.error(\"Fail: Unauthorized\");\n handleResponse(response, ResponseType.AuthenticationFailure);\n }\n }", "public void setTargetid(Integer targetid) {\n this.targetid = targetid;\n }", "private void forwardRequest(String recordId, String body) {\n\t\tSystem.out.println(\"recordId : \"+recordId + \" body : \"+body);\n\n\t}", "private void getExchangeDetails(RoutingContext routingContext) {\n LOGGER.debug(\"Info: getExchange method started;\");\n JsonObject requestJson = new JsonObject();\n HttpServerRequest request = routingContext.request();\n JsonObject authenticationInfo = new JsonObject();\n authenticationInfo.put(API_ENDPOINT, \"/management/exchange\");\n LOGGER.debug(\"Info: request :: ;\" + request);\n LOGGER.debug(\"Info: request json :: ;\" + requestJson);\n String exchangeId = request.getParam(EXCHANGE_ID);\n String instanceID = request.getHeader(HEADER_HOST);\n requestJson.put(JSON_INSTANCEID, instanceID);\n HttpServerResponse response = routingContext.response();\n if (request.headers().contains(HEADER_TOKEN)) {\n authenticationInfo.put(HEADER_TOKEN, request.getHeader(HEADER_TOKEN));\n authenticator.tokenInterospect(requestJson, authenticationInfo, authHandler -> {\n if (authHandler.succeeded()) {\n Future<JsonObject> brokerResult =\n managementApi.getExchangeDetails(exchangeId, databroker);\n brokerResult.onComplete(brokerResultHandler -> {\n if (brokerResultHandler.succeeded()) {\n LOGGER.info(\"Success: Getting exchange details\");\n handleSuccessResponse(response, ResponseType.Ok.getCode(),\n brokerResultHandler.result().toString());\n } else if (brokerResultHandler.failed()) {\n LOGGER.error(\"Fail: Bad request\" + brokerResultHandler.cause().getMessage());\n processBackendResponse(response, brokerResultHandler.cause().getMessage());\n }\n });\n } else if (authHandler.failed()) {\n LOGGER.error(\"Fail: Unauthorized\" + authHandler.cause().getMessage());\n handleResponse(response, ResponseType.AuthenticationFailure);\n }\n });\n } else {\n LOGGER.error(\"Fail: Unauthorized\");\n handleResponse(response, ResponseType.AuthenticationFailure);\n }\n }", "public DataHolder processRequest(DataHolder indataholder) throws java.rmi.RemoteException;", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n\n HttpSession session = request.getSession(true);\n AuthTest testauth = new AuthTest();\n boolean authExist = testauth.auth(session);\n\n if (authExist) {\n\n try {\n String idRequest = request.getParameter(\"id_request\");\n HashMap<Integer, Request> history = (HashMap<Integer, Request>) session.getAttribute(\"history\");\n if (idRequest == null || history == null) {\n\n request.getRequestDispatcher(\"/WEB-INF/history.jsp\").forward(request, response);\n } else {\n try {\n\n int id = Integer.parseInt(idRequest);\n Request req = history.get(id);\n if (req == null) {\n throw new ObjectNotFoundException(\"history\", \"request_id\", idRequest);\n }\n session.setAttribute(\"request\", req);\n request.getRequestDispatcher(\"/WEB-INF/details.jsp\").forward(request, response);\n// response.sendRedirect(\"WEB-INF/details.jsp\");\n } catch (NumberFormatException ex) {\n throw new InvalidArgumentException(\"id_request\", idRequest);\n }\n }\n\n } catch (InvalidArgumentException | ObjectNotFoundException ex) {\n Logger.getLogger(Monitor.class.getName()).log(Level.SEVERE, null, ex);\n request.setAttribute(\"error\", ex);\n request.getRequestDispatcher(\"/WEB-INF/error.jsp\").forward(request, response);\n } catch (Exception ex) {\n Logger.getLogger(Monitor.class.getName()).log(Level.SEVERE, null, ex);\n request.setAttribute(\"error\", new UnexpectedErrorException(ex));\n request.getRequestDispatcher(\"/WEB-INF/error.jsp\").forward(request, response);\n }\n } else {\n request.getRequestDispatcher(\"/WEB-INF/errorAuth.jsp\").forward(request, response);\n }\n }", "@Override\r\n\tpublic List<Map<String, Object>> selectTargetUser(HttpServletRequest request) throws Exception {\n\t\tString target = request.getParameter(\"target\");\r\n\t\tString insa_code = SessionUtil.getSession(\"memberSession\", \"INSA_CODE\");\r\n\t\t\r\n\t\tMap<String, Object> map = new HashMap<String, Object>();\r\n\t\tmap.put(\"target\", target);\r\n\t\tmap.put(\"insa_code\", insa_code);\r\n\t\t\r\n\t\treturn dao.selectTargetUser(map);\r\n\t}", "public Integer getTargetid() {\n return targetid;\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n PrintWriter out = response.getWriter();\n String id = request.getParameter(\"id\");\n String url = DEFAULT_URL;\n int productId = 0;\n boolean access = false;\n try {\n /* TODO output your page here. You may use following sample code. */\n HttpSession session = request.getSession(false);\n TblUserDTO user = null;\n if (session != null) {\n user = (TblUserDTO) session.getAttribute(\"RESULTLOGIN\");\n if (user != null) {\n if (user.getRole() == 1) {\n access = true;\n }\n }\n }\n if (access) {\n url = URL_FORWARD;\n try {\n productId = Integer.parseInt(id);\n } catch (NumberFormatException e) {\n log(\"GetProductDetailServlet_NumberFormatException:\" + e.getMessage());\n }\n TblProductDAO dao = new TblProductDAO();\n TblProductDTO dto = dao.findProductById(productId, 1);\n if (dto != null) {\n request.setAttribute(\"PRODUCTDETAIL\", dto);\n }\n }\n } catch (NamingException ex) {\n log(\"GetProductDetailServlet_NamingException:\" + ex.getMessage());\n } catch (SQLException ex) {\n log(\"GetProductDetailServlet_SQLException:\" + ex.getMessage());\n } finally {\n RequestDispatcher rd = request.getRequestDispatcher(URL_FORWARD);\n rd.forward(request, response);\n out.close();\n }\n }", "public void getEventDetails() {\r\n\t\t// Query DB to get specific event information based on EventID.\r\n\t}", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n String url = ERROR;\n String strId = request.getParameter(\"id\");\n try {\n Connection con = DbConnection.getConnection();\n ProductRepository pRepo = new ProductRepository(con);\n int id = Integer.parseInt(strId);\n Product objFromdb = pRepo.get(id);\n request.setAttribute(SD.PRODUCT, objFromdb);\n url = SUCCESS;\n } catch (Exception e) {\n log(\"Error at DetailController: \" + e.toString());\n log(e.getMessage());\n } finally {\n request.getRequestDispatcher(url).forward(request, response);\n }\n }", "void addIdentificationRequest(Identification request);", "@Override\r\n\tpublic List<ParamInfo> queryParamInfoByTargetId(String targetId) {\n\t\treturn pm.selectByTargetId(targetId);\r\n\t}", "@Experimental\n @Returns(\"targetInfo\")\n TargetInfo getTargetInfo(@Optional @ParamName(\"targetId\") String targetId);", "private void sendRequestDetails(){\n\n\n\n // Request a string response from the provided URL.\n StringRequest stringRequest = new StringRequest(Request.Method.GET, sURL,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n mTextView.setText(\"Fetching shape...\");\n Log.w(TAG, \"Token verified by server\");\n Log.w(TAG, \"Response: \" + response);\n\n // Send intent to change to logged in activity\n Intent intent = new Intent(getBaseContext(), DisplayShape.class);\n intent.putExtra(\"Shape\", response);\n startActivity(intent);\n finish();\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n if (mLastToken.isEmpty()){\n mTextView.setText(\"Request details incorrect. Please try again.\");\n Log.w(TAG, \"Got empty token!\");\n } else {\n mTextView.setText(\"Unknown server error. Please try again.\");\n Log.w(TAG, \"That didn't work!\");\n error.printStackTrace();\n }\n }\n }){\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"ApproovToken\", mLastToken);\n return params;\n }\n };\n // Add the request to the RequestQueue.\n mQueue.add(stringRequest);\n\n }", "@Override\r\n\tpublic List<Targets> getTarget_info(int id) {\n\t\treturn target_infoDao.getTarget_info(id);\r\n\t}", "public void retrievePaymentRecord(String payId, Handler<AsyncResult<Payment>> resultHandler) { \n delegate.retrievePaymentRecord(payId, resultHandler);\n }", "public Long getTargetId() {\r\n return targetId;\r\n }", "public long getTargetId() {\n return targetId;\n }", "public String targetId() {\n return this.targetId;\n }", "@Override\n\tprotected void updateTargetRequest() {\n\t}", "java.lang.String getRequestID();", "public void setTargetId(Long targetId) {\r\n this.targetId = targetId;\r\n }", "@Returns(\"sessionId\")\n String attachToTarget(@ParamName(\"targetId\") String targetId);", "@When(\"^I send the request to Address Management API 'GET AddressUnitId' endpoint$\")\n public void getAddressUnitId() {\n RequestSpecBuilder request = (RequestSpecBuilder) scenarioSession.getData(SessionKey.REQUEST);\n\n //send the request and get the response\n Response response = addressManagementApi.getAddressUnitId(request);\n\n //store the response for use in later steps\n scenarioSession.putData(SessionKey.LATEST_RESPONSE, response);\n }", "@Override\n\tpublic void setTargetDetailThree(int id, HttpServletRequest request) {\n\t\t\n\t}", "private String doQueryById(HttpServletRequest request,\n HttpServletResponse response) {\n return null;\n }", "public void runSample(HttpServletRequest request) {\n try {\n this.printMessage(\"<html><head><title>Simple checkout result</title></head><body><div><pre>\");\n example.addOrderReferenceDetails(request.getParameter(\"SellerNote\"),\n request.getParameter(\"OrderReferenceId\"), request.getParameter(\"CustomNote\"),\n request.getParameter(\"StoreName\"), request.getParameter(\"Subtotal\"),\n request.getParameter(\"ShippingType\"), request.getParameter(\"RequestPaymentAuthorization\"));\n\n this.printMessage(\"Order Reference is set with provided details.\");\n this.printMessage(\"Now confirming this order reference...\");\n\n example.confirmOrderReference();\n this.printMessage(\"Order Reference is confirmed and \" + \"moved to 'OPEN' state\");\n this.printMessage(\"Now getting details for Authorization...\");\n\n int authOption = Integer.parseInt(request.getParameter(\"AuthorizeOption\"));\n if (!(authOption == 1 || authOption == 2)) {\n throw new OffAmazonPaymentsServiceException(\"Invalid Authorization Option.\");\n }\n\n boolean captureNow = false;\n String captureNowString = request.getParameter(\"DirectCapture\");\n if (captureNowString != null && captureNowString.equals(\"on\")) {\n captureNow = true;\n }\n String softDescriptor = request.getParameter(\"SoftDescriptor\");\n String sellerAuthorizationNote = request.getParameter(\"SellerAuthorizationNote\");\n String providerId = request.getParameter(\"ProviderId\");\n String creditAmount = request.getParameter(\"CreditAmount\");\n\n example.authorize(captureNow, authOption, softDescriptor, sellerAuthorizationNote, providerId, creditAmount);\n AuthorizationDetails authDetails = this.waitForAuthorizationNotification(captureNow);\n\n this.getPostAuthDetails();\n\n if (captureNow) {\n this.printMessage(\"Authorization with Capture is complete\");\n } else {\n CaptureResponse captureResponse = this.capture(authDetails, request.getParameter(\"softDescriptor\"),\n request.getParameter(\"sellerCaptureNote\"), providerId, creditAmount);\n this.waitForCaptureNotification(captureResponse.getCaptureResult().getCaptureDetails()\n .getAmazonCaptureId());\n this.printMessage(\"Capture for this Order Reference is complete\");\n\n ProviderCreditSummaryList providerCreditSummaryList = null;\n if (providerId != null && creditAmount != null) {\n providerCreditSummaryList = this.waitForCaptureDetailsWithProviderCreditSummaryList(captureResponse\n .getCaptureResult().getCaptureDetails().getAmazonCaptureId());\n getProviderCreditDetails(providerCreditSummaryList);\n }\n }\n this.printMessage(\"Now Closing the Order Reference...\");\n example.closeOrder();\n this.printMessage(\"Order Refernce Moved to CLOSED state.\");\n this.printMessage(\"Simple Checkout Example is complete.\");\n\n } catch (OffAmazonPaymentsServiceException ex) {\n outStream.println(\"Caught Exception: \" + ex.getMessage());\n outStream.println(\"Response Status Code: \" + ex.getStatusCode());\n outStream.println(\"Error Code: \" + ex.getErrorCode());\n outStream.println(\"Error Type: \" + ex.getErrorType());\n outStream.println(\"Request ID: \" + ex.getRequestId());\n outStream.println(\"XML: \" + ex.getXML());\n outStream.println(\"ResponseHeaderMetadata: \" + ex.getResponseHeaderMetadata());\n ex.printStackTrace(outStream);\n } finally {\n this.printMessage(\"</pre></div></body></html>\");\n }\n\n }", "public void getAdapterDetails(RoutingContext routingContext) {\n LOGGER.info(\"getAdapterDetails method starts\");\n HttpServerRequest request = routingContext.request();\n HttpServerResponse response = routingContext.response();\n String domain = request.getParam(JSON_DOMAIN);\n String usersha = request.getParam(JSON_USERSHA);\n String resourceGroup = request.getParam(JSON_RESOURCE_GROUP);\n String resourceServer = request.getParam(JSON_RESOURCE_SERVER);\n String adapterId = domain + \"/\" + usersha + \"/\" + resourceServer + \"/\" + resourceGroup;\n Future<JsonObject> brokerResult = managementApi.getAdapterDetails(adapterId, databroker);\n brokerResult.onComplete(brokerResultHandler -> {\n if (brokerResultHandler.succeeded()) {\n handleSuccessResponse(response, ResponseType.Ok.getCode(),\n brokerResultHandler.result().toString());\n } else {\n processBackendResponse(response, brokerResultHandler.cause().getMessage());\n }\n });\n\n }", "public String getDetailsRequest(String correlationId) {\n\t\tString dtlTemplate = StringUtils.replace(\r\n\t\t\t\tDetailsTemplateConstant.INSTANCE.DTL_JMS, \"#!CORRELATIONID!#\", correlationId);\r\n\t\treturn dtlTemplate;\r\n\t}", "public Integer getTargetID()\r\n\t\t{ return mapping.getTargetId(); }", "private String processQueryRequest(UserTransaction transaction,int transactionTimeout,DataSourceLookup dsLookup,SetFinderDAOFactory sfDAOFactory,String xmlRequest,String sqlString, String sessionId, String queryInstanceId, String patientSetId) \n\t\tthrows I2B2DAOException,I2B2Exception {\n\t\t\tQueryDefinitionRequestType qdRequestType = getQueryDefinitionRequestType(xmlRequest);\n\t\t\tResultOutputOptionListType resultOutputList = qdRequestType.getResultOutputList();\n\t\t\tDataSource dataSource = ServiceLocator.getInstance().getAppServerDataSource(dsLookup.getDataSource());\n\t\t\tQueryExecutorDao queryExDao = new QueryExecutorDao(dataSource,dsLookup);\n\t\t\t\n\t\t\tqueryExDao.executeSQL(transaction,transactionTimeout,dsLookup, sfDAOFactory, sqlString, queryInstanceId, patientSetId,resultOutputList);\n\t\t\treturn patientSetId;\n\t}", "public void process()\n {\n ClientRequest clientRequest = threadPool.remove();\n\n if (clientRequest == null)\n {\n return;\n }\n\n\n // Do the work\n // Create new Client\n ServiceLogger.LOGGER.info(\"Building client...\");\n Client client = ClientBuilder.newClient();\n client.register(JacksonFeature.class);\n\n // Get uri\n ServiceLogger.LOGGER.info(\"Getting URI...\");\n String URI = clientRequest.getURI();\n\n ServiceLogger.LOGGER.info(\"Getting endpoint...\");\n String endpointPath = clientRequest.getEndpoint();\n\n // Create WebTarget\n ServiceLogger.LOGGER.info(\"Building WebTarget...\");\n WebTarget webTarget = client.target(URI).path(endpointPath);\n\n // Send the request and save it to a Response\n ServiceLogger.LOGGER.info(\"Sending request...\");\n Response response = null;\n if (clientRequest.getHttpMethodType() == Constants.getRequest)\n {\n // Create InvocationBuilder\n ServiceLogger.LOGGER.info(\"Starting invocation builder...\");\n Map<String, Object> queryMap = clientRequest.getQueryParams();\n String pathParam = clientRequest.getPathParam();\n\n if (pathParam != null)\n {\n webTarget = webTarget.path(pathParam);\n }\n\n if (queryMap != null)\n {\n ServiceLogger.LOGGER.info(\"QUERY MAP NOT NULL.\");\n for (Map.Entry<String, Object> entry : queryMap.entrySet())\n {\n webTarget = webTarget.queryParam(entry.getKey(), entry.getValue());\n }\n }\n ServiceLogger.LOGGER.info(\"WEBTARGET: \" + webTarget.toString());\n\n Invocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON);\n\n ServiceLogger.LOGGER.info(\"Got a GET request.\");\n response = invocationBuilder\n .header(\"email\", clientRequest.getEmail())\n .header(\"sessionID\", clientRequest.getSessionID())\n .header(\"transactionID\", clientRequest.getTransactionID())\n .get();\n }\n else if (clientRequest.getHttpMethodType() == Constants.postRequest)\n {\n // Create InvocationBuilder\n ServiceLogger.LOGGER.info(\"Starting invocation builder...\");\n Invocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON);\n Map<String, Object> queryMap = clientRequest.getQueryParams();\n\n if (queryMap != null)\n {\n ServiceLogger.LOGGER.info(\"QUERY MAP NOT NULL.\");\n for (Map.Entry<String, Object> entry : queryMap.entrySet())\n {\n webTarget = webTarget.queryParam(entry.getKey(), entry.getValue());\n }\n }\n ServiceLogger.LOGGER.info(\"WEBTARGET: \" + webTarget.toString());\n\n ServiceLogger.LOGGER.info(\"Got a POST request.\");\n response = invocationBuilder\n .header(\"email\", clientRequest.getEmail())\n .header(\"sessionID\", clientRequest.getSessionID())\n .header(\"transactionID\", clientRequest.getTransactionID())\n .post(Entity.entity(clientRequest.getRequest(), MediaType.APPLICATION_JSON));\n }\n else if (clientRequest.getHttpMethodType() == Constants.deleteRequest)\n {\n String pathParam = clientRequest.getPathParam();\n if (pathParam != null)\n {\n webTarget = webTarget.path(pathParam);\n }\n Invocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON);\n\n ServiceLogger.LOGGER.info(\"Got a DELETE request.\");\n response = invocationBuilder\n .header(\"email\", clientRequest.getEmail())\n .header(\"sessionID\", clientRequest.getSessionID())\n .header(\"transactionID\", clientRequest.getTransactionID())\n .delete();\n }\n else\n {\n ServiceLogger.LOGGER.warning(ANSI_YELLOW + \"Request was not sent successfully\");\n }\n ServiceLogger.LOGGER.info(ANSI_GREEN + \"Sent!\" + ANSI_RESET);\n\n // Check status code of request\n String jsonText = \"\";\n int httpstatus = response.getStatus();\n\n jsonText = response.readEntity(String.class);\n\n // Add response to database\n String email = clientRequest.getEmail();\n String sessionID = clientRequest.getSessionID();\n ResponseDatabase.insertResponseIntoDB(clientRequest.getTransactionID(), jsonText, email, sessionID, httpstatus);\n\n }", "private void fetchIncomingData() {\n Bundle bundle = getIntent().getExtras();\n if (bundle.containsKey(\"TAX_ID\") && bundle.containsKey(\"TAX_NAME\")) {\n INCOMING_TAX_NAME = bundle.getString(\"TAX_NAME\");\n INCOMING_TAX_ID = bundle.getString(\"TAX_ID\");\n if (INCOMING_TAX_ID != null) {\n new fetchTaxDetails().execute();\n } else {\n //TODO: SHOW AN ERROR\n }\n } else {\n //TODO: SHOW AN ERROR\n }\n }", "private void processRequest(HttpServletRequest request, HttpServletResponse response) {\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException\r\n {\r\n response.setContentType(\"text/html;charset=UTF-8\");\r\n PrintWriter out = response.getWriter();\r\n try\r\n {\r\n // A user is not needed for this query, so we don't check for him.\r\n // The response is the id of the latest reservation. If an error\r\n // occurs we send back 'error'.\r\n int mi = Delphi.Inst().getResMaxID();\r\n out.print(Integer.toString(mi));\r\n }\r\n catch (Exception ex) \r\n {\r\n AppLog.Instance().Error(\"ResGetMaxID \" + ex.getMessage());\r\n out.print(\"error\");\r\n }\r\n finally\r\n {\r\n out.close();\r\n }\r\n }", "public List<PaymentRequestDocument> getPaymentRequestsToExtract(String campusCode, Integer paymentRequestIdentifier, Integer purchaseOrderIdentifier, Integer vendorHeaderGeneratedIdentifier, Integer vendorDetailAssignedIdentifier, Date currentSqlDateMidnight);", "public Integer getTargetId() {\n\t\treturn targetId;\n\t}", "private void requestHandler(Object context)\n {\n final String funcName = \"requestHandler\";\n @SuppressWarnings(\"unchecked\")\n TrcRequestQueue<Request>.RequestEntry entry = (TrcRequestQueue<Request>.RequestEntry) context;\n Request request = entry.getRequest();\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.TASK, \"request=%s\", request);\n }\n\n request.canceled = entry.isCanceled();\n if (!request.canceled)\n {\n if (request.readRequest)\n {\n request.buffer = readData(request.address, request.length);\n if (debugEnabled)\n {\n if (request.buffer != null)\n {\n dbgTrace.traceInfo(funcName, \"readData(addr=0x%x,len=%d)=%s\",\n request.address, request.length, Arrays.toString(request.buffer));\n \n }\n }\n }\n else\n {\n request.length = writeData(request.address, request.buffer, request.length);\n }\n }\n\n if (request.completionEvent != null)\n {\n request.completionEvent.set(true);\n }\n\n if (request.completionHandler != null)\n {\n request.completionHandler.notify(request);\n }\n\n if (debugEnabled)\n {\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.TASK);\n }\n }", "@Override\n\tpublic List<Map<String,String>> dispatchRequest(Map<String, String[]> request) {\n\n\t\t// ********* LOGGING ********* \n\t\tSystem.out.println(\"reached DispatchRequest\");\n\t\tSystem.out.println(\"Request Keys : \");\n\t\tSystem.out.println(request.keySet());\n\t\t// ********* LOGGING ********* \n\n\n\t\tString classPrefix = request.get(\"requestID\")[0]; \n\n\t\t// ********* LOGGING ********* \n\t\tSystem.out.println(\"class name : \"+PACKAGE_NAME+classPrefix+CLASS_SUFFIX);\n\t\t// ********* LOGGING ********* \n\n\t\t// obtain class reference\t\t\n\t\tiManagementRequestHandlerObject = (IManagementRequestHandler) \n\t\t\t\tiReflectionManagerObject.getClass(PACKAGE_NAME+classPrefix+CLASS_SUFFIX);\n\n\t\t// ********* LOGGING *********\n\t\tSystem.out.println(\"object reference : \"+ iManagementRequestHandlerObject);\n\t\t// ********* LOGGING *********\n\n\t\t// Delegate the request to the appropriate class.\n\t\treturn (iManagementRequestHandlerObject.handleManagementRequest(request));\n\n\t}", "void requestId(long requestId);", "void requestId(long requestId);", "public void setTargetObjectId(String targetObjectId) {\n this.targetObjectId = targetObjectId;\n }", "public Entity.ID getTargetID() {\n return targetID;\n }", "RecordResult retrieveRecord(String recordID) throws RepoxException;", "public StateID GetTarget()\n {\n return targetID;\n }", "@Override\n\tpublic void retrieved(ID target) {\n\t\tfinal Boolean handleHit = handleHit(target, chordImpl.getLastReceivedTransactionID() + 1);\n\t\tchordImpl.broadcast(target, handleHit);\n\t\tif (handleHit) {\n\t\t\tGUIMessageQueue.getInstance().addMessage(\"The Shoot on the ID: \" + target + \" was a hit!\");\n\t\t}\n\t\tif (ownPlayer.getRemainingShips() > 0) {\n\t\t\tshoot();\n\t\t} else {\n\t\t\tGUIMessageQueue.getInstance()\n\t\t\t\t\t.addMessage(WIN_LOSE_SEPERATOR + \"I lose!!! Game Over!!!\" + WIN_LOSE_SEPERATOR);\n\t\t}\n\t}", "public void incomingSearchRequest(APDUEvent e)\n {\n LOGGER.finer(\"Processing incomingSearch_Request\");\n \n SearchRequest_type search_request = (SearchRequest_type) (e.getPDU().o);\n \n // Create a search response\n PDU_type pdu = new PDU_type();\n pdu.which=PDU_type.searchresponse_CID;\n SearchResponse_type response = new SearchResponse_type();\n pdu.o = response;\n \n int ssub = search_request.smallSetUpperBound.intValue();\n int lslb = search_request.largeSetLowerBound.intValue();\n int mspn = search_request.mediumSetPresentNumber.intValue();\n \n LOGGER.finer(\"ssub = \" + ssub + \" lslb = \" + lslb + \" mspn = \" + mspn);\n \n response.referenceId = search_request.referenceId; \n \n // Assume failure unless something below sets to true\n response.searchStatus = Boolean.FALSE;\n \n RootNode rn = null;\n \n try\n {\n switch(search_request.query.which)\n {\n case Query_type.type_0_CID:\n LOGGER.finer(\"Processing Any Query\");\n // Any\n break;\n case Query_type.type_1_CID:\n case Query_type.type_101_CID:\n // RPN query\n LOGGER.finer(\"Processing RPN Query\");\n rn = com.k_int.z3950.util.RPN2Internal.zRPNStructure2RootNode\n \t ((RPNQuery_type)(search_request.query.o));\n break;\n case Query_type.type_2_CID:\n case Query_type.type_100_CID:\n case Query_type.type_102_CID:\n LOGGER.finer(\"Processing OctetString Query\");\n // Octet String\n break;\n }\n \n if ( rn != null )\n {\n LOGGER.finer(\"Got root node\");\n \n IRQuery q = new IRQuery();\n q.collections = search_request.databaseNames;\n q.query = new com.k_int.IR.QueryModels.RPNTree(rn);\n \n // Process the query\n LOGGER.finer(\"Create Search Task with query:\" + q);\n SearchTask st = search_service.createTask\n \t (q, search_request.referenceId);\n \t\n \n // Evaluate the query, waiting 10 seconds for the task to complete. \n \t//We really want to be\n // able to pass in a predicate to wait for here, \n \t//e.g. evaluate(10000, \"NumHits > 100 OR Status=Complete\");\n LOGGER.finer(\"Evaluate Search Task\");\n try\n {\n st.evaluate(10000);\n }\n catch ( TimeoutExceededException tee )\n {\n LOGGER.finer(\"Timeout exceeded waiting for search to complete\");\n }\n \n if ( search_request.resultSetName != null ) {\n \t LOGGER.finer(\"putting st with name \" + \n \t\t\t search_request.resultSetName);\n \t active_searches.put(search_request.resultSetName, st);\n \t}\n \tactive_searches.put(\"Default\", st);\n \t\n // Result records processing\n int result_count = st.getTaskResultSet().getFragmentCount();\n LOGGER.finer(\"result count is \"+result_count);\n \n // Number of hits\n response.resultCount = BigInteger.valueOf(result_count);\n \n // Figure out Search Status\n if ( ( st.getTaskStatusCode() != SearchTask.TASK_FAILURE ) )\n {\n response.searchStatus = Boolean.TRUE;\n }\n else\n {\n // Figure out Result Set Status\n switch ( st.getTaskStatusCode() )\n {\n case SearchTask.TASK_EXECUTING_ASYNC:\n case SearchTask.TASK_EXECUTING_SYNC:\n // resultSetStatus = 2 (interim) Partial results available, \n \t\t//not necessarily valid\n response.resultSetStatus = BigInteger.valueOf(2);\n break;\n case SearchTask.TASK_FAILURE:\n // resultSetStatus = 3 (none) No result set\n response.resultSetStatus = BigInteger.valueOf(3);\n break;\n }\n }\n \n LOGGER.finer(\"Is \"+result_count+\" <= \"+lslb +\" or <= \"+ssub);\n \n if ( ( result_count <= lslb ) || ( result_count <= ssub ) )\n {\n LOGGER.finer(\"Yep\");\n \n int start = 1;\n int count = ( result_count <= ssub ? result_count : mspn );\n \n if ( count > 0 )\n \t {\n \t\t LOGGER.finer(\"Asking for \"+count+\n \t\t\t \" response records from \"+start);\n \t\t LOGGER.finer(\"Search request default = \" \n \t\t\t + search_request.preferredRecordSyntax);\n \t\t response.records = createRecordsFor\n \t\t (st, search_request.preferredRecordSyntax, start, \n \t\t count, GeoProfile.BREIF_SET);\n \t\t \n \n \t\t if (response.records.which == \n \t\t Records_type.responserecords_CID ){\n \t\t LOGGER.finer(\"We have records\");\n \t\t \n \t\t // Looks like we managed to present some records OK..\n \t\t response.numberOfRecordsReturned = \n \t\t\t BigInteger.valueOf(((Vector)\n \t\t\t\t\t (response.records.o)).size());\n \t\t response.nextResultSetPosition = \n \t\t\t BigInteger.valueOf(count+1);\n \t\t response.presentStatus = BigInteger.valueOf(0);\n \t\t } else { // Non surrogate diagnostics ( Single or Multiple )\n \t\t \n \t\t LOGGER.finer(\"Diagnostics\");\n \t\t response.presentStatus = BigInteger.valueOf(5);\n \t\t response.numberOfRecordsReturned = \n \t\t\t BigInteger.valueOf(0);\n \t\t response.nextResultSetPosition = \n \t\t\t BigInteger.valueOf(1);\n \t\t }\n \t } else {\n \t\t LOGGER.finer(\"No need to piggyback records....\");\n \t\t response.numberOfRecordsReturned = BigInteger.valueOf(0);\n \t\t response.nextResultSetPosition = BigInteger.valueOf(1);\n \t\t response.presentStatus = BigInteger.valueOf(0);\n \t }\n } else {\n \t response.presentStatus = BigInteger.valueOf(5);\n \t response.numberOfRecordsReturned = BigInteger.valueOf(0);\n \t response.nextResultSetPosition = BigInteger.valueOf(1); \t\n \t}\n }\n else\n \t LOGGER.finer(\"Unable to process query into root node\");\n }\n catch ( com.k_int.IR.InvalidQueryException iqe )\n \t{\n \t // Need to send a diagnostic\n \t iqe.printStackTrace();\n \t response.resultCount = BigInteger.valueOf(0);\n \t response.presentStatus = BigInteger.valueOf(5); // Failure\n \t response.numberOfRecordsReturned = BigInteger.valueOf(0);\n \t response.nextResultSetPosition = BigInteger.valueOf(0);\n \t response.resultSetStatus = BigInteger.valueOf(3);\n \t // No result set available\n \t response.records = createNSD(null, iqe.toString());\n \t}\n catch ( SearchException se )\n \t{\n \t // We need to populate a diagnostic here\n \t LOGGER.finer(\"Search returning diagnostic. Reason:\"+se.toString());\n \t se.printStackTrace();\n \t response.resultCount = BigInteger.valueOf(0);\n \t response.presentStatus = BigInteger.valueOf(5); // Failure\n \t response.numberOfRecordsReturned = BigInteger.valueOf(0);\n \t response.nextResultSetPosition = BigInteger.valueOf(0);\n \t response.resultSetStatus = BigInteger.valueOf(3); \n \t // No result set available\n \t response.records = createNSD((String)(se.additional), \n \t\t\t\t\t se.toString());\n \t}\n \n LOGGER.finer(\"Send search response : \");\n try\n \t{\n \t assoc.encodeAndSend(pdu);\n \t}\n catch ( java.io.IOException ioe )\n \t{\n \t ioe.printStackTrace();\n \t} \n }", "public void Large_Req_detail()\n {\n\t boolean largereqpresent =lareqdetails.size()>0;\n\t if(largereqpresent)\n\t {\n\t\t// System.out.println(\"Large Request details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"Large Request details report is not present\");\n\t }\n }", "public void handle_request(Request request){\n currentRequest.add(request);\n System.out.println(\"[Worker\"+String.valueOf(id)+\"] Received request of client \"+String.valueOf(request.getId()));\n }", "ThingsResponse loadThingsDetails(ThingsRequest request);", "public void getDetails() {\n presenter = new SkillPresenter(this, this);\n try {\n if (getIntent().getExtras().get(\"from\").toString().equalsIgnoreCase(\"notification\")) {\n presenter.getSkillsNotification(this, getIntent().getIntExtra(\"notification_id\", 0));\n } else if (getIntent().getExtras().get(\"from\").toString().equalsIgnoreCase(\"notificationAdapter\")) {\n presenter.getSkillsNotification(this, getIntent().getIntExtra(\"notification_id\", 0));\n } else {\n presenter.getSkills(this);\n }\n }catch (Exception e){\n e.printStackTrace();\n presenter.getSkills(this);\n }\n }", "public int getR_Request_ID();", "public RecordSet loadAllProcessingDetail(Record inputRecord);", "@Override\n\tprotected Object handleUserinfoEndpointRequest(String requestId) {\n\t\tif(!receivedRefreshRequest) {\n\t\t\t//we don't want the test to be marked as completed if the client sends a userinfo\n\t\t\t//request before sending a refresh request\n\t\t\t//this is not the userinfo request we are looking for\n\t\t\treceivedUserinfoRequest = false;\n\t\t}\n\t\treturn super.handleUserinfoEndpointRequest(requestId);\n\t}", "private static HashMap<String, Object> fetchReferralRecruitmentData(HashMap<String, Object> parameterMap) {\n\t\t//BEGIN-PROCEDURE HR05-GET-REFERRAL-SOURCE\n\t\tPsPersonalApplicantReferral psReferralSource = PsPersonalApplicantReferral.findByEmployeeIdAndEffectiveDate((String)parameterMap.get(\"employeeId\"), (Date)parameterMap.get(\"effectiveDate\")); //PS_PERS_APPL_REF\n\t\tBigInteger referralSourceId = psReferralSource.getSourceId();\n\t\tPsRecruitmentSource psRecruitmentSource = PsRecruitmentSource.findBySourceId(referralSourceId); //PS_HRS_SOURCE_I\n\t\tString referralSourceDescription = psRecruitmentSource.getSourceDescription();\n//\t\tPsRecruitmentSource psRecruitmentSource = PsRecruitmentSource.findByRecruitmentSourceId(recruitmentSourceId); //PS_HRS_SOURCE_I\n\t\t//LET $PSRecruit_Source_Code = LTRIM(RTRIM(&CHSI2.HRS_SOURCE_NAME,' '),' ') \n\t\tString referralSourceName = psRecruitmentSource.getSourceName();\n\t\tString psSpecificReferralSource = \"\";\n\t\t//DO HR05-FORMAT-REFERRAL-SOURCE \n\t\t\t//BEGIN-PROCEDURE HR05-FORMAT-REFERRAL-SOURCE\n\t\t\t//Let $Found = 'N' !Initialize the found indicator\n\t\t\t//!Based on the value in the PeopleSoft Recruit Source Code assign the\n\t\t\t//!corresponding legacy system code that will be passed.\n\t\t\t//Let $PSReferral_Source = &CPT101.ZHRF_LEGRECRUITSRC\n\t\t\tString referralSource = CrossReferenceReferralSource.findActiveLegacyRecruiterSourceByReferralSource(referralSourceName); //PS_ZHRT_RFSRC_CREF\n\t\t\t//IF ($Found = 'N')\n\t\t\tif(referralSource == null) {\n\t\t\t\t//LET $PSReferral_Source = ' '\n\t\t\t\treferralSource = \"\";\n\t\t\t\t//IF $PSRecruit_Source_Code = ' ' !If the Referral Source code was not entered in PS\n\t\t\t\tif(referralSourceName == null || referralSourceName.isEmpty()) {\n\t\t\t\t\tparameterMap.put(\"errorProgram\", \"ZHRI105A\");\n\t\t\t\t\t//LET $ErrorMessageParm = 'Referral source not selected in PeopleSoft.'\n\t\t\t\t\tparameterMap.put(\"errorMessage\", \"Referral source not selected in PeopleSoft.\");\n\t\t\t\t\t//DO Prepare-Error-Parms ! JHV 09/11/02 fix Date Mask error ZHR_PRDSPT_INTF_ERROR\n\t\t\t\t\t//DO Call-Error-Routine !From ZHRI100A.SQR\n\t\t\t\t\tMain.doErrorCommand(parameterMap);\n\t\t\t\t}\n\t\t\t\t//ELSE\n\t\t\t\telse {\n\t\t\t\t\t//LET $PSSpecific_Refer_Src = SUBSTR($PSRefSourceDescr,1,35)\n\t\t\t\t\tpsSpecificReferralSource = referralSourceDescription;\n//\t\t\t\t\tPSSpecific_Refer_Src = PSRefSourceDescr;\n\t\t\t\t//END-IF !$PSRecruit_Source_Code = ' '\n\t\t\t\t}\n\t\t\t//END-IF !$Found = 'N'\n\t\t\t}\n\t\t\t//!Make sure not less than 35 long\n\t\t\t//LET $PSSpecific_Refer_Src = SUBSTR($PSRefSourceDescr,1,35) \n\t\t\t//TODO: //LET $PSSpecific_Refer_Src = RPAD($PSSpecific_Refer_Src,35,' ')\n\t\t\tpsSpecificReferralSource = psSpecificReferralSource.substring(0, 35);\n\t\t\tString recruitmentSourceId = psRecruitmentSource.getSourceDescription();\n\t\t\tif(recruitmentSourceId != null) {\n\t\t\t\trecruitmentSourceId = recruitmentSourceId.trim();\n\t\t\t\trecruitmentSourceId = String.format(\"%1$-35s\", recruitmentSourceId);\n\t\t\t}\n\t\t\tparameterMap.put(\"recruitmentSourceId\", recruitmentSourceId);\n\t\t\t//END-PROCEDURE HR05-FORMAT-REFERRAL-SOURCE\n\t\t//Let $PSReferralSource = LTRIM(RTRIM(&CHSI2.HRS_SOURCE_NAME,' '),' ') \n//\t\tString PSReferralSource = psRecruitmentSource.getSourceName();\n\t\t//END-PROCEDURE HR05-GET-REFERRAL-SOURCE\n\t\treferralSource = referralSource != null ? referralSource.trim() : referralSource;\n\t\tparameterMap.put(\"referralSource\", referralSource);\n\t\treturn parameterMap;\n\t}", "private void processRequest(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response) {\n\r\n\t}", "private void requestOrderDetail() {\n\n ModelHandler.OrderRequestor.requestOrderDetail(client, mViewData.getOrder().getId(), (order) -> {\n mViewData.setOrder(order);\n onViewDataChanged();\n }, this::showErrorMessage);\n }", "Response get(URL target, QueryInput input, List<? extends HttpAuthentication> auth)\n throws IOException, DataRetrievalException;", "private void requestRecord() throws IOException {\n\n String targetCamCode = dis.readUTF();\n\n Cam targetCam = CamRegister.findRegisteredCam(targetCamCode);\n\n try {\n DataOutputStream targetDos = new DataOutputStream(targetCam.getCamSocket().getOutputStream());\n targetDos.writeInt(RECORD_CAM_COMMAND);\n targetDos.flush();\n\n dos.writeInt(SUCCESS_CODE);\n dos.flush();\n } catch (Exception e) {\n dos.writeInt(NOT_FOUND_CODE);\n dos.flush();\n }\n }", "@Override\n public void onCollectInformationRequest(CollectInformationRequest arg0) {\n\n }", "IRequestTarget resolveRequestTarget(String requestedUrl);", "public MeasureRequestedEvent(String id, String measureId, String targetGroup, Map<String, Object> context) {\n\t\tsuper(id, MODEL_ID, Type.SERVICE);\n\t\tgetPayload().put(\"measureId\", measureId);\n\t\tgetPayload().put(\"targetGroup\", targetGroup);\n\t\tif (context != null) getPayload().put(\"context\", context);\n\t}", "@PayloadRoot(namespace = \"http://wsguardian.com/courses\", localPart = \"GetCourseDetailsRequest\")\n\t@ResponsePayload\n\tpublic GetCourseDetailsResponse processCourseDetailsRequest(@RequestPayload GetCourseDetailsRequest request,MessageContext context) {\n\t\t//Extraer request del message context\n\t\n\t\tByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n\t try {\n\t context.getRequest().writeTo(outputStream);\n\t String httpMessage = new String(outputStream.toByteArray());\n\t System.out.println(\"message context :::::: \"+ httpMessage);\n\t } catch (IOException e) {\n\t e.printStackTrace();\n\t }\n\t \n\t // a byte para base 64\n\t String encodedString = Base64.getEncoder().encodeToString(outputStream.toByteArray());\n\t System.out.println(\"message context en Base 64:::::: \"+ encodedString);\n\t\t\n\t //rest llamado\n\t RestTemplate rt = new RestTemplate();\n rt.getMessageConverters().add(new MappingJackson2HttpMessageConverter());\n rt.getMessageConverters().add(new StringHttpMessageConverter());\n\n String uri = new String(\"http://localhost:9090/signature\");\n\t \n ResponseEntity<Boolean> validacion = rt.postForEntity(uri, encodedString,boolean.class);\n System.out.println(\"Respuesta validacion firma:::::: \"+ validacion.getBody());\n \n\t\t//logica para realizar la respuesta de la peticion de getcoursedetails \n\t\tCourse course = service.findById(request.getId());\n\t\t\n\t\tif(course == null) {\n\t\t\tthrow new CourseNotFoundException(\"Invalid course id \" + request.getId());\n\t\t}\n\t\treturn mapCourseDetails(course);\n\t}", "public void setToRefid(String targetid) {\n this.targetid = targetid;\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\");\n\n \n String counselorID = request.getParameter(\"counselorID\");\n String dateTime = request.getParameter(\"dateTime\");\n String firstName = request.getParameter(\"firstName\");\n String city = request.getParameter(\"city\");\n String lastName = request.getParameter(\"lastName\");\n String state = request.getParameter(\"state\");\n String phone = request.getParameter(\"phone\");\n String zip = request.getParameter(\"zip\");\n String address = request.getParameter(\"address\");\n String description = request.getParameter(\"description\");\n String callType = request.getParameter(\"callType\");\n\n Caller _caller = new Caller();\n _caller.setFirstName(firstName);\n _caller.setLastName(lastName);\n _caller.setPhone(phone);\n _caller.setCity(city);\n _caller.setState(state);\n _caller.setZip(zip);\n _caller.setAddress(address);\n\n CallRecord _callRecord = new CallRecord();\n \n _callRecord.setStartTime(dateTime);\n _callRecord.setCallDescription(description);\n _callRecord.setCallTypeID(callType);\n _callRecord.setCounselorID(Integer.parseInt(counselorID));\n\n if (request.getParameter(\"btnCreate\") != null) {\n // handle create stuff here!\n try {\n _caller.setCallerID(CallerAccessor.createCallRecord(_caller, _callRecord)); \n// CallerAccessor.insertCallRecord(_caller, _callRecord);\n } catch (Exception e) {\n System.err.println(e.getMessage());\n }\n\n request.getRequestDispatcher(\"CallRecord.jsp\").forward(request, response);\n } else if (request.getParameter(\"btnUpdate\") != null) {\n // handle update stuff here.\n request.getRequestDispatcher(\"CallRecord.jsp\").forward(request, response);\n }\n\n// try (PrintWriter out = response.getWriter()) {\n// /* TODO output your page here. You may use following sample code. */\n// out.println(\"<!DOCTYPE html>\");\n// out.println(\"<html>\");\n// out.println(\"<head>\");\n// out.println(\"Servlet CallRecordHandler \" + callType); \n// out.println(\"</head>\");\n// out.println(\"<body>\");\n// out.println(\"<h1>Servlet CallRecordHandler at \" + request.getContextPath() + \"</h1>\");\n// out.println(\"</body>\");\n// out.println(\"</html>\");\n// }\n }", "DescribeRecordResult describeRecord(DescribeRecordRequest describeRecordRequest);", "@Override\n protected void executeFetch(final String requestId, DSRequest request, final DSResponse response)\n {\n final int startIndex = (request.getStartRow() < 0) ? 0 : request.getStartRow();\n final int endIndex = (request.getEndRow() == null) ? -1 : request.getEndRow();\n\n String userId = request.getCriteria().getAttribute(\"userId\");\n UserDTO userDto = new UserDTO();\n userDto.setId(Long.parseLong(userId));\n\n service.fetch(userDto, new AsyncCallback<List<ContactDTO>>()\n {\n public void onFailure(Throwable caught)\n {\n caught.printStackTrace();\n response.setStatus(RPCResponse.STATUS_FAILURE);\n processResponse(requestId, response);\n }\n\n public void onSuccess(List<ContactDTO> result)\n {\n // Calculating size of return list\n int size = result.size();\n if (endIndex >= 0)\n {\n if (endIndex < startIndex)\n {\n size = 0;\n }\n else\n {\n size = endIndex - startIndex + 1;\n }\n }\n // Create list for return - it is just requested records\n ListGridRecord[] list = new ListGridRecord[size];\n if (size > 0)\n {\n for (int i = 0; i < result.size(); i++)\n {\n if (i >= startIndex && i <= endIndex)\n {\n ListGridRecord record = new ListGridRecord();\n copyValues(result.get(i), record);\n list[i - startIndex] = record;\n }\n }\n }\n response.setStatus(RPCResponse.STATUS_SUCCESS);\n response.setData(list);\n // IMPORTANT: for paging to work we have to specify size of full\n // result set\n response.setTotalRows(result.size());\n processResponse(requestId, response);\n }\n });\n }", "CompletableFuture<RestoreInfoResponse> requestRestoreInfo(\n MemberId server, RestoreInfoRequest request);", "void handleRequest();", "void setRequestID(java.lang.String requestID);", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n long id = new Integer(request.getParameter(\"id\"));\n\n \n ResourcePOJO res = null;\n// try {\n res = manager.getResource(id, false);\n// } catch (JAXBException e) {\n// throw new IOException(e.getMessage());\n// }\n LayerManager layerBean = new LayerManager(res);\n \n try {\n \n request.setAttribute(\"layer\", layerBean);\n \n String layerName = layerBean.getName();\n \n List<ResourcePOJO> relatedStatsDefs = manager.searchStatsDefByLayer(layerName);\n request.setAttribute(\"statsDefs\", relatedStatsDefs);\n \n List<ResourcePOJO> relatedLayerUpdates = manager.searchLayerUpdatesByLayerName(layerName);\n request.setAttribute(\"layerUpdates\", relatedLayerUpdates);\n \n String data = manager.getData(id, MediaType.WILDCARD_TYPE.toString());\n layerBean.setData(data);\n \n request.setAttribute(\"storedData\", data);\n \n } catch (Exception ex) {\n Logger.getLogger(LayerShow.class.getName()).log(Level.SEVERE, null, ex);\n }\n String outputPage = getServletConfig().getInitParameter(\"outputPage\");\n RequestDispatcher rd = request.getRequestDispatcher(outputPage);\n rd.forward(request, response);\n }", "public HashMap<String, Object> getPatientLabRequestById(HashMap<String, Object> patientLabRequestId);", "private void showRequestDetails() {\n\t\tlblExamID.setText(req.getExamID());\n\t\tlblDuration.setText(String.valueOf(req.getOldDur()));\n\t\tlblNewDuration.setText(String.valueOf(req.getNewDur()));\n\t\ttxtAreaExplanation.setText(req.getExplanation());\n\t}", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n ResponseResult result = null;\n\n try {\n P2PBridgeWebServiceStub stub = new P2PBridgeWebServiceStub();\n GetStatus stat = new GetStatus();\n stat.setIpAddress(request.getParameter(\"ip_address\"));\n stat.setMake(request.getParameter(\"device\"));\n stat.setModel(request.getParameter(\"model\"));\n stat.setUserName(request.getParameter(\"username\"));\n stat.setPassword(request.getParameter(\"password\"));\n\n GetStatusResponse res = stub.getStatus(stat);\n result = res.get_return();\n\n System.out.println(result.getResult());\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n Utils.generateResponse(result, response);\n }", "long requestId();", "long requestId();", "public void getRequest(Request request, Response response) {\n\t\tretrieveObject(request, response);\n\t}", "public String getToRefid() {\n return targetid;\n }", "private List loadTargetList(HttpServletRequest request) {\n\t\tTargetDao targetDao = (TargetDao) getBean(\"TargetDao\");\n\t\treturn targetDao.getTargets(AgnUtils.getCompanyID(request));\n\t\t\n\t}", "public void getDetail(int id) {\n\t\t\n\t}", "@SuppressWarnings(\"all\")\n private Record findTarget() {\n final ConcurrentMap<String, Record> address = ORIGIN.getRegistryData();\n final String target = this.getValue(\"to\");\n final String name = this.getValue(\"name\");\n // 1. Find service names\n final List<Record> records = this.findRecords();\n final Record record = records.stream().filter(item ->\n target.equals(item.getMetadata().getString(\"path\")))\n .findAny().orElse(null);\n // Service Name\n Fn.outWeb(null == record, this.logger,\n _501RpcImplementException.class, this.getClass(),\n name, target, this.event);\n // Address Wrong\n Fn.outWeb(null == record.getMetadata() ||\n !target.equals(record.getMetadata().getString(\"path\")), this.logger,\n _501RpcAddressWrongException.class, this.getClass(),\n target, name);\n this.logger.info(Info.RECORD_FOUND, record.toJson());\n return record;\n }", "@Override\r\n\tprotected void processTarget() {\n\r\n\t}", "@Override\r\n\tprotected void processTarget() {\n\r\n\t}", "protected void doInvocation(){\n org.omg.CORBA.portable.Delegate delegate=StubAdapter.getDelegate(\n _target);\n // Initiate Client Portable Interceptors. Inform the PIHandler that\n // this is a DII request so that it knows to ignore the second\n // inevitable call to initiateClientPIRequest in createRequest.\n // Also, save the RequestImpl object for later use.\n _orb.getPIHandler().initiateClientPIRequest(true);\n _orb.getPIHandler().setClientPIInfo(this);\n InputStream $in=null;\n try{\n OutputStream $out=delegate.request(null,_opName,!_isOneWay);\n // Marshal args\n try{\n for(int i=0;i<_arguments.count();i++){\n NamedValue nv=_arguments.item(i);\n switch(nv.flags()){\n case ARG_IN.value:\n nv.value().write_value($out);\n break;\n case ARG_OUT.value:\n break;\n case ARG_INOUT.value:\n nv.value().write_value($out);\n break;\n }\n }\n }catch(Bounds ex){\n throw _wrapper.boundsErrorInDiiRequest(ex);\n }\n $in=delegate.invoke(null,$out);\n }catch(ApplicationException e){\n // REVISIT - minor code.\n // This is already handled in subcontract.\n // REVISIT - uncomment.\n //throw new INTERNAL();\n }catch(RemarshalException e){\n doInvocation();\n }catch(SystemException ex){\n _env.exception(ex);\n // NOTE: The exception should not be thrown.\n // However, JDK 1.4 and earlier threw the exception,\n // so we keep the behavior to be compatible.\n throw ex;\n }finally{\n delegate.releaseReply(null,$in);\n }\n }", "@SuppressWarnings(\"unchecked\")\n @Override\n public void onReceive(Request request) throws Throwable {\n Util.initializeContext(request, TelemetryEnvKey.USER);\n // set request id fto thread loacl...\n ExecutionContext.setRequestId(request.getRequestId());\n\n Response response = new Response();\n if (request.getOperation().equalsIgnoreCase(ActorOperations.ADD_CONTENT.getValue())) {\n Util.DbInfo dbInfo = Util.dbInfoMap.get(JsonKey.LEARNER_CONTENT_DB);\n Util.DbInfo batchdbInfo = Util.dbInfoMap.get(JsonKey.COURSE_BATCH_DB);\n // objects of telemetry event...\n Map<String, Object> targetObject = null;\n List<Map<String, Object>> correlatedObject = null;\n\n String userId = (String) request.getRequest().get(JsonKey.USER_ID);\n List<Map<String, Object>> requestedcontentList =\n (List<Map<String, Object>>) request.getRequest().get(JsonKey.CONTENTS);\n CopyOnWriteArrayList<Map<String, Object>> contentList =\n new CopyOnWriteArrayList<>(requestedcontentList);\n request.getRequest().put(JsonKey.CONTENTS, contentList);\n // map to hold the status of requested state of contents\n Map<String, Integer> contentStatusHolder = new HashMap<>();\n\n if (!(contentList.isEmpty())) {\n for (Map<String, Object> map : contentList) {\n // replace the course id (equivalent to Ekstep content id) with One way hashing\n // of\n // userId#courseId , bcoz in cassndra we are saving course id as userId#courseId\n\n String batchId = (String) map.get(JsonKey.BATCH_ID);\n boolean flag = true;\n\n // code to validate the whether request for valid batch range(start and end\n // date)\n if (!(StringUtils.isBlank(batchId))) {\n Response batchResponse =\n cassandraOperation.getRecordById(\n batchdbInfo.getKeySpace(), batchdbInfo.getTableName(), batchId);\n List<Map<String, Object>> batches =\n (List<Map<String, Object>>) batchResponse.getResult().get(JsonKey.RESPONSE);\n if (batches.isEmpty()) {\n flag = false;\n } else {\n Map<String, Object> batchInfo = batches.get(0);\n flag = validateBatchRange(batchInfo);\n }\n\n if (!flag) {\n response\n .getResult()\n .put((String) map.get(JsonKey.CONTENT_ID), \"BATCH NOT STARTED OR BATCH CLOSED\");\n contentList.remove(map);\n continue;\n }\n }\n map.putIfAbsent(JsonKey.COURSE_ID, JsonKey.NOT_AVAILABLE);\n preOperation(map, userId, contentStatusHolder);\n map.put(JsonKey.USER_ID, userId);\n map.put(JsonKey.DATE_TIME, new Timestamp(new Date().getTime()));\n\n try {\n ProjectLogger.log(\n \"LearnerStateUpdateActor:onReceive: map \" + map, LoggerEnum.INFO.name());\n cassandraOperation.upsertRecord(dbInfo.getKeySpace(), dbInfo.getTableName(), map);\n response.getResult().put((String) map.get(JsonKey.CONTENT_ID), JsonKey.SUCCESS);\n // create telemetry for user for each content ...\n targetObject =\n TelemetryUtil.generateTargetObject(\n (String) map.get(JsonKey.BATCH_ID), JsonKey.BATCH, JsonKey.CREATE, null);\n // since this event will generate multiple times so nedd to recreate correlated\n // objects every time ...\n correlatedObject = new ArrayList<>();\n TelemetryUtil.generateCorrelatedObject(\n (String) map.get(JsonKey.CONTENT_ID), JsonKey.CONTENT, null, correlatedObject);\n TelemetryUtil.generateCorrelatedObject(\n (String) map.get(JsonKey.COURSE_ID), JsonKey.COURSE, null, correlatedObject);\n TelemetryUtil.generateCorrelatedObject(\n (String) map.get(JsonKey.BATCH_ID), JsonKey.BATCH, null, correlatedObject);\n Map<String, String> rollUp = new HashMap<>();\n rollUp.put(\"l1\", (String) map.get(JsonKey.COURSE_ID));\n rollUp.put(\"l2\", (String) map.get(JsonKey.CONTENT_ID));\n TelemetryUtil.addTargetObjectRollUp(rollUp, targetObject);\n TelemetryUtil.telemetryProcessingCall(\n request.getRequest(), targetObject, correlatedObject);\n } catch (Exception ex) {\n response.getResult().put((String) map.get(JsonKey.CONTENT_ID), JsonKey.FAILED);\n contentList.remove(map);\n }\n }\n }\n sender().tell(response, self());\n // call to update the corresponding course\n ProjectLogger.log(\"Calling background job to update learner state\");\n request.getRequest().put(CONTENT_STATE_INFO, contentStatusHolder);\n request.setOperation(ActorOperations.UPDATE_LEARNER_STATE.getValue());\n tellToAnother(request);\n } else {\n onReceiveUnsupportedOperation(request.getOperation());\n }\n }", "private String requestInfo(Long vehicleId) {\n return \"vehicleId(\" + vehicleId + \") \";\n }", "public void retrieveInvoice(final DriverDisplayInvoiceInteractor.onDisplayDataFinishedListener listener, final String userID, final String invoiceID, Context context){\n { com.android.volley.RequestQueue ExampleRequestQueue = Volley.newRequestQueue(context);\n String url = \"https://us-central1-csc207-tli.cloudfunctions.net/get_invoice_information?userID=\"+userID+\"&invoiceID=\"+invoiceID;\n StringRequest ExampleStringRequest = new StringRequest(Request.Method.GET, url, new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n //returns all the invoice info in a string so it now has to be parsed\n String[] info = response.split(\",\");\n //now we know how many invoices do we need to create the same number of buttons\n System.out.println(info);\n listener.onInvoiceRetrievalSuccess(info);\n }\n }, new Response.ErrorListener() { //Create an error listener to handle errors appropriately.\n @Override\n public void onErrorResponse(VolleyError error) {\n }\n });\n ExampleRequestQueue.add(ExampleStringRequest);\n }\n }" ]
[ "0.7494852", "0.6210238", "0.5954467", "0.58514464", "0.5678795", "0.5585127", "0.55485505", "0.5519924", "0.5509859", "0.54636854", "0.5438041", "0.53597003", "0.5308958", "0.5233769", "0.51931703", "0.5142915", "0.5137236", "0.5129423", "0.51143575", "0.51057935", "0.50878996", "0.5078909", "0.50734067", "0.5054327", "0.50477177", "0.5040886", "0.5008745", "0.49986196", "0.49963647", "0.49883428", "0.49880028", "0.49715573", "0.4959398", "0.49226928", "0.49103495", "0.49078715", "0.49055895", "0.4905534", "0.4894975", "0.4891528", "0.48816496", "0.48771167", "0.48706383", "0.4863277", "0.48553103", "0.4841094", "0.48346177", "0.48333952", "0.48274267", "0.48050103", "0.47904646", "0.47879034", "0.4787736", "0.4787736", "0.47782952", "0.47748584", "0.47575313", "0.47563303", "0.4753564", "0.4745204", "0.4744796", "0.47306272", "0.47278288", "0.47267115", "0.47202963", "0.4709789", "0.4700772", "0.46832833", "0.46830106", "0.46817484", "0.467673", "0.4665754", "0.46633527", "0.466281", "0.46561494", "0.46545568", "0.46500725", "0.46450052", "0.46430942", "0.46422708", "0.46409592", "0.4634594", "0.46345058", "0.46287483", "0.46267644", "0.46202454", "0.46165332", "0.46123433", "0.46123433", "0.46107864", "0.4605381", "0.46028322", "0.4602559", "0.46024832", "0.460061", "0.460061", "0.45949918", "0.4591049", "0.45731255", "0.4571379" ]
0.64813447
1
/ start starts the server
public void start() { init(); if(!checkBackend()){ vertx.createHttpServer().requestHandler(new Handler<HttpServerRequest>() { public void handle(HttpServerRequest req) { String query_type = req.path(); req.response().headers().set("Content-Type", "text/plain"); if(query_type.equals("/target")){ String key = req.params().get("targetID"); try { processRequest(key,req); } catch (Exception e) { e.printStackTrace(); } } else { String key = "1"; try { processRequestRange(key,req); } catch (Exception e) { e.printStackTrace(); } } } }).listen(80); } else { System.out.println("Please make sure that both your DCI are up and running"); System.exit(0); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void startServer() {\n server.start();\n }", "public void start() {\n System.err.println(\"Server will listen on \" + server.getAddress());\n server.start();\n }", "public void startServer() {\n URLClassLoader loader = createClasspath(opts);\n X_Process.runInClassloader(loader, appServer\n .map(DevAppServer::doStartServer, getAppName() + \"Server\", getPort())\n .ignoreOut1().unsafe());\n }", "private void startServer() {\n\t\ttry {\n//\t\t\tserver = new Server();\n//\t\t\tserver.start();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: add message in UI for user\n\t\t}\n\t}", "public void start() {\n System.out.println(\"server started\");\n mTerminalNetwork.listen(mTerminalConfig.port);\n }", "void startServer(String name, Config.ServerConfig config);", "public void startServer() {\n // configure the server properties\n int maxThreads = 20;\n int minThreads = 2;\n int timeOutMillis = 30000;\n\n // once routes are configured, the server automatically begins\n threadPool(maxThreads, minThreads, timeOutMillis);\n port(Integer.parseInt(this.port));\n this.configureRoutesAndExceptions();\n }", "private void start(String[] args){\n\t\tServerSocket listenSocket;\n\n\t\ttry {\n\t\t\tlistenSocket = new ServerSocket(Integer.parseInt(args[0])); //port\n\t\t\tSystem.out.println(\"Server ready...\");\n\t\t\twhile (true) {\n\t\t\t\tSocket clientSocket = listenSocket.accept();\n\t\t\t\tSystem.out.println(\"Connexion from:\" + clientSocket.getInetAddress());\n\t\t\t\tClientThread ct = new ClientThread(this,clientSocket);\n\t\t\t\tct.start();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Error in EchoServer:\" + e);\n\t\t}\n\t}", "public void start() {\n threadPoolExecutor.setCorePoolSize(configurations.threadPoolSize());\n new Thread(this::startServer).start();\n }", "public void start() {\n system = ActorSystem.create(\"http-server\", config);\n\n Settings settings = SettingsExtension.SettingsExtensionProvider.get(system);\n\n vHostHandlers = settings.vHostConfigs()\n .stream()\n .map(vc -> new AkkaTcpHandler(system, vc))\n .collect(Collectors.toList());\n\n vHostHandlers.forEach(VHostHandler::start);\n\n Runtime.getRuntime().addShutdownHook(new Thread(this::terminate));\n }", "public void run(){\n\t\tstartServer();\n\t}", "public static void startServer() {\n clientListener.startListener();\n }", "public void start() {\n\n // server 환경설정\n EventLoopGroup bossGroup = new NioEventLoopGroup(bossCount);\n EventLoopGroup workerGroup = new NioEventLoopGroup();\n\n try {\n\n ServerBootstrap b = new ServerBootstrap();\n b.group(bossGroup, workerGroup)\n .channel(NioServerSocketChannel.class)\n .childHandler(new ChannelInitializer<SocketChannel>() {\n @Override\n public void initChannel(SocketChannel ch) throws Exception {\n ChannelPipeline pipeline = ch.pipeline();\n pipeline.addLast(new StringDecoder(CharsetUtil.UTF_8));\n pipeline.addLast(new StringEncoder(CharsetUtil.UTF_8));\n pipeline.addLast(new LoggingHandler(LogLevel.INFO));\n pipeline.addLast(SERVICE_HANDLER);\n }\n })\n .option(ChannelOption.SO_BACKLOG, backLog)\n .childOption(ChannelOption.SO_KEEPALIVE, true);\n\n ChannelFuture channelFuture = b.bind(tcpPort).sync();\n channelFuture.channel().closeFuture().sync();\n } catch (InterruptedException e) {\n e.printStackTrace();\n } finally {\n bossGroup.shutdownGracefully();\n workerGroup.shutdownGracefully();\n }\n\n }", "public void startServer() {\n System.out.println(\"Inicie\");\n httpServer = new HttpServer();\n httpServer.registerProessor(\"/App\", this);\n try {\n httpServer.start();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void start(){\n runServerGUI();\n // new server thread object created\n ServerThread m_Server = new ServerThread(this);\n m_Server.start();\n }", "public void start() {\n\t\t\n\t\ttry {\n\t\t\tmainSocket = new DatagramSocket(PORT_NUMBER);\n\t\t}\n\t\tcatch(SocketException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t\t//Lambda expression to shorten the run method\n\t\tThread serverThread = new Thread( () -> {\n\t\t\tlisten();\n\t\t});\n\t\t\n\t\tserverThread.start();\n\t}", "@Override\n public void start() {\n // only start once, this is not foolproof as the active flag is set only\n // when the watchdog loop is entered\n if ( isActive() ) {\n return;\n }\n\n Log.info( \"Running server with \" + server.getMappings().size() + \" mappings\" );\n try {\n server.start( HTTPD.SOCKET_READ_TIMEOUT, false );\n } catch ( IOException ioe ) {\n Log.append( HTTPD.EVENT, \"ERROR: Could not start server on port '\" + server.getPort() + \"' - \" + ioe.getMessage() );\n System.err.println( \"Couldn't start server:\\n\" + ioe );\n System.exit( 1 );\n }\n\n if ( redirectServer != null ) {\n try {\n redirectServer.start( HTTPD.SOCKET_READ_TIMEOUT, false );\n } catch ( IOException ioe ) {\n Log.append( HTTPD.EVENT, \"ERROR: Could not start redirection server on port '\" + redirectServer.getPort() + \"' - \" + ioe.getMessage() );\n System.err.println( \"Couldn't start redirection server:\\n\" + ioe );\n }\n }\n\n // Save the name of the thread that is running this class\n final String oldName = Thread.currentThread().getName();\n\n // Rename this thread to the name of this class\n Thread.currentThread().setName( NAME );\n\n // very important to get park(millis) to operate\n current_thread = Thread.currentThread();\n\n // Parse through the configuration and initialize all the components\n initComponents();\n\n // if we have no components defined, install a wedge to keep the server open\n if ( components.size() == 0 ) {\n Wedge wedge = new Wedge();\n wedge.setLoader( this );\n components.put( wedge, getConfig() );\n activate( wedge, getConfig() );\n }\n\n Log.info( LogMsg.createMsg( MSG, \"Loader.components_initialized\" ) );\n\n final StringBuffer b = new StringBuffer( NAME );\n b.append( \" v\" );\n b.append( VERSION.toString() );\n b.append( \" initialized - Loader:\" );\n b.append( Loader.API_NAME );\n b.append( \" v\" );\n b.append( Loader.API_VERSION );\n b.append( \" - Runtime: \" );\n b.append( System.getProperty( \"java.version\" ) );\n b.append( \" (\" );\n b.append( System.getProperty( \"java.vendor\" ) );\n b.append( \")\" );\n b.append( \" - Platform: \" );\n b.append( System.getProperty( \"os.arch\" ) );\n b.append( \" OS: \" );\n b.append( System.getProperty( \"os.name\" ) );\n b.append( \" (\" );\n b.append( System.getProperty( \"os.version\" ) );\n b.append( \")\" );\n Log.info( b );\n\n // enter a loop performing watchdog and maintenance functions\n watchdog();\n\n // The watchdog loop has exited, so we are done processing\n terminateComponents();\n\n Log.info( LogMsg.createMsg( MSG, \"Loader.terminated\" ) );\n\n // Rename the thread back to what it was called before we were being run\n Thread.currentThread().setName( oldName );\n\n }", "public void start() {\n\t\tif (serverStarted.get()) {\n\t\t\tthrow new IllegalStateException(\"Server already started. \" + toString());\n\t\t}\n\t\tCallable<Boolean> task;\n\t\ttry {\n\t\t\tserverSocket = new ServerSocket(port);\n\t\t\tserverSocket.setSoTimeout(soTimeout);\n\t\t\tport = serverSocket.getLocalPort();\n\t\t\tnotifyListener(\"Server started. \" + toString());\n\t\t\tserverStarted.set(true);\n\t\t\ttask = new Callable<Boolean>() {\n\t\n\t\t\t\tpublic Boolean call() {\n\t\t\t\t\tnotifyListener(\"Starting server thread. \" + toString());\n\t\t\t\t\tstopFlag.set(false);\n\t\t\t\t\twhile (!stopFlag.get()) {\n\t\t\t\t\t\tSocket connection = null;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconnection = serverSocket.accept();\n\t\t\t\t\t\t\tnotifyListener(\"Connection accepted on port. \" + toString());\n\t\t\t\t\t\t\tconnection.close();\n\t\t\t\t\t\t\tnotifyListener(\"Connection closed on port. \" + toString());\n\t\t\t\t\t\t\tpingCounter.incrementAndGet();\n\t\t\t\t\t\t} catch (SocketTimeoutException e) {\n\t\t\t\t\t\t\tnotifyListener(\"Server accept timed out. Retrying. \" + toString());\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\tnotifyListener(\"Server accept caused exception [message=\" + e.getMessage() + \"]. Retrying. \" + toString());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tnotifyListener(\"Server socket closed. \" + toString());\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t};\n\t\t} catch (IOException e) {\n\t\t\tstopFlag.set(true);\n\t\t\tthrow new IllegalStateException(\"Unable to open socket on port. \" + toString(), e);\n\t\t}\n\t\tserverActivity = scheduler.submit(task);\n\t\tnotifyListener(\"Waiting for server to fully complete start. \" + toString());\n\t\tfor (;;) {\n\t\t\ttry {\n\t\t\t\tThread.sleep(100);\n\t\t\t\tif (isStarted()) {\n\t\t\t\t\tnotifyListener(\"Server started. \" + toString());\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (InterruptedException e) {\n\n\t\t\t}\n\t\t}\n\t}", "private static void startServer(){\n try{\n MMServer server=new MMServer(50000);\n }catch (IOException ioe){\n System.exit(0);\n }\n \n }", "public void startServer() throws IOException {\n log.info(\"Starting server in port {}\", port);\n try {\n serverSocket = new ServerSocket(port);\n this.start();\n log.info(\"Started server. Server listening in port {}\", port);\n } catch (IOException e) {\n log.error(\"Error starting the server socket\", e);\n throw e;\n }\n }", "public void startLocalServer() {\n \t boolean exists = (new File(addeMcservl)).exists();\n \t if (exists) {\n \t // Create and start the thread if there isn't already one running\n\t \tif (thread != null) {\n \t \t\tthread = new AddeThread();\n \t \t\tthread.start();\n \t\t System.out.println(addeMcservl + \" was started\");\n \t \t} else {\n \t \t\tSystem.out.println(addeMcservl + \" is already running\");\n \t \t}\n \t } else {\n \t \tSystem.out.println(addeMcservl + \" does not exist\");\n \t }\n \t}", "public void start() {}", "public void start() {}", "public synchronized void start() {\n\t\trunning=true;\n\t\tnew Thread(this).start();\n\t\t\n\t\tif(JOptionPane.showConfirmDialog(this, \"Do you want to run the server\")==0){\n\t\t\tsocketServer = new GameServer(this);\n\t\t\tsocketServer.start();\n\t\t\t\n\t\t}\n\t\tsocketClient=new GameClient(this, \"localhost\");\n\t\tsocketClient.start();\n\t}", "public static void main (String[] args){\r\n\t\tnew Server().startRunning();\r\n\t}", "public void start()\n {\n }", "public void start() throws Exception {\n ServerSocket socket = new ServerSocket(0);\n port = socket.getLocalPort();\n socket.close();\n\n final String[] localArgs = {\"-inMemory\", \"-port\", String.valueOf(port)};\n server = ServerRunner.createServerFromCommandLineArgs(localArgs);\n server.start();\n url = \"http://localhost:\" + port;\n\n // internal client connection so we can easily stop, cleanup, etc. later\n this.dynamodb = getClient();\n }", "public void start()\r\n\t\t{\r\n\t\tDebug.assert(serverSocket != null, \"(Server/123)\");\r\n\r\n \t// flag the server as running\r\n \tstate = RUNNING;\r\n\r\n // Loop while still listening, accepting new connections from the server socket\r\n while (state == RUNNING)\r\n \t{\r\n // Get a connection from the server socket\r\n\t\t\tSocket socket = null;\r\n\t\t\ttry {\r\n socket = serverSocket.accept();\r\n \tif (state == RUNNING) \r\n \t createLogin(socket);\r\n }\r\n \r\n // The socket timeout allows us to check if the server has been shut down.\r\n // In this case the state will not be RUNNING and the loop will end.\r\n\t\t catch ( InterruptedIOException e )\r\n\t\t \t{\r\n\t\t \t// timeout happened\r\n\t\t \t}\r\n\t\t \r\n\t\t // This shouldn't happen...\r\n \t catch ( IOException e )\r\n \t \t{\r\n log(\"Server: Error creating Socket\");\r\n \t \tDebug.printStackTrace(e);\r\n \t }\r\n\t }\r\n\t \r\n\t // We've finished, clean up\r\n disconnect();\r\n\t\t}", "void startServer(int port) throws Exception;", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start();", "public void start() throws IOException {\n\t\tserverSocket = new ServerSocket(port);\n\t\tserverCallbacks.forEach(c -> c.onServerStarted(this, port));\n\t}", "public void startServer()\n\t{\n\t\twhile(true)\n\t\t{\n\t\t\tSystem.out.println(\"Listen\");\n\t\t\tif(listenInitialValuesRequest)\n\t\t\t{\n\t\t\t\tlistenInitialValuesRequest();\n\t\t\t}\n\t\t}\n\t}", "public void start() {\n\t\tstartFilesConfig(true);\n\t\tstartSpamFilterTest(false);\n\t}", "public void start() {\n _serverRegisterProcessor = new ServerRegisterProcessor();\n _serverRegisterProcessor.start();\n }", "@Override\n public void start() throws Exception {\n vertx.createHttpServer()\n // The requestHandler is called for each incoming\n // HTTP request, we print the name of the thread\n .requestHandler(req -> {\n req.response().end(\"Hello from \"\n + Thread.currentThread().getName());\n })\n .listen(8080); // start the server on port 8080\n }", "public void startRunning() {\n\t\t\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tserver = new ServerSocket(6789, 100); //6789 is the port number for docking(Where to connect). 100 is backlog no, i.e how many people can wait to access it.\n\t\t\t\twhile (true) {\n\t\t\t\t\t//This will run forever.\n\t\t\t\t\t\n\t\t\t\t\ttry{\n\t\t\t\t\t\t\n\t\t\t\t\t\twaitForConnection();\n\t\t\t\t\t\tsetupStreams();\n\t\t\t\t\t\twhileChatting();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tcatch(EOFException eofException) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tshowMessage(\"\\n The server has ended the connection!\");\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfinally {\n\t\t\t\t\t\t\n\t\t\t\t\t\tcloseAll();\n\t\t\t\t\t\t//Housekeeping.\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\n\t\t\t}\n\t\t\t\n\t\t\tcatch(IOException ioException ) {\n\t\t\t\t\n\t\t\t\tioException.printStackTrace();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}", "public void start() {\n }", "public void startup() {\n\t\tstart();\n }", "public void start()\n {}", "public void start() {\n\n\t}", "public void start(int port);", "public void startClientServer() {\n try {\n this.server_socket = new ServerSocket( port );\n this.start();\n } catch (IOException e ) {\n System.err.println( \"Failure: Socket couldn't OPEN! -> \" + e );\n } finally {\n System.out.println( \"Success: Server socket is now Listening on port \" + port + \"...\" );\n }\n }", "public void startServer() throws Exception\n {\n\t\t\tString SERVERPORT = \"ServerPort\";\n\t\t\tint serverport = Integer.parseInt(ConfigurationManager.getConfig(SERVERPORT));\n\t\t\t\n \n Srvrsckt=new ServerSocket ( serverport );\n while ( true )\n {\n Sckt =Srvrsckt.accept();\n new Thread ( new ConnectionHandler ( Sckt ) ).start();\n }\n \n \n\n\n }", "@Override\n public void start() throws LifecycleException {\n logger.info(\"Start http server ... \");\n\n\n try {\n // create a resource config that scans for JAX-RS resources and providers\n final ResourceConfig rc = new ResourceConfig()\n .packages(PACKAGES_SCAN) // packages path for resources loading\n .property(MvcFeature.TEMPLATE_BASE_PATH, FREEMARKER_BASE) // config freemarker view files's base path\n .register(LoggingFeature.class)\n .register(FreemarkerMvcFeature.class)\n .register(JettisonFeature.class)\n .packages(\"org.glassfish.jersey.examples.multipart\")\n .register(MultiPartFeature.class)\n .registerInstances(new ApplicationBinder()); //\n\n // create and start a new instance of grizzly http server\n // exposing the Jersey application at BASE_URI\n httpServer = GrizzlyHttpServerFactory.createHttpServer(URI.create(BASE_URI), rc);\n\n // Set StaticHttpHandler to handle http server's static resources\n String htmlPath = this.getClass().getResource(HTML_BASE).getPath(); // TODO, 部署后要根据实际目录修正!classes 同级目录下的 html 目录\n HttpHandler handler = new StaticHttpHandler(htmlPath);\n httpServer.getServerConfiguration().addHttpHandler(handler, \"/\");\n\n logger.info(\"Jersey app started with WADL available at {} application.wadl\\n \", BASE_URI);\n } catch (Exception e) {\n throw new LifecycleException(e); // just convert to self defined exception\n }\n }", "void start();", "void start();", "void start();", "void start();", "void start();", "void start();", "void start();", "void start();", "void start();", "void start();", "void start();", "void start();", "void start();", "void start();", "void start();", "public void start() {\n\t\t\n\t}", "public void start() {\n\t\t\n\t}", "public void start() throws IOException {\n ThreadExecutor.registerClient(this.getClass().getName());\n tcpServer.startServer();\n }", "public void start()\n {\n isRunning = true;\n try\n {\n //metoden opretter en ny socket for serveren på den valgte port\n ServerSocket serverSocket = new ServerSocket(port);\n //mens serveren kører venter den på en client\n while (isRunning)\n {\n serverDisplay(\"Serveren venter på clienter på port: \" + port);\n //accepterer clienten på socketen\n Socket socket = serverSocket.accept();\n\n if (!isRunning)\n {\n break;\n }\n // laver en ny thread til clienten med socketen der er blevet accepteret\n HandleClientThread handleClientThread = new HandleClientThread(socket);\n\n // her blever tråden tilføjet til arryet af clienter\n clientThreadArrayList.add(handleClientThread);\n // Starer handleclient tråden som håndtere clienter\n handleClientThread.start();\n }\n try\n {\n //Her lukker serveren socketen\n serverSocket.close();\n for (int i = 0; i < clientThreadArrayList.size() ; i++)\n {\n HandleClientThread hct = clientThreadArrayList.get(i);\n try\n {\n hct.inputStream.close();\n hct.outputStream.close();\n hct.socket.close();\n }\n catch (IOException e)\n {\n System.out.println(\"Uknowen command \" + e);\n }\n }\n }\n catch (Exception e)\n {\n serverDisplay(\"Kunne ikke lukke serveren og clienterne pga. \" + e);\n }\n }\n catch (IOException e)\n {\n String message = dateFormat.format(new Date()) + \"Fejl på ny server socket\" + e + \"\\n\";\n serverDisplay(message);\n }\n }", "public void startServer(){\r\n try {\r\n\r\n while(true){\r\n\r\n s = sc.accept();\r\n new ServerThread(s).start();\r\n }\r\n }\r\n catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n finally {\r\n try {\r\n sc.close();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "public void start() {\n\t\tSystem.out.println(\"开启系统1\");\r\n\t}", "public void startServer() {\n\r\n try {\r\n echoServer = new ServerSocket(port);\r\n } catch (IOException e) {\r\n System.out.println(e);\r\n }\r\n // Whenever a connection is received, start a new thread to process the connection\r\n // and wait for the next connection.\r\n while (true) {\r\n try {\r\n clientSocket = echoServer.accept();\r\n numConnections++;\r\n ServerConnection oneconnection = new ServerConnection(clientSocket, numConnections, this);\r\n new Thread(oneconnection).start();\r\n } catch (IOException e) {\r\n System.out.println(e);\r\n }\r\n }\r\n\r\n }", "public void start() {\n\n }", "@Override\n public void start() throws WebServerException {\n }", "private void start() {\n\n\t}", "public static void main(final String[] args) throws IOException {\n startServer();\n }", "protected void start() {\n }", "private void start() throws IOException {\n\n\n int port = 9090;\n server = ServerBuilder.forPort(port)\n .addService(new CounterServiceImpl())\n .build()\n .start();\n // logger.info(\"Server started, listening on \" + port);\n\n /* Add hook when stop application*/\n Runtime.getRuntime().addShutdownHook(new Thread() {\n @Override\n public void run() {\n // Use stderr here since the logger may have been reset by its JVM shutdown hook.\n // IRedis.USER_SYNC_COMMAND.\n System.err.println(\"*** shutting down gRPC server since JVM is shutting down\");\n Count.this.stop();\n System.err.println(\"*** server shut down\");\n\n }\n });\n }", "public Map startServerProcess(String id) throws IOException\n\t{\n\t\treturn request(POST, address(id, \"start\"));\n\t}", "public void start()\n {\n try\n {\n sshd.start();\n }\n catch (IOException e)\n {\n log.error(\"Unable to start ssdh.\", e);\n throw new RuntimeException(e);\n }\n }", "@Override\n public void start(Future<Void> startFuture) {\n vertx.createHttpServer()\n .requestHandler(getRequestHandler()).listen(8080, http -> {\n if (http.succeeded()) {\n startFuture.complete();\n LOGGER.info(\"HTTP server started on http://localhost:8080\");\n } else {\n startFuture.fail(http.cause());\n }\n });\n }", "private static void startServer() {\n new Thread() {\n public void run() {\n Server server = new Server();\n server.startUDP();\n }\n }.start();\n }", "public static void main(String[] args) {\n boolean cmdStart = false;\n if (args.length != 0) {\n GuiUtils guiUtils = new GuiUtils();\n String errorResponse = guiUtils.verifyPort(args[0]);\n if (errorResponse != null) {\n System.err.println(\"Could not start the Server: \" + errorResponse);\n System.exit(-1);\n } else {\n int port = Integer.parseInt(args[0]);\n HangmanServer hangmanServer = new HangmanServer();\n hangmanServer.config = new ServerConfiguration(port);\n hangmanServer.run();\n cmdStart = true;\n }\n }\n \n if (!cmdStart) {\n launch(args);\n }\n }", "public void start(){\n }", "public void start()\r\n {\r\n System.out.print(\"Server host? [localhost]: \");\r\n String host = scanner.nextLine().trim();\r\n if(host.length() == 0)\r\n {\r\n host = \"localhost\";\r\n }\r\n \r\n System.out.print(\"Server port? [2345]: \");\r\n String portString = scanner.nextLine().trim();\r\n if(portString.length() == 0)\r\n {\r\n portString = \"2345\";\r\n }\r\n int port = Integer.parseInt(portString);\r\n //trying to establish connection through the socket\r\n try(Socket socket = new Socket(host, port))\r\n {\r\n //creating i/o streams\r\n outputStream = new ObjectOutputStream(socket.getOutputStream());\r\n HelloRequest request = new HelloRequest();\r\n request.setName(\"world\");\r\n outputStream.writeObject(request);\r\n inputStream = new ObjectInputStream(socket.getInputStream());\r\n inputStream.readObject();\r\n System.out.println(\"Server connected.\");\r\n \r\n // login.\r\n while(!this.login())\r\n {\r\n ;\r\n }\r\n \r\n // Executing users input\r\n options:\r\n while(true)\r\n {\r\n try\r\n {\r\n int option = this.readOption(\"1. Create a game 2. Set commands 3. Get high scores 4. Delete a game 5. Start a game 6. Show a game 7. Logout : \", 1, 7);\r\n switch(option)\r\n {\r\n case 1: this.createGame(); break;\r\n case 2: this.setCommands(); break;\r\n case 3: this.getHighScores(); break;\r\n case 4: this.deleteGame(); break;\r\n case 5: this.startGame(); break;\r\n case 6: this.showGame(); break;\r\n case 7: this.logout(); break options;\r\n }\r\n }catch(Exception e)\r\n {\r\n e.printStackTrace();\r\n }\r\n }\r\n }catch(Exception e)\r\n {\r\n throw new RuntimeException(e);\r\n }\r\n }", "public void start() throws Exception {\n if (m_runner == null) {\n m_serverSocket = m_ftpConfig.getSocketFactory().createServerSocket(); \n m_runner = new Thread(this);\n m_runner.start();\n System.out.println(\"Server ready :: Apache FTP Server\");\n m_log.info(\"------- Apache FTP Server started ------\");\n }\n }", "public Client() {\n initComponents();\n \n Server server = new Server();\n server.start();\n \n }", "public void startServer()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tserverSocket = new ServerSocket(port);\r\n\t\t}\r\n\t\tcatch (IOException e1)\r\n\t\t{\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Waiting for client connection.\");\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tSocket socket = serverSocket.accept();\r\n\t\t\tSystem.out.println(\"Client connects.\");\r\n\r\n\t\t\tObjectInputStream ois = null;\r\n\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tois = new ObjectInputStream(new BufferedInputStream(socket.getInputStream()));\r\n\t\t\t\tObject o = ois.readObject();\r\n\t\t\t\tif (!(o instanceof Message))\r\n\t\t\t\t{\r\n\t\t\t\t\tthrow new Exception(\"Received information is not message. Skip.\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tmessage = (Message) o;\r\n\t\t\t\tSystem.out.println(\"Message received: \" + message);\r\n\t\t\t}\r\n\t\t\tcatch (IOException e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tcatch (ClassNotFoundException e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tfinally\r\n\t\t\t{\r\n\t\t\t\tCloseUtil.closeAll(ois, socket, serverSocket);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (IOException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void start() {\n\t\tscavenger.start();\r\n\t\tnew Thread() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\twhile (!serverSocket.isClosed()) {\r\n\t\t\t\t\tSocket socket = null;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tsocket = serverSocket.accept();\r\n\t\t\t\t\t\tscavenger.addSocket(socket);\r\n\t\t\t\t\t\tnew SynchronousSocketThread(socket).start();\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}.start();\r\n\t}", "@Override\n @SuppressWarnings(\"CallToPrintStackTrace\")\n public void simpleInitApp() {\n \n\n try {\n System.out.println(\"Using port \" + port);\n // create the server by opening a port\n server = Network.createServer(port);\n server.start(); // start the server, so it starts using the port\n } catch (IOException ex) {\n ex.printStackTrace();\n destroy();\n this.stop();\n }\n System.out.println(\"Server started\");\n // create a separat thread for sending \"heartbeats\" every now and then\n new Thread(new NetWrite()).start();\n server.addMessageListener(new ServerListener(), ChangeVelocityMessage.class);\n // add a listener that reacts on incoming network packets\n \n }", "public void startRunning(){\r\n\t\ttry{\r\n\t\t\twhile( true ){\r\n\t\t\t\tserver = new ServerSocket(PORT);\r\n\t\t\t\ttry{\r\n\t\t\t\t\twaitForClient(1);\r\n\t\t\t\t\twaitForClient(2);\r\n\t\t\t\t\tnew ServerThread(connectionClient1, connectionClient2, this).start();\r\n\t\t\t\t}\r\n\t\t\t\tcatch( EOFException e ){\r\n\t\t\t\t\tshowMessage(\"\\nServer ended the connection\");\r\n\t\t\t\t}\r\n\t\t\t\tfinally {\r\n\t\t\t\t\tserver.close();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch( IOException e ){\r\n\t\t}\r\n\t}", "void start() {\n }", "public void run() {\n final Server server = new Server(8081);\n\n // Setup the basic RestApplication \"context\" at \"/\".\n // This is also known as the handler tree (in Jetty speak).\n final ServletContextHandler context = new ServletContextHandler(\n server, CONTEXT_ROOT);\n final ServletHolder restEasyServlet = new ServletHolder(\n new HttpServletDispatcher());\n restEasyServlet.setInitParameter(\"resteasy.servlet.mapping.prefix\",\n APPLICATION_PATH);\n restEasyServlet.setInitParameter(\"javax.ws.rs.Application\",\n \"de.kad.intech4.djservice.RestApplication\");\n context.addServlet(restEasyServlet, CONTEXT_ROOT);\n\n\n try {\n server.start();\n server.join();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "public void start(){\r\n\t\tLog.out(\"Start Service...listening on \" + port, 5);\r\n\t\ttry{\r\n\t\t\t//set up\r\n\t\t\tssocket = new ServerSocket(port);\r\n\t\t}catch(Exception e){\r\n\t\t\tLog.out(\"Can't open the port\", 5);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\ttry{\r\n\t\t\twhile(isRun){\r\n\t\t\t\t//accept socket request,but only one.\r\n\t\t\t\tSocket socket = ssocket.accept();\r\n\t\t\t\tLog.out(\"Got a socket from \"+socket.getLocalAddress(), 5);\r\n\t\t\t\t//if no client now\r\n\t\t\t\tif(clientSocket == null){\r\n\t\t\t\t\tLog.out(\"Handle as client.\", 4);\r\n\t\t\t\t\tclientSocket = socket;\r\n\t\t\t\t\tnew Thread(new ServiceReciever(this, socket)).start();\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\tLog.out(\"The server is already in use,refuse the request.\",2);\r\n\t\t\t\t\tnew DataOutputStream(socket.getOutputStream()).writeInt(SOCKET_REFUSE);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}catch(Exception e){\r\n\t\t\tLog.out(\"There are something wrong when get the socket.\", 5);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public void start() {\r\n\t\trunning = true;\r\n\t\trun();\r\n\t}" ]
[ "0.8236902", "0.8140875", "0.7955583", "0.78855824", "0.77104306", "0.76807594", "0.75656575", "0.74897015", "0.7470355", "0.74228793", "0.73692364", "0.73079437", "0.7285652", "0.725726", "0.7237218", "0.71233374", "0.7119357", "0.70979005", "0.7096115", "0.70844036", "0.7074156", "0.706487", "0.706487", "0.7042298", "0.702361", "0.7019469", "0.7012066", "0.69961286", "0.6990123", "0.6987721", "0.6987721", "0.6987721", "0.6987721", "0.6987721", "0.6987721", "0.6987721", "0.6987721", "0.6987721", "0.6987721", "0.6987721", "0.6987721", "0.69608015", "0.6958197", "0.69447356", "0.6943422", "0.6942805", "0.693644", "0.69218284", "0.6891632", "0.6885054", "0.6857736", "0.6829747", "0.6816437", "0.68099463", "0.6771639", "0.6770984", "0.6770984", "0.6770984", "0.6770984", "0.6770984", "0.6770984", "0.6770984", "0.6770984", "0.6770984", "0.6770984", "0.6770984", "0.6770984", "0.6770984", "0.6770984", "0.6770984", "0.676978", "0.676978", "0.67618346", "0.6749064", "0.6748896", "0.6714155", "0.67026514", "0.67025155", "0.6698869", "0.66915375", "0.66638434", "0.66569895", "0.66558886", "0.6619383", "0.6617722", "0.65947765", "0.65805465", "0.65638906", "0.65475273", "0.6542929", "0.6528822", "0.65159786", "0.6506126", "0.65054345", "0.65043473", "0.6501597", "0.6498815", "0.6492948", "0.6488159", "0.6487684" ]
0.70328444
24
Creates inventory list ActionPage
public InventoryList() { super("Inventory List"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void open()\n {\n if (totalPages == 1) {\n Inventory inventory = Bukkit.createInventory(null, calcSize(contents.size()), title);\n int slot = 0;\n for (ItemStack item : contents)\n {\n inventory.setItem(slot++, item);\n }\n player.internalIgnore(InternalType.PAGES);\n player.get().openInventory(inventory);\n player.stopInternalIgnore(InternalType.PAGES);\n return;\n }\n\n int startPoint = (this.page - 1) * 45;\n List<ItemStack> invContents = Lists.newArrayList();\n\n ItemStack item;\n try {\n while ((item = this.contents.get(startPoint++)) != null) {\n invContents.add(item);\n if (startPoint - ((this.page - 1) * 45) == 45) break;\n }\n }\n catch (IndexOutOfBoundsException ignored) {}\n\n Inventory inventory = Bukkit.createInventory(null, 54, this.title);\n\n int slot = 0;\n for (ItemStack invItem : invContents) {\n inventory.setItem(slot++, invItem);\n }\n\n if (this.page > 1) {\n inventory.setItem(45, PageInventory.BACK_BUTTON);\n }\n if (this.page < this.getPages(this.contents.size())) {\n inventory.setItem(53, PageInventory.FORWARD_BUTTON);\n }\n\n player.internalIgnore(InternalType.PAGES);\n player.get().openInventory(inventory);\n player.stopInternalIgnore(InternalType.PAGES);\n }", "private static Inventory[] createInventoryList() {\n Inventory[] inventory = new Inventory[3];\r\n \r\n Inventory potion = new Inventory();\r\n potion.setDescription(\"potion\");\r\n potion.setQuantityInStock(0);\r\n inventory[Item.potion.ordinal()] = potion;\r\n \r\n Inventory powerup = new Inventory();\r\n powerup.setDescription(\"powerup\");\r\n powerup.setQuantityInStock(0);\r\n inventory[Item.powerup.ordinal()] = powerup;\r\n \r\n Inventory journalclue = new Inventory();\r\n journalclue.setDescription(\"journalclue\");\r\n journalclue.setQuantityInStock(0);\r\n inventory[Item.journalclue.ordinal()] = journalclue;\r\n \r\n return inventory;\r\n }", "public void createNewList(ActionEvent actionEvent) {\n // ideally again, this would have its own window\n // give it a title, and optionally populate it with some items\n }", "List<InventoryItem> getInventory();", "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 createNewItem(ActionEvent actionEvent) {\n // we will create a new item instance here (ideally we would use another window for this)\n // and then we will simply addItem() to the currently selected list\n }", "public void showInventory()\n\t{\n\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t+ \"__________________\\n\\n\");\n\t\tSystem.out.print(\"\\t\\t\\t\\tInventory\");\n\t\t\n\t\tfor (String s: inventory)\n\t\t{\n\t\t\tSystem.out.print(\"\\n\" + s);\n\t\t}\n\t\t\n\t\tSystem.out.print(\"\\n\\n[R] Return\\n\");\n\t\tSystem.out.print(\"________________________________________________________\"\n\t\t\t+ \"__________________\\n\\n\");\n\t\tSystem.out.print(\"Action: \");\n\t\t\n\t}", "List<SimpleInventory> getInventories();", "@Override\n\tpublic void openInventory() {\n\t\t\n\t}", "void openInventory(Player player, SimpleInventory inventory);", "ItemStack addPage(EntityPlayer player, ItemStack itemstack, ItemStack page);", "ListItem createListItem();", "public void sortInventory() {\n int i = 0;\n //update all the the button icons with our inventory for if the inventory is less than full (10 items)\n for (; i < inventory.items.size(); i++) {\n //set the button to display the item in the inventory\n buttonsArray[i].setType(inventory.items.get(i).type);\n }\n //clears the remaining items in the inventory if the inventory has less than 10 items\n for (; i < 10; i++) {\n //set any button in the inventory panel to empty if there is not item in that inventory slot\n buttonsArray[i].setType(null);\n }\n\n this.parent.itemsPanel.updateItems();\n }", "public Inventory getInventory(){ //needed for InventoryView - Sam\n return inventory;\n }", "private Inventory createInventory() {\n\n\t\tInventory inv;\n\n\t\tif (guiMetadata.getInvType() == InventoryType.CHEST) {\n\t\t\tinv = Bukkit.createInventory(null, guiMetadata.getSize(), guiMetadata.getGuiName());\n\t\t} else {\n\t\t\tinv = Bukkit.createInventory(null, guiMetadata.getInvType(), guiMetadata.getGuiName());\n\t\t}\n\n\t\treturn inv;\n\t}", "public List<Inventory> getInventory();", "public void createCardInventory() {\n try {\n if (cardInventoryDataBean != null) {\n String response = cardInventoryTransformerBean.createCardInventory(cardInventoryDataBean);\n if (SystemConstantUtil.SUCCESS.equals(response)) {\n System.out.println(\"Create CardInventory Successfully\");\n messageDataBean.setMessage(\"CardInventory added successfully.\");\n messageDataBean.setIsSuccess(Boolean.TRUE);\n cardInventoryDataBean.setNull();\n this.retrieveCardInventoryList();\n } else {\n System.out.println(\"CardInventory not created\");\n messageDataBean.setMessage(response);\n messageDataBean.setIsSuccess(Boolean.FALSE);\n }\n }\n } catch (Exception e) {\n messageDataBean.setMessage(e.toString());\n messageDataBean.setIsSuccess(Boolean.FALSE);\n System.out.println(e);\n }\n }", "void action(Locale locale, Player player, InventoryGUI gui);", "public void createMainInventor() {\n String name = _plugin.getConfigManager().getGeneralSettingsMap().get(\"Name\");\r\n String colorizedName = _plugin.getUtilsManager().colorizeString(name);\r\n //Size of the Inventory;\r\n int inventorySize = Integer.valueOf(_plugin.getConfigManager().getGeneralSettingsMap().get(\"InventorySize\"));\r\n //Initialize Inventory;\r\n mainInventory = _plugin.getServer().createInventory(null, inventorySize, colorizedName);\r\n //Retrieve the HashMaps for the plugin;\r\n HashMap<Integer, CategoryItem> categoryInformationMap = _plugin.getConfigManager().getCategoryInformationMap();\r\n HashMap<String, String> languageInformation = _plugin.getConfigManager().getLanguageInformationMap();\r\n //Add items to Inventory;\r\n for (Integer i : categoryInformationMap.keySet()) {\r\n CategoryItem categoryItem = categoryInformationMap.get(i);\r\n ItemStack item = categoryItem.getItem();\r\n ItemMeta itemMeta = item.getItemMeta();\r\n itemMeta.setDisplayName(_plugin.getUtilsManager().colorizeString(languageInformation.get(\"CategoryName\").replace(\"%cat%\", categoryItem.getName())));\r\n List<String> lore = new ArrayList<>();\r\n lore.add(_plugin.getUtilsManager().colorizeString(categoryItem.getDescription()));\r\n item.setItemMeta(itemMeta);\r\n mainInventory.addItem(item);\r\n }\r\n }", "private static void viewItems() {\r\n\t\tdisplayShops();\r\n\t\tint shopNo = getValidUserInput(scanner, shops.length);\r\n\t\tdisplayItems(shopNo);\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Please enter the ID of the element to add to cart. \\\"0\\\" for exit\");\r\n\t\tSystem.out.println();\r\n\t\tint productNo = getValidUserInput(scanner, shops[shopNo].getAllSales().length + 1);\r\n\t\tif (productNo > 0) {\r\n\t\t\tProduct productToBeAdd = shops[shopNo].getAllSales()[productNo - 1];\r\n\t\t\tSystem.out.println();\r\n\t\t\tSystem.out.print(\" Please enter the number of the item you would like to buy: \");\r\n\t\t\tint numberOfTheItems = getUserIntInput();\r\n\t\t\tcart.addProduct(productToBeAdd, numberOfTheItems);\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\" Purchase done, going back to the menu.\");\r\n\t\tSystem.out.println();\r\n\t}", "private void viewBackpack() {\n Item[] inventory = GameControl.getSortedInventoryList();\r\n \r\n System.out.println(\"\\n List of inventory Items\");\r\n System.out.println(\"Description\" + \"\\t\" + \r\n \"Required\" + \"\\t\" +\r\n \"In Stock\");\r\n \r\n // For each inventory item\r\n for (Item inventoryItem : inventory){\r\n // Display the description, the required amount and amount in stock\r\n System.out.println(InventoryItem.getType + \"\\t \" +\r\n InventoryItem.requiredAmount + \"\\t \" +\r\n InventoryItem.getQuantity);\r\n }\r\n \r\n }", "private void setUpPageItem() {\n displaylimit = xmlhandler.getItemDisplayLimit();\n itemrow = inventory.getItemRow();\n Back.setEnabled(false);\n Begin.setEnabled(false);\n if(getPageEnd()==1) {\n Forward.setEnabled(false);\n End.setEnabled(false);\n }\n }", "public Inventory(){\n this.items = new ArrayList<InventoryItem>(); \n }", "public interface InventoryPageOR {\n\n String inventoryPage = \"xpath= //div[@class='NavMenuTitle']//span[text()='Inventory']\";\n String aD_type = \"xpath= //select[contains(@id,'AdType_DropDownList1')]\";\n String mediaGroupField = \"xpath= //select[contains(@id,'MediumGroup_DropDownList1')]\";\n String Mediabox = \"xpath= //select[contains(@id,'Media_ListBox1')]\";\n String selection = \"xpath= //select[contains(@id, 'Section_ListBox1')]\";\n String inventory_placement = \"xpath= //select[contains(@id, 'Inventory_ListBox1')]\";\n String period = \"xpath= //select[contains(@id,'BkingPeriod_ddlPeriod')]\";\n String pages = \"xpath= //input[contains(@id,'blInventoryView_1')]\";\n String matrix = \"xpath= //input[@id='ctl00_cphMain_srch03_rblInventoryView_0']\";\n String list = \"css= #ctl00_cphMain_srch02_rblInventoryView_2\";\n String Adsize = \"xpath= //select[contains(@id,'AdSize_DropDownList1')]\";\n String get_inventory = \"xpath= //input[contains(@id,'btnGetInventory')]\";\n String mediatype = \"xpath= //select[@id='ctl00_cphMain_srch01_lbMedia_ListBox1']//option[@value='GAZE']\";\n String newSearch = \"css= input[value='New Search']\";\n String screenlock = \"css= .inv_wait\";\n String selectplusiconforbydate = \"xpath= //td[@class='%s']/../..//input[@class='InvResultCol Select linkButton new']\";\n String housingGarden = \"css= tr [title = 'www.houseandgarden.com']\";\n String startAndEnddate = \"xpath= //tr[@title = 'www.houseandgarden.com']/..//tr[@title='www.houseandgarden.com - Run of Site']/td[%d]\";\n String startAndEnddateofbridge = \"xpath= //tr[@title = 'www.bridesmagazine.com']/..//tr[@title='www.bridesmagazine.com - Run of Site']/td[%d]\";\n String verifyIteminCart = \"css= #tabs-li-cart a#acart\";\n String addtoCart = \"xpath= //li//a[contains(text(), 'Add to cart')]\";\n String torange = \"css= #ctl00_cphMain_srch02_ucBkingPeriod_dteRangeTo_iwdcDate_input\";\n String customer = \"css= #ctl00_cphMain_ucCart_btnCustomer\";\n String companyName = \"css= #ctl00_cphMain_ucCustomer_ctlModalBuyerCompany_btnModal\";\n String contactName = \"css= #ctl00_cphMain_ucCustomer_ctlModalBuyerContact_btnModal\";\n String companyNameField = \"css= #Search_FieldSelect0_txtValue1\";\n String searchButton = \"css= #Search_GoButton\";\n String selectCompany = \"css= .ig_5aac757b_rcb1112.SelectionSearch.btnOpenSite\";\n String selectContact = \"css= .ig_5aac757b_rcb1112.SelectionSearch.btnOpenContact\";\n\n\n}", "public void printInventory()\n {\n System.out.println(\"Welcome to \" + storeName + \"! We are happy to have you here today!\");\n System.out.println(storeName + \" Inventory List\");\n System.out.println();\n \n System.out.println(\"Our Books:\");\n System.out.println(Book1.toString());\n System.out.println(Book2.toString());\n System.out.println(Book3.toString());\n System.out.println(Book4.toString());\n System.out.println(Book5.toString());\n \n System.out.println();\n \n System.out.println(\"Our Bevereges:\");\n System.out.println(Beverage1.toString());\n System.out.println(Beverage2.toString());\n System.out.println(Beverage3.toString());\n\n System.out.println();\n }", "public List<InventoryEntry> getInventoryEntries();", "@RequestMapping(method = RequestMethod.GET, produces = \"application/json\", headers = \"Accept=application/json\" )\n public ResponseEntity<List<InventoryResponse>> getInventory(){\n List<InventoryResponse> inventoryResponse = new ArrayList<>();\n inventoryService.getInventory().stream().forEach(inventoryItem -> inventoryResponse.add(\n new InventoryResponse(inventoryItem.getProduct().getId(), inventoryItem.getAmount())));\n\n return ResponseEntity.ok(inventoryResponse);\n }", "List<Inventory> executeOrder(OrderForm orderForm) throws Exception;", "private void inventoryHandler(){\n final Button TAB = getOwnerArea().getKeyboard().get(Keyboard.TAB);\n final Button SPACE = getOwnerArea().getKeyboard().get(Keyboard.SPACE);\n final Button R = getOwnerArea().getKeyboard().get(Keyboard.R);\n final Button T = getOwnerArea().getKeyboard().get(Keyboard.T);\n final Button Y = getOwnerArea().getKeyboard().get(Keyboard.Y);\n final Button U = getOwnerArea().getKeyboard().get(Keyboard.U);\n final Button I = getOwnerArea().getKeyboard().get(Keyboard.I);\n final Button O = getOwnerArea().getKeyboard().get(Keyboard.O);\n final Button P = getOwnerArea().getKeyboard().get(Keyboard.P);\n final Button K = getOwnerArea().getKeyboard().get(Keyboard.K);\n\n //Used for tests, as asked in the instructions\n if (R.isPressed()) {\n inventory.add(ARPGItem.ARROW, 1);\n } else if (T.isPressed()) {\n inventory.add(ARPGItem.SWORD, 1);\n } else if (Y.isPressed()) {\n inventory.add(ARPGItem.STAFF, 1);\n } else if (U.isPressed()) {\n inventory.add(ARPGItem.BOW, 1);\n } else if (I.isPressed()) {\n inventory.add(ARPGItem.BOMB, 1);\n } else if (O.isPressed()) {\n inventory.add(ARPGItem.CASTLEKEY, 1);\n } else if (P.isPressed()) {\n inventory.add(ARPGItem.WINGS, 1);\n } else if (K.isPressed()) {\n inventory.add(ARPGItem.CHESTKEY, 1);\n }\n\n /*If the player does not have any currentItem anymore we switch it (f. ex. if a player\n uses his last bomb or if the constructor assigns as the player's current item an item\n he does not possess by mistake)\n */\n if(!possess(currentItem)) {\n currentItem = (ARPGItem) inventory.switchItem(currentItem);\n }\n\n //Switches item.\n if(TAB.isPressed()){\n currentItem = (ARPGItem) inventory.switchItem(currentItem);\n if(currentItem == ARPGItem.ARROW){\n currentItem = (ARPGItem) inventory.switchItem(currentItem);\n }\n }\n\n //Uses the item and adapts the animations\n if(SPACE.isPressed() && !isDisplacementOccurs()){\n if(currentItem.use(getOwnerArea(), getOrientation(), getCurrentMainCellCoordinates())){\n switch(currentItem){\n case BOMB:\n inventory.remove(currentItem, 1);\n break;\n case BOW:\n if(actionTimer >= COOLDOWN) {\n animateAction = true;\n currentAnimation = bowAnimations[getOrientation().ordinal()];\n shootArrow = true;\n actionTimer = 0.f;\n }\n break;\n case SWORD:\n animateAction = true;\n currentAnimation = swordAnimations[getOrientation().ordinal()];\n break;\n case STAFF:\n animateAction = true;\n currentAnimation = staffAnimations[getOrientation().ordinal()];\n break;\n }\n\n }\n }\n\n //Wings have a special treatment because SPACE needs to be down and not pressed\n if (currentItem == ARPGItem.WINGS && SPACE.isDown()) {\n //Sets the animation for the current orientation. Make sure it doesn't fly yet\n // so that the animation is not stuck.\n if (!canFly) {\n currentAnimation = flyAnimations[getOrientation().ordinal()];\n }\n canFly = true;\n } else {\n //Resets to idleAnimations\n if (canFly) {\n currentAnimation = idleAnimations[getOrientation().ordinal()];\n }\n canFly = false;\n }\n }", "public Page addUiAction(RetailscmUserContext userContext, String pageId, String code, String icon, String title, int displayOrder, String brief, String imageUrl, String linkToUrl, String extraData , String [] tokensExpr) throws Exception;", "Collection<Item> getInventory();", "public void inventoryManageItemScreen( ActionEvent event ) throws Exception{\n\t\tif(userObj.getType().equalsIgnoreCase(\"Stock Manager\"))\n\t\t{\n\t\t\t\n\t\t\tFXMLLoader loader = new FXMLLoader();\n\t\t\tloader.setLocation(getClass().getResource(\"/view/InventoryItems.fxml\"));\n\t\t\tParent parent = loader.load();\n\t\t\t\n\t\t\tScene scene = new Scene(parent);\n\t\t\tscene.getStylesheets().add(getClass().getResource(\"/view/application.css\").toExternalForm());\n\t\t\t\n\t\t\tInventoryManageItemsController controller = loader.getController();\n\t\t\tcontroller.loadUser(userObj);\n\t\t\t\n\t\t\tStage window = (Stage) ((Node)event.getSource()).getScene().getWindow();\n\t\t\t\n\t\t\twindow.setScene(scene);\n\t\t\twindow.show();\n\t\t\twindow.centerOnScreen();\n\t\t\t\n\t\t}else {\n\t\t\tGenerator.getAlert(\"Access Denied\", \"You don't have access to Inventory Management\");\n\t\t}\n\t\n\t}", "@SuppressWarnings(\"deprecation\")\r\n\t@EventHandler\r\n\tpublic void inventoryClickEvent(InventoryClickEvent e) {\r\n\t\tEntity applier = e.getWhoClicked();\r\n\t\tif (!e.isCancelled()) {\r\n\t\t\tif (applier instanceof Player) {\r\n\t\t\t\tPlayer papplier = (Player) applier;\r\n\t\t\t\t// PlayerInventory pinventory = papplier.getInventory();\r\n\t\t\t\t// inven.put(papplier, pinventory);\r\n\t\t\t\tItemStack item = e.getCurrentItem();\r\n\t\t\t\tItemStack transmog = e.getCursor();\r\n\t\t\t\tString tname = \"\";\r\n\t\t\t\tif (item != null) {\r\n\t\t\t\t\tItemMeta itemMeta = item.getItemMeta();\r\n\t\t\t\t\tArrayList<String> lore1 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore2 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore3 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore4 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore5 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore6 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> lore7 = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<String> totallore = new ArrayList<String>();\r\n\t\t\t\t\tif (item.getType() != Material.AIR) {\r\n\t\t\t\t\t\t// papplier.sendMessage(\"1\");\r\n\t\t\t\t\t\tif (transmog != null) {\r\n\t\t\t\t\t\t\t// papplier.sendMessage(\"2\");\r\n\t\t\t\t\t\t\tif (item.getType().name().endsWith(\"SWORD\") || item.getType().name().endsWith(\"AXE\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"HELMET\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"SHOVEL\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"CHESTPLATE\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"LEGGINGS\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"BOOTS\") || item.getType().name().endsWith(\"BOW\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"PICKAXE\")\r\n\t\t\t\t\t\t\t\t\t|| item.getType().name().endsWith(\"HOE\")) {\r\n\t\t\t\t\t\t\t\t// papplier.sendMessage(\"3\");\r\n\t\t\t\t\t\t\t\tif (item.hasItemMeta()) {\r\n\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"4\");\r\n\t\t\t\t\t\t\t\t\tif (item.getItemMeta().hasLore()) {\r\n\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"5\");\r\n\t\t\t\t\t\t\t\t\t\tif (item.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"6\");\r\n\t\t\t\t\t\t\t\t\t\t\tif (Methods.transmogged(item) == true) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"7\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(Api.transint(item)\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\tdname.put(item, item.getItemMeta().getDisplayName());\r\n\t\t\t\t\t\t\t\t\t\t\t\tI.put(papplier, Methods.transint(item));\r\n\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.put(item, true);\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\tif (Methods.transmogged(item) == false) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"8\");\r\n\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.put(item, false);\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}\r\n\t\t\t\t\t\t\t\t\t\tif (!item.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"9\");\r\n\t\t\t\t\t\t\t\t\t\t\ttransmogged.put(item, false);\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"10\");\r\n\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) == false) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"11\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.hasItemMeta()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"12\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"13\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().getDisplayName()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(Methods.color(\"&e&lTransmog\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"14\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (String tlore : transmog.getItemMeta().getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"15\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (tlore.contains(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&e&oPlace scroll on item to apply.\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"16\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (e.getClickedInventory() instanceof PlayerInventory) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"17\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (CE.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size() > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMaterial material = item.getType();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemStack titem = new ItemStack(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmaterial, 1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemMeta titemMeta = titem\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemMeta();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (item.getEnchantments() == null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchanted.put(titem, false);\r\n\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\tif (item.getEnchantments() != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = item.getEnchantments();\r\n\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\tArrayList<CEnchantments> enchantes = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantments();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArrayList<String> enchanters = new ArrayList<String>();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments encs : enchantes) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchanters.add(Methods.removeColor(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tencs.getCustomName()));\r\n\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\tfor (String ench : item.getItemMeta()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"29\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanters\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.contains(Methods.removePower(\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\tMethods.removeColor(\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\tench)))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"31\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments enchant : CE\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.getEnchantments()) {\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// papplier.sendMessage(\"19\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (ench.contains(enchant\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.getCustomName())) {\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\tString tier = CE\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.getEnchantmentCategory(\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\tenchant);\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\tif (tier.contains(\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\"T1\")) {\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\tlore1.add(0, Methods\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.color(ench));\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\tcontinue;\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} else if (tier\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.contains(\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\"T2\")) {\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\tlore2.add(0, Methods\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.color(ench));\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\tcontinue;\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} else if (tier\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.contains(\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\"T3\")) {\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\tlore3.add(0, Methods\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.color(ench));\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\tcontinue;\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} else if (tier\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.contains(\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\"T4\")) {\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\tlore4.add(0, Methods\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.color(ench));\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\tcontinue;\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} else if (tier\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.contains(\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\"T5\")) {\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\tlore5.add(0, Methods\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.color(ench));\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\tcontinue;\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} else if (tier\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.contains(\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\"T6\")) {\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\tlore6.add(0, Methods\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.color(ench));\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\tcontinue;\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}\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}\r\n\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} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore7.add(ench);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\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}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore7);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore6);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore5);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore4);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore3);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore2);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tint enchNumber = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (itemMeta.hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttname = item.getItemMeta()\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.getDisplayName()\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+ \" &d&l[&b&l&n\"\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+ enchNumber + \"&d&l]\";\r\n\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\tif (!itemMeta.hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttname = \"&a\" + item.getType().name()\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+ \" &d&l[&b&l&n\"\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+ enchNumber + \"&d&l]\";\r\n\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\te.setCancelled(true);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setLore(totallore);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setDisplayName(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.color(tname));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.setItemMeta(titemMeta);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.addUnsafeEnchantments(enchants);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanted.get(titem) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanted.get(titem) == false) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.addGlow(titem);\r\n\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}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.setCursor(null);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.removeItem(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory().addItem(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew ItemStack[] { titem });\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (int i2 = 1; i2 <= 10; ++i2) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getWorld().playEffect(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getEyeLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tEffect.SPELL, 1);\r\n\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\tpapplier.getWorld().playSound(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSound.LEVEL_UP, 1.0f, 1.0f);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = null;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.remove(item);\r\n\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\tif (dname.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdname.remove(item);\r\n\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\tif (I.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tI.remove(item);\r\n\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\treturn;\r\n\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} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.getWhoClicked().sendMessage(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&6Swarm&eEnchants&f >> &cYou may only use Transmog scrolls in your own inventory!\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\r\n\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}\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\t\t\t\t\t\t\t}\r\n\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}\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\tif (transmogged.get(item) == true) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"21\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tString dname1 = dname.get(item).replace(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.color(\"&d&l[&b&l&n\" + I.get(papplier) + \"&d&l]\"), \"\");\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.hasItemMeta()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"22\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"23\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmog.getItemMeta().getDisplayName()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.contains(Methods.color(\"&e&lTransmog\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"24\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (String tlore : transmog.getItemMeta().getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"25\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (tlore.contains(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&e&oPlace scroll on item to apply.\"))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"26\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (e.getClickedInventory() instanceof PlayerInventory) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"27\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (CE.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size() > 0) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"28\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMaterial material = item.getType();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemStack titem = new ItemStack(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmaterial, 1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tItemMeta titemMeta = titem\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemMeta();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (item.getEnchantments() == null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.addGlow(titem);\r\n\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\tif (item.getEnchantments() != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = item.getEnchantments();\r\n\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\tArrayList<CEnchantments> enchantes = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getEnchantments();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tArrayList<String> enchanters = new ArrayList<String>();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments encs : enchantes) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchanters.add(Methods.removeColor(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tencs.getCustomName()));\r\n\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\tfor (String ench : item.getItemMeta()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getLore()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"29\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (enchanters\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.contains(Methods.removePower(\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\tMethods.removeColor(\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\tench)))) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// papplier.sendMessage(\"31\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (CEnchantments enchant : CE\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.getEnchantments()) {\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// papplier.sendMessage(\"19\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (ench.contains(enchant\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.getCustomName())) {\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\tString tier = CE\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.getEnchantmentCategory(\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\tenchant);\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\tif (tier.contains(\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\"T1\")) {\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\tlore1.add(0, Methods\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.color(ench));\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\tcontinue;\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} else if (tier\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.contains(\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\"T2\")) {\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\tlore2.add(0, Methods\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.color(ench));\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\tcontinue;\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} else if (tier\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.contains(\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\"T3\")) {\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\tlore3.add(0, Methods\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.color(ench));\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\tcontinue;\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} else if (tier\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.contains(\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\"T4\")) {\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\tlore4.add(0, Methods\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.color(ench));\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\tcontinue;\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} else if (tier\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.contains(\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\"T5\")) {\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\tlore5.add(0, Methods\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.color(ench));\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\tcontinue;\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} else if (tier\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.contains(\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\"T6\")) {\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\tlore6.add(0, Methods\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.color(ench));\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\tcontinue;\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}\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}\r\n\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} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlore7.add(ench);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\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}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore7);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore6);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore5);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore4);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore3);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore2);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttotallore.addAll(lore1);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tint enchNumber = CE\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getItemEnchantments(item)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.size();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (itemMeta.hasDisplayName()) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttname = dname1 + \" &d&l[&b&l&n\"\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+ enchNumber + \"&d&l]\";\r\n\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\te.setCancelled(true);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setLore(totallore);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitemMeta.setDisplayName(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMethods.color(tname));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.setItemMeta(titemMeta);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitem.addUnsafeEnchantments(enchants);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.setCursor(null);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.removeItem(item);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getInventory().addItem(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew ItemStack[] { titem });\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfor (int i2 = 1; i2 <= 10; ++i2) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getWorld().playEffect(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getEyeLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tEffect.SPELL, 1);\r\n\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\tpapplier.getWorld().playSound(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpapplier.getLocation(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSound.LEVEL_UP, 1.0f, 1.0f);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tenchants = null;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (transmogged.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttransmogged.remove(item);\r\n\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\tif (dname.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tdname.remove(item);\r\n\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\tif (I.get(item) != null) {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tI.remove(item);\r\n\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\treturn;\r\n\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} else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\te.getWhoClicked().sendMessage(Methods.color(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"&6Swarm&eEnchants&f >> &cYou may only use Transmog scrolls in your own inventory!\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treturn;\r\n\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}\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\t\t\t\t\t\t\t}\r\n\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}\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}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\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}", "@Override\r\n\tpublic void setInventoryItems() {\n\t\t\r\n\t}", "@Override\n public void executeAction(int slot, InventoryClickEvent event)\n {\n if (slot == 45 && page > 1) {\n backPage();\n }\n if (slot == 53 && this.page < this.getPages(this.contents.size())) {\n forwardPage();\n }\n }", "public void createInventoryReward() {\n if (inventoryEntityToRetrieve == null) {\n try {\n inventoryEntityToRetrieve = RandomBenefitModel.getInventoryRewards(application, encounter, characterVM.getDistance());\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }", "public static ArrayList<InventoryItem> getInventoryItems() {\n\n String itemUrl = REST_BASE_URL + ITEMS;\n String inventoryUrl = REST_BASE_URL + INVENTORIES;\n String availableUrl = REST_BASE_URL + INVENTORIES + AVAILABLE + CATEGORIZED;\n\n // List of items\n ArrayList<InventoryItem> items = new ArrayList<>();\n ArrayList<String> itemNames = new ArrayList<>();\n\n URL url = null;\n\n /* Fetch items from \"items\" table. */\n try {\n url = new URL(itemUrl);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n\n JSONArray itemJsonArray = null;\n try {\n Log.d(TAG, \"getInventoryItems: getting items\");\n itemJsonArray = getResponseFromHttpUrl(url);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n // Store each item into <items>. Store each item name into <itemNames>.\n for (int i = 0; i < itemJsonArray.length(); i++) {\n JSONObject jo = (JSONObject) itemJsonArray.get(i);\n InventoryItem newItem = new InventoryItem(\n jo.getString(ITEM_IMAGE_URL),\n jo.getString(ITEM_NAME),\n jo.getString(ITEM_DESCRIPTION),\n 0,\n 0);\n items.add(newItem);\n itemNames.add(jo.getString(ITEM_NAME));\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n /* Fetch inventory items from \"inventories\" */\n try {\n url = new URL(inventoryUrl);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n\n JSONArray jaResult = null;\n try {\n Log.d(TAG, \"getInventoryItems: getting ivnentories\");\n jaResult = getResponseFromHttpUrl(url);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n for (int i = 0; i < jaResult.length(); i++) {\n JSONObject jo = (JSONObject) jaResult.get(i);\n int index = itemNames.indexOf(jo.getString(ITEM_NAME));\n if (index > -1) {\n InventoryItem currItem = items.get(index);\n currItem.setItemQuantity(currItem.getItemQuantity()+1);\n items.set(index, currItem);\n } else {\n // TODO: throw an exception here?\n Log.e(TAG, \"getInventoryItems: There is an item in the inventory but not in the item table!\");\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n /* get inventory stocks from \"/available/categorized\" */\n try {\n url = new URL(availableUrl);\n } catch (MalformedURLException e) {\n e.printStackTrace();\n }\n\n\n try {\n Log.d(TAG, \"getInventoryItems: getting inventory stocks\");\n jaResult = getResponseFromHttpUrl(url);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n for (int i = 0; i < jaResult.length(); i++) {\n JSONObject jo = (JSONObject) jaResult.get(i);\n int index = itemNames.indexOf(jo.getString(ITEM_NAME));\n if (index > -1) {\n InventoryItem currItem = items.get(index);\n currItem.setItemStock(jo.getInt(ITEM_COUNT));\n items.set(index, currItem);\n } else {\n // TODO: throw an exception here?\n Log.e(TAG, \"getInventoryItems: There is an item in the stock but not in the item table!\");\n }\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return items;\n }", "List<InventoryItem> getInventory(String username);", "@Override\n\tpublic void browseItems(Session session){\n\t\t//exception handling block\n\t\ttry{\n\t\t\tbrowseItem=mvc.browseItems(session);\n\t\t\t//displaying items from database\n\t\t\tSystem.out.println(\"<---+++---Your shopping items list here----+++--->\");\n\t\t\tSystem.out.println(\"ItemId\"+\" \"+\"ItemName\"+\" \"+\"ItemType\"+\" \"+\"ItemPrice\"+\" \"+\"ItemQuantity\");\n\t\t\tfor(int i = 0; i < browseItem.size(); i++) {\n\t System.out.println(browseItem.get(i)+\"\\t\"+\"\\t\");\n\t }\n\t System.out.println(\"<------------------------------------------------>\");\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Online Market App Exception- Browse Items: \" +e.getMessage());\n\t\t}\n\t}", "public void createItem(View view) {\n \t\n String[] temp = getCurrentItemTypes();\n \n Intent intent = new Intent(this, CreateItem.class);\n intent.putExtra(EDIT, \"no\");\n intent.putExtra(TYPES, temp);\n startActivityForResult(intent, 1);\n }", "private void viewPageClicked(ActionEvent event) {\n\n Item tempItem = new Item();\n String itemURL = tempItem.itemURL;\n Desktop dk = Desktop.getDesktop();\n try{\n dk.browse(new java.net.URI(itemURL));\n }catch(IOException | URISyntaxException e){\n System.out.println(\"The URL on file is invalid.\");\n }\n\n showMessage(\"Visiting Item Web Page\");\n\n }", "public static void doCreateitem(RunData data)\n\t{\n\t\tSessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ());\n\t\tParameterParser params = data.getParameters ();\n\n\t\tstate.setAttribute(STATE_LIST_SELECTIONS, new TreeSet());\n\n\t\tMap current_stack_frame = peekAtStack(state);\n\t\tboolean pop = false;\n\t\t\n\t\tString collectionId = params.getString(\"collectionId\");\n\t\tString itemType = params.getString(\"itemType\");\n\t\tString flow = params.getString(\"flow\");\n\t\t\n\t\tBoolean preventPublicDisplay = (Boolean) state.getAttribute(STATE_PREVENT_PUBLIC_DISPLAY);\n\n\t\tSet alerts = (Set) state.getAttribute(STATE_CREATE_ALERTS);\n\t\tif(alerts == null)\n\t\t{\n\t\t\talerts = new HashSet();\n\t\t\tstate.setAttribute(STATE_CREATE_ALERTS, alerts);\n\t\t}\n\t\tSet missing = new HashSet();\n\t\tif(flow == null || flow.equals(\"cancel\"))\n\t\t{\n\t\t\tpop = true;\n\t\t}\n\t\telse if(flow.equals(\"updateNumber\"))\n\t\t{\n\t\t\tcaptureMultipleValues(state, params, false);\n\t\t\tint number = params.getInt(\"numberOfItems\");\n\t\t\tInteger numberOfItems = new Integer(number);\n\t\t\tcurrent_stack_frame.put(ResourcesAction.STATE_STACK_CREATE_NUMBER, numberOfItems);\n\n\t\t\t// clear display of error messages\n\t\t\tstate.setAttribute(STATE_CREATE_ALERTS, new HashSet());\n\n\t\t\tList items = (List) current_stack_frame.get(STATE_STACK_CREATE_ITEMS);\n\t\t\tif(items == null)\n\t\t\t{\n\t\t\t\tString defaultCopyrightStatus = (String) state.getAttribute(DEFAULT_COPYRIGHT);\n\t\t\t\tif(defaultCopyrightStatus == null || defaultCopyrightStatus.trim().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tdefaultCopyrightStatus = ServerConfigurationService.getString(\"default.copyright\");\n\t\t\t\t\tstate.setAttribute(DEFAULT_COPYRIGHT, defaultCopyrightStatus);\n\t\t\t\t}\n\n\t\t\t\tString encoding = data.getRequest().getCharacterEncoding();\n\n\t\t\t\tTime defaultRetractDate = (Time) state.getAttribute(STATE_DEFAULT_RETRACT_TIME);\n\t\t\t\tif(defaultRetractDate == null)\n\t\t\t\t{\n\t\t\t\t\tdefaultRetractDate = TimeService.newTime();\n\t\t\t\t\tstate.setAttribute(STATE_DEFAULT_RETRACT_TIME, defaultRetractDate);\n\t\t\t\t}\n\n\t\t\t\titems = newEditItems(collectionId, itemType, encoding, defaultCopyrightStatus, preventPublicDisplay.booleanValue(), defaultRetractDate, CREATE_MAX_ITEMS);\n\n\t\t\t}\n\t\t\tcurrent_stack_frame.put(STATE_STACK_CREATE_ITEMS, items);\n\t\t\tIterator it = items.iterator();\n\t\t\twhile(it.hasNext())\n\t\t\t{\n\t\t\t\tEditItem item = (EditItem) it.next();\n\t\t\t\titem.clearMissing();\n\t\t\t}\n\t\t\tstate.removeAttribute(STATE_MESSAGE);\n\t\t}\n\t\telse if(flow.equals(\"create\") && TYPE_FOLDER.equals(itemType))\n\t\t{\n\t\t\t// Get the items\n\t\t\tcaptureMultipleValues(state, params, true);\n\t\t\talerts = (Set) state.getAttribute(STATE_CREATE_ALERTS);\n\t\t\tif(alerts.isEmpty())\n\t\t\t{\n\t\t\t\t// Save the items\n\t\t\t\tcreateFolders(state);\n\t\t\t\talerts = (Set) state.getAttribute(STATE_CREATE_ALERTS);\n\n\t\t\t\tif(alerts.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tpop = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if(flow.equals(\"create\") && TYPE_UPLOAD.equals(itemType))\n\t\t{\n\t\t\tcaptureMultipleValues(state, params, true);\n\t\t\talerts = (Set) state.getAttribute(STATE_CREATE_ALERTS);\n\t\t\tif(alerts.isEmpty())\n\t\t\t{\n\t\t\t\tcreateFiles(state);\n\t\t\t\talerts = (Set) state.getAttribute(STATE_CREATE_ALERTS);\n\t\t\t\tif(alerts.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tpop = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if(flow.equals(\"create\") && MIME_TYPE_DOCUMENT_HTML.equals(itemType))\n\t\t{\n\t\t\tcaptureMultipleValues(state, params, true);\n\t\t\talerts = (Set) state.getAttribute(STATE_CREATE_ALERTS);\n\t\t\tif(alerts.isEmpty())\n\t\t\t{\n\t\t\t\tcreateFiles(state);\n\t\t\t\talerts = (Set) state.getAttribute(STATE_CREATE_ALERTS);\n\t\t\t\tif(alerts.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tpop = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if(flow.equals(\"create\") && MIME_TYPE_DOCUMENT_PLAINTEXT.equals(itemType))\n\t\t{\n\t\t\tcaptureMultipleValues(state, params, true);\n\t\t\talerts = (Set) state.getAttribute(STATE_CREATE_ALERTS);\n\t\t\tif(alerts.isEmpty())\n\t\t\t{\n\t\t\t\tcreateFiles(state);\n\t\t\t\talerts = (Set) state.getAttribute(STATE_CREATE_ALERTS);\n\t\t\t\tif(alerts.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tpop =true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if(flow.equals(\"create\") && TYPE_URL.equals(itemType))\n\t\t{\n\t\t\tcaptureMultipleValues(state, params, true);\n\t\t\talerts = (Set) state.getAttribute(STATE_CREATE_ALERTS);\n\t\t\tif(alerts.isEmpty())\n\t\t\t{\n\t\t\t\tcreateUrls(state);\n\t\t\t\talerts = (Set) state.getAttribute(STATE_CREATE_ALERTS);\n\t\t\t\tif(alerts.isEmpty())\n\t\t\t\t{\n\t\t\t\t\tpop = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n//\t\telse if(flow.equals(\"create\") && TYPE_FORM.equals(itemType))\n//\t\t{\n//\t\t\tcaptureMultipleValues(state, params, true);\n//\t\t\talerts = (Set) state.getAttribute(STATE_CREATE_ALERTS);\n//\t\t\tif(alerts == null)\n//\t\t\t{\n//\t\t\t\talerts = new HashSet();\n//\t\t\t\tstate.setAttribute(STATE_CREATE_ALERTS, alerts);\n//\t\t\t}\n//\t\t\tif(alerts.isEmpty())\n//\t\t\t{\n//\t\t\t\tcreateStructuredArtifacts(state);\n//\t\t\t\talerts = (Set) state.getAttribute(STATE_CREATE_ALERTS);\n//\t\t\t\tif(alerts.isEmpty())\n//\t\t\t\t{\n//\t\t\t\t\tpop = true;\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n\t\telse if(flow.equals(\"create\"))\n\t\t{\n\t\t\tcaptureMultipleValues(state, params, true);\n\t\t\talerts = (Set) state.getAttribute(STATE_CREATE_ALERTS);\n\t\t\tif(alerts == null)\n\t\t\t{\n\t\t\t\talerts = new HashSet();\n\t\t\t\tstate.setAttribute(STATE_CREATE_ALERTS, alerts);\n\t\t\t}\n\t\t\talerts.add(\"Invalid item type\");\n\t\t\tstate.setAttribute(STATE_CREATE_ALERTS, alerts);\n\t\t}\n\t\telse if(flow.equals(\"updateDocType\"))\n\t\t{\n\t\t\t// captureMultipleValues(state, params, false);\n\t\t\tString formtype = params.getString(\"formtype\");\n\t\t\tif(formtype == null || formtype.equals(\"\"))\n\t\t\t{\n\t\t\t\talerts.add(\"Must select a form type\");\n\t\t\t\tmissing.add(\"formtype\");\n\t\t\t}\n\t\t\tcurrent_stack_frame.put(STATE_STACK_STRUCTOBJ_TYPE, formtype);\n\t\t\t//setupStructuredObjects(state);\n\t\t}\n\t\telse if(flow.equals(\"addInstance\"))\n\t\t{\n\t\t\tcaptureMultipleValues(state, params, false);\n\t\t\tString field = params.getString(\"field\");\n\t\t\tList new_items = (List) current_stack_frame.get(STATE_STACK_CREATE_ITEMS);\n\t\t\tif(new_items == null)\n\t\t\t{\n\t\t\t\tString defaultCopyrightStatus = (String) state.getAttribute(DEFAULT_COPYRIGHT);\n\t\t\t\tif(defaultCopyrightStatus == null || defaultCopyrightStatus.trim().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tdefaultCopyrightStatus = ServerConfigurationService.getString(\"default.copyright\");\n\t\t\t\t\tstate.setAttribute(DEFAULT_COPYRIGHT, defaultCopyrightStatus);\n\t\t\t\t}\n\n\t\t\t\tString encoding = data.getRequest().getCharacterEncoding();\n\t\t\t\t\n\t\t\t\tTime defaultRetractDate = (Time) state.getAttribute(STATE_DEFAULT_RETRACT_TIME);\n\t\t\t\tif(defaultRetractDate == null)\n\t\t\t\t{\n\t\t\t\t\tdefaultRetractDate = TimeService.newTime();\n\t\t\t\t\tstate.setAttribute(STATE_DEFAULT_RETRACT_TIME, defaultRetractDate);\n\t\t\t\t}\n\n\t\t\t\tnew_items = newEditItems(collectionId, itemType, encoding, defaultCopyrightStatus, preventPublicDisplay.booleanValue(), defaultRetractDate, CREATE_MAX_ITEMS);\n\n\t\t\t\tcurrent_stack_frame.put(STATE_STACK_CREATE_ITEMS, new_items);\n\n\t\t\t}\n\t\t\tEditItem item = (EditItem) new_items.get(0);\n\t\t\taddInstance(field, item.getProperties());\n\t\t\tResourcesMetadata form = item.getForm();\n\t\t\tList flatList = form.getFlatList();\n\t\t\titem.setProperties(flatList);\n\t\t}\n\t\telse if(flow.equals(\"linkResource\") && TYPE_FORM.equals(itemType))\n\t\t{\n\t\t\tcaptureMultipleValues(state, params, false);\n\t\t\tcreateLink(data, state);\n\t\t\t\n\t\t}\n\t\telse if(flow.equals(\"showOptional\"))\n\t\t{\n\t\t\tcaptureMultipleValues(state, params, false);\n\t\t\tint twiggleNumber = params.getInt(\"twiggleNumber\", 0);\n\t\t\tString metadataGroup = params.getString(\"metadataGroup\");\n\t\t\tList new_items = (List) current_stack_frame.get(STATE_STACK_CREATE_ITEMS);\n\t\t\tif(new_items == null)\n\t\t\t{\n\t\t\t\tString defaultCopyrightStatus = (String) state.getAttribute(DEFAULT_COPYRIGHT);\n\t\t\t\tif(defaultCopyrightStatus == null || defaultCopyrightStatus.trim().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tdefaultCopyrightStatus = ServerConfigurationService.getString(\"default.copyright\");\n\t\t\t\t\tstate.setAttribute(DEFAULT_COPYRIGHT, defaultCopyrightStatus);\n\t\t\t\t}\n\n\t\t\t\tString encoding = data.getRequest().getCharacterEncoding();\n\n\t\t\t\tTime defaultRetractDate = (Time) state.getAttribute(STATE_DEFAULT_RETRACT_TIME);\n\t\t\t\tif(defaultRetractDate == null)\n\t\t\t\t{\n\t\t\t\t\tdefaultRetractDate = TimeService.newTime();\n\t\t\t\t\tstate.setAttribute(STATE_DEFAULT_RETRACT_TIME, defaultRetractDate);\n\t\t\t\t}\n\n\t\t\t\tnew_items = newEditItems(collectionId, itemType, encoding, defaultCopyrightStatus, preventPublicDisplay.booleanValue(), defaultRetractDate, CREATE_MAX_ITEMS);\n\t\t\t\tcurrent_stack_frame.put(STATE_STACK_CREATE_ITEMS, new_items);\n\n\t\t\t}\n\t\t\tif(new_items != null && new_items.size() > twiggleNumber)\n\t\t\t{\n\t\t\t\tEditItem item = (EditItem) new_items.get(twiggleNumber);\n\t\t\t\tif(item != null)\n\t\t\t\t{\n\t\t\t\t\titem.showMetadataGroup(metadataGroup);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// clear display of error messages\n\t\t\tstate.setAttribute(STATE_CREATE_ALERTS, new HashSet());\n\t\t\tIterator it = new_items.iterator();\n\t\t\twhile(it.hasNext())\n\t\t\t{\n\t\t\t\tEditItem item = (EditItem) it.next();\n\t\t\t\titem.clearMissing();\n\t\t\t}\n\t\t}\n\t\telse if(flow.equals(\"hideOptional\"))\n\t\t{\n\t\t\tcaptureMultipleValues(state, params, false);\n\t\t\tint twiggleNumber = params.getInt(\"twiggleNumber\", 0);\n\t\t\tString metadataGroup = params.getString(\"metadataGroup\");\n\t\t\tList new_items = (List) current_stack_frame.get(STATE_STACK_CREATE_ITEMS);\n\t\t\tif(new_items == null)\n\t\t\t{\n\t\t\t\tString defaultCopyrightStatus = (String) state.getAttribute(DEFAULT_COPYRIGHT);\n\t\t\t\tif(defaultCopyrightStatus == null || defaultCopyrightStatus.trim().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tdefaultCopyrightStatus = ServerConfigurationService.getString(\"default.copyright\");\n\t\t\t\t\tstate.setAttribute(DEFAULT_COPYRIGHT, defaultCopyrightStatus);\n\t\t\t\t}\n\n\t\t\t\tString encoding = data.getRequest().getCharacterEncoding();\n\n\t\t\t\tTime defaultRetractDate = (Time) state.getAttribute(STATE_DEFAULT_RETRACT_TIME);\n\t\t\t\tif(defaultRetractDate == null)\n\t\t\t\t{\n\t\t\t\t\tdefaultRetractDate = TimeService.newTime();\n\t\t\t\t\tstate.setAttribute(STATE_DEFAULT_RETRACT_TIME, defaultRetractDate);\n\t\t\t\t}\n\n\t\t\t\tnew_items = newEditItems(collectionId, itemType, encoding, defaultCopyrightStatus, preventPublicDisplay.booleanValue(), defaultRetractDate, CREATE_MAX_ITEMS);\n\t\t\t\tcurrent_stack_frame.put(STATE_STACK_CREATE_ITEMS, new_items);\n\t\t\t}\n\t\t\tif(new_items != null && new_items.size() > twiggleNumber)\n\t\t\t{\n\t\t\t\tEditItem item = (EditItem) new_items.get(twiggleNumber);\n\t\t\t\tif(item != null)\n\t\t\t\t{\n\t\t\t\t\titem.hideMetadataGroup(metadataGroup);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// clear display of error messages\n\t\t\tstate.setAttribute(STATE_CREATE_ALERTS, new HashSet());\n\t\t\tIterator it = new_items.iterator();\n\t\t\twhile(it.hasNext())\n\t\t\t{\n\t\t\t\tEditItem item = (EditItem) it.next();\n\t\t\t\titem.clearMissing();\n\t\t\t}\n\t\t}\n\n\t\talerts = (Set) state.getAttribute(STATE_CREATE_ALERTS);\n\t\tif(alerts == null)\n\t\t{\n\t\t\talerts = new HashSet();\n\t\t\tstate.setAttribute(STATE_CREATE_ALERTS, alerts);\n\t\t}\n\t\t\n\t\tIterator alertIt = alerts.iterator();\n\t\twhile(alertIt.hasNext())\n\t\t{\n\t\t\tString alert = (String) alertIt.next();\n\t\t\taddCreateContextAlert(state, alert);\n\t\t\t//addAlert(state, alert);\n\t\t}\n\t\talerts.clear();\n\t\tcurrent_stack_frame.put(STATE_CREATE_MISSING_ITEM, missing);\n\n\t\tif(pop)\n\t\t{\n\t\t\tList new_items = (List) current_stack_frame.get(ResourcesAction.STATE_HELPER_NEW_ITEMS);\n\t\t\tString helper_changed = (String) state.getAttribute(STATE_HELPER_CHANGED);\n\t\t\tif(Boolean.TRUE.toString().equals(helper_changed))\n\t\t\t{\n\t\t\t\t// get list of attachments?\n\t\t\t\tif(new_items != null)\n\t\t\t\t{\n\t\t\t\t\tList attachments = (List) state.getAttribute(STATE_ATTACHMENTS);\n\t\t\t\t\tif(attachments == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tattachments = EntityManager.newReferenceList();\n\t\t\t\t\t\tstate.setAttribute(STATE_ATTACHMENTS, attachments);\n\t\t\t\t\t}\n\t\t\t\t\tIterator it = new_items.iterator();\n\t\t\t\t\twhile(it.hasNext())\n\t\t\t\t\t{\n\t\t\t\t\t\tAttachItem item = (AttachItem) it.next();\n\t\t\t\t\t\ttry \n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\tContentResource resource = ContentHostingService.getResource(item.getId());\n\t\t\t\t\t\t\tif (checkSelctItemFilter(resource, state))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tattachments.add(resource.getReference());\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\tit.remove();\n\t\t\t\t\t\t\t\taddAlert(state, (String) rb.getFormattedMessage(\"filter\", new Object[]{item.getDisplayName()}));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} \n\t\t\t\t\t\tcatch (PermissionException e) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\taddAlert(state, (String) rb.getFormattedMessage(\"filter\", new Object[]{item.getDisplayName()}));\n\t\t\t\t\t\t} \n\t\t\t\t\t\tcatch (IdUnusedException e) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\taddAlert(state, (String) rb.getFormattedMessage(\"filter\", new Object[]{item.getDisplayName()}));\n\t\t\t\t\t\t} \n\t\t\t\t\t\tcatch (TypeException e) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\taddAlert(state, (String) rb.getFormattedMessage(\"filter\", new Object[]{item.getDisplayName()}));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tReference ref = EntityManager.newReference(ContentHostingService.getReference(item.getId()));\n\n\t\t }\n\t\t\t\t}\n\t\t\t}\n\t\t\tpopFromStack(state);\n\t\t\tresetCurrentMode(state);\n\n\t\t\tif(!ResourcesAction.isStackEmpty(state) && new_items != null)\n\t\t\t{\n\t\t\t\tcurrent_stack_frame = peekAtStack(state);\n\t\t\t\tList old_items = (List) current_stack_frame.get(STATE_HELPER_NEW_ITEMS);\n\t\t\t\tif(old_items == null)\n\t\t\t\t{\n\t\t\t\t\told_items = new Vector();\n\t\t\t\t\tcurrent_stack_frame.put(STATE_HELPER_NEW_ITEMS, old_items);\n\t\t\t\t}\n\t\t\t\told_items.addAll(new_items);\n\t\t\t}\n\t\t}\n\n\t}", "public void createItemInInventory(Item newItem) {\n\t\tinventory.createItem(newItem);\n\t}", "ItemStack addPage(ItemStack itemstack, ItemStack page, float x, float y);", "public abstract List<String> getInventory();", "@Test\n public void testGetInventoryQueryAction() throws ClientException, IOException, ProcessingException {\n CloudResponse response = this.actions.getInventoryQueryAction(\"{productId}\", \"{scope}\", -1, -1);\n List<Integer> expectedResults = Arrays.asList(200, 400);\n LOG.info(\"Got status {}\", response.getStatusLine());\n Assert.assertTrue(expectedResults.contains(response.getStatusLine().getStatusCode()));\n\n if(response.getStatusLine().getStatusCode() == 200) {\n this.actions.checkResponseJSONSchema(\"#/definitions/PagedResponseInventoryItem\", response.getContent());\n }\n if(response.getStatusLine().getStatusCode() == 400) {\n this.actions.checkResponseJSONSchema(\"#/definitions/ErrorResponse\", response.getContent());\n }\n \n }", "public Action getIndexApiAction() {\n Thing object = new Thing.Builder()\n .setName(\"ListTest Page\") // TODO: Define a title for the content shown.\n // TODO: Make sure this auto-generated URL is correct.\n .setUrl(Uri.parse(\"http://[ENTER-YOUR-URL-HERE]\"))\n .build();\n return new Action.Builder(Action.TYPE_VIEW)\n .setObject(object)\n .setActionStatus(Action.STATUS_TYPE_COMPLETED)\n .build();\n }", "List<InventoryItem> getInventory(int appId);", "@Override\r\n\tpublic void run(IAction action) {\r\n\r\n\t\ttry {\r\n\t\t\tif (MigrationGoalsContainer.INSTANCE.getMigrationGoals() == null){\r\n\t\t\t\tMessageDialog.openWarning(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), \"Warning\", \"Please load the Migration Goals before opening the Inventory View\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t//Load the model for the selected file and open the inventory view. \r\n\t\t\t\tComponentModelQuery.INSTANCE.loadModel(selectedFile);\r\n\t\t\t\tif (window.getActivePage().findView(InventoryView.ID) != null) {\r\n\t\t\t\t\twindow.getActivePage().hideView(window.getActivePage().findView(InventoryView.ID));\r\n\t\t\t\t}\r\n\t\t\t\twindow.getActivePage().showView(InventoryView.ID);\r\n\t\t\t}\r\n\t\t} catch (PartInitException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\t//TODO: HANDLE THIS\r\n\t\t}\r\n\t}", "public void onInventoryClick(View v) {\n // Launch Inventory activity\n onAnyClick(Inventory.class);\n }", "@RequestMapping(method = RequestMethod.POST, produces = \"application/json\", headers = \"Accept=application/json\" )\n public ResponseEntity<?> createInventory(@Valid @RequestBody InventoryRequest inventoryRequest){\n Product product = productService.getProductById(inventoryRequest.getProductId());\n\n //Criando produto no estoque\n Inventory inventory = inventoryService.createInventoryItem(new Inventory(inventoryRequest.getAmount()));\n product.setInventory(inventory);\n inventory.setProduct(product);\n\n //Atualizando associações entre estoque e produto\n inventoryService.updateInventoryItem(inventory);\n\n return ResponseEntity.status(HttpStatus.CREATED).build();\n }", "public Inventory() {\n this.SIZE = DEFAULT_SIZE;\n this.ITEMS = new ArrayList<>();\n }", "public void inventoryPrint() {\n System.out.println(\"Artifact Name: \" + name);\r\n System.out.println(\"Desc:\" + description);\r\n System.out.println(\"Value: \" + value);\r\n System.out.println(\"Mobility: \" + mobility); \r\n }", "@Test\n\tpublic void testAddInventory() throws InventoryException {\n\t\tcoffeeMaker.addInventory(\"4\",\"7\",\"0\",\"9\");\n\t}", "public void postInventory(String Name) throws SQLException {\r\n dataAccess = new Connection_SQL(\"jdbc:mysql://localhost:3306/items\", \"root\", \"P@ssword123\");\r\n dataAccess.archiveInventory(Name);\r\n try {\r\n new Inventory_Table();\r\n } catch (SQLException throwable) {\r\n throwable.printStackTrace();\r\n }\r\n }", "@Override\n @RequiresPermissions(\"em.emtype.query\")\n public void index() {\n List<EmType> list = EmType.dao.list();\n \n setAttr(\"list\", JsonKit.toJson(list));\n render(\"equipment_type_list.jsp\");\n }", "List<InventoryItem> getInventory(String username, int appId);", "private void listNewItem(String gtin, String name) {\n\t\ttry {\n\t\t\tURL url = new URL(\"https://api.outpan.com/v2/products/\" + gtin + \"/name\"\n\t\t\t\t\t+ \"?apikey=e13a9fb0bda8684d72bc3dba1b16ae1e\");\n\n\t\t\tHttpsURLConnection httpCon = (HttpsURLConnection) url.openConnection();\n\t\t\thttpCon.setDoOutput(true);\n\t\t\thttpCon.setRequestMethod(\"POST\");\n\t\t\t\n\t\t\t//replaces umlauts, ß, \", ' and / \n\t\t\tname = IllegalStringReplacer.replaceIllegalChars(name);\n\n\t\t\tString content = \"name=\" + name;\n\t\t\tDataOutputStream out = new DataOutputStream(httpCon.getOutputStream());\n\n\t\t\tout.writeBytes(content);\n\t\t\tout.flush();\n\n\t\t\tlog.debug(httpCon.getResponseCode() + \" - \" + httpCon.getResponseMessage());\n\t\t\tout.close();\n\n\t\t\tif (httpCon.getResponseCode() == 200) {\n\t\t\t\tAlert alert = Alerter.getAlert(AlertType.INFORMATION, \"Item Added\", null, \"Item is now listed.\");\n\t\t\t\talert.showAndWait();\n\t\t\t\tlog.info(\"Item '\" + name + \"' now listed\");\n\n\t\t\t\taddItem(gtin);\n\t\t\t} else {\n\t\t\t\tlog.debug(\"Item could not be listed\");\n\t\t\t\tAlert alert = Alerter.getAlert(AlertType.WARNING, \"Item not Added\", null,\n\t\t\t\t\t\t\"Item could not be listed, please try again.\");\n\t\t\t\talert.showAndWait();\n\t\t\t}\n\n\t\t} catch (MalformedURLException e) {\n\t\t\tlog.error(\"MalformedURLException: \" + e.getMessage());\n\t\t} catch (IOException e) {\n\t\t\tlog.error(\"IOException: \" + e.getMessage());\n\t\t}\n\t}", "public void retrieveCardInventoryList() {\n try {\n systemResultViewUtil.setCardInventoryDataBeansList(cardInventoryTransformerBean.retrieveAllCardInventory());\n System.out.println(\"Retrive CardInventory Successfully\");\n } catch (Exception e) {\n System.out.println(e);\n System.out.println(\"Error in Retrive CardInventory\");\n }\n }", "@EventHandler(ignoreCancelled = true)\n public void onInventoryClick(@NotNull InventoryClickEvent event) {\n if (!(event.getInventory().getHolder() instanceof Gui)) {\n return;\n }\n\n Gui gui = (Gui) event.getInventory().getHolder();\n Consumer<InventoryClickEvent> onOutsideClick = gui.getOnOutsideClick();\n\n if (onOutsideClick != null && event.getClickedInventory() == null) {\n onOutsideClick.accept(event);\n return;\n }\n\n Consumer<InventoryClickEvent> onGlobalClick = gui.getOnGlobalClick();\n\n if (onGlobalClick != null) {\n onGlobalClick.accept(event);\n }\n\n InventoryView view = event.getView();\n Inventory inventory = Gui.getInventory(view, event.getRawSlot());\n\n if (inventory == null) {\n return;\n }\n\n Consumer<InventoryClickEvent> onTopClick = gui.getOnTopClick();\n\n if (onTopClick != null && inventory.equals(view.getTopInventory())) {\n onTopClick.accept(event);\n }\n\n Consumer<InventoryClickEvent> onBottomClick = gui.getOnBottomClick();\n\n if (onBottomClick != null && inventory.equals(view.getBottomInventory())) {\n onBottomClick.accept(event);\n }\n\n if ((inventory.equals(view.getBottomInventory()) && gui.getState() == Gui.State.TOP) ||\n event.getCurrentItem() == null) {\n return;\n }\n\n List<Pane> panes = gui.getPanes();\n\n //loop through the panes reverse, because the pane with the highest priority (last in list) is most likely to have the correct item\n for (int i = panes.size() - 1; i >= 0; i--) {\n if (panes.get(i).click(gui, event, 0, 0, 9, gui.getRows() + 4))\n break;\n }\n }", "InventoryItem getInventoryItem();", "@Override\n public List<UpdatableItem> createPopup() {\n final List<UpdatableItem> items = new ArrayList<UpdatableItem>();\n \n /* host wizard */\n final MyMenuItem newHostWizardItem =\n new MyMenuItem(Tools.getString(\"EmptyBrowser.NewHostWizard\"),\n HOST_ICON,\n null,\n new AccessMode(ConfigData.AccessType.RO, false),\n new AccessMode(ConfigData.AccessType.RO, false)) {\n private static final long serialVersionUID = 1L;\n \n @Override\n public String enablePredicate() {\n return null;\n }\n \n @Override\n public void action() {\n final AddHostDialog dialog = new AddHostDialog(new Host());\n dialog.showDialogs();\n }\n };\n items.add(newHostWizardItem);\n Tools.getGUIData().registerAddHostButton(newHostWizardItem);\n return items;\n }", "@FXML\r\n private void addPartAction() throws IOException {\r\n \r\n generateScreen(\"AddModifyPartScreen.fxml\",\"Add Part\");\r\n updatePartsTable(stock.getAllParts());\r\n \r\n }", "public void addItem(String i) {\n\t\tItem item = Item.getItem(ItemList, i);\n\t Inventory.add(item);\n\t inventoryList.getItems().add(i);\n\n\t}", "@Override\n void accept(T inventoryEvent, IView view);", "public static void createItem(String inputCommand) {\r\n\t\tString[] value = inputCommand.split(\" \");\r\n\t\tif(value.length == 4 && \"create\".equalsIgnoreCase(value[0])) {\r\n\t\t\tInventory inventory = new Inventory();\r\n\t\t\tinventory.setItemName(value[1]);\r\n\t\t\tinventory.setItemCostPrice(Double.parseDouble(value[2]));\r\n\t\t\tinventory.setItemSellPrice(Double.parseDouble(value[3]));\r\n\t\t\tinventoryList.put(value[1], inventory);\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Entered wrong input command\");\r\n\t\t}\r\n\t}", "public abstract void setTabUI(Inventory inventory);", "public PageInventory withItems(Collection<ItemStack> items)\n {\n this.contents.addAll(items);\n this.recalculate();\n return this;\n }", "public void clickAddTopping(int itemIndex, ItemCart item);", "@Override\n public void onInventoryClick(InventoryClickEvent event) {\n // Do nothing here\n }", "private void createNewListSection() {\n\t\tImageIcon image10 = new ImageIcon(sURLFCL1);\n\t\tImageIcon image11 = new ImageIcon(sURLFCL2);\n\t\tImageIcon image12 = new ImageIcon(sURLFCL3);\n\t\tjbCreateLists = new JButton(\"New PlayList\");\n\t\tjbCreateLists.setFont(new java.awt.Font(\"Century Gothic\",0, 15));\n\t\tjbCreateLists.setForeground(new Color(150,100,100));\n\t\tjbCreateLists.setIcon(image10);\n\t\tjbCreateLists.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\tjbCreateLists.setVerticalTextPosition(SwingConstants.CENTER);\n\t\tjbCreateLists.setRolloverIcon(image11);\n\t\tjbCreateLists.setRolloverSelectedIcon(image12);\t\n\t\tjbCreateLists.setContentAreaFilled(false);\n\t\tjbCreateLists.setFocusable(false);\n\t\tjbCreateLists.setBorderPainted(false);\n\t}", "public void openInventory ( InventoryView inventory ) {\n\t\texecute ( handle -> handle.openInventory ( inventory ) );\n\t}", "@EventHandler\n public void onInventoryClick(InventoryClickEvent e) {\n // Check if it is one of our inventories\n if (!(e.getInventory().getHolder() instanceof InventoryEvent)) return;\n\n // Cancel the event so the player can't take the item\n e.setCancelled(true);\n\n // Check if it was air or null\n if (e.getCurrentItem() == null || e.getCurrentItem().getType() == Material.AIR) return;\n\n // Get the sign in progress\n ShopSign cur = null;\n for( ShopSign sign : signs) {\n if(sign.owner.equalsIgnoreCase(e.getWhoClicked().getUniqueId().toString())) {\n cur = sign;\n break;\n }\n }\n\n // Check if cur is null\n if(cur == null) {\n return;\n }\n\n // Check if the sign is done\n if(cur.done) {\n return;\n }\n\n // Set the can remove flag to true\n can_remove = true;\n\n // Get the player\n HumanEntity player = e.getWhoClicked();\n\n // Get the inventory that was clicked\n Inventory inv = clone_inv(e.getClickedInventory(), e.getView().getTitle());\n\n // Get the clicked item\n ItemStack clicked = e.getCurrentItem();\n ItemMeta clicked_meta = clicked.getItemMeta();\n\n // Check if it was exit\n if(clicked_meta.getDisplayName().equalsIgnoreCase(\"exit\") && e.getRawSlot() == 0) {\n // Remove the in progress sign\n signs.remove(cur);\n\n e.getWhoClicked().closeInventory();\n return;\n }\n\n // Make sure it's not removed when switching the UI\n can_remove = false;\n\n // Check if it was to proceed\n if(clicked_meta.getDisplayName().equalsIgnoreCase(\"next\") && e.getRawSlot() == 8) {\n if(e.getView().getTitle().equalsIgnoreCase(\"Item Amount\")) {\n player.openInventory(itemPrice);\n } else {\n player.sendMessage(\"Now right click on a chest to select it!\");\n player.closeInventory();\n }\n return;\n }\n\n // Check if it is buying or selling\n else if(e.getView().getTitle().equalsIgnoreCase(\"Selling or Buying\")) {\n // If it was selling\n if(clicked_meta.getDisplayName().equalsIgnoreCase(\"Buy\") && e.getRawSlot() == 5) {\n cur.selling = false;\n }\n // If it was buying\n else if(clicked_meta.getDisplayName().equalsIgnoreCase(\"Sell\") && e.getRawSlot() == 3) {\n cur.selling = true;\n }\n\n inv = clone_inv(itemAmount, \"Item Amount\");\n inv.setItem(4, cur.item);\n player.openInventory(inv);\n }\n\n // Check if it was an increase or decrease in amount\n else if(e.getView().getTitle().equalsIgnoreCase(\"Item Amount\")) {\n // If it was green wool\n if(clicked_meta.getDisplayName().equalsIgnoreCase(\"More\") && e.getRawSlot() == 5) {\n // Make sure were not at the max stack size\n if(cur.item.getAmount() == cur.item.getMaxStackSize()) {\n return;\n }\n\n // Add one to the amount of the in progress sign\n cur.item.setAmount(cur.item.getAmount()+1);\n\n // Update the ui\n inv.setItem(4, cur.item);\n player.openInventory(inv);\n return;\n }\n\n // If it was red wool\n else if(clicked_meta.getDisplayName().equalsIgnoreCase(\"Less\") && e.getRawSlot() == 3) {\n // Make sure were not at the stack minimum\n if(cur.item.getAmount() == 1) {\n return;\n }\n\n // Subtract one from the amount of the in progress sign\n cur.item.setAmount(cur.item.getAmount()-1);\n\n // Update the ui\n inv.setItem(4, cur.item);\n player.openInventory(inv);\n return;\n }\n }\n\n // Check if we are changing the price\n else if(e.getView().getTitle().equalsIgnoreCase(\"Item Price\")) {\n // If it was green wool\n if(clicked_meta.getDisplayName().equalsIgnoreCase(\"More\") && e.getRawSlot() == 5) {\n // Make sure were not at the max stack size\n if(cur.price == 64) {\n return;\n }\n\n // Add one to the amount of the in progress sign\n cur.price++;\n\n // Update the ui\n inv.setItem(4, new ItemStack(Material.GOLD_INGOT, cur.price));\n player.openInventory(inv);\n return;\n }\n\n // If it was red wool\n else if(clicked_meta.getDisplayName().equalsIgnoreCase(\"Less\") && e.getRawSlot() == 3) {\n // Make sure were not at the stack minimum\n if(cur.price == 1) {\n return;\n }\n\n // Subtract one from the amount of the in progress sign\n cur.price--;\n\n // Update the ui\n inv.setItem(4, new ItemStack(Material.GOLD_INGOT, cur.price));\n player.openInventory(inv);\n return;\n }\n }\n\n // Allow removal again\n can_remove = true;\n }", "@EventHandler(ignoreCancelled = true)\n public void onPageThreeTerminalClick(InventoryClickEvent event) {\n Inventory inv = event.getInventory();\n String name = inv.getTitle();\n if (name.equals(\"§4Even More Presets\")) {\n event.setCancelled(true);\n int slot = event.getRawSlot();\n final Player player = (Player) event.getWhoClicked();\n if (slot >= 0 && slot < 54) {\n ItemStack is = inv.getItem(slot);\n if (is != null) {\n // get the TARDIS the player is in\n HashMap<String, Object> wheres = new HashMap<String, Object>();\n wheres.put(\"uuid\", player.getUniqueId().toString());\n ResultSetTravellers rst = new ResultSetTravellers(plugin, wheres, false);\n if (rst.resultSet()) {\n int id = rst.getTardis_id();\n HashMap<String, Object> where = new HashMap<String, Object>();\n where.put(\"tardis_id\", id);\n ResultSetTardis rs = new ResultSetTardis(plugin, where, \"\", false, 0);\n if (rs.resultSet()) {\n Tardis tardis = rs.getTardis();\n String last_line = TARDISStaticUtils.getLastLine(tardis.getChameleon());\n final boolean bool = tardis.isChamele_on();\n final boolean adapt = tardis.isAdapti_on();\n String preset = tardis.getPreset().toString();\n HashMap<String, Object> set = new HashMap<String, Object>();\n HashMap<String, Object> set_oo = new HashMap<String, Object>();\n QueryFactory qf = new QueryFactory(plugin);\n HashMap<String, Object> wherec = new HashMap<String, Object>();\n wherec.put(\"tardis_id\", id);\n switch (slot) {\n case 0:\n // toggle chameleon circuit\n String onoff;\n String engage;\n int oo;\n if (tardis.isChamele_on()) {\n onoff = ChatColor.RED + plugin.getLanguage().getString(\"SET_OFF\");\n engage = plugin.getLanguage().getString(\"SET_ON\");\n oo = 0;\n } else {\n onoff = ChatColor.GREEN + plugin.getLanguage().getString(\"SET_ON\");\n engage = plugin.getLanguage().getString(\"SET_OFF\");\n oo = 1;\n }\n ItemMeta im = is.getItemMeta();\n im.setLore(Arrays.asList(onoff, String.format(plugin.getLanguage().getString(\"CHAM_CLICK\"), engage)));\n is.setItemMeta(im);\n // set sign text\n TARDISStaticUtils.setSign(tardis.getChameleon(), 2, onoff, player);\n set_oo.put(\"chamele_on\", oo);\n break;\n case 2:\n player.performCommand(\"tardis rebuild\");\n close(player);\n if (plugin.getConfig().getBoolean(\"circuits.damage\") && !plugin.getDifficulty().equals(DIFFICULTY.EASY) && plugin.getConfig().getInt(\"circuits.uses.chameleon\") > 0) {\n TARDISCircuitChecker tcc = new TARDISCircuitChecker(plugin, id);\n tcc.getCircuits();\n // decrement uses\n int uses_left = tcc.getChameleonUses();\n new TARDISCircuitDamager(plugin, DISK_CIRCUIT.CHAMELEON, uses_left, id, player).damage();\n }\n break;\n case 4:\n // toggle biome adaption\n String biome;\n String to_turn;\n int ba;\n if (tardis.isAdapti_on()) {\n biome = ChatColor.RED + plugin.getLanguage().getString(\"SET_OFF\");\n to_turn = plugin.getLanguage().getString(\"SET_ON\");\n ba = 0;\n } else {\n biome = ChatColor.GREEN + plugin.getLanguage().getString(\"SET_ON\");\n to_turn = plugin.getLanguage().getString(\"SET_OFF\");\n ba = 1;\n }\n ItemMeta bio = is.getItemMeta();\n bio.setLore(Arrays.asList(biome, String.format(plugin.getLanguage().getString(\"CHAM_CLICK\"), to_turn)));\n is.setItemMeta(bio);\n set_oo.put(\"adapti_on\", ba);\n break;\n case 8:\n // page one\n close(player);\n plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n @Override\n public void run() {\n TARDISChameleonInventory tci = new TARDISChameleonInventory(plugin, bool, adapt);\n ItemStack[] items = tci.getTerminal();\n Inventory chaminv = plugin.getServer().createInventory(player, 54, \"§4Chameleon Circuit\");\n chaminv.setContents(items);\n player.openInventory(chaminv);\n }\n }, 2L);\n break;\n case 18:\n // Gazebo\n if (!last_line.equals(\"GAZEBO\")) {\n set.put(\"chameleon_preset\", \"GAZEBO\");\n TARDISStaticUtils.setSign(tardis.getChameleon(), 3, \"GAZEBO\", player);\n }\n TARDISMessage.send(player, \"CHAM_SET\", ChatColor.AQUA + \"Gazebo\");\n break;\n case 20:\n // Apperture Science\n if (!last_line.equals(\"APPERTURE\")) {\n set.put(\"chameleon_preset\", \"APPERTURE\");\n TARDISStaticUtils.setSign(tardis.getChameleon(), 3, \"APPERTURE\", player);\n }\n TARDISMessage.send(player, \"CHAM_SET\", ChatColor.AQUA + \"Apperture Science\");\n break;\n case 22:\n // Lighthouse\n if (!last_line.equals(\"LIGHTHOUSE\")) {\n set.put(\"chameleon_preset\", \"LIGHTHOUSE\");\n TARDISStaticUtils.setSign(tardis.getChameleon(), 3, \"LIGHTHOUSE\", player);\n }\n TARDISMessage.send(player, \"CHAM_SET\", ChatColor.AQUA + \"Tiny Lighthouse\");\n break;\n case 24:\n // Library\n if (!last_line.equals(\"LIBRARY\")) {\n set.put(\"chameleon_preset\", \"LIBRARY\");\n TARDISStaticUtils.setSign(tardis.getChameleon(), 3, \"LIBRARY\", player);\n }\n TARDISMessage.send(player, \"CHAM_SET\", ChatColor.AQUA + \"Library\");\n break;\n case 26:\n // Snowman\n if (!last_line.equals(\"SNOWMAN\")) {\n set.put(\"chameleon_preset\", \"SNOWMAN\");\n TARDISStaticUtils.setSign(tardis.getChameleon(), 3, \"SNOWMAN\", player);\n }\n TARDISMessage.send(player, \"CHAM_SET\", ChatColor.AQUA + \"Snowman\");\n break;\n case 28:\n // Jail Cell\n if (!last_line.equals(\"JAIL\")) {\n set.put(\"chameleon_preset\", \"JAIL\");\n TARDISStaticUtils.setSign(tardis.getChameleon(), 3, \"JAIL\", player);\n }\n TARDISMessage.send(player, \"CHAM_SET\", ChatColor.AQUA + \"Jail Cell\");\n break;\n case 30:\n // Pandorica\n if (!last_line.equals(\"PANDORICA\")) {\n set.put(\"chameleon_preset\", \"PANDORICA\");\n TARDISStaticUtils.setSign(tardis.getChameleon(), 3, \"PANDORICA\", player);\n }\n TARDISMessage.send(player, \"CHAM_SET\", ChatColor.AQUA + \"Pandorica\");\n break;\n case 32:\n // double helix\n if (!last_line.equals(\"HELIX\")) {\n set.put(\"chameleon_preset\", \"HELIX\");\n TARDISStaticUtils.setSign(tardis.getChameleon(), 3, \"HELIX\", player);\n }\n TARDISMessage.send(player, \"CHAM_SET\", ChatColor.AQUA + \"Double Helix\");\n break;\n case 34:\n // Prismarine\n if (!last_line.equals(\"PRISMARINE\")) {\n set.put(\"chameleon_preset\", \"PRISMARINE\");\n TARDISStaticUtils.setSign(tardis.getChameleon(), 3, \"PRISMARINE\", player);\n }\n TARDISMessage.send(player, \"CHAM_SET\", ChatColor.AQUA + \"Guardian Temple\");\n break;\n case 36:\n // Chorus\n if (!last_line.equals(\"CHORUS\")) {\n set.put(\"chameleon_preset\", \"CHORUS\");\n TARDISStaticUtils.setSign(tardis.getChameleon(), 3, \"CHORUS\", player);\n }\n TARDISMessage.send(player, \"CHAM_SET\", ChatColor.AQUA + \"Chorus Flower\");\n break;\n case 38:\n // Andesite\n if (!last_line.equals(\"ANDESITE\")) {\n set.put(\"chameleon_preset\", \"ANDESITE\");\n TARDISStaticUtils.setSign(tardis.getChameleon(), 3, \"ANDESITE\", player);\n }\n TARDISMessage.send(player, \"CHAM_SET\", ChatColor.AQUA + \"Andesite Box\");\n break;\n case 40:\n // Diorite\n if (!last_line.equals(\"DIORITE\")) {\n set.put(\"chameleon_preset\", \"DIORITE\");\n TARDISStaticUtils.setSign(tardis.getChameleon(), 3, \"DIORITE\", player);\n }\n TARDISMessage.send(player, \"CHAM_SET\", ChatColor.AQUA + \"Diorite Box\");\n break;\n case 42:\n // Granite\n if (!last_line.equals(\"GRANITE\")) {\n set.put(\"chameleon_preset\", \"GRANITE\");\n TARDISStaticUtils.setSign(tardis.getChameleon(), 3, \"GRANITE\", player);\n }\n TARDISMessage.send(player, \"CHAM_SET\", ChatColor.AQUA + \"Granite Box\");\n break;\n case 48:\n // Invisibility\n if (!last_line.equals(\"INVISIBLE\")) {\n // check they have an Invisibility Circuit\n TARDISCircuitChecker tcc = new TARDISCircuitChecker(plugin, id);\n tcc.getCircuits();\n if (!plugin.getDifficulty().equals(DIFFICULTY.EASY)) {\n if (!plugin.getUtils().inGracePeriod(player, false) && !tcc.hasInvisibility()) {\n close(player);\n TARDISMessage.send(player, \"INVISIBILITY_MISSING\");\n break;\n }\n }\n if (plugin.getConfig().getBoolean(\"circuits.damage\") && !plugin.getDifficulty().equals(DIFFICULTY.EASY) && plugin.getConfig().getInt(\"circuits.uses.invisibility\") > 0) {\n // decrement uses\n int uses_left = tcc.getInvisibilityUses();\n new TARDISCircuitDamager(plugin, DISK_CIRCUIT.INVISIBILITY, uses_left, id, player).damage();\n }\n set.put(\"chameleon_preset\", \"INVISIBLE\");\n TARDISStaticUtils.setSign(tardis.getChameleon(), 3, \"INVISIBLE\", player);\n }\n TARDISMessage.send(player, \"CHAM_SET\", ChatColor.AQUA + \"Invisibility\");\n break;\n case 50:\n // constructor GUI\n close(player);\n plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {\n @Override\n public void run() {\n TARDISChameleonConstructorGUI tci = new TARDISChameleonConstructorGUI(plugin);\n ItemStack[] items = tci.getConstruct();\n Inventory chamcon = plugin.getServer().createInventory(player, 54, \"§4Chameleon Construction\");\n chamcon.setContents(items);\n player.openInventory(chamcon);\n }\n }, 2L);\n break;\n default:\n close(player);\n }\n if (set.size() > 0) {\n set.put(\"chameleon_demat\", preset);\n qf.doUpdate(\"tardis\", set, wherec);\n }\n if (set_oo.size() > 0) {\n qf.doUpdate(\"tardis\", set_oo, wherec);\n }\n }\n }\n }\n }\n }\n }", "@GetMapping ( BASE_PATH + \"/inventory\" )\n public ResponseEntity getInventory () {\n final Inventory inventory = inventoryService.getInventory();\n return new ResponseEntity( inventory, HttpStatus.OK );\n }", "@FXML\n void goToReservedItems(ActionEvent event) {\n\n try {\n // Create a FXML loader for loading the reserved items FXML file.\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"ReservedItems.fxml\"));\n\n BorderPane reservedItems = (BorderPane) fxmlLoader.load();\n Scene reservedItemsScene = new Scene(reservedItems, Main.SMALL_WINDOW_WIDTH, Main.SMALL_WINDOW_HEIGHT);\n Stage reservedItemsStage = new Stage();\n\n reservedItemsStage.setScene(reservedItemsScene);\n reservedItemsStage.setTitle(Main.RESERVED_ITEMS_WINDOW_TITLE);\n reservedItemsStage.initModality(Modality.APPLICATION_MODAL);\n // Show the reserved items scene and wait for it to be closed\n reservedItemsStage.showAndWait();\n } catch (IOException e) {\n e.printStackTrace();\n // Quit the program (with an error code)\n System.exit(-1);\n }\n\n }", "@Override\n\tpublic void execute() {\n\t\t_inventory = _game.getInventory();\n\t\tif (_examineInventory)\n\t\t\t_game.print(_inventory.showInventory());\n\t\telse\n\t\t\t_game.print(_inventory.examineItem(_itemName));\n\t}", "@Override\r\n\t\r\n\t protected OverlayItem createItem(int index) {\n\t\treturn lstItems.get(index);\r\n\t\r\n\t }", "private void loadStartingInventory(){\n this.shelfList = floor.getShelf();\n Iterator<String> i = items.iterator();\n for (Shelf s : shelfList){\n while (s.hasFreeSpace()){\n s.addItem(i.next(), 1);\n }\n }\n }", "public void saveButtonPressed(ActionEvent actionEvent) throws IOException{\n validateInputs(actionEvent);\n\n if (isInputValid) {\n //creates a new Product object with identifier currentProduct\n currentProduct = new Product(productNameInput, productInventoryLevel, productPriceInput, maxInventoryLevelInput, minInventoryLevelInput);\n\n //passes currentProduct as the argument for the .addMethod.\n Inventory.getAllProducts().add(currentProduct);\n\n //utilizes the associatedPartsTableviewHolder wiht a for loop to pass each element as an argument\n //for the .addAssociatedPart method.\n for (Part part : associatedPartTableViewHolder) {\n currentProduct.addAssociatedPart(part);\n }\n\n //calls the returnToMainMen() method.\n mainMenuWindow.returnToMainMenu(actionEvent);\n }\n else {\n isInputValid = true;\n }\n\n }", "@Override\r\n\tpublic void onOpenInventory(InventoryOpenEvent e) {\n\t\t\r\n\t}", "List<Item<T>> addItemsForPage(final long page);", "public ArrayList<Item> getItemList(){\n\t\treturn inventoryList;\n\t}", "protected static void createUrls(SessionState state)\n\t{\n\t\tSet alerts = (Set) state.getAttribute(STATE_CREATE_ALERTS);\n\t\tif(alerts == null)\n\t\t{\n\t\t\talerts = new HashSet();\n\t\t\tstate.setAttribute(STATE_CREATE_ALERTS, alerts);\n\t\t}\n\n\t\tMap current_stack_frame = peekAtStack(state);\n\n\t\tList new_items = (List) current_stack_frame.get(STATE_STACK_CREATE_ITEMS);\n\t\tInteger number = (Integer) current_stack_frame.get(STATE_STACK_CREATE_NUMBER);\n\t\tif(number == null)\n\t\t{\n\t\t\tnumber = (Integer) state.getAttribute(STATE_CREATE_NUMBER);\n\t\t\tcurrent_stack_frame.put(STATE_STACK_CREATE_NUMBER, number);\n\t\t}\n\t\tif(number == null)\n\t\t{\n\t\t\tnumber = new Integer(1);\n\t\t\tcurrent_stack_frame.put(STATE_STACK_CREATE_NUMBER, number);\n\t\t}\n\n\t\tString collectionId = (String) current_stack_frame.get(STATE_STACK_CREATE_COLLECTION_ID);\n\t\tif(collectionId == null || collectionId.trim().length() == 0)\n\t\t{\n\t\t\tcollectionId = (String) state.getAttribute(STATE_CREATE_COLLECTION_ID);\n\t\t\tif(collectionId == null || collectionId.trim().length() == 0)\n\t\t\t{\n\t\t\t\tcollectionId = ContentHostingService.getSiteCollection(ToolManager.getCurrentPlacement().getContext());\n\t\t\t}\n\t\t\tcurrent_stack_frame.put(STATE_STACK_CREATE_COLLECTION_ID, collectionId);\n\t\t}\n\n\t\tint numberOfItems = 1;\n\t\tnumberOfItems = number.intValue();\n\n\t\touterloop: for(int i = 0; i < numberOfItems; i++)\n\t\t{\n\t\t\tEditItem item = (EditItem) new_items.get(i);\n\t\t\tif(item.isBlank())\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tResourcePropertiesEdit resourceProperties = ContentHostingService.newResourceProperties ();\n\t\t\tresourceProperties.addProperty (ResourceProperties.PROP_DISPLAY_NAME, item.getName());\n\t\t\tresourceProperties.addProperty (ResourceProperties.PROP_DESCRIPTION, item.getDescription());\n\n\t\t\tresourceProperties.addProperty(ResourceProperties.PROP_IS_COLLECTION, Boolean.FALSE.toString());\n\t\t\tList metadataGroups = (List) state.getAttribute(STATE_METADATA_GROUPS);\n\t\t\tsaveMetadata(resourceProperties, metadataGroups, item);\n\n\t\t\tbyte[] newUrl = item.getFilename().getBytes();\n\t\t\tString name = Validator.escapeResourceName(item.getName());\n\n\t\t\tSortedSet groups = new TreeSet(item.getEntityGroupRefs());\n\t\t\tgroups.retainAll(item.getAllowedAddGroupRefs());\n\t\t\t\n\t\t\tboolean hidden = false;\n\n\t\t\tTime releaseDate = null;\n\t\t\tTime retractDate = null;\n\t\t\t\n\t\t\tif(ContentHostingService.isAvailabilityEnabled())\n\t\t\t{\n\t\t\t\thidden = item.isHidden();\n\t\t\t\t\n\t\t\t\tif(item.useReleaseDate())\n\t\t\t\t{\n\t\t\t\t\treleaseDate = item.getReleaseDate();\n\t\t\t\t}\n\t\t\t\tif(item.useRetractDate())\n\t\t\t\t{\n\t\t\t\t\tretractDate = item.getRetractDate();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tContentResource resource = ContentHostingService.addResource (name,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcollectionId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tMAXIMUM_ATTEMPTS_FOR_UNIQUENESS,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\titem.getMimeType(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnewUrl,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tresourceProperties, \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgroups,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thidden,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\treleaseDate,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tretractDate,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\titem.getNotification());\n\n\t\t\t\titem.setAdded(true);\n\n\t\t\t\tBoolean preventPublicDisplay = (Boolean) state.getAttribute(STATE_PREVENT_PUBLIC_DISPLAY);\n\t\t\t\tif(preventPublicDisplay == null)\n\t\t\t\t{\n\t\t\t\t\tpreventPublicDisplay = Boolean.FALSE;\n\t\t\t\t\tstate.setAttribute(STATE_PREVENT_PUBLIC_DISPLAY, preventPublicDisplay);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!preventPublicDisplay.booleanValue() && item.isPubview())\n\t\t\t\t{\n\t\t\t\t\tContentHostingService.setPubView(resource.getId(), true);\n\t\t\t\t}\n\n\t\t\t\tString mode = (String) state.getAttribute(STATE_MODE);\n\t\t\t\tif(MODE_HELPER.equals(mode))\n\t\t\t\t{\n\t\t\t\t\tString helper_mode = (String) state.getAttribute(STATE_RESOURCES_HELPER_MODE);\n\t\t\t\t\tif(helper_mode != null && MODE_ATTACHMENT_NEW_ITEM.equals(helper_mode))\n\t\t\t\t\t{\n\t\t\t\t\t\t// add to the attachments vector\n\t\t\t\t\t\tList attachments = EntityManager.newReferenceList();\n\t\t\t\t\t\tReference ref = EntityManager.newReference(ContentHostingService.getReference(resource.getId()));\n\t\t\t\t\t\tattachments.add(ref);\n\t\t\t\t\t\tcleanupState(state);\n\t\t\t\t\t\tstate.setAttribute(STATE_ATTACHMENTS, attachments);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tObject attach_links = current_stack_frame.get(STATE_ATTACH_LINKS);\n\t\t\t\t\t\tif(attach_links == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tattach_links = state.getAttribute(STATE_ATTACH_LINKS);\n\t\t\t\t\t\t\tif(attach_links != null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcurrent_stack_frame.put(STATE_ATTACH_LINKS, attach_links);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif(attach_links == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tattachItem(resource.getId(), state);\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\tattachLink(resource.getId(), state);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tcatch(PermissionException e)\n\t\t\t{\n\t\t\t\talerts.add(rb.getString(\"notpermis12\"));\n\t\t\t\tcontinue outerloop;\n\t\t\t}\n\t\t\tcatch(IdInvalidException e)\n\t\t\t{\n\t\t\t\talerts.add(rb.getString(\"title\") + \" \" + e.getMessage ());\n\t\t\t\tcontinue outerloop;\n\t\t\t}\n\t\t\tcatch(IdLengthException e)\n\t\t\t{\n\t\t\t\talerts.add(rb.getString(\"toolong\") + \" \" + e.getMessage());\n\t\t\t\tcontinue outerloop;\n\t\t\t}\n\t\t\tcatch(IdUniquenessException e)\n\t\t\t{\n\t\t\t\talerts.add(\"Could not add this item to this folder\");\n\t\t\t\tcontinue outerloop;\n\t\t\t}\n\t\t\tcatch(InconsistentException e)\n\t\t\t{\n\t\t\t\talerts.add(RESOURCE_INVALID_TITLE_STRING);\n\t\t\t\tcontinue outerloop;\n\t\t\t}\n\t\t\tcatch(OverQuotaException e)\n\t\t\t{\n\t\t\t\talerts.add(rb.getString(\"overquota\"));\n\t\t\t\tcontinue outerloop;\n\t\t\t}\n\t\t\tcatch(ServerOverloadException e)\n\t\t\t{\n\t\t\t\talerts.add(rb.getString(\"failed\"));\n\t\t\t\tcontinue outerloop;\n\t\t\t}\n\t\t\tcatch(RuntimeException e)\n\t\t\t{\n\t\t\t\tlogger.debug(\"ResourcesAction.createFiles ***** Unknown Exception ***** \" + e.getMessage());\n\t\t\t\talerts.add(rb.getString(\"failed\"));\n\t\t\t\tcontinue outerloop;\n\t\t\t}\n\t\t}\n\n\t\tSortedSet currentMap = (SortedSet) state.getAttribute(STATE_EXPANDED_COLLECTIONS);\n\t\tif(!currentMap.contains(collectionId))\n\t\t{\n\t\t\tcurrentMap.add (collectionId);\n\n\t\t\t// add this folder id into the set to be event-observed\n\t\t\taddObservingPattern(collectionId, state);\n\t\t}\n\t\tstate.setAttribute(STATE_EXPANDED_COLLECTIONS, currentMap);\n\n\t\tstate.setAttribute(STATE_CREATE_ALERTS, alerts);\n\n\t}", "private void loadInv() {\n\t\titem = Main.inventory.business.getAllBaked();\n\t\tString test = \"ID, Name, Amount, Price\\n\";\n\t\t//formatting for string to load into the screen\n\t\tfor(int i=0 ; i< item.size() ; i++) {\n\t\t\ttest += (i+1) + \" \" + item.get(i).getName() +\", \" \n\t\t\t\t\t+ item.get(i).getQuantity() + \n\t\t\t\t\t\", $\"+ Main.inventory.business.getItemCost(item.get(i).getName()) +\"\\n\";\n\t\t}\n\t\tthis.inv.setText(test);\n\t}", "@PostMapping(\"/wishLists/{custId}/{prodId}\")\r\n\tpublic ResponseEntity<WishList> createWishList(@PathVariable(\"custId\") Integer custId, @PathVariable(\"prodId\") Integer prodId,@PathVariable(\"category3\") String category3) {\r\n\t\tList<Inventory> inventory= inventoryService.getAllInventory();\r\n\t\tList<Inventory> inventory1=new ArrayList();\r\n\t\t\r\n\t\tcategory3=\"Books\";\r\n\t\tfor (Inventory c : inventory) {\r\n\t\t\tCategory category= c.getCategory();\r\n\t\t\tString cat=category.getCategoryName();\r\n\t\t\tif(cat.equals(category3)) {\r\n\t\t\t\r\n\t\t\t\tInventory inv=new Inventory();\r\n\t\t\t\tinv.setProductId(c.getProductId());\r\n\t\t\t\tinv.setProductName(c.getProductName());\r\n\t\t\t\tinv.setPrice(c.getPrice());\r\n\t\t\t\tinv.setCategory(c.getCategory());\r\n\t\t\t\tinv.setDescription(c.getDescription());\r\n\t\t\t\t\r\n\t\t\t\tinventory1.add(inv);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(inventory1==null)\r\n\t\t\treturn new ResponseEntity\r\n\t\t\t\t(\"Sorry! Inventory details not available!\",HttpStatus.NOT_FOUND);\r\n\t\treturn new ResponseEntity<WishList>(HttpStatus.OK);\r\n\t\r\n\t\t\r\n}", "void addElementToInventory(String elementName);", "public void fillInventory(TheGroceryStore g);", "@PreAuthorize(\"#oauth2.hasScope('pharmacy_inventory') and hasRole('USER')\")\n\t@PostMapping(\"/inventories\")\n\t@ResponseStatus(HttpStatus.CREATED)\n\tpublic void createPharmacyInventory(@RequestBody @Validated PharmacyInventory pharmacyInventory) {\n\t\tpharmacyInventoryService.createPharmacyInventory(pharmacyInventory);\n\t}", "public PageInventory withItems(ItemStack... items)\n {\n this.contents.addAll(Arrays.asList(items));\n this.recalculate();\n return this;\n }", "public void buttonLoadList(ActionEvent actionEvent) {\n }", "public List<Food> requestAction4(){\n\n List<Food> foodList = new ArrayList<>();\n Food food = new Food();\n for(int i=0;i<10;i++){\n\n Random random = new Random();\n int n = random.nextInt(10) +1;\n // random.nextInt(10) + 1;\n food.setId(i+1);\n food.setName(\"Food :\"+n);\n food.setDescriptiom(\"Food Description.................. \"+i);\n\n foodList.add(food);\n\n }\n\n\n return foodList;\n }", "public void createChooseGameUI()\n {\n \tHashMap<InventoryRunnable, InventoryItem> inventoryStuff = new HashMap<InventoryRunnable, InventoryItem>();\n \t\n \tInventoryRunnable gladiatorJoinRunnable = new GladiatorJoinInventoryRunnable(plugin);\n \t\n \tArrayList<String> gladiatorLore = new ArrayList<String>();\n \tgladiatorLore.add(\"FIGHT TO THE DEATH AND WIN YOUR FREEDOM\");\n \tgladiatorLore.add(\"GOOD LUCK WARRIOR!\");\n \tInventoryItem gladiatorItem = new InventoryItem(plugin, Material.SHIELD, \"GLADIATOR\", gladiatorLore, 1, true, 1);\n \tinventoryStuff.put(gladiatorJoinRunnable, gladiatorItem);\n \t\n \tchooseGameUI = new GUIInventory(plugin, \"MINIGAMES\", inventoryStuff, 3);\n }", "public void GuestAction(ActionEvent event) throws IOException {\n myDB.GuestLogIn();\n NameTransfer.getInstance().setName(\"Guest\");\n \n pm.changeScene(event, \"/sample/fxml/ProductsSample.fxml\", \"products\");\n \n \n }", "private void addItemScreen() {\n \tIntent intent = new Intent(this, ItemEditor.class);\n \tstartActivity(intent);\n }", "@FXML\n public void buttonAddItem(ActionEvent actionEvent) {\n //adds a list item to the table\n }", "public List<InventoryEntity> addInventory(Inventory inventory) {\n\t\treturn inventoryDao.addInventory(inventory);\n\t}", "String createListItem(String list, int accountId);", "private static void addInventoryButton(AnchorPane ui) {\n\t\tCanvas inventoryBtn = new Canvas(32 * GameConfig.getScale(), 32 * GameConfig.getScale());\n\t\tui.getChildren().add(inventoryBtn);\n\n\t\tAnchorPane.setBottomAnchor(inventoryBtn, 5.0 * GameConfig.getScale());\n\t\tAnchorPane.setRightAnchor(inventoryBtn, 5.0 * GameConfig.getScale());\n\n\t\tinventoryBtn.getGraphicsContext2D().drawImage(DrawUtil.scaleUp(backpackSprite, GameConfig.getScale()), 0, 0);\n\n\t\tinventoryBtn.setOnMouseClicked((event) -> {\n\t\t\tif (InterruptController.isPauseOpen() || InterruptController.isTransition()) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tAudioClip openSFX = GameAudioUtils.getOpenInventorySFX();\n\n\t\t\tgamePane.getChildren().add(inventoryPane);\n\t\t\tinventoryPane.requestFocus();\n\t\t\tInterruptController.setInventoryOpen(true);\n\n\t\t\tif (!openSFX.isPlaying()) {\n\t\t\t\topenSFX.play();\n\t\t\t}\n\t\t});\n\t}", "private void createItems()\n {\n Item belt, nappies, phone, money, cigarretes, \n jacket, cereal, shoes, keys, comics, bra, \n bread, bowl, computer;\n\n belt = new Item(2,\"Keeps something from falling\",\"Belt\");\n nappies = new Item(7,\"Holds the unspeakable\",\"Nappies\");\n phone = new Item(4, \"A electronic device that holds every answer\",\"Iphone 10\");\n money = new Item(1, \"A form of currency\",\"Money\");\n cigarretes = new Item(2,\"It's bad for health\",\"Cigarretes\");\n jacket = new Item(3,\"Keeps you warm and cozy\", \"Jacket\");\n cereal = new Item(3, \"What you eat for breakfast\",\"Kellog's Rice Kripsies\");\n shoes = new Item(5,\"Used for walking\", \"Sneakers\");\n keys = new Item(2, \"Unlock stuff\", \"Keys\");\n comics = new Item(2, \"A popular comic\",\"Batman Chronicles\");\n bra = new Item(3,\"What is this thing?, Eeeewww\", \"Bra\");\n bread = new Item(6,\"Your best source of carbohydrates\",\"Bread\");\n bowl = new Item(4,\"where food is placed\",\"Plate\");\n computer = new Item(10,\"A computational machine\",\"Computer\");\n\n items.add(belt);\n items.add(nappies);\n items.add(phone);\n items.add(money);\n items.add(cigarretes);\n items.add(jacket);\n items.add(cereal);\n items.add(shoes);\n items.add(keys);\n items.add(comics);\n items.add(bra);\n items.add(bread);\n items.add(bowl);\n items.add(computer);\n }" ]
[ "0.61611086", "0.59754837", "0.58649784", "0.57118154", "0.57014376", "0.56532353", "0.56223476", "0.55656105", "0.5532279", "0.5490786", "0.5483672", "0.54825354", "0.547241", "0.53718823", "0.5364771", "0.53580076", "0.53453165", "0.5344859", "0.5344031", "0.5341725", "0.5319964", "0.5309958", "0.5298577", "0.52918476", "0.5245664", "0.52427274", "0.52409846", "0.5233497", "0.5232098", "0.5220143", "0.5212526", "0.52065605", "0.5202535", "0.519343", "0.5178462", "0.51697636", "0.51584935", "0.51546395", "0.5137134", "0.5114817", "0.51072013", "0.51036465", "0.5101993", "0.51015556", "0.5093371", "0.50805926", "0.5072443", "0.5070101", "0.50670356", "0.5042904", "0.5037715", "0.5034738", "0.50346774", "0.50338286", "0.50315773", "0.5008577", "0.4991537", "0.4987623", "0.49848115", "0.49845862", "0.4957234", "0.49538448", "0.4942963", "0.49338156", "0.49282315", "0.4926342", "0.49247342", "0.49242324", "0.49216852", "0.4915233", "0.49125788", "0.49095348", "0.4907565", "0.49002147", "0.48955962", "0.4884373", "0.488285", "0.4881005", "0.48788792", "0.48772708", "0.48746836", "0.48724744", "0.48716342", "0.48654923", "0.48606062", "0.48561436", "0.48543152", "0.48509535", "0.48475957", "0.48467895", "0.48446634", "0.48418662", "0.48369855", "0.4834958", "0.4834216", "0.48268345", "0.48256862", "0.48244882", "0.48206848", "0.48202997" ]
0.60068196
1
Inheritance'da data turu olarak class ismi kullanimi Bir class'da obje uretirken data turu olarak class'in kendisini veya parent(lar)ini kullanabiliriz. Olusturdugumuz obje ile variable kullanmamiz gerekirse, hangi degeri alacagini anlamak icin once Data turu olan class'a gideriz orada aradigimiz variable varsa kullaniriz, yoksa parent(lar)ina bakariz, yukari dogru giderken ilk buldugumuz degeri kullaniriz
public static void main(String[] args) { Formen fr1=new Formen(); // fr1 objesini kullanarak hangi class'larin variable'lari gorebilirim fr1.sorumluOldBolum="Marangozhane"; fr1.maas=10000; System.out.println(fr1.isim + " " + fr1.sorumluOldBolum+ " " + fr1.maas); // Emrullah Marangozhane 10000 Isci fr2=new Formen(); // Data turu olarak Isci secildigi icin fr2.bolum="Kaynak atolyesi"; System.out.println(fr2.isim + " " + fr2.bolum+ " " + fr2.maas); // Mesut Kaynak atolyesi 5000 Personel fr3=new Formen(); System.out.println(fr3.isim); // Emre }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n// subClass[] classes = new subClass[1];\n// System.out.println(superClass.value);\n// System.out.println(subClass.value);\n subClass s = new subClass();\n s.lala();\n// superClass p = s;\n// System.out.println(s==p);\n// System.out.println(s.name);\n// System.out.println(s.value);\n// subClass.haha();\n// s.heihei();\n// System.out.println( p.name);\n// System.out.println(p.value);\n// p.haha();\n// p.heihei();\n\n }", "public nomina()\n {\n deducidoClase = new deducido();\n devengadoClase = new devengado();\n }", "public static void main(String[] args) {\n\t\t\n\t\tChild1 ch = new Child1();\n\t\t\n\t\tSystem.out.println(Inheritance.race); // static oldugundan kendi class adiyla cagirdik.\n\t\t\n\t\tSystem.out.println(ch.eyeColor);\n\t\t\n\t\tSystem.out.println();\n\t\t\n\t\t\n\t\tch.sing(); // parenttan geldi. inheritance class yani\n\t\tch.code(); // child1 den geldi. \n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"parent:\\n\");\n\t\t\n\t\tInheritance parent = new Inheritance();\n\t\t\t\n\t\tSystem.out.println(parent.hairColor);\t\n\t\t\n\t\tSystem.out.println(parent.eyeColor);\n\t\t\n\t\tSystem.out.println(Inheritance.race); \n\n\t\tSystem.out.println();\n\t\t\n\t\tparent.sing();\n//\t\tparent.code(); // cocugun behaviorlarini method kullanamaz\n\t\t\n}", "@Test\n public void test6(){\n System.out.println(Son.son);\n System.out.println(Parent.parent);\n }", "@Test\n public void test7(){\n System.out.println(Parent.parent);\n System.out.println(Son.son);\n }", "public static void main(String[] args) {\n\n Parent parent = new Parent();\n parent.name=\"asdfasdfas\";\n\n Son son = new Son();\n\n\n }", "@Test\n public void test4(){\n //parent\n System.out.println(Parent.parent);\n System.out.println(Son.parent);\n }", "public TypeData(ClassData baseClass) {\n this.baseClass = baseClass;\n //this.restriction = \n }", "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 }", "@Test\n public void test5(){\n //parent\n System.out.println(Son.parent);\n System.out.println(Parent.parent);\n }", "public void method1() {\n\t\t\n\t\tname = \"Fredie\"; // this variable is inherited in class B\n\t\tthis.name = \"Lola\"; // this called the name from the classB, so 1st it was changed to Friedie and than was changed to Lola\n\t\tsuper.name = \"Alexa\"; // will actually call the variable from the class A, and in this case its value has been changed\n\t\t\n\t}", "public void setSuperClass(TypeData sclas) {\n m_superClass = sclas;\n if (sclas != null) {\n boolean imported = m_importsTracker.addImport(sclas.getFullName(), false);\n if (s_logger.isDebugEnabled()) {\n s_logger.debug(\"Set superclass of \" + getFullName() + \" to \" + sclas.getFullName() +\n (imported ? \" (imported)\" : \"\"));\n }\n }\n }", "@Override\n\tpublic void VisitClassNode(BunClassNode Node) {\n\n\t}", "public ConStructorInheritance(){\r\n\t\t\r\n\t\tSystem.out.println(\"Parent Class Constructor\");\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n public void visit(ClassOrInterfaceDeclaration id, JSONObject data) {\n classObject = new JSONObject();\n String previousClass = currectClass;\n currectClass = solver.solve(id.getNameAsString(), \"\", \"\");\n if (currectClass == null)\n return;\n super.visit(id, data);\n if (!classObject.isEmpty())\n ((JSONObject) data.get(\"classes\")).put(currectClass, classObject);\n currectClass = previousClass;\n }", "Kerucut(){\r\n Tabung tab = new Tabung();\r\n tinggi=tab.getTinggi();\r\n }", "public static void main(String[] args) {\n\t\t\n\t\tparentclass parent=new parentclass();\n\t\t\n\t\tSystem.out.println(parent.str);\n\t\t\n\t\n\t}", "private void createClassVariables(){ \n //--------------------------------------------------------------------------- \n Hashtable table=sqlTagsGeneratorTable.getImportedForeignKeyHash();\n Enumeration enum=table.keys();\n buffer=new StringBuffer();\n //buffer.append(\" private Connection connection;\\n\"); \n //buffer.append(\" private ConnectionTag connectionObject;\\n\"); \n //buffer.append(\" private Vector primaryKeyVector=new Vector();\\n\"); \n buffer.append(\" private String tableName=\\\"\"+tableName+\"\\\";\\n\"); \n\n for(;enum.hasMoreElements();){\n String foreignKeyName=(String)enum.nextElement();\n SQLTagsGeneratorForeignKey object=(SQLTagsGeneratorForeignKey)\n table.get(foreignKeyName);\n String importTable=object.getImportTableName();\n String exportTable=object.getExportTableName();\n String fkName=object.getFkName();\n buffer.append(\" private \"+exportTable+\" \"+fkName+\"_PARENT;\\n\");\n }\n\n table=sqlTagsGeneratorTable.getExportedForeignKeyHash();\n enum=table.keys();\n\n for(;enum.hasMoreElements();){\n String foreignKeyName=(String)enum.nextElement();\n SQLTagsGeneratorForeignKey object=(SQLTagsGeneratorForeignKey)\n table.get(foreignKeyName);\n String exportTable=object.getImportTableName();\n String fkName=object.getFkName();\n buffer.append(\" private \"+exportTable+\" \"+fkName+\"_CHILD;\\n\");\n }\n }", "public Perro() {\n// super(\"No define\", \"NN\", 0); en caso el constructor de animal tenga parametros\n this.pelaje = \"corto\";\n }", "public static void llenarAlsuper(){\r\n Producto huevos = new Producto(\"huevos\", \"bachoco\", 56.90, 1);\r\n Nodo<Producto> ATemp = new Nodo(huevos);\r\n listaAlsuper.agregarNodo(ATemp);\r\n \r\n Producto chuletas = new Producto(\"chuletas\", \"Del Cero\", 84.90, 1);\r\n Nodo<Producto> ATemp2 = new Nodo(chuletas);\r\n listaAlsuper.agregarNodo(ATemp2);\r\n \r\n Producto carnemolida = new Producto(\"carne molida\", \"premium\", 79.90, 1);\r\n Nodo<Producto> ATemp3 = new Nodo(carnemolida);\r\n listaAlsuper.agregarNodo(ATemp3);\r\n \r\n Producto pollo = new Producto(\"pollo\", \"super pollo\", 59.90, 1);\r\n Nodo<Producto> ATemp4 = new Nodo(pollo);\r\n listaAlsuper.agregarNodo(ATemp4);\r\n \r\n Producto pescado = new Producto(\"pescado\", \"el pecesito\", 63.90, 1);\r\n Nodo<Producto> ATemp5 = new Nodo(pescado);\r\n listaAlsuper.agregarNodo(ATemp5);\r\n \r\n Producto atunagua = new Producto(\"atun en agua\", \"en agua\", 9.90, 1);\r\n Nodo<Producto> ATemp6 = new Nodo(atunagua);\r\n listaAlsuper.agregarNodo(ATemp6);\r\n \r\n Producto atunaceite = new Producto(\"atun en aceite\", \"en aceite\", 9.90, 1);\r\n Nodo<Producto> ATemp7 = new Nodo(atunaceite);\r\n listaAlsuper.agregarNodo(ATemp7);\r\n \r\n Producto leche = new Producto(\"leche\", \"nutri leche\", 14.90, 1);\r\n Nodo<Producto> ATemp8 = new Nodo(leche);\r\n listaAlsuper.agregarNodo(ATemp8);\r\n \r\n Producto arroz = new Producto(\"arroz\", \"mimarca\", 13.90, 1);\r\n Nodo<Producto> ATemp9 = new Nodo(arroz);\r\n listaAlsuper.agregarNodo(ATemp9);\r\n \r\n Producto frijol= new Producto(\"frijol\", \"pinto\", 16.90, 1);\r\n Nodo<Producto> ATemp10 = new Nodo(frijol);\r\n listaAlsuper.agregarNodo(ATemp10);\r\n \r\n Producto azucar = new Producto(\"azucar\", \"mimarca\", 17.90, 1);\r\n Nodo<Producto> ATemp11 = new Nodo(azucar);\r\n listaAlsuper.agregarNodo(ATemp11);\r\n \r\n Producto sal = new Producto(\"sal\", \"salada\", 10.90, 1);\r\n Nodo<Producto> ATemp12 = new Nodo(sal);\r\n listaAlsuper.agregarNodo(ATemp12);\r\n \r\n Producto pimienta = new Producto(\"pimienta\", \"pimi\", 3.90, 2);\r\n Nodo<Producto> ATemp13 = new Nodo(pimienta);\r\n listaAlsuper.agregarNodo(ATemp13);\r\n \r\n Producto limon = new Producto(\"limon\", \"verde\", 5.90, 0);\r\n Nodo<Producto> ATemp14 = new Nodo(limon);\r\n listaAlsuper.agregarNodo(ATemp14);\r\n \r\n Producto tomate = new Producto(\"tomate\", \"rojo\", 13.90, 0);\r\n Nodo<Producto> ATemp15 = new Nodo(tomate);\r\n listaAlsuper.agregarNodo(ATemp15);\r\n \r\n Producto zanahoria = new Producto(\"zanahoria\", \"goku\", 8.90, 0);\r\n Nodo<Producto> ATemp16 = new Nodo(zanahoria);\r\n listaAlsuper.agregarNodo(ATemp16);\r\n \r\n Producto papas = new Producto(\"papas\", \"ochoa\", 8.90, 0);\r\n Nodo<Producto> ATemp17 = new Nodo(papas);\r\n listaAlsuper.agregarNodo(ATemp17);\r\n \r\n Producto cebolla = new Producto(\"cebolla\", \"blanca\", 17.90, 1);\r\n Nodo<Producto> ATemp18 = new Nodo(cebolla);\r\n listaAlsuper.agregarNodo(ATemp18);\r\n \r\n Producto aceitecocina = new Producto(\"aceite de cocina\", \"123\", 29.90, 1);\r\n Nodo<Producto> ATemp19 = new Nodo(aceitecocina);\r\n listaAlsuper.agregarNodo(ATemp19);\r\n \r\n Producto panblanco = new Producto(\"pan blanco\", \"blanco\", 2.90, 1);\r\n Nodo<Producto> ATemp20 = new Nodo(panblanco);\r\n listaAlsuper.agregarNodo(ATemp20);\r\n \r\n Producto pan = new Producto(\"pan\", \"bimbo\", 39.90, 1);\r\n Nodo<Producto> ATemp21 = new Nodo(pan);\r\n listaAlsuper.agregarNodo(ATemp21);\r\n \r\n Producto zuko = new Producto(\"zuko\", \"zuko\", 4.90, 1);\r\n Nodo<Producto> ATemp22 = new Nodo(zuko);\r\n listaAlsuper.agregarNodo(ATemp22);\r\n \r\n Producto consome = new Producto(\"consome\", \"panchi\", 10.90, 2);\r\n Nodo<Producto> ATemp23 = new Nodo(consome);\r\n listaAlsuper.agregarNodo(ATemp23);\r\n \r\n Producto cereal = new Producto(\"cereal\", \"nesquik\", 40.90, 2);\r\n Nodo<Producto> ATemp24 = new Nodo(cereal);\r\n listaAlsuper.agregarNodo(ATemp24);\r\n \r\n Producto cereal2 = new Producto(\"cereal\", \"zucaritas\", 50.90, 2);\r\n Nodo<Producto> ATemp25 = new Nodo(cereal2);\r\n listaAlsuper.agregarNodo(ATemp25);\r\n \r\n Producto cereal3 = new Producto(\"cereal\", \"kellogs\", 35.90, 2);\r\n Nodo<Producto> ATemp26 = new Nodo(cereal3);\r\n listaAlsuper.agregarNodo(ATemp26);\r\n \r\n Producto chocomilk = new Producto(\"chocomilk\", \"pancho pantera\", 60.90, 2);\r\n Nodo<Producto> ATemp27 = new Nodo(chocomilk);\r\n listaAlsuper.agregarNodo(ATemp27);\r\n \r\n Producto apio = new Producto(\"apio\", \"pa el clamato\", 1.90, 0);\r\n Nodo<Producto> ATemp28 = new Nodo(cereal);\r\n listaAlsuper.agregarNodo(ATemp28);\r\n \r\n Producto chocomilk2 = new Producto(\"chocomilk\", \"el dinosaurio\", 15.90, 2);\r\n Nodo<Producto> ATemp29 = new Nodo(chocomilk2);\r\n listaAlsuper.agregarNodo(ATemp29);\r\n \r\n Producto chile = new Producto(\"chile\", \"amor\", 7.90, 0);\r\n Nodo<Producto> ATemp30 = new Nodo(chile);\r\n listaAlsuper.agregarNodo(ATemp30);\r\n \r\n Producto chilaca = new Producto(\"chilaca\", \"chihuahua\", 8.80, 0);\r\n Nodo<Producto> ATemp31 = new Nodo(chilaca);\r\n listaAlsuper.agregarNodo(ATemp30);\r\n \r\n Producto cafe= new Producto(\"cafe\", \"nescafe\",.90, 2);\r\n Nodo<Producto> ATemp32 = new Nodo(cafe);\r\n listaAlsuper.agregarNodo(ATemp32);\r\n \r\n Producto sopa = new Producto(\"sopa\", \"de coditos\", 4.90, 2);\r\n Nodo<Producto> ATemp33 = new Nodo(sopa);\r\n listaAlsuper.agregarNodo(ATemp33);\r\n \r\n Producto sopa2 = new Producto(\"sopa\", \"estrellas\", 3.90, 2);\r\n Nodo<Producto> ATemp34 = new Nodo(sopa2);\r\n listaAlsuper.agregarNodo(ATemp34);\r\n \r\n Producto sopa3 = new Producto(\"sopa\", \"moñitos\", 3.90, 2);\r\n Nodo<Producto> ATemp35 = new Nodo(sopa3);\r\n listaAlsuper.agregarNodo(ATemp35);\r\n \r\n Producto sopa4 = new Producto(\"sopa\", \"letras\", 3.90, 2);\r\n Nodo<Producto> ATemp36 = new Nodo(sopa4);\r\n listaAlsuper.agregarNodo(ATemp36);\r\n \r\n Producto pasta = new Producto(\"pasta\", \"spaguetti\", 15.90, 2);\r\n Nodo<Producto> ATemp37 = new Nodo(pasta);\r\n listaAlsuper.agregarNodo(ATemp37);\r\n \r\n Producto shampoo = new Producto(\"champu\", \"palmolive\", 36.90, 3);\r\n Nodo<Producto> ATemp38 = new Nodo(shampoo);\r\n listaAlsuper.agregarNodo(ATemp38);\r\n \r\n Producto desodorante = new Producto(\"desodorante\", \"old spice\", 50.90, 3);\r\n Nodo<Producto> ATemp39 = new Nodo(desodorante);\r\n listaAlsuper.agregarNodo(ATemp39);\r\n \r\n Producto jabontrastes = new Producto(\"jabon para los trastes\", \"salvo\", 40.90, 3);\r\n Nodo<Producto> ATemp40 = new Nodo(jabontrastes);\r\n listaAlsuper.agregarNodo(ATemp40);\r\n \r\n Producto jaboncuerpo = new Producto(\"jabon para el cuerpo\", \"jabonzote\", 6.90, 3);\r\n Nodo<Producto> ATemp41 = new Nodo(jaboncuerpo);\r\n listaAlsuper.agregarNodo(ATemp41);\r\n \r\n Producto rastrillo = new Producto(\"rastrillo\", \"gillette\", 60.90, 3);\r\n Nodo<Producto> ATemp42 = new Nodo(rastrillo);\r\n listaAlsuper.agregarNodo(ATemp42);\r\n \r\n Producto detergente = new Producto(\"detergente\", \"downy\", 38.90, 3);\r\n Nodo<Producto> ATemp43 = new Nodo(detergente);\r\n listaAlsuper.agregarNodo(ATemp43);\r\n \r\n Producto puredetomate = new Producto(\"pure de tomate\", \"tomax\", 9.90, 3);\r\n Nodo<Producto> ATemp44 = new Nodo(puredetomate);\r\n listaAlsuper.agregarNodo(ATemp44);\r\n \r\n Producto mole = new Producto(\"mole\", \"doña maria\", 25.90, 3);\r\n Nodo<Producto> ATemp45 = new Nodo(mole);\r\n listaAlsuper.agregarNodo(ATemp45);\r\n \r\n Producto papel = new Producto(\"papel\", \"petalo\", 6.90, 3);\r\n Nodo<Producto> ATemp46 = new Nodo(papel);\r\n listaAlsuper.agregarNodo(ATemp46);\r\n \r\n Producto servilletas = new Producto(\"servilletas\", \"mimarca\", 12.90, 3);\r\n Nodo<Producto> ATemp47 = new Nodo(servilletas);\r\n listaAlsuper.agregarNodo(ATemp47);\r\n \r\n Producto manzana = new Producto(\"manzanas\", \"roja\", 20.90, 0);\r\n Nodo<Producto> ATemp48 = new Nodo(manzana);\r\n listaAlsuper.agregarNodo(ATemp48);\r\n \r\n Producto platano = new Producto(\"platano\", \"meagarras\", 19.90, 0);\r\n Nodo<Producto> ATemp50 = new Nodo(platano);\r\n listaAlsuper.agregarNodo(ATemp50);\r\n \r\n Producto papaya = new Producto(\"papaya\", \"naranja\", 0.90, 0);\r\n Nodo<Producto> ATemp51 = new Nodo(papaya);\r\n listaAlsuper.agregarNodo(ATemp51);\r\n \r\n Producto pastadedientes = new Producto(\"pasta de dientes\", \"colgate\", 30.90, 0);\r\n Nodo<Producto> ATemp52 = new Nodo(pastadedientes);\r\n listaAlsuper.agregarNodo(ATemp52);\r\n \r\n Producto desodorante2 = new Producto(\"desodorante\", \"axe\", 50.90, 3);\r\n Nodo<Producto> ATemp53 = new Nodo(desodorante2);\r\n listaAlsuper.agregarNodo(ATemp53);\r\n \r\n Producto cremacuerpo = new Producto(\"crema\", \"real\", 30.90, 3);\r\n Nodo<Producto> ATemp54 = new Nodo(cremacuerpo);\r\n listaAlsuper.agregarNodo(ATemp54);\r\n \r\n Producto cremacomer = new Producto(\"crema\", \"lala\", 29.90, 2);\r\n Nodo<Producto> ATemp55 = new Nodo(cremacomer);\r\n listaAlsuper.agregarNodo(ATemp55);\r\n \r\n Producto cloro = new Producto(\"cloro\", \"cloralex\", 9.90, 3);\r\n Nodo<Producto> ATemp56 = new Nodo(cloro);\r\n listaAlsuper.agregarNodo(ATemp56);\r\n \r\n Producto pinol = new Producto(\"pinol\", \"pinol\", 28.90, 0);\r\n Nodo<Producto> ATemp57 = new Nodo(pinol);\r\n listaAlsuper.agregarNodo(ATemp57);\r\n \r\n Producto amonia = new Producto(\"amonia\", \"amonio\", 666.66, 3);\r\n Nodo<Producto> ATemp58 = new Nodo(amonia);\r\n listaAlsuper.agregarNodo(ATemp58);\r\n \r\n Producto tortillas = new Producto(\"tortillas\", \"caseras\", 18.90, 2);\r\n Nodo<Producto> ATemp59 = new Nodo(tortillas);\r\n listaAlsuper.agregarNodo(ATemp59);\r\n \r\n Producto winni = new Producto(\"winni\", \"chimex\", 30.90, 1);\r\n Nodo<Producto> ATemp60 = new Nodo(winni);\r\n listaAlsuper.agregarNodo(ATemp60);\r\n \r\n Producto salchicha = new Producto(\"salchicha\", \"chimex\", 60.90, 1);\r\n Nodo<Producto> ATemp61 = new Nodo(salchicha);\r\n listaAlsuper.agregarNodo(ATemp61);\r\n \r\n Producto jamon = new Producto(\"jamon\", \"chimex\", 70.90, 1);\r\n Nodo<Producto> ATemp63 = new Nodo(jamon);\r\n listaAlsuper.agregarNodo(ATemp63);\r\n \r\n Producto queso = new Producto(\"queso\", \"camargo\", 90.90, 1);\r\n Nodo<Producto> ATemp64 = new Nodo(queso);\r\n listaAlsuper.agregarNodo(ATemp64);\r\n \r\n Producto saladas = new Producto(\"saladas\", \"saladitas\", 15.90, 2);\r\n Nodo<Producto> ATemp65 = new Nodo(saladas);\r\n listaAlsuper.agregarNodo(ATemp65);\r\n \r\n Producto galletas = new Producto(\"galletas\", \"emperador\", 18.90, 2);\r\n Nodo<Producto> ATemp66 = new Nodo(galletas);\r\n listaAlsuper.agregarNodo(ATemp66);\r\n \r\n Producto lentejas = new Producto(\"lentejas\", \"mimarca\", 10.90, 2);\r\n Nodo<Producto> ATemp67 = new Nodo(lentejas);\r\n listaAlsuper.agregarNodo(ATemp67);\r\n \r\n Producto puredepapa = new Producto(\"pure de papa\", \"mi marca\", 20.90, 2);\r\n Nodo<Producto> ATemp68 = new Nodo(puredepapa);\r\n listaAlsuper.agregarNodo(ATemp68);\r\n \r\n Producto trapos = new Producto(\"trapos\", \"trapitos\", 15.90, 3);\r\n Nodo<Producto> ATemp69 = new Nodo(trapos);\r\n listaAlsuper.agregarNodo(ATemp69);\r\n \r\n Producto soda = new Producto(\"soda\", \"cocacola\", 31.90, 2);\r\n Nodo<Producto> ATemp70 = new Nodo(soda);\r\n listaAlsuper.agregarNodo(ATemp70);\r\n \r\n Producto jugo = new Producto(\"jugo\", \"jumex\",19.90, 2);\r\n Nodo<Producto> ATemp71 = new Nodo(jugo);\r\n listaAlsuper.agregarNodo(ATemp71);\r\n \r\n Producto cerbeza = new Producto(\"cerbeza\", \"indio\", 11.90, 2);\r\n Nodo<Producto> ATemp72 = new Nodo(cerbeza);\r\n listaAlsuper.agregarNodo(ATemp72);\r\n \r\n Producto hielo = new Producto(\"hielo\", \"pinguino\", 10.90, 2);\r\n Nodo<Producto> ATemp73 = new Nodo(hielo);\r\n listaAlsuper.agregarNodo(ATemp73);\r\n \r\n Producto salsa = new Producto(\"salsa\", \"maggi\", 60.90, 2);\r\n Nodo<Producto> ATemp74 = new Nodo(salsa);\r\n listaAlsuper.agregarNodo(ATemp74);\r\n \r\n Producto desechables = new Producto(\"desechables\", \"mimarca\", 10.90, 2);\r\n Nodo<Producto> ATemp75 = new Nodo(desechables);\r\n listaAlsuper.agregarNodo(ATemp75);\r\n \r\n Producto chicharo = new Producto(\"chicharo\", \"chicharo\", 10.90, 2);\r\n Nodo<Producto> ATemp76 = new Nodo(chicharo);\r\n listaAlsuper.agregarNodo(ATemp76);\r\n \r\n Producto elotes = new Producto(\"elotes\", \"elotin\", 2.90, 2);\r\n Nodo<Producto> ATemp77 = new Nodo(elotes);\r\n listaAlsuper.agregarNodo(ATemp77);\r\n \r\n Producto champiñones = new Producto(\"champiñones\", \"toat\", 14.90, 2);\r\n Nodo<Producto> ATemp78 = new Nodo(champiñones);\r\n listaAlsuper.agregarNodo(ATemp78);\r\n \r\n Producto sardina = new Producto(\"sardina\", \"sardinota\", 31.90, 2);\r\n Nodo<Producto> ATemp79 = new Nodo(sardina);\r\n listaAlsuper.agregarNodo(ATemp79);\r\n \r\n Producto hilodental = new Producto(\"hilo dental\", \"colgate\", 40.90, 3);\r\n Nodo<Producto> ATemp80 = new Nodo(hilodental);\r\n listaAlsuper.agregarNodo(ATemp80);\r\n \r\n Producto cepillodedientes = new Producto(\"cepillo de dientes\", \"colgate\", 25.90, 3);\r\n Nodo<Producto> ATemp81 = new Nodo(cepillodedientes);\r\n listaAlsuper.agregarNodo(ATemp81);\r\n \r\n Producto gel = new Producto(\"gel para el cabello\", \"ego\", 16.90, 3);\r\n Nodo<Producto> ATemp82 = new Nodo(gel);\r\n listaAlsuper.agregarNodo(ATemp82);\r\n \r\n Producto cera = new Producto(\"cera\", \"ego\", 47.90, 3);\r\n Nodo<Producto> ATemp83 = new Nodo(cera);\r\n listaAlsuper.agregarNodo(ATemp83);\r\n \r\n Producto aerosol = new Producto(\"aerosol\", \"paris\", 75.90, 3);\r\n Nodo<Producto> ATemp84 = new Nodo(aerosol);\r\n listaAlsuper.agregarNodo(ATemp84);\r\n \r\n Producto acondicionador = new Producto(\"acondicionador\", \"loreal paris\", 70.90, 3);\r\n Nodo<Producto> ATemp85 = new Nodo(acondicionador);\r\n listaAlsuper.agregarNodo(ATemp85);\r\n \r\n Producto cremaafeitar = new Producto(\"crema para afeitar\", \"yilet\", 40.90, 3);\r\n Nodo<Producto> ATemp86 = new Nodo(cremaafeitar);\r\n listaAlsuper.agregarNodo(ATemp86);\r\n }", "public RPGClass getData() {\n return classData;\n }", "public TipoPrestamo() {\n\t\tsuper();\n\t}", "public void consulterClassement() {\n\t\t\n\t}", "private Node( T data_ )\n {\n data = data_;\n parent = this;\n }", "zzebg(zzebe zzebe, Class cls) {\n super(cls);\n this.zzhzx = zzebe;\n }", "public static void main(String[] args) {\n ChildOfderived1 cd = new ChildOfderived1(10,20,30);\r\n }", "Parent() {\n\t System.out.println(\"i am from Parent Class\");\n\t }", "public Dipendente() {\r\n\t\tsetnMat();\r\n\t}", "public Dog(String Breed, String PrimaryColor, String Size, String name, int age){\r\n // setting the parent animal name\r\n super(name,age);\r\n // setting the parent animal age\r\n // System.out.println(\"Setting Breed...\");\r\n this.Breed = Breed ;\r\n // System.out.println(\"Setting PrimaryColor...\");\r\n this.PrimaryColor = PrimaryColor;\r\n //System.out.println(\"Setting Size...\");\r\n this.Size = Size;\r\n\r\n\r\n\r\n }", "public void setClassData(RPGClass classData) {\n this.classData = classData;\n }", "private void parse(String input, TypeClass parent) throws IOException {\r\n \t\tString line = input.replaceAll(\"^\\\\s+\", \"\");\r\n \t\tif(line.startsWith(\"class\")) {\r\n \t\t\t\r\n \t\t\tString[] spl = line.split(\" \", 2);\r\n \t\t\tTypeClass typeClass = new TypeClass(spl[1], parent);\r\n \t\t\tparent.getChilds().add(typeClass);\r\n \t\t\tlogger.debug(\"Found class: \" + typeClass);\r\n \t\t\t\r\n \t\t\t\r\n \t\t\twhile(! (line = reader.readLine().replaceAll(\"^\\\\s+\", \"\")).startsWith(\"}\")) {\r\n \t\t\t\tparse(line, typeClass);\r\n \t\t\t}\r\n \t\t\t\r\n \t\t}\t\r\n \t\t\r\n \t\tif(parent.toString().startsWith(\"Vehicles\")) {\r\n \t\t\tif(parent.getObject() == null) {\r\n \t\t\t\tparent.setObject(new Vehicle());\r\n \t\t\t}\r\n \t\t\tTypeClass p = parent.getParent();\r\n \t\t\tif(p.toString().startsWith(\"Item\")) {\r\n \t\t\t\t\r\n \t\t\t\t((Vehicle)parent.getObject()).setSide(((Item)p.getObject()).getSide());\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}\r\n \t\tif(parent.toString().startsWith(\"Item\")) {\r\n \t\t\tif(parent.getObject() == null) {\r\n \t\t\t\tparent.setObject(new Item(parent.toString()));\r\n \t\t\t}\r\n \t\t\tif(line.startsWith(\"position[]\")) {\r\n \t\t\t\tString[] tmp = line.split(\"=\", 2);\r\n \t\t\t\ttmp = tmp[1].split(\",\", 3);\r\n \t\t\t\tString x, y, z;\r\n \t\t\t\tx = tmp[0].replaceAll(\"\\\\{\", \"\");\r\n \t\t\t\tz = tmp[1];\r\n \t\t\t\ty = tmp[2].replaceAll(\"\\\\}\\\\;\", \"\");\r\n \t\t\t\t((Item)parent.getObject()).setPosition(new Position(x, y, \"0\"));\r\n \t\t\t}\r\n \t\t\tif(line.startsWith(\"id\")) {\r\n \t\t\t\tString[] tmp = line.split(\"=\", 2);\r\n \t\t\t\t((Item)parent.getObject()).setId(tmp[1].replaceAll(\"\\\\;\", \"\"));\r\n \t\t\t}\r\n \t\t\tif(line.startsWith(\"side\")) {\r\n \t\t\t\tString[] tmp = line.split(\"=\", 2);\r\n \t\t\t\t((Item)parent.getObject()).setSide(tmp[1].replaceAll(\"\\\\;\", \"\"));\r\n \t\t\t}\r\n \t\t\tif(line.startsWith(\"vehicle\")) {\r\n \t\t\t\tString[] tmp = line.split(\"=\", 2);\r\n \t\t\t\t((Item)parent.getObject()).setVehicle(tmp[1].replaceAll(\"\\\\;\", \"\"));\r\n \t\t\t}\r\n \t\t\tif(line.startsWith(\"skill\")) {\r\n \t\t\t\tString[] tmp = line.split(\"=\", 2);\r\n \t\t\t\t((Item)parent.getObject()).setSkill(tmp[1].replaceAll(\"\\\\;\", \"\"));\r\n \t\t\t}\r\n \t\t\tif(line.startsWith(\"leader\")) {\r\n \t\t\t\tString[] tmp = line.split(\"=\", 2);\r\n \t\t\t\t((Item)parent.getObject()).setLeader(tmp[1].replaceAll(\"\\\\;\", \"\"));\r\n \t\t\t}\r\n \t\t\tif(line.startsWith(\"init\")) {\r\n \t\t\t\tString[] tmp = line.split(\"=\", 2);\r\n \t\t\t\t((Item)parent.getObject()).setInit(tmp[1].replaceAll(\"\\\\;\", \"\"));\r\n \t\t\t}\r\n \t\t\tif(line.startsWith(\"name\")) {\r\n \t\t\t\tString[] tmp = line.split(\"=\", 2);\r\n \t\t\t\t((Item)parent.getObject()).setName(tmp[1].replaceAll(\"\\\\;\", \"\"));\r\n \t\t\t}\r\n \t\t\tif(line.startsWith(\"markerType\")) {\r\n \t\t\t\tString[] tmp = line.split(\"=\", 2);\r\n \t\t\t\t((Item)parent.getObject()).setMarkerType(tmp[1].replaceAll(\"\\\\;\", \"\"));\r\n \t\t\t}\r\n \t\t\tif(line.startsWith(\"type\")) {\r\n \t\t\t\tString[] tmp = line.split(\"=\", 2);\r\n \t\t\t\t((Item)parent.getObject()).setType(tmp[1].replaceAll(\"\\\\;\", \"\"));\r\n \t\t\t}\r\n \t\t\tif(line.startsWith(\"presenceCondition\")) {\r\n \t\t\t\tString[] tmp = line.split(\"=\", 2);\r\n \t\t\t\t((Item)parent.getObject()).setPresenceCondition(tmp[1].replaceAll(\"\\\\;\", \"\"));\r\n \t\t\t}\r\n \t\t\tif(line.startsWith(\"azimut\")) {\r\n \t\t\t\tString[] tmp = line.split(\"=\", 2);\r\n \t\t\t\t((Item)parent.getObject()).setAzimut(tmp[1].replaceAll(\"\\\\;\", \"\"));\r\n \t\t\t}\r\n \t\t}\r\n \t\t\r\n \t}", "public static void main(String[] args) {\n \n\t\t SuperClass sc = new SuperClass();\n\t\t SuperClass sc1 = new SuperClass(5);\n\t\t SuperClass sc2 = new SuperClass(\"P\");\n\t\t SuperClass sc3 = new SuperClass(3,\"R\");\n\t\t SuperClass sc4 = new SuperClass(\"E\",2);\n\t\t \n\t}", "public SuperRodada(){\n this.pontos_em_disputa=0;\n this.truco=false;\n this.Desafiante=null;\n this.addPontosEmDisputa(2);\n Game game = Game.getGame();\n DonoDoBaralho=(DonoDoBaralho==null)?game.getDupla(1).getJogadorA():this.proximoAJogar(DonoDoBaralho);\n \n }", "public Diccionario(){\r\n rz=new BinaryTree<Association<String,String>>(null, null, null, null);\r\n llenDic();\r\n tradOra();\r\n }", "void initData() {\r\n\t\tthis.daVinci = new Artist(\"da Vinci\");\r\n\t\tthis.mona = new Painting(daVinci, \"Mona Lisa\");\r\n\t\t//this.lastSupper = new Painting(this.daVinci, \"Last Supper\");\r\n\t}", "public static void main(String[] args) {\n persegi_panjang pp = new persegi_panjang();\r\n pp.lebar=30;\r\n pp.panjang=50;\r\n Segitiga s = new Segitiga();\r\n s.alas=20;\r\n s.tinggi=40;\r\n Persegi p = new Persegi();\r\n p.sisi=40;\r\n lingkaran l= new lingkaran();\r\n l.jari=20;\r\n \r\npp.luas();\r\npp.keliling();\r\np.luas();\r\np.keliling();\r\ns.luas();\r\ns.keliling();\r\nl.luas();\r\nl.keliling();\r\n}", "public void visit(ClassDeclExtends node) {\n Symbol key = Symbol.symbol(node.name.s);\n ClassInfo data = new ClassInfo(key);\n\n // Chama o firstPass() para as variaveis\n VarDeclListHandler.firstPass(env, data, node.varList);\n\n // Chama o firstPass() para os metodos\n MethodDeclListHandler.firstPass(env, data, node.methodList);\n\n // Insere a classe na tabela\n if (!env.classes.put(key, data)) {\n env.err.Error(node, new Object[] {\"Nome de classe redefinido: \" + key});\n }\n }", "public Pengenalan(){ //Constructor (Nama harus sama dengan Class)\n System.out.println(\"\\nConstructor : \");\n System.out.println(\"Dibutuhkan untuk pemanggilan saat diimport oleh Class lain atau Class sendiri\");\n methode();\n int men = menthos();\n System.out.println(\"Nilai yang didapat dari method menthos : \"+men);\n }", "public abstract Class getDataClass();", "public EntradaClase(String n, Token t) {\r\n\t\tnombre= n;\r\n\t\therencia=null;\r\n\t\ttoken=t;\r\n\t\tconsolidado= hayCtor= false;\r\n\t\tentradaVar= new HashMap<String,EntradaVarInst>();\r\n\t\tentradaMetodo= new HashMap<String,EntradaMetodo>();\r\n\t\tentradaCtor= new HashMap<String, EntradaCtor>();\r\n\t\tmetodosDyn= new ArrayList<EntradaMetodo>();\r\n\t\tmaximoOffsetMetodo= 0;\r\n\t\tmaximoOffsetVarInst= 1; \t\t\t\t//la 0 es para la VT\r\n\t\t\r\n\t\t//listaAsigInline= new ArrayList<NodoAsignacion>();\r\n\t}", "public static void main(String[] args) {\n\t\tInheritence a=new Inheritence();\r\n\t\t\r\n\t\t country();\r\n\tcity();\r\n\tage();\r\n\r\n\ta.flower();\t\r\n\tSystem.out.println(l);\r\n\tSystem.out.println(a.d);\r\n\r\n\t}", "public CianetoClass() {\r\n this.cianetoMethods = new Hashtable<String, Object>();\r\n this.cianetoAttributes = new Hashtable<String, Object>();\r\n }", "public RunePouchHandler(RunePouchListener aSuperClass) {\n this.inventory = aSuperClass.getInventory();\n this.mouse = aSuperClass.getMouse();\n this.superClass = aSuperClass;\n this.bank = aSuperClass.getBank();\n this.interfaces = aSuperClass.getInterfaces();\n this.magic = aSuperClass.getMagic();\n }", "public EtatInitialisation(Controleur controleur) {\n super(controleur);\n super.rendControleur().lancerEcranDemarrage();\n }", "public Data() {\n initComponents();\n koneksi_db();\n tampil_data();\n }", "ByCicle(int weight, String name) {\r\n //super keyword can be used to access the instance variables of superclass\r\n //\"super\" can also be used to invoke parent class constructor and method\r\n super(weight);//Accessign Superclass constructor and its variable\r\n //Global Variable=Local variable\r\n this.name = name;\r\n }", "public Personaje(Juego juego,Celda c) {\r\n\t\tsuper(juego,c);\r\n\t}", "public void setParent(Instance parent) {\r\n \t\tthis.parent = parent;\r\n \t}", "@Override\n public String dataLabel() {\n return STR_LBL_PARENT;\n }", "public void inizializza() {\n\n /* invoca il metodo sovrascritto della superclasse */\n super.inizializza();\n\n }", "public BoletoCodigoDeBarrasDV() {\n\n\t\tsuper();\n\t}", "public TreeImpl(T dato) {\r\n\t\traiz = new NodeImpl<T>(dato, null);// El null dice que es raiz\r\n\t}", "public static void main(String[] args) {\n Class clazz = String.class;\n\n // Obtendo o nome da classe, incluindo o pacote que pertence\n String nome = clazz.getName();\n\n // Obtendo a Super Classe\n Class superClasse = clazz.getSuperclass();\n\n System.out.println(\"Nome da classe: \" + nome);\n System.out.println(\"Super classe: \" + superClasse);\n\n System.out.print(\"\\n\");\n\n // Obtendo o objecto Class\n clazz = Pessoa.class;\n\n // Obtendo o nome da classe, incluindo o pacote que pertence\n nome = clazz.getName();\n\n // Obtendo a Super Classe\n superClasse = clazz.getSuperclass();\n\n System.out.println(\"Nome da classe: \" + nome);\n System.out.println(\"Super classe: \" + superClasse);\n\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 Nodo(datos libro)\n {\n this.libro=libro;//LA VARIABLE LIBRO TENDRA LOS DATOS DE LA CLASE LIBRO\n }", "public ValorPorUnidadLogic()throws SQLException,Exception {\r\n\t\tsuper();\r\n\t\t\r\n\t\ttry\t{\t\t\t\t\t\t\r\n\t\t\tthis.valorporunidadDataAccess = new ValorPorUnidadDataAccess();\r\n\t\t\t\r\n\t\t\tthis.valorporunidads= new ArrayList<ValorPorUnidad>();\r\n\t\t\tthis.valorporunidad= new ValorPorUnidad();\r\n\t\t\t\r\n\t\t\tthis.valorporunidadObject=new Object();\r\n\t\t\tthis.valorporunidadsObject=new ArrayList<Object>();\r\n\t\t\t\t\r\n\t\t\t/*\r\n\t\t\tthis.connexion=new Connexion();\r\n\t\t\tthis.datosCliente=new DatosCliente();\r\n\t\t\tthis.arrDatoGeneral= new ArrayList<DatoGeneral>();\r\n\t\t\t\r\n\t\t\t//INICIALIZA PARAMETROS CONEXION\r\n\t\t\tthis.connexionType=Constantes.CONNEXIONTYPE;\r\n\t\t\tthis.parameterDbType=Constantes.PARAMETERDBTYPE;\r\n\t\t\t\r\n\t\t\tif(Constantes.CONNEXIONTYPE.equals(ConnexionType.HIBERNATE)) {\r\n\t\t\t\tthis.entityManagerFactory=ConstantesCommon.JPAENTITYMANAGERFACTORY;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tthis.datosDeep=new DatosDeep();\r\n\t\t\tthis.isConDeep=false;\r\n\t\t\t*/\r\n\t\t\t\r\n\t\t\tthis.valorporunidadDataAccess.setConnexionType(this.connexionType);\r\n\t\t\tthis.valorporunidadDataAccess.setParameterDbType(this.parameterDbType);\r\n\t\t\t\r\n\t\t\t\r\n\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tthis.invalidValues=new InvalidValue[0];\r\n\t\t\tthis.stringBuilder=new StringBuilder();\r\n\t\t\tthis.conMostrarMensajesStringBuilder=true;\r\n\t\t\t\r\n\t\t} catch(Exception e) {\r\n\t\t\tFunciones.manageException(logger,e);\r\n\t\t\tthrow e;\r\n\t\t}\t \r\n }", "public Bodega(@JsonProperty(value=\"id\") int id, @JsonProperty(value=\"estado\") char estado, @JsonProperty(value=\"tipo\") char tipo,@JsonProperty(value=\"ancho\") double ancho\r\n\t\t\t,@JsonProperty(value=\"largo\") double largo,@JsonProperty(value=\"plataformaExterna\") boolean plataformaExterna\r\n\t\t\t,@JsonProperty(value=\"tipoDeCarga\")TipoDeCarga tipoDeCarga,@JsonProperty(value=\"separacion\") double separacion\r\n\t\t\t, @JsonProperty(value=\"cuartosFrios\") List<CuartoFrio> cuartosFrios,@JsonProperty(value=\"entradas\") List<Operacion>entradas, @JsonProperty(value=\"salidas\") List<Operacion>salidas)\r\n\t{\r\n\t\tsuper(id,estado,tipo,entradas,salidas);\r\n\t\t\r\n\t\tthis.ancho=ancho;\r\n\t\tthis.largo=largo;\r\n\t\tthis.plataformaExterna=plataformaExterna;\r\n\t\tthis.tipoDeCarga=tipoDeCarga;\r\n\t\tthis.separacion=separacion;\r\n\t\tthis.setCuartosFrios(cuartosFrios);\r\n\t}", "private List<ParentObject> initData() {\n TitleCreator titleCreator = TitleCreator.get();\n List<ParentObject> parentObject = new ArrayList<>();\n titleCreator.clearTitles();\n\n /*Get di tutti gli utenti ordinati per punteggio (dal maggiore al minore)*/\n Collection<User> allUser = UsersManager.getInstance().getAllUserSort(UsersManager.OrderType.TOTAL_SCORE, false);\n\n int count = 1; /*Variabile usata per mostrare la posizione in classifica*/\n User currentUser = UsersManager.getInstance().getCurrentUser();/*Caricamento utente corrente*/\n int position = 0;\n for (User user : allUser) {\n\n boolean isCurrentUser = false;\n\n /*Cerco l'utente corrente*/\n if(user.equals(currentUser)){\n isCurrentUser = true;\n find = position;\n }\n\n /*Set del titolo dell'elemento della leaderboard. Contiene la posizione in classifica, il nome utente, il suo punteggio\n * una variabile boolean che viene usata per evidenziare il testo solo se si tratta dell'utente corrente e l'indice\n * dell'elemento della recyclerView che viene usato per lo scorll automatico della recyclerView quando si clicca sul bottone*/\n TitleParent title = new TitleParent(count + \"° \" + user.name, user.getTotalScore(), isCurrentUser, position);\n\n position++;\n count++;\n\n /*Aggiunta degli score del singolo gioco*/\n List<Object> childList = new ArrayList<>();\n\n childList.add(new TitleChild(\n GameHelper.getGameName(GameHelper.Games.TETRIS),\n GameHelper.getGameName(GameHelper.Games.GAME_2048),\n GameHelper.getGameName(GameHelper.Games.ENDLESS),\n GameHelper.getGameName(GameHelper.Games.HELICOPTER),\n GameHelper.getGameName(GameHelper.Games.FROGGER),\n user.scoreTetris,\n user.score2048,\n user.scoreAlienrun,\n user.scoreHelicopter,\n user.scoreFrogger\n )\n );\n\n title.setChildObjectList(childList);\n titleCreator.addTitle(title);\n parentObject.add(title);\n }\n\n return parentObject;\n }", "public static void main(String[] args) {\n Animal unAnimalRavioso = new Animal();\n System.out.println(unAnimalRavioso.informaEnergia());\n\n //Al objeto le digo que corra\n unAnimalRavioso.correr();\n\n //Imprimo la energia\n System.out.println(unAnimalRavioso.informaEnergia());\n\n Comida unPaty = new Comida();\n unPaty.setEnergia(120);\n System.out.println(unPaty.getEnergia());\n\n System.out.println(\"Energia antes de comer paty \" + unAnimalRavioso.informaEnergia());\n unAnimalRavioso.comer(unPaty);\n\n System.out.println(\"Energia despues de comer paty \" + unAnimalRavioso.informaEnergia());\n\n Perro perroCobarde = new Perro();\n perroCobarde.hacerRuido();\n\n Gato gatoCobarde = new Gato();\n ArrayList<Animal>animales = new ArrayList<>();\n\n animales.add(perroCobarde);\n animales.add(gatoCobarde);\n\n System.out.println(\"hacer ruido animales\");\n for (Animal unAnimal:animales) {\n unAnimal.hacerRuido();\n }\n\n\n\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 }", "private Noder(E data) {\n this.data = data;\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Parent class object\");\n\t}", "public void pruebaDesdeClase3() {\n Clase1 clase1 = new Clase1();\n System.out.println(\"\");\n System.out.println(\"Atributo público: \" + clase1.atrPublico + \" o heredado: \" + atrPublico);\n System.out.println(\"Atributo protegido (heredado): \" + atrProtegido);\n System.out.println(\"Atributo de paquete: no se puede acceder desde paquete externo\");\n System.out.println(\"Atributo privado: acceso denegado\");\n \n //constructor público\n new Clase1();\n //Los demás constructores no se pueden probar así, sino desde el constructor de esta clase\n //ya que esta es una subclase en otro paquete\n \n System.out.println(\"\");\n System.out.println(\"Método público: \" + clase1.metodoPublico());\n System.out.println(\"Método protegido (heredado): \" + metodoProtegido());\n System.out.println(\"Método de paquete: no se puede acceder desde un paquete externo\");\n System.out.println(\"Método privado: acceso denegado\");\n }", "public ArmasHija2(int objetoHija2){\r\n super(objetoHija2);\r\n this.objetoHija2=objetoHija2;\r\n }", "@Override\n public String getClassName() {\n return kelas;\n }", "@Override\n public String getClassName() {\n return kelas;\n }", "public DesastreData() { //\r\n\t}", "@Test public void testInheritance () {\n ArrayList<String> point = new ArrayList<String>(\n Arrays.asList(\"qimpp\", \"Point\") );\n GNode pointNode = treeManager.dereference(point);\n\n ArrayList<String> colorPoint = new ArrayList<String>(\n Arrays.asList(\"qimpp\", \"ColorPoint\") );\n GNode colorNode = treeManager.dereference(colorPoint);\n\n assertTrue( colorNode != null );\n assertTrue( pointNode != null );\n GNode g = (GNode)(treeManager.getParent(colorNode).getProperty(\"ClassDeclaration\"));\n \n\n assertTrue( treeManager.getParent(colorNode) == pointNode );\n\n //\n // Test distinction between package names\n //\n\n ArrayList<String> otherColor =\n new ArrayList<String>( Arrays.asList(\"org\", \"fake\",\n \"ColorPoint\"));\n GNode otherColorNode = treeManager.dereference(otherColor);\n\n assertTrue( otherColorNode != null );\n assertTrue( treeManager.getParent( otherColorNode )\n != treeManager.getParent(colorNode) );\n assertTrue( otherColorNode != colorNode );\n }", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "public static void main(String args[]){\n\tClasschild T=new Classchild();\n\tClass1 c=new Class1();\n\tc.addition();\n\tc.subtraction();\n\tT.multiplication();\n\t\n}", "public Eroeffnungsseite(SpielGUI parent) {\r\n super();\r\n this.parent = parent;\r\n hintergrund = parent.getFarben()[0];\r\n buttonFarbe = parent.getFarben()[1];\r\n init();\r\n }", "public Parent() {\n super();\n }", "public BaseDatos() {\r\n super();\r\n listaNumeros.add(6.0f);\r\n }", "public Camion(int peso,Marcas marca,int kilometraje,int antiguedad) {\n super(peso,marca,kilometraje,antiguedad);\n if (super.getMarca().equals(\"FORD\")|| super.getMarca().equals(\"FIAT\"))\n {\n super.setArticulado();\n }\n if(super.getArticulado() && getPeso()<3000)\n {\n super.setCumpleNormativa();\n }\n if(!super.getArticulado() && getPeso()<2000)\n {\n super.setCumpleNormativa();\n }\n\n }", "public void setParent(PafDimMember parent) {\r\n\t\tthis.parent = parent;\r\n\t}", "public static void main(String[] args) {\nChild c = new Child();\nc.display();// here the object c which is created for child class poses the property of parent class\nc.displayOne();\n\t}", "public void setORM_Parent(orm.Nomenclature value) {\r\n\t\tthis.parent = value;\r\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"class ChildClass\";\n\t}", "private void setupInheritanceStructure() throws PhiException{\n\n a = new PhiCollection();\n b = new PhiCollection();\n c = new PhiCollection();\n d = new PhiCollection();\n aSuper = new PhiCollection();\n bSuper = new PhiCollection();\n PhiCollection cSuper = new PhiCollection();\n\n //Setup inheritance\n aSuper.createMember(new PhiInt(1));\n aSuper.setUnnamed(0, b);\n aSuper.setUnnamed(1, c);\n a.setNamed(\"super\", aSuper);\n\n bSuper.createMember(new PhiInt(0));\n bSuper.setUnnamed(0, d);\n b.setNamed(\"super\", bSuper);\n\n cSuper.createMember(new PhiInt(0));\n cSuper.setUnnamed(0, d);\n c.setNamed(\"super\", cSuper);\n\n //Fill collections\n a.createMember(new PhiSymbol(\"test1\"));\n a.createMember(new PhiInt(0));\n a.setNamed(\"test1\", new PhiString(\"a\"));\n a.setUnnamed(0, new PhiInt(1));\n\n b.createMember(new PhiSymbol(\"test1\"));\n b.createMember(new PhiSymbol(\"test2\"));\n b.createMember(new PhiInt(0));\n b.setNamed(\"test1\", new PhiString(\"b\"));\n b.setNamed(\"test2\", new PhiString(\"x\"));\n b.setUnnamed(0, new PhiInt(2));\n\n c.createMember(new PhiSymbol(\"test1\"));\n c.createMember(new PhiInt(1));\n c.setNamed(\"test1\", new PhiString(\"c\"));\n c.setUnnamed(0, new PhiInt(3));\n c.setUnnamed(1, new PhiInt(5));\n\n d.createMember(new PhiSymbol(\"test1\"));\n d.createMember(new PhiSymbol(\"test2\"));\n d.createMember(new PhiInt(1));\n d.setNamed(\"test1\", new PhiString(\"d\"));\n d.setNamed(\"test2\", new PhiString(\"y\"));\n d.setUnnamed(0, new PhiInt(4));\n d.setUnnamed(1, new PhiInt(6));\n }", "d(a aVar) {\n super(0);\n this.this$0 = aVar;\n }", "public ClassVariables(SQLTagsGeneratorTable sqlTagsGeneratorTable){\n //---------------------------------------------------------------------------\n this.sqlTagsGeneratorTable=sqlTagsGeneratorTable;\n this.tableName=sqlTagsGeneratorTable.getTableName();\n createClassVariables();\n }", "@Override\n\tpublic String getBaseDataClassName() {\n\t\treturn \"\";\n\t}", "public Corriente(int numero, long saldo, Persona titular, String tipoCuenta) {\r\n super(numero, saldo, titular, tipoCuenta);\r\n\r\n }", "public MorteSubita() {\n }", "public FE_isSubj() { this.name = \"isSubj\";\t}", "public Classe() {\r\n }", "public FaMasterdata() {\n initComponents();\n \n load_buku();\n load_anggota();\n }", "public void Data(){\n\t\t\t\t\t\t\n\t\t\t\t\t}", "private void buildGraph(Classes classes) {\n \t\n\tadjacencyList.put(TreeConstants.Object_.getString(), new ArrayList<String>() );\n\t//add primitives to the children of object\n ArrayList<String> objectlist = adjacencyList.get(TreeConstants.Object_.getString());\n objectlist.add(TreeConstants.IO.getString());\n objectlist.add(TreeConstants.Int.getString());\n objectlist.add(TreeConstants.Bool.getString());\n objectlist.add(TreeConstants.Str.getString());\n adjacencyList.put(TreeConstants.Object_.getString(), objectlist);\n \tfor (Enumeration e = classes.getElements(); e.hasMoreElements(); ) {\n \t class_c currentClass = ((class_c)e.nextElement());\n \n \t // If the same class name is already present, that's a redefinition error\n \t String className = currentClass.getName().toString();\n \t if (!nameToClass.containsKey(className)) {\n \t \tnameToClass.put(currentClass.getName().toString(), currentClass);\n \t } else {\n \t \tsemantError(currentClass).println(\"Class \" + className + \" was previously defined\");\n \t \tcontinue;\n \t }\n \t // if parent already present in HashMap, append child to list of children\n \t String parent = currentClass.getParent().toString();\n \t if ( !adjacencyList.containsKey(parent) ) {\n \t\tadjacencyList.put(parent, new ArrayList<String>() );\n \t }\n \t adjacencyList.get(parent).add(currentClass.getName().toString());\n \t}\n \n // Check if each parent in a parent-child inheritance is a valid class\n HashSet<String> bogusClasses = new HashSet<String>();\n for (String parent : adjacencyList.keySet()) {\n \tif (!nameToClass.containsKey(parent)) {\n \t\tfor (String child: adjacencyList.get(parent)) {\n \t\t\tsemantError(nameToClass.get(child)).println(\"Class \" + child + \" inherits from an undefined class \" + parent);\n \t\t}\n \t\t// Remove the bogus parent class from the graph\n \t\tbogusClasses.add(parent);\n \t}\n }\n // Remove the bogus parent class from the graph\n for (String bogus : bogusClasses) {\n \tadjacencyList.remove(bogus);\n }\n if (Flags.semant_debug) {\n \tSystem.out.println(\"Pruned out unreachable classes\");\n }\n \n // Also check if someone's inheriting from the Basic classes other than Object & IO\n for (String child : adjacencyList.get(TreeConstants.Int.getString())) {\n \tsemantError(nameToClass.get(child)).println(\"Class \" + child + \" illegally inherits from class Int\");\n }\n for (String child : adjacencyList.get(TreeConstants.Str.getString())) {\n \tsemantError(nameToClass.get(child)).println(\"Class \" + child + \" illegally inherits from class Str\");\n }\n for (String child : adjacencyList.get(TreeConstants.Bool.getString())) {\n \tsemantError(nameToClass.get(child)).println(\"Class \" + child + \" illegally inherits from class Bool\");\n }\n // No point in continuing further. The above classes are going to propagate more errors\n if (Flags.semant_debug) {\n \tSystem.out.println(\"Checked for simple inheritance errors\");\n }\n if (errors()) {\n \treturn;\n }\n \n \t// Now check for cycles\n \t// Do the depth first search of this adjacency list starting from Object\n \tHashMap<String, Boolean> visited = new HashMap<String, Boolean>();\n \tfor (String key : adjacencyList.keySet() ) {\n \t\tvisited.put(key, false);\n \t\tfor ( String value : adjacencyList.get(key) ) {\n \t\t\tvisited.put(value, false);\n \t\t}\n \t}\n \tdepthFirstSearch(visited, TreeConstants.Object_.toString());\n \t// It is legal to inherit from the IO class. So mark classes down that tree as well\n\t\n\t/*depthFirstSearch(visited, TreeConstants.IO.getString());\n \t// Check for unreachable components - unreachable classes are cycles\n \t// Except the Bool, IO, Int and String. Hack - set them to true\n \tvisited.put(TreeConstants.IO.getString(), true);\n \tvisited.put(TreeConstants.Bool.getString(), true);\n \tvisited.put(TreeConstants.Str.getString(), true);\n \tvisited.put(TreeConstants.Int.getString(), true);\n\t*/\n \tfor (String key : visited.keySet()) {\n \t\tif (!visited.get(key)) {\n \t\t\tsemantError(nameToClass.get(key)).println(\"Class \" + key + \" or an ancestor is involved in an inheritance cycle.\");\n \t\t}\n \t} \n \n \tif (Flags.semant_debug) {\n \t\tSystem.out.println(\"Checked for cycles\");\n \t}\n \t}", "public Eingabetabelle(Component parent, String lokaleDB) {\n this.parent = parent;\n this.lokaleDB = lokaleDB;\n }", "public static void main(String[] args) \n\t{\n\t\tChildinteritanceClass obj1=new ChildinteritanceClass();\n\t\tobj1.sum();\n\t\tobj1.sub();\n\t\tobj1.Div();\n\t\tobj1.Mul();\n\n\t}", "public Comida(String nombre){\n super(nombre);\n this.calorias = 10;\n }", "public void addData(TreeNodo parent, Menu row)\r\n {\n parent.setIdmenu(row.getIdmenu());\r\n parent.setLabel(row.getLabel());\r\n parent.setIcon(row.getIcon());\r\n parent.setLeaf(row.getLeaf());\r\n// if(row.getLeaf() == 1){\r\n// \tString a[] = new String[1];\r\n// \ta[0] = row.getRouterlink();\r\n// \tparent.setRouterlink(a[0]);\r\n// }\r\n \r\n \r\n// List<TreeNodo> items = new ArrayList<>();\r\n// TreeNodo tn = new TreeNodo();\r\n// items.add(tn);\r\n// parent.setLstTreeNodo(items);\r\n itemsRoot.add(parent);\r\n \r\n }", "@Override\n\tpublic void tipoInteligencia() {\n\t\tSystem.out.println(super.getNome() + \" é um animal \" + ((super.isRacional() == true) ? \"racional.\" : \"irracional.\"));\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public void chequearDeclaraciones() throws Exception{\n\t\tfor (EntradaVarInst v: entradaVar.values()) {\r\n\t\t\t\t//si es de tipo idClase,\r\n\t\t\t\tif (noTipoPrimitivo(v.getTipo().getTipo())) {\r\n\t\t\t\t\t\t//ahora si veo si esa clase esta declarada\r\n\t\t\t\t\t\t// si no es asi -> error\r\n\t\t\t\t\t\tif (Analizador_Sintactico.TS.esClaseDeclarada(v.getTipo().getTipo())==null)\r\n\t\t\t\t\t\t\tthrow new claseNoDeclarada(v.getTipo().getTipo(), v.getToken().getNroLinea(), v.getToken().getNroColumna());\r\n\t\t\t\t}\t\r\n\t\t}//fin for\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//Chequeo cada Ctor de mi clase\r\n\t\tfor (EntradaCtor c: entradaCtor.values()) {\t\r\n\t\t\t//chequeo parametros del Ctor...\r\n\t\t\t//para cada parametro de mi metodo\r\n\t\t\tfor (EntradaPar p: c.getEntradaParametros()) {\r\n\t\t\t\t//si es de tipo idClase, chequeo que ese idClase exista\r\n\t\t\t\tif (noTipoPrimitivo(p.getTipo().getTipo())) {\r\n\t\t\t\t\t\t// si no es asi -> error\r\n\t\t\t\t\t\tif (Analizador_Sintactico.TS.esClaseDeclarada(p.getTipo().getTipo())==null)\r\n\t\t\t\t\t\t\tthrow new claseNoDeclarada(p.getTipo().getTipo(), p.getToken().getNroLinea(), p.getToken().getNroColumna());\r\n\t\t\t\t}\r\n\t\t\t}//fin for\r\n\t\t}//fin for\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//Chequeo metodos de mi clase:\r\n\t\t//para cada metodo de mi clase\r\n\t\tfor (EntradaMetodo m: entradaMetodo.values()) {\r\n\t\t\t\r\n\t\t\t// si no es un tipo de dato primitivo, chequeo que esa clase/tipo de dato exista\r\n\t\t\tif (noTipoPrimitivo(m.getTipoRetorno().getTipo())) {\r\n\t\t\t\t\t//si no es clase declarada -> error\r\n\t\t\t\t\tif (Analizador_Sintactico.TS.esClaseDeclarada(m.getTipoRetorno().getTipo())==null)\r\n\t\t\t\t\t\tthrow new claseNoDeclarada(m.getTipoRetorno().getTipo(), m.getToken().getNroLinea(), m.getToken().getNroColumna());\t\t\r\n\t\t\t}//fin if\r\n\t\t\t\r\n\t\t\t//para cada parametro de mi metodo\r\n\t\t\tfor (EntradaPar p: m.getEntradaParametros()) {\r\n\t\t\t\t\t//si es de tipo idClase, chequeo que ese idClase exista\r\n\t\t\t\t\tif (noTipoPrimitivo(p.getTipo().getTipo())) {\r\n\t\t\t\t\t\tif (Analizador_Sintactico.TS.esClaseDeclarada(p.getTipo().getTipo())==null)\r\n\t\t\t\t\t\t\tthrow new claseNoDeclarada(p.getTipo().getTipo(), p.getToken().getNroLinea(), p.getToken().getNroColumna());\t\r\n\t\t\t\t\t}\r\n\t\t\t}//fin for p\r\n\t\t\t\r\n\t\t\tif (m.getModificador().equals(\"dynamic\"))\r\n\t\t\t\tmetodosDyn.add(m);\r\n\t\t\r\n\t\t}//fin for m\r\n\t\t\r\n\t\t\r\n\t}", "public MonteurDetailModel(Object[][] data) {\n\t\tsetAfsprakenHeader(new String[] { \"Start Tijd\", \"Eind Tijd\",\n\t\t\t\t\"Bezigheid\", \"ReparatieID\", \"Monteur\" });\n\t\tsetAutoHeader(new String[] { \"Auto nummer\", \"Kenteken\", \"BouwJaar\",\n\t\t\t\t\"Merk\", \"Model\" });\n\n\t\tgeplandeAfspraken = data;\n\t\tautos = data;\n\n\t\tvoorNaam = \"Voornaam\";\n\t\tachterNaam = \"Achternaam\";\n\t\tadres = \"Straatnaam etc\";\n\t\twoonplaats = \"Kutgat\";\n\t\tpostcode = \"Vage nummers\";\n\n\t\tuurLoon = 20.00;\n\t\tpersoonID = 1337;\n\t}", "public static void main(String[] args){\n System.out.println(SubClass.age);\n }", "public VotacaoSegundoDia() {\n\n\t}", "public CarteCaisseCommunaute() {\n super();\n }", "public Casa() { \n \n /* Cuando se crea la casa, tambien se debe crear la puerta */\n \n laPuerta = new Puerta();\n \n /* se pone la letra F por que son de tipo float */\n laPuerta.setAncho(2.3F);\n laPuerta.setAlto(1.5F);\n \n }" ]
[ "0.5818728", "0.5661976", "0.5648935", "0.55788314", "0.55303323", "0.5485945", "0.54833245", "0.5460548", "0.5436008", "0.54163337", "0.5398448", "0.539367", "0.53507495", "0.53430045", "0.53160816", "0.5305262", "0.5293073", "0.5287589", "0.52759016", "0.5260863", "0.52562237", "0.5255962", "0.52531195", "0.5241133", "0.52233636", "0.5217488", "0.52054495", "0.5198307", "0.51966125", "0.51866084", "0.518597", "0.51725066", "0.5171926", "0.5168024", "0.5157113", "0.51505333", "0.5141112", "0.51382387", "0.51290935", "0.51260996", "0.5116997", "0.5105998", "0.5105175", "0.50969416", "0.50958455", "0.5092443", "0.5090841", "0.5090645", "0.50808847", "0.50694686", "0.5055301", "0.5047818", "0.5046829", "0.5046089", "0.50447994", "0.5040242", "0.50344616", "0.502854", "0.50251424", "0.5016845", "0.5008463", "0.50044817", "0.50009644", "0.50002426", "0.49863723", "0.49855685", "0.49836093", "0.4982504", "0.49782494", "0.49773845", "0.4976902", "0.49717218", "0.4965447", "0.4963353", "0.49618882", "0.49612197", "0.49436468", "0.494316", "0.4931483", "0.49312434", "0.49310088", "0.49288923", "0.49254316", "0.4917171", "0.4913644", "0.49105152", "0.4910299", "0.49096364", "0.49052727", "0.49051598", "0.49038464", "0.4900701", "0.48992226", "0.489885", "0.48884913", "0.48865977", "0.48865074", "0.48824316", "0.48743758", "0.48681614", "0.486722" ]
0.0
-1
define which file View it connects
Individual createIndividual();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface FileView {\n\n /**\n * 设置标题\n * @param preText 前标题\n * @param nowText 现标题\n */\n void setTitle(String preText, String nowText);\n\n /**\n * 给列表设置适配器\n * @param adapter 适配器\n */\n void setAdapter(DocumentFileAdapter adapter);\n\n /**\n * 获取适配器\n * @return 适配器\n */\n DocumentFileAdapter getAdapter();\n\n /**\n * 设置刷新条\n * @param b 设置控制\n */\n void setRefreshing(boolean b);\n\n /**\n * 显示密码框\n */\n void showPasswordView();\n\n /**\n * u盘插入的操作\n * @param intent\n */\n void onUDiskInsert(Intent intent);\n\n /**\n * u盘移除的操作\n * @param intent\n */\n void onUDiskRemove(Intent intent);\n}", "@Override\n\tprotected String getView() {\n\t\treturn SOTGView.CONTECT_VIEW;\n\t}", "@Override\n\tpublic String getViewIdentifier() {\n\t\treturn ClassUtils.getUrl(this);\n\t}", "@Override\n\tpublic String getViewIdentifier() {\n\t\treturn ClassUtils.getUrl(this);\n\t}", "@Override\r\n\tpublic String getViewIdentifier() {\n\t\treturn ClassUtils.getUrl(this);\r\n\t}", "public String getViewFilename(String viewName) {\n\t\treturn viewName + \".ser\";\n\t}", "Views getViews();", "public interface View {\n\n\n /**\n * Launch the view or CLI.\n */\n void launch();\n\n}", "private void loadViews(){\n\t}", "public String getView();", "public String getView();", "String getViewExtension();", "public abstract String getView();", "private void setViews() {\n\n }", "private void registerViews() {\n\t}", "public interface Viewer {\n\n int getCurrentView();\n\n}", "String getViewClass();", "@Override\n protected String getViewBasePath() {\n //region your codes 2\n return \"/content/domain/\";\n //endregion your codes 2\n }", "String getViewType();", "interface ViewCreator {\n /**\n * Creates a view\n * @param path\n * @param sql\n * @param sqlContext\n */\n void createView(List<String> path, String sql, List<String> sqlContext, NamespaceAttribute... attributes);\n\n /**\n * Updates a view\n * @param path\n * @param sql\n * @param sqlContext\n * @param attributes\n */\n void updateView(List<String> path, String sql, List<String> sqlContext, NamespaceAttribute... attributes);\n\n /**\n * Drops a view\n * @param path\n */\n void dropView(List<String> path);\n }", "@Override\n\tpublic FileSelectDialog setView(View view) {\n\t\tthrow new Error(\"You cannot customize the view of a FileSelectDialog, \" +\n\t\t\t\t\"this feature would override the actual list\");\n\t}", "@Override\n\tprotected Class<? extends IView> getViewInterface() {\n\t\treturn IDirectoryView.class;\n\t}", "View getActiveView();", "@Override\n protected String getViewBasePath() {\n //region your codes 2\n return \"/operation/activityHall\";\n //endregion your codes 2\n }", "public interface SettingsView extends BaseView {\n}", "@Override\n protected AbstractUrlBasedView buildView(String viewName) throws Exception {\n try (InputStream stream = getServletContext().getResourceAsStream(getPrefix() + \"/custom/jsp/\" + viewName + getSuffix())) {\n return super.buildView(\"/\" + (stream == null ? \"common\" : \"custom\") + \"/jsp/\" + viewName);\n }\n }", "private void findViews() {\n serverView = findViewById(R.id.server_view);\n portView = findViewById(R.id.port_view);\n usernameView = findViewById(R.id.username_view);\n passwordView = findViewById(R.id.password_view);\n messageView = findViewById(R.id.message_view);\n uploadButtonView = findViewById(R.id.upload_button_view);\n }", "public interface ViewInterface {\n\n\n /**\n * Get the set of feature callbacks that the view can use.\n *\n * @param f the set of feature callbacks as a Features object\n */\n void setFeatures(Features f) throws Exception;\n\n\n /**\n * Set the image that is showing what the model stores.\n * @param image a IViewModel that the model image data represents.\n */\n void setImage(IViewModel image);\n\n\n /**\n * Handle the error thrown during the interaction between the view and user.\n * @param ex the exception that is thrown\n */\n void handleError(Exception ex);\n\n\n /**\n * It cleans the script text area in the view.\n */\n void cleanScript();\n\n /**\n * It shows success dialog.\n */\n void showSuccess();\n\n /**\n * It returns the path of the chosen file.\n * file.\n * @return Null if user doesn't choose any file else the chosen file's path\n */\n String userChosen();\n\n /**\n * It returns the user input String.\n * @param question the question that user will see.\n * @return null if user doesn't give any input else user's String input.\n */\n String userInput(String question);\n\n /**\n * User will enter a file name and choose a directory where they want to save the file\n * with the file name. It returns the file path including the file name that the user picks.\n * @param question The question that asks the file name.\n * @return A string that represents the file path.\n */\n String userStoreAddress(String question);\n\n /**\n * It returns the String in text area.\n * @return user's input from text area\n */\n String userInputFromTextArea();\n\n /**\n * It returns the color that the user chooses.\n * @return a color\n */\n Color userColorChoose();\n\n /**\n * It returns the point that the user clicks with mouse.\n * @return a point\n */\n Point userClickPoint();\n\n\n\n\n\n\n}", "@Override\n protected String getViewBasePath() {\n return \"/game/\";\n //endregion your codes 2\n }", "public interface View {\n}", "public interface View {\n}", "private void addViews() {\n\t}", "public interface BaseView {\n\n}", "public interface BaseView {\n\n}", "public interface BaseView {\n\n}", "public interface BaseView {\n\n}", "@SuppressWarnings(\"resource\")\r\n\t@RestMethod(name=\"VIEW\", path=\"/*\")\r\n\tpublic void doView(RestRequest req, RestResponse res) throws Exception {\r\n\r\n\t\tif (! allowViews)\r\n\t\t\tthrow new RestException(SC_METHOD_NOT_ALLOWED, \"VIEW not enabled\");\r\n\r\n\t\tFile f = new File(rootDir.getAbsolutePath() + req.getPathInfo());\r\n\r\n\t\tif (!f.exists())\r\n\t\t\tthrow new RestException(SC_NOT_FOUND, \"File not found\");\r\n\r\n\t\tif (f.isDirectory())\r\n\t\t\tthrow new RestException(SC_METHOD_NOT_ALLOWED, \"VIEW not available on directories\");\r\n\r\n\t\tres.setOutput(new FileReader(f)).setContentType(\"text/plain\");\r\n\t}", "public void configure(T aView) { }", "public String getView(String viewName) {\n\t\t\n\t\treturn prefix + viewName + suffix;\n\t}", "public interface BaseView {\n}", "public interface BaseView {\n}", "public interface BaseView {\n}", "public interface BaseView {\n}", "public interface BaseView {\n}", "public interface BaseView {\n}", "public interface BaseView {\n}", "public interface View_1 extends BaseView {\n\n void viewCall(String result);\n}", "public interface FileConstract {\n interface FileView extends BaseView<FilePresenter> {\n void refreshUI(List<FileBean> data);\n void showToast(String msg);\n }\n\n interface FilePresenter extends BasePresenter {\n void initData();\n\n void uploadFile(String path);\n }\n\n}", "@Override\r\n\tprotected String getView() {\n\t\treturn OBSView.PARTS_VIEW;\r\n\t}", "void view();", "protected String getView() {\r\n/* 216 */ return \"/jsp/RoomView.jsp\";\r\n/* */ }", "@Override\r\n\tprotected void initViews() {\n\t\t\r\n\t}", "String getViewName() {\n\t\treturn this.viewName;\n\t}", "public interface CDOViewProvider\n{\n public static final int DEFAULT_PRIORITY = 500;\n\n /**\n * Returns the priority of this provider. Usually used to choose between several <code>CDOViewProvider</code> that\n * match the same repository URI.\n */\n public int getPriority();\n\n /**\n * Returns the regular expression that determines if the provider can handle certain URI\n */\n public String getRegex();\n\n /**\n * Checks if the URI matches with the regular expression of this provider\n */\n public boolean matchesRegex(URI uri);\n\n /**\n * Receives a URI and returns an opened <code>CDOView</code> against the repository. The implementer is responsible to\n * do the UUID to physical host map in case necessary.\n *\n * @return a wired-up and opened <code>CDOView</code>\n */\n public CDOView getView(URI uri, ResourceSet resourceSet);\n\n /**\n * @since 4.0\n */\n public URI getResourceURI(CDOView view, String path);\n}", "public FileManagerController() {\n fileSystemView = FileSystemView.getFileSystemView();\n desktop = Desktop.getDesktop();\n previewFactory = new PreviewFactory();\n initView();\n }", "public interface IView {\n\n\n\n\n\n}", "private void openView(String viewToOpen)\n throws IOException, InterruptedException, URISyntaxException {\n Parent root = null;\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(getClass().getResource(viewToOpen + \"/\" + viewToOpen + \".fxml\"));\n root = loader.load();\n\n if (\"view0\".equals(viewToOpen)) {\n view0Controller = loader.getController();\n view0Controller.init(getVmFactory());\n }\n\n Scene s;\n s = new Scene(root);\n primaryStage.setScene(s);\n primaryStage.initStyle(StageStyle.UNDECORATED);\n primaryStage.initStyle(StageStyle.TRANSPARENT);\n primaryStage.show();\n\n // getcounter/iteratorvalue\n\n }", "public interface FingerprintPromptView extends BaseView {\n\n}", "@Override\n\tpublic void staticFindViewByView() {\n\t\t\n\t}", "public interface NewSerieView {\r\n\r\n public void saveSerie();\r\n\r\n void browseSerieImage();\r\n}", "public abstract void initViews();", "private void initViews() {\n\n\t}", "public void viewLibrary(View view){\n Intent intent = new Intent(this, DisplayLibraryActivity.class);\n startActivity(intent);\n }", "public CDOView getView(URI uri, ResourceSet resourceSet);", "public FileChooserView(Frame owner) {\n super(owner, true);\n initComponents();\n fileChooser.addActionListener(this);\n }", "public void initViews(){\n }", "public final String getViewName() {\n\t\treturn viewName;\n\t}", "public interface IMainView extends BaseView<IMainPresenter>{\n void showExitDialog();\n\n void showPersonZoom();\n\n void showPrepareToLogin();\n\n void showStatus();\n\n void showUserPhoto(String personalImage);\n\n\n void loadView(String image);\n}", "public interface IBaseView {\n}", "public interface IBaseView {\n}", "public interface IBaseView {\n}", "@Override\r\n\tpublic void initViews() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void initViews() {\n\t\t\r\n\t}", "public abstract void viewRun();", "public interface View{\n void setupViews();\n void onClickSubmitReview();\n void showSuccessfullReviewSubmit();\n void showErrorSubmitReview();\n }", "protected abstract void initViews();", "public String getViewName() {\n return viewName;\n }", "public ViewIdentificator getView() {\r\n return view;\r\n }", "public interface ISettingsView {\r\n void initViews();\r\n}", "protected void viewSetup() {\n\t\t// TODO Auto-generated method stub\n\n\t}", "public String getViewPath() {\n return mviewPath;\n }", "public static final FileBrowserView fromName(String name) {\n FileBrowserView result = DEFAULT;\n if (name != null) {\n for (FileBrowserView view : FileBrowserView.values()) {\n if (name.equals(view.name)) {\n result = view;\n break;\n }\n }\n }\n return result;\n }", "public interface IMainView {\n\n}", "protected static String getMultiviewBaseViewUrl( )\n {\n return \"MultiviewForms.jsp?view=\" + VIEW_MULTIVIEW_FORMS;\n }", "public String getViewPathBasename() {\n return (new File(mviewPath)).getName();\n }", "public String getViewName() {\n return viewName;\n }", "public interface TrackingView extends BaseView{\n\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 UnixFileAttributeView view(FileLookup lookup, ImmutableMap<String, FileAttributeView> inheritedViews) {\n/* 75 */ throw new UnsupportedOperationException();\n/* */ }", "public abstract void initView();", "@Override\n\tpublic void view() {\n\t\t\n\t}", "public FileServer viewFileServer(String serverid) {\n\t\t\r\n\t\t\r\n\t\treturn (FileServer)getHibernateTemplate().get(FileServer.class, serverid);\r\n\t}", "@Override\n public void loadViewContent(PortletRequest request) {\n }", "public interface ApplicationView {\n}", "public interface AboutView {\n void showApp();\n\n void showCreator();\n}", "@Override\n\tpublic void setView(Resultado resultado, HttpServletRequest request, HttpServletResponse response) {\n\n\t}", "View createView();", "public void setView(int view)\r\n\t{\n\t\tswitch(view)\r\n\t\t{\r\n\t\t\tcase Settings.ANONYMOUS_VIEW:\r\n\t\t\t\tbreak;\r\n\t\t\tcase Settings.WELCOME_VIEW:\r\n\t\t\t\tbreak;\r\n\t\t\tcase Settings.ACCOUNT_VIEW:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\t\r\n\t}", "@Override\n\tprotected String getView() {\n\t\treturn ORSView.COLLEGE_LIST_VIEW;\n\t}", "public String mo10346a() {\n return \"Recs.View\";\n }", "public void initView() {\n JPanel pane= new JPanel();\n panel = new JPanel();\n this.getFile(pane);\n JScrollPane scp = new JScrollPane(pane);\n scp.setPreferredSize(new Dimension(500, 280));\n scp.setVisible(true);\n enter.setPreferredSize(new Dimension(100, 50));\n enter.setVisible(true);\n enter.setActionCommand(\"enter\");\n enter.addActionListener(this);\n send.setPreferredSize(new Dimension(80, 50));\n send.setVisible(true);\n send.setActionCommand(\"sendOptions\");\n send.addActionListener(this);\n send.setEnabled(true);\n back.setVisible(true);\n back.setActionCommand(\"back\");\n back.addActionListener(this);\n back.setPreferredSize(new Dimension(80, 50));\n \n panel.add(scp);\n panel.add(send);\n panel.add(enter);\n panel.add(back);\n Launch.frame.add(panel);\n }" ]
[ "0.6749045", "0.62781495", "0.6185447", "0.6185447", "0.61815673", "0.61109865", "0.60923547", "0.6064689", "0.60560083", "0.60503227", "0.60503227", "0.6028298", "0.5997347", "0.59966916", "0.5961132", "0.5910298", "0.58937615", "0.5878092", "0.58315486", "0.5795221", "0.57578903", "0.5756523", "0.57529604", "0.57242775", "0.5724186", "0.57181233", "0.5707182", "0.570636", "0.5702434", "0.5691142", "0.5691142", "0.56885153", "0.5687098", "0.5687098", "0.5687098", "0.5687098", "0.56772304", "0.56717384", "0.566827", "0.5655567", "0.5655567", "0.5655567", "0.5655567", "0.5655567", "0.5655567", "0.5655567", "0.5633383", "0.5603091", "0.5602231", "0.56004536", "0.5598653", "0.5597919", "0.55854344", "0.5582018", "0.55767906", "0.55738217", "0.5570729", "0.55706835", "0.55574656", "0.555614", "0.55532074", "0.554646", "0.55394113", "0.55315477", "0.5530429", "0.55261797", "0.55246246", "0.55113494", "0.55109566", "0.55109566", "0.55109566", "0.55088353", "0.55088353", "0.550736", "0.54890186", "0.54870117", "0.5480217", "0.54738", "0.54697406", "0.54681784", "0.54676104", "0.5462002", "0.5461759", "0.54589784", "0.54532975", "0.5446136", "0.5444507", "0.5442282", "0.5435145", "0.5433698", "0.5431019", "0.5424926", "0.54221135", "0.5417788", "0.54168594", "0.5415573", "0.54150444", "0.5411775", "0.5410342", "0.5410334", "0.54082257" ]
0.0
-1
Stores reference to the locator
@Override public void setDocumentLocator(Locator locator) { this.locator = locator; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setLocatorCurrent(String locatorCurrent) {\n\t\t\r\n\t}", "@Override\n public void setDocumentLocator(Locator locator) {\n mLocator = locator;\n }", "public void setDocumentLocator(Locator locator) {\n _locator = locator;\n }", "public Locator getLocator() {\n/* 155 */ return this.sourceLocator;\n/* */ }", "public void setDocumentLocator(Locator locator) {\r\n\t\t_locator = locator;\r\n\t}", "public void setDocumentLocator (Locator locator)\n {\n // no op\n }", "@android.support.annotation.VisibleForTesting()\n public final void swap(@org.jetbrains.annotations.NotNull()\n com.android.example.paging.pagingwithnetwork.reddit.ServiceLocator locator) {\n }", "@Override\n\t\tpublic void setDocumentLocator(Locator locator) {\n\t\t\t\n\t\t}", "public void setDocumentLocator( Locator locator )\n {\n super.setDocumentLocator(locator);\n this.locator = locator;\n }", "public Locator getLocator() {\n\t\treturn null;\r\n\t}", "@Override\r\n public void setDocumentLocator(Locator locator) {\n }", "public Locator getDocumentLocator() { return this.locator; }", "@Override\n\tpublic void setDocumentLocator(Locator locator) {\n\t\t\n\t}", "@Override\n\tpublic void setDocumentLocator(Locator locator) {\n\t\t\n\t}", "public String getLocatorCurrent() {\n\t\treturn null;\r\n\t}", "public void setElement(Location element){\n\t\t\tthis.element = element;\n\t\t}", "@Override\n protected void set(org.tair.db.locusdetail.ILocusDetail dto) {\n locusLocus = dto;\n }", "public void storeValue(final String elementLocator, final String variableName);", "public interface ILocator {\n\n\tpublic void addName(IName name);\n\tpublic void removeName(IName name);\n\tpublic Iterator<IName> getAllNames();\n\t\n}", "void setContentLocator( ContentLocator locator );", "public void setReference(final String newLocation) {\n reference = gameMap.convertNameToReference(newLocation);\n }", "public ElementLocationImpl(Element element) {\n ArrayList<String> components = new ArrayList<String>();\n Element ancestor = element;\n while (ancestor != null) {\n components.add(0, ((ElementImpl) ancestor).getIdentifier());\n ancestor = ancestor.getEnclosingElement();\n }\n this.components = components.toArray(new String[components.size()]);\n }", "public static GuidoLocationListener getReference(){\r\n\t\tif(instance == null)\r\n\t\t\tinstance = new GuidoLocationListener();\r\n\t\treturn instance;\r\n\t}", "public void elSetReference(Object bean);", "@Override\n default ManagerPrx ice_locator(com.zeroc.Ice.LocatorPrx locator)\n {\n return (ManagerPrx)_ice_locator(locator);\n }", "public LocatorSearchResultPage(WebDriver driver){\n this.driver = driver;\n /*\n * web element representatives on a page\n */\n gameLocator = new By.ByLinkText(\"https://cmscdn.staticcache.org/assets/image/0009/800739/UKDESIGN-1216_214x214-MayfairRoulette-SquareTiles.jpg\");\n moreButtonLocator = new By.ByClassName(\"sc-ifAKCX ixOsdk\");\n playNowButtonLocator = new By.ByClassName(\"signinButton\");\n loginFormLocator = new By.ByClassName(\"login-component__wrapper\");\n }", "public final AbstractParticleLocator getLocatorContext() {\r\n return mLocator;\r\n }", "public Nexus_HomeLocators(WebDriver driver){\n this.driver = driver;\n }", "public String getControlLocator() {\n\t\treturn ControlLocator;\n }", "public LocatorType getLocatorType() {\n\t\treturn LocatorType;\n \t \n }", "public void setReference (SoftReference ref)\r\n {\r\n _reference = ref;\r\n }", "public void cacheSubjectLocator(final ILocator l, ITopic t) {\r\n\t\tif (subjectLocators == null) {\r\n\t\t\tsubjectLocators = HashUtil.getHashMap();\r\n\t\t}\r\n\t\tsubjectLocators.put(l, t);\r\n\t}", "public void locate()\n\t{\n\t\tlocationClient = new LocationClient(Main.activity.getApplicationContext()); // 实例化LocationClient类\n\t\t\t\t\n\t\tlocationClient.registerLocationListener(myListener); // 注册监听函数\n\t\tthis.setLocationOption();\t//设置定位参数\n\t\tlocationClient.start(); // 开始定位\n\t\tlocationClient.requestLocation();\n\t}", "public RTWLocation element(RTWElementRef e);", "public void setM_Locator_ID(BigDecimal Qty)\n\t{\n\t\t//\tLocator esatblished\n\t\tif (getM_Locator_ID() != 0)\n\t\t\treturn;\n\t\t//\tNo Product\n\t\tif (getM_Product_ID() == 0)\n\t\t{\n\t\t\tset_ValueNoCheck(\"M_Locator_ID\", null);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//\tGet existing Location\n\t\t//ZCOM 79082 Flux vente POS si Type vente ticket => emplacement par defaut Z_OrgPos.M_LOCATORSTOCK_ID \n\t\t\n\t\tMOrder ord = null;\n\t\tif(getParent().getC_Order_ID()>0)\n\t\t{\n\t\t\tord = (new MOrder (getCtx(),getParent().getC_Order_ID(),get_Trx()));\n\t\t}\n\t\tint M_Locator_ID = 0;\n\t\tM_Locator_ID = Storage.getLocatorID(getM_Warehouse_ID(), \n\t\t\t\tgetM_Product_ID(), getM_AttributeSetInstance_ID(), \n\t\t\t\tQty, get_Trx());\n\t\t//\tGet default Location\n\t\tif (M_Locator_ID == 0)\n\t\t{\n\t\t\tMProduct product = MProduct.get(getCtx(), getM_Product_ID());\n\t\t\tM_Locator_ID = MProductLocator.getFirstM_Locator_ID (product, getM_Warehouse_ID());\n\t\t\tif (M_Locator_ID == 0)\n\t\t\t{\n\t\t\t\tMWarehouse wh = MWarehouse.get(getCtx(), getM_Warehouse_ID());\n\t\t\t\tif(wh.isWMSEnabled())\n\t\t\t\t\tM_Locator_ID = wh.getM_RcvLocator_ID();\n\t\t\t\t\n\t\t\t\tif(M_Locator_ID == 0)\n\t\t\t\t\tM_Locator_ID = wh.getDefaultM_Locator_ID();\n\t\t\t}\n\t\t}\n\t\tsetM_Locator_ID(M_Locator_ID);\n\t}", "public interface AddressLocator {\n\n PlusBNode getBtnodeByAddress(String address);\n\n String setBtnodeByAddress(String address,PlusBNode BPlusNode);\n}", "private void getLocation() {\n\n }", "@Override\n\t\t\tpublic void onLocatorChanged(LocatorData locatorData) {\n\t\t\t\tsphero_x = locatorData.getPositionX();\n\t\t\t\tsphero_y = locatorData.getPositionY();\n\t\t\t}", "private void storeSelection(TreePath tp) {\n \t\t\tif (tp == null)\n \t\t\t\treturn;\n \n \t\t\tObject ob;\n \t\t\tselectedNode = (DefaultMutableTreeNode) tp.getLastPathComponent();\n \t\t\tif (selectedNode != null\n \t\t\t\t&& (ob = selectedNode.getUserObject()) instanceof GeoElement) {\n \t\t\t\tselectedGeoElement = (GeoElement) ob;\n \t\t\t} else {\n \t\t\t\tselectedGeoElement = null;\n \t\t\t}\n \t\t}", "public void setLocation(Location loc) {\n this.location = loc;\n }", "public void givePlaceInList() {\r\n\t\tmyPlaceInList = allyTracker.getPlaceInList();\r\n\t}", "public void setReference(Reference ref)\n {\n this.ref = ref;\n }", "public org.davic.net.Locator getServiceLocator();", "void setPointOfReference(String url)\n throws IOException, SoapException;", "@Override\n public void setCurSharedRef(MPlaceholder arg0)\n {\n \n }", "private ServiceLocator() {\r\n\t\t\r\n\t}", "private void updateLocation() {\n myLocationOnScreenRef.set(myComponent.getLocationOnScreen());\n }", "public void setLookupLocators( LookupLocator[] locs ) throws RemoteException {\n\t\tlog.config(\"set lookup locators\");\n\t\ttry {\n\t\t\tPersistentData data = io.readState();\n\t\t\tdisco.setLocators( locs );\n\t\t\tdata.locators = locs;\n\t\t\tio.writeState( data );\n\t\t} catch( ClassNotFoundException ex ) {\n\t\t\tlog.throwing( getClass().getName(), \"setLookupLocators\", ex);\n\t\t\tthrow new RemoteException(ex.toString());\n\t\t} catch( IOException ex ) {\n\t\t\tlog.throwing( getClass().getName(), \"setLookupLocators\", ex);\n\t\t\tthrow new RemoteException(ex.toString());\n\t\t}\n\t}", "@Override\n protected void initLocation() {\n }", "public Object getLocationInstanceReport() {\n return locationInstanceReport;\n }", "public void setBase(LocatorIF base_address) {\n this.base_address = base_address;\n }", "public void setLocationDao(LocationDAO dao) { _locationData = dao; }", "Variable getRefers();", "public Point getLocationUsed() {\n return (Point)this.locationUsed.clone();\n }", "@Override\n default UserpostPrx ice_locator(com.zeroc.Ice.LocatorPrx locator)\n {\n return (UserpostPrx)_ice_locator(locator);\n }", "@Override\n public boolean getLocation(Location l) {\n synchronized (mLocationListeners) {\n Location loc = mMockProviderLocation.get(getName());\n if (loc == null) {\n return false;\n }\n l.set(loc);\n return true;\n }\n }", "private void getLocation() {\n NimbeesLocationManager.NimbeesLocationListener mNimbeesLocationListener = new NimbeesLocationManager.NimbeesLocationListener() {\n @Override\n public void onGetCurrentLocation(Location location) {\n mLocation = location;\n setUpMap();\n }\n\n @Override\n public void onError(NimbeesException e) {\n }\n };\n NimbeesClient.getLocationManager().obtainCurrentLocation(mNimbeesLocationListener);\n }", "private ServiceLocator(){}", "public void assignAddingLocation(final boolean val) {\n addingLocation = val;\n }", "public void setLocation(Point loc){\n\t\tthis.location = loc;\n\t}", "public Location location()\n {\n return myLoc;\n }", "public final void addPointByReference(final Position loc) {\n points.add(loc);\n }", "public Element referenceElement(final String nom) {\n return(cacheDefElement.get(nom));\n }", "void setLocationCells(ArrayList<String> loc){\r\n locationCells = loc;\r\n }", "public void ref() {\n\n\t}", "@Override\n\tpublic TargetLocator switchTo() {\n\t\treturn null;\n\t}", "void setUpRefs(GElement target) {\n\t\t if(target.isDataGenerator()){\n\t\t\t setDg((GDataGenerator)target);\n\t\t } \n\t }", "public void setLocation(String ref, Range range) {\n if (GenomeController.getInstance().isGenomeLoaded()) {\n boolean refChanging = isValidAndNewReference(ref);\n boolean rangeChanging = !range.equals(currentViewableRange);\n if (refChanging || rangeChanging) {\n updateHistory();\n if (refChanging) {\n setReference(ref);\n }\n if (rangeChanging) {\n setRange(range);\n }\n fireEvent(new LocationChangedEvent(refChanging, currentReference, currentViewableRange));\n }\n pendingReference = null;\n pendingRange = null;\n } else {\n pendingReference = ref;\n pendingRange = range;\n }\n }", "public Location getLocation() {\n\t\treturn location.clone();\n\t}", "public void getLocation(){\n }", "public By autoLocator(String locator){\n \ttry{\n \t\tif(locator.startsWith(\"//\")){\n \t\t\treturn By.xpath(locator);\n \t\t}else if (locator.startsWith(\"class=\")){\n \t\t\tlocator = locator.split(\"=\")[1];\n \t\t return By.className(locator);\n \t\t}else if (locator.startsWith(\"css=\")) {\n \t\t\tlocator=locator.substring(4);\n \t\t\t\treturn By.cssSelector(locator);\n \t\t}else\n \t\t\treturn By.id(locator);\n \t} catch (NoSuchElementException noSuchElementException){\n \t\treturn null;\n \t}\n }", "public void setVisited()\n {\n visited = true;\n }", "public interface TrackerClientFactory {\n /**\n * The locate method tells creates a new TrackerClient instance\n * at the specified path. The client is \n * automatically bound to the tracker tree and ready for use \n * immediately.\n *\n * @param path Path for the tracker to be placed in the tree.\n */\n TrackerClient locate(String path);\n}", "public LocatorIF getBase() {\n return base_address;\n }", "public LocationService() {\r\n\t\tSettings settings = Settings.getInstance();\r\n\t\tthis.location = settings.getLocation();\r\n\t\tthis.ebAddress = settings.getEbAddress();\r\n\t\tthis.ebPort = settings.getEbPort();\r\n\t\tloggedIn = false;\r\n\t\tobservers = new ArrayList<IObserver>();\r\n\t\tdbAdapter = InformationStorageFactory.getStorageAdapter();\r\n\t}", "public void click(By locator){\n\t\tWebElement element = findElementClickable(locator);\n\n\t\ttry {\n\n try {\n element.click();\n }catch(StaleElementReferenceException e)\n {\n\t\t\t\telement = findElementClickable(locator);\n\t\t\t\telement.click();\n }\n LOGGER.info(\"Step : \"+Thread.currentThread().getStackTrace()[2].getMethodName()+\": Pass\");\n }catch(Exception e)\n {\n LOGGER.error(\"Step : \"+Thread.currentThread().getStackTrace()[2].getMethodName()+\": Fail\");\n //e.printStackTrace();\n throw new NotFoundException(\"Exception \"+ e +\" thrown while clicking on object using locator \"+locator);\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n }", "@Override\n\tpublic void setLocation(String l) {\n\t\tlocation = l;\n\t\t\n\t}", "protected Location getLocation()\n {\n return location;\n }", "protected Location getLocation()\n {\n return location;\n }", "public void setUsed(){\n\t\talreadyUsed = true;\n\t}", "public void getLocation() {\n\t\tLocationResult locationResult = new LocationResult() {\n\t\t\t@Override\n\t\t\tpublic void gotLocation(Location location) {\n\t\t\t\tLog.d(TAG, \"Got location!\");\n\t\t\t\tmyLocation = location;\n\t\t\t}\n\t\t};\n\t\tMyLocation myLocation = new MyLocation();\n\t\tmyLocation.getLocation(this, locationResult);\n\t}", "public ElementLocationImpl(String[] components) {\n this.components = components;\n }", "@Override\n public String getLocation() {\n return location;\n }", "void setReference(String reference);", "protected WebElement proxyForLocator(ClassLoader loader,\n\t\t\tElementLocator locator) {\n\t\tInvocationHandler handler = new LocatingElementHandler(locator);\n\n\t\tWebElement proxy = (WebElement) Proxy.newProxyInstance(loader,\n\t\t\t\tnew Class[] {WebElement.class, WrapsElement.class,\n\t\t\t\t\t\tLocatable.class }, handler);\n\t\treturn proxy;\n\t}", "public void setDisplayLocNew() {\r\n displayLoc = NEW;\r\n }", "public Locator getLocator() {\r\n\tif (locator == null) {\r\n\t\ttry {\r\n\t\t\tthis.locator = LocatorFactory.getInstance().createLocator(\r\n\t\t\t\tLocatorImpl.TransportStreamProtocol + description);\r\n\t\t} catch (Exception e) {\r\n\t\t\t;\r\n\t\t}\r\n\t}\r\n\treturn this.locator;\r\n }", "public void set_loc(String locaton)\n {\n d_loc =locaton;\n }", "public final Location getLocation() {\n\t\treturn location.clone();\n\t}", "void setRef(java.lang.String ref);", "@Override\r\n public void set(E e) {\r\n if (lastRetrieved == null) {\r\n throw new IllegalStateException();\r\n }\r\n if (e == null) {\r\n throw new NullPointerException();\r\n }\r\n\r\n lastRetrieved.data = e;\r\n }", "private void saveLocation()\n {\n willLocationBeSaved = !willLocationBeSaved;\n }", "private void setLocationOfMatch(String locationOfMatch) {\r\n this.locationOfMatch = locationOfMatch;\r\n }", "public ExplorerStrategy() {\n\t\tmap = new AIMap();\n\t}", "ContentLocator getContentLocator();", "@Override\n public geo_location getLocation() {\n return location;\n }", "@Override\r\n protected void computeReferencePoint ()\r\n {\r\n setReferencePoint(getHeadLocation());\r\n }", "boolean isLocator();", "public Location getElement(){\n\t\t\treturn element;\n\t\t}", "public abstract LocalAbstractObject getObject(String locator) throws NoSuchElementException;" ]
[ "0.64177454", "0.63231105", "0.62911934", "0.62708664", "0.62224334", "0.61331075", "0.6094367", "0.6057534", "0.6045174", "0.59329563", "0.5926464", "0.58114", "0.579222", "0.579222", "0.5782978", "0.5565061", "0.5481701", "0.5432543", "0.5423356", "0.5400668", "0.5319951", "0.52880096", "0.5282285", "0.525775", "0.52421737", "0.52076125", "0.51938", "0.51905817", "0.5184205", "0.51819575", "0.5160769", "0.5160169", "0.5147222", "0.51160395", "0.5109843", "0.5102241", "0.50926894", "0.50903773", "0.5086915", "0.50720114", "0.50680614", "0.5067978", "0.50630146", "0.50610346", "0.5034386", "0.5002013", "0.49840084", "0.4965874", "0.49652553", "0.4957705", "0.4947313", "0.49462643", "0.49413326", "0.49368542", "0.4935871", "0.49139568", "0.49049327", "0.48995697", "0.48923588", "0.48840007", "0.48643595", "0.48634526", "0.4861618", "0.48458666", "0.48416042", "0.48414943", "0.48374328", "0.48280287", "0.48257294", "0.4819724", "0.48140103", "0.48117867", "0.4811157", "0.48091197", "0.48056582", "0.47991997", "0.47978723", "0.47921333", "0.47921333", "0.4791042", "0.478781", "0.47841665", "0.47757235", "0.4764728", "0.47644505", "0.47606272", "0.47593322", "0.47577474", "0.4757209", "0.474929", "0.4749266", "0.47482914", "0.47480643", "0.47449353", "0.47438422", "0.4733902", "0.47291875", "0.47281268", "0.4716811", "0.4713401" ]
0.6126304
6
Character data handler Text content may be delivered within multiple events, not just one
@Override public void characters( char[] chars, int start, int length ) throws SAXException { String s = new String(chars, start, length).trim(); if (s.length() > 0) { buffer.append(s); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void handleCharacterData() {\n\t\tif (!buffer.isEmpty()) {\n\t\t\tbyte[] data = buffer.toArray();\n\t\t\tbuffer.clear();\n\t\t\thandler.handleString(new String(data));\n\t\t}\n\t}", "void onCharacter(Terminal terminal, char data);", "public void dispatchCharactersEvents(ContentHandler ch) throws SAXException {}", "@Override\n\tpublic void characters(String text) {\n\t\t\n\t}", "@EventMapping\n\tpublic static void handleTextMessageEvent(MessageEvent<TextMessageContent> event) throws Exception {\n\t\tTextHandler.handle(event);\n\t}", "@Override\n public void onReceivedData(byte[] arg0) {\n String data = null;\n try {\n data = new String(arg0, \"UTF-8\");\n data.concat(\"/n\");\n tvAppend(textView, data);\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\n public void onReceivedData(byte[] arg0) {\n String data;\n try {\n data = new String(arg0, \"UTF-8\");\n data.concat(\"/n\");\n tvAppend(textView, data);\n\n\n\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n\n\n }", "@Override\n public void characters(char[] ch, int start, int length) {\n Node current = eltStack.peek();\n if (current.getChildNodes().getLength() == 1\n && current.getChildNodes().item(0).getNodeType() == Node.TEXT_NODE) {\n Text text = (Text) current.getChildNodes().item(0);\n text.appendData(new String(ch, start, length));\n } else {\n Text text = document.createTextNode(new String(ch, start, length));\n eltStack.peek().appendChild(text);\n }\n }", "@Override\n public void characters(char[] ch, int start, int length)\n throws SAXException{\n super.characters(ch, start, length);\n if(length<=0)\n return;\n for(int i=start; i<start+length; i++){\n if(ch[i]=='\\n')\n return;\n }\n\n String str=new String(ch,start,length);\n switch (tagName)\n {\n case \"key\":wordValue.setWord(str); break;\n case \"ps\": if(wordValue.getPsE().length()<=0)\n wordValue.setPsE(str);\n else wordValue.setPsA(str);\n break;\n case \"pron\":if(wordValue.getPronE().length()<=0)\n wordValue.setPronE(str);\n else wordValue.setPronA(str);\n break;\n case \"pos\":isChinese=false;\n interpret+=str+\" \";\n break;\n case \"acceptation\":interpret+=str+\"\\n\";\n interpret=wordValue.getInterpret()+interpret;\n wordValue.setInterpret(interpret);\n interpret=\"\";\n break;\n case \"orig\":orig=wordValue.getSentOrig();\n wordValue.setSentOrig(orig+str+\"\\n\");\n break;\n case \"trans\":trans=wordValue.getSentTrans();\n wordValue.setSentTrans(trans+str+\"\\n\");\n break;\n case \"fy\":isChinese=true;\n wordValue.setInterpret(str);\n }\n }", "@Override\n protected void onTextData(Reader r) throws IOException {\n\n }", "public void onTextCopy()\n\t{\n\t}", "@Override\n\t\t\t\tpublic void handle(KeyEvent e) {\n\t\t\t\t\tif (e.getEventType()== KeyEvent.KEY_PRESSED){\n\n\t\t\t\t\t\ttext.setText(\"touche enfoncée: \" + e.getCode());\n\n\t\t\t\t\t}\n\t\t\t\t\tif (e.getEventType()== KeyEvent.KEY_RELEASED){\n\n\t\t\t\t\t\ttext.setText(\"touche relâchée: \" + e.getCode());\n\t\t\t\t\t\t\n\t\t\t\t}\n\t if (e.getEventType()== KeyEvent.KEY_TYPED){\n\t\t\t\t\t\n\t\t\t\t\ttext.setText(\"caractère tapé: \" + e.getCharacter());\n\t\t\t\t\t\n\t\t\t}\n\t if (combinaison.match(e)){\n\t \t text.setText(\" les touches Ctrl et A sont utilisées\");\n\t }\n\t\t\t}", "@Override\n public void onReceivedData(byte[] arg0) {\n String data = null;\n try {\n data = new String(arg0, \"UTF-8\");\n data.concat(\"/n\");\n //tvAppend(textView, data);\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n\n\n }", "public T processData(CreatedCharacter p);", "private void text_characters(final char[] src, final int srcPos, final int length) {\n\t\t// addStyle();\n\t\tthis.textstringList.add(new Textstring(mProperties.x, mProperties.y, src, srcPos, length));\n\t\t// Assume for now that all textstrings have a matrix\n\t\t// if (mProperties.transformData != null) {\n\t\t// addTransform();\n\t\t// }\n\t\taddText();\n\t}", "public abstract void onTextReceived(String message);", "public void characters(char[] ch, int start, int length) throws SAXException {\n //Remember that characters may be called multiple times for the same\n //element, so if data is null then the characters delivered here are\n //the data, otherwise append the characters to data\n if (data == null) {\n data = new String(ch, start, length);\n } else {\n data = data + new String(ch, start, length);\n }\n data = data.trim();\n }", "@Override\n\tpublic void characters(char[] arg0, int arg1, int arg2) throws SAXException {\n\t\tString contents = new String(arg0,arg1,arg2).trim();\n\t\tif(contents.length()>0) {\n\t\t\tSystem.out.println(\"内容为:\"+contents);\t\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic void characters(char[] arg0, int arg1, int arg2) throws SAXException {\n\t\tString content=new String(arg0,arg1,arg2);\n\t\tif(content.length()>0) {\n\t\t\tSystem.out.println(\"<\"+CurrentTag+\">元素的内容是: \"+content.trim());\n\t\t}\n\t}", "@Override\n public void accept(CharSequence charSequence) {\n }", "private void handleCopyingTextToClipboard(String text){\n Intent intent = new Intent(getContext(), ClipboardEventHandler.class);\n intent.putExtra(\"action\", \"switch\");\n intent.putExtra(\"content\", text);\n\n getContext().startService(intent);\n\n Snackbar.make(getView(), getString(R.string.COPIED_BEGINNIG) + \" \" +\"\\\"\"+ text +\"\\\"\" + \" \" + getString(R.string.COPIED_END), Snackbar.LENGTH_SHORT).show();\n }", "@Override\n\tpublic void textValueChanged(TextEvent e) {\n\t\t\n\t}", "@Override\n\tpublic void characters(char[] ch, int start, int length)\n\t\t\tthrows SAXException {\n\t\tsuper.characters(ch, start, length);\n\t\tString data = new String(ch, start, length);\n\t\t// System.out.println(\"data is \" + data);\n\t}", "public void characters(char[] ch, int start, int length) throws SAXException {\n contents.write(ch, start, length);//ne znam cemu sluzi ali neka ostane\n textBuffer.append(new String(ch, start, length));\n }", "private void renderText(CharSequence source) {\n \n }", "private static void DoTextInput(TextEditor This, String textData, boolean isInsertKeyToggled, boolean acceptControlCharacters) \r\n {\r\n // Hide the mouse cursor on user input. \r\n HideCursor(This); \r\n\r\n // Remove control characters. Note that this is not included into _FilterText, \r\n // because we want such kind of filtering only for real input,\r\n // not for copy/paste.\r\n if (!acceptControlCharacters)\r\n { \r\n for (int i = 0; i < textData.Length; i++)\r\n { \r\n if (Char.IsControl(textData[i])) \r\n {\r\n textData = textData.Remove(i--, 1); // decrement i to compensate for character removal \r\n }\r\n }\r\n }\r\n\r\n String filteredText = This._FilterText(textData, This.Selection);\r\n if (filteredText.Length == 0) \r\n { \r\n return;\r\n } \r\n\r\n TextEditorTyping.OpenTypingUndoUnit(This);\r\n\r\n UndoCloseAction closeAction = UndoCloseAction.Rollback; \r\n\r\n try \r\n { \r\n using (This.Selection.DeclareChangeBlock())\r\n { \r\n This.Selection.ApplyTypingHeuristics(This.AllowOvertype && This._OvertypeMode && filteredText != \"\\t\");\r\n\r\n This.SetSelectedText(filteredText, InputLanguageManager.Current.CurrentInputLanguage);\r\n\r\n // Create caret position normalized backward to keep formatting of a character just typed\r\n ITextPointer caretPosition = This.Selection.End.CreatePointer(LogicalDirection.Backward); \r\n\r\n // Set selection at the end of input content\r\n This.Selection.SetCaretToPosition(caretPosition, LogicalDirection.Backward, /*allowStopAtLineEnd:*/true, /*allowStopNearSpace:*/true); \r\n // Note: Using explicit backward orientation we keep formatting with\r\n // a previous character during typing.\r\n\r\n closeAction = UndoCloseAction.Commit; \r\n }\r\n } \r\n finally \r\n {\r\n TextEditorTyping.CloseTypingUndoUnit(This, closeAction); \r\n }\r\n }", "@Override\r\n\t\t\t\tpublic void run() {\n\t\t\t\t\tString content = ta_content.getText().toString();\r\n\r\n\t\t\t\t\tcontent = content.replaceAll(\"\\\\p{Z}\", \"\");\r\n\r\n\t\t\t\t\tcontent = content.replaceAll(\"(^\\\\p{Z}+|\\\\p{Z}+$)\", \"\");\r\n\t\t\t\t\tfor (String str : special_characters) {\r\n\t\t\t\t\t\tcontent = content.replaceAll(str, \"\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tcontent = content.trim();\r\n\t\t\t\t\tint cnt = 0;\r\n\t\t\t\t\tBreakIterator it = BreakIterator.getCharacterInstance();\r\n\t\t\t\t\tit.setText(content);\r\n\r\n\t\t\t\t\twhile (it.next() != BreakIterator.DONE) {\r\n\t\t\t\t\t\tcnt++;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\ttextField.setText(\"\" + cnt);\r\n\t\t\t\t}", "public void handleEvent(Event event) {\n\t\t\t\tprintingHandle.handlePrint(text.getText());\n\t\t\t}", "@Override\r\n\t\t\tpublic void keyTyped(KeyEvent e) {\n\t\t\t\tcount_text();\r\n\t\t\t}", "@Override\n\tpublic Object visit(ASTText node, Object data) {\n\t\tSystem.out.print(\"text()\");\n\t\treturn null;\n\t}", "public void onTextCut()\n\t{\n\t}", "@Override \r\n public void characters(char[] ch, int start, int length) \r\n throws SAXException {\n cadena = new String(ch, start, length);\r\n valor = valor + cadena;\r\n }", "@Override\n\tpublic void sendData(CharSequence data) {\n\t\t\n\t}", "@Override\n public void handleSpecialChar(\n com.globalsight.ling.docproc.extractor.html.HtmlObjects.Text t)\n {\n\n }", "private void handleTextContent(String replyToken, Event event, TextMessageContent content)\n throws Exception {\n\t\t\n\t\tString text = content.getText();\n\n\t\tMessage response;\n\t\tList<Message> messages = new ArrayList<Message>();\n\t\tlog.info(\"Got text message from {}: {}\", replyToken, text);\n\t\t\n\t\tListSingleton singleton = ListSingleton.getInstance();\n\t\tindex = singleton.initiate(event.getSource().getUserId());\n\t\tcategories = singleton.getCategories();\n\t\tprofile = singleton.getProfile();\n\t\tmenu = singleton.getMenu();\n\t\t\n//\t\tint index = -1;\n//\t\tfor(int i=0;i<userList.size();i++) {\n//\t\t\tif(userList.get(i).equals(event.getSource().getUserId())) {\n//\t\t\t\tindex = i;\n//\t\t\t\tbreak;\n//\t\t\t}\n//\t\t}\n//\t\tif(index == -1) {\n//\t\t\tcategories = null;\n//\t\t\tprofile = null;\n//\t\t\tmenu = null;\n//\t\t\tindex = userList.size();\n//\t\t\tuserList.add(event.getSource().getUserId());\n//\t\t\tcatList.add(categories);\n//\t\t\tprofList.add(profile);\n//\t\t\tmenuList.add(menu);\n//\t\t}\n//\t\telse {\n//\t\t\tcategories = catList.get(index);\n//\t\t\tprofile = profList.get(index);\n//\t\t\tmenu = menuList.get(index);\n//\t\t}\n\t\t\n\t\tif (categories == null) {\t\t\n\t\t\tuser.addUser(event.getSource().getUserId());\n\t\t\tmessages.add(mainMenuMessage);\n\t\t\tmessages.add(getMenuTemplate());\n\t\t\tthis.reply(replyToken, messages); \n\t\t\tcategories = Categories.MAIN_MENU;\n\t\t}\n\t\telse {\n\t\t\tswitch (categories) {\n\t\t \t\tcase MAIN_MENU:\n\t\t \t\t\tresponse = new TextMessage(handleMainMenu(text, event));\n\t\t \t\t\tmessages.add(response);\n\t\t \t\t\tif (categories == Categories.MAIN_MENU) {\n\t\t \t\t\t\tmessages.add(getMenuTemplate());\n\t\t \t\t\t}\n\t\t \t\t\tthis.reply(replyToken, messages);\n\t\t \t\t\tbreak;\n\t\t \t\tcase PROFILE:\n\t\t \t\t\tString responseText = handleProfile(replyToken, text, event);\n\t\t \t\t\tif(!responseText.equals(\"\")) {\n\t\t\t \t\t\tresponse = new TextMessage(responseText);\n\t\t\t \t\t\tmessages.add(response);\n\t\t \t\t\t}\n\t\t \t\t\tif (categories == Categories.MAIN_MENU) {\n\t\t \t\t\t\tmessages.add(getMenuTemplate());\n\t\t \t\t\t}\n\t\t \t\t\tif(messages.size()!=0) {\n\t\t\t \t\t\tthis.reply(replyToken, messages);\n\t\t \t\t\t}\n\t\t \t\t\tbreak;\n\t\t \t\tcase FOOD:\n\t\t \t\t\tresponse = new TextMessage(handleFood(text));\n\t\t \t\t\tmessages.add(response);\n\t\t \t\t\tif (categories == Categories.MAIN_MENU) {\n\t\t \t\t\t\tmessages.add(getMenuTemplate());\n\t\t \t\t\t}\n\t\t \t\t\tthis.reply(replyToken, messages);\t \t\t\t\n\t\t \t\t\tbreak;\n\t\t \t\tcase MENU:\n\t\t \t\t\tresponse = new TextMessage(handleMenu(text, event));\n\t\t \t\t\tmessages.add(response);\n\t\t \t\t\tif (categories == Categories.MAIN_MENU) {\n\t\t \t\t\t\tmessages.add(getMenuTemplate());\n\t\t \t\t\t}\n\t\t \t\t\tthis.reply(replyToken, messages);\n\t\t \t\t\tbreak;\n\t\t \t\tcase CODE:\n\t\t \t\t\tString res = handleCode(text, event);\n\t\t \t\t\tbreak; \n\t\t \t\tcase CAMPAIGN:\n\t\t \t\t\tthis.replyText(replyToken, \"Please upload the coupon image.\");\n\t\t \t\t\tbreak;\n\t\t \t\tcase INIT:\n\t\t \t\t\tthis.handleInit();\n\t\t \t\t\tthis.replyText(replyToken, \"Database initialized.\");\n\t\t \t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tsingleton.setValues(index, categories, profile, menu);\n }", "public void deliverRawText(String text) {\n \n }", "@Override\n\tpublic void characters(char[] arg0, int arg1, int arg2) throws SAXException {\n\t\t\n\t}", "@Override\n\tpublic IMessage onMessage(Message message, MessageContext ctx)\n\t{\n\t\tif(ctx.side.isClient()){\n\t\t\tWizardry.proxy.handleGlyphDataPacket(message);\n\t\t}\n\n\t\treturn null;\n\t}", "private void processText(){\n if(text == null || text.length() == 0){\n // When posting a tweet, Twitter returns the \"text\" JSON field even if it's not trimmed...\n text = trimmedText;\n }else{\n // Trim the original contents received from Twitter\n text = text.substring(0, text.offsetByCodePoints(0, displayTextRange[1]));\n }\n\n // Transform HTML characters (for some reason Twitter sends those)\n text = org.apache.commons.text.StringEscapeUtils.unescapeHtml4(text);\n }", "public void handleText(char ch[], int start, int length, int line, int col) {\r\n // TODO: Implement this.\r\n System.out.print(\"Characters: \\\"\");\r\n\r\n for(int i = start; i < start + length; i++) {\r\n // Instead of printing raw whitespace, we're escaping it\r\n switch(ch[i]) {\r\n case '\\\\':\r\n System.out.print(\"\\\\\\\\\");\r\n break;\r\n case '\"':\r\n System.out.print(\"\\\\\\\"\");\r\n break;\r\n case '\\n':\r\n System.out.print(\"\\\\n\");;\r\n case '\\r':\r\n System.out.print(\"\\\\r\");\r\n break;\r\n case '\\t':\r\n System.out.print(\"\\\\t\");\r\n break;\r\n default:\r\n System.out.print(ch[i]);\r\n break;\r\n }\r\n }\r\n\r\n System.out.print(\"\\\"\\n\");\r\n }", "@Override\n\t\t\tpublic void mouseUp(MouseEvent arg0) {\n\t\t\t\tString theText = advSendArea.getText();\n\t\t\t\tSystem.out.println(\"Texten som ska skickas är: \" + theText);\n\t\t\t\t\n\t\t\t\tRest rest = new Rest();\n\t\t\t\tString chunkText = \"\";\n\t\t\t\tXBNConnection db = new XBNConnection();\n\t\t\t\tStringBuilder sb = new StringBuilder(theText);\n\t\t\t\t// Add and @ to be sure that there will never be two strings that are\n\t\t\t\t// the same in a row.\n\t\t\t\t// for (int i = 3; i < sb.toString().length(); i += 6) {\n\t\t\t\t// sb.insert(i, \"@\");\n\t\t\t\t// }\n\t\t\t\t// theText = sb.toString();\n\t\t\t\tSystem.out.println(theText);\n\n\t\t\t\tdo {\n\t\t\t\t\t// System.out.println(\"Längded på theText i restCallImpl \"+theText.length()\n\t\t\t\t\t// +\" och det står \" +theText);\n\n\t\t\t\t\tif (theText.length() < 3) {\n\t\t\t\t\t\tchunkText = theText.substring(0, theText.length());\n\t\t\t\t\t\tint pad = theText.length() % 3;\n\t\t\t\t\t\tif (pad == 1) {\n\t\t\t\t\t\t\tchunkText = chunkText + \" \";\n\t\t\t\t\t\t\ttheText = theText + \" \";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tchunkText = chunkText + \" \";\n\t\t\t\t\t\t\ttheText = theText + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchunkText = theText.substring(0, 3);\n\t\t\t\t\t}\n\n\t\t\t\t\ttheText = theText.substring(3);\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\trest.doPut(chunkText);\n\t\t\t\t\t\tThread.sleep(3000);\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\n\t\t\t\twhile (theText.length() > 0 && db.getAck(chunkText, rest));\n\t\t\t\tadvSendArea.setText(\"Data sent to the device.\");\n\t\t\t\t\n\t\t\t}", "@Override\r\n\tpublic void userInputOccurred(InputEvent e) {\n\t\tif (e.getType() == (InputEvent.TEXT)) {\r\n\r\n\t\t\t// TODO Auto-generated method stub\r\n\t\t\tString input = new String(e.getInput());\r\n\t\t\t// If it's a clear command\r\n\t\t\tif (e.getInput().equals(\"/clear\")) {\r\n\t\t\t\tclearTerminal();\r\n\t\t\t} else {\r\n\t\t\t\tif (e.getSource() == myTerminal) {\r\n\t\t\t\t\t// System.out.println(\"Terminal says: \"+input);\r\n\t\t\t\t\tthis.cmd_string(input);\r\n\t\t\t\t} else if (e.getSource() == this) {\r\n\t\t\t\t\tmyTerminal.write(input);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tSystem.out.println(\"Unknown src detected: \" + e.getSource());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (current_state == EXIT) {\r\n\t\t\t\tquit();\r\n\t\t\t}\r\n\r\n\t\t\t// Otherwise it's a up/down/left/right/esc command\r\n\t\t} else if (e.getType() == (InputEvent.KEY_PRESS)) {\r\n\r\n\t\t\tthis.cmd_key(e.getInput());\r\n\r\n\t\t}\r\n\r\n\t}", "private void processPendingText() throws SAXException {\n if(state==AFTER_START_ELEMENT) {\n for( int i=bufLen-1; i>=0; i-- )\n if( !WhiteSpaceProcessor.isWhiteSpace(buf[i]) ) {\n super.characters(buf, 0, bufLen);\n return;\n }\n }\n }", "@Override\n\t\t\tpublic void handleMessage(Message msg)\n\t\t\t{\n\t\t\t\tString data = (String) msg.obj;\n\t\t\t\tfinal TextView textView;\n\t\t\t\tfinal StringBuffer buffer;\n\t\t\t\tfinal ScrollView scrollView;\n\t\t\t\tfinal AutoCompleteTextView autoCompleteText;\n\t\t\t\tRunnable scrollPost = null;\n\t\t\t\tint delayTime = 0;\n\t\t\t\t\n\t\t\t\t// Set view pointer\n\t\t\t\tif (msg.what == VIEW_ID_COMMAND)\n\t\t\t\t{\n\t\t\t\t\ttextView = mCommandView;\n\t\t\t\t\tbuffer = mCommandBuffer;\n\t\t\t\t\tscrollView = mCommandScrollView;\n\t\t\t\t\tscrollPost = mCommandScrollPost;\n\t\t\t\t\tif ((mUpdateCount % 20) == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\tdelayTime = 0;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tdelayTime = 1000;\n\t\t\t\t\t}\n\t\t\t\t\tmUpdateCount++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttextView = mKeyView;\n\t\t\t\t\tbuffer = mKeyBuffer;\n\t\t\t\t\tscrollView = mKeyScrollView;\n\t\t\t\t\tscrollPost = mKeyScrollPost;\n\t\t\t\t\tdelayTime = 0;\n\t\t\t\t}\n\n\t\t\t\tif (mTabHost.getCurrentTab() == VIEW_ID_COMMAND)\n\t\t\t\t{\n\t\t\t\t\tautoCompleteText = mCommandInputView;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tautoCompleteText = mKeyInputView;\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\t// Update data\n\t\t\t\tbuffer.append(data);\n\t\t\t\tif (buffer.length() > 5000)\n\t\t\t\t{\n\t\t\t\t\tbuffer.delete(0, buffer.length() - 5000);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tremoveCallbacks(scrollPost);\n\n\t\t\t\t// Reduce update frequency\n\t\t\t\tscrollPost = new Runnable() \n\t\t\t\t{\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() \n\t\t\t\t\t{\n\t\t\t\t\t\ttextView.setText(buffer);\n\t\t\t\t\t\t\n\t\t\t\t\t\tpostDelayed(new Runnable()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tscrollView.fullScroll(View.FOCUS_DOWN);\n\t\t\t\t\t\t\t\tautoCompleteText.requestFocus();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}, 200);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\t\n\t\t\t\tif (msg.what == VIEW_ID_COMMAND)\n\t\t\t\t{\n\t\t\t\t\tmCommandScrollPost = scrollPost;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tmKeyScrollPost = scrollPost;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tpostDelayed(scrollPost, delayTime);\n\t\t\t}", "protected void updateTextChange() {\n \t\t\tfText= fDocumentUndoManager.fTextBuffer.toString();\n \t\t\tfDocumentUndoManager.fTextBuffer.setLength(0);\n \t\t\tfPreservedText= fDocumentUndoManager.fPreservedTextBuffer.toString();\n \t\t\tfDocumentUndoManager.fPreservedTextBuffer.setLength(0);\n \t\t}", "@Override\n public void onReceivedData(byte[] arg0) {\n String data = null;\n try {\n data = new String(arg0, \"UTF-8\");\n createMsg(data.trim());\n tvAppend(txtResponse, data);\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n }", "@Override\n\t\tpublic void characters(char[] ch, int start, int length)\n\t\t\t\tthrows SAXException {\n\t\t\tbuffer.append(ch);\n\t\t}", "@Override\r\n\t\tpublic void changedUpdate(DocumentEvent e) {\n\t\t\tMessage = t.getText();\r\n\t\t\tcanvas.repaint();\r\n\t\t\t\r\n\t\t}", "protected void processKeyEvent(KeyEvent event) {\n if(event.getType() == KeyEvent.KeyReleased) return;\n \n //Paste\n if(event.getKeyCode().equals(KeyEvent.KeyCode.KEY_V) && event.isSystemPressed()) {\n insertText(OSUtil.getClipboardAsString());\n return;\n }\n\n //Copy\n if(event.getKeyCode().equals(KeyEvent.KeyCode.KEY_C) && event.isSystemPressed()) {\n if(selection.isActive() && selection.getLength() > 0) {\n OSUtil.setStringToClipboard(selection.getSelectedText());\n }\n return;\n }\n\n //Cut\n if(event.getKeyCode().equals(KeyEvent.KeyCode.KEY_X) && event.isSystemPressed()) {\n if(selection.isActive() && selection.getLength() > 0) {\n OSUtil.setStringToClipboard(selection.getSelectedText());\n insertText(\"\");\n }\n return;\n }\n\n //Enter\n if(allowMultiLine && event.getKeyCode() == KeyEvent.KeyCode.KEY_ENTER) {\n insertText(\"\\n\");\n return;\n }\n\n //backspace and delete\n boolean bs = event.getKeyCode() == KeyEvent.KeyCode.KEY_BACKSPACE;\n boolean del = event.getKeyCode() == KeyEvent.KeyCode.KEY_DELETE;\n if( bs || del) {\n\n //if backspace and at start, do nothing\n if(bs && cursor.getRow() == 0 && cursor.getCol()==0) return;\n //if delete and at end, do nothing\n if(del && cursor.atEndOfText()) {\n return;\n }\n\n //if text is empty do nothing\n String t = getText();\n if(t.length() == 0) return;\n\n if(selection.isActive()) {\n String[] parts = cursor.splitSelectedText();\n setText(parts[0]+parts[2]);\n cursor.setIndex(parts[0].length());\n selection.clear();\n } else {\n //split, then remove text in the middle\n int splitPoint = cursor.getIndex();\n int altSplitPoint = cursor.rowColToIndex(cursor.getRow(),cursor.getCol());\n String[] parts = cursor.splitText(splitPoint);\n if(del) {\n parts[1] = parts[1].substring(1);\n }\n if(bs) {\n parts[0] = parts[0].substring(0,cursor.getIndex()-1);\n }\n setText(parts[0]+parts[1]);\n if(bs) {\n cursor.moveLeft(1);\n }\n }\n return;\n }\n\n //left arrow\n if(event.getKeyCode() == KeyEvent.KeyCode.KEY_LEFT_ARROW) {\n if(event.isShiftPressed()) {\n if(!selection.isActive()) {\n selection.clear();\n selection.setStart(cursor.getIndex());\n selection.setEnd(cursor.getIndex());\n }\n //extend selection only if this wouldn't make us wrap backward\n if(!cursor.atStartOfLine()) {\n selection.setEnd(selection.getEnd()-1);\n }\n } else {\n selection.clear();\n }\n cursor.moveLeft(1);\n setDrawingDirty();\n return;\n }\n\n //right arrow\n if(event.getKeyCode() == KeyEvent.KeyCode.KEY_RIGHT_ARROW) {\n if(event.isShiftPressed()) {\n if(!selection.isActive()) {\n selection.clear();\n selection.setStart(cursor.getIndex());\n selection.setEnd(cursor.getIndex());\n }\n //extend selection only it this wouldn't make us wrap forward\n if(!cursor.atEndOfLine()) {\n selection.setEnd(selection.getEnd()+1);\n }\n } else {\n selection.clear();\n }\n cursor.moveRight(1);\n setDrawingDirty();\n }\n\n //up arrow\n if(event.getKeyCode() == KeyEvent.KeyCode.KEY_UP_ARROW) {\n if(allowMultiLine) {\n cursor.moveUp(1);\n } else {\n if(event.isShiftPressed()) {\n if(!selection.isActive()) {\n selection.clear();\n selection.setStart(0);\n selection.setEnd(cursor.getIndex());\n } else {\n selection.setEnd(0);\n }\n }\n cursor.moveStart();\n }\n setDrawingDirty();\n }\n\n if(event.getKeyCode() == KeyEvent.KeyCode.KEY_DOWN_ARROW) {\n if(allowMultiLine) {\n cursor.moveDown(1);\n } else {\n if(event.isShiftPressed()) {\n if(!selection.isActive()) {\n selection.clear();\n selection.setStart(cursor.getIndex());\n selection.setEnd(getText().length());\n } else {\n selection.setEnd(getText().length());\n }\n }\n cursor.moveEnd();\n }\n setDrawingDirty();\n }\n\n if(event.getKeyCode() == KeyEvent.KeyCode.KEY_TAB) {\n if(event.isShiftPressed()) {\n Core.getShared().getFocusManager().gotoPrevFocusableNode();\n } else {\n Core.getShared().getFocusManager().gotoNextFocusableNode();\n }\n }\n\n}", "public boolean processEvent(KeyEvent e)\n { \n\t if (e.getID()!=KeyEvent.KEY_TYPED) return false;\n\n char character = e.getKeyChar();\n int modifiers = getModifiers(e);\n\n String sequence = processChar(character, modifiers);\n if (sequence==null) return true;\n if (sequence.length()==0) { return true; }\n\n Component component = e.getComponent();\n if (component instanceof JTextComponent)\n { \n \t JTextComponent field = (JTextComponent)component;\n int start = field.getSelectionStart();\n int end = field.getSelectionEnd();\n String text = field.getText();\n text = text.substring(0,start) + sequence + text.substring(end);\n field.setText(text);\n field.setCaretPosition(start + sequence.length());\n return true;\n }\n return false;\n }", "@Override\n\tpublic void characters(char[] ch, int start, int length) {\n\t\tif (inWord) {\n\t\t\tString w = new String(ch, start, length);\n\t\t\tif (currentElementText == null)\n\t\t\t\tcurrentElementText = w;\n\t\t\telse\n\t\t\t\tcurrentElementText += w;\n\t\t}\n\t\tsuper.characters(ch, start, length);\n\t}", "@Override\n public void afterTextChanged(Editable s) {\n outputBasedOnText(s);\n }", "private void txt() {\n\n\t}", "private void addCharacters(\n final SAXEventType eventType,\n char[] characters, int offset, int length) {\n\n boolean coalesce = true;\n\n startRecording();\n\n // Coalesce adjacent character events together.\n if (lastEventType != eventType) {\n // Add the event type.\n addEvent(eventType);\n\n coalesce = false;\n }\n\n if (coalesce) {\n int lastLength = lastCharacterEventLength.getValue();\n int totalLength = lastLength + length;\n lastCharacterEventLength.setValue(totalLength);\n if(LOGGER.isDebugEnabled()) {\n LOGGER.debug(\"characters (coalesce)='\" +\n new String(characters,offset, length) + \"'\");\n }\n } else {\n if (LOGGER.isDebugEnabled()) {\n LOGGER.debug(\"characters='\" +\n new String(characters, offset, length) + \"'\");\n }\n addInt(characterCount);\n\n addPlaceHolderValue(lastCharacterEventLength);\n\n lastCharacterEventLength.setValue(length);\n }\n\n ensureCharacterArrayCapacity(characterCount + length);\n System.arraycopy(characters, offset, characterArray, characterCount,\n length);\n characterCount += length;\n }", "@Override\t\r\n\t\tpublic void insertUpdate(DocumentEvent e) {\n\t\t\tMessage = t.getText();\r\n\t\t\t//t.getText().length()>\r\n\t\t\tcanvas.repaint();\r\n\t\t\t\r\n\t\t}", "public static void OnPreviewKeyDown(Object sender, KeyEventArgs e) \r\n { \r\n if (e.Key != Key.ImeProcessed)\r\n { \r\n return;\r\n }\r\n\r\n RichTextBox richTextBox = sender as RichTextBox; \r\n\r\n if (richTextBox == null) \r\n { \r\n return;\r\n } \r\n\r\n TextEditor This = richTextBox.TextEditor;\r\n\r\n if (This == null || !This._IsEnabled || This.IsReadOnly || !This._IsSourceInScope(e.OriginalSource)) \r\n {\r\n return; \r\n } \r\n\r\n // Ignore repeated events generated when the key is hold down for long time \r\n if (e.IsRepeat)\r\n {\r\n return;\r\n } \r\n\r\n if (This.TextStore == null || \r\n This.TextStore.IsComposing) \r\n {\r\n return; \r\n }\r\n\r\n if (richTextBox.Selection.IsEmpty)\r\n { \r\n return;\r\n } \r\n\r\n This.SetText(This.Selection, String.Empty, InputLanguageManager.Current.CurrentInputLanguage);\r\n\r\n // NB: we do not handle the event. We want the IME to handle it.\r\n }", "@Override\n public void convertCharacter(char character, StringBuilder outputTextBuilder) {\n }", "public abstract void drawChars(char data[], int offset, int length, int x, int y);", "void onInput(Terminal terminal, int numChars, String current);", "private void update_text() {\n\n if(i < text_data.length) {\n i++;\n // text_data.setText(String.valueOf(i)); = avoid the RunTime error\n myHandler.post(myRunnable); // relate this to a Runnable\n } else {\n myTimer.cancel(); // stop the timer\n return;\n }\n }", "@Override\n public void afterTextChanged(Editable charSequence) {\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(e.getSource()==b1){\n\t\t\ttry {\n\t\t\t\tint nLines = text.getLineCount();\n\t\t\t\tint start = text.getLineStartOffset(nLines-1);\n\t\t\t\tint end = text.getLineEndOffset(nLines -1);\n\t\t\t\tString m = text.getText(start, (end - start));\n\t\t\t\tString result = c.send(\"1 \" + m);\n\t\t\t\tSystem.out.println(\"Sending: \" + m);\n\t\t\t\ttext.append(\" \\nMultimedia:\\n\" + result + \"\\n\");\n\t\t\t\ttext.append(\">Introduce name of file: \\n\");\n\t\t\t} catch (BadLocationException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t}else if(e.getSource()==b2){\n\t\t\ttry {\n\t\t\t\tint nLines = text.getLineCount();\n\t\t\t\tint start = text.getLineStartOffset(nLines-1);\n\t\t\t\tint end = text.getLineEndOffset(nLines -1);\n\t\t\t\tString m = text.getText(start, (end - start));\n\t\t\t\tc.send(\"2 \" + m);\n\t\t\t\tSystem.out.println(\"Sending: \" + m);\n\t\t\t\ttext.append(\" \\nMultimedia being played on server\\n\" );\n\t\t\t\ttext.append(\">Introduce name of file: \\n\");\n\t\t\t} catch (BadLocationException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t}else if(e.getSource()==b3){\n\t\t\tSystem.exit(0);\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic void insertUpdate(DocumentEvent e) {\n\t\tif(!listenChange) return;\n\t\tdisplaySelf = false;\n\t\tDocument doc = e.getDocument();\n\t\ttry {\n\t\t\tint offset = e.getOffset();\n\t\t\tString text = doc.getText(0, doc.getLength());\n\t\t\tfor(int i = 0; i < e.getLength(); ++i) {\n\t\t\t\tthis.processInsert(offset+i, text.charAt(offset+i));\n\t\t\t}\n\t\t\t//System.out.println(text.substring(offset, offset+e.getLength()));\n\t\t} catch (BadLocationException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t}", "@Override\n public void verbatim_()\n {\n getListener().onVerbatim(this.accumulatedText.toString(), true, Collections.<String, String>emptyMap());\n this.accumulatedText.setLength(0);\n this.isInVerbatim = false;\n }", "@Override\n \tpublic void characters(final char inbuf[], final int offset, final int len)\n \t\t\tthrows SAXException {\n \t\tif (curAtom != null || !isParsing(eIsParsing.NONE)) {\n \t\t\tfinal String tmpString = new String(inbuf, offset, len);\n \t\t\tbuf += tmpString;\n \t\t}\n \t}", "public static void putTextDatatoClipBoard(String textData) {\n\t\tLog.d(TAG, \"66666,textData = \" + textData);\n\t\t// ClipData clip = ClipData.newPlainText(\"simple text\",textData);\n\t\tmClipboard.setPrimaryClip(ClipData.newPlainText(\"data\", textData));\n\t\t// getTextDataFromClipBoard();\n\n\t}", "@Override\n\t\t\tpublic void onPrimaryClipChanged() {\n\t\t\t\tClipData data = mClipboard.getPrimaryClip();\n\t\t\t\tItem item = data.getItemAt(0);\n\t\t\t\tLog.e(ClientSocketThread.TAG, \"复制文字========:\"+item.getText());\t\n \t\t\t\tsendSocketDataTotalLen = item.getText().toString().getBytes().length+4;\n\t\t\t\tsendTotalLen = FileUtil.intToByte(sendSocketDataTotalLen);\n\t\t\t\tsendSocketDataCategories =7;\n\t\t\t\tsendCategories = FileUtil.intToByte(sendSocketDataCategories);\n\t\t\t\tbyte[] sendDataBuffer = new byte[sendSocketDataTotalLen+4];\n\t\t\t\tSystem.arraycopy(sendTotalLen, 0, sendDataBuffer, 0, 4);\n\t\t\t\tSystem.arraycopy(sendCategories, 0, sendDataBuffer, 4, 4);\n\t\t\t\tSystem.arraycopy(item.getText().toString().getBytes(), 0, sendDataBuffer, 8, item.getText().toString().getBytes().length);\n\t\t\t\tThreadReadWriterIOSocket.writeDataToSocket(sendDataBuffer);\n\t\t\t}", "public void onChange(TextNoteDataChangeEvent event);", "public void dataControl() {\n\t\tString name = \"\", xCor = \"\", yCor = \"\";\n\t\tname = _nameTf.getText().toString();\n\t\txCor = _xTf.getText().toString();\n\t\tyCor = _yTf.getText().toString();\n\n\t\t_missionTa.append(getCurrentTimeStamp() + \"\\n\");\n\n\t\tif (checkV(name, xCor, yCor)) {\n\t\t\tsendData(name, xCor, yCor);\n\t\t}\n\n\t\tclearText();\n\t}", "@Override\r\n\tpublic void characters(char[] ch, int start, int length) throws SAXException {\n\r\n\t\tString text = new String(ch, start, length).trim();\r\n\t\tif(text.isEmpty()) return;\r\n\t\t\t\t\r\n\t\tif (currentTag.equals(ComputerTagEnum.NAME)) {\r\n\t\t\tdevice.setName(text);\r\n\t\t} else if (currentTag.equals(ComputerTagEnum.ORIGIN)) {\r\n\t\t\tdevice.setOrigin(text);\r\n\t\t} else if (currentTag.equals(ComputerTagEnum.PRICE)) {\r\n\t\t\tdevice.setPrice(new BigInteger(text));\r\n\t\t} else if (currentTag.equals(ComputerTagEnum.COOLER)) {\r\n\t\t\ttype.setCooler(Boolean.valueOf(text));\r\n\t\t} else if (currentTag.equals(ComputerTagEnum.ENERGY)) {\r\n\t\t\ttype.setEnergy(Double.valueOf(text));\r\n\t\t} else if (currentTag.equals(ComputerTagEnum.GROUP)) {\r\n\t\t\ttype.setGroup(Group.fromValue(text));\r\n\t\t} else if (currentTag.equals(ComputerTagEnum.PORT)) {\r\n\t\t\tif (type.getClass() == Internal.class) {\r\n\t\t\t\t((Internal) type).setPort(IntPort.valueOf(text.toUpperCase()));\r\n\t\t\t} else if (type.getClass() == External.class) {\r\n\t\t\t\t((External) type).setPort(ExtPort.valueOf(text.toUpperCase()));\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}", "public void characters (char ch[], int start, int length) throws SAXException {\n\t\tif(this.fieldName != null) {\n\t\t\tchar[] ch2 = new char[length];\n\t\t\tSystem.arraycopy(ch, start, ch2, 0, length);\n\t\t\t// Concatenate into previous values, as for cases with special characters\n\t\t\t// the content might be split into multiple chunks\n\t\t\tthis.fieldValue = this.fieldValue + new String(ch2);\n\t\t}\n\t}", "private void putReceivedCharacter(int receivedCharacter) {\n\t\t// Handle backspace and delete by removing last char if possible\n\t\t// If too late, pass it through and let the next level handle it.\n\t\tif (receivedCharacter == 8 || receivedCharacter == 127) {\n\t\t\tint len = demodulatedTextStringBuffer.length();\n\t\t\tif (len > 0) {\n\t\t\t\tdemodulatedTextStringBuffer.setLength(len - 1);\n\t\t\t} else {\n\t\t\t\t// too late\n\t\t\t\tdemodulatedTextStringBuffer.append((char) receivedCharacter);\n\t\t\t}\n\t\t} else {\n\t\t\tdemodulatedTextStringBuffer.append((char) receivedCharacter);\n\t\t}\n\t}", "public void characters(char[] ch, int start, int length) throws SAXException {\n if (currentDeal != null) {\n // don't forget to trim excess spaces from the ends of the string\n if (idDeal.equals(\"open\")) {\n String id = new String(ch, start, length).trim();\n currentDeal.setIddeal(id);\n } else\n if (titreDeal.equals(\"open\")) {\n String nom = new String(ch, start, length).trim();\n currentDeal.setTitre(nom);\n }\n else\n if (descDeal.equals(\"open\")) {\n String des = new String(ch, start, length).trim();\n currentDeal.setDesc(des);\n }\n else\n if (img.equals(\"open\")) {\n String image = new String(ch, start, length).trim();\n currentDeal.setImg(\"http://localhost:1234/pidv/\"+image);\n }\n }\n }", "public void handleEvent(Event event) {\n if ((currentTextReports != null)\n && (currentTextReports.size() > currentTextIndex)\n && (currentTextIndex >= 1)) {\n String dispStr = removeCR((String) currentTextReports\n .get(currentTextIndex - 1)[0]);\n\t\t\t\t\tString curText = text.getText();\n\t\t\t\t\tint endIndex = curText.indexOf(\"----\");\n if (endIndex != -1) {\n curText = curText.substring(0, endIndex + 4);\n text.setText(curText + \"\\n\" + dispStr);\n } else\n\t\t\t\t\t\ttext.setText(dispStr);\n\t\t\t\t\tprevBtn.setEnabled(true);\n\t\t\t\t\tcurrentTextIndex--;\n if (currentTextIndex == 0) {\n\t\t\t\t\t\tnextBtn.setEnabled(false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "@Override\n\tpublic void characters(char ch[], int start, int length) {\n\t\tif (this.in_documentnametag) {\n\t\t\tkmlDocument.setName(new String(ch, start, length));\n//\t\t\tLog.e(tag, \"in_documentnametag=[\" + new String(ch, start, length));\n\t\t} else if (this.in_foldernametag) {\n\t\t\tfolder.setName(new String(ch, start, length));\n//\t\t\tLog.e(tag, \"in_foldernametag=[\" + new String(ch, start, length));\n\t\t} else if (this.in_placemarknametag) {\n\t\t\tdpm.setName(new String(ch, start, length));\n//\t\t\tLog.e(tag, \"in_placemarknametag=[\" + new String(ch, start, length));\n\t\t} else if (this.in_addresstag) {\n\t\t\tdpm.parkingAddress = new String(ch, start, length);\n\t\t\tdpm.isParking = true;\n//\t\t\tLog.e(tag, \"in_addresstag=[\" + new String(ch, start, length));\n\t\t} else if (this.in_descriptiontag) {\n\t\t\tString s = new String(ch, start, length);\n//\t\t\tLog.e(tag, \"************* original description [\" + s + \"]*************\");\n\t\t\tif (null != s && s.length() > 2) {\n\t\t\t\tif (s.contains(\",\")) {\n\t\t\t\t\tparseDescription(s, dpm);\n\t\t\t\t\tdpm.setDescription(s);\n\t\t\t\t} else {\n//\t\t\t\t\tLog.e(tag, \"no ',' found!!!!!\");\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (this.in_coordinatestag) {\n\t\t\ttmpStringList.add(new String(ch, start, length));\n\t\t} else {\n\t\t}\n\t}", "@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\ttextView.setText(text);\n\t\t\t\t\t\t\t}", "public void textRcvDataThread() {\n new Thread() {\n public void run() {\n while(isTextRcvData) {\n androidcontrolinterfaceVariable = (androidcontrolinterface) getApplication();\n rcvData = androidcontrolinterfaceVariable.getReceiveData();\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n textRcvData.setText((int) rcvData[1] + \" \" + (int) rcvData[2]);\n }\n });\n try {\n Thread.sleep(100);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }\n }.start();\n }", "private void receiveMessage(int index, String from, String text) {\n\t\tchathistory[index].append(\"\\n\" + from + \": \" + text);\n\n\t\t/* keep the text bar 'autoscrolling' */\n\t\tStyledTextContent doc = chathistory[index].getContent();\n\t\tint docLength = doc.getCharCount();\n\t\tif (docLength > 0) {\n\t\t\tchathistory[index].setCaretOffset(docLength);\n\t\t\tchathistory[index].showSelection();\n\t\t}\n\n\t}", "@Override\n\tpublic void characters(final char[] ch, final int start, final int length)\n\t\tthrows SAXException {\n\t\tif (this.isText) {\n\t\t\tif (this.isAPeso || this.isTMarcadoInicial) {\n\t\t\t\t//Se setea el valor del elemento actual\n\t\t\t\tthis.actual.setValorElemento(Integer.parseInt(String.valueOf(ch, start, length)));\n\t\t\t\t//se limpian las banderas para proximas etiquetas\n\t\t\t\tthis.isText = false;\n\t\t\t\tthis.isAPeso = false;\n\t\t\t\tthis.isTMarcadoInicial = false;\n\t\t\t}\n\t\t\telse if(isActualTransition || isPlace ){ \n\t\t\t\tString humanId = new String(ch,start,length);\n\t\t\t\tthis.actual.setId(humanId);\n\t\t\t\tthis.isActualTransition = false;\n\t\t\t\tisPlace = false;\n\t\t\t\tthis.isText=false;\n\t\t\t\tidsMap.put(tempId, humanId);\n\t\t\t}\n\t\t\t//si bText es true, pero bAPeso y bTMarcadoInicial son falso, se cambia bTexto a false\n\t\t\telse {\n\t\t\t\tthis.isText = false;\n\t\t\t}\n\t\t}\n\t\telse if(this.isType && this.isActualArco == true){\n//\t\t\tString value = String.valueOf(ch, start, length);\n//\t\t\tif(value.compareToIgnoreCase(\"test\")== 0){\n//\t\t\t\t((ElementoArco)this.actual).setTipo(TipoArco.LECTOR);\n//\t\t\t}else if (value.compareToIgnoreCase(\"inhibitor\") == 0){\n//\t\t\t\t((ElementoArco)this.actual).setTipo(TipoArco.INHIBIDOR);\n//\t\t\t}else{\n//\t\t\t\tthrow new SAXException(\"Tipo de Arco no soportado: \" + value);\n//\t\t\t}\n\t\t\t\n\t\t\tthis.isType = false;\n\t\t\tthis.isActualArco = false;\n\t\t\t\n\t\t}\n\t}", "@Override\n public void characters(char[] ch, int start, int length)\n throws SAXException {\n\n if (elementOn) {\n elementValue = new String(ch, start, length);\n elementOn = false;\n }\n\n }", "@Override\r\n\t\tpublic void focusLost(FocusEvent e) {\n\t\t\tString content = tt.wordTextPane.getText();\r\n\t\t\ttt.setContent(content);\r\n\t\t\ttt.dealWith(content);\r\n\t\t}", "public void handleKeyEvent(int id, int keyCode, char keyChar, int modifier) { }", "public void addCharacters(final String pContent) throws XMLStreamException {\n\t\tfinal XMLEvent tmpEvent = eventFactory.createCharacters(pContent);\n\t\twriter.add(tmpEvent);\n\t}", "@Override\n public void characters(char[] ch, int start, int length)\n throws SAXException {\n\n // We don't need this, because our values are set as an attribute\n\n }", "@Override\n\tpublic void onEvent(String name, String params, byte[] data, int offset,\n\t\t\tint length) {\n\t\tString result = \"name:\" + name;\n\t\t//if(params != null && !params.isEmpty()){\n\t\t//\tresult+=\";params:\"+params;\n\t\t//}\n\t\tif(name.equals(SpeechConstant.CALLBACK_EVENT_ASR_PARTIAL)){\n\t\t\tif(params.contains(\"\\\"final_result\\\"\")){\n\t\t\t\tresult += \"\\n\"+\"语义解析结果:\" + params.substring(45, 47);\n\t\t\t\tif(result.contains(\"前进\")){\n\t\t\t\t\tToast.makeText(MainActivity.this,\"识别出了前进!\",Toast.LENGTH_SHORT).show();\n\t\t\t\t\ttry{\n\t\t\t\t\t\tToast.makeText(MainActivity.this, \"Try to send message to car!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\tsocketWriter= socket.getOutputStream();\n\t\t\t\t\t\tsocketWriter.write(COMM_FORWARD);\n\t\t\t\t\t\tsocketWriter.flush();\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e){\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tToast.makeText(MainActivity.this, \"Try to send message to car!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(result.contains(\"后退\")){\n\t\t\t\t\tToast.makeText(MainActivity.this,\"识别出了后退!\",Toast.LENGTH_SHORT).show();\n\t\t\t\t\ttry{\n\t\t\t\t\t\tToast.makeText(MainActivity.this, \"Try to send message to car!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\tsocketWriter= socket.getOutputStream();\n\t\t\t\t\t\tsocketWriter.write(COMM_BACKWARD);\n\t\t\t\t\t\tsocketWriter.flush();\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e){\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tToast.makeText(MainActivity.this, \"Try to send message to car!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(result.contains(\"左转\")){\n\t\t\t\t\tToast.makeText(MainActivity.this,\"识别出了左转!\",Toast.LENGTH_SHORT).show();\n\t\t\t\t\ttry{\n\t\t\t\t\t\tToast.makeText(MainActivity.this, \"Try to send message to car!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\tsocketWriter= socket.getOutputStream();\n\t\t\t\t\t\tsocketWriter.write(COMM_LEFT);\n\t\t\t\t\t\tsocketWriter.flush();\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e){\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tToast.makeText(MainActivity.this, \"Try to send message to car!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(result.contains(\"右转\")){\n\t\t\t\t\tToast.makeText(MainActivity.this,\"识别出了右转!\",Toast.LENGTH_SHORT).show();\n\t\t\t\t\ttry{\n\t\t\t\t\t\tToast.makeText(MainActivity.this, \"Try to send message to car!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\tsocketWriter= socket.getOutputStream();\n\t\t\t\t\t\tsocketWriter.write(COMM_RIGHT);\n\t\t\t\t\t\tsocketWriter.flush();\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e){\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tToast.makeText(MainActivity.this, \"Try to send message to car!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(result.contains(\"停\")){\n\t\t\t\t\tToast.makeText(MainActivity.this,\"识别出了停止!\",Toast.LENGTH_SHORT).show();\n\t\t\t\t\ttry{\n\t\t\t\t\t\tToast.makeText(MainActivity.this, \"Try to send message to car!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\tsocketWriter= socket.getOutputStream();\n\t\t\t\t\t\tsocketWriter.write(COMM_STOP);\n\t\t\t\t\t\tsocketWriter.flush();\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e){\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tToast.makeText(MainActivity.this, \"Try to send message to car!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(result.contains(\"避障\")){\n\t\t\t\t\tToast.makeText(MainActivity.this,\"识别出了避障!\",Toast.LENGTH_SHORT).show();\n\t\t\t\t\ttry{\n\t\t\t\t\t\tToast.makeText(MainActivity.this, \"Try to send message to car!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\tsocketWriter= socket.getOutputStream();\n\t\t\t\t\t\tsocketWriter.write(COMM_AVOID);\n\t\t\t\t\t\tsocketWriter.flush();\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e){\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tToast.makeText(MainActivity.this, \"Try to send message to car!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(result.contains(\"跟踪\")){\n\t\t\t\t\tToast.makeText(MainActivity.this,\"识别出了跟踪!\",Toast.LENGTH_SHORT).show();\n\t\t\t\t\ttry{\n\t\t\t\t\t\tToast.makeText(MainActivity.this, \"Try to send message to car!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\tsocketWriter= socket.getOutputStream();\n\t\t\t\t\t\tsocketWriter.write(COMM_FOLLOW);\n\t\t\t\t\t\tsocketWriter.flush();\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e){\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tToast.makeText(MainActivity.this, \"Try to send message to car!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(result.contains(\"抓取\")){\n\t\t\t\t\tToast.makeText(MainActivity.this,\"识别出了抓取!\",Toast.LENGTH_SHORT).show();\n\t\t\t\t\tIntent intent = new Intent();\n\t\t\t\t\tintent.setClass(MainActivity.this, GraspActivity.class);\n\t\t\t\t\tMainActivity.this.startActivity(intent);\n\t\t\t\t\tfinish();\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t}else if(data != null){\n\t\t\tresult += \";data length=\" + data.length;\n\t\t}\n\t\t\n\t\t\n\t\t/*if(name.equals(SpeechConstant.CALLBACK_EVENT_ASR_READY)){\n\t\t\tresult +=\"引擎准备就绪,可以开始说话\";\n\t\t}else if(name.equals(SpeechConstant.CALLBACK_EVENT_ASR_BEGIN)){\n\t\t\tresult += \"检测到用户已经开始说话\";\n\t\t}else if(name.equals(SpeechConstant.CALLBACK_EVENT_ASR_END)){\n\t\t\tresult += \"检测到用户已经停止说话\";\n\t\t\t\n\t\t}else if (data != null) {\n\t\t\tresult += \" ;data length=\" + data.length;\n }*/\n\t\n\t\t//show the result\n\t\tprintresult(result);\n\t\t\n\t}", "protected void enterText(InputHandler input)\n\t{\n\t\tif (clearCharBuffer)\n\t\t{\n\t\t\tinput.consumeLastTypedChar();\n\t\t\tclearCharBuffer = false;\n\t\t}\n\t\tchar c = input.consumeLastTypedChar();\n\t\tif (c == '\\b')\n\t\t{\n\t\t\t// Remove a character if the key was backspace\n\t\t\tremoveChar();\n\t\t}\n\t\telse if (c == '\\n')\n\t\t{\n\t\t\t// Call the enter method if the enter key was pressed\n\t\t\tenterPressed();\n\t\t}\n\t\telse if (c != 0)\n\t\t{\n\t\t\t// Add a character to the text field\n\t\t\tputChar(c);\n\t\t}\n\t}", "private static void OnSpace(Object sender, ExecutedRoutedEventArgs e)\r\n {\r\n TextEditor This = TextEditor._GetTextEditor(sender);\r\n\r\n if (This == null || !This._IsEnabled || This.IsReadOnly || !This._IsSourceInScope(e.OriginalSource))\r\n { \r\n return; \r\n }\r\n\r\n // If this event is our Cicero TextStore composition, we always handles through ITextStore::SetText.\r\n if (This.TextStore != null && This.TextStore.IsComposing)\r\n {\r\n return; \r\n }\r\n\r\n if (This.ImmComposition != null && This.ImmComposition.IsComposition) \r\n {\r\n return; \r\n }\r\n\r\n // Consider event handled\r\n e.Handled = true; \r\n\r\n if (This.TextView != null) \r\n { \r\n This.TextView.ThrottleBackgroundTasksForUserInput();\r\n } \r\n\r\n ScheduleInput(This, new TextInputItem(This, \" \", /*isInsertKeyToggled:*/!This._OvertypeMode));\r\n }", "@Override\n\tpublic boolean onTextContextMenuItem(int id)\n\t{\n\t\t// Do your thing:\n\t\tboolean consumed = super.onTextContextMenuItem(id);\n\t\t// React:\n\t\tswitch (id)\n\t\t{\n\t\t\tcase android.R.id.cut:\n\t\t\t\tonTextCut();\n\t\t\t\tbreak;\n\t\t\tcase android.R.id.paste:\n\t\t\t\tonTextPaste();\n\t\t\t\tbreak;\n\t\t\tcase android.R.id.copy:\n\t\t\t\tonTextCopy();\n\t\t}\n\t\treturn consumed;\n\t}", "@Override\r\n public void keyPressed(KeyEvent e) {\n char c = e.getKeyChar();\r\n //seteo el caracter como texto del label\r\n lab.setText(Character.toString(c));\r\n }", "@Override\n protected void updateComponentSlots(IAfferentObject guiPercept,\n IChunk perceptualEncoding, IVisualMemory visualMemory)\n {\n try\n {\n ((IMutableSlot) perceptualEncoding.getSymbolicChunk().getSlot(\"text\"))\n .setValue(getHandler().getText(guiPercept));\n }\n catch (Exception e)\n {\n // no text..\n }\n }", "@Override\r\n\tpublic void keyPressed(KeyEvent e) {\n\t\tchar c = e.getKeyChar();\r\n\t\tif(msg.length()< 10)\r\n\t\t{\r\n\t\tmsg += c;\r\n\t\t}\r\n\t\trepaint();\r\n\t}", "@Override\n\t\t\tpublic void onRecvChar(int id, byte[] chars) {\n\t\t\t\tmTxtInfo.setText(getString(R.string.string_get_char_success, id, new File(getCacheDir().getAbsolutePath(), CHAR_FILE_NAME).getAbsolutePath()));\n\t\t\t\tUtils.getFile(chars, getCacheDir().getAbsolutePath(), CHAR_FILE_NAME);\n\t\t\t\tmSpinnerIds.setSelection(id - 1);\n\t\t\t}", "public void characters(String arg0) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}", "@EncoderThread\n protected void onEvent(@NonNull String event, @Nullable Object data) {}", "public void characters(char[] ch, int start, int length) {\n String string = new String(ch, start, length);\n SyntaxTreeNode parent = _parentStack.peek();\n\n if (string.length() == 0) return;\n\n // If this text occurs within an <xsl:text> element we append it\n // as-is to the existing text element\n if (parent instanceof Text) {\n ((Text)parent).setText(string);\n return;\n }\n\n // Ignore text nodes that occur directly under <xsl:stylesheet>\n if (parent instanceof Stylesheet) return;\n\n SyntaxTreeNode bro = parent.lastChild();\n if ((bro != null) && (bro instanceof Text)) {\n Text text = (Text)bro;\n if (!text.isTextElement()) {\n if ((length > 1) || ( ((int)ch[0]) < 0x100)) {\n text.setText(string);\n return;\n }\n }\n }\n\n // Add it as a regular text node otherwise\n parent.addElement(new Text(string));\n }", "@Override\n public void onReceivedData(byte[] arg0) {\n try {\n ultimoDadoRecebido = ultimoDadoRecebido + new String(arg0, \"UTF-8\");\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void getResult(String data, Writer writer, ServerThread serverThread) {\n\t\tserverThread.setModel(0);\n\t\tMyWriter.write(writer, \"200 成功切换为ASCII模式\");\n\t\t\n\t}", "public static void handleTcpTextEvent(String gS, TCPTextHandler tcpTextHanlder) {\n\n\t\t// if the player has logged in. For the first time this message will be\n\t\t// showed\n\t\tif (tcpTextHanlder.isFirstTime) {\n\t\t\ttcpTextHanlder.isFirstTime = false;\n\t\t\ttcpTextHanlder.playerName = gS;\n\t\t\ttcpTextHanlder.tcpTextHandle.write(new String(guessWord) + \" \"\n\t\t\t\t\t+ life);\n\t\t} else {\n\n\t\t\tint index = 0;\n\t\t\tchar gC = gS.charAt(0);\n\n\t\t\t// with wrong guess life of player is decreased\n\t\t\tif (wordToGuess.indexOf(gC) == -1)\n\t\t\t\tlife--;\n\n\t\t\t// correct guess replaces the correct guess letter in guessWord at\n\t\t\t// matching position\n\t\t\twhile ((index = wordToGuess.indexOf(gC, index)) != -1) {\n\t\t\t\tguessWord.setCharAt(index, gC);\n\t\t\t\tindex++;\n\t\t\t}\n\n\t\t\t// current status to be printed to user\n\t\t\tgameStatus = gC + \" \" + guessWord + \" \" + life + \" \"\n\t\t\t\t\t+ tcpTextHanlder.playerName;\n\n\t\t\t// game is Lost\n\t\t\tif (life < 1) {\n\t\t\t\tgameStatus = gameStatus\n\t\t\t\t\t\t+ \"\\n\\n Game over!\";\n\t\t\t\tgameOver = true;\n\t\t\t}\n\n\t\t\t// game is won\n\t\t\tif (wordToGuess.equals(guessWord.toString())) {\n\t\t\t\tgameStatus = gameStatus + \"\\n\\n Congratulations!\";\n\t\t\t\tgameOver = true;\n\t\t\t}\n\n\t\t\t// this handles broadcasting message to the players console\n\t\t\teventDispatcher.BroadCastMessage(gameStatus);\n\n\t\t\t// this handles the condition when game is over\n\t\t\tif (gameOver == true) {\n\t\t\t\teventDispatcher.ClearHandlers();\n\t\t\t}\n\t\t}\n\t}", "public void addTag(ActionEvent e) {\n\t\tStringBuilder finalText = new StringBuilder();\n\t\tinputText = new StringBuilder();\n\t\tparameters = outputArea.getText().split(\", \");\n\t\t// Get InputArea Text\n\t\tinputText.append(MainController.oldInput);\n\t\tString[] lines = inputText.toString().split(\"\\\\n\");\n\t\t// For each line of inputText...\n\t\tfor (int i = 0; i < lines.length; i++) {\n\t\t\tfinalText.append(lines[i]);\n\t\t\tif (i == MainController.caretValue) {\n\t\t\t\tswitch(active) {\n\t\t\t\t\tcase \"character\": finalText.append(addCharacter()); break;\n\t\t\t\t\tcase \"mood\": finalText.append(addMood()); break;\n\t\t\t\t\tcase \"animation\": finalText.append(addAnimation()); break;\n\t\t\t\t\tcase \"background\": finalText.append(addBackground()); break;\n\t\t\t\t\tcase \"effect\": finalText.append(addEffect()); break;\n\t\t\t\t\tcase \"music\": finalText.append(addMusic()); break;\n\t\t\t\t\tcase \"display\": finalText.append(addDisplay()); break;\n\t\t\t\t\tcase \"options\": finalText.append(addOptions()); break;\n\t\t\t\t\tcase \"void\": finalText.append(addVoid()); break;\n\t\t\t\t\tcase \"end\": finalText.append(addEnd()); break;\n\t\t\t\t\tcase \"title\":\n\t\t\t\t\t\tfinalText.append(addTitle(finalText) + \"\\n\");\n\t\t\t\t\t\tfinalText.append(\"|endTitle:\" + parameters[0]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"goto\": finalText.append(addGoto()); break;\n\t\t\t\t\tcase \"extra\": finalText.append(addExtra()); break;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfinalText.append(\"\\n\");\n\n\t\t}\n\n\t\tif (MainController.caretValue == lines.length) {\n\t\t\tswitch(active) {\n\t\t\t\tcase \"character\": finalText.append(addCharacter()); break;\n\t\t\t\tcase \"mood\": finalText.append(addMood()); break;\n\t\t\t\tcase \"animation\": finalText.append(addAnimation()); break;\n\t\t\t\tcase \"background\": finalText.append(addBackground()); break;\n\t\t\t\tcase \"effect\": finalText.append(addEffect()); break;\n\t\t\t\tcase \"music\": finalText.append(addMusic()); break;\n\t\t\t\tcase \"display\": finalText.append(addDisplay()); break;\n\t\t\t\tcase \"options\": finalText.append(addOptions()); break;\n\t\t\t\tcase \"void\": finalText.append(addVoid()); break;\n\t\t\t\tcase \"end\": finalText.append(addEnd()); break;\n\t\t\t\tcase \"goto\": finalText.append(addGoto()); break;\n\t\t\t\tcase \"extra\": finalText.append(addExtra()); break;\n\t\t\t}\n\t\t}\n\n\t\tif (active == \"title\" && MainController.caretValue >= lines.length) {\n\t\t\tfinalText.append(addTitle(finalText) + \"\\n\");\n\t\t\tfinalText.append(\"|endTitle:\" + parameters[0]);\n\t\t}\n\n\t\t//\t Append the current line to finalText.\n\t\t//\t If the current line == the caret's paragraph value, go through the switch\n\t\t// Append to InputArea\n\t\tMainController.oldInput = finalText.toString();\n\t\tchangeView(e);\n\t}", "@Override\n\tpublic void ACC_X_ObjectEvent(Interface.ACC_X_ObjectEvent e, String data) {\n\t\t\n\t}", "@Override\n public void send(final CharSequence text) {\n final KeyCharacterMap characterMap = KeyCharacterMap.load(KeyCharacterMap.VIRTUAL_KEYBOARD);\n\n long timeout =\n System.currentTimeMillis()\n + serverInstrumentation.getAndroidWait().getTimeoutInMillis();\n SelendroidLogger.info(\"Using timeout of \" + timeout + \" milli seconds.\");\n\n done = false;\n\n instrumentation.runOnMainSync(new Runnable() {\n public void run() {\n for (int i = 0; i < text.length(); i++) {\n char c = text.charAt(i);\n int code = WebViewKeys.getKeyEventFromUnicodeKey(c);\n if (code != -1) {\n webview.dispatchKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, code));\n webview.dispatchKeyEvent(new KeyEvent(KeyEvent.ACTION_UP, code));\n } else {\n KeyEvent[] arr = characterMap.getEvents(new char[] {c});\n if (arr != null) {\n for (int j = 0; j < arr.length; j++) {\n webview.dispatchKeyEvent(arr[j]);\n }\n }\n }\n }\n done = true;\n }\n });\n }" ]
[ "0.7437922", "0.680807", "0.65631604", "0.6427471", "0.63837945", "0.6252196", "0.62050736", "0.61927307", "0.61534685", "0.61454016", "0.6103222", "0.6101527", "0.60504013", "0.6037382", "0.6022723", "0.59605545", "0.59478986", "0.5937961", "0.5918167", "0.58833057", "0.5881753", "0.58752626", "0.58581936", "0.5830642", "0.5824406", "0.57775104", "0.57539195", "0.5750289", "0.57496995", "0.57370496", "0.57194483", "0.57079774", "0.5703164", "0.5694633", "0.5677947", "0.5641631", "0.56371945", "0.5633339", "0.56255835", "0.56242657", "0.56167686", "0.5562575", "0.55406344", "0.5534736", "0.55303985", "0.55242586", "0.55239415", "0.55226094", "0.5512989", "0.55045724", "0.5480955", "0.546347", "0.54532397", "0.54408544", "0.5436361", "0.5433057", "0.5429646", "0.5424108", "0.54234856", "0.54226553", "0.54203254", "0.5418699", "0.5415225", "0.540796", "0.5391157", "0.53882694", "0.5382947", "0.5379015", "0.53786945", "0.5375953", "0.5365989", "0.5348769", "0.5347442", "0.5345655", "0.53424597", "0.53331745", "0.53285855", "0.53177035", "0.5313973", "0.5311631", "0.53085667", "0.53055924", "0.5302696", "0.53017604", "0.53010267", "0.529939", "0.5295492", "0.5290598", "0.5283935", "0.52827734", "0.527626", "0.52748793", "0.5264216", "0.5263051", "0.52565384", "0.5255646", "0.52534616", "0.5251677", "0.5251262", "0.52503765", "0.52449656" ]
0.0
-1
Namespace declaration beginning handler
@Override public void startPrefixMapping( String prefix, String uri ) throws SAXException { // ... }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void start_ns(Object parser, String prefix, String uri) {\n Array.array_push(this.ns_decls, new Array<Object>(new ArrayEntry<Object>(prefix), new ArrayEntry<Object>(uri)));\r\n }", "void declarePrefix(String prefix, String namespace);", "@Override\n\tpublic void namespace() {\n\t\t\n\t}", "private void emitNS(Namespace namespace) throws SAXException {\n if (namespace.getPrefix() == null || \n namespace.getNamespaceURI() == null) return;\n handler.startPrefixMapping(namespace.getPrefix(), namespace.getNamespaceURI());\n }", "private void handleNamespaceDeclaration() throws IOException {\r\n if (this.tempMapping != null) {\r\n PrefixMapping pm = null;\r\n for (int i = 0; i < tempMapping.size(); i++) {\r\n pm = (PrefixMapping)tempMapping.get(i);\r\n this.writer.write(\" xmlns\");\r\n // specify a prefix if different from \"\"\r\n if (!\"\".equals(pm.prefix)) {\r\n this.writer.write(':');\r\n this.writer.write(pm.prefix);\r\n }\r\n this.writer.write(\"=\\\"\");\r\n this.writer.write(pm.uri);\r\n this.writer.write(\"\\\"\");\r\n }\r\n this.tempMapping = null;\r\n }\r\n }", "@Override\n\tpublic void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {\n\t\ttry {\n\t\t\tif (!startTagIsClosed) {\n\t\t\t\twrite(\">\");\n\t\t\t}\n\t\t\telementLevel++;\n\t\t\t// nsSupport.pushContext();\n\n\t\t\twrite('<');\n\t\t\twrite(qName);\n\t\t\twriteAttributes(atts);\n\n\t\t\t// declare namespaces specified by the startPrefixMapping methods\n\t\t\tif (!locallyDeclaredPrefix.isEmpty()) {\n\t\t\t\tfor (Map.Entry<String, String> e : locallyDeclaredPrefix.entrySet()) {\n\t\t\t\t\tString p = e.getKey();\n\t\t\t\t\tString u = e.getValue();\n\t\t\t\t\tif (u == null) {\n\t\t\t\t\t\tu = \"\";\n\t\t\t\t\t}\n\t\t\t\t\twrite(' ');\n\t\t\t\t\tif (\"\".equals(p)) {\n\t\t\t\t\t\twrite(\"xmlns=\\\"\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\twrite(\"xmlns:\");\n\t\t\t\t\t\twrite(p);\n\t\t\t\t\t\twrite(\"=\\\"\");\n\t\t\t\t\t}\n\t\t\t\t\tchar ch[] = u.toCharArray();\n\t\t\t\t\twriteEsc(ch, 0, ch.length, true);\n\t\t\t\t\twrite('\\\"');\n\t\t\t\t}\n\t\t\t\tlocallyDeclaredPrefix.clear(); // clear the contents\n\t\t\t}\n\n\t\t\t// if (elementLevel == 1) {\n\t\t\t// forceNSDecls();\n\t\t\t// }\n\t\t\t// writeNSDecls();\n\t\t\tsuper.startElement(uri, localName, qName, atts);\n\t\t\tstartTagIsClosed = false;\n\t\t} catch (IOException e) {\n\t\t\tthrow new SAXException(e);\n\t\t}\n\t}", "protected abstract void defineNamespace(int index, String prefix)\n throws IOException;", "public void startElement(String namespaceURI, String localName, String qName, Attributes atts)\n throws SAXException {\n log.info(\"startElement : noeud = \"+localName);\n if (N_GENERATION.equalsIgnoreCase(localName)){\n startElement_Generation(namespaceURI, localName, qName, atts);\n }\n if (N_CLASSE.equalsIgnoreCase(localName)){\n startElement_Generer(namespaceURI, localName, qName, atts);\n }\n if (N_TEMPLATE.equalsIgnoreCase(localName)){\n startElement_Template(namespaceURI, localName, qName, atts);\n }\n }", "public void setNamespaceHandler(NamespaceHandler nsHandler)\r\n {\r\n _nsHandler = nsHandler;\r\n }", "@Override\n\tpublic void startElement(QName qname) {\n\t\t\n\t}", "public abstract void startElement( String namespaceURI, String sName, String qName, Attributes attrs );", "@DSComment(\"Package priviledge\")\n @DSBan(DSCat.DEFAULT_MODIFIER)\n @DSSink({DSSinkKind.SENSITIVE_UNCATEGORIZED})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.411 -0500\", hash_original_method = \"4549801F41C68E0A6A490696C062C72D\", hash_generated_method = \"8B62B5695F36760CAD8EDCDC235C2C64\")\n \nvoid declarePrefix(String prefix, String uri) {\n // Lazy processing...\n if (!declsOK) {\n throw new IllegalStateException (\"can't declare any more prefixes in this context\");\n }\n if (!declSeen) {\n copyTables();\n }\n if (declarations == null) {\n declarations = new ArrayList<String>();\n }\n\n prefix = prefix.intern();\n uri = uri.intern();\n if (\"\".equals(prefix)) {\n if (\"\".equals(uri)) {\n defaultNS = null;\n } else {\n defaultNS = uri;\n }\n } else {\n prefixTable.put(prefix, uri);\n uriTable.put(uri, prefix); // may wipe out another prefix\n }\n declarations.add(prefix);\n }", "public void startPrefixMapping(String prefix, String uri)\n throws SAXException {\n namespaces.put(prefix, uri);\n }", "public void end_ns(Object parser, String prefix) {\n }", "@Override\r\n public void startPrefixMapping(String prefix, String uri)\r\n throws SAXException {\n }", "public void startPrefixMapping (String prefix, String uri)\n throws SAXException\n {\n // no op\n }", "@Override\n\t\tpublic void startPrefixMapping(String prefix, String uri)\n\t\t\t\tthrows SAXException {\n\t\t\t\n\t\t}", "@Override\n\tpublic void startPrefixMapping(String prefix, String uri)\n\t\t\tthrows SAXException {\n\t\t\n\t}", "@Override\n\tpublic void startPrefixMapping(String prefix, String uri)\n\t\t\tthrows SAXException {\n\t\t\n\t}", "@Override\n void startElement(String uri, String localName, String qName, Attributes attributes);", "private NamespaceHelper() {}", "public void startPrefixMapping(String prefix, String uri)\n throws SAXException {\n this.ensureInitialization();\n super.startPrefixMapping(prefix, uri);\n }", "public void startElement(String nsURI, String localName, String qName,\n Attributes atts) throws SAXException\n {\n this.ensureInitialization();\n super.startElement(nsURI, localName, qName, atts);\n }", "void visit(Namespace namespace);", "abstract XML addNamespace(Namespace ns);", "public void startPrefixMapping(String prefix, String uri)\r\n\t\t\tthrows SAXException {\r\n\t\t\r\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tSystem.out.println(\"---解析文档开始----\");\n\t}", "@Override\r\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\r\n\t\tSystem.out.println(\"Start Document\");\r\n\t}", "@Override\r\n public void endPrefixMapping(String prefix) throws SAXException {\n }", "public void setNamespace(String namespace) {\n\t\t\r\n\t}", "public void startElement(String uri, String localName, String qName, Attributes attrs) {\r\n if (namespace.length() > 0 && qName.startsWith(namespace)) {\r\n qName = qName.substring(namespace.length());\r\n }\r\n elem = qName;\r\n if (charState >= 0 && lineBuffer.length() > 0) {\r\n \tcharWriter.println(lineBuffer.toString());\r\n \tlineBuffer.setLength(0);\r\n }\r\n if (false) {\r\n } else if (qName.equals(ROOT_TAG)) {\r\n\t\t\t// ignore\r\n } else { // variable GEDCOM keyword\r\n\t charState = 2;\r\n \tlineBuffer.append(String.valueOf(saxLevel));\r\n \tString id = attrs.getValue(ID_ATTR);\r\n \tif (id != null) {\r\n\t \tlineBuffer.append(\" @\");\r\n \t \tlineBuffer.append(id);\r\n \t \tlineBuffer.append('@');\r\n \t}\r\n \tlineBuffer.append(' ');\r\n \tlineBuffer.append(qName.toUpperCase());\r\n \tString ref = attrs.getValue(REF_ATTR);\r\n \tif (ref != null) {\r\n\t \tlineBuffer.append(\" @\");\r\n \t \tlineBuffer.append(ref);\r\n \t \tlineBuffer.append('@');\r\n \t}\r\n \tsaxLevel ++;\r\n } // else ignore unknown elements\r\n }", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tSystem.out.println(\"开始解析文档\");\n\t}", "public void handleDeclaration(HtmlObjects.Declaration t)\n {\n }", "public void startDocument ()\n throws SAXException\n {\n\t System.out.println(\"Sandeep Jaisawal\");\n \n }", "public static void ensureNamespaceDeclaration(final Element element, final String prefix, final String namespaceURI) {\n\t\tif(!isNamespaceDefined(element, prefix, namespaceURI)) { //if this namespace isn't declared for this element\n\t\t\tdeclareNamespace(element, prefix, namespaceURI); //declare the namespace\n\t\t}\n\t}", "@Override\r\n\t\t\t\t\tpublic String getPrefix(String namespaceURI) {\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic String getPrefix(String namespaceURI) {\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic String getPrefix(String namespaceURI) {\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic String getPrefix(String namespaceURI) {\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic String getPrefix(String namespaceURI) {\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}", "@Override\n\t\tpublic void startDocument() throws SAXException {\n\t\t\t\n\t\t}", "public boolean isNamespaceAware () {\n return true;\n }", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\ttry {\n\t\t\treset();\n\n\t\t\tif (writeXmlDecl) {\n\t\t\t\tString e = \"\";\n\t\t\t\tif (encoding != null) {\n\t\t\t\t\te = \" encoding=\\\"\" + encoding + '\\\"';\n\t\t\t\t}\n\n\t\t\t\twriteXmlDecl(\"<?xml version=\\\"1.0\\\"\" + e + \" standalone=\\\"yes\\\"?>\");\n\t\t\t}\n\n\t\t\tif (header != null) {\n\t\t\t\twrite(header);\n\t\t\t}\n\n\t\t\tsuper.startDocument();\n\t\t} catch (IOException e) {\n\t\t\tthrow new SAXException(e);\n\t\t}\n\t}", "@Override\n public void Wsdl2CodeStartedRequest() {\n }", "@Override\r\n\t\tpublic String lookupPrefix(String namespaceURI)\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "@Override\n\tpublic void startElement(String uri, String localName, String qName,\n\t\t\tAttributes atts) throws SAXException {\n\t\t\n\t}", "@Override\r\n\t\tpublic void startDocument() throws SAXException {\n\t\t}", "@Override\r\n public void startDocument() throws SAXException {\n }", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\t\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\t\n\t}", "@Override\n\t\tpublic void endPrefixMapping(String prefix) throws SAXException {\n\t\t\t\n\t\t}", "void setNamespace(java.lang.String namespace);", "@Override\n public void endPrefixMapping(String prefix) throws SAXException {\n // ...\n }", "@Override\n public void startDocument() throws SAXException {\n }", "public void masterDeclaration();", "@Override\n public void startDocument() throws SAXException {\n System.out.println(\"Start parsing document...\");\n nameList = new ArrayList<String>();\n }", "Rule Namespace() {\n // No direct effect on value stack\n return FirstOf(\n ScopedNamespace(),\n PhpNamespace(),\n XsdNamespace());\n }", "@Override\n\tpublic void startDocument() {\n\t\t\n\t}", "@Override\n\tpublic void endPrefixMapping(String prefix) throws SAXException {\n\t\t\n\t}", "@Override\n\tpublic void endPrefixMapping(String prefix) throws SAXException {\n\t\t\n\t}", "@Override\n\tprotected void start () {\n\t\tsuper.start();\t\t\n\t\tncName = mNode.getAttribute( AT_LINK_NAME );\n\n\t}", "@Override\r\n\tpublic void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {\n\t}", "public static void begin() {\n Log.writeln(\"<xml-begin/> <!-- Everything until xml-end is now valid xml -->\");\n }", "public void startDocument() throws SAXException {\n \n }", "Rule ScopedNamespace() {\n return Sequence(\n \"namespace \",\n ScopeAndId());\n }", "protected void sequence_FunctionNamespace(ISerializationContext context, FunctionNamespace semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, SiddhiPackage.eINSTANCE.getFunctionNamespace_Name()) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SiddhiPackage.eINSTANCE.getFunctionNamespace_Name()));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getFunctionNamespaceAccess().getNameNameParserRuleCall_0(), semanticObject.getName());\n\t\tfeeder.finish();\n\t}", "public void startPrefixMapping( String prefix, String uri )\n throws SAXException\n {\n if( inProlog ) {\n // TODO: map the prefix.\n eventList.add(new StartPrefixMappingEvent(prefix, uri));\n }\n else {\n super.startPrefixMapping( prefix, uri );\n }\n }", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\n\t}", "@Override\n\tpublic void startDocument() throws SAXException {\n\t\tsuper.startDocument();\n\t}", "public void startDocument() {\n _root = null;\n _target = null;\n _prefixMapping = null;\n _parentStack = new Stack<>();\n }", "public void start() throws XCFException {\n\t\tpushScope();\n\t\taddConvention(\"validator\", \".request.parameter.VALIDATOR_\");\n\t\taddConvention(\"setter\", \".request.parameter.SETTER_\");\n\t\taddConvention(\"saxel\", \".builder.SAXEL_\");\n\t\taddConvention(\"instruction\", \".request.processor.instructions.INSTRUCTION_\");\n\t\t\n\t\taddPackage(\"com.eternal.xcf\");\n\t\taddPackage(\"com.eternal.xcf.common\");\n\t}", "public void setNameSpacePrefix(String nsPrefix) {\n this.nsPrefix = nsPrefix;\n }", "@Override\r\n\t\tpublic String lookupNamespaceURI(String prefix)\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "static boolean DefaultNamespaceDecl(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"DefaultNamespaceDecl\")) return false;\n if (!nextTokenIs(b, K_DECLARE)) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = DefaultNamespaceDecl_0(b, l + 1);\n r = r && Separator(b, l + 1);\n exit_section_(b, m, null, r);\n return r;\n }", "@Override\n public void startElement(String uri, String localName, String qName, Attributes atts) {\n // Using qualified name because we are not using xmlns prefixes here.\n if (qName.equals(\"title\")) {\n title = true;\n }\n }", "@Override\n\tpublic void notationDeclaration() {\n\t\t\n\t}", "@Override\n\tpublic void notationDecl(String arg0, String arg1, String arg2)\n\t\t\tthrows SAXException {\n\n\t}", "@Override\n public void XML_startDocument(Atz_XML_SAX_DataHandler sourceHandler) {\n flagDelegateParsing = false;\n }", "@Override\r\n\t\tpublic void setPrefix(String prefix) throws DOMException\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}", "public ImplementPrefix() {\n root = new TrieNode('$');\n }", "Rule NamespaceScope() {\n // Push 1 LiteralNode onto the value stack\n return Sequence(\n FirstOf(\n \"* \",\n \"cpp \",\n \"java \",\n \"py \",\n \"perl \",\n \"php \",\n \"rb \",\n \"cocoa \",\n \"csharp \"),\n actions.pushLiteralNode());\n }", "void setNamespace(String namespace);", "protected void startNode(String nodeName, Map.Entry<String, ZipEntry> entry) throws SAXException {\r\n setNodeAttributes(entry);\r\n super.contentHandler.startElement(URI, nodeName, PREFIX + ':' + nodeName, attributes);\r\n }", "public void multiFileStartDocument() throws SAXException\r\n\t{\r\n\t\tsuper.startDocument();\r\n\t\ttagPath = new Stack<Path>();\r\n\t\ttagBeingIgnored = null;\r\n\t\tpassedARecord = false;\r\n\t}", "@Override\n\tpublic void startElement(String namespaceURI, String localName,\n\t\t\tString qName, Attributes atts) throws SAXException {\n\n\t\tif (localName.equals(\"Document\")) {\n\t\t\tthis.in_documenttag = true;\n\t\t} else if (localName.equals(\"Placemark\")) {\n\t\t\tthis.in_placemarktag = true;\n\t\t\tif ( atts.getLength() > 0 && null != atts.getValue(\"id\") ) {\n\t\t\t\tdpm.setId( atts.getValue(\"id\") );\n\t\t\t}\n\t\t} else if (localName.equals(\"Folder\")) {\n\t\t\tif (this.in_foldertag) {\n\t\t\t\t// put the previous folder on the stack - hopefully it has a frickin name already!\n\t\t\t\tfolderStack.add(folderStack.size(), folder);\n\t\t\t\tfolder = new Folder(); // takes place of outer/trail folder\n\t\t\t}\n\t\t\tthis.in_foldertag = true;\n\t\t} else if (localName.equals(\"description\")) {\n\t\t\tthis.in_descriptiontag = true;\n\t\t} else if (localName.equals(\"name\")) {\n\t\t\tif (in_placemarktag) {\n\t\t\t\tthis.in_placemarknametag = true;\n\t\t\t} else if (in_foldertag) {\n\t\t\t\tthis.in_foldernametag = true;\n\t\t\t} else if (in_documenttag) {\n\t\t\t\tthis.in_documentnametag = true;\n\t\t\t}\n\t\t} else if (localName.equals(\"coordinates\")) {\n\t\t\tthis.in_coordinatestag = true;\n\t\t} else if (localName.equals(\"Address\")) {\n\t\t\tthis.in_addresstag = true;\n\t\t} else {\n\n\t\t}\n\t}", "@Override\n\tpublic void startElement(String arg0, String arg1, String arg2, Attributes arg3) throws SAXException {\n\t\tSystem.out.println(arg2+\"解析开始\");\n\t}", "public static void declareNamespaces(final Element declarationElement, final Set<Map.Entry<String, String>> prefixNamespacePairs) {\n\t\tfor(final Map.Entry<String, String> prefixNamespacePair : prefixNamespacePairs) { //look at each name/value pair\n\t\t\tdeclareNamespace(declarationElement, prefixNamespacePair.getKey(), prefixNamespacePair.getValue()); //declare this namespace\n\t\t}\n\t}", "public void endPrefixMapping (String prefix)\n throws SAXException\n {\n // no op\n }", "@Override\n\tpublic void startElement(String uri, String localName, String qName, Attributes attributes) {\n\t\tif (localName.equals(\"doc\")) {\n\t\t\t// Start of a document.\n\t\t\tstartDoc(attributes);\n\t\t} else if (localName.equals(\"w\")) {\n\t\t\t// Start of a word element.\n\t\t\tstartWord(attributes);\n\t\t} else {\n\t\t\t// Huh?\n\t\t\tthrow new RuntimeException(\"Unknown start tag: \" + localName + \", attr: \" + attributes\n\t\t\t\t\t+ \" at \" + describePosition());\n\t\t}\n\t\tsuper.startElement(uri, localName, qName, attributes);\n\t}", "public void endPrefixMapping(String prefix)\n throws SAXException {\n namespaces.remove(prefix);\n }", "@Override\n public Void visit(FunctionDeclaration nd, Void v) {\n if (!nd.hasDeclareKeyword()) {\n decls.add(nd.getId());\n }\n return null;\n }", "@Override\n\tpublic void startElement(String uri, String localName, String qName,\n\t\t\tAttributes attributes) throws SAXException {\n//\t\ttag=localName;\n//\t\t\tif(localName.equals(\"nombre\")){\n//\t\t\t\tSystem.out.print(\"AUTOR :\");\n//\t\t\t}\n//\t\t\tif(localName.equals(\"descripcion\")){\n//\t\t\t\tSystem.out.print(\"Descripcion:\");\n//\t\t\t}\n\t\t\tswitch(localName){\n\t\t\tcase \"autor\":\n\t\t\t\tautor=new Autor(\"\",attributes.getValue(\"url\"),\"\");\n\t\t\t\tbreak;\n\t\t\tcase \"frase\":\n\t\t\t\tfrase=new Frase(\"\",\"\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(localName.equals(\"autor\")){\n\t\t\t\t\n\t\t\t\t//url=attributes.getValue(\"url\");\n\t\t\t}\n\t\t\t//System.out.println(\"Start \"+localName);\n\t}", "Rule StPrefixScopeAndId() {\n return Sequence(\n \"smalltalk.prefix\",\n Identifier(),\n actions.pushStPrefixNamespaceNode());\n }", "@Override\n public R visit(PrefixDecl n, A argu) {\n R _ret = null;\n n.nodeToken.accept(this, argu);\n n.nodeToken1.accept(this, argu);\n n.nodeToken2.accept(this, argu);\n return _ret;\n }", "void startDocument()\n throws SAXException\n {\n contentHandler.setDocumentLocator(this);\n contentHandler.startDocument();\n attributesList.clear();\n }", "private static void bindDefaultNamespace(FeedReaderPreferences settings, XPath xpath) {\n String defaultNamespace = settings.getDefaultNamespace();\n String defaultNamespacePrefix = settings.getDefaultNamespacePrefix();\n if (!defaultNamespace.isEmpty() && !defaultNamespacePrefix.isEmpty()) {\n SimpleNamespaceContext nsContext = new SimpleNamespaceContext();\n nsContext.bindNamespaceUri(defaultNamespacePrefix, defaultNamespace);\n xpath.setNamespaceContext(nsContext);\n }\n }", "public void endPrefixMapping(String prefix) throws SAXException {\r\n\t}", "public void startContent() throws XPathException {\r\n nextReceiver.startElement(elementNameCode, elementProperties);\r\n\r\n final int length = bufferedAttributes.getLength();\r\n for (int i=0; i<length; i++) {\r\n nextReceiver.attribute(bufferedAttributes.getNameCode(i),\r\n bufferedAttributes.getValue(i)\r\n );\r\n }\r\n for (NamespaceBinding nb : bufferedNamespaces) {\r\n nextReceiver.namespace(nb, 0);\r\n }\r\n\r\n nextReceiver.startContent();\r\n }", "public void startElement(String namespaceURI, String localName,\r\n\t\t\tString qName, Attributes atts) throws SAXException {\r\n\t\t// add namespace checks\r\n\t\tif (\"IN\".equalsIgnoreCase(localName)) {\r\n\t\t\tinOp = true;\r\n\t\t} else if (\"records\".equalsIgnoreCase(localName)) {\r\n\t\t\tthis.start = atts.getValue(\"start\");\r\n\t\t\tthis.limit = atts.getValue(\"limit\");\r\n\t\t} else if (\"header\".equals(localName)) {\r\n\t\t\theaderFlag = true;\r\n\t\t} else if (\"type\".equals(localName)) {\r\n\t\t\tif (headerFlag) {\r\n\t\t\t\tsearchFlag = true;\r\n\t\t\t}\r\n\t\t} else if (\"filter\".equalsIgnoreCase(localName)) {\r\n\t\t\t_filterType = 1;\r\n\t\t} else if (\"count\".equalsIgnoreCase(localName)) {\r\n\t\t\t_countType = 1;\r\n\t\t} else if (\"inventory\".equalsIgnoreCase(localName)) {\r\n\t\t\t_inventoryType = 1;\r\n\t\t}\r\n\r\n\t\telse if (\"source\".equalsIgnoreCase(localName)) {\r\n\t\t\tif (headerFlag) {\r\n\t\t\t\tif (atts != null) {\r\n\t\t\t\t\trequestSource = atts.getValue(\"resource\");\r\n\t\t\t\t}\r\n\t\t\t\t_sourceType = 1;\r\n\t\t\t}\r\n\t\t} else if (\"destination\".equalsIgnoreCase(localName)) {\r\n\t\t\tif (headerFlag) {\r\n\t\t\t\tif (atts != null) {\r\n\t\t\t\t\tdestinationSource = atts.getValue(\"resource\");\r\n\t\t\t\t\tif (destinationSource != null) {\r\n\t\t\t\t\t\tif (!dataSources.contains(destinationSource)) {\r\n\t\t\t\t\t\t\tString message = \"Error on line \"\r\n\t\t\t\t\t\t\t\t\t+ _locator.getLineNumber() + \", column \"\r\n\t\t\t\t\t\t\t\t\t+ _locator.getColumnNumber()\r\n\t\t\t\t\t\t\t\t\t+ \".The DataSource: \" + destinationSource\r\n\t\t\t\t\t\t\t\t\t+ \" cannot be found\";\r\n\t\t\t\t\t\t\terrorMessages.append(message);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// load the table for the current datasource and get\r\n\t\t\t\t\t\t\t// the legalname\r\n\t\t\t\t\t\t\trequestedDataSources.add(destinationSource);\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_destinationType = 1;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif (localName.trim()\r\n\t\t\t\t\t.indexOf(EFGImportConstants.SERVICE_LINK_FILLER) > -1) {\r\n\t\t\t\tEFGContextListener.addToSet(localName.trim());\r\n\t\t\t}\r\n\t\t\tif (EFGContextListener.contains(localName.trim())) {// A federation\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// schema type\r\n\t\t\t\tif (_filterType == 1) {\r\n\t\t\t\t\t_type = 0;\r\n\t\t\t\t\tstack2.push(localName);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (_inventoryType == 1) {\r\n\t\t\t\t\t\tconditionalClause = localName;\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}" ]
[ "0.6988053", "0.68727237", "0.6829428", "0.676507", "0.67320794", "0.6436777", "0.63859385", "0.6358939", "0.63231003", "0.6216725", "0.62088436", "0.6181238", "0.61573917", "0.60833985", "0.60687876", "0.60377854", "0.60058796", "0.5965146", "0.5965146", "0.5955164", "0.59499174", "0.59365946", "0.5931958", "0.5907145", "0.5888894", "0.5865625", "0.5826556", "0.5759632", "0.5747954", "0.5746453", "0.5741576", "0.5740285", "0.5740028", "0.5739199", "0.57383096", "0.5732302", "0.5732302", "0.5732302", "0.5732302", "0.5732302", "0.5716827", "0.5709213", "0.57030016", "0.57024884", "0.56983864", "0.569797", "0.5675121", "0.566752", "0.5667419", "0.5667419", "0.56665075", "0.5663029", "0.56472665", "0.56459105", "0.56381875", "0.56286114", "0.5618348", "0.5616474", "0.56119335", "0.56119335", "0.5604152", "0.5587917", "0.5568481", "0.5542746", "0.5538637", "0.55377597", "0.55281335", "0.5527894", "0.5527894", "0.5527894", "0.5518555", "0.55163836", "0.5512249", "0.5510197", "0.550212", "0.5494764", "0.54802364", "0.54778546", "0.54615694", "0.54615045", "0.54603916", "0.5456867", "0.5452632", "0.5447553", "0.54425746", "0.54311335", "0.5414768", "0.54112726", "0.5409592", "0.54090154", "0.5399524", "0.5392087", "0.53920484", "0.5384028", "0.53835464", "0.53784585", "0.5376729", "0.5365017", "0.536274", "0.5351435" ]
0.60457355
15
Namespace declaration end handler
@Override public void endPrefixMapping(String prefix) throws SAXException { // ... }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void end_ns(Object parser, String prefix) {\n }", "@Override\n\tpublic void namespace() {\n\t\t\n\t}", "public abstract void endElement( String namespaceURI, String sName, String qName );", "private void handleNamespaceDeclaration() throws IOException {\r\n if (this.tempMapping != null) {\r\n PrefixMapping pm = null;\r\n for (int i = 0; i < tempMapping.size(); i++) {\r\n pm = (PrefixMapping)tempMapping.get(i);\r\n this.writer.write(\" xmlns\");\r\n // specify a prefix if different from \"\"\r\n if (!\"\".equals(pm.prefix)) {\r\n this.writer.write(':');\r\n this.writer.write(pm.prefix);\r\n }\r\n this.writer.write(\"=\\\"\");\r\n this.writer.write(pm.uri);\r\n this.writer.write(\"\\\"\");\r\n }\r\n this.tempMapping = null;\r\n }\r\n }", "@Override \n\t public void endElement(String namespaceURI, String localName, String qName) throws SAXException { \n\t \n\t }", "public void endElement(String namespaceURI, String localName, String qName)\n throws SAXException {\n log.info(\"endElement : noeud = \"+localName);\n if (N_GENERATION.equalsIgnoreCase(localName)){\n endElement_Generation(namespaceURI, localName, qName);\n }\n if (N_CLASSE.equalsIgnoreCase(localName)){\n endElement_Generer(namespaceURI, localName, qName);\n }\n if (N_TEMPLATE.equalsIgnoreCase(localName)){\n endElement_Template(namespaceURI, localName, qName);\n }\n }", "@Override\n\tpublic void endPrefixMapping(String prefix) throws SAXException {\n\t\t\n\t}", "@Override\n\tpublic void endPrefixMapping(String prefix) throws SAXException {\n\t\t\n\t}", "@Override\n\t\tpublic void endPrefixMapping(String prefix) throws SAXException {\n\t\t\t\n\t\t}", "@Override\r\n public void endPrefixMapping(String prefix) throws SAXException {\n }", "@Override\n\tpublic void endElement(QName qname) {\n\t\t\n\t}", "public void endPrefixMapping(String prefix)\n throws SAXException {\n namespaces.remove(prefix);\n }", "public void endElement(String uri, String localName, String gName) {\t\r\n\t}", "@Override\n void endElement(String uri, String localName, String qName);", "public void endPrefixMapping(String prefix) throws SAXException {\r\n\t}", "public void endPrefixMapping (String prefix)\n throws SAXException\n {\n // no op\n }", "abstract XML addNamespace(Namespace ns);", "public void setNamespaceHandler(NamespaceHandler nsHandler)\r\n {\r\n _nsHandler = nsHandler;\r\n }", "void visit(Namespace namespace);", "private void emitNS(Namespace namespace) throws SAXException {\n if (namespace.getPrefix() == null || \n namespace.getNamespaceURI() == null) return;\n handler.startPrefixMapping(namespace.getPrefix(), namespace.getNamespaceURI());\n }", "@Override\n public void endDocument() throws SAXException {\n System.out.println(\"End\");\n }", "@Override\n\tpublic void endElement(String uri, String localName, String qName) {\n\n\t\tif (localName.equals(\"doc\")) {\n\t\t\t// Document end; caught before the call to super() because we need\n\t\t\t// to calculate document length correctly.\n\t\t\tendDoc();\n\t\t}\n\n\t\tsuper.endElement(uri, localName, qName);\n\t\tif (localName.equals(\"w\")) {\n\t\t\t// End of a word.\n\t\t\tendWord();\n\t\t} else if (localName.equals(\"doc\")) {\n\t\t\t// We've done this already; see above\n\t\t} else {\n\t\t\t// Huh?\n\t\t\tthrow new RuntimeException(\"Unknown end tag: \" + localName + \" at \"\n\t\t\t\t\t+ describePosition());\n\t\t}\n\t}", "public void endElement(String uri, String localName, String qName) {\r\n if (namespace.length() > 0 && qName.startsWith(namespace)) {\r\n qName = qName.substring(namespace.length());\r\n }\r\n elem = \"\"; // no characters allowed outside <td> ... </td>\r\n if (false) {\r\n } else if (qName.equals(ROOT_TAG )) { \r\n \tcharWriter.println(lineBuffer.toString());\r\n } else { // variable GEDCOM keyword\r\n saxLevel --;\r\n } \r\n charState = 0;\r\n }", "@Override \n\t public void endDocument() throws SAXException { \n\t \n\t }", "public void endElement (String uri, String localName, String qName)\n throws SAXException\n {\n // no op\n }", "@Override\n\t\tpublic void endDocument() throws SAXException {\n\t\t\t\n\t\t}", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\t\n\t}", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\t\n\t}", "public void endElement(String uri, String localName, String qName)\n throws SAXException {\n }", "@Override\n public void endElement(String uri, String localName, String qName)\n throws SAXException {\n super.endElement(uri, localName, qName);\n tagName=null;\n }", "@Override\r\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\r\n\t\tSystem.out.println(\"End Document\");\r\n\t}", "@Override\n\tpublic void endElement(String uri, String localName, String qName)\n\t\t\tthrows SAXException {\n\t\tsuper.endElement(uri, localName, qName);\n\t}", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\tSystem.out.println(\"---解析文档结结束----\");\n\t}", "public void endElement(String uri, String localName, String qualifiedName)\n\t\t\tthrows SAXException { if (\"title\".equals(qualifiedName))\n\t\t// title = false;\n\t\t//\n\t\tif (\"document\".equals(qualifiedName)) {\n\n\t\t\tdocumentList.add(doc);\n\t\t\tdoc = null;\n\t\t}\n\t\t// else if (\"author\".equals(qualifiedName)) {\n\t\t// author = false;\n\t\t// }\n\t\ttag = \"\";\n\t}", "@Override\r\n public void endDocument() throws SAXException {\n }", "@Override\n\tpublic void endElement(String arg0, String arg1, String arg2) throws SAXException {\n\t\tSystem.out.println(arg2+\"解析结束\");\n\t}", "@Override\n public void endDocument() throws SAXException {\n }", "@Override\n\tpublic void endElement(String arg0, String arg1, String arg2) throws SAXException {\n\t\tSystem.out.println(\"此处Uri是:\"+arg0+\" 此处localName是:\"+arg0+\" 此处元素是:\"+arg2);\n\t}", "protected void endOutput() throws JspException, SAXException {\n if (uriExpr != null && uri == null)\n uri = evalString(\"uri\", uriExpr);\n if (nameExpr != null && qname == null) {\n qname = evalString(\"name\", nameExpr);\n int colonIndex = qname.indexOf(':');\n if (colonIndex != -1)\n name = qname.substring(colonIndex + 1);\n else\n name = qname;\n }\n serializer.getHandler().endElement(uri, name, qname);\n }", "private void closeNamespaces() {\n \n // revert prefixes for namespaces included in last declaration\n DeclarationInfo info = (DeclarationInfo)m_namespaceStack.pop();\n int[] deltas = info.m_deltas;\n String[] priors = info.m_priors;\n for (int i = deltas.length - 1; i >= 0; i--) {\n int index = deltas[i];\n undefineNamespace(index);\n if (index < m_prefixes.length) {\n m_prefixes[index] = priors[i];\n } else if (m_extensionUris != null) {\n index -= m_prefixes.length;\n for (int j = 0; j < m_extensionUris.length; j++) {\n int length = m_extensionUris[j].length;\n if (index < length) {\n m_extensionPrefixes[j][index] = priors[i];\n } else {\n index -= length;\n }\n }\n }\n }\n \n // set up for clearing next nested set\n if (m_namespaceStack.empty()) {\n m_namespaceDepth = -1;\n } else {\n m_namespaceDepth =\n ((DeclarationInfo)m_namespaceStack.peek()).m_depth;\n }\n }", "public final void entryRuleAstNamespace() throws RecognitionException {\n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:145:1: ( ruleAstNamespace EOF )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:146:1: ruleAstNamespace EOF\n {\n before(grammarAccess.getAstNamespaceRule()); \n pushFollow(FOLLOW_ruleAstNamespace_in_entryRuleAstNamespace241);\n ruleAstNamespace();\n\n state._fsp--;\n\n after(grammarAccess.getAstNamespaceRule()); \n match(input,EOF,FOLLOW_EOF_in_entryRuleAstNamespace248); \n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n }\n return ;\n }", "public void exit(SchemaBase node) {}", "private NamespaceHelper() {}", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\tSystem.out.println(\"文档解析完成\");\n\t}", "Rule ScopedNamespace() {\n return Sequence(\n \"namespace \",\n ScopeAndId());\n }", "@Override\n\tpublic void endDocument() {\n\t\t\n\t}", "public void setNamespace(String namespace) {\n\t\t\r\n\t}", "@Override\n\tpublic void notationDecl(String arg0, String arg1, String arg2)\n\t\t\tthrows SAXException {\n\n\t}", "public String getNamespace()\n/* */ {\n/* 357 */ return this.namespace;\n/* */ }", "public void endDocument() { }", "@Override\n public void XML_endDocument(Atz_XML_SAX_DataHandler sourceHandler) {\n }", "public void endDocument() {\n }", "public void endElement(String uri, String localName, String qName) {\n CodeWriter out = getTranslaterContext().getCodeWriter();\n out.printIndent().println(\"sfsContentHandler.characters(\" + sb.toString().trim() + \");\");\n }", "@Override\n\t\t\t\tpublic void endDocument() throws SAXException {\n\t\t\t\t\tsuper.endDocument();\n\t\t\t\t}", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\n\n\t}", "@Override\r\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\r\n\t}", "@Override\n public void endElement(String namespaceURI, String localName, String qName) throws SAXException {\n if (localName.equals(\"document\")) {\n // add tagiot to article\n curArticle.setTagiot(curTagiot);\n\n // add article to newSet\n newsSet.addItem(curArticle);\n }\n }", "public void endElement(String uri, String localName,\n\t\tString qName) throws SAXException {\n \n\t}", "public void endParsing();", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\n\t}", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\n\t}", "@Override\n\tpublic void endDocument() throws SAXException {\n\t\tsuper.endDocument();\n\t}", "public void endDocument() throws SAXException {\n }", "private int getNamespaceEnd() {\n int index = data.substring(tokenStart, tokenEnd).indexOf(\".\");\n return index != -1 ? index + tokenStart : tokenEnd;\n }", "public void endElement(String name, String namespace) throws XMLException {\n\n // -- Do delagation if necessary\n if ((unmarshaller != null) && (depth > 0)) {\n unmarshaller.endElement(name, namespace);\n --depth;\n return;\n }\n\n // -- check for name mismatches\n if (unmarshaller != null) {\n if (!name.equals(unmarshaller.elementName())) {\n String err = \"missing end element for \";\n err += unmarshaller.elementName();\n throw new SchemaException(err);\n }\n }\n\n // -- have unmarshaller perform any necessary clean up\n unmarshaller.finish();\n\n // -- <annotation>\n if (name == SchemaNames.ANNOTATION) {\n _schema.addAnnotation((Annotation) unmarshaller.getObject());\n }\n unmarshaller = null;\n }", "private void addNamespace(ClassTree tree, GenerationContext<JS> context, List<JS> stmts) {\r\n\t\tElement type = TreeUtils.elementFromDeclaration(tree);\r\n\t\tif (JavaNodes.isInnerType(type)) {\r\n\t\t\t// this is an inner (anonymous or not) class - no namespace declaration is generated\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tString namespace = context.getCurrentWrapper().getNamespace();\r\n\t\tif (!namespace.isEmpty()) {\r\n\t\t\tJavaScriptBuilder<JS> js = context.js();\r\n\t\t\tJS target = js.property(js.name(GeneratorConstants.STJS), \"ns\");\r\n\t\t\tstmts.add(js.expressionStatement(js.functionCall(target, Collections.singleton(js.string(namespace)))));\r\n\t\t}\r\n\t}", "@Override\n public void endElement(String namespaceURI, String localName, String qName)\n throws SAXException {\n if (title) {\n title = false;\n }\n }", "public static boolean NamespaceDecl(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"NamespaceDecl\")) return false;\n if (!nextTokenIs(b, K_DECLARE)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, NAMESPACE_DECL, null);\n r = consumeTokens(b, 2, K_DECLARE, K_NAMESPACE);\n p = r; // pin = 2\n r = r && report_error_(b, NamespacePrefix(b, l + 1));\n r = p && report_error_(b, consumeToken(b, EQUAL)) && r;\n r = p && report_error_(b, URILiteral(b, l + 1)) && r;\n r = p && Separator(b, l + 1) && r;\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }", "Rule Namespace() {\n // No direct effect on value stack\n return FirstOf(\n ScopedNamespace(),\n PhpNamespace(),\n XsdNamespace());\n }", "public void endElement(String uri, String localName,\n\t\t\t\tString qName) throws SAXException {\n\t\t \n\t\t\t}", "void setNamespace(java.lang.String namespace);", "protected abstract void defineNamespace(int index, String prefix)\n throws IOException;", "@Override\n\tprotected String getNamespace() {\n\t\treturn NAMESPACE;\n\t}", "public void start_ns(Object parser, String prefix, String uri) {\n Array.array_push(this.ns_decls, new Array<Object>(new ArrayEntry<Object>(prefix), new ArrayEntry<Object>(uri)));\r\n }", "public void endDocument ()\n throws SAXException\n {\n // no op\n }", "@Override\n public void writeEndElement() throws XMLStreamException {\n closeStartTag();\n if(_depth == 0){\n return;\n }\n if(_ncContextState[_depth]){\n nsContext.popContext();\n }\n try {\n _stream .write(_END_TAG);\n //writeStringToUtf8 (qname,_stream);\n ElementName en =elementNames[--_depth];\n _stream.write(en.getUtf8Data().getBytes(), 0,en.getUtf8Data().getLength());\n en.getUtf8Data().reset();\n _stream .write('>');\n } catch (IOException ex) {\n throw new RuntimeException(ex);\n }\n }", "void unsetNamespace();", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/tools/clang/include/clang/AST/Decl.h\", line = 471,\n FQN=\"clang::NamespaceDecl::~NamespaceDecl\", NM=\"_ZN5clang13NamespaceDeclD0Ev\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.clang.ast/llvmToClangType ${LLVM_SRC}/llvm/tools/clang/lib/AST/DeclCXX.cpp -nm=_ZN5clang13NamespaceDeclD0Ev\")\n //</editor-fold>\n @Override public /*inline*/ void $destroy() {\n super.$destroy();\n DeclContext.super.$destroy$DeclContext();\n Redeclarable.super.$destroy$Redeclarable();\n }", "public void endDocument() throws SAXException {\n\t\tSortedSet<Integer> parents = new TreeSet<Integer>();\n\t\tfor (int i : this.idMap.keySet()) {\n\t\t\tparents.add(Integer.parseInt(this.idMap.get(i).get(1)));\n\t\t}\n\n\t\tmapChildren(parents);\n\n\t\tif (!parents.isEmpty()) {\n\t\t\trecursion(parents.first());\n\t\t}\n\t\tthis.string.append(\"</\" + this.idMap.get(this.root).get(2) + \">\");\n\n\t\tthis.string.append(\"</schema>\");\n\n\t}", "public void handleDeclaration(HtmlObjects.Declaration t)\n {\n }", "@Override\r\n\tpublic void endElement(String uri, String localName, String qName) throws SAXException {\n\t\tsuper.endElement(uri, localName, qName);\r\n\t\tif(qName.equalsIgnoreCase(\"geonameID\")){\r\n\t\t\tSystem.out.println(qName);\r\n\t\t\tbID = false;\r\n\t\t}\r\n\t}", "public void endDTD() throws SAXException {\n this.saxHandler.endDTD();\n }", "public void endDocument() throws SAXException {\n super.endDocument();\n }", "@Override\n\tpublic void endElement(String arg0, String arg1, String arg2)\n\t\t\tthrows SAXException {\n\t\t\n\t}", "protected abstract void undefineNamespace(int index);", "java.lang.String getNamespace();", "public void namespace(NamespaceBinding nsBinding, int properties) throws XPathException {\r\n if (depthOfHole == 0) {\r\n nextReceiver.namespace(nsBinding, properties);\r\n }\r\n }", "public static void end() {\n Log.writeln(\"<xml-end/> <!-- Non-xml data follows ... -->\");\n }", "@Override\r\n\tpublic String getNamespace() {\n\t\treturn null;\r\n\t}", "public void handleCustomNodeEnd(IParserHandler parserHandler, BeanNode node, XMLAttributeMap att, Locator locator);", "@Override\n\tpublic void endElement(String uri, String localName, String qName) throws SAXException {\n\t\ttry {\n\t\t\tif (startTagIsClosed) {\n\t\t\t\twrite(\"</\");\n\t\t\t\twrite(qName);\n\t\t\t\twrite('>');\n\t\t\t} else {\n\t\t\t\twrite(\"/>\");\n\t\t\t\tstartTagIsClosed = true;\n\t\t\t}\n\t\t\tsuper.endElement(uri, localName, qName);\n\t\t\t// nsSupport.popContext();\n\t\t\telementLevel--;\n\t\t} catch (IOException e) {\n\t\t\tthrow new SAXException(e);\n\t\t}\n\t}", "@Override\n\tpublic String getNamespace() {\n\t\treturn null;\n\t}", "public boolean namespace() {\n\t\ttry {\n\t\t\tArrayList<String[]> records = dh.getNamespaces();\n\t\t\tif (records != null) {\n\t\t\t\t// System.out.println(\"NAMESPACE RECORDS FOUND\");\n\t\t\t\tint l = records.size();\n\t\t\t\tbyte[] startPacket = (\"NAMESPACE\").getBytes();\n\t\t\t\toos.writeObject(startPacket);\n\t\t\t\t// System.out.println(\"Start packet sent!!!\");\n\t\t\t\tAckThread ack = new AckThread(dh, ois, records);\n\t\t\t\tack.start();\n\t\t\t\tfor (int i = 0; i < l; i++) {\n\t\t\t\t\tString method = records.get(i)[0];\n\t\t\t\t\tString user = records.get(i)[1];\n\t\t\t\t\tString namespace = records.get(i)[2];\n\t\t\t\t\tString permission = records.get(i)[3];\n\t\t\t\t\tString data = method + \"\\n\" + user + \"\\n\" + namespace\n\t\t\t\t\t\t\t+ \"\\n\" + permission;\n\t\t\t\t\tBundle b = new Bundle();\n\t\t\t\t\tb.data = data.getBytes();\n\t\t\t\t\tb.userId = userId;\n\t\t\t\t\tb.transactionId = i;\n\t\t\t\t\tb.bundleType = b.DATA;\n\t\t\t\t\tb.noOfBundles = 1;\n\t\t\t\t\tb.bundleNumber = 0;\n\t\t\t\t\tb.bundleSize = b.data.length;\n\t\t\t\t\tbyte[] bundle = b.getBytes();\n\t\t\t\t\toos.writeObject(bundle);\n\t\t\t\t\toos.flush();\n\t\t\t\t\t// System.out.println(\"Sent bundle -> Transaction id : \" + i\n\t\t\t\t\t// + \" Bundle No. : \" + 0);\n\t\t\t\t}\n\t\t\t\tack.join();\n\t\t\t\tBundle b = new Bundle();\n\t\t\t\tb.userId = userId;\n\t\t\t\tb.transactionId = -1;\n\t\t\t\tb.bundleType = b.STOP;\n\t\t\t\tb.noOfBundles = 1;\n\t\t\t\tb.bundleNumber = -1;\n\t\t\t\tb.bundleSize = 0;\n\t\t\t\tb.data = null;\n\t\t\t\toos.writeObject(b.getBytes());\n\t\t\t\toos.flush();\n\t\t\t\t// System.out.println(\"Sent STOP bundle\");\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "public Frysak_11_closing_document() {\r\n }", "@Override\n public String visit(PackageDeclaration n, Object arg) {\n return null;\n }", "public void endPrefixMapping(String prefix) { }", "void declarePrefix(String prefix, String namespace);", "Rule NamespaceScope() {\n // Push 1 LiteralNode onto the value stack\n return Sequence(\n FirstOf(\n \"* \",\n \"cpp \",\n \"java \",\n \"py \",\n \"perl \",\n \"php \",\n \"rb \",\n \"cocoa \",\n \"csharp \"),\n actions.pushLiteralNode());\n }", "void endComplexContent(ComplexTypeSG type) throws SAXException;", "@Override\n\tpublic void notationDeclaration() {\n\t\t\n\t}" ]
[ "0.7775529", "0.6951016", "0.6914183", "0.68888396", "0.670573", "0.6596569", "0.65955734", "0.65955734", "0.6591384", "0.6566755", "0.65552896", "0.65102357", "0.6484893", "0.64578164", "0.6411796", "0.63605535", "0.62877876", "0.6266254", "0.6258617", "0.6179189", "0.6096601", "0.6076437", "0.6044681", "0.6029554", "0.6001933", "0.5984677", "0.59553367", "0.59553367", "0.5949851", "0.5926712", "0.5922867", "0.59095097", "0.59074426", "0.59013724", "0.58986676", "0.5883431", "0.5881697", "0.5880452", "0.5879672", "0.5855799", "0.5845742", "0.5833312", "0.58297026", "0.5809657", "0.58088267", "0.57969743", "0.5791533", "0.5786171", "0.57859254", "0.5785841", "0.57837296", "0.57828075", "0.5777547", "0.57745725", "0.57728523", "0.5768405", "0.57671666", "0.5764567", "0.57614475", "0.57511353", "0.57511353", "0.57511353", "0.57510966", "0.575081", "0.5741317", "0.5740578", "0.5734384", "0.57299674", "0.57280385", "0.5726848", "0.5726613", "0.57146", "0.5695805", "0.5691293", "0.5682656", "0.56595695", "0.56401056", "0.5635286", "0.56343645", "0.5633812", "0.56327665", "0.5631766", "0.5625948", "0.56258106", "0.5622712", "0.56058395", "0.55775446", "0.5576192", "0.5575299", "0.55654377", "0.5565248", "0.5554115", "0.55453575", "0.55415004", "0.5528846", "0.5509109", "0.5506371", "0.5501178", "0.5491198", "0.5488045" ]
0.6504659
12
Ignorable whitespace characters handler
@Override public void ignorableWhitespace( char[] chars, int start, int length ) throws SAXException { // ... }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void ignorableWhitespace(char[] ch, int start, int length) { }", "@Override\r\n public void ignorableWhitespace(char[] ch, int start, int length)\r\n throws SAXException {\n }", "@Override\n\t\tpublic void ignorableWhitespace(char[] ch, int start, int length)\n\t\t\t\tthrows SAXException {\n\t\t\t\n\t\t}", "@Override\n\tpublic void ignorableWhitespace(char[] ch, int start, int length)\n\t\t\tthrows SAXException {\n\t\t\n\t}", "@Override\n\tpublic void ignorableWhitespace(char[] ch, int start, int length)\n\t\t\tthrows SAXException {\n\t\t\n\t}", "public void ignorableWhitespace(char[] ch, int start, int length)\r\n\t\t\tthrows SAXException {\r\n\t\t\r\n\t}", "@Override\n\tpublic void ignorableWhitespace(char ch[], int start, int length) throws SAXException {\n\t\ttry {\n\t\t\twriteEsc(ch, start, length, false);\n\t\t\tsuper.ignorableWhitespace(ch, start, length);\n\t\t} catch (IOException e) {\n\t\t\tthrow new SAXException(e);\n\t\t}\n\t}", "public void ignorableWhitespace (char ch[], int start, int length)\n throws SAXException\n {\n // no op\n }", "public void ignorableWhitespace(char[] ch, int start, int length)\n\t\t\t\tthrows java.lang.Exception {\n\t\t}", "public void ignorableWhitespace(char ch[], int start, int length)\n throws SAXException {\n this.ensureInitialization();\n super.ignorableWhitespace(ch, start, length);\n }", "public void ignorableWhitespace(char ch[], int start, int length)\n throws SAXException {\n int i = 0;\n while ( i < length ) {\n newContent.append(ch[start + i]);\n i++;\n }\n }", "private void skipWhitespace() {\n while (currentPos < endPos && filterString.charAt(currentPos) == ' ') {\n currentPos++;\n }\n }", "@Override\n\tprotected void handleSpace() {\n\t\tif (isInClearText()) {\n\t\t\tsaveToken();\n\t\t}\n\t}", "private void skipWhitespaces() {\n\t\twhile (currentIndex < data.length) {\n\t\t\tchar ch = data[currentIndex];\n\t\t\tif (Character.isWhitespace(ch)) {\n\t\t\t\t++currentIndex;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}", "private void skipBlankSpaces() {\n\t\twhile(currentIndex < data.length) {\n\t\t\tchar c = data[currentIndex];\n\t\t\tif(c == ' ' || c == '\\t' || c =='\\n' || c == '\\r') {\n\t\t\t\tcurrentIndex++;\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "protected void skipWhitespace(CharArrayBuffer buffer, ParserCursor cursor) {\n/* 453 */ int pos = cursor.getPos();\n/* 454 */ int indexTo = cursor.getUpperBound();\n/* 455 */ while (pos < indexTo && HTTP.isWhitespace(buffer.charAt(pos)))\n/* */ {\n/* 457 */ pos++;\n/* */ }\n/* 459 */ cursor.updatePos(pos);\n/* */ }", "private void skipWhiteSpace() throws ScanErrorException\n {\n while (isWhiteSpace(currentChar))\n eat(currentChar);\n }", "Rule WhiteSpace() {\n return ZeroOrMore(AnyOf(\" \\n\\r\\t\\f\"));\n }", "char skipSpaces () {\n char c = getChar ();\n while (c == ' ' || c == '\\t' || c == '\\n' || c == '\\r') {\n if (c == '\\n') { m_nbLines++; }\n c = getNextChar ();\n }\n return c;\n }", "private boolean skipSpaceChars() {\r\n \t\tint ch;\r\n \t\twhile ((ch = readCharBackward()) != -1) {\r\n \t\t\tif (!Character.isSpaceChar(ch)) {\r\n \t\t\t\treleaseChar();\r\n \t\t\t\tbreak;\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn true;\r\n \t}", "private void skipSpaces() {\r\n\t\twhile (currentIndex < expression.length && (expression[currentIndex] == ' ' || expression[currentIndex] == '\\t'\r\n\t\t\t\t|| expression[currentIndex] == '\\n' || expression[currentIndex] == '\\r')) {\r\n\t\t\tcurrentIndex++;\r\n\t\t}\r\n\t}", "private boolean getReplaceNonBreakingSpace() {\n return false;\n }", "private void skipBlankSpaces() {\n while (currentIndex < this.data.length) {\n if (!Character.isWhitespace(data[currentIndex])) {\n break;\n }\n currentIndex++;\n }\n }", "public void skipWhitespace() {\n while (this.index < this.input.length() && Character.isWhitespace(this.input.charAt(this.index)))\n this.index++;\n }", "private boolean isWhitespace(char c) {\r\n if (c==' ' || c=='\\n' || c=='\\t' || c=='\\r' ){\r\n return true;\r\n }\r\n return false;\r\n }", "private void skipWhitespaces() {\n\t\twhile(currentIndex < data.length) {\n\t\t\tif (isWhitespace(data[currentIndex])) {\n\t\t\t\tcurrentIndex++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tbreak;\t\n\t\t}\n\t}", "private void skipWhitespaces() {\n\t\twhile(currentIndex < data.length) {\n\t\t\tif (isWhitespace(data[currentIndex])) {\n\t\t\t\tcurrentIndex++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tbreak;\t\n\t\t}\n\t}", "private boolean isWhitespace(char c) {\n\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t';\n\t}", "private boolean isWhitespace(char c) {\n\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t';\n\t}", "private void space() {\n if (wereTokens && !spaceSuppressed) {\n out.print(' ');\n }\n }", "private void trimWhitespaces() {\n \n while(currentIndex < dataLength && Character.isWhitespace( data[currentIndex] )) {\n ++currentIndex;\n }\n }", "private int skipWhitespace() {\n int prev = '\\n';\n while (position < length) {\n int c = data.charAt(position);\n switch (c) {\n case '\\t': case ' ':\n prev = c;\n position++;\n break;\n case '\\n':\n // handle \\r\\n\n if (prev != '\\r') {\n lineNumber++;\n }\n prev = c;\n position++;\n break;\n case '\\r':\n prev = c;\n position++;\n lineNumber++;\n break;\n default:\n return prev;\n }\n }\n return prev;\n }", "private static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\t' || c == '\\n' || c == '\\f' || c == '\\r';\n }", "private boolean isSpace() {\n return (char) c == ' ';\n }", "private boolean isNoSpace(final String message) {\n\t\treturn message.contains(\"0 space\"); //$NON-NLS-1$\n\t}", "static void getNonBlank() throws IOException{\n while(curr_char == 32)\n {\n curr_char = pbIn.read();\n }\n }", "private static void\n eatWhite(ParseState state)\n {\n while(state.pos < state.data.length() && state.data.charAt(state.pos) == ' ')\n {\n ++state.pos;\n }\n }", "public boolean supportsTrimChar() {\n return false;\n }", "static void trimNL() {\n if(outputBuffer.length() > 0 && outputBuffer.charAt(outputBuffer.length() - 1) == '\\u005cn')\n outputBuffer.deleteCharAt(outputBuffer.length() - 1);\n if(outputBuffer.length() > 0 && outputBuffer.charAt(outputBuffer.length() - 1) == '\\u005cr')\n outputBuffer.deleteCharAt(outputBuffer.length() - 1);\n }", "@Test\n\tpublic void testJustEmptyChars() {\n\t\tSmartScriptLexer lexer = new SmartScriptLexer(\" \\r\\n\\t \");\n\t\t\n\t\tSmartScriptToken expected = new SmartScriptToken(SmartScriptTokenType.TEXT, \" \\r\\n\\t \");\n\t\tassertEquals(lexer.nextToken().getType(), SmartScriptTokenType.TEXT);\n\t\tassertEquals(lexer.getToken().getValue(), expected.getValue());\n\t}", "default Escaper ignoring(char c) {\n return c1 -> {\n if (c1 == c) {\n return null;\n }\n return this.escape(c);\n };\n }", "@Override\n\tpublic void space() {\n\t\t\n\t}", "private boolean space() {\r\n return CHAR(' ');\r\n }", "public boolean skipWhitespace()\r\n {\r\n String str = feed.findWithinHorizon( WHITESPACE_PATTERN, 0 );\r\n \r\n if( str == null )\r\n return false;\r\n else\r\n return true;\r\n }", "private int readSkipWs() throws IOException {\n for (;;) {\n int c = _in.read();\n if (c == -1 || c > ' ') {\n return c;\n }\n }\n }", "private boolean isBlank() {\n\t\tchar currentChar = data[index];\n\t\tif (currentChar == '\\r' || currentChar == '\\n' || currentChar == '\\t' || currentChar == ' ') {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public void skipWhitespace() throws IOException {\n\t\twhile (CharacterIterator.DONE != current()\n\t\t\t\t&& Character.isWhitespace(current())) {\n\t\t\tnext();\n\t\t}\n\t}", "protected static int removeWhiteSpace(char[] data) {\n if (data == null)\n return 0;\n \n // count characters that's not whitespace\n int newSize = 0;\n int len = data.length;\n for (int i = 0; i < len; i++) {\n if (!isWhiteSpace(data[i]))\n data[newSize++] = data[i];\n }\n return newSize;\n }", "public boolean isWhitespace(char testChar) {\n switch (testChar) {\n case ' ':\n case '\\t':\n case '\\r':\n case '\\n':\n return true;\n default:\n return false;\n }\n }", "public boolean isWhiteSpace() {\n return node.getNodeType() == Node.TEXT_NODE && node.getTextContent().trim().length() == 0;\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}", "protected static boolean isWhitespace(int c) {\n return (WHITESPACE.indexOf(c) != -1);\n }", "public WhitespaceState()\n\t{\n\t\tsetWhitespaceChars(0, ' ', true);\n\t}", "private static int removeWhiteSpace(char[] data) {\n if (CommonUtil.isNull(data)) {\n return 0;\n }\n\n // count characters that's not whitespace\n int newSize = 0;\n int len = data.length;\n for (int i = 0; i < len; i++) {\n if (!isWhiteSpace(data[i])) {\n data[newSize++] = data[i];\n }\n }\n return newSize;\n }", "public static boolean isWhitespace(char c) {\r\n\r\n\t\tif (c == 32) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t}", "private static String escapeWhitespace( final String input )\n {\n return input.replaceAll( \"\\\\ \", \"\\\\\\\\ \" );\n }", "public boolean isWhitespace(char ch) {\r\n return ch == ' '\r\n || ch == '\\t'\r\n || ch == '\\r'\r\n || ch == '\\n';\r\n }", "static void trimWhitespace() {\n for (int i = a.size() - 1; i >= 0; i-- ) {\n Object o = a.get(i);\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) == '\\u005cr'\n || sb.charAt(sb.length() - 1) == '\\u005cn'\n || sb.charAt(sb.length() - 1) == '\\u005ct'\n || sb.charAt(sb.length() - 1) == ' ')) {\n sb.deleteCharAt(sb.length() - 1);\n }\n if (sb.length() == 0) {\n a.remove(i);\n }\n else {\n a.set(i, sb.toString());\n break;\n }\n }\n if (a.size() == 0) {\n while(outputBuffer.length() > 0 && (outputBuffer.charAt(outputBuffer.length() - 1) == '\\u005cr'\n || outputBuffer.charAt(outputBuffer.length() - 1) == '\\u005cn'\n || outputBuffer.charAt(outputBuffer.length() - 1) == '\\u005ct'\n || outputBuffer.charAt(outputBuffer.length() - 1) == ' ')) {\n outputBuffer.deleteCharAt(outputBuffer.length() - 1);\n }\n }\n }", "private void processPendingText() throws SAXException {\n if(state==AFTER_START_ELEMENT) {\n for( int i=bufLen-1; i>=0; i-- )\n if( !WhiteSpaceProcessor.isWhiteSpace(buf[i]) ) {\n super.characters(buf, 0, bufLen);\n return;\n }\n }\n }", "private void handleCharacterData() {\n\t\tif (!buffer.isEmpty()) {\n\t\t\tbyte[] data = buffer.toArray();\n\t\t\tbuffer.clear();\n\t\t\thandler.handleString(new String(data));\n\t\t}\n\t}", "private static String cleanTextContent(String text) {\n text = text.replaceAll(\"[^\\\\x00-\\\\x7F]\", \"\");\n\n // erases all the ASCII control characters\n text = text.replaceAll(\"[\\\\p{Cntrl}&&[^\\r\\n\\t]]\", \"\");\n\n // removes non-printable characters from Unicode\n text = text.replaceAll(\"\\\\p{C}\", \"\");\n \n text = text.replaceAll(\"[\\\\r\\\\n]+\", \" \");\n\n return text.trim();\n }", "public void setIgnoreWhitespace(boolean ignoreWhitespace) {\r\n this.ignoreWhitespace = ignoreWhitespace;\r\n }", "public char nextClean() throws JSONException {\n for(;;) {\n char c = this.next();\n if(c == 0 || c > ' ') {\n return c;\n }\n }\n }", "private void Spacing() {\n\n try {\n while (true) {\n try {\n Space();\n } catch (SyntaxError e) {\n Comment();\n }\n }\n } catch (SyntaxError e) {\n }\n }", "public static boolean isWhitespace(int ch) {\n return ch == ' ' || ch == '\\t' || ch == '\\r' || ch == '\\n' || ch == '\\f';\n }", "@Override\n public void writeSpace(String text)\n throws XMLStreamException\n {\n writeRaw(text);\n }", "private static boolean noWhiteSpace(String password) {\n\t\tint whitespaces = 0;\n\t\tfor (int i = 0; i < password.length(); i++) {\n\t\t char c = password.charAt(i);\n\t\t if ( Character.isWhitespace(c) ) {\n\t\t \t whitespaces++;\n\t\t }\n\t\t}\n\t\tif (whitespaces >= 1) {\n\t\t\tSystem.out.println(\"no whitespaces!\");\n\t\t\treturn false;\n\t\t} else return true;\n\t}", "private boolean isSpace(int c) {\n\t\treturn (c == ' ' || c == '\\t' || c == '\\n');\n\t}", "public void ignorableWhitespace(byte[] data, int start, int length) {\n crc.update(data, start, length);\n }", "private boolean legal_lowspace_char(int b) {\n return (b < WS_INT &&\n (b == 9 || b == 10 || b == 13));\n }", "public static String saveWhitespaces(String s) {\n\t\treturn StringUtil.replace(s, \" \", \"\\u00A0\");\n\t}", "static public final boolean ccIsAllNoneSpace(String pxLine){\n return VcStringUtility.ccNulloutString(pxLine)\n .matches(\"^\\\\S+$\");\n }", "private boolean isWhitespaceText(String text) {\n \n \t\tif (text == null || text.length() == 0)\n \t\t\treturn false;\n \n \t\tString[] delimiters= fDocument.getLegalLineDelimiters();\n \t\tint index= TextUtilities.startsWith(delimiters, text);\n \t\tif (index > -1) {\n \t\t\tchar c;\n \t\t\tint length= text.length();\n \t\t\tfor (int i= delimiters[index].length(); i < length; i++) {\n \t\t\t\tc= text.charAt(i);\n \t\t\t\tif (c != ' ' && c != '\\t')\n \t\t\t\t\treturn false;\n \t\t\t}\n \t\t\treturn true;\n \t\t}\n \n \t\treturn false;\n \t}", "private static boolean isWhiteSpace(final String strval)\n\t{\n\t\tif (null != strval)\n\t\t{\n\t\t\tfinal int n = strval.length();\n\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t{\n\t\t\t\tfinal char ch = strval.charAt(i);\n\n\t\t\t\t// The follwing pattern is denormalized for speed.\n\t\t\t\tif ((ch == 0x20) || (ch == 0x09) || (ch == 0xD) || (ch == 0xA))\n\t\t\t\t{\n\t\t\t\t\t// Try the next one, all must be whiteSpace.\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}", "private boolean isNonCharacter(int c) {\n return (c & 0xFFFE) == 0xFFFE;\n }", "@Test(timeout = 4000)\n public void test062() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\"hN!SM~8ux(wB\");\n xPathLexer0.consume(2033);\n Token token0 = xPathLexer0.whitespace();\n assertEquals((-2), token0.getTokenType());\n assertEquals(\"\", token0.getTokenText());\n }", "boolean isNoChar() {\n return array[0] == -1;\n }", "@Override\n\tpublic String spaceRemover(String input) {\n\t\treturn input.replaceAll(\"\\\\s+\",\"\");\n\n\t}", "@Override\n public void handleSpecialChar(\n com.globalsight.ling.docproc.extractor.html.HtmlObjects.Text t)\n {\n\n }", "@Test\n public void testWhitespace() throws TokenizerException {\n assertTokenizes(\" \", new Token[0]);\n }", "private void normaliseWhitespace() {\t\t\t\r\n\t\tdocument.normalizeDocument();\r\n\t\t\r\n\t\tif (document.getDocumentElement() == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tfinal Queue<Node> queue = Lists.newLinkedList();\r\n\t\tqueue.add(document.getDocumentElement());\r\n\t\twhile (!queue.isEmpty()) {\r\n\t\t\tfinal Node node = queue.remove();\r\n\t\t\tfinal NodeList children = node.getChildNodes();\r\n\t\t\tfor (int index = 0; index < children.getLength(); index++) {\r\n\t\t\t\tqueue.add(children.item(index));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (node.getNodeType() == Node.TEXT_NODE) {\r\n\t\t\t\tnode.setTextContent(node.getTextContent().trim());\r\n\t\t\t\tif (node.getTextContent().isEmpty()) {\r\n\t\t\t\t\tnode.getParentNode().removeChild(node);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Test\r\n\t\tpublic void testTokenizeWhitespace() {\r\n\t\t\t\r\n\t\t\tdriver.findElement(By.id(\"code_code\")).sendKeys(\"a = 5\\nb = 6\\nc = a + (b * 4)\");;\r\n\t\t\t\r\n\t\t\tWebElement submitButton = driver.findElement(By.name(\"commit\"));\r\n\t\t\tsubmitButton.click();\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tWebElement e = driver.findElement(By.tagName(\"code\"));\r\n\t\t\t\tString elementText = e.getText();\r\n\t\t\t\tassertTrue(elementText.contains(\":on_sp\"));\r\n\t\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\t\tfail();\r\n\t\t\t}\r\n\t\t}", "private boolean spaces() {\r\n return OPT(GO() && space() && spaces());\r\n }", "@Override\n\t\tprotected boolean handleIrregulars(String s) {\n\t\t\treturn false;\n\t\t}", "public static void main(String[] args) {\n\t\t\n\t\tchar[] just = {'a','b','c','d',' ',' ',' ','e'};\n\t\t\n\t\tSystem.out.println(Arrays.toString(just));\n\t\t\n\t\tremoveWhiteSpace(just);\n\t\t\n\t\tSystem.out.println(Arrays.toString(just));\n\t}", "@Override\n public void writeSpace(char[] text, int offset, int length)\n throws XMLStreamException\n {\n writeRaw(text, offset, length);\n }", "private static String clearSpaces(final String old) {\n return old.replace(\" \", \"\").replace(\"\\n\", \"\");\n }", "@Override\n\t\tprotected String[] handleIrregulars(String s) {\n\t\t\treturn null;\n\t\t}", "public void noSpaceInEditTextFilter(EditText passwordEditText, Context con) {\n /* To restrict Space Bar in Keyboard */\n InputFilter filter = (source, start, end, dest, dstart, dend) -> {\n for (int i = start; i < end; i++) {\n if (Character.isWhitespace(source.charAt(i))) {\n Toast.makeText(con, con.getResources().getString(R.string.password_space_error), Toast.LENGTH_SHORT).show();\n return \"\";\n }\n }\n return null;\n };\n passwordEditText.setFilters(new InputFilter[]{filter});\n }", "private void skipWhiteSpace()\n throws Exception\n {\n char currentChar = currentChar();\n char next;\n boolean foundAsterisk = false; // flag to detect closing */ in comments\n \n while (Character.isWhitespace(currentChar) || (currentChar == '/')) \n { // Start of a comment?\n if (currentChar == '/')\n {\n next = source.peekChar();\n \n // Consume comments with '//'\n if (next == '/')\n {\n do currentChar = nextChar();\n while (currentChar != EOL && currentChar != EOF);\n \n if (currentChar == EOL)\n currentChar = nextChar();\n }\n // Consume comments with '/* */'\n else if (next == '*')\n {\n currentChar = nextChar(); // Consume '/'\n do \n { \n currentChar = nextChar();\n if (foundAsterisk && currentChar == '/')\n break;\n else \n foundAsterisk = currentChar == '*';\n } while (currentChar != EOF);\n \n if (currentChar == '/')\n currentChar = nextChar();\n }\n else\n break;\n }\n // Not a comment.\n else {\n currentChar = nextChar(); // consume whitespace character\n }\n }\n }", "private boolean isAllWhitespace(Object obj) {\r\n String str = null;\r\n\r\n if (obj instanceof String) {\r\n str = (String) obj;\r\n }\r\n else if (obj instanceof Text) {\r\n str = ((Text) obj).getText();\r\n }\r\n else {\r\n return false;\r\n }\r\n\r\n for (int i = 0; i < str.length(); i++) {\r\n if ( !isWhitespace( str.charAt( i)))\r\n return false;\r\n }\r\n return true;\r\n }", "public static String cleanHiddenCharacters(String text)\n {\n text = text.replaceAll(\"[^\\\\x00-\\\\x7F]\", \"\");\n\n // erases all the ASCII control characters\n text = text.replaceAll(\"[\\\\p{Cntrl}&&[^\\r\\n\\t]]\", \"\");\n\n // removes non-printable characters from Unicode\n text = text.replaceAll(\"\\\\p{C}\", \"\");\n\n return text.trim();\n }", "public static ParseAction<Located<Void>> matchWhitespace(){\n\t\treturn matchPattern(WHITESPACE).map(res -> new Located<>(res.getLocation(), null));\n\t}", "public final void mIGNORE_CHAR() throws RecognitionException {\n try {\n int _type = IGNORE_CHAR;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:370:12: ( ( WS | CONTROL_CHAR ) )\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:370:14: ( WS | CONTROL_CHAR )\n {\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:370:14: ( WS | CONTROL_CHAR )\n int alt2=2;\n int LA2_0 = input.LA(1);\n\n if ( (LA2_0==' ') ) {\n alt2=1;\n }\n else if ( ((LA2_0>='\\t' && LA2_0<='\\r')) ) {\n alt2=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 2, 0, input);\n\n throw nvae;\n }\n switch (alt2) {\n case 1 :\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:370:15: WS\n {\n mWS(); \n\n }\n break;\n case 2 :\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:370:18: CONTROL_CHAR\n {\n mCONTROL_CHAR(); \n\n }\n break;\n\n }\n\n _channel=HIDDEN;\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "private static void setTokenizerNoWhitespace(StreamTokenizer st) {\n\t\tst.resetSyntax();\n\t\tst.whitespaceChars(0, 32);\n\t}", "public static boolean whiteSpace(char c) {\n switch (c) {\n case ' ':\n case '\\n':\n case '\\f':\n case '\\t':\n case '\\r':\n return true;\n default:\n return false;\n }\n }", "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 void skipBadChar() throws IOException {\n while (!isValid()) {\n if (c == -1 || isSpace() || shouldStop()) {\n return;\n }\n c = r.read();\n }\n }", "public void spaces() {\n System.out.println(\"\");\n System.out.println(\"\");\n }", "@Test\n\tpublic void testRemoveWhiteSpacesAndPunctuation() {\n\t\tString input = \"2$2?5 5!63\";\n\t\tString actual = GeneralUtility.removeWhiteSpacesAndPunctuation(input);\n\t\tString expected = \"225563\";\n\t\tAssert.assertEquals(expected, actual);\n\t}" ]
[ "0.7785353", "0.7630658", "0.7618639", "0.75434303", "0.75434303", "0.7330418", "0.72767407", "0.7255472", "0.7220993", "0.7001952", "0.6844234", "0.68300176", "0.6775519", "0.6763478", "0.67536473", "0.67518586", "0.67055154", "0.659149", "0.6510401", "0.64774257", "0.64598185", "0.6452556", "0.6403337", "0.6389816", "0.6357725", "0.6345349", "0.6345349", "0.6299538", "0.6299538", "0.62330616", "0.6232201", "0.62094414", "0.61638284", "0.6126465", "0.61042076", "0.60692716", "0.6040377", "0.6000191", "0.59815824", "0.59755605", "0.5970785", "0.5959895", "0.5933396", "0.5901111", "0.5892366", "0.5892197", "0.58650446", "0.5853916", "0.58385336", "0.5825132", "0.5822976", "0.5810351", "0.58011395", "0.58007723", "0.5791154", "0.57888514", "0.57870156", "0.57758325", "0.5767203", "0.5740942", "0.5740603", "0.5739968", "0.573598", "0.5724238", "0.57018983", "0.57011515", "0.56943476", "0.5691409", "0.5689196", "0.5687546", "0.5672092", "0.5667498", "0.5657202", "0.5643874", "0.5614952", "0.56042385", "0.5602922", "0.5591208", "0.5570729", "0.5554311", "0.55480516", "0.55434346", "0.55385154", "0.55093807", "0.5486158", "0.5481471", "0.54704756", "0.54645324", "0.5456999", "0.5455782", "0.5447761", "0.5447273", "0.5444814", "0.54342186", "0.5431818", "0.54167646", "0.541206", "0.54069316", "0.5402959", "0.5402268" ]
0.77202684
1
The clientside stub for the RPC service.
@RemoteServiceRelativePath("greet") public interface GreetingService extends RemoteService { Boolean greetServer(Osoba person) throws IllegalArgumentException; List<Osoba> getOsoba() throws IllegalArgumentException; List<Osoba> fetchPage(int start, int length) throws IllegalArgumentException; Long fetchCount() throws IllegalArgumentException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Stub createStub();", "IMember getServerStub();", "public interface RpcClient {\r\n\r\n\t/**\r\n\t * Initializes this RpcClient\r\n\t */\r\n\tpublic void initialize();\r\n\t\r\n\t/**\r\n\t * Sends the specified object and waits for a response message (or) the specified timeout to occur. Keeps the connection open for further \r\n\t * send requests. Note that clients of this RPCClient must call {@link RPCClient#closeConnections()} when done using this RPCClient.\r\n\t * This method performs to-and-from conversion of the specified object to a raw byte array when publishing it to the queue / consuming off it. \r\n\t * @param message the message to be sent\r\n\t * @param timeout the timeout duration in milliseconds\r\n\t * @return response Object from the RPC message call\r\n\t * @throws MessagingTimeoutException in case the specified timeout occurs\r\n\t * @throws MessagingException in case of errors in message publishing\r\n\t */\r\n\tpublic Object send(Object message, int timeout) throws MessagingTimeoutException, MessagingException;\r\n\r\n\t/**\r\n\t * Sends the specified String and waits for a response message (or) the specified timeout to occur. Keeps the connection open for further \r\n\t * send requests. Note that clients of this RPCClient must call {@link RPCClient#closeConnections()} when done using this RPCClient.\r\n\t * This method performs to-and-from conversion of the specified object to UTF-8 encoded byte array when publishing it to the queue / consuming off it. \r\n\t * @param message the String message to be sent\r\n\t * @param timeout the timeout duration in milliseconds\r\n\t * @return response String from the RPC message call\r\n\t * @throws MessagingTimeoutException in case the specified timeout occurs\r\n\t * @throws MessagingException in case of errors in message publishing\r\n\t */\r\n\tpublic String sendString(String message , int timeout) throws MessagingTimeoutException, MessagingException;\r\n\t\r\n\t/**\r\n\t * Closes connection related objects used by this RpcClient.\r\n\t * @throws MessagingException in case of errors closing connections to the underlying messaging system.\r\n\t */\r\n\tpublic void closeConnections() throws MessagingException;\r\n\t\r\n}", "public interface OperationServiceService extends javax.xml.rpc.Service {\n public java.lang.String getOperationServiceAddress();\n\n public fr.uphf.service.OperationService getOperationService() throws javax.xml.rpc.ServiceException;\n\n public fr.uphf.service.OperationService getOperationService(java.net.URL portAddress) throws javax.xml.rpc.ServiceException;\n}", "@RemoteServiceRelativePath(\"greet\")\npublic interface MyBitService extends RemoteService {\n OrderInfoList getOrderInfoList() throws IllegalArgumentException;\n\n CoinInfoList getCoinInfoList() throws IllegalArgumentException;\n\n ExchangeInfoList getExchangeInfoList() throws IllegalArgumentException;\n\n CompareInfoList getCompareInfoList() throws IllegalArgumentException;\n\n String toggleBot() throws IllegalArgumentException;\n\n String setThreshold(Double threshold) throws IllegalArgumentException;\n\n String getThreshold() throws IllegalArgumentException;\n\n public static class App {\n private static MyBitServiceAsync ourInstance = GWT.create(MyBitService.class);\n\n public static synchronized MyBitServiceAsync getInstance() {\n return ourInstance;\n }\n }\n}", "JsonElement invokeRpc(String name, JsonObject rpcInput);", "Optional<String> invokeRpc(@Nonnull String uriPath, Optional<String> input) throws OperationFailedException;", "@Override\n\tpublic Response invoke(ChaincodeStub stub) {\n\t\ttry {\n\t\t\t_logger.info(\"Invoke java simple chaincode\");\n\t\t\tString func = stub.getFunction();\n\t\t\tList<String> params = stub.getParameters();\n\n\t\t\tif (func.equals(\"queryCar\")) {\n\t\t\t\treturn queryCar(stub, params);\n\t\t\t}\n\t\t\tif (func.equals(\"initLedger\")) {\n\t\t\t\treturn initLedger(stub, params);\n\t\t\t}\n\t\t\tif (func.equals(\"createCar\")) {\n\t\t\t\treturn createCar(stub, params);\n\t\t\t}\n\t\t\tif (func.equals(\"queryAllCars\")) {\n\t\t\t\treturn queryAllCars(stub, params);\n\t\t\t}\n\t\t\tif (func.equals(\"changeCarOwner\")) {\n\t\t\t\treturn changeCarOwner(stub, params);\n\t\t\t}\n\n\t\t\treturn newErrorResponse(\"Received unknown function \" + func + \" invocation\");\n\t\t}\n\t\tcatch (Throwable e) {\n\t\t\treturn newErrorResponse(e);\n\t\t}\n\t}", "Object sendRpcRequest(RpcRequest rpcRequest);", "@RemoteServiceRelativePath(\"data\")\npublic interface GreetingService extends RemoteService {\n\n\t/**\n\t * The Client-side stub for the RPC service. LUCAS LUCAS\n\t */\n\tString [][] importData (String path);\n\tpublic Integer getNumberOfColumns (String path);\n\tpublic Integer getNumberOfLines (String path);\n\n}", "go.micro.runtime.RuntimeOuterClass.Service getService();", "go.micro.runtime.RuntimeOuterClass.Service getService();", "go.micro.runtime.RuntimeOuterClass.Service getService();", "public Object getStubHandler() {\n return new RMIStubHandler(); \n }", "@RemoteServiceRelativePath(\"rpc\")\npublic interface AppService extends RemoteService {\n\n TemplateRespRPC process(TemplateReqRPC rpc);\n\n}", "@RemoteServiceClient(SimpleHttpService.class)\npublic interface ISimpleHttpServiceClient extends IServiceClient {\n\n @RemoteMessageClient(SimpleHttpService.REQUEST_START)\n void bootup(int port);\n\n @RemoteMessageClient(SimpleHttpService.REQUEST_STOP)\n void shutdown();\n\n @RemoteMessageClient(SimpleHttpService.REQUEST_INFO)\n void info(int port);\n}", "public interface GrpcService extends BindableService {\r\n public String getServiceName();\r\n public String getDescription();\r\n}", "public Stub() {\n attachInterface(this, DESCRIPTOR);\n }", "public Stub()\n {\n this.attachInterface(this, DESCRIPTOR);\n }", "public Stub()\n {\n this.attachInterface(this, DESCRIPTOR);\n }", "public Stub()\n {\n this.attachInterface(this, DESCRIPTOR);\n }", "public Stub()\n {\n this.attachInterface(this, DESCRIPTOR);\n }", "public Stub()\n {\n this.attachInterface(this, DESCRIPTOR);\n }", "public interface IRpcResponser {\n\n public void callback(String secret, Class<?> clazzOfInterface, Object serviceProvider, long timeout, TimeUnit timeUnit);\n\n public WrappedRpcServer buildRpcServer(String secret, IRpcMessageProcessor rpcMsgProcessor);\n}", "public Stub() {\n this.attachInterface(this, DESCRIPTOR);\n }", "public Stub() {\n this.attachInterface(this, DESCRIPTOR);\n }", "public _AccountStub ()\n {\n super ();\n }", "InvocationResult invoke(RemoteService service, MethodInvocation invocation);", "public IStubProvider getStubProvider();", "public void invoke(ServerServiceDesc serviceDesc, RequestMetaContext reqMetaCtx, ResponseMetaContext respMetaCtx) throws ServiceException;", "public interface DemoService extends Remote {\r\n public final static String SERVICE_NAME = \"DemoService\";\r\n \r\n public String doTask(String[] args) throws RemoteException;\r\n}", "public RpcClient(ManagedChannelBuilder<?> channelBuilder) {\n channel = channelBuilder.build();\n blockingStub = PredictionServiceGrpc.newBlockingStub(channel);\n asyncStub = PredictionServiceGrpc.newStub(channel);\n modelServiceBlockingStub = ModelServiceGrpc.newBlockingStub(channel);\n modelServiceStub = ModelServiceGrpc.newStub(channel);\n channelzBlockingStub = ChannelzGrpc.newBlockingStub(channel);\n }", "public void initializeRPC(){\n try{XmlRpcClientConfigImpl configuration = new XmlRpcClientConfigImpl();\n configuration.setServerURL(new URL(\"http://\"+RunnerRepository.host+\n \":\"+RunnerRepository.getCentralEnginePort()+\"/ra/\"));\n configuration.setEnabledForExtensions(true);\n configuration.setBasicPassword(RunnerRepository.password);\n configuration.setBasicUserName(RunnerRepository.user);\n client = new XmlRpcClient();\n client.setConfig(configuration);\n System.out.println(\"XMLRPC Client for testbed initialized: \"+client);}\n catch(Exception e){System.out.println(\"Could not conect to \"+\n RunnerRepository.host+\" :\"+RunnerRepository.getCentralEnginePort()+\"/ra/\"+\n \"for RPC client initialization\");}\n }", "public Method getStubMethod() {\n return this.stubMethod;\n }", "public interface ClientService {\r\n\r\n String fpkj(String wsdlUrl);\r\n}", "public interface ISeedProveiderRpcService {\n Long getTask( Map<String, Object> mapQuery) throws BizCheckedException;\n void createTask( Map<String, Object> mapQuery) throws BizCheckedException;\n List<String> getOrderList(String barcode) throws BizCheckedException;\n List<Map> getStoreList(Map<String, Object> mapQuery) throws BizCheckedException;\n}", "public ProxyIChatServer(IChatServer stub) {\n\t\t\tthis.stub = stub;\n\t\t}", "@RemoteServiceRelativePath(\"greet\")\r\npublic interface GreetingService extends RemoteService {\r\n\tString greetServer(String name) throws IllegalArgumentException;\r\n\r\n\tContactInfo createNameCard(String name, String email);\r\n}", "@Override\r\n\tpublic void callMethod(MethodDescriptor method, RpcController controller, Message request, Message responsePrototype, RpcCallback<Message> done) {\n\t\t\r\n\t}", "public InterfazServidor getStubServidor() {\n\t\treturn stubServidor;\n\t}", "@Override\n/**\n * Communication Tester method\n */\npublic String Communicate() throws RemoteException {\n\treturn \"Server Says Hi\";\n}", "public Response bind(String wsdl) throws ServiceCloudException {\n\n return Response.ok(new ResultBuilder().message(\"Not implemented\").type(\"error\").createResult()).build();\n }", "public _CodeBaseStub()\n {\n super();\n }", "@Override\r\n\tpublic Object request(Invocation invocation) throws Exception {\n\t\tRpcRequest req=new RpcRequest();\r\n\t\treq.setId(UUID.randomUUID().toString());\r\n\t\treq.setArgs(invocation.getAgrs());\r\n\t\treq.setMethod(invocation.getMethod().getName());\r\n\t\treq.setParameterTypes(invocation.getMethod().getParameterTypes());\r\n\t\treq.setType(invocation.getInterface());\r\n\t\treq.setAsyn(invocation.isAsyn());\r\n\t\tCompletableFuture<Object> result=new CompletableFuture<>();\r\n\t\tclientPool.borrowObject().request(req,result);\r\n\t\tif(invocation.isAsyn()){\r\n\t\t\treturn result;\r\n\t\t}else{\r\n\t\t\treturn result.get();\r\n\t\t}\r\n\r\n\r\n\t}", "@RemoteServiceRelativePath(\"getAddress\")\npublic interface AddressService extends RemoteService {\n\tpublic String[] getAddress() throws IOException;\n}", "public RentRPCServer() {\n\t\tsuper(null, null);\n\t\t// mocking purpose\n\t}", "@RemoteServiceRelativePath(\"rpc/userservice\")\r\npublic interface UserService extends RemoteService {\r\n\r\n public boolean isLogin();\r\n\r\n public boolean hasAccess(Long userId);\r\n \r\n public boolean isAdmin();\r\n\r\n public Artist getArtist(Long artistId);\r\n \r\n public User getCurrentUser();\r\n\r\n public List<LinkObject<String>> getArtistNames(List<Long> ids);\r\n\r\n public Artist getAsArtist(User user);\r\n \r\n public User addMoney(int amount);\r\n \r\n public void sendRequest(String msg, int type);\r\n}", "public interface IMountService extends IInterface {\n /** Local-side IPC implementation stub class. */\n public static abstract class Stub extends Binder implements IMountService {\n private static class Proxy implements IMountService {\n private final IBinder mRemote;\n\n Proxy(IBinder remote) {\n mRemote = remote;\n }\n\n public IBinder asBinder() {\n return mRemote;\n }\n\n public String getInterfaceDescriptor() {\n return DESCRIPTOR;\n }\n\n /**\n * Registers an IMountServiceListener for receiving async\n * notifications.\n */\n public void registerListener(IMountServiceListener listener) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeStrongBinder((listener != null ? listener.asBinder() : null));\n mRemote.transact(Stub.TRANSACTION_registerListener, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Unregisters an IMountServiceListener\n */\n public void unregisterListener(IMountServiceListener listener) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeStrongBinder((listener != null ? listener.asBinder() : null));\n mRemote.transact(Stub.TRANSACTION_unregisterListener, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Returns true if a USB mass storage host is connected\n */\n public boolean isUsbMassStorageConnected() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_isUsbMassStorageConnected, _data, _reply, 0);\n _reply.readException();\n _result = 0 != _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Enables / disables USB mass storage. The caller should check\n * actual status of enabling/disabling USB mass storage via\n * StorageEventListener.\n */\n public void setUsbMassStorageEnabled(boolean enable) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt((enable ? 1 : 0));\n mRemote.transact(Stub.TRANSACTION_setUsbMassStorageEnabled, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Returns true if a USB mass storage host is enabled (media is\n * shared)\n */\n public boolean isUsbMassStorageEnabled() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_isUsbMassStorageEnabled, _data, _reply, 0);\n _reply.readException();\n _result = 0 != _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Mount external storage at given mount point. Returns an int\n * consistent with MountServiceResultCode\n */\n public int mountVolume(String mountPoint) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(mountPoint);\n mRemote.transact(Stub.TRANSACTION_mountVolume, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Safely unmount external storage at given mount point. The unmount\n * is an asynchronous operation. Applications should register\n * StorageEventListener for storage related status changes.\n */\n public void unmountVolume(String mountPoint, boolean force, boolean removeEncryption)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(mountPoint);\n _data.writeInt((force ? 1 : 0));\n _data.writeInt((removeEncryption ? 1 : 0));\n mRemote.transact(Stub.TRANSACTION_unmountVolume, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Format external storage given a mount point. Returns an int\n * consistent with MountServiceResultCode\n */\n public int formatVolume(String mountPoint) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(mountPoint);\n mRemote.transact(Stub.TRANSACTION_formatVolume, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Returns an array of pids with open files on the specified path.\n */\n public int[] getStorageUsers(String path) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int[] _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(path);\n mRemote.transact(Stub.TRANSACTION_getStorageUsers, _data, _reply, 0);\n _reply.readException();\n _result = _reply.createIntArray();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Gets the state of a volume via its mountpoint.\n */\n public String getVolumeState(String mountPoint) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(mountPoint);\n mRemote.transact(Stub.TRANSACTION_getVolumeState, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Creates a secure container with the specified parameters. Returns\n * an int consistent with MountServiceResultCode\n */\n public int createSecureContainer(String id, int sizeMb, String fstype, String key,\n int ownerUid, boolean external) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n _data.writeInt(sizeMb);\n _data.writeString(fstype);\n _data.writeString(key);\n _data.writeInt(ownerUid);\n _data.writeInt(external ? 1 : 0);\n mRemote.transact(Stub.TRANSACTION_createSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Destroy a secure container, and free up all resources associated\n * with it. NOTE: Ensure all references are released prior to\n * deleting. Returns an int consistent with MountServiceResultCode\n */\n public int destroySecureContainer(String id, boolean force) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n _data.writeInt((force ? 1 : 0));\n mRemote.transact(Stub.TRANSACTION_destroySecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Finalize a container which has just been created and populated.\n * After finalization, the container is immutable. Returns an int\n * consistent with MountServiceResultCode\n */\n public int finalizeSecureContainer(String id) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n mRemote.transact(Stub.TRANSACTION_finalizeSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Mount a secure container with the specified key and owner UID.\n * Returns an int consistent with MountServiceResultCode\n */\n public int mountSecureContainer(String id, String key, int ownerUid, boolean readOnly)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n _data.writeString(key);\n _data.writeInt(ownerUid);\n _data.writeInt(readOnly ? 1 : 0);\n mRemote.transact(Stub.TRANSACTION_mountSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Unount a secure container. Returns an int consistent with\n * MountServiceResultCode\n */\n public int unmountSecureContainer(String id, boolean force) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n _data.writeInt((force ? 1 : 0));\n mRemote.transact(Stub.TRANSACTION_unmountSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Returns true if the specified container is mounted\n */\n public boolean isSecureContainerMounted(String id) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n mRemote.transact(Stub.TRANSACTION_isSecureContainerMounted, _data, _reply, 0);\n _reply.readException();\n _result = 0 != _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Rename an unmounted secure container. Returns an int consistent\n * with MountServiceResultCode\n */\n public int renameSecureContainer(String oldId, String newId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(oldId);\n _data.writeString(newId);\n mRemote.transact(Stub.TRANSACTION_renameSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Returns the filesystem path of a mounted secure container.\n */\n public String getSecureContainerPath(String id) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n mRemote.transact(Stub.TRANSACTION_getSecureContainerPath, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Gets an Array of currently known secure container IDs\n */\n public String[] getSecureContainerList() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String[] _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_getSecureContainerList, _data, _reply, 0);\n _reply.readException();\n _result = _reply.createStringArray();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Shuts down the MountService and gracefully unmounts all external\n * media. Invokes call back once the shutdown is complete.\n */\n public void shutdown(IMountShutdownObserver observer)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeStrongBinder((observer != null ? observer.asBinder() : null));\n mRemote.transact(Stub.TRANSACTION_shutdown, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Call into MountService by PackageManager to notify that its done\n * processing the media status update request.\n */\n public void finishMediaUpdate() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_finishMediaUpdate, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Mounts an Opaque Binary Blob (OBB) with the specified decryption\n * key and only allows the calling process's UID access to the\n * contents. MountService will call back to the supplied\n * IObbActionListener to inform it of the terminal state of the\n * call.\n */\n public void mountObb(String rawPath, String canonicalPath, String key,\n IObbActionListener token, int nonce) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(rawPath);\n _data.writeString(canonicalPath);\n _data.writeString(key);\n _data.writeStrongBinder((token != null ? token.asBinder() : null));\n _data.writeInt(nonce);\n mRemote.transact(Stub.TRANSACTION_mountObb, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Unmounts an Opaque Binary Blob (OBB). When the force flag is\n * specified, any program using it will be forcibly killed to\n * unmount the image. MountService will call back to the supplied\n * IObbActionListener to inform it of the terminal state of the\n * call.\n */\n public void unmountObb(\n String rawPath, boolean force, IObbActionListener token, int nonce)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(rawPath);\n _data.writeInt((force ? 1 : 0));\n _data.writeStrongBinder((token != null ? token.asBinder() : null));\n _data.writeInt(nonce);\n mRemote.transact(Stub.TRANSACTION_unmountObb, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Checks whether the specified Opaque Binary Blob (OBB) is mounted\n * somewhere.\n */\n public boolean isObbMounted(String rawPath) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(rawPath);\n mRemote.transact(Stub.TRANSACTION_isObbMounted, _data, _reply, 0);\n _reply.readException();\n _result = 0 != _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Gets the path to the mounted Opaque Binary Blob (OBB).\n */\n public String getMountedObbPath(String rawPath) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(rawPath);\n mRemote.transact(Stub.TRANSACTION_getMountedObbPath, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Returns whether the external storage is emulated.\n */\n public boolean isExternalStorageEmulated() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_isExternalStorageEmulated, _data, _reply, 0);\n _reply.readException();\n _result = 0 != _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public int getEncryptionState() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_getEncryptionState, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public int decryptStorage(String password) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(password);\n mRemote.transact(Stub.TRANSACTION_decryptStorage, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public int encryptStorage(int type, String password) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(type);\n _data.writeString(password);\n mRemote.transact(Stub.TRANSACTION_encryptStorage, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public int changeEncryptionPassword(int type, String password) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(type);\n _data.writeString(password);\n mRemote.transact(Stub.TRANSACTION_changeEncryptionPassword, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public int verifyEncryptionPassword(String password) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(password);\n mRemote.transact(Stub.TRANSACTION_verifyEncryptionPassword, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public int getPasswordType() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_getPasswordType, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public String getPassword() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_getPassword, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public void clearPassword() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_clearPassword, _data, _reply, IBinder.FLAG_ONEWAY);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n public void setField(String field, String data) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(field);\n _data.writeString(data);\n mRemote.transact(Stub.TRANSACTION_setField, _data, _reply, IBinder.FLAG_ONEWAY);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n public String getField(String field) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(field);\n mRemote.transact(Stub.TRANSACTION_getField, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public boolean isConvertibleToFBE() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_isConvertibleToFBE, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt() != 0;\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public StorageVolume[] getVolumeList(int uid, String packageName, int flags)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n StorageVolume[] _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(uid);\n _data.writeString(packageName);\n _data.writeInt(flags);\n mRemote.transact(Stub.TRANSACTION_getVolumeList, _data, _reply, 0);\n _reply.readException();\n _result = _reply.createTypedArray(StorageVolume.CREATOR);\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Returns the filesystem path of a mounted secure container.\n */\n public String getSecureContainerFilesystemPath(String id) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n mRemote.transact(Stub.TRANSACTION_getSecureContainerFilesystemPath, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Fix permissions in a container which has just been created and\n * populated. Returns an int consistent with MountServiceResultCode\n */\n public int fixPermissionsSecureContainer(String id, int gid, String filename)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n _data.writeInt(gid);\n _data.writeString(filename);\n mRemote.transact(Stub.TRANSACTION_fixPermissionsSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public int mkdirs(String callingPkg, String path) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(callingPkg);\n _data.writeString(path);\n mRemote.transact(Stub.TRANSACTION_mkdirs, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public int resizeSecureContainer(String id, int sizeMb, String key)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n _data.writeInt(sizeMb);\n _data.writeString(key);\n mRemote.transact(Stub.TRANSACTION_resizeSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public long lastMaintenance() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n long _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_lastMaintenance, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readLong();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public void runMaintenance() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_runMaintenance, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return;\n }\n\n @Override\n public void waitForAsecScan() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_waitForAsecScan, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return;\n }\n\n @Override\n public DiskInfo[] getDisks() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n DiskInfo[] _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_getDisks, _data, _reply, 0);\n _reply.readException();\n _result = _reply.createTypedArray(DiskInfo.CREATOR);\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public VolumeInfo[] getVolumes(int _flags) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n VolumeInfo[] _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(_flags);\n mRemote.transact(Stub.TRANSACTION_getVolumes, _data, _reply, 0);\n _reply.readException();\n _result = _reply.createTypedArray(VolumeInfo.CREATOR);\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public VolumeRecord[] getVolumeRecords(int _flags) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n VolumeRecord[] _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(_flags);\n mRemote.transact(Stub.TRANSACTION_getVolumeRecords, _data, _reply, 0);\n _reply.readException();\n _result = _reply.createTypedArray(VolumeRecord.CREATOR);\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public void mount(String volId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volId);\n mRemote.transact(Stub.TRANSACTION_mount, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void unmount(String volId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volId);\n mRemote.transact(Stub.TRANSACTION_unmount, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void format(String volId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volId);\n mRemote.transact(Stub.TRANSACTION_format, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public long benchmark(String volId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volId);\n mRemote.transact(Stub.TRANSACTION_benchmark, _data, _reply, 0);\n _reply.readException();\n return _reply.readLong();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void partitionPublic(String diskId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(diskId);\n mRemote.transact(Stub.TRANSACTION_partitionPublic, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void partitionPrivate(String diskId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(diskId);\n mRemote.transact(Stub.TRANSACTION_partitionPrivate, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void partitionMixed(String diskId, int ratio) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(diskId);\n _data.writeInt(ratio);\n mRemote.transact(Stub.TRANSACTION_partitionMixed, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void setVolumeNickname(String fsUuid, String nickname) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(fsUuid);\n _data.writeString(nickname);\n mRemote.transact(Stub.TRANSACTION_setVolumeNickname, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void setVolumeUserFlags(String fsUuid, int flags, int mask) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(fsUuid);\n _data.writeInt(flags);\n _data.writeInt(mask);\n mRemote.transact(Stub.TRANSACTION_setVolumeUserFlags, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void forgetVolume(String fsUuid) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(fsUuid);\n mRemote.transact(Stub.TRANSACTION_forgetVolume, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void forgetAllVolumes() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_forgetAllVolumes, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void setDebugFlags(int _flags, int _mask) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(_flags);\n _data.writeInt(_mask);\n mRemote.transact(Stub.TRANSACTION_setDebugFlags, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public String getPrimaryStorageUuid() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_getPrimaryStorageUuid, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public void setPrimaryStorageUuid(String volumeUuid, IPackageMoveObserver callback)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volumeUuid);\n _data.writeStrongBinder((callback != null ? callback.asBinder() : null));\n mRemote.transact(Stub.TRANSACTION_setPrimaryStorageUuid, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void createUserKey(int userId, int serialNumber, boolean ephemeral)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n _data.writeInt(serialNumber);\n _data.writeInt(ephemeral ? 1 : 0);\n mRemote.transact(Stub.TRANSACTION_createUserKey, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void destroyUserKey(int userId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n mRemote.transact(Stub.TRANSACTION_destroyUserKey, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void addUserKeyAuth(int userId, int serialNumber,\n byte[] token, byte[] secret) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n _data.writeInt(serialNumber);\n _data.writeByteArray(token);\n _data.writeByteArray(secret);\n mRemote.transact(Stub.TRANSACTION_addUserKeyAuth, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void fixateNewestUserKeyAuth(int userId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n mRemote.transact(Stub.TRANSACTION_fixateNewestUserKeyAuth, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void unlockUserKey(int userId, int serialNumber,\n byte[] token, byte[] secret) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n _data.writeInt(serialNumber);\n _data.writeByteArray(token);\n _data.writeByteArray(secret);\n mRemote.transact(Stub.TRANSACTION_unlockUserKey, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void lockUserKey(int userId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n mRemote.transact(Stub.TRANSACTION_lockUserKey, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public boolean isUserKeyUnlocked(int userId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n mRemote.transact(Stub.TRANSACTION_isUserKeyUnlocked, _data, _reply, 0);\n _reply.readException();\n _result = 0 != _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public void prepareUserStorage(\n String volumeUuid, int userId, int serialNumber, int flags)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volumeUuid);\n _data.writeInt(userId);\n _data.writeInt(serialNumber);\n _data.writeInt(flags);\n mRemote.transact(Stub.TRANSACTION_prepareUserStorage, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void destroyUserStorage(String volumeUuid, int userId, int flags)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volumeUuid);\n _data.writeInt(userId);\n _data.writeInt(flags);\n mRemote.transact(Stub.TRANSACTION_destroyUserStorage, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public ParcelFileDescriptor mountAppFuse(String name) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n ParcelFileDescriptor _result = null;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(name);\n mRemote.transact(Stub.TRANSACTION_mountAppFuse, _data, _reply, 0);\n _reply.readException();\n _result = _reply.<ParcelFileDescriptor>readParcelable(\n ClassLoader.getSystemClassLoader());\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n }\n\n private static final String DESCRIPTOR = \"IMountService\";\n\n static final int TRANSACTION_registerListener = IBinder.FIRST_CALL_TRANSACTION + 0;\n\n static final int TRANSACTION_unregisterListener = IBinder.FIRST_CALL_TRANSACTION + 1;\n\n static final int TRANSACTION_isUsbMassStorageConnected = IBinder.FIRST_CALL_TRANSACTION + 2;\n\n static final int TRANSACTION_setUsbMassStorageEnabled = IBinder.FIRST_CALL_TRANSACTION + 3;\n\n static final int TRANSACTION_isUsbMassStorageEnabled = IBinder.FIRST_CALL_TRANSACTION + 4;\n\n static final int TRANSACTION_mountVolume = IBinder.FIRST_CALL_TRANSACTION + 5;\n\n static final int TRANSACTION_unmountVolume = IBinder.FIRST_CALL_TRANSACTION + 6;\n\n static final int TRANSACTION_formatVolume = IBinder.FIRST_CALL_TRANSACTION + 7;\n\n static final int TRANSACTION_getStorageUsers = IBinder.FIRST_CALL_TRANSACTION + 8;\n\n static final int TRANSACTION_getVolumeState = IBinder.FIRST_CALL_TRANSACTION + 9;\n\n static final int TRANSACTION_createSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 10;\n\n static final int TRANSACTION_finalizeSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 11;\n\n static final int TRANSACTION_destroySecureContainer = IBinder.FIRST_CALL_TRANSACTION + 12;\n\n static final int TRANSACTION_mountSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 13;\n\n static final int TRANSACTION_unmountSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 14;\n\n static final int TRANSACTION_isSecureContainerMounted = IBinder.FIRST_CALL_TRANSACTION + 15;\n\n static final int TRANSACTION_renameSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 16;\n\n static final int TRANSACTION_getSecureContainerPath = IBinder.FIRST_CALL_TRANSACTION + 17;\n\n static final int TRANSACTION_getSecureContainerList = IBinder.FIRST_CALL_TRANSACTION + 18;\n\n static final int TRANSACTION_shutdown = IBinder.FIRST_CALL_TRANSACTION + 19;\n\n static final int TRANSACTION_finishMediaUpdate = IBinder.FIRST_CALL_TRANSACTION + 20;\n\n static final int TRANSACTION_mountObb = IBinder.FIRST_CALL_TRANSACTION + 21;\n\n static final int TRANSACTION_unmountObb = IBinder.FIRST_CALL_TRANSACTION + 22;\n\n static final int TRANSACTION_isObbMounted = IBinder.FIRST_CALL_TRANSACTION + 23;\n\n static final int TRANSACTION_getMountedObbPath = IBinder.FIRST_CALL_TRANSACTION + 24;\n\n static final int TRANSACTION_isExternalStorageEmulated = IBinder.FIRST_CALL_TRANSACTION + 25;\n\n static final int TRANSACTION_decryptStorage = IBinder.FIRST_CALL_TRANSACTION + 26;\n\n static final int TRANSACTION_encryptStorage = IBinder.FIRST_CALL_TRANSACTION + 27;\n\n static final int TRANSACTION_changeEncryptionPassword = IBinder.FIRST_CALL_TRANSACTION + 28;\n\n static final int TRANSACTION_getVolumeList = IBinder.FIRST_CALL_TRANSACTION + 29;\n\n static final int TRANSACTION_getSecureContainerFilesystemPath = IBinder.FIRST_CALL_TRANSACTION + 30;\n\n static final int TRANSACTION_getEncryptionState = IBinder.FIRST_CALL_TRANSACTION + 31;\n\n static final int TRANSACTION_verifyEncryptionPassword = IBinder.FIRST_CALL_TRANSACTION + 32;\n\n static final int TRANSACTION_fixPermissionsSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 33;\n\n static final int TRANSACTION_mkdirs = IBinder.FIRST_CALL_TRANSACTION + 34;\n\n static final int TRANSACTION_getPasswordType = IBinder.FIRST_CALL_TRANSACTION + 35;\n\n static final int TRANSACTION_getPassword = IBinder.FIRST_CALL_TRANSACTION + 36;\n\n static final int TRANSACTION_clearPassword = IBinder.FIRST_CALL_TRANSACTION + 37;\n\n static final int TRANSACTION_setField = IBinder.FIRST_CALL_TRANSACTION + 38;\n\n static final int TRANSACTION_getField = IBinder.FIRST_CALL_TRANSACTION + 39;\n\n static final int TRANSACTION_resizeSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 40;\n\n static final int TRANSACTION_lastMaintenance = IBinder.FIRST_CALL_TRANSACTION + 41;\n\n static final int TRANSACTION_runMaintenance = IBinder.FIRST_CALL_TRANSACTION + 42;\n\n static final int TRANSACTION_waitForAsecScan = IBinder.FIRST_CALL_TRANSACTION + 43;\n\n static final int TRANSACTION_getDisks = IBinder.FIRST_CALL_TRANSACTION + 44;\n static final int TRANSACTION_getVolumes = IBinder.FIRST_CALL_TRANSACTION + 45;\n static final int TRANSACTION_getVolumeRecords = IBinder.FIRST_CALL_TRANSACTION + 46;\n\n static final int TRANSACTION_mount = IBinder.FIRST_CALL_TRANSACTION + 47;\n static final int TRANSACTION_unmount = IBinder.FIRST_CALL_TRANSACTION + 48;\n static final int TRANSACTION_format = IBinder.FIRST_CALL_TRANSACTION + 49;\n\n static final int TRANSACTION_partitionPublic = IBinder.FIRST_CALL_TRANSACTION + 50;\n static final int TRANSACTION_partitionPrivate = IBinder.FIRST_CALL_TRANSACTION + 51;\n static final int TRANSACTION_partitionMixed = IBinder.FIRST_CALL_TRANSACTION + 52;\n\n static final int TRANSACTION_setVolumeNickname = IBinder.FIRST_CALL_TRANSACTION + 53;\n static final int TRANSACTION_setVolumeUserFlags = IBinder.FIRST_CALL_TRANSACTION + 54;\n static final int TRANSACTION_forgetVolume = IBinder.FIRST_CALL_TRANSACTION + 55;\n static final int TRANSACTION_forgetAllVolumes = IBinder.FIRST_CALL_TRANSACTION + 56;\n\n static final int TRANSACTION_getPrimaryStorageUuid = IBinder.FIRST_CALL_TRANSACTION + 57;\n static final int TRANSACTION_setPrimaryStorageUuid = IBinder.FIRST_CALL_TRANSACTION + 58;\n\n static final int TRANSACTION_benchmark = IBinder.FIRST_CALL_TRANSACTION + 59;\n static final int TRANSACTION_setDebugFlags = IBinder.FIRST_CALL_TRANSACTION + 60;\n\n static final int TRANSACTION_createUserKey = IBinder.FIRST_CALL_TRANSACTION + 61;\n static final int TRANSACTION_destroyUserKey = IBinder.FIRST_CALL_TRANSACTION + 62;\n\n static final int TRANSACTION_unlockUserKey = IBinder.FIRST_CALL_TRANSACTION + 63;\n static final int TRANSACTION_lockUserKey = IBinder.FIRST_CALL_TRANSACTION + 64;\n static final int TRANSACTION_isUserKeyUnlocked = IBinder.FIRST_CALL_TRANSACTION + 65;\n\n static final int TRANSACTION_prepareUserStorage = IBinder.FIRST_CALL_TRANSACTION + 66;\n static final int TRANSACTION_destroyUserStorage = IBinder.FIRST_CALL_TRANSACTION + 67;\n\n static final int TRANSACTION_isConvertibleToFBE = IBinder.FIRST_CALL_TRANSACTION + 68;\n\n static final int TRANSACTION_mountAppFuse = IBinder.FIRST_CALL_TRANSACTION + 69;\n\n static final int TRANSACTION_addUserKeyAuth = IBinder.FIRST_CALL_TRANSACTION + 70;\n\n static final int TRANSACTION_fixateNewestUserKeyAuth = IBinder.FIRST_CALL_TRANSACTION + 71;\n\n /**\n * Cast an IBinder object into an IMountService interface, generating a\n * proxy if needed.\n */\n public static IMountService asInterface(IBinder obj) {\n if (obj == null) {\n return null;\n }\n IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\n if (iin != null && iin instanceof IMountService) {\n return (IMountService) iin;\n }\n return new IMountService.Stub.Proxy(obj);\n }\n\n /** Construct the stub at attach it to the interface. */\n public Stub() {\n attachInterface(this, DESCRIPTOR);\n }\n\n public IBinder asBinder() {\n return this;\n }\n\n @Override\n public boolean onTransact(int code, Parcel data, Parcel reply,\n int flags) throws RemoteException {\n switch (code) {\n case INTERFACE_TRANSACTION: {\n reply.writeString(DESCRIPTOR);\n return true;\n }\n case TRANSACTION_registerListener: {\n data.enforceInterface(DESCRIPTOR);\n IMountServiceListener listener;\n listener = IMountServiceListener.Stub.asInterface(data.readStrongBinder());\n registerListener(listener);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_unregisterListener: {\n data.enforceInterface(DESCRIPTOR);\n IMountServiceListener listener;\n listener = IMountServiceListener.Stub.asInterface(data.readStrongBinder());\n unregisterListener(listener);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_isUsbMassStorageConnected: {\n data.enforceInterface(DESCRIPTOR);\n boolean result = isUsbMassStorageConnected();\n reply.writeNoException();\n reply.writeInt((result ? 1 : 0));\n return true;\n }\n case TRANSACTION_setUsbMassStorageEnabled: {\n data.enforceInterface(DESCRIPTOR);\n boolean enable;\n enable = 0 != data.readInt();\n setUsbMassStorageEnabled(enable);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_isUsbMassStorageEnabled: {\n data.enforceInterface(DESCRIPTOR);\n boolean result = isUsbMassStorageEnabled();\n reply.writeNoException();\n reply.writeInt((result ? 1 : 0));\n return true;\n }\n case TRANSACTION_mountVolume: {\n data.enforceInterface(DESCRIPTOR);\n String mountPoint;\n mountPoint = data.readString();\n int resultCode = mountVolume(mountPoint);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_unmountVolume: {\n data.enforceInterface(DESCRIPTOR);\n String mountPoint;\n mountPoint = data.readString();\n boolean force = 0 != data.readInt();\n boolean removeEncrypt = 0 != data.readInt();\n unmountVolume(mountPoint, force, removeEncrypt);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_formatVolume: {\n data.enforceInterface(DESCRIPTOR);\n String mountPoint;\n mountPoint = data.readString();\n int result = formatVolume(mountPoint);\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_getStorageUsers: {\n data.enforceInterface(DESCRIPTOR);\n String path;\n path = data.readString();\n int[] pids = getStorageUsers(path);\n reply.writeNoException();\n reply.writeIntArray(pids);\n return true;\n }\n case TRANSACTION_getVolumeState: {\n data.enforceInterface(DESCRIPTOR);\n String mountPoint;\n mountPoint = data.readString();\n String state = getVolumeState(mountPoint);\n reply.writeNoException();\n reply.writeString(state);\n return true;\n }\n case TRANSACTION_createSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n int sizeMb;\n sizeMb = data.readInt();\n String fstype;\n fstype = data.readString();\n String key;\n key = data.readString();\n int ownerUid;\n ownerUid = data.readInt();\n boolean external;\n external = 0 != data.readInt();\n int resultCode = createSecureContainer(id, sizeMb, fstype, key, ownerUid,\n external);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_finalizeSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n int resultCode = finalizeSecureContainer(id);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_destroySecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n boolean force;\n force = 0 != data.readInt();\n int resultCode = destroySecureContainer(id, force);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_mountSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n String key;\n key = data.readString();\n int ownerUid;\n ownerUid = data.readInt();\n boolean readOnly;\n readOnly = data.readInt() != 0;\n int resultCode = mountSecureContainer(id, key, ownerUid, readOnly);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_unmountSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n boolean force;\n force = 0 != data.readInt();\n int resultCode = unmountSecureContainer(id, force);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_isSecureContainerMounted: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n boolean status = isSecureContainerMounted(id);\n reply.writeNoException();\n reply.writeInt((status ? 1 : 0));\n return true;\n }\n case TRANSACTION_renameSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String oldId;\n oldId = data.readString();\n String newId;\n newId = data.readString();\n int resultCode = renameSecureContainer(oldId, newId);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_getSecureContainerPath: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n String path = getSecureContainerPath(id);\n reply.writeNoException();\n reply.writeString(path);\n return true;\n }\n case TRANSACTION_getSecureContainerList: {\n data.enforceInterface(DESCRIPTOR);\n String[] ids = getSecureContainerList();\n reply.writeNoException();\n reply.writeStringArray(ids);\n return true;\n }\n case TRANSACTION_shutdown: {\n data.enforceInterface(DESCRIPTOR);\n IMountShutdownObserver observer;\n observer = IMountShutdownObserver.Stub.asInterface(data\n .readStrongBinder());\n shutdown(observer);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_finishMediaUpdate: {\n data.enforceInterface(DESCRIPTOR);\n finishMediaUpdate();\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_mountObb: {\n data.enforceInterface(DESCRIPTOR);\n final String rawPath = data.readString();\n final String canonicalPath = data.readString();\n final String key = data.readString();\n IObbActionListener observer;\n observer = IObbActionListener.Stub.asInterface(data.readStrongBinder());\n int nonce;\n nonce = data.readInt();\n mountObb(rawPath, canonicalPath, key, observer, nonce);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_unmountObb: {\n data.enforceInterface(DESCRIPTOR);\n String filename;\n filename = data.readString();\n boolean force;\n force = 0 != data.readInt();\n IObbActionListener observer;\n observer = IObbActionListener.Stub.asInterface(data.readStrongBinder());\n int nonce;\n nonce = data.readInt();\n unmountObb(filename, force, observer, nonce);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_isObbMounted: {\n data.enforceInterface(DESCRIPTOR);\n String filename;\n filename = data.readString();\n boolean status = isObbMounted(filename);\n reply.writeNoException();\n reply.writeInt((status ? 1 : 0));\n return true;\n }\n case TRANSACTION_getMountedObbPath: {\n data.enforceInterface(DESCRIPTOR);\n String filename;\n filename = data.readString();\n String mountedPath = getMountedObbPath(filename);\n reply.writeNoException();\n reply.writeString(mountedPath);\n return true;\n }\n case TRANSACTION_isExternalStorageEmulated: {\n data.enforceInterface(DESCRIPTOR);\n boolean emulated = isExternalStorageEmulated();\n reply.writeNoException();\n reply.writeInt(emulated ? 1 : 0);\n return true;\n }\n case TRANSACTION_decryptStorage: {\n data.enforceInterface(DESCRIPTOR);\n String password = data.readString();\n int result = decryptStorage(password);\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_encryptStorage: {\n data.enforceInterface(DESCRIPTOR);\n int type = data.readInt();\n String password = data.readString();\n int result = encryptStorage(type, password);\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_changeEncryptionPassword: {\n data.enforceInterface(DESCRIPTOR);\n int type = data.readInt();\n String password = data.readString();\n int result = changeEncryptionPassword(type, password);\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_getVolumeList: {\n data.enforceInterface(DESCRIPTOR);\n int uid = data.readInt();\n String packageName = data.readString();\n int _flags = data.readInt();\n StorageVolume[] result = getVolumeList(uid, packageName, _flags);\n reply.writeNoException();\n reply.writeTypedArray(result, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE);\n return true;\n }\n case TRANSACTION_getSecureContainerFilesystemPath: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n String path = getSecureContainerFilesystemPath(id);\n reply.writeNoException();\n reply.writeString(path);\n return true;\n }\n case TRANSACTION_getEncryptionState: {\n data.enforceInterface(DESCRIPTOR);\n int result = getEncryptionState();\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_fixPermissionsSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n int gid;\n gid = data.readInt();\n String filename;\n filename = data.readString();\n int resultCode = fixPermissionsSecureContainer(id, gid, filename);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_mkdirs: {\n data.enforceInterface(DESCRIPTOR);\n String callingPkg = data.readString();\n String path = data.readString();\n int result = mkdirs(callingPkg, path);\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_getPasswordType: {\n data.enforceInterface(DESCRIPTOR);\n int result = getPasswordType();\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_getPassword: {\n data.enforceInterface(DESCRIPTOR);\n String result = getPassword();\n reply.writeNoException();\n reply.writeString(result);\n return true;\n }\n case TRANSACTION_clearPassword: {\n data.enforceInterface(DESCRIPTOR);\n clearPassword();\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_setField: {\n data.enforceInterface(DESCRIPTOR);\n String field = data.readString();\n String contents = data.readString();\n setField(field, contents);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_getField: {\n data.enforceInterface(DESCRIPTOR);\n String field = data.readString();\n String contents = getField(field);\n reply.writeNoException();\n reply.writeString(contents);\n return true;\n }\n case TRANSACTION_isConvertibleToFBE: {\n data.enforceInterface(DESCRIPTOR);\n int resultCode = isConvertibleToFBE() ? 1 : 0;\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_resizeSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n int sizeMb;\n sizeMb = data.readInt();\n String key;\n key = data.readString();\n int resultCode = resizeSecureContainer(id, sizeMb, key);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_lastMaintenance: {\n data.enforceInterface(DESCRIPTOR);\n long lastMaintenance = lastMaintenance();\n reply.writeNoException();\n reply.writeLong(lastMaintenance);\n return true;\n }\n case TRANSACTION_runMaintenance: {\n data.enforceInterface(DESCRIPTOR);\n runMaintenance();\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_waitForAsecScan: {\n data.enforceInterface(DESCRIPTOR);\n waitForAsecScan();\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_getDisks: {\n data.enforceInterface(DESCRIPTOR);\n DiskInfo[] disks = getDisks();\n reply.writeNoException();\n reply.writeTypedArray(disks, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE);\n return true;\n }\n case TRANSACTION_getVolumes: {\n data.enforceInterface(DESCRIPTOR);\n int _flags = data.readInt();\n VolumeInfo[] volumes = getVolumes(_flags);\n reply.writeNoException();\n reply.writeTypedArray(volumes, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE);\n return true;\n }\n case TRANSACTION_getVolumeRecords: {\n data.enforceInterface(DESCRIPTOR);\n int _flags = data.readInt();\n VolumeRecord[] volumes = getVolumeRecords(_flags);\n reply.writeNoException();\n reply.writeTypedArray(volumes, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE);\n return true;\n }\n case TRANSACTION_mount: {\n data.enforceInterface(DESCRIPTOR);\n String volId = data.readString();\n mount(volId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_unmount: {\n data.enforceInterface(DESCRIPTOR);\n String volId = data.readString();\n unmount(volId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_format: {\n data.enforceInterface(DESCRIPTOR);\n String volId = data.readString();\n format(volId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_benchmark: {\n data.enforceInterface(DESCRIPTOR);\n String volId = data.readString();\n long res = benchmark(volId);\n reply.writeNoException();\n reply.writeLong(res);\n return true;\n }\n case TRANSACTION_partitionPublic: {\n data.enforceInterface(DESCRIPTOR);\n String diskId = data.readString();\n partitionPublic(diskId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_partitionPrivate: {\n data.enforceInterface(DESCRIPTOR);\n String diskId = data.readString();\n partitionPrivate(diskId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_partitionMixed: {\n data.enforceInterface(DESCRIPTOR);\n String diskId = data.readString();\n int ratio = data.readInt();\n partitionMixed(diskId, ratio);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_setVolumeNickname: {\n data.enforceInterface(DESCRIPTOR);\n String volId = data.readString();\n String nickname = data.readString();\n setVolumeNickname(volId, nickname);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_setVolumeUserFlags: {\n data.enforceInterface(DESCRIPTOR);\n String volId = data.readString();\n int _flags = data.readInt();\n int _mask = data.readInt();\n setVolumeUserFlags(volId, _flags, _mask);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_forgetVolume: {\n data.enforceInterface(DESCRIPTOR);\n String fsUuid = data.readString();\n forgetVolume(fsUuid);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_forgetAllVolumes: {\n data.enforceInterface(DESCRIPTOR);\n forgetAllVolumes();\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_setDebugFlags: {\n data.enforceInterface(DESCRIPTOR);\n int _flags = data.readInt();\n int _mask = data.readInt();\n setDebugFlags(_flags, _mask);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_getPrimaryStorageUuid: {\n data.enforceInterface(DESCRIPTOR);\n String volumeUuid = getPrimaryStorageUuid();\n reply.writeNoException();\n reply.writeString(volumeUuid);\n return true;\n }\n case TRANSACTION_setPrimaryStorageUuid: {\n data.enforceInterface(DESCRIPTOR);\n String volumeUuid = data.readString();\n IPackageMoveObserver listener = IPackageMoveObserver.Stub.asInterface(\n data.readStrongBinder());\n setPrimaryStorageUuid(volumeUuid, listener);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_createUserKey: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n int serialNumber = data.readInt();\n boolean ephemeral = data.readInt() != 0;\n createUserKey(userId, serialNumber, ephemeral);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_destroyUserKey: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n destroyUserKey(userId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_addUserKeyAuth: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n int serialNumber = data.readInt();\n byte[] token = data.createByteArray();\n byte[] secret = data.createByteArray();\n addUserKeyAuth(userId, serialNumber, token, secret);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_fixateNewestUserKeyAuth: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n fixateNewestUserKeyAuth(userId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_unlockUserKey: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n int serialNumber = data.readInt();\n byte[] token = data.createByteArray();\n byte[] secret = data.createByteArray();\n unlockUserKey(userId, serialNumber, token, secret);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_lockUserKey: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n lockUserKey(userId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_isUserKeyUnlocked: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n boolean result = isUserKeyUnlocked(userId);\n reply.writeNoException();\n reply.writeInt(result ? 1 : 0);\n return true;\n }\n case TRANSACTION_prepareUserStorage: {\n data.enforceInterface(DESCRIPTOR);\n String volumeUuid = data.readString();\n int userId = data.readInt();\n int serialNumber = data.readInt();\n int _flags = data.readInt();\n prepareUserStorage(volumeUuid, userId, serialNumber, _flags);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_destroyUserStorage: {\n data.enforceInterface(DESCRIPTOR);\n String volumeUuid = data.readString();\n int userId = data.readInt();\n int _flags = data.readInt();\n destroyUserStorage(volumeUuid, userId, _flags);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_mountAppFuse: {\n data.enforceInterface(DESCRIPTOR);\n String name = data.readString();\n ParcelFileDescriptor fd = mountAppFuse(name);\n reply.writeNoException();\n reply.writeParcelable(fd, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);\n return true;\n }\n }\n return super.onTransact(code, data, reply, flags);\n }\n }\n\n /*\n * Creates a secure container with the specified parameters. Returns an int\n * consistent with MountServiceResultCode\n */\n public int createSecureContainer(String id, int sizeMb, String fstype, String key,\n int ownerUid, boolean external) throws RemoteException;\n\n /*\n * Destroy a secure container, and free up all resources associated with it.\n * NOTE: Ensure all references are released prior to deleting. Returns an\n * int consistent with MountServiceResultCode\n */\n public int destroySecureContainer(String id, boolean force) throws RemoteException;\n\n /*\n * Finalize a container which has just been created and populated. After\n * finalization, the container is immutable. Returns an int consistent with\n * MountServiceResultCode\n */\n public int finalizeSecureContainer(String id) throws RemoteException;\n\n /**\n * Call into MountService by PackageManager to notify that its done\n * processing the media status update request.\n */\n public void finishMediaUpdate() throws RemoteException;\n\n /**\n * Format external storage given a mount point. Returns an int consistent\n * with MountServiceResultCode\n */\n public int formatVolume(String mountPoint) throws RemoteException;\n\n /**\n * Gets the path to the mounted Opaque Binary Blob (OBB).\n */\n public String getMountedObbPath(String rawPath) throws RemoteException;\n\n /**\n * Gets an Array of currently known secure container IDs\n */\n public String[] getSecureContainerList() throws RemoteException;\n\n /*\n * Returns the filesystem path of a mounted secure container.\n */\n public String getSecureContainerPath(String id) throws RemoteException;\n\n /**\n * Returns an array of pids with open files on the specified path.\n */\n public int[] getStorageUsers(String path) throws RemoteException;\n\n /**\n * Gets the state of a volume via its mountpoint.\n */\n public String getVolumeState(String mountPoint) throws RemoteException;\n\n /**\n * Checks whether the specified Opaque Binary Blob (OBB) is mounted\n * somewhere.\n */\n public boolean isObbMounted(String rawPath) throws RemoteException;\n\n /*\n * Returns true if the specified container is mounted\n */\n public boolean isSecureContainerMounted(String id) throws RemoteException;\n\n /**\n * Returns true if a USB mass storage host is connected\n */\n public boolean isUsbMassStorageConnected() throws RemoteException;\n\n /**\n * Returns true if a USB mass storage host is enabled (media is shared)\n */\n public boolean isUsbMassStorageEnabled() throws RemoteException;\n\n /**\n * Mounts an Opaque Binary Blob (OBB) with the specified decryption key and\n * only allows the calling process's UID access to the contents.\n * MountService will call back to the supplied IObbActionListener to inform\n * it of the terminal state of the call.\n */\n public void mountObb(String rawPath, String canonicalPath, String key,\n IObbActionListener token, int nonce) throws RemoteException;\n\n /*\n * Mount a secure container with the specified key and owner UID. Returns an\n * int consistent with MountServiceResultCode\n */\n public int mountSecureContainer(String id, String key, int ownerUid, boolean readOnly)\n throws RemoteException;\n\n /**\n * Mount external storage at given mount point. Returns an int consistent\n * with MountServiceResultCode\n */\n public int mountVolume(String mountPoint) throws RemoteException;\n\n /**\n * Registers an IMountServiceListener for receiving async notifications.\n */\n public void registerListener(IMountServiceListener listener) throws RemoteException;\n\n /*\n * Rename an unmounted secure container. Returns an int consistent with\n * MountServiceResultCode\n */\n public int renameSecureContainer(String oldId, String newId) throws RemoteException;\n\n /**\n * Enables / disables USB mass storage. The caller should check actual\n * status of enabling/disabling USB mass storage via StorageEventListener.\n */\n public void setUsbMassStorageEnabled(boolean enable) throws RemoteException;\n\n /**\n * Shuts down the MountService and gracefully unmounts all external media.\n * Invokes call back once the shutdown is complete.\n */\n public void shutdown(IMountShutdownObserver observer) throws RemoteException;\n\n /**\n * Unmounts an Opaque Binary Blob (OBB). When the force flag is specified,\n * any program using it will be forcibly killed to unmount the image.\n * MountService will call back to the supplied IObbActionListener to inform\n * it of the terminal state of the call.\n */\n public void unmountObb(String rawPath, boolean force, IObbActionListener token, int nonce)\n throws RemoteException;\n\n /*\n * Unount a secure container. Returns an int consistent with\n * MountServiceResultCode\n */\n public int unmountSecureContainer(String id, boolean force) throws RemoteException;\n\n /**\n * Safely unmount external storage at given mount point. The unmount is an\n * asynchronous operation. Applications should register StorageEventListener\n * for storage related status changes.\n * @param mountPoint the mount point\n * @param force whether or not to forcefully unmount it (e.g. even if programs are using this\n * data currently)\n * @param removeEncryption whether or not encryption mapping should be removed from the volume.\n * This value implies {@code force}.\n */\n public void unmountVolume(String mountPoint, boolean force, boolean removeEncryption)\n throws RemoteException;\n\n /**\n * Unregisters an IMountServiceListener\n */\n public void unregisterListener(IMountServiceListener listener) throws RemoteException;\n\n /**\n * Returns whether or not the external storage is emulated.\n */\n public boolean isExternalStorageEmulated() throws RemoteException;\n\n /** The volume is not encrypted. */\n static final int ENCRYPTION_STATE_NONE = 1;\n /** The volume has been encrypted succesfully. */\n static final int ENCRYPTION_STATE_OK = 0;\n /** The volume is in a bad state.*/\n static final int ENCRYPTION_STATE_ERROR_UNKNOWN = -1;\n /** Encryption is incomplete */\n static final int ENCRYPTION_STATE_ERROR_INCOMPLETE = -2;\n /** Encryption is incomplete and irrecoverable */\n static final int ENCRYPTION_STATE_ERROR_INCONSISTENT = -3;\n /** Underlying data is corrupt */\n static final int ENCRYPTION_STATE_ERROR_CORRUPT = -4;\n\n /**\n * Determines the encryption state of the volume.\n * @return a numerical value. See {@code ENCRYPTION_STATE_*} for possible\n * values.\n * Note that this has been replaced in most cases by the APIs in\n * StorageManager (see isEncryptable and below)\n * This is still useful to get the error state when encryption has failed\n * and CryptKeeper needs to throw up a screen advising the user what to do\n */\n public int getEncryptionState() throws RemoteException;\n\n /**\n * Decrypts any encrypted volumes.\n */\n public int decryptStorage(String password) throws RemoteException;\n\n /**\n * Encrypts storage.\n */\n public int encryptStorage(int type, String password) throws RemoteException;\n\n /**\n * Changes the encryption password.\n */\n public int changeEncryptionPassword(int type, String password)\n throws RemoteException;\n\n /**\n * Verify the encryption password against the stored volume. This method\n * may only be called by the system process.\n */\n public int verifyEncryptionPassword(String password) throws RemoteException;\n\n /**\n * Returns list of all mountable volumes.\n */\n public StorageVolume[] getVolumeList(int uid, String packageName, int flags) throws RemoteException;\n\n /**\n * Gets the path on the filesystem for the ASEC container itself.\n *\n * @param cid ASEC container ID\n * @return path to filesystem or {@code null} if it's not found\n * @throws RemoteException\n */\n public String getSecureContainerFilesystemPath(String cid) throws RemoteException;\n\n /*\n * Fix permissions in a container which has just been created and populated.\n * Returns an int consistent with MountServiceResultCode\n */\n public int fixPermissionsSecureContainer(String id, int gid, String filename)\n throws RemoteException;\n\n /**\n * Ensure that all directories along given path exist, creating parent\n * directories as needed. Validates that given path is absolute and that it\n * contains no relative \".\" or \"..\" paths or symlinks. Also ensures that\n * path belongs to a volume managed by vold, and that path is either\n * external storage data or OBB directory belonging to calling app.\n */\n public int mkdirs(String callingPkg, String path) throws RemoteException;\n\n /**\n * Determines the type of the encryption password\n * @return PasswordType\n */\n public int getPasswordType() throws RemoteException;\n\n /**\n * Get password from vold\n * @return password or empty string\n */\n public String getPassword() throws RemoteException;\n\n /**\n * Securely clear password from vold\n */\n public void clearPassword() throws RemoteException;\n\n /**\n * Set a field in the crypto header.\n * @param field field to set\n * @param contents contents to set in field\n */\n public void setField(String field, String contents) throws RemoteException;\n\n /**\n * Gets a field from the crypto header.\n * @param field field to get\n * @return contents of field\n */\n public String getField(String field) throws RemoteException;\n\n public boolean isConvertibleToFBE() throws RemoteException;\n\n public int resizeSecureContainer(String id, int sizeMb, String key) throws RemoteException;\n\n /**\n * Report the time of the last maintenance operation such as fstrim.\n * @return Timestamp of the last maintenance operation, in the\n * System.currentTimeMillis() time base\n * @throws RemoteException\n */\n public long lastMaintenance() throws RemoteException;\n\n /**\n * Kick off an immediate maintenance operation\n * @throws RemoteException\n */\n public void runMaintenance() throws RemoteException;\n\n public void waitForAsecScan() throws RemoteException;\n\n public DiskInfo[] getDisks() throws RemoteException;\n public VolumeInfo[] getVolumes(int flags) throws RemoteException;\n public VolumeRecord[] getVolumeRecords(int flags) throws RemoteException;\n\n public void mount(String volId) throws RemoteException;\n public void unmount(String volId) throws RemoteException;\n public void format(String volId) throws RemoteException;\n public long benchmark(String volId) throws RemoteException;\n\n public void partitionPublic(String diskId) throws RemoteException;\n public void partitionPrivate(String diskId) throws RemoteException;\n public void partitionMixed(String diskId, int ratio) throws RemoteException;\n\n public void setVolumeNickname(String fsUuid, String nickname) throws RemoteException;\n public void setVolumeUserFlags(String fsUuid, int flags, int mask) throws RemoteException;\n public void forgetVolume(String fsUuid) throws RemoteException;\n public void forgetAllVolumes() throws RemoteException;\n public void setDebugFlags(int flags, int mask) throws RemoteException;\n\n public String getPrimaryStorageUuid() throws RemoteException;\n public void setPrimaryStorageUuid(String volumeUuid, IPackageMoveObserver callback)\n throws RemoteException;\n\n public void createUserKey(int userId, int serialNumber, boolean ephemeral)\n throws RemoteException;\n public void destroyUserKey(int userId) throws RemoteException;\n public void addUserKeyAuth(int userId, int serialNumber,\n byte[] token, byte[] secret) throws RemoteException;\n public void fixateNewestUserKeyAuth(int userId) throws RemoteException;\n\n public void unlockUserKey(int userId, int serialNumber,\n byte[] token, byte[] secret) throws RemoteException;\n public void lockUserKey(int userId) throws RemoteException;\n public boolean isUserKeyUnlocked(int userId) throws RemoteException;\n\n public void prepareUserStorage(String volumeUuid, int userId, int serialNumber,\n int flags) throws RemoteException;\n public void destroyUserStorage(String volumeUuid, int userId, int flags) throws RemoteException;\n\n public ParcelFileDescriptor mountAppFuse(String name) throws RemoteException;\n}", "public interface ClientContant {\n /**\n * rpc服务器\n */\n String RPC_SERVER_HOST = \"rpc.server.host\";\n /**\n * rpc服务器端口\n */\n String RPC_SERVER_PORT = \"rpc.server.port\";\n}", "@RemoteServiceRelativePath(\"greet\")\r\npublic interface GreetingService extends RemoteService {\r\n\tAdd getsubmit(Add name) throws IllegalArgumentException;\r\n\r\n\tData p(Data n) throws IllegalArgumentException;\r\n\r\n\tLog l(Log u) throws IllegalArgumentException;\r\n\r\n\tupl insert(upl u) throws IllegalArgumentException;\r\n\r\n\toutuser getdata(outuser name) throws IllegalArgumentException;\r\n\r\n\t\r\n\r\n\tBooks[] fun(String s1)throws IllegalArgumentException;\r\n\r\n\tAdd[] po(String s)throws IllegalArgumentException;\r\n\t\r\n\t\r\n\tBooks fun1(Books s1)throws IllegalArgumentException;\r\n}", "public interface CompanyWriteRpcService {\n /**\n * PC端-修改企业支付备注\n * @param reqDTO\n * @return\n */\n Result<String> updateCompanyPayRemark(CompanyInfoUpdateReqDTO reqDTO);\n /**\n * 更改企业状态 0-禁用/1-启用\n * @param companyStatusReqDTO\n * @return\n */\n Result<String> updateCompanyStatus(CompanyStatusReqDTO companyStatusReqDTO);\n /**\n * 修改公司基本信息\n * @param companyInfoUpdateReqDTO\n * @return\n */\n Result<String> updateCompanyInfo(CompanyInfoUpdateReqDTO companyInfoUpdateReqDTO);\n /**\n * 修改公司基本信息 通过Rpc调用\n * @param companyInfoUpdateReqDTO\n * @return\n */\n Result<Void> updateCompanyInfoByRpc(CompanyInfoUpdateReqDTO companyInfoUpdateReqDTO);\n /**\n * 添加公司\n * @param companyInfoAddReqDTO\n * @return CompanyInfoAddRespDTO 公司id\n */\n Result<CompanyInfoAddRespDTO> addCompanyInfo(CompanyInfoAddReqDTO companyInfoAddReqDTO);\n\n /**\n * 添加公司-通过Rpc调用\n * @param companyInfoAddByRpcReqDTO\n * @return CompanyInfoAddRespDTO 公司id\n */\n Result<CompanyInfoAddRespDTO> addCompanyInfoByRpc(CompanyInfoAddByRpcReqDTO companyInfoAddByRpcReqDTO);\n\n /**\n * 设置白名单\n * @param companyExpireStatusUpdateReqDTO\n * @return\n */\n Result<Void> updateCompanyExpireStatus(CompanyExpireStatusUpdateReqDTO companyExpireStatusUpdateReqDTO);\n\n /**\n *\n */\n Result<Void> updateFactoryInfo(FactoryInfoConfigReqDTO factoryInfoConfigReqDTO);\n\n /**\n * 企业添加品牌\n * @param companyBrandAddReqDTO\n * @return\n */\n Result<CompanyBrandAddRespDTO> addCompanyBrand(CompanyBrandAddReqDTO companyBrandAddReqDTO);\n\n /**\n * 内部rpc调用新增品牌\n * @param companyBrandAddInsideReqDTO\n * @return\n */\n Result<CompanyBrandAddInsideRespDTO> addCompanyBrandInside(CompanyBrandAddInsideReqDTO companyBrandAddInsideReqDTO);\n /**\n * 删除品牌\n * @param companyBrandDelReqDTO\n * @return\n */\n Result<String> delCompanyBrand(CompanyBrandDelReqDTO companyBrandDelReqDTO);\n\n /**\n * 批量删除品牌\n * @param companyBrandsDelReqDTO\n * @return\n */\n Result<String> delCompanyBrands(CompanyBrandsDelReqDTO companyBrandsDelReqDTO);\n /**\n * 延长公司服务到期时间,并且生成流水\n * @param req\n * @return\n */\n Result<CompanyExtendServiceAddRespDTO> addCompanyExtendServiceJournal(CompanyExtendServiceAddReqDTO req);\n /**\n * @Description: 更新企业打印设置\n * @Param:\n * @return:\n * @Author: zhangtengpo\n * @Date: 2018/6/1\n */\n Result<String> updateCompanyPrintConfig(CompanyPrintConfigInfoUpdateReqDTO companyPrintConfigInfoUpdateReqDTO);\n /**\n * 审核公司信息\n * @param reqDTO\n * @return\n */\n Result<CompanyInfoVerifyRespDTO> verifyCompanyInfo(CompanyInfoVerifyReqDTO reqDTO);\n\n /**\n * 提交认证--添加审核信息\n * @param reqDTO\n * @return\n */\n Result<CompanyInfoVerifyAddRespDTO> addVerifyCompanyInfo(CompanyInfoVerifyAddReqDTO reqDTO);\n\n /**\n * @Description: 管理-打印设置-修改打印模式\n * @Param:companyPrintModeUpdateReqDTO\n * @return:\n * @Author: cy\n * @Date: 2018/11/15\n */\n Result<String> updateCompanyPrintMode(CompanyPrintModeUpdateReqDTO companyPrintModeUpdateReqDTO);\n\n}", "public _CodeBaseStub ()\n {\n super ();\n }", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}", "public void preinvoke(ServerServiceDesc serviceDesc, RequestMetaContext reqMetaCtx, ResponseMetaContext respMetaCtx) throws ServiceException;", "public ServerInfo clientInterface()\n {\n return client_stub;\n }", "public interface ClientInterface {\r\n\r\n @GET(\"/bins/x5279\")\r\n Call<ArrayList<Details>> getDetails();\r\n}", "public static void testMain(){\n\t\ttry {\n\t\t\t/**\n\t\t\t * 调用接口获得返回字符串\n\t\t\t */\n\t\t\t// 创建调用对象\n\t\t \n\t\t\tURL url = new URL(\"http://10.1.13.146:30014/service/fundquery.ws?wsdl\"); \n\t\t\tQName qName = new QName(\"http://service.hundsun.com\", \"FundQueryService\");\n\t\t\tService service = Service.create(url, qName); \n\t\t\t\n\t\t\tFundQueryServicePortType fundQueryServicePortType = service.getPort(FundQueryServicePortType.class); \n\t\t\tQueryPayResponse r= fundQueryServicePortType.queryPay(getQueryPay());\n System.out.println(r.getTotalAmount());\n \n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "public interface CoreServiceInvoker {\n\n\n GWRequest processRequest(Object requestData, InterfaceMapper mapper);\n\n /**\n * 处理请求信息\n */\n GWRequest processRequest(Object requestData, InterfaceMapper mapper, boolean needPackage);\n\n /**\n * 调用核心方法\n */\n GWResponse invoke(GWRequest request, boolean needPackage);\n\n /**\n * 处理返回信息\n */\n Object analysisResponse(GWRequest request, GWResponse response);\n Object analysisResp(GWRequest request, GWResponse response);\n}", "@RemoteServiceRelativePath(\"dataService\")\npublic interface DataService extends RemoteService {\n ArrayList<Point> getPoints(int width, int height, int i, int j) throws IllegalArgumentException,\n IOException;\n}", "@RemoteServiceRelativePath(\"BankOfficeGWTService\")\npublic interface BankOfficeGWTService extends RemoteService {\n\tpublic BankOfficeDTO findById(Integer id) throws ObjectNotExistGError;\n\tpublic Integer saveOrUpdate(BankOfficeDTO entity) throws ExternalOrMidasIdIsInUseGError;\n\tpublic BankOfficeDTO getMyOffice();\n\tpublic BankOfficeDTO findByExternalId(Long midasId);\n\tpublic ArrayList<BankOfficeDTO> findAll();\n\tpublic ArrayList<ListBoxDTO> findAllShort();\n}", "public interface AsyncRpcCallback {\n\n void success(Object result);\n\n void fail(Exception e);\n\n}", "public interface GeneralService {\n\n /**\n * Returns general server data\n */\n Request getGeneralData(AsyncCallback<GeneralData> callback);\n\n}", "@Override\n\tpublic Response init(ChaincodeStub stub) {\n\t\ttry {\n\t\t\t_logger.info(\"=========== Instantiated fabcar chaincode ===========\");\n\t\t\treturn newSuccessResponse();\n\t\t}\n\t\tcatch (Throwable e) {\n\t\t\treturn newErrorResponse(e);\n\t\t}\n\t}", "public PagedRpcExample() {\n\t\tfiixCmmsClient = new FiixCmmsClient(CredentialProvider.getCredentials(),\n\t\t\tCredentialProvider.TENANT_API_ENDPOINT);\n\t}", "public RMIServerInvokerInf getServerStub()\n {\n return this.server;\n }", "public ServiceClient() {\n\t\tsuper();\n\t}", "public interface ComboBoxClientRpc extends ClientRpc {\n\n /**\n * Signal the client that attempt to add a new item failed.\n *\n * @param itemValue\n * user entered string value for the new item\n */\n public void newItemNotAdded(String itemValue);\n}", "public ApplicationStub() {\n }", "@RemoteServiceRelativePath(\"greet\")\npublic interface GreetingService extends RemoteService {\n\tString greetServer(String name) throws IllegalArgumentException;\n\tString registrazione(String nome, String nick, String password, String mail) throws IllegalArgumentException;\n\tString login(String nick, String passw) throws IllegalArgumentException;\n\tString caricaevento(String nome, String luogo, String descs,String dal,String al,String idKey, int check, String cause) throws IllegalArgumentException;\n\tString cancellaevento(String id,String idKey) throws IllegalArgumentException;\n\tString chiudievento(String id,String idKey) throws IllegalArgumentException;\n\tString insertJoin(String idEvento, String nome, String nick, String commento,int disp) throws IllegalArgumentException;\n\tLinkedList<Partecipa> getAllUsersJoin(String idEvento) throws IllegalArgumentException;\n\tLinkedList<Evento> getAllUserEvents(String id) throws IllegalArgumentException;\n\tLinkedList<Evento> getAllEvents() throws IllegalArgumentException;\n}", "public interface RpcProcessorFactory {\n\n\n RpcProcessor getProcessor(\n String rpcMethod\n );\n\n\n}", "public ClientMain() throws RemoteException, MalformedURLException, NotBoundException\r\n\t{\r\n\t\t//server = (IServer) Naming.lookup(\"rmi://10.152.206.74:1099/bankingServer\");\r\n\t\tserver = (IServer) Naming.lookup(\"rmi://localhost:1099/bankingServer\");\r\n\r\n\t\tmodel = new BankModel();\r\n\r\n\t\tSystem.out.println(\"Client running\");\r\n\t}", "public RPCRequest()\n\t{\n\t\tsuper();\n\t}", "com.rajni.grpc.greeting.Greeting getGreeting();", "protected GrpcJobServiceStub(JobServiceStubSettings settings, ClientContext clientContext)\n throws IOException {\n this(settings, clientContext, new GrpcJobServiceCallableFactory());\n }", "public BudgetAccountServiceImpl() {\r\n\t}", "public com.android.internal.telecom.IConnectionServiceAdapter getStub() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.telecom.ConnectionServiceAdapterServant.getStub():com.android.internal.telecom.IConnectionServiceAdapter, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telecom.ConnectionServiceAdapterServant.getStub():com.android.internal.telecom.IConnectionServiceAdapter\");\n }", "public com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleInfoPageResponse getVehicleInfoPage(\n\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleInfoPage getVehicleInfoPage)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[1].getName());\n _operationClient.getOptions().setAction(\"urn:getVehicleInfoPage\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getVehicleInfoPage,\n optimizeContent(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"getVehicleInfoPage\")));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleInfoPageResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetVehicleInfoPageResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(faultElt.getQName())){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(faultElt.getQName());\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.Exception ex=\n (java.lang.Exception) exceptionClass.newInstance();\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(faultElt.getQName());\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }", "@WebService(name = \"BillingService\", targetNamespace = \"http://billing.jaxws.bt.com/\")\n@HandlerChain(file = \"BillingService_handler.xml\")\n@SOAPBinding(style = SOAPBinding.Style.RPC)\n@XmlSeeAlso({\n com.bt.jaxb.model.ObjectFactory.class,\n com.bt.jaxws.billing.ObjectFactory.class\n})\npublic interface BillingService {\n\n\n /**\n * \n * @param arg1\n * @param arg0\n * @return\n * returns javax.xml.ws.Response<com.bt.jaxws.billing.Invoice>\n */\n @WebMethod(operationName = \"getInvoice\")\n public Response<Invoice> getInvoiceAsync(\n @WebParam(name = \"arg0\", partName = \"arg0\")\n Customer arg0,\n @WebParam(name = \"arg1\", partName = \"arg1\")\n String arg1);\n\n /**\n * \n * @param arg1\n * @param arg0\n * @param asyncHandler\n * @return\n * returns java.util.concurrent.Future<? extends java.lang.Object>\n */\n @WebMethod(operationName = \"getInvoice\")\n public Future<?> getInvoiceAsync(\n @WebParam(name = \"arg0\", partName = \"arg0\")\n Customer arg0,\n @WebParam(name = \"arg1\", partName = \"arg1\")\n String arg1,\n @WebParam(name = \"asyncHandler\", partName = \"asyncHandler\")\n AsyncHandler<Invoice> asyncHandler);\n\n /**\n * \n * @param arg1\n * @param arg0\n * @return\n * returns com.bt.jaxws.billing.Invoice\n * @throws InvalidCustomerException_Exception\n */\n @WebMethod\n @WebResult(partName = \"return\")\n @Action(input = \"http://billing.jaxws.bt.com/BillingService/getInvoiceRequest\", output = \"http://billing.jaxws.bt.com/BillingService/getInvoiceResponse\", fault = {\n @FaultAction(className = InvalidCustomerException_Exception.class, value = \"http://billing.jaxws.bt.com/BillingService/getInvoice/Fault/InvalidCustomerException\")\n })\n public Invoice getInvoice(\n @WebParam(name = \"arg0\", partName = \"arg0\")\n Customer arg0,\n @WebParam(name = \"arg1\", partName = \"arg1\")\n String arg1)\n throws InvalidCustomerException_Exception\n ;\n\n}", "public interface ILamportServer extends Remote {\n public String SERVICE_NAME = \"LAMPORT_RMI\"; // Nom du service\n \n /**\n * Envoie un Message REQUEST aux autres serveurs pour annoncer le fait de \n * vouloir rentrer dans la section critique\n * @param message Le message envoyé avec une requête\n * @throws RemoteException \n */\n public void request(Message message) throws RemoteException;\n \n /**\n * Envoi du Message RESPONSE après avoir Reçu le Message REQUEST\n * @param message Le message envoyé avec une réponse\n * @throws RemoteException \n */\n public void response(Message message) throws RemoteException;\n \n /**\n * Envoie du message FREE pour indiquer aux autres serveur que l'on sort de\n * la section critique\n * @param message Le message envoyé pour libérer la section critique\n * @throws RemoteException \n */\n public void freeSC(Message message) throws RemoteException;\n \n /**\n * Métode pour modifier la variable globalle dans tous les serveurs\n * @param newValue La nouvelle valeur de la variable\n * @throws RemoteException \n */\n public void setVariableGlobally(int newValue) throws RemoteException;\n}", "public interface IOngoingStubbing {}", "ServerInfo stub()\n {\n return new ServerInfo(NAMING_IP, REGISTRATION_PORT);\n }", "public com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetParkPageResponse getParkPage(\n\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetParkPage getParkPage)\n \n\n throws java.rmi.RemoteException\n \n {\n org.apache.axis2.context.MessageContext _messageContext = null;\n try{\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[8].getName());\n _operationClient.getOptions().setAction(\"urn:getParkPage\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n // create a message context\n _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env = null;\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getParkPage,\n optimizeContent(new javax.xml.namespace.QName(\"http://impl.thirdsdk.api.pms.cms.hikvision.com\",\n \"getParkPage\")));\n \n //adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // set the message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message contxt to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n //execute the operation client\n _operationClient.execute(true);\n\n \n org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(\n org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);\n org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();\n \n \n java.lang.Object object = fromOM(\n _returnEnv.getBody().getFirstElement() ,\n com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetParkPageResponse.class,\n getEnvelopeNamespaces(_returnEnv));\n\n \n return (com.drore.cloud.tdp.service.IWsPmsSdkServiceStub.GetParkPageResponse)object;\n \n }catch(org.apache.axis2.AxisFault f){\n\n org.apache.axiom.om.OMElement faultElt = f.getDetail();\n if (faultElt!=null){\n if (faultExceptionNameMap.containsKey(faultElt.getQName())){\n //make the fault by reflection\n try{\n java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(faultElt.getQName());\n java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n java.lang.Exception ex=\n (java.lang.Exception) exceptionClass.newInstance();\n //message class\n java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(faultElt.getQName());\n java.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n java.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n java.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n new java.lang.Class[]{messageClass});\n m.invoke(ex,new java.lang.Object[]{messageObject});\n \n\n throw new java.rmi.RemoteException(ex.getMessage(), ex);\n }catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n throw f;\n }\n }else{\n throw f;\n }\n }else{\n throw f;\n }\n } finally {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n }\n }", "public RpcClient(String serviceUrl,\n final RpcClientOptions options,\n List<Interceptor> interceptors,\n NamingServiceFactory namingServiceFactory) {\n Validate.notEmpty(serviceUrl);\n Validate.notNull(options);\n this.init(options, interceptors);\n // parse naming\n BrpcURL url = new BrpcURL(serviceUrl);\n if (namingServiceFactory != null) {\n this.namingService = namingServiceFactory.createNamingService(url);\n } else {\n this.namingService = new DefaultNamingServiceFactory().createNamingService(url);\n }\n }", "@WebService(name = \"BankInterface\", targetNamespace = \"http://Bank.server_bank.mycompany.com/\")\n@XmlSeeAlso({\n ObjectFactory.class\n})\npublic interface BankInterface {\n\n\n /**\n * \n * @param arg0\n * @return\n * returns java.lang.String\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getOperationByID\", targetNamespace = \"http://Bank.server_bank.mycompany.com/\", className = \"com.mycompany.ws_bank.GetOperationByID\")\n @ResponseWrapper(localName = \"getOperationByIDResponse\", targetNamespace = \"http://Bank.server_bank.mycompany.com/\", className = \"com.mycompany.ws_bank.GetOperationByIDResponse\")\n public String getOperationByID(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n int arg0);\n\n /**\n * \n * @return\n * returns com.mycompany.ws_bank.SET\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getConti\", targetNamespace = \"http://Bank.server_bank.mycompany.com/\", className = \"com.mycompany.ws_bank.GetConti\")\n @ResponseWrapper(localName = \"getContiResponse\", targetNamespace = \"http://Bank.server_bank.mycompany.com/\", className = \"com.mycompany.ws_bank.GetContiResponse\")\n public SET getConti();\n\n /**\n * \n * @param arg0\n * @return\n * returns java.util.List<java.lang.String>\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getOperationsByClientID\", targetNamespace = \"http://Bank.server_bank.mycompany.com/\", className = \"com.mycompany.ws_bank.GetOperationsByClientID\")\n @ResponseWrapper(localName = \"getOperationsByClientIDResponse\", targetNamespace = \"http://Bank.server_bank.mycompany.com/\", className = \"com.mycompany.ws_bank.GetOperationsByClientIDResponse\")\n public List<String> getOperationsByClientID(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n int arg0);\n\n /**\n * \n * @return\n * returns java.util.List<java.lang.String>\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getClientIDs\", targetNamespace = \"http://Bank.server_bank.mycompany.com/\", className = \"com.mycompany.ws_bank.GetClientIDs\")\n @ResponseWrapper(localName = \"getClientIDsResponse\", targetNamespace = \"http://Bank.server_bank.mycompany.com/\", className = \"com.mycompany.ws_bank.GetClientIDsResponse\")\n public List<String> getClientIDs();\n\n /**\n * \n * @return\n * returns com.mycompany.ws_bank.MAP\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getDbop\", targetNamespace = \"http://Bank.server_bank.mycompany.com/\", className = \"com.mycompany.ws_bank.GetDbop\")\n @ResponseWrapper(localName = \"getDbopResponse\", targetNamespace = \"http://Bank.server_bank.mycompany.com/\", className = \"com.mycompany.ws_bank.GetDbopResponse\")\n public MAP getDbop();\n\n /**\n * \n * @param arg0\n * @return\n * returns java.lang.String\n */\n @WebMethod\n @WebResult(targetNamespace = \"\")\n @RequestWrapper(localName = \"getClientByID\", targetNamespace = \"http://Bank.server_bank.mycompany.com/\", className = \"com.mycompany.ws_bank.GetClientByID\")\n @ResponseWrapper(localName = \"getClientByIDResponse\", targetNamespace = \"http://Bank.server_bank.mycompany.com/\", className = \"com.mycompany.ws_bank.GetClientByIDResponse\")\n public String getClientByID(\n @WebParam(name = \"arg0\", targetNamespace = \"\")\n int arg0);\n\n}", "public void startgetServerVersion(\n\n sample.ws.HelloWorldWSStub.GetServerVersion getServerVersion0,\n\n final sample.ws.HelloWorldWSCallbackHandler callback)\n\n throws java.rmi.RemoteException{\n\n org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[0].getName());\n _operationClient.getOptions().setAction(\"getServerVersion\");\n _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);\n\n \n \n addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,\"&\");\n \n\n\n // create SOAP envelope with that payload\n org.apache.axiom.soap.SOAPEnvelope env=null;\n final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();\n\n \n //Style is Doc.\n \n \n env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),\n getServerVersion0,\n optimizeContent(new javax.xml.namespace.QName(\"http://ws.sample/\",\n \"getServerVersion\")));\n \n // adding SOAP soap_headers\n _serviceClient.addHeadersToEnvelope(env);\n // create message context with that soap envelope\n _messageContext.setEnvelope(env);\n\n // add the message context to the operation client\n _operationClient.addMessageContext(_messageContext);\n\n\n \n _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {\n public void onMessage(org.apache.axis2.context.MessageContext resultContext) {\n try {\n org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();\n \n java.lang.Object object = fromOM(resultEnv.getBody().getFirstElement(),\n sample.ws.HelloWorldWSStub.GetServerVersionResponse.class,\n getEnvelopeNamespaces(resultEnv));\n callback.receiveResultgetServerVersion(\n (sample.ws.HelloWorldWSStub.GetServerVersionResponse)object);\n \n } catch (org.apache.axis2.AxisFault e) {\n callback.receiveErrorgetServerVersion(e);\n }\n }\n\n public void onError(java.lang.Exception error) {\n\t\t\t\t\t\t\t\tif (error instanceof org.apache.axis2.AxisFault) {\n\t\t\t\t\t\t\t\t\torg.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;\n\t\t\t\t\t\t\t\t\torg.apache.axiom.om.OMElement faultElt = f.getDetail();\n\t\t\t\t\t\t\t\t\tif (faultElt!=null){\n\t\t\t\t\t\t\t\t\t\tif (faultExceptionNameMap.containsKey(faultElt.getQName())){\n\t\t\t\t\t\t\t\t\t\t\t//make the fault by reflection\n\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(faultElt.getQName());\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Exception ex=\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t(java.lang.Exception) exceptionClass.newInstance();\n\t\t\t\t\t\t\t\t\t\t\t\t\t//message class\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.String messageClassName = (java.lang.String)faultMessageMap.get(faultElt.getQName());\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Class messageClass = java.lang.Class.forName(messageClassName);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.Object messageObject = fromOM(faultElt,messageClass,null);\n\t\t\t\t\t\t\t\t\t\t\t\t\tjava.lang.reflect.Method m = exceptionClass.getMethod(\"setFaultMessage\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnew java.lang.Class[]{messageClass});\n\t\t\t\t\t\t\t\t\t\t\t\t\tm.invoke(ex,new java.lang.Object[]{messageObject});\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorgetServerVersion(new java.rmi.RemoteException(ex.getMessage(), ex));\n } catch(java.lang.ClassCastException e){\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetServerVersion(f);\n } catch (java.lang.ClassNotFoundException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetServerVersion(f);\n } catch (java.lang.NoSuchMethodException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetServerVersion(f);\n } catch (java.lang.reflect.InvocationTargetException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetServerVersion(f);\n } catch (java.lang.IllegalAccessException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetServerVersion(f);\n } catch (java.lang.InstantiationException e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetServerVersion(f);\n } catch (org.apache.axis2.AxisFault e) {\n // we cannot intantiate the class - throw the original Axis fault\n callback.receiveErrorgetServerVersion(f);\n }\n\t\t\t\t\t\t\t\t\t } else {\n\t\t\t\t\t\t\t\t\t\t callback.receiveErrorgetServerVersion(f);\n\t\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t callback.receiveErrorgetServerVersion(f);\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 callback.receiveErrorgetServerVersion(error);\n\t\t\t\t\t\t\t\t}\n }\n\n public void onFault(org.apache.axis2.context.MessageContext faultContext) {\n org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);\n onError(fault);\n }\n\n public void onComplete() {\n try {\n _messageContext.getTransportOut().getSender().cleanup(_messageContext);\n } catch (org.apache.axis2.AxisFault axisFault) {\n callback.receiveErrorgetServerVersion(axisFault);\n }\n }\n });\n \n\n org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;\n if ( _operations[0].getMessageReceiver()==null && _operationClient.getOptions().isUseSeparateListener()) {\n _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();\n _operations[0].setMessageReceiver(\n _callbackReceiver);\n }\n\n //execute the operation client\n _operationClient.execute(false);\n\n }", "private static void unaryService(ManagedChannel channel){\n CalculatorServiceBlockingStub calculatorClient = newBlockingStub(channel);\n\n //Create a Greet Request\n SumRequest sumRequest = SumRequest\n .newBuilder()\n .setFirstNumber(1)\n .setSecondNumber(2)\n .build();\n\n //Call the RPC and get back a GreetResponse\n SumResponse sumResponse = calculatorClient.sum(sumRequest);\n System.out.println(sumRequest.getFirstNumber() +\"+\" + sumRequest.getSecondNumber() +\"=\"+ sumResponse.getSumResult());\n }", "public interface ServiceCallHandler {\r\n\r\n\t/**\r\n\t * Method responsible for handling a service call in the appropriate instance driver\r\n\t * \r\n\t * @param serviceCall ServiceCall message Received.\r\n\t * @return serviceResponse returned from the service.\r\n\t */\r\n\tpublic Response handleServiceCall(Call serviceCall, CallContext messageContext) throws DriverManagerException;\r\n}", "protected void doInvocation(){\n org.omg.CORBA.portable.Delegate delegate=StubAdapter.getDelegate(\n _target);\n // Initiate Client Portable Interceptors. Inform the PIHandler that\n // this is a DII request so that it knows to ignore the second\n // inevitable call to initiateClientPIRequest in createRequest.\n // Also, save the RequestImpl object for later use.\n _orb.getPIHandler().initiateClientPIRequest(true);\n _orb.getPIHandler().setClientPIInfo(this);\n InputStream $in=null;\n try{\n OutputStream $out=delegate.request(null,_opName,!_isOneWay);\n // Marshal args\n try{\n for(int i=0;i<_arguments.count();i++){\n NamedValue nv=_arguments.item(i);\n switch(nv.flags()){\n case ARG_IN.value:\n nv.value().write_value($out);\n break;\n case ARG_OUT.value:\n break;\n case ARG_INOUT.value:\n nv.value().write_value($out);\n break;\n }\n }\n }catch(Bounds ex){\n throw _wrapper.boundsErrorInDiiRequest(ex);\n }\n $in=delegate.invoke(null,$out);\n }catch(ApplicationException e){\n // REVISIT - minor code.\n // This is already handled in subcontract.\n // REVISIT - uncomment.\n //throw new INTERNAL();\n }catch(RemarshalException e){\n doInvocation();\n }catch(SystemException ex){\n _env.exception(ex);\n // NOTE: The exception should not be thrown.\n // However, JDK 1.4 and earlier threw the exception,\n // so we keep the behavior to be compatible.\n throw ex;\n }finally{\n delegate.releaseReply(null,$in);\n }\n }", "public ServerInfo commandInterface()\n {\n return command_stub;\n }" ]
[ "0.684073", "0.6785052", "0.6462027", "0.64237046", "0.6226662", "0.6219779", "0.6145802", "0.61184007", "0.6094014", "0.6092081", "0.6046717", "0.6046717", "0.6046717", "0.60165495", "0.5962826", "0.5927603", "0.5925951", "0.5909489", "0.5864903", "0.5864903", "0.5864903", "0.5864903", "0.5864903", "0.58564365", "0.5852549", "0.5852549", "0.5796225", "0.57646835", "0.57626516", "0.57530946", "0.5738339", "0.57159114", "0.5702277", "0.56920666", "0.5686093", "0.5663843", "0.5659857", "0.5652021", "0.56504023", "0.5647899", "0.5644348", "0.56101745", "0.56011444", "0.55748683", "0.55572313", "0.5556356", "0.5547346", "0.5538241", "0.5535438", "0.5533289", "0.55230844", "0.5517171", "0.55158144", "0.55158144", "0.55158144", "0.55158144", "0.55158144", "0.55158144", "0.55158144", "0.55158144", "0.55158144", "0.55158144", "0.55158144", "0.55158144", "0.5514731", "0.5466601", "0.54631126", "0.54533774", "0.545263", "0.5440307", "0.54338706", "0.5431367", "0.5428362", "0.54282564", "0.5428251", "0.5426558", "0.5413488", "0.5412664", "0.53955734", "0.53825736", "0.53736615", "0.5371812", "0.5367291", "0.53653765", "0.5361663", "0.53504294", "0.5348456", "0.53400123", "0.5321658", "0.5320681", "0.5301274", "0.5297958", "0.5295056", "0.5292713", "0.5287953", "0.52827036", "0.5280835", "0.52806276", "0.5279511", "0.52779746" ]
0.5828692
26
(0.65ms, 52.5MB) > (3.26ms, 52MB)
public static int[] solution(String[] genres, int[] plays) { int[] answer = {}; Map<String, Integer> total = new HashMap<>(); for (int i = 0; i < genres.length; i++) { total.put(genres[i], total.getOrDefault((genres[i]), 0) + plays[i]); } List<String> list = new ArrayList<>(total.keySet()); Collections.sort(list, (o1, o2) -> total.get(o2).compareTo(total.get(o1))); List<Integer> answerList = new ArrayList<>(); for (String str : list) { int[] play = new int[2]; int maxIdx = -1; int secondIdx = -1; int maxValue = 0; int secondValue = 0; for (int i = 0; i < plays.length; i++) { if (genres[i].equals(str)) { if (secondValue < plays[i] && plays[i] <= maxValue) { secondValue = plays[i]; secondIdx = i; } else if (maxValue < plays[i]) { secondValue = maxValue; secondIdx = maxIdx; maxIdx = i; maxValue = plays[i]; } } } answerList.add(maxIdx); if(secondValue != 0) answerList.add(secondIdx); } answer = new int[answerList.size()]; int index = 0; for(int i : answerList) answer[index++] = i; return answer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testPerformance() {\n \t}", "private static float tock(){\n\t\treturn (System.currentTimeMillis() - startTime);\n\t}", "private static void testLongLoop() {\n test(1000 * 1000 * 1000);\n //uncomment the following line to see the hand-written cache performance\n //testManual( 1000 * 1000 * 1000 );\n }", "private static void testLongLoop() {\n test(1000 * 1000 * 1000);\n //uncomment the following line to see the hand-written cache performance\n //testManual( 1000 * 1000 * 1000 );\n }", "public static void basicTime(){\t\n\t\tint[] array;\n\t\t//Basic sort timings\n\t\tSystem.out.printf(\"%12s%10s%10s%10s%10s%10s%n\", \"Size\", \"Bubble\", \"Insertion\", \"Selection\", \"Quick\", \"Merge\");\n\t\t//1K\n\t\tarray = generateArray(1000, 0, 1000);\n\t\tallSorts(array);\n\t\t//5K\n\t\tarray = generateArray(5000, 0, 5000);\n\t\tallSorts(array);\n\t\t//10K\n\t\tarray = generateArray(10000, 0, 10000);\n\t\tallSorts(array);\n\t\t//50K\n\t\tarray = generateArray(50000, 0, 50000);\n\t\tallSorts(array);\n\t\t//100K\n\t\tSystem.out.printf(\"%12d%10s\",100000,\"N/A\");\n\t\tarray = generateArray(100000, 0, 100000);\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t\t//500K\n\t\tSystem.out.printf(\"%12d%10s\",500000,\"N/A\");\n\t\tarray = generateArray(500000, 0, 500000);\n\t\tfourSorts(array);\n\t\tSystem.out.println();\n\t\t//1M\n\t\tSystem.out.printf(\"%12d%10s%10s%10s\",1000000,\"N/A\", \"N/A\", \"N/A\");\n\t\tarray = generateArray(1000000, 0, 1000000);\n\t\t//Performs quick sort\n\t\tStopWatch1 timer;\n\t\tint[] temp;\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.quickSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\t\t\n\t\t\n\t\t//Performs merge sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.mergeSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\t\tSystem.out.println();\n\t\t//5M\n\t\tarray = generateArray(5000000, 0, 5000000);\n\t\tSystem.out.printf(\"%12d%10s%10s%10s\",5000000,\"N/A\", \"N/A\", \"N/A\");\n\t\t//Performs quick sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.quickSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\n\t\t//Performs merge sort\n\t\ttimer = new StopWatch1();\n\t\ttemp = copyArray(array);\n\t\ttimer.start();\n\t\tSort.mergeSort(temp);\n\t\ttimer.stop();\n\t\tSystem.out.printf(\"%10d\",timer.getElapsedTime());\n\t\tSystem.out.println();\n\t}", "@Override\n\tpublic int isFast() {\n\t\treturn 2;\n\t}", "@Override\r\n public long problem1(int size) {\r\n StringBuilder sb = new StringBuilder();\r\n long start = System.currentTimeMillis();\r\n for (int i=0; i<size; i++) {\r\n sb.append(i);\r\n }\r\n long end = System.currentTimeMillis();\r\n return end - start;\r\n }", "public static void main(String[] args) throws FileNotFoundException{\n int[] quicktimes1 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes1[i] = (int)endTime;\n }\n \n int[] mergetimes1 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes1[i] = (int)endTime;\n }\n \n int[] heaptimes1 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes1[i] = (int)endTime;\n }\n \n int[] quicktimes2 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[i] = j;\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes2[i] = (int)endTime;\n }\n \n int[] mergetimes2 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes2[i] = (int)endTime;\n }\n \n int[] heaptimes2 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes2[i] = (int)endTime;\n }\n \n int[] quicktimes3 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes3[i] = (int)endTime;\n }\n \n int[] mergetimes3 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes3[i] = (int)endTime;\n }\n \n int[] heaptimes3 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes3[i] = (int)endTime;\n }\n \n int[] quicktimes4 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes4[i] = (int)endTime;\n }\n \n int[] mergetimes4 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes4[i] = (int)endTime;\n }\n \n int[] heaptimes4 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes4[i] = (int)endTime;\n }\n \n \n //THESE WILL GENERATE THE MERGE/HEAP/QUICK SORT FOR THE REVERSE SORTED ARRAYS OF VARIOUS LENGTHS\n int[] quicktimes5 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes5[i] = (int)endTime;\n }\n \n int[] mergetimes5 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes5[i] = (int)endTime;\n }\n \n int[] heaptimes5 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes5[i] = (int)endTime;\n }\n \n int[] quicktimes6 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes6[i] = (int)endTime;\n }\n \n int[] mergetimes6 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes6[i] = (int)endTime;\n }\n \n int[] heaptimes6 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[10000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes6[i] = (int)endTime;\n }\n \n int[] quicktimes7 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes7[i] = (int)endTime;\n }\n \n int[] mergetimes7 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes7[i] = (int)endTime;\n }\n \n int[] heaptimes7 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[100000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes7[i] = (int)endTime;\n }\n \n int[] quicktimes8 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.quickSort(sarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes8[i] = (int)endTime;\n }\n \n int[] mergetimes8 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.mergeSort(sarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes8[i] = (int)endTime;\n }\n \n int[] heaptimes8 = new int[3];\n for (int i = 0; i < 3; i++){\n int[] sarray = new int[1000000];\n for (int j = 0; j < sarray.length; j++)\n sarray[j] = j;\n for(int k = 0; k < sarray.length / 2; k++){\n int temp = sarray[k];\n sarray[k] = sarray[sarray.length - k - 1];\n sarray[sarray.length - k - 1] = temp;\n }\n long startTime = System.nanoTime();\n Sorting.heapSort(sarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes8[i] = (int)endTime;\n }\n \n //THESE WILL GENERATE THE MERGE/HEAP/QUICK SORT FOR THE RANDOM ARRAYS OF VARIOUS LENGTHS\n int[] quicktimes9 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999);\n long startTime = System.nanoTime();\n Sorting.quickSort(rarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes9[i] = (int)endTime;\n }\n \n int[] mergetimes9 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999);\n long startTime = System.nanoTime();\n Sorting.mergeSort(rarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes9[i] = (int)endTime;\n }\n \n int[] heaptimes9 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999);\n long startTime = System.nanoTime();\n Sorting.heapSort(rarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes9[i] = (int)endTime;\n }\n \n int[] quicktimes10 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[10000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(9999);\n long startTime = System.nanoTime();\n Sorting.quickSort(rarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes10[i] = (int)endTime;\n }\n \n int[] mergetimes10 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[10000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(9999);\n long startTime = System.nanoTime();\n Sorting.mergeSort(rarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes10[i] = (int)endTime;\n }\n \n int[] heaptimes10 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[10000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(9999);\n long startTime = System.nanoTime();\n Sorting.heapSort(rarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes10[i] = (int)endTime;\n }\n \n int[] quicktimes11 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[100000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(99999);\n long startTime = System.nanoTime();\n Sorting.quickSort(rarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes11[i] = (int)endTime;\n }\n \n int[] mergetimes11 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[100000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(99999);\n long startTime = System.nanoTime();\n Sorting.mergeSort(rarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes11[i] = (int)endTime;\n }\n \n int[] heaptimes11 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[100000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(99999);;\n long startTime = System.nanoTime();\n Sorting.heapSort(rarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes11[i] = (int)endTime;\n }\n \n int[] quicktimes12 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999999);\n long startTime = System.nanoTime();\n Sorting.quickSort(rarray);\n long endTime = System.nanoTime() - startTime;\n quicktimes12[i] = (int)endTime;\n }\n \n int[] mergetimes12 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999999);\n long startTime = System.nanoTime();\n Sorting.mergeSort(rarray);\n long endTime = System.nanoTime() - startTime;\n mergetimes12[i] = (int)endTime;\n }\n \n int[] heaptimes12 = new int[10];\n for (int i = 0; i < 10; i++){\n int[] rarray = new int[1000000];\n Random rand = new Random(i);\n for (int j = 0; j < rarray.length; j++)\n rarray[j] = rand.nextInt(999999);\n long startTime = System.nanoTime();\n Sorting.heapSort(rarray);\n long endTime = System.nanoTime() - startTime;\n heaptimes12[i] = (int)endTime;\n }\n \n //PRINTING THE RESULTS OUT INTO FILE\n File f = new File(\"Results.txt\");\n FileOutputStream fos = new FileOutputStream(f);\n PrintWriter pw = new PrintWriter(fos);\n pw.println(\"SORTED ARRAYS TIMES:\");\n pw.printf(\"1000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes1), medVal(quicktimes1), varVal(quicktimes1, meanVal(quicktimes1)));\n pw.printf(\"10000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes2), medVal(quicktimes2), varVal(quicktimes2, meanVal(quicktimes2)));\n pw.printf(\"100000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes3), medVal(quicktimes3), varVal(quicktimes3, meanVal(quicktimes3)));\n pw.printf(\"1000000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes4), medVal(quicktimes4), varVal(quicktimes4, meanVal(quicktimes4)));\n pw.printf(\"1000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes1), medVal(mergetimes1), varVal(mergetimes1, meanVal(mergetimes1)));\n pw.printf(\"10000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes2), medVal(mergetimes2), varVal(mergetimes2, meanVal(mergetimes2)));\n pw.printf(\"100000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes3), medVal(mergetimes3), varVal(mergetimes3, meanVal(mergetimes3)));\n pw.printf(\"1000000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes4), medVal(mergetimes4), varVal(mergetimes4, meanVal(mergetimes4)));\n pw.printf(\"1000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes1), medVal(heaptimes1), varVal(heaptimes1, meanVal(heaptimes1)));\n pw.printf(\"10000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes2), medVal(heaptimes2), varVal(heaptimes2, meanVal(heaptimes2)));\n pw.printf(\"100000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes3), medVal(heaptimes3), varVal(heaptimes3, meanVal(heaptimes3)));\n pw.printf(\"1000000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes4), medVal(heaptimes4), varVal(heaptimes4, meanVal(heaptimes4)));\n pw.println(\"REVERSE SORTED ARRAYS TIMES:\");\n pw.printf(\"1000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes5), medVal(quicktimes5), varVal(quicktimes5, meanVal(quicktimes5)));\n pw.printf(\"10000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes6), medVal(quicktimes6), varVal(quicktimes6, meanVal(quicktimes6)));\n pw.printf(\"100000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes7), medVal(quicktimes7), varVal(quicktimes7, meanVal(quicktimes7)));\n pw.printf(\"1000000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes8), medVal(quicktimes8), varVal(quicktimes8, meanVal(quicktimes8)));\n pw.printf(\"1000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes5), medVal(mergetimes5), varVal(mergetimes5, meanVal(mergetimes5)));\n pw.printf(\"10000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes6), medVal(mergetimes6), varVal(mergetimes6, meanVal(mergetimes6)));\n pw.printf(\"100000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes7), medVal(mergetimes7), varVal(mergetimes7, meanVal(mergetimes7)));\n pw.printf(\"1000000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes8), medVal(mergetimes8), varVal(mergetimes8, meanVal(mergetimes8)));\n pw.printf(\"1000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes5), medVal(heaptimes5), varVal(heaptimes5, meanVal(heaptimes5)));\n pw.printf(\"10000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes6), medVal(heaptimes6), varVal(heaptimes6, meanVal(heaptimes6)));\n pw.printf(\"100000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes7), medVal(heaptimes7), varVal(heaptimes7, meanVal(heaptimes7)));\n pw.printf(\"1000000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes8), medVal(heaptimes8), varVal(heaptimes8, meanVal(heaptimes8)));\n pw.println(\"RANDOM ARRAYS TIMES:\");\n pw.printf(\"1000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes9), medVal(quicktimes9), varVal(quicktimes9, meanVal(quicktimes9)));\n pw.printf(\"10000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes10), medVal(quicktimes10), varVal(quicktimes10, meanVal(quicktimes10)));\n pw.printf(\"100000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes11), medVal(quicktimes11), varVal(quicktimes11, meanVal(quicktimes11)));\n pw.printf(\"1000000 Quick Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(quicktimes12), medVal(quicktimes12), varVal(quicktimes12, meanVal(quicktimes12)));\n pw.printf(\"1000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes9), medVal(mergetimes9), varVal(mergetimes9, meanVal(mergetimes9)));\n pw.printf(\"10000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes10), medVal(mergetimes10), varVal(mergetimes10, meanVal(mergetimes10)));\n pw.printf(\"100000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes11), medVal(mergetimes11), varVal(mergetimes11, meanVal(mergetimes11)));\n pw.printf(\"1000000 Merge Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(mergetimes12), medVal(mergetimes12), varVal(mergetimes12, meanVal(mergetimes12)));\n pw.printf(\"1000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes9), medVal(heaptimes9), varVal(heaptimes9, meanVal(heaptimes9)));\n pw.printf(\"10000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes10), medVal(heaptimes10), varVal(heaptimes10, meanVal(heaptimes10)));\n pw.printf(\"100000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes11), medVal(heaptimes11), varVal(heaptimes11, meanVal(heaptimes11)));\n pw.printf(\"1000000 Heap Sort: Mean = %f, Median = %f, Variance = %f%n\", meanVal(heaptimes12), medVal(heaptimes12), varVal(heaptimes12, meanVal(heaptimes12)));\n pw.close();\n }", "@Override\r\n public long problem2() {\r\n ArrayList<String> arrList = new ArrayList<>();\r\n long start = System.currentTimeMillis(); \r\n for(int i = 0; i<1234567; i++){\r\n arrList.add(Integer.toString(i));\r\n }\r\n long end = System.currentTimeMillis(); \r\n return end - start; \r\n }", "private static int benchmarkedMethod() {\n return 3;\n }", "private void m128168k() {\n C42962b.f111525a.mo104671a(\"upload_page_duration\", C22984d.m75611a().mo59971a(\"first_selection_duration\", System.currentTimeMillis() - this.f104209S).mo59971a(\"page_stay_duration\", System.currentTimeMillis() - this.f104208R).f60753a);\n }", "int checkElapsedTime(){\r\n\t\treturn gc.getElapsedTime();\r\n\t}", "protected int getTimesOptimized()\r\n {\r\n return timesOptimized;\r\n }", "private static byte[] m2539e(Context context) {\n Throwable th;\n int i = 0;\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n byte[] bArr = new byte[0];\n String a = Log.m2547a(context, Log.f1857e);\n DiskLruCache diskLruCache = null;\n try {\n diskLruCache = DiskLruCache.m2767a(new File(a), 1, 1, 10240);\n File file = new File(a);\n if (file != null && file.exists()) {\n String[] list = file.list();\n int length = list.length;\n while (i < length) {\n String str = list[i];\n if (str.contains(\".0\")) {\n byteArrayOutputStream.write(StatisticsManager.m2535a(diskLruCache, str.split(\"\\\\.\")[0]));\n }\n i++;\n }\n }\n bArr = byteArrayOutputStream.toByteArray();\n if (byteArrayOutputStream != null) {\n try {\n byteArrayOutputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if (diskLruCache != null) {\n try {\n diskLruCache.close();\n } catch (Throwable th2) {\n th = th2;\n }\n }\n } catch (IOException th3) {\n BasicLogHandler.m2542a(th3, \"StatisticsManager\", \"getContent\");\n if (byteArrayOutputStream != null) {\n try {\n byteArrayOutputStream.close();\n } catch (IOException e2) {\n e2.printStackTrace();\n }\n }\n if (diskLruCache != null) {\n diskLruCache.close();\n }\n } catch (Throwable th4) {\n th3 = th4;\n }\n return bArr;\n th3.printStackTrace();\n return bArr;\n }", "@Override\r\n\tpublic double getSlowness() {\n\t\treturn 10;\r\n\t}", "@SuppressWarnings(\"PMD\") // this will end up in unit tests soon\n\tpublic static void main(String[] args) throws IOException\n\t{\n\t\t/*\n\t\tbyte[] data = new byte[1024 * 1024];\n\t\tfor(int i = 0; i < data.length; i++)\n\t\t{\n\t\t\tdata[i] = (byte) i;\n\t\t}\n\t\t*/\n\t\t//byte[] data = DataUtils.randomData(1024 * 1024);\n\t\t//ByteArrayInputStream in = new ByteArrayInputStream(data);\n\t\tFile oldFile = new File(\"../test-4mb-old.dat\"); // also test.dat - 1 GB\n\t\tFile newFile = new File(\"../test-4mb-new.dat\");\n\t\t\n\t\tFileInputStream in = new FileInputStream(oldFile);\n\t\tObjectArrayList<Block> blocks = calculateBlocks(in, 1024);\n\t\tin.close();\n\t\t\n\t\tin = new FileInputStream(newFile);\n\t\t//in.reset();\n\t\tlong start = System.currentTimeMillis();\n\t\tcalculateDifferences(blocks, 1024, in, new NullDifferenceListener());\n\t\tlong end = System.currentTimeMillis();\n\t\tin.close();\n\t\t\n\t\tlong millis = end - start;\n\t\tdouble seconds = millis / 1000.0;\n\t\tdouble millisPer = millis / (double) (1024*1024*1024);\n\t\tdouble secondsPer = millisPer / 1000.0;\n\t\tSystem.out.printf(\"Completed in %.4f seconds (%d milliseconds) - average %f seconds (%f milliseconds) per byte%n\", seconds, millis, secondsPer, millisPer);\n\t}", "public long problem2b(){\r\n LinkedList<String> linkList = new LinkedList<>();\r\n long start = System.currentTimeMillis(); \r\n for(int i = 0; i<1234567; i++){\r\n linkList.add(Integer.toString(i));\r\n }\r\n long end = System.currentTimeMillis();\r\n return end - start; \r\n }", "public static void main(String[] args) {\n\t\t\n\t\tint A[]= new int[100000000];\n\t\tfor(int i = 0; i < 100000000; i++) {\n\t\t A[i] = (int)(Math.random() * 100) + 1;\n }\n double duration = 0;\n long end = 0;\n long start = 0;\n start = System.currentTimeMillis();\n System.out.println(start);\n MinValueIndex(A, 6);\n end = System.currentTimeMillis();\n\t\tduration = end-start;\n\t\tSystem.out.println(end); \n\t\tduration = duration / 5;\n\t\tSystem.out.println(duration);\n\t}", "private void updateNetworkSpeed() {\n Message obtain = Message.obtain();\n obtain.what = 200000;\n long j = 0;\n if (isDemoOrDrive() || this.mDisabled || !this.mIsNetworkConnected) {\n obtain.arg1 = 0;\n this.mHandler.removeMessages(200000);\n this.mHandler.sendMessage(obtain);\n this.mLastTime = 0;\n this.mTotalBytes = 0;\n return;\n }\n long currentTimeMillis = System.currentTimeMillis();\n long totalByte = getTotalByte();\n if (totalByte == 0) {\n this.mLastTime = 0;\n this.mTotalBytes = 0;\n totalByte = getTotalByte();\n }\n long j2 = this.mLastTime;\n if (j2 != 0 && currentTimeMillis > j2) {\n long j3 = this.mTotalBytes;\n if (!(j3 == 0 || totalByte == 0 || totalByte <= j3)) {\n j = ((totalByte - j3) * 1000) / (currentTimeMillis - j2);\n }\n }\n obtain.arg1 = 1;\n obtain.obj = Long.valueOf(j);\n this.mHandler.removeMessages(200000);\n this.mHandler.sendMessage(obtain);\n this.mLastTime = currentTimeMillis;\n this.mTotalBytes = totalByte;\n postUpdateNetworkSpeedDelay((long) this.mNetworkUpdateInterval);\n }", "public abstract long mo9746k();", "public final long mo28817a(zzjq zzjq) throws IOException {\n zzjq zzjq2;\n Long l;\n zzjq zzjq3 = zzjq;\n String str = \"ms\";\n String str2 = \"Cache connection took \";\n if (!this.f25218b) {\n this.f25218b = true;\n zzvv a = zzvv.m31316a(zzjq3.f28690a);\n if (!((Boolean) zzyt.m31536e().mo29599a(zzacu.f24194wd)).booleanValue()) {\n zzvs zzvs = null;\n if (a != null) {\n a.f29558h = zzjq3.f28692c;\n zzvs = zzk.zzlm().mo32314a(a);\n }\n if (zzvs != null && zzvs.mo32317a()) {\n this.f25217a = zzvs.mo32318c();\n return -1;\n }\n } else if (a != null) {\n a.f29558h = zzjq3.f28692c;\n if (a.f29557g) {\n l = (Long) zzyt.m31536e().mo29599a(zzacu.f24206yd);\n } else {\n l = (Long) zzyt.m31536e().mo29599a(zzacu.f24200xd);\n }\n long longValue = l.longValue();\n long a2 = zzk.zzln().mo27934a();\n zzk.zzma();\n Future a3 = zzwi.m31330a(this.f25219c, a);\n try {\n this.f25217a = (InputStream) a3.get(longValue, TimeUnit.MILLISECONDS);\n long a4 = zzk.zzln().mo27934a() - a2;\n zzbei zzbei = (zzbei) this.f25221e.get();\n if (zzbei != null) {\n zzbei.mo28180a(true, a4);\n }\n StringBuilder sb = new StringBuilder(44);\n sb.append(str2);\n sb.append(a4);\n sb.append(str);\n zzawz.m26003f(sb.toString());\n return -1;\n } catch (ExecutionException | TimeoutException e) {\n a3.cancel(true);\n long a5 = zzk.zzln().mo27934a() - a2;\n zzbei zzbei2 = (zzbei) this.f25221e.get();\n if (zzbei2 != null) {\n zzbei2.mo28180a(false, a5);\n }\n StringBuilder sb2 = new StringBuilder(44);\n sb2.append(str2);\n sb2.append(a5);\n sb2.append(str);\n zzawz.m26003f(sb2.toString());\n } catch (InterruptedException e2) {\n a3.cancel(true);\n Thread.currentThread().interrupt();\n long a6 = zzk.zzln().mo27934a() - a2;\n zzbei zzbei3 = (zzbei) this.f25221e.get();\n if (zzbei3 != null) {\n zzbei3.mo28180a(false, a6);\n }\n StringBuilder sb3 = new StringBuilder(44);\n sb3.append(str2);\n sb3.append(a6);\n sb3.append(str);\n zzawz.m26003f(sb3.toString());\n } catch (Throwable th) {\n long a7 = zzk.zzln().mo27934a() - a2;\n zzbei zzbei4 = (zzbei) this.f25221e.get();\n if (zzbei4 != null) {\n zzbei4.mo28180a(false, a7);\n }\n StringBuilder sb4 = new StringBuilder(44);\n sb4.append(str2);\n sb4.append(a7);\n sb4.append(str);\n zzawz.m26003f(sb4.toString());\n throw th;\n }\n }\n if (a != null) {\n zzjq2 = new zzjq(Uri.parse(a.f29551a), zzjq3.f28691b, zzjq3.f28692c, zzjq3.f28693d, zzjq3.f28694e, zzjq3.f28695f);\n } else {\n zzjq2 = zzjq3;\n }\n return this.f25220d.mo28817a(zzjq2);\n }\n throw new IOException(\"Attempt to open an already open CacheDataSource.\");\n }", "public static void main(String[] args) {\n long startTime, endTime;\n Scanner in = new Scanner(System.in);\n long ScannerAVG[] = new long[timesToRun];\n long BWAVG[] = new long[timesToRun];\n long ScannerTotal = 0, BWTotal = 0, BWAVGI = 0, ScannerAVGI = 0;\n\n System.out.println(\"Benchmark Progress:\\n0% [Scanner] || [BufferedReader] 100%\");\n System.out.print(\"[\");\n for (int i = 0; i < timesToRun; i++) {\n startTime = System.nanoTime();\n ScannerRead();\n endTime = System.nanoTime();\n ScannerAVG[i] = (endTime-startTime)/1000;\n ScannerTotal = ScannerTotal + ScannerAVG[i];\n if (i % (timesToRun/25) == 0)\n System.out.print(\"=\");\n System.gc(); // FINALLY DOESN'T USE 6.5GB OF MEMORY\n }\n for (int i = 0; i < timesToRun; i++) {\n startTime = System.nanoTime();\n BufferedRead();\n endTime = System.nanoTime();\n BWAVG[i] = (endTime-startTime)/1000;\n BWTotal = BWTotal + BWAVG[i];\n if (i % (timesToRun/25) == 0)\n System.out.print(\"=\");\n System.gc();\n }\n System.out.println(\"]\\n\\n\");\n\n BWAVGI = BWTotal / timesToRun;\n ScannerAVGI = ScannerTotal / timesToRun;\n\n System.out.println(\"Scanner average time to run with \" + timesToRun + \" iterations (µs):\" + ScannerAVGI);\n System.out.println(\"BufferedReader average time to run with \" + timesToRun + \" iterations (µs):\" + BWAVGI);\n long score = 10000 - (ScannerAVGI+BWAVGI)/2;\n System.out.println(\"Score (higher is better): \" + score);\n }", "long memoryUsed();", "public static void concurrency() {\n List<String> words = new ArrayList<>();\n for (int i = 0; i < 500000; i++)\n words.add(UUID.randomUUID().toString());\n\n //Groups the list into a map of strings by length in serial\n long t2s = System.nanoTime();\n Map<Integer, List<String>> a = words.stream()\n .collect(Collectors.groupingBy(String::length));\n long t2d = System.nanoTime() - t2s;\n\n //Groups the list into a map of strings by length in parallel\n long t1s = System.nanoTime();\n ConcurrentMap<Integer, List<String>> b = words.parallelStream()\n .collect(Collectors.groupingByConcurrent(String::length));\n long t1d = System.nanoTime() - t1s;\n\n System.out.println(\"Collect Serial time : \" + t2d);\n System.out.println(\"Collect Parallel time : \" + t1d);\n }", "private void d() {\n Queue<c> queue;\n Queue<c> queue2 = queue = i;\n synchronized (queue2) {\n long l2 = System.currentTimeMillis();\n Iterator iterator = i.iterator();\n while (iterator.hasNext()) {\n if (l2 - ((c)iterator.next()).a < 60000L) continue;\n iterator.remove();\n }\n if (i.size() >= 15) {\n for (int i2 = 0; i2 < 5; ++i2) {\n i.remove();\n }\n }\n return;\n }\n }", "@Benchmark\n public void testJMH(@SuppressWarnings(\"unused\") GraalState s) {\n }", "public long estimateSize() {\n/* 1448 */ return this.est;\n/* */ }", "public static void speedup(){\n\t\tif(bossair.periodairinit > Framework.nanosecond){\n\t\t\t\tbossair.periodair-=Framework.nanosecond/18; \n\t\t\t\tbossair.xmoving-=0.03; \n\t\t}\n\t\t\t\n\t}", "public static void s1DescendingTest() {\n int key = 903836722;\n SortingLab<Integer> sli = new SortingLab<Integer>(key);\n int M = 600000;\n int N = 1000;\n double start;\n double elapsedTime;\n System.out.print(\"Sort 1 Descending\\n\");\n for (; N < M; N *= 2) {\n Integer[] ai = getRandomArray(N, Integer.MAX_VALUE);\n Arrays.sort(ai);\n Integer[] bi = new Integer[ai.length];\n int count = 0;\n for (int i = ai.length - 1; i >= 0; i--) {\n bi[count] = ai[i];\n count++;\n }\n start = System.nanoTime();\n sli.sort1(bi);\n elapsedTime = (System.nanoTime() - start) / 1_000_000_000d;\n System.out.print(N + \"\\t\");\n System.out.printf(\"%4.3f\\n\", elapsedTime);\n }\n }", "@Override\r\n public long problem0(int size) {\r\n System.out.println(\"This is just an example, but please follow this template.\");\r\n String s = \"\";\r\n long start = System.currentTimeMillis();\r\n\r\n for (int i=0; i<size; i++) {\r\n s = s + i;\r\n }\r\n \r\n long end = System.currentTimeMillis();\r\n return end - start;\r\n }", "public void measure(){\n \tend = System.nanoTime(); \n \tlong elapsedTime = end - start;\n\n \t//convert to seconds \n \tseconds = (double)elapsedTime / 1000000000.0f;\n \tend =0; //歸零\n \tstart =0;\n }", "long memoryUnused();", "private boolean slowEquals(byte[] a, byte[] b)\n {\n int diff = a.length ^ b.length;\n for(int i = 0; i < a.length && i < b.length; i++)\n diff |= a[i] ^ b[i];\n return diff == 0;\n }", "private static void speedup(String [] args){\n\t\t\n\t\tint warningCnt = 0;\n\t\t\n\t\tString applicationPath = convertApplication(args[2], null);\n\t\tConfMan baseConfigManager;\n\t\t\n\n\n\n\n\t\tbaseConfigManager = new ConfMan(args[1], applicationPath, false);\n\t\tConfMan[] cms;\n\t\t\n\t\tSweepConfig sweepConfig = new SweepConfig(baseConfigManager, \"config/sweep/cacheSpeedupSweep.json\",true);\n//\t\tSweepConfig sweepConfig = new SweepConfig(baseConfigManager, \"config/sweep/speedupSweep.json\",true);\n\n\t\tcms = sweepConfig.getConfManager();\n\t\tString[] configNames = sweepConfig.getSweepConfigurations();\n//\t\tString[] speedupIdentifier = sweepConfig.getSpeedupIdentifier();\n//\t\tboolean[] isShortTest = sweepConfig.getIsShortTest();\n\n\t\tTrace speedupTrace = new Trace(System.out, System.in, \"\", \"\");\n\t\tspeedupTrace.setPrefix(\"basic config\");\n\t\tbaseConfigManager.printConfig(speedupTrace);\n\n\t\tspeedupTrace.setPrefix(\"speedup\");\n\t\t\n//\t\tLinkedHashMap<String, SpeedupMeasurementResult> speedupResults = new LinkedHashMap<>();\n\t\tMeasurementResult[] measurementResults = new MeasurementResult[cms.length];\n\t\tLinkedHashMap<String, BaseLineStorage> baseLineStorage = new LinkedHashMap<String, BaseLineStorage>();\n\t\t\n//\t\tAmidarSimulationResult[] results = parallelRemoteSimulation(sweepConfig, \"trav\", 1099, 8, speedupTrace);\n\t\t\n\t\tdouble overhead = 0;\n\t\tint transmission = 0;\n\t\tint run = 0;\n\t\tdouble overheadCnt = 0;\n\t\t\n\n\t\t////////////////////////// SIMULATE //////////////////////////////////////////////\n\t\tfor(int i = 0; i<cms.length; i++){\n\t\t\t\n\t\t\t/////// FIRST SHORT /////////////////////////////\n\t\t\tConfMan conf = cms[i];\n\t\t\t\n\t\t\tboolean isShort = true;\n\t\t\tString appBaseName = conf.getApplicationPath();\n\t\t\tString [] appBasePath = appBaseName.split(\"/\");\n\t\t\t\n\t\t\t\n\t\t\tconf.setApplication(\"../axt/\" + appBaseName+ \"_short/\" + appBasePath[appBasePath.length-1] + \"_short.axt\");\n\n\t\t\tMeasurementResult speedupRes = measurementResults[i];\n\t\t\tif(speedupRes == null){\n\t\t\t\tspeedupRes = new MeasurementResult();\n\t\t\t\tmeasurementResults[i] = speedupRes;\n\t\t\t}\n\t\t\t\n\t\t\tString app = conf.getApplicationPath();\n\t\t\tint benchmarkScale = conf.getBenchmarkScale();\n\t\t\tapp = app+\"-benchMarkScale-\"+benchmarkScale;\n\t\t\t\n\t\t\tspeedupTrace.printTableHeader(\"Running: \" + configNames[i] + \" SHORT\");\n\t\t\tif(!baseLineStorage.containsKey(app)){\n\t\t\t\tbaseLineStorage.put(app, new BaseLineStorage());\n\t\t\t}\n\t\t\t\n\t\t\tBaseLineStorage baseLine = baseLineStorage.get(app);\n \t\t\t\n\t\t\tif(!baseLine.isBaselineAvailable(isShort)){\n\t\t\t\tspeedupTrace.println(\"Running without synthesis...\");\n\t\t\t\tAmidarSimulationResult currentRes = run(conf, null, false);\n\t\t\t\tspeedupRes.addBaseline(currentRes, isShort);\n\t\t\t\tbaseLine.addBaseLine(isShort, currentRes);\n\t\t\t} else {\n\t\t\t\tspeedupRes.addBaseline(baseLine.getBaseLine(isShort), isShort);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tAmidarSimulationResult currentResult = null;\n\t\t\tconf.setSynthesis(true);\n\t\t\tspeedupTrace.println(\"Running with synthesis...\");\n\t\t\ttry{\n\t\t\t\tcurrentResult = run(conf, null, false);\n\t\t\t} catch(AmidarSimulatorException e ){\n\t\t\t\tspeedupTrace.println(\"WARNING: Aliasing speculation failed. Switching of speculation and repeat...\");\n\t\t\t\twarningCnt++;\n\t\t\t\tconf.getSynthesisConfig().put(\"ALIASING_SPECULATION\", AliasingSpeculation.OFF);\n\t\t\t\tcurrentResult = run(conf, null, false);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n//\t\t\tif(isShort){\n//\t\t\t\tHashMap<String, Integer> stateCNT = currentResult.getCgraStateCount();\n//\t\t\t\tdouble transmissionCnt = stateCNT.get(\"SEND\") + stateCNT.get(\"REC\") +stateCNT.get(\"WAIT\");\n//\t\t\t\tdouble runCnt = stateCNT.get(\"RUN\");\n//\t\t\t\t\n//\t\t\t\tdouble overheadCurrent = transmissionCnt/(transmissionCnt + runCnt);\n//\t\t\t\t\n//\t\t\t\toverhead += overheadCurrent;\n//\t\t\t\ttransmission +=transmissionCnt;\n//\t\t\t\trun += runCnt;\n//\t\t\t\toverheadCnt++;\n//\t\t\t}\n\t\t\t\n\t\t\tspeedupRes.addResults(currentResult, isShort);\n\t\t\t\n\t\t\t/////// THEN LONG /////////////////////////////\n\t\t\t\n\t\t\tisShort = false;\n\t\t\tconf.setApplication(\"../axt/\" + appBaseName+ \"_long/\" + appBasePath[appBasePath.length-1] + \"_long.axt\");\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tspeedupTrace.printTableHeader(\"Running: \" + configNames[i] + \" LONG\");\n\t\t\tif(!baseLine.isBaselineAvailable(isShort)){\n\t\t\t\tconf.setSynthesis(false);\n\t\t\t\tspeedupTrace.println(\"Running without synthesis...\");\n\t\t\t\tAmidarSimulationResult currentRes = run(conf, null, false);\n\t\t\t\tspeedupRes.addBaseline(currentRes, isShort);\n\t\t\t\tbaseLine.addBaseLine(isShort, currentRes);\n\t\t\t} else {\n\t\t\t\tspeedupRes.addBaseline(baseLine.getBaseLine(isShort), isShort);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tconf.setSynthesis(true);\n\t\t\tspeedupTrace.println(\"Running with synthesis...\");\n\t\t\ttry{\n\t\t\t\tcurrentResult = run(conf, null, false);\n\t\t\t} catch(AmidarSimulatorException e ){\n\t\t\t\tspeedupTrace.println(\"WARNING: Aliasing speculation failed. Switching of speculation and repeat...\");\n\t\t\t\twarningCnt++;\n\t\t\t\tconf.getSynthesisConfig().put(\"ALIASING_SPECULATION\", AliasingSpeculation.OFF);\n\t\t\t\tcurrentResult = run(conf, null, false);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n//\t\t\tif(isShort){\n//\t\t\t\tHashMap<String, Integer> stateCNT = currentResult.getCgraStateCount();\n//\t\t\t\tdouble transmissionCnt = stateCNT.get(\"SEND\") + stateCNT.get(\"REC\") +stateCNT.get(\"WAIT\");\n//\t\t\t\tdouble runCnt = stateCNT.get(\"RUN\");\n//\t\t\t\t\n//\t\t\t\tdouble overheadCurrent = transmissionCnt/(transmissionCnt + runCnt);\n//\t\t\t\t\n//\t\t\t\toverhead += overheadCurrent;\n//\t\t\t\ttransmission +=transmissionCnt;\n//\t\t\t\trun += runCnt;\n//\t\t\t\toverheadCnt++;\n//\t\t\t}\n\t\t\t\n\t\t\tspeedupRes.addResults(currentResult, isShort);\n\t\t}\n\t\t////////////////////////SIMULATE END//////////////////////////////////////////////\n\n\t\tspeedupTrace.printTableHeader(\"Speedup\");\n\t\t\n\t\tDecimalFormatSymbols symbols = new DecimalFormatSymbols();\n\t\tsymbols.setGroupingSeparator(',');\n\t\tsymbols.setDecimalSeparator('.');\n\t\tDecimalFormat formater = new DecimalFormat(\"#0.000\", symbols);\n\t\t\n\t\t\n\t\t/// GATHER INFORMATION //////////////////////////////////////////\n\t\t\n\t\tdouble[] speedupList = new double[cms.length];\n\t\tdouble[] communicationOverhead = new double[cms.length];\n\t\tdouble[] dmaOverhead = new double[cms.length];\n\t\tdouble[] l1usage = new double[cms.length];\n\t\tdouble[] l2usage = new double[cms.length];\n\t\tdouble[] averageMemTime = new double[cms.length];\n\t\t\n\t\tdouble[][] blockTimesPrefetch = new double[TaskType.values().length][cms.length];\n\t\tdouble[][] blockTimesRegular = new double[TaskType.values().length][cms.length];\n\t\t\n\t\tint[] nrOfContexts = new int[cms.length];\n\t\tint[] nrOfL1Prefetches = new int[cms.length];\n\t\tint[] nrOfL2Prefetches = new int[cms.length];\n\t\tint[] nrOfUsedL1Prefetches = new int[cms.length];\n\t\tint[] nrOfUsedL2Prefetches = new int[cms.length];\n\t\t\n\t\tint[] nrOfHandledPrefetchRequests = new int[cms.length];\n\t\tint[] nrOfHandledPrefetchRequestsAlreadyAvailable = new int[cms.length];\n\t\t\n\t\tint[] cachelineFills = new int[cms.length];\n\t\tlong[] synthTime = new long[cms.length];\n\t\t\n\t\tfor(int i = 0; i < measurementResults.length; i++){\n\t\t\tString res = \"Speedup of \" + configNames[i] + \"\\t\";\n\t\t\tdouble speedup = measurementResults[i].getSpeedup();\n\t\t\tspeedupList[i] = speedup;\n\t\t\tres = res + \": \" + formater.format(speedup);\n\t\t\tspeedupTrace.println(res);\n\t\t\t\n\t\t\tcommunicationOverhead[i] = measurementResults[i].getCommunicationOverhead();\n\t\t\tdmaOverhead[i] = measurementResults[i].getDMAOverhead();\n\t\t\tl1usage[i]= measurementResults[i].getL1Usage();\n\t\t\tl2usage[i]= measurementResults[i].getL2Usage();\n\t\t\taverageMemTime[i] = measurementResults[i].getAverageMemoryAccessTime();\n\t\t\tfor(TaskType tt: TaskType.values()){\n\t\t\t\tblockTimesPrefetch[tt.ordinal()][i] = measurementResults[i].getBlockTimesInPercent(RequestType.Prefetch, tt);\n//\t\t\t\tSystem.out.println(\"\\tBlocktime Pref\" +tt + \":\\t\" +blockTimesPrefetch[tt.ordinal()][i]);\n\t\t\t\tblockTimesRegular[tt.ordinal()][i] = measurementResults[i].getBlockTimesInPercent(RequestType.Regular, tt);\n//\t\t\t\tSystem.out.println(\"\\tBlocktime Regu\" +tt + \":\\t\" +blockTimesRegular[tt.ordinal()][i]);\n \t\t\t}\n\t\t\tnrOfContexts[i] = measurementResults[i].getNrOfContexts();\n\t\t\tnrOfL1Prefetches[i] = measurementResults[i].getNrOfL1Prefetches();\n\t\t\tnrOfUsedL1Prefetches[i] = measurementResults[i].getNrOfUsedL1Prefetches();\n\t\t\tnrOfHandledPrefetchRequests[i] = measurementResults[i].getNrOfHandledPrefetchRequests();\n\t\t\tnrOfHandledPrefetchRequestsAlreadyAvailable[i] = measurementResults[i].getNrOfHandledPrefetchRequestsAlreadyAvailable();\n\t\t\tcachelineFills[i] = measurementResults[i].getCachelineFills();\n\t\t\tsynthTime[i] = measurementResults[i].getSynthTime();\n\t\t}\n\t\t///// PLOT INFORMATION //////////////////////////////////////////////\n\t\tSweepResultPlotter plotter = new SweepResultPlotter();\n//\t\tplotter.configurePlotter( \"UNROLL\", \"\", true);\n\t\tLinkedHashMap<String, LinkedHashSet<String>> sweepInfo = sweepConfig.getSweepInfo();\n\t\t\n\t\tString path = \"log/sweep\"+new Date().toString();\n\t\tplotter.setPath(path);\n\t\tplotter.saveSweepInfo(sweepInfo);\n\t\t\n\t\tplotter.saveResults(speedupList,\"speedup\");\n\t\tplotter.saveResults(communicationOverhead, \"communicationOverhead\");\n\t\tplotter.saveResults(dmaOverhead, \"dmaOverhead\");\n\t\tplotter.saveResults(l1usage,\"l1usage\");\n\t\tplotter.saveResults(l2usage, \"l2usage\");\n\t\tplotter.saveResults(averageMemTime, \"memTime\");\n\t\tplotter.saveResults(nrOfContexts, \"contexts\");\n\t\tplotter.saveResults(nrOfL1Prefetches, \"l1prefetches\");\n\t\tplotter.saveResults(nrOfUsedL1Prefetches, \"usedL1prefetches\");\n\t\tplotter.saveResults(nrOfHandledPrefetchRequests, \"handledPrefetchRequests\");\n\t\tplotter.saveResults(nrOfHandledPrefetchRequestsAlreadyAvailable, \"handledPrefetchRequestsAvail\");\n\t\tplotter.saveResults(cachelineFills, \"cachelineFills\");\n\t\tplotter.saveResults(synthTime, \"Synthtime\");\n\t\t\n\t\t\n//\t\tfor(TaskType tt: TaskType.values()){\n//\t\t\t\n//\t\t}\n\t\t\n\t\t///// PRINT ON CONSOLE ///////////////////////////////\n\t\tspeedupTrace.printTableHeader(\"Average Speedup\");\n\t\tplotter.plot(sweepInfo, speedupList, speedupTrace,\"log/\", \"\");\n\t\t\n\t\tif(warningCnt > 1){\n\t\t\tspeedupTrace.println(warningCnt + \" Warnings\");\n\t\t} else if(warningCnt == 1){\n\t\t\tspeedupTrace.println(\"1 Warning\");\n\t\t}\n\t\t\n//\t\tspeedupTrace.println(\"CGRA transmission overhead in Percent: \" + formater.format(overhead*100/overheadCnt) + \" Ticks Running: \" + (int)(run/overheadCnt+0.5) + \" Ticks Transmitting: \" + (int)(transmission/overheadCnt+0.5));\n\t\t\n\t\t\n//\t\tspeedupTrace.println(ObjectHistory.indep*100/(ObjectHistory.indep+ObjectHistory.dep)+\"% of all memory accesses are independant\");\n//\n//\t\t\n\t\tspeedupTrace.printTableHeader(\"Average Communication Overhead\");\n\t\tplotter.plot(sweepConfig.getSweepInfo(), communicationOverhead, speedupTrace, null, \"\");\n\t\tspeedupTrace.printTableHeader(\"Average DMA Overhead\");\n\t\tplotter.plot(sweepConfig.getSweepInfo(), dmaOverhead, speedupTrace, null, \"\");\n\t\tspeedupTrace.printTableHeader(\"Memtime\");\n\t\tplotter.plot(sweepConfig.getSweepInfo(), averageMemTime, speedupTrace, null, \"\");\n\t\t\n\t\tdouble[] cffd = new double[cachelineFills.length];\n\t\tfor(int i = 0; i < cffd.length; i++){\n\t\t\tcffd[i] = cachelineFills[i];\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tspeedupTrace.printTableHeader(\"Cacheline fills\");\n\t\tplotter.plot(sweepConfig.getSweepInfo(), cffd, speedupTrace, null, \"\");\n\t\t\n\t\tdouble[] stdd = new double[synthTime.length];\n\t\tfor(int i = 0; i < stdd.length; i++){\n\t\t\tstdd[i] = synthTime[i];\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tspeedupTrace.printTableHeader(\"Synth time\");\n\t\tplotter.plot(sweepConfig.getSweepInfo(), stdd, speedupTrace, null, \"\");\n\t\t\n//\t\t\n//\t\tplotter.plot(sweepConfig.getSweepInfo(), l1usage, speedupTrace, null, \"\");\n//\t\tplotter.plot(sweepConfig.getSweepInfo(), l2usage, speedupTrace, null, \"\");\n//\t\tplotter.plot(sweepConfig.getSweepInfo(), averageMemTime, speedupTrace, null, \"\");\n\t\t\n//\t\tspeedupTrace.printTableHeader(\"CGRA blocked by Prefetch\");\n//\t\tfor(TaskType tt: TaskType.values()){\n//\t\t\tplotter.plot(sweepConfig.getSweepInfo(), blockTimesPrefetch[tt.ordinal()], speedupTrace,null, tt.toString());\n//\t\t}\n//\t\tspeedupTrace.printTableHeader(\"CGRA blocked by Regular Access\");\n//\t\tfor(TaskType tt: TaskType.values()){\n//\t\t\tplotter.plot(sweepConfig.getSweepInfo(), blockTimesRegular[tt.ordinal()], speedupTrace,null, tt.toString());\n//\t\t}\n\t\n\t}", "public void test_performance_cost_Tx() throws Exception {\n // ## Arrange ##\n final String prefix = \"S\";\n\n // ## Act & Assert ##\n {\n long before = System.currentTimeMillis();\n List<Member> memberList = jdbcManager.from(Member.class).where(\"memberName like ?\", prefix + \"%\").orderBy(\n \"birthdate desc, memberId asc\").getResultList();\n long after = System.currentTimeMillis();\n log(\"1-[Performance Cost]: \" + convertToPerformanceView(before, after) + \" size=\" + memberList.size());\n }\n {\n long before = System.currentTimeMillis();\n List<Member> memberList = jdbcManager.from(Member.class).where(\"memberName like ?\", prefix + \"%\").orderBy(\n \"birthdate desc, memberId asc\").getResultList();\n long after = System.currentTimeMillis();\n log(\"2-[Performance Cost]: \" + convertToPerformanceView(before, after) + \" size=\" + memberList.size());\n }\n {\n long before = System.currentTimeMillis();\n List<Purchase> purchaseList = jdbcManager.from(Purchase.class).where(\"purchaseDatetime < ?\", new Date())\n .orderBy(\"purchaseId asc\").getResultList();\n long after = System.currentTimeMillis();\n log(\"3-[Performance Cost]: \" + convertToPerformanceView(before, after) + \" size=\" + purchaseList.size());\n }\n }", "@Override\n public double compactionTimePerKbInNanos()\n {\n return TimeUnit.MICROSECONDS.toNanos(compactionTimeMicros);\n }", "public static void main(String[] args) throws Exception {\n \r\n long beginTime = System.nanoTime();\r\n for (int i = 0; i < 50000000; i++) {\r\n// System.out.println(getFlowNo());\r\n getFlowNo();\r\n \r\n }\r\n long endTime = System.nanoTime();\r\n System.out.println(\"onLineWithTransaction cost:\"+((endTime-beginTime)/1000000000) + \"s \" + ((endTime-beginTime)%1000000000) + \"us\");\r\n// \r\n// System.out.println(System.currentTimeMillis());\r\n// TimeUnit.SECONDS.sleep(3);\r\n// System.out.println(System.currentTimeMillis());\r\n }", "private static long cpio(BufferedInputStream in, BufferedOutputStream out, String wt) throws IOException {\r\n\r\n\t\tbyte[] buffer = new byte[buffSize];\r\n\r\n\t\tint c;\r\n\t\tlong tot = 0;\r\n\t\tlong s = System.nanoTime();\r\n\t\twhile ((c = in.read(buffer, 0, buffer.length)) != -1) {\r\n\t\t\tout.write(buffer, 0, c);\r\n\t\t\ttot += c;\r\n\t\t}\r\n\r\n\t\tlong tim = System.nanoTime() - s;\r\n\t\tdouble dtim = tim == 0 ? 0.5 : tim; // avg of those less than 1 nanoseconds is taken as 0.5 nanoseconds\r\n\t\tdouble bps = tot * 1000 * 1000 / dtim;\r\n\t\tSystem.out.println(bps);\r\n\t\treturn tot;\r\n\t}", "public static void main(String[] args) { int n = 100000000;\n// Integer[] array = ArrayGenerator.randomGenerator(n, n);\n// Integer[] arr = Arrays.copyOf(array, array.length);\n// PerformanceSort.test(\"QuickSort\", array);\n// PerformanceSort.test(\"MergeSort\", arr);\n// Integer[] array1 = ArrayGenerator.orderGenerator(n);\n// Integer[] arr1 = Arrays.copyOf(array1, array1.length);\n// PerformanceSort.test(\"QuickSort\", array1);\n// PerformanceSort.test(\"MergeSort\", arr1);\n//\n int n = 5000000;\n Integer[] array = ArrayGenerator.randomGenerator(n, 3);\n Integer[] arr = Arrays.copyOf(array, array.length);\n\n PerformanceSort.test(\"QuickSort3\", array);\n PerformanceSort.test(\"QuickSort2\", arr);\n// Integer[] array = new Integer[]{1, 8, 7, 6, 4};\n// PerformanceSort.test(\"QuickSort2\", array);\n\n }", "public static void main(String[] args) {\n for (int N = 100; N <= 100000; N *= 10) {\n int[] nums = new int[N];\n Random random = new Random();\n for (int i = 0; i < N; i++) {\n nums[i] = random.nextInt(N * 10);\n }\n Long start = 0L, end = 0L;\n int[] quickSortArray = Arrays.copyOf(nums, nums.length);\n int[] InsertSortArray = Arrays.copyOf(nums, nums.length);\n int[] shellSortArray = Arrays.copyOf(nums, nums.length);\n int[] bubbleSortArray = Arrays.copyOf(nums, nums.length);\n int[] selectionSortArray = Arrays.copyOf(nums, nums.length);\n int[] mergeSortArray = Arrays.copyOf(nums, nums.length);\n System.out.println(\"数据量为:\" + N);\n start = System.currentTimeMillis();\n QuickSort.quickSort(quickSortArray, 0, N - 1);\n end = System.currentTimeMillis();\n System.out.println(\"快速排序运行时间\" + 1.0 * (end - start) / 1000 + \"s\");\n start = System.currentTimeMillis();\n InsertSort.insertSort(InsertSortArray);\n end = System.currentTimeMillis();\n System.out.println(\"插入排序运行时间\" + 1.0 * (end - start) / 1000 + \"s\");\n start = System.currentTimeMillis();\n ShellSort.shellSort(shellSortArray, 8);\n end = System.currentTimeMillis();\n System.out.println(\"希尔排序运行时间\" + 1.0 * (end - start) / 1000 + \"s\");\n start = System.currentTimeMillis();\n BubbleSort.bubbleSort(bubbleSortArray);\n end = System.currentTimeMillis();\n System.out.println(\"冒泡排序运行时间\" + 1.0 * (end - start) / 1000 + \"s\");\n start = System.currentTimeMillis();\n SelectionSort.selectionSort(selectionSortArray);\n end = System.currentTimeMillis();\n System.out.println(\"选择排序运行时间\" + 1.0 * (end - start) / 1000 + \"s\");\n start = System.currentTimeMillis();\n MergeSort.mergeSort(mergeSortArray);\n end = System.currentTimeMillis();\n System.out.println(\"归并排序运行时间\" + 1.0 * (end - start) / 1000 + \"s\");\n }\n }", "public static void startTimeMeasure() {\n \tstartTime = System.nanoTime();\n }", "public static void main(String[] args) \n\t{\n\t \n\t\tlong startTimer = System.currentTimeMillis();\n\t\t//mrethod 1\n\t\tint res=Utility.binarySearchWord();\n\t\tif(res==-1)\n\t\t\tSystem.out.println(\"your word not found\");\n\t\t else\n\t\t System.out.println(\"your word found at index:\"+res);\n\t\tlong first=System.currentTimeMillis();\n\t\tSystem.out.println((first-startTimer)/1000+\"seconds\");\n\t \n\t\t//method 2\n\t\tint res1=Utility.binarySearchForInteger();\n\t\tif(res1==-1)\n\t\t\tSystem.out.println(\"your no. not found\");\n\t\t else\n\t\t System.out.println(\"your no.found at index:\"+res1);\n\t\tlong second=System.currentTimeMillis();\n\t\tSystem.out.println((second-first)/1000+\"seconds\");\n\t\t\n\t\t//method 3\n\t\tint res3[]=Utility.bubbleSortForIntegers();\n\t\tfor(int i=0;i<res3.length;i++)\n\t\t\tSystem.out.println(res3[i]);\n\t\tlong third=System.currentTimeMillis();\n\t\tSystem.out.println((third-second)/1000+\"seconds\");\n\t\t\n\t\t//method 4\n\t\tString res4[]=Utility.bubbleSortForStrings();\n\t\tfor(int i=0;i<res4.length;i++)\n\t\t\tSystem.out.println(res4[i]);\n\t\tlong fourth=System.currentTimeMillis();\n\t\tSystem.out.println((fourth-third)/1000+\"seconds\");\n\t\t\n\t\t//method 5\n\t\tint res5[]=Utility.insertionSortForInteger();\n\t\tfor(int i=0;i<res5.length;i++)\n\t\t\tSystem.out.println(res5[i]);\n\t\tlong fifth=System.currentTimeMillis();\n\t\tSystem.out.println((fifth-fourth)/1000+\"seconds\");\n\t\t\n\t\t//method 6\n\t\tString res6[]=Utility.insertionSortForString();\n\t\tfor(int i=0;i<res6.length;i++)\n\t\t\tSystem.out.println(res6[i]);\n\t\tlong sixth=System.currentTimeMillis();\n\t\tSystem.out.println((sixth-fifth)/1000+\"seconds\");\n\t}", "private static boolean slowEquals(final byte[] a, final byte[] b) {\n int diff = a.length ^ b.length;\n for (int i = 0; i < a.length && i < b.length; i++) {\n diff |= a[i] ^ b[i];\n }\n return diff == 0;\n }", "private static boolean slowEquals(byte[] a, byte[] b) {\r\n int diff = a.length ^ b.length;\r\n for (int i = 0; i < a.length && i < b.length; i++) {\r\n diff |= a[i] ^ b[i];\r\n }\r\n return diff == 0;\r\n }", "private static void testDelayOverhead() throws InterruptedException {\n Object m = \"\";\n int iters = 1000;\n long delay = 50;\n\n long before = System.currentTimeMillis();\n\n for (int i = 0; i < iters; i++) {\n\n synchronized (m) {\n m.wait(delay);\n }\n }\n\n long after = System.currentTimeMillis();\n\n long tottime = after - before;\n System.out.println(\"total time: \" + tottime + \"ms\");\n long ovhd = tottime - iters * delay;\n System.out.println(\"overhead: \" + ovhd + \"ms (\" + (100 * (ovhd / ((double) tottime))) + \"%)\");\n }", "public void crunch(){\n cpuBurstTime--;\n rem--;\n }", "void speedUp(int a);", "public static void main (String []args) {\n\tlong first = System.currentTimeMillis();\n\tlong sum=0;\n\tfor (int i = 0; i < 100000; i++) {\n\t String[] str = strings();\n\t sum += str[0].charAt(0);\n\t}\n\tlong done = System.currentTimeMillis();\n\n\tSystem.out.println ((done - first)*1000);\n\tSystem.out.println (sum);\n }", "private static byte[] m2536b(Context context) {\n byte[] c = StatisticsManager.m2537c(context);\n byte[] e = StatisticsManager.m2539e(context);\n byte[] bArr = new byte[(c.length + e.length)];\n System.arraycopy(c, 0, bArr, 0, c.length);\n System.arraycopy(e, 0, bArr, c.length, e.length);\n return StatisticsManager.m2534a(context, bArr);\n }", "private static boolean slowEquals(byte[] a, byte[] b) {\n\t int diff = a.length ^ b.length;\n\t for(int i = 0; i < a.length && i < b.length; i++)\n\t diff |= a[i] ^ b[i];\n\t return diff == 0;\n\t }", "private void faster() {\n BigInteger[] denoms = new BigInteger[1000];\n BigInteger[] nums = new BigInteger[1000];\n\n nums[0] = BigInteger.valueOf(3);\n denoms[0] = BigInteger.valueOf(2);\n\n for (int i = 1; i < 1000; i++) {\n denoms[i] = nums[i - 1].add(denoms[i - 1]);\n nums[i] = denoms[i].add(denoms[i - 1]);\n }\n\n int count = 0;\n for (int i = 1; i < 1000; i++) {\n if (nums[i].toString().length() > denoms[i].toString().length()) {\n count++;\n }\n }\n this.answer = count;\n }", "@Test\n public void testRandomSeries() {\n\tlong overallStart = System.currentTimeMillis();\n for (long a = Short.MIN_VALUE ; a <= Short.MAX_VALUE; a+= random.nextInt(300) + 113) {\n for (long b = Short.MAX_VALUE; b >= Short.MIN_VALUE; b-= random.nextInt(300) + 113) {\n\t\tlong start = System.currentTimeMillis();\n\t\tint ua = (int)(a + Short.MAX_VALUE + 1),\n\t\t\tub = (int)(b + Short.MAX_VALUE + 1);\n verify(ua, ub, false);\n verify(a, b, true);\n\t\tlong end = System.currentTimeMillis();\n\t\tSystem.out.println(\"a \" + a + \"b \" + b + \": \" + (end - start) + \"ms\");\n }\n }\n\tlong overallEnd = System.currentTimeMillis();\n\tSystem.out.println(\"Test Duration: \" + ((overallEnd - overallStart) / 1000) + \"s\");\n }", "public final long mo20953WW() {\n AppMethodBeat.m2504i(60318);\n if (fXT <= 0) {\n fXT = ((ActivityManager) C4996ah.getContext().getSystemService(\"activity\")).getLargeMemoryClass();\n }\n if (fXT >= 512) {\n AppMethodBeat.m2505o(60318);\n return 41943040;\n }\n AppMethodBeat.m2505o(60318);\n return 20971520;\n }", "static void runIt() throws IOException {\n\t\t String inFName = \"resource/C-large.in\";\n//\t\tString outFName = \"resource/C-small.out\";\n\t\t String outFName = \"resource/C-large.out\";\n\n\t\tBufferedReader in = new BufferedReader(new FileReader(inFName));\n\t\tPrintWriter out = new PrintWriter(new File(outFName));\n\n\t\tint testCases = Integer.parseInt(in.readLine());\n\n\t\tfor (int i = 0; i < testCases; ++i) {\n\n\t\t\tString line[] = in.readLine().split(\" \");\n//\t\t\tSystem.out.println(line);\n\t\t\tStringBuilder output = new StringBuilder();\n\t\t\toutput.append(\"Case #\" + (i + 1) + \": \");\n\n\t\t\tint R = Integer.parseInt(line[0]);\n\t\t\tint K = Integer.parseInt(line[1]);\n\t\t\tlong euros = 0;\n\t\t\tint pass = 0;\n\t\t\tline = in.readLine().split(\" \");\n\t\t\tVector<Integer> queue = new Vector<Integer>();\n\t\t\tVector<Integer> first = new Vector<Integer>();\n\t\t\tfor (String string : line) {\n\t\t\t\tqueue.add(Integer.parseInt(string));\n\t\t\t\tfirst.add(Integer.parseInt(string));\n\t\t\t\t\n\t\t\t}\n\n\n\t\t\tfor (int time = 0; time < R; ++time) {\n\t\t\t\tint p = 0;\n\t\t\t\twhile (true) {\n\t\t\t\t\tif (p < queue.size()) {\n\t\t\t\t\t\tInteger g = queue.elementAt(p++);\n\t\t\t\t\t\tif (pass + g <= K) {\n\t\t\t\t\t\t\tpass += g;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tfor (int kk = 1; kk < p; ++kk) {\n\t\t\t\t\tInteger m = queue.remove(0);\n\t\t\t\t\tqueue.add(m);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\teuros += pass;\n\t\t\t\tpass=0;\n\t\t\t\tif(queue.equals(first)){\n\t\t\t\t\tint s = R/(time+1);\n\t\t\t\t\teuros*=s;\n\t\t\t\t\ttime *=s;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\toutput.append(euros);\n\t\t\tSystem.out.println(output);\n\t\t\tout.println(output);\n\t\t}\n\n\t\tin.close();\n\t\tout.flush();\n\t\tout.close();\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"\\tSelection\\tBubble\\tInsertion\\tCollections\\tQuick\\tinPlaceQuick\\tMerge\");\r\n\t\tfor (int n = 1000; n <= 7000; n += 500) {\r\n\t\t\tAPArrayList<Double> lists = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listb = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listi = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listc = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listq = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listipq = new APArrayList<Double>();\r\n\t\t\tAPArrayList<Double> listm = new APArrayList<Double>();\r\n\t\t\t\r\n\t\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\t\tDouble val = Math.random();\r\n\t\t\t\tlists.add(val);\r\n\t\t\t\tlistb.add(val);\r\n\t\t\t\tlisti.add(val);\r\n\t\t\t\tlistc.add(val);\r\n\t\t\t\tlistq.add(val);\r\n\t\t\t\tlistipq.add(val);\r\n\t\t\t\tlistm.add(val);\r\n\t\t\t}\r\n\r\n\t\t\tlong selStartTime = System.nanoTime();\r\n\t\t\tlists.selectionSort();\r\n\t\t\tlong selEndTime = System.nanoTime();\r\n\t\t\tlong selSortTime = selEndTime - selStartTime;\r\n\t\t\tlists.clear();\r\n\t\t\t\r\n\t\t\tlong bubStartTime = System.nanoTime();\r\n\t\t\tlistb.bubbleSort();\r\n\t\t\tlong bubEndTime = System.nanoTime();\r\n\t\t\tlong bubSortTime = bubEndTime - bubStartTime;\r\n\t\t\tlistb.clear();\r\n\t\t\t\r\n\t\t\tlong insStartTime = System.nanoTime();\r\n\t\t\tlisti.insertionSort();\r\n\t\t\tlong insEndTime = System.nanoTime();\r\n\t\t\tlong insSortTime = insEndTime - insStartTime;\r\n\t\t\tlisti.clear();\r\n\t\t\t\r\n\t\t\tlong CollStartTime = System.nanoTime();\r\n\t\t\tlistc.sort();\r\n\t\t\tlong CollEndTime = System.nanoTime();\r\n\t\t\tlong CollSortTime = CollEndTime - CollStartTime;\r\n\t\t\tlistc.clear();\r\n\t\t\t\r\n\t\t\tlong quickStartTime = System.nanoTime();\r\n\t\t\tlistq.simpleQuickSort();\r\n\t\t\tlong quickEndTime = System.nanoTime();\r\n\t\t\tlong quickSortTime = quickEndTime - quickStartTime;\r\n\t\t\tlistq.clear();\r\n\t\t\t\r\n\t\t\tlong inPlaceQuickStartTime = System.nanoTime();\r\n\t\t\tlistipq.inPlaceQuickSort();\r\n\t\t\tlong inPlaceQuickEndTime = System.nanoTime();\r\n\t\t\tlong inPlaceQuickSortTime = inPlaceQuickEndTime - inPlaceQuickStartTime;\r\n\t\t\tlistipq.clear();\r\n\t\t\t\r\n\t\t\tlong mergeStartTime = System.nanoTime();\r\n\t\t\tlistm.mergeSort();\r\n\t\t\tlong mergeEndTime = System.nanoTime();\r\n\t\t\tlong mergeSortTime = mergeEndTime - mergeStartTime;\r\n\t\t\tlistq.clear();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(n + \"\\t\" + selSortTime + \"\\t\" + bubSortTime + \"\\t\" + insSortTime + \"\\t\" + CollSortTime + \"\\t\" + quickSortTime + \"\\t\" + inPlaceQuickSortTime + \"\\t\" + mergeSortTime);\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\r\n\t\t/** 1.000\r\n\t\t * bruteforceBE Asc runtime: 1072294\r\n\t\t * bruteforceBE Desc runtime: 17835245\r\n\t\t * improvedBE Asc runtime: 3562199\r\n\t\t * improvedBE Desc runtime: 794515\r\n\t\t * linearBE Asc runtime: 1680780\r\n\t\t * linearBE Desc runtime: 1629310\r\n\t\t *\r\n\t\t * 10.000\r\n\t\t * bruteforceBE Asc runtime: 3850878\r\n\t\t * bruteforceBE Desc runtime: 113789179\r\n\t\t * improvedBE Asc runtime: 11800873\r\n\t\t * improvedBE Desc runtime: 8166293\r\n\t\t * linearBE Asc runtime: 14381578\r\n\t\t * linearBE Desc runtime: 5897656\r\n\t\t *\r\n\t\t * 100.000\r\n\t\t * bruteforceBE Asc runtime: 19376301\r\n\t\t * bruteforceBE Desc runtime: 7801237491\r\n\t\t * improvedBE Asc runtime: 52015969\r\n\t\t * improvedBE Desc runtime: 33891001\r\n\t\t * linearBE Asc runtime: 43042990\r\n\t\t * linearBE Desc runtime: 10088763\r\n\t\t *\r\n\t\t * 200.000\r\n\t\t * bruteforceBE Asc runtime: 27567279\r\n\t\t * bruteforceBE Desc runtime: 30705593272\r\n\t\t * improvedBE Asc runtime: 87086775\r\n\t\t * improvedBE Desc runtime: 51012088\r\n\t\t * linearBE Asc runtime: 61726040\r\n\t\t * linearBE Desc runtime: 56062681\r\n\t\t */\r\n\t\tArrayList<Integer> ArrayUnsortAsc = new ArrayList<>();\r\n\t\tArrayList<Integer> ArrayUnsortDesc = new ArrayList<>();\r\n\t\tint n = 1000;\r\n\r\n\t\tfor(int i = 1; i <= n; i++ ) {\r\n\t\t\tArrayUnsortAsc.add(i);\r\n\t\t}\r\n\t\tfor(int j = n; j >= 1; j-- ) {\r\n\t\t\tArrayUnsortDesc.add(j);\r\n\t\t}\r\n\r\n\t\tlong beginning = 0, end = 0;\r\n\t\tlong runtime;\r\n\t\t//1a test\r\n\t\tbeginning = System.nanoTime();\r\n\t\tbruteForceBE(ArrayUnsortAsc,ArrayUnsortAsc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"bruteforceBE Asc runtime: \" + runtime);\r\n\r\n\t\tbeginning = System.nanoTime();\r\n\t\tbruteForceBE(ArrayUnsortDesc,ArrayUnsortDesc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"bruteforceBE Desc runtime: \" + runtime);\r\n\r\n\r\n\t\t//1b test\r\n\t\tbeginning = System.nanoTime();\r\n\t\timprovedBE(ArrayUnsortAsc,ArrayUnsortAsc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"improvedBE Asc runtime: \" + runtime);\r\n\r\n\t\tbeginning = System.nanoTime();\r\n\t\timprovedBE(ArrayUnsortDesc,ArrayUnsortAsc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"improvedBE Desc runtime: \" + runtime);\r\n\r\n\r\n\t\t//1c test\r\n\t\tbeginning = System.nanoTime();\r\n\t\tlinearBE(ArrayUnsortAsc,ArrayUnsortAsc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"linearBE Asc runtime: \" + runtime);\r\n\r\n\t\tbeginning = System.nanoTime();\r\n\t\tlinearBE(ArrayUnsortDesc,ArrayUnsortDesc.size()/2);\r\n\t\tend = System.nanoTime();\r\n\t\truntime = end - beginning;\r\n\t\tSystem.out.println(\"linearBE Desc runtime: \" + runtime);\r\n\r\n\t}", "private static double pythonTime() {\n return System.currentTimeMillis() / 1000;\n }", "@Test\n public void timeAppendObject() {\n Object o =\n new Object() {\n @Override\n public String toString() {\n return \"constant\";\n }\n };\n BenchmarkState state = mPerfStatusReporter.getBenchmarkState();\n while (state.keepRunning()) {\n StringBuilder sb = new StringBuilder();\n for (int j = 0; j < mLength; ++j) {\n sb.append(o);\n }\n }\n }", "private static void compute_performances(Server server) {\n System.out.println(\"E[N]: Average number of packets in the buffer/queue: \" + round((double) runningBufferSizeCount / totalTicks));\n System.out.println(\"E[T]: Average sojourn time: \" + round((double) server.getTotalPacketDelay() / totalPackets + (double) serviceTime)\n + \"/packet\");\n System.out.println(\"P(idle): The proportion of time the server is idle: \"\n + round((double) server.getIdleServerCount() / totalTicks * 100) + \"%\");\n if (maxBufferSize >= 0) {\n System.out.println(\"P(loss): The packet loss probability: \" + round((double) droppedPacketCount / totalPackets * 100) + \"%\");\n }\n }", "public static void sorting() {\n List<String> wordList = new ArrayList<>();\n for (int i = 0; i < 500000; i++)\n wordList.add(UUID.randomUUID().toString());\n\n //Sort and filter the list using compare to sequentially\n long t1s = System.nanoTime();\n List<String> a =wordList.stream()\n .filter((String s) -> s.contains(\"Z\") ? true : false)\n .sorted((s1, s2) -> s1.compareTo(s2))\n .collect(Collectors.toList());\n long t1d = System.nanoTime() - t1s;\n\n //Sort and filter the list using compare to in parallel\n long t2s = System.nanoTime();\n List<String> b = wordList.parallelStream()\n .filter((String s) -> s.contains(\"Z\") ? true : false)\n .sorted((s1, s2) -> s1.compareTo(s2))\n .collect(Collectors.toList());\n long t2d = System.nanoTime() - t2s;\n\n System.out.println(\"Filter + Sort Serial time : \" + t1d);\n System.out.println(\"Filter + Sort Parallel time : \" + t2d);\n }", "@Benchmark\n public void task0()\n throws IOException{\n Map<Character, Integer> letterScores = (new LetterScorer(maxThreads, validCharRegex))\n .getScoreFromCorpus(dataDir);\n\n Files.write(Paths.get(outFilePath)\n , (new KScorer(maxThreads, validCharRegex, kNeighborhood, letterScores))\n .getScoreFromCorpus(dataDir)\n .stream()\n .sorted(Comparator.comparing(Map.Entry::getKey))\n .map(e-> e.getKey() + \", \" + e.getValue())\n .collect(Collectors.joining(\"\\n\"))\n .getBytes());\n }", "static void testCase() throws IOException{\r\n /*\r\n [\"MinStack\",\"push\",\"push\",\"push\",\"top\",\"pop\",\"getMin\",\"pop\",\"getMin\",\"pop\",\"push\",\"top\",\"getMin\",\"push\",\"top\",\"getMin\",\"pop\",\"getMin\"]\r\n[[],[2147483646],[2147483646],[2147483647],[],[],[],[],[],[],[2147483647],[],[],[-2147483648],[],[],[],[]]\r\n */\r\n\r\n try{\r\n long startTime, stopTime;\r\n startTime = System.currentTimeMillis();\r\n printSpace(logic(0));\r\n println(0);\r\n stopTime = System.currentTimeMillis();\r\n println((stopTime - startTime)+\" ms\");\r\n\r\n startTime = System.currentTimeMillis();\r\n printSpace(logic(4));\r\n println(4);\r\n stopTime = System.currentTimeMillis();\r\n println((stopTime - startTime)+\" ms\");\r\n }catch(IOException ex){\r\n ex.printStackTrace();\r\n }\r\n }", "public void faster()\n {\n if(speed < 9){\n speed += 1;\n }\n }", "public static void main(String[] args){\n\n StopWatch watch1 = new StopWatch();\n int row = 100000;\n int[] array = new int[row];\n for(int i=0; i<row; i++){\n array[i] = RandomNumber(1,1000);\n }\n\n array = SortArray(array);\n\n double time1 = watch1.getElapsedTime();\n System.out.printf(\"%.2f seconds\\n\",time1);\n }", "public long estimateSize() {\n/* 1668 */ return this.est;\n/* */ }", "public static void compress(ByteBuffer bbInput, ByteBuffer bbOutput, StringBuilder information, long[] time) throws IOException\r\n {\r\n long startTime = System.currentTimeMillis(); \r\n \r\n Arithmetic arithmetic = new Arithmetic();\r\n \r\n while(bbInput.remaining() > 0)\r\n {\r\n byte b = bbInput.get();\r\n arithmetic.add(b);\r\n }\r\n \r\n TreeMap<Byte, Range> rangeTable = arithmetic.set();\r\n \r\n //System.out.println(rangeTable.size());\r\n \r\n bbOutput.putInt(rangeTable.size());\r\n for (Entry<Byte, Range> e : rangeTable.entrySet())\r\n {\r\n bbOutput.put(e.getKey().byteValue());\r\n bbOutput.putLong(e.getValue().count);\r\n //System.out.println((char) e.getKey().byteValue() + \":\" + e.getValue().count + \" \" + (int) e.getValue().high + \" \" + (int) e.getValue().low);\r\n }\r\n \r\n int rangeTableCount = bbInput.position();\r\n bbOutput.putInt(rangeTableCount);\r\n \r\n if (rangeTableCount > (Math.pow(2,16)))\r\n {\r\n information.append(\"FATAL ERROR: Cannot compress block larger than 2^16 - 1\");\r\n return;\r\n }\r\n \r\n bbInput.position(0);\r\n \r\n //System.out.println(rangeTableCount);\r\n\r\n char low = 0;\r\n char high = 0xFFFF;\r\n short underflow_bits = 0;\r\n\r\n BitWriter bitWriter = new BitWriter(bbOutput);\r\n\r\n //Range testRange = arithmetic.rangeTable.get((byte)'B');\r\n //System.out.println((char)'B' + \" \" + testRange.count + \" \" + (int) testRange.high + \" \" + (int) testRange.low);\r\n \r\n while(bbInput.remaining() > 0)\r\n {\r\n byte b = bbInput.get();\r\n Range range = rangeTable.get(b);\r\n \r\n long diff;\r\n diff = (long) (high - low) + 1;\r\n char temphigh = (char) ((diff * range.high) / rangeTableCount - 1);\r\n high = (char) (low + temphigh);\r\n char templow = (char) ((diff * range.low) / rangeTableCount);\r\n low = (char) (low + templow);\r\n \r\n boolean shiftingComplete = false;\r\n while (!shiftingComplete)\r\n {\r\n // TEST1: Test if most significant bit match, shift them out.\r\n if ((high & 0x8000) == (low & 0x8000))\r\n {\r\n bitWriter.put((high & 0x8000) != 0);//!=\r\n while (underflow_bits > 0)\r\n {\r\n bitWriter.put((~high & 0x8000) != 0);\r\n underflow_bits--;\r\n }\r\n low <<= 1;\r\n high <<= 1;\r\n high |= 1;\r\n }\r\n // TEST2: Test for potential underflow if most significant digits don't match and\r\n // second most significant digits are one apart.\r\n else if ((low & 0x4000) != 0 && (!((high & 0x4000) != 0)))\r\n {\r\n underflow_bits += 1;\r\n low &= 0x3fff;\r\n high |= 0x4000;\r\n \r\n low <<= 1;\r\n high <<= 1;\r\n high |= 1;\r\n }\r\n // ELSE: COMPLETE\r\n else\r\n {\r\n shiftingComplete = true;\r\n }\r\n }\r\n }\r\n \r\n bitWriter.put((low & 0x4000) != 0);\r\n underflow_bits++;\r\n while (underflow_bits-- > 0)\r\n {\r\n bitWriter.put((~low & 0x4000) != 0);\r\n }\r\n\r\n bitWriter.finish();\r\n \r\n long endTime = System.currentTimeMillis();\r\n time[0] += (endTime - startTime);\r\n }", "private static long m133353n() {\n C41940c c = C35574k.m114859a().mo70094i().mo102932c();\n String str = C39811er.f103468d;\n C7573i.m23582a((Object) str, \"ShortVideoConfig2.sDir\");\n File a = c.mo102928a(str);\n long j = 0;\n if (a.exists() && a.isDirectory()) {\n Set a2 = C41911c.m133283a();\n File[] listFiles = a.listFiles();\n C7573i.m23582a((Object) listFiles, \"filesRoot.listFiles()\");\n Iterable c2 = C7519g.m23444c((T[]) listFiles);\n Collection arrayList = new ArrayList();\n Iterator it = c2.iterator();\n while (true) {\n boolean z = false;\n if (!it.hasNext()) {\n break;\n }\n Object next = it.next();\n File file = (File) next;\n if (file.exists() && file.isFile()) {\n z = true;\n }\n if (z) {\n arrayList.add(next);\n }\n }\n for (File file2 : (List) arrayList) {\n String name = file2.getName();\n C7573i.m23582a((Object) name, \"undeleted.name\");\n if (!C7634n.m23721b(name, \"synthetise_\", false)) {\n String name2 = file2.getName();\n C7573i.m23582a((Object) name2, \"undeleted.name\");\n if (!C7634n.m23723c(name2, \"-concat-v\", false)) {\n String name3 = file2.getName();\n C7573i.m23582a((Object) name3, \"undeleted.name\");\n if (!C7634n.m23723c(name3, \"-concat-a\", false)) {\n }\n }\n Iterator it2 = a2.iterator();\n int i = 0;\n while (true) {\n if (!it2.hasNext()) {\n i = -1;\n break;\n }\n Object next2 = it2.next();\n if (i < 0) {\n C7525m.m23465b();\n }\n String str2 = (String) next2;\n String path = file2.getPath();\n C7573i.m23582a((Object) path, \"undeleted.path\");\n if (C7634n.m23721b(path, str2, false)) {\n break;\n }\n i++;\n }\n if (-1 == i) {\n j += file2.length();\n }\n }\n }\n }\n return j;\n }", "private static long sortingTime(String[] array, boolean isStandardSort) {\n long start = System.currentTimeMillis(); // starting time\n if (isStandardSort) \n Arrays.sort(array);\n selectionSort(array);\n return System.currentTimeMillis() - start; // measure time consumed\n }", "@Deprecated\n public double elapsedTimeAndSpace() {\n long now = System.nanoTime();\n long endMem = rt.freeMemory();\n System.out.println(\"Elapsed time in nanoseconds = \" + (now - start) );\n System.out.println(\"Memory used in Bytes= \" + (startMem - endMem));\n return (now - start);\n }", "public long estimateSize() {\n/* 1338 */ return this.est;\n/* */ }", "private long getMemoryFootprint() {\n Runtime runtime = Runtime.getRuntime();\n long memAfter = runtime.totalMemory() - runtime.freeMemory();\n long memBefore = memAfter + 1;\n while (memBefore != memAfter) {\n memBefore = memAfter;\n System.gc();\n memAfter = runtime.totalMemory() - runtime.freeMemory();\n }\n return memAfter;\n }", "public long getTimeTaken();", "@Override\n public Resultat compareTimealg2(boolean[][] mat, int[] memory) {\n tools.setSizeMat(mat.length);\n tools.initMemory();\n\n long start2 = System.currentTimeMillis();\n int max2 = tools.maximumSupport(mat, tools.getMemory());\n long end2 = System.currentTimeMillis();\n\n long diff2 = end2 - start2;\n\n // afficheRes(diff2, 2);\n return new Resultat(diff2, max2);\n\n }", "static long GetCycleCount() {\n\t\treturn System.currentTimeMillis();\n\t}", "public static void main(String[] args){\n int MIN = Integer.parseInt(args[0]);\n MAX = Integer.parseInt(args[1]);\n cutoffs = new int[args.length - 2];\n cache = new ArrayList<IndexedArrayList<SuperSavvyTrieHelper2>>();\n for (int i = 2; i < args.length; i++){\n cutoffs[i - 2] = Integer.parseInt(args[i]);\n cache.add(new IndexedArrayList<SuperSavvyTrieHelper2>());\n }\n for (int i = 0; i < cutoffs.length / 2; i++){\n int temp = cutoffs[i];\n cutoffs[i] = cutoffs[cutoffs.length - 1 - i];\n cutoffs[cutoffs.length - 1 - i] = temp;\n }\n multiplicitiesUsed = new boolean[MAX + 1];\n basesUsed = new DoublyLinkedArray(MAX + 1);\n SuperSavvyTrieHelper2.setCorrespondance(basesUsed);\n /*\n long count1 = lowerRecursion(MAX, 0);\n long count2 = middleRecursion(MAX, 0);\n long count3 = upperRecursion(MAX, 0);\n long total = count1 + count2 + count3;\n System.out.printf(\"%d + %d + %d = %d\\n\", count1, count2, count3, total);\n */\n hitCounts = new long[cutoffs.length];\n missCounts = new long[cutoffs.length];\n statCollector = new StatCollector(cutoffs);\n\n long startTime = System.nanoTime();\n long[] values = new long[MAX - MIN + 1];\n for (int i = MIN; i <= MAX; i++) {\n values[i - MIN] = upperRecursionWrapper(i);\n }\n //long[] testValues = new long[] {1752443,1911046, 2067456,2249444,2429337, 2647532,2852449,3101167,3350292,3632299,3916575};\n for (int i = 0; i < values.length; i++){\n //if (testValues[i] != values[i]){\n System.out.printf(\"%d: %d\\n\", i + MIN, values[i]);\n //}\n }\n long endTime = System.nanoTime();\n System.out.printf(\"%f,\", (double)(endTime - startTime) / 1000000000.0);\n long totalMissCounts = 0;\n long totalMissWeight1 = 0;\n long totalMissWeight2 = 0;\n long totalMissWeight3 = 0;\n /*\n for (int i = 0; i < cutoffs.length; i++){\n long totalCounts = hitCounts[i] + missCounts[i];\n totalMissCounts += missCounts[i];\n totalMissWeight1 += missCounts[i] * cutoffs[i];\n totalMissWeight2 += (hitCounts[i] / missCounts[i]) * cutoffs[i];\n totalMissWeight3 += (hitCounts[i] - missCounts[i]) * cutoffs[i] * cutoffs[i];\n System.out.printf(\"\\tCache %d: %d/%d/%d (%.5f%%)\", cutoffs[i], hitCounts[i], missCounts[i], totalCounts, (double) hitCounts[i] / totalCounts);\n }\n System.out.printf(\"\\t\\tMissCounts: %d, weighted: %d, ratio: %d, diff^2: %d\\n\", totalMissCounts, totalMissWeight1, totalMissWeight2, totalMissWeight3);\n */\n statCollector.printAll();\n }", "public long estimateSize() {\n/* 1558 */ return this.est;\n/* */ }", "@Override\n\tpublic int topSpeed() {\n\t\treturn 0;\n\t}", "double get_system_time(int n)\n {\n long start = System.nanoTime();\n for (int i = 1; i < n; i*=2)\n {\n // free process..\n }\n long end = System.nanoTime();\n double t = (end - start) / 1000000000.0;\n return t;\n }", "private long m18337c(long durationUs) {\n return (((long) this.f16625s) * durationUs) / 1000000;\n }", "static long m61428a(File file) {\n long j;\n try {\n StatFs statFs = new StatFs(file.getAbsolutePath());\n j = (((long) statFs.getBlockCount()) * ((long) statFs.getBlockSize())) / 50;\n } catch (IllegalArgumentException unused) {\n j = 5242880;\n }\n return Math.max(Math.min(j, 52428800), 5242880);\n }", "void takeBefore(){\n beforeTimeNs=System.nanoTime();\n }", "long getTimeSpoutBoltA();", "private void m15513b(long j) {\n if (mo9140c() != null) {\n this.f13396d.f11688z = System.currentTimeMillis();\n int intValue = ((Integer) this.f13396d.get(\"data_pk_anchor_score\")).intValue();\n int intValue2 = ((Integer) this.f13396d.get(\"data_pk_guest_score\")).intValue();\n if (intValue > intValue2) {\n this.f13396d.lambda$put$1$DataCenter(\"data_pk_result\", PkResult.LEFT_WON);\n } else if (intValue < intValue2) {\n this.f13396d.lambda$put$1$DataCenter(\"data_pk_result\", PkResult.RIGHT_WON);\n } else {\n this.f13396d.lambda$put$1$DataCenter(\"data_pk_result\", PkResult.EVEN);\n }\n this.f13396d.lambda$put$1$DataCenter(\"data_pk_state\", PkState.PENAL);\n if (j <= 0) {\n this.f13396d.lambda$put$1$DataCenter(\"data_pk_state\", PkState.FINISHED);\n }\n int i = (int) (j / 1000);\n int i2 = (int) (j % 1000);\n if (this.f13399i != null) {\n this.f13399i.dispose();\n this.f13399i = null;\n }\n this.f13399i = C9057b.m27050a(0, 1, TimeUnit.SECONDS).mo19305c((long) (i + 1)).mo19320e((long) i2, TimeUnit.MILLISECONDS).mo19317d((C7327h<? super T, ? extends R>) new C4703fw<Object,Object>(i)).mo19294a(C47549a.m148327a()).mo19280a((C7326g<? super T>) new C4704fx<Object>(this), (C7326g<? super Throwable>) new C4705fy<Object>(this));\n }\n }", "public long getTotalTime() {\n/* 73 */ return this.totalTime;\n/* */ }", "public static void main(String[] args) {\n\n pairsSum();\n\n printAllSubArrays();\n\n tripletZero();\n\n // int[][] sub = subsets();\n\n PairsSum sum = new PairsSum();\n int[] arr = { 10, 1, 2, 3, 4, 5, 6, 1 };\n boolean flag = sum.almostIncreasingSequence(arr);\n System.out.println(flag);\n\n String s = \"\";\n for (int i = 0; i < 100000; i++) {\n // s += \"CodefightsIsAwesome\";\n }\n long start = System.currentTimeMillis();\n // int k = subStr(s, \"IsA\");\n System.out.println(System.currentTimeMillis() - start);\n // System.out.println(k);\n\n String[] a = { \"aba\", \"aa\", \"ad\", \"vcd\", \"aba\" };\n String[] b = sum.allLongestStrings(a);\n System.out.println(Arrays.deepToString(b));\n\n List<String> al = new ArrayList<>();\n al.toArray();\n\n Map<Integer, Integer> map = new HashMap<>();\n Set<Integer> keySet = map.keySet();\n for (Integer integer : keySet) {\n\n }\n\n String st = reverseBracksStack(\"a(bc(de)f)g\");\n System.out.println(st);\n\n int[] A = { 1, 2, 3, 2, 2, 3, 3, 33 };\n int[] B = { 1, 2, 2, 2, 2, 3, 2, 33 };\n\n System.out.println(sum.isIPv4Address(\"2.2.34\"));\n\n Integer[] AR = { 5, 3, 6, 7, 9 };\n int h = sum.avoidObstacles(AR);\n System.out.println(h);\n\n int[][] image = { { 36, 0, 18, 9 }, { 27, 54, 9, 0 }, { 81, 63, 72, 45 } };\n int[][] im = { { 7, 4, 0, 1 }, { 5, 6, 2, 2 }, { 6, 10, 7, 8 }, { 1, 4, 2, 0 } };\n int[][] res = sum.boxBlur(im);\n\n for (int i = 0; i < res.length; i++) {\n for (int j = 0; j < res[0].length; j++) {\n System.out.print(res[i][j] + \" \");\n }\n System.out.println();\n }\n\n boolean[][] ms = { { true, false, false, true }, { false, false, true, false }, { true, true, false, true } };\n int[][] mines = sum.minesweeper(ms);\n for (int i = 0; i < mines.length; i++) {\n for (int j = 0; j < mines[0].length; j++) {\n System.out.print(mines[i][j] + \" \");\n }\n System.out.println();\n }\n\n System.out.println(sum.variableName(\"var_1__Int\"));\n\n System.out.println(sum.chessBoard());\n\n System.out.println(sum.depositProfit(100, 20, 170));\n\n String[] inputArray = { \"abc\", \"abx\", \"axx\", \"abx\", \"abc\" };\n System.out.println(sum.stringsRearrangement(inputArray));\n\n int[][] queens = { { 1, 1 }, { 3, 2 } };\n int[][] queries = { { 1, 1 }, { 0, 3 }, { 0, 4 }, { 3, 4 }, { 2, 0 }, { 4, 3 }, { 4, 0 } };\n boolean[] r = sum.queensUnderAttack(5, queens, queries);\n\n }", "public void faster() {\n myTimer.setDelay((int) (myTimer.getDelay() * SPEED_FACTOR));\n }", "private static String testSorts(int[] arr) {\n\t\tint[] initial = arr.clone();\n\t\tdouble start;\n\t\tdouble[] heapTime = new double[10];\n\t\tdouble[] quickTime = new double[10];\n\t\tdouble[] mergeTime = new double[10];\n\t\t\n\t\tfor (int i=0; i < 10; i++){ //runs 10 times\n\t arr = initial.clone();\n\t\t\tstart = System.nanoTime();\n\t Sorting.heapSort(arr);\n\t heapTime[i] = System.nanoTime()-start;\n\t \n\t arr = initial.clone();\n\t\t\tstart = System.nanoTime();\n\t\t\tSorting.quickSort(arr); \n\t quickTime[i] = System.nanoTime()-start;\n\t \n\t arr = initial.clone();\n\t\t\tstart = System.nanoTime();\n\t\t\tSorting.mergeSort(arr); \n\t mergeTime[i] = System.nanoTime()-start;\n\t\t}\n\t\t\n\t double heapMean= meanVal(heapTime) ;\n\t double quickMean= meanVal(quickTime);\n\t double mergeMean= meanVal(mergeTime);\n\t \n\t String result = \"Means | HeapSort: \" +heapMean + \" QuickSort: \" + quickMean + \" MergeSort: \" + mergeMean + \"\\n\" + \n\t \"Variance| HeapSort: \"+ varianceVal(heapTime, heapMean)+ \" QuickSort: \" + varianceVal(quickTime, quickMean)+\n\t \" MergeSort: \" +varianceVal(mergeTime, mergeMean);\n\t \n\t return result;\n\t\t\n\t}", "int totalWritten();", "private int micRecTime(long freeSpace) {\n\n return (int) (freeSpace / 5898240);\n }", "private void m9023a(int i) {\n int i2;\n Object obj = null;\n AppMethodBeat.m2504i(98679);\n try {\n BufferedInputStream bufferedInputStream = new BufferedInputStream(this.f1556t.getInputStream());\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n byte[] bArr = new byte[4096];\n i2 = 0;\n do {\n try {\n int read = bufferedInputStream.read(bArr);\n if (read == -1) {\n int obj2 = 1;\n break;\n } else {\n byteArrayOutputStream.write(bArr, 0, read);\n i2 += read;\n }\n } catch (Exception e) {\n AppMethodBeat.m2505o(98679);\n return;\n } catch (OutOfMemoryError e2) {\n }\n } while (i2 <= i);\n this.f1559w.f1540a = -303;\n this.f1559w.f1541b = \"no-content-length\";\n if (obj2 != null) {\n this.f1559w.f1543d = byteArrayOutputStream.toByteArray();\n this.f1549E.f1568f = SystemClock.elapsedRealtime();\n }\n byteArrayOutputStream.close();\n AppMethodBeat.m2505o(98679);\n return;\n } catch (OutOfMemoryError e3) {\n i2 = 0;\n } catch (Exception e4) {\n this.f1559w.f1540a = -287;\n this.f1559w.f1541b = \"read without content-length error\";\n AppMethodBeat.m2505o(98679);\n return;\n }\n this.f1559w.f1540a = -306;\n this.f1559w.f1541b = \"no-content-length:\".concat(String.valueOf(i2));\n AppMethodBeat.m2505o(98679);\n }", "public static void main(String[] args) {\r\n System.out.println(\"Digite el numero de abejas\");\r\n Scanner scan = new Scanner(System.in);\r\n int numberOfBees = scan.nextInt();\r\n long mb = 1024 * 1024;\r\n Runtime runtime = Runtime.getRuntime();\r\n if (numberOfBees > 5000) {\r\n CollisionPrevention3D test = new CollisionPrevention3D(numberOfBees);\r\n test.readFile();\r\n long startMemory = (runtime.totalMemory() - runtime.freeMemory()) / mb;\r\n long startTime = System.currentTimeMillis();\r\n test.addBeesToMatrix();\r\n test.detectCollisions();\r\n long estimatedTime = System.currentTimeMillis() - startTime;\r\n long finalMemory = (runtime.totalMemory() - runtime.freeMemory()) / mb;\r\n long estimatedMemory = (finalMemory - startMemory);\r\n test.saveFile();\r\n System.out.println(\"El algoritmo tomo un tiempo de: \" + estimatedTime + \" ms\");\r\n System.out.println(\"El algoritmo El algoritmo usó : \" + estimatedMemory + \" mb\");\r\n } else {\r\n CollisionPrevention test2 = new CollisionPrevention(numberOfBees);\r\n test2.leerArchivo();\r\n long startMemory2 = (runtime.totalMemory() - runtime.freeMemory()) / mb;\r\n long startTime2 = System.currentTimeMillis();\r\n test2.detectarColisiones();\r\n long estimatedTime2 = System.currentTimeMillis() - startTime2;\r\n test2.guardarArchivo();\r\n long finalMemory2 = (runtime.totalMemory() - runtime.freeMemory()) / mb;\r\n long estimatedMemory2 = (finalMemory2 - startMemory2);\r\n System.out.println(\"El algoritmo tomo un tiempo de: \" + estimatedTime2 + \" ms\");\r\n System.out.println(\"El algoritmo usó : \" + estimatedMemory2 + \" mb\");\r\n }\r\n }", "@Override\n\tpublic int getTopSpeed() {\n\t\treturn 100;\n\t}", "static void cmp_with_mem(String passed){\n\t\tint val1 = hexa_to_deci(registers.get('A'));\n\t\tint val2 = hexa_to_deci(memory.get(memory_address_hl()));\n\t\tS = val1>=val2?false:true;\n\t\tval2 = 256-val2;\n\t\tval2%=256;\n\t\tval1+=val2;\n\t\tCS = val1>255?true:false;\n\t\tString b = Integer.toBinaryString(val1);\n\t\tint ones=0;\n\t\tfor(int i=0;i<b.length();i++)\n\t\t\tif(b.charAt(i)=='1')\n\t\t\t\tones++;\n\t\tZ = ones==0?true:false;\n\t\tP = ones%2==0?true:false;\n\t}", "public long getRealWriteThroughput()\r\n/* 244: */ {\r\n/* 245:448 */ return this.realWriteThroughput;\r\n/* 246: */ }", "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 }", "long getQuickSwapAvailableMs();", "long getElapsedTime();", "private void optimiseEVProfile()\n\t{\n\t}", "@Ignore\n @Test\n public void testPerformanceFromTfm() throws JAXBException, ClassNotFoundException, Exception\n {\n int num_messages = 20000; \n int num_samples = 10;\n \n long total = 0;\n long min = Long.MAX_VALUE;\n long max = Long.MIN_VALUE;\n \n for( int i = 0; i < num_samples; i++ )\n {\n long proc_time = sendTfmFlightMsgs( num_messages );\n total = total + proc_time;\n min = Math.min( min, proc_time );\n max = Math.max( max, proc_time );\n }\n \n log.info( \"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\" );\n log.info( \"Ran \" + num_samples + \" samples. Avg Time = \" + ( total / num_samples ) + \n \", Min Time = \" + min + \", Max Time = \" + max );\n log.info( \"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\" ); \n }", "public void AlgoTimeTrials() {\n\t\n\tSystem.out.println( \"\\nQuestion (7) AlgoTimeTrials\" );\n\tSystem.out.println( \"---------------------------\");\n\tint start = 100 , end = 1000000 , mult = 10;\n\tint NTrials = 5;\n\tdouble Range = 9.0;\n\tStopWatch watch = new StopWatch();\n\tdouble target = Math.PI;\n\tSystem.out.format( \"%10s %12s %12s %12s\\n\" , \"Size\" , \"AvgSort(us)\" , \"AvgBinary(us)\" , \"AvgLinear(us)\" );\n\tSystem.out.format( \"%10s %12s %12s %12s\\n\" , \"----\" , \"-----------\" , \"-------------\" , \"-------------\" );\n\tfor( int Size = start ; Size <= end ; Size *= mult ) {\n\t double [] sortTimes = new double[NTrials];\n\t double [] binarySearchTimes = new double[NTrials];\n\t double [] linearSearchTimes = new double[NTrials];\n\t for( int i = 0; i < NTrials ; i++ ) {\n\t\tdouble [] A = createRandomDoubleArray(Size,Range);\n\t\tA[A.length-1] = target;\n\t\tsortTimes[i] = getSortTime( A , watch );\n\t\tbinarySearchTimes[i] = getBinarySearchTime(A,target,watch);\n\t\tlinearSearchTimes[i] = getLinearSearchTime(A,target,watch);\n\t }\n\t double avgSort = getAverage( sortTimes );\n\t double avgBinary = getAverage( binarySearchTimes);\n\t double avgLinear = getAverage( linearSearchTimes);\n\t System.out.format( \"%10d %12.1f %12.1f %12.1f\\n\" , Size , avgSort , avgBinary , avgLinear );\n\t}\n }", "private static int getBytes(long r23) {\n /*\n java.lang.ThreadLocal<byte[]> r0 = TEMP_NUMBER_BUFFER\n java.lang.Object r0 = r0.get()\n byte[] r0 = (byte[]) r0\n r1 = 20\n if (r0 != 0) goto L_0x0013\n byte[] r0 = new byte[r1]\n java.lang.ThreadLocal<byte[]> r2 = TEMP_NUMBER_BUFFER\n r2.set(r0)\n L_0x0013:\n r2 = -9223372036854775808\n r4 = 54\n r5 = 57\n r6 = 45\n r7 = 53\n r8 = 56\n r9 = 55\n r10 = 51\n r11 = 50\n r12 = 0\n r13 = 48\n r14 = 1\n int r15 = (r23 > r2 ? 1 : (r23 == r2 ? 0 : -1))\n if (r15 != 0) goto L_0x0076\n r0[r12] = r6\n r0[r14] = r5\n r2 = 2\n r0[r2] = r11\n r2 = 3\n r0[r2] = r11\n r2 = 4\n r0[r2] = r10\n r2 = 5\n r0[r2] = r10\n r2 = 6\n r0[r2] = r9\n r2 = 7\n r0[r2] = r11\n r2 = 8\n r0[r2] = r13\n r2 = 9\n r0[r2] = r10\n r2 = 10\n r0[r2] = r4\n r2 = 11\n r0[r2] = r8\n r2 = 12\n r0[r2] = r7\n r2 = 13\n r3 = 52\n r0[r2] = r3\n r2 = 14\n r0[r2] = r9\n r2 = 15\n r0[r2] = r9\n r2 = 16\n r0[r2] = r7\n r2 = 17\n r0[r2] = r8\n r2 = 18\n r0[r2] = r13\n r2 = 19\n r0[r2] = r8\n return r1\n L_0x0076:\n r1 = 0\n int r3 = (r23 > r1 ? 1 : (r23 == r1 ? 0 : -1))\n if (r3 != 0) goto L_0x007f\n r0[r12] = r13\n return r14\n L_0x007f:\n if (r3 >= 0) goto L_0x0088\n r0[r12] = r6\n long r15 = java.lang.Math.abs(r23)\n goto L_0x008b\n L_0x0088:\n r14 = 0\n r15 = r23\n L_0x008b:\n r17 = 9\n r19 = 10\n r21 = 1\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x0099\n r17 = r21\n goto L_0x017e\n L_0x0099:\n r17 = 99\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00a3\n r17 = r19\n goto L_0x017e\n L_0x00a3:\n r17 = 999(0x3e7, double:4.936E-321)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00ad\n r17 = 100\n goto L_0x017e\n L_0x00ad:\n r17 = 9999(0x270f, double:4.94E-320)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00b7\n r17 = 1000(0x3e8, double:4.94E-321)\n goto L_0x017e\n L_0x00b7:\n r17 = 99999(0x1869f, double:4.9406E-319)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00c2\n r17 = 10000(0x2710, double:4.9407E-320)\n goto L_0x017e\n L_0x00c2:\n r17 = 999999(0xf423f, double:4.94065E-318)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00ce\n r17 = 100000(0x186a0, double:4.94066E-319)\n goto L_0x017e\n L_0x00ce:\n r17 = 9999999(0x98967f, double:4.940656E-317)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00da\n r17 = 1000000(0xf4240, double:4.940656E-318)\n goto L_0x017e\n L_0x00da:\n r17 = 99999999(0x5f5e0ff, double:4.9406564E-316)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00e6\n r17 = 10000000(0x989680, double:4.9406565E-317)\n goto L_0x017e\n L_0x00e6:\n r17 = 999999999(0x3b9ac9ff, double:4.940656453E-315)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x00f2\n r17 = 100000000(0x5f5e100, double:4.94065646E-316)\n goto L_0x017e\n L_0x00f2:\n r17 = 9999999999(0x2540be3ff, double:4.940656458E-314)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x0100\n r17 = 1000000000(0x3b9aca00, double:4.94065646E-315)\n goto L_0x017e\n L_0x0100:\n r17 = 99999999999(0x174876e7ff, double:4.94065645836E-313)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x0110\n r17 = 10000000000(0x2540be400, double:4.9406564584E-314)\n goto L_0x017e\n L_0x0110:\n r17 = 999999999999(0xe8d4a50fff, double:4.940656458408E-312)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x011f\n r17 = 100000000000(0x174876e800, double:4.9406564584E-313)\n goto L_0x017e\n L_0x011f:\n r17 = 9999999999999(0x9184e729fff, double:4.940656458412E-311)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x012e\n r17 = 1000000000000(0xe8d4a51000, double:4.94065645841E-312)\n goto L_0x017e\n L_0x012e:\n r17 = 99999999999999(0x5af3107a3fff, double:4.9406564584124E-310)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x013d\n r17 = 10000000000000(0x9184e72a000, double:4.9406564584125E-311)\n goto L_0x017e\n L_0x013d:\n r17 = 999999999999999(0x38d7ea4c67fff, double:4.94065645841246E-309)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x014c\n r17 = 100000000000000(0x5af3107a4000, double:4.94065645841247E-310)\n goto L_0x017e\n L_0x014c:\n r17 = 9999999999999999(0x2386f26fc0ffff, double:5.431165199810527E-308)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x015b\n r17 = 1000000000000000(0x38d7ea4c68000, double:4.940656458412465E-309)\n goto L_0x017e\n L_0x015b:\n r17 = 99999999999999999(0x16345785d89ffff, double:5.620395787888204E-302)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x016a\n r17 = 10000000000000000(0x2386f26fc10000, double:5.431165199810528E-308)\n goto L_0x017e\n L_0x016a:\n r17 = 999999999999999999(0xde0b6b3a763ffff, double:7.832953389245684E-242)\n int r3 = (r15 > r17 ? 1 : (r15 == r17 ? 0 : -1))\n if (r3 > 0) goto L_0x0179\n r17 = 100000000000000000(0x16345785d8a0000, double:5.620395787888205E-302)\n goto L_0x017e\n L_0x0179:\n r17 = 1000000000000000000(0xde0b6b3a7640000, double:7.832953389245686E-242)\n L_0x017e:\n long r1 = r15 / r17\n int r3 = (int) r1\n switch(r3) {\n case 0: goto L_0x01b6;\n case 1: goto L_0x01af;\n case 2: goto L_0x01aa;\n case 3: goto L_0x01a5;\n case 4: goto L_0x019e;\n case 5: goto L_0x0199;\n case 6: goto L_0x0194;\n case 7: goto L_0x018f;\n case 8: goto L_0x018a;\n case 9: goto L_0x0185;\n default: goto L_0x0184;\n }\n L_0x0184:\n goto L_0x01bb\n L_0x0185:\n int r3 = r14 + 1\n r0[r14] = r5\n goto L_0x01ba\n L_0x018a:\n int r3 = r14 + 1\n r0[r14] = r8\n goto L_0x01ba\n L_0x018f:\n int r3 = r14 + 1\n r0[r14] = r9\n goto L_0x01ba\n L_0x0194:\n int r3 = r14 + 1\n r0[r14] = r4\n goto L_0x01ba\n L_0x0199:\n int r3 = r14 + 1\n r0[r14] = r7\n goto L_0x01ba\n L_0x019e:\n int r3 = r14 + 1\n r6 = 52\n r0[r14] = r6\n goto L_0x01ba\n L_0x01a5:\n int r3 = r14 + 1\n r0[r14] = r10\n goto L_0x01ba\n L_0x01aa:\n int r3 = r14 + 1\n r0[r14] = r11\n goto L_0x01ba\n L_0x01af:\n int r3 = r14 + 1\n r6 = 49\n r0[r14] = r6\n goto L_0x01ba\n L_0x01b6:\n int r3 = r14 + 1\n r0[r14] = r13\n L_0x01ba:\n r14 = r3\n L_0x01bb:\n int r3 = (r17 > r21 ? 1 : (r17 == r21 ? 0 : -1))\n if (r3 != 0) goto L_0x01c0\n goto L_0x01d8\n L_0x01c0:\n java.lang.Long.signum(r17)\n long r1 = r1 * r17\n long r15 = r15 - r1\n r1 = 0\n int r3 = (r15 > r1 ? 1 : (r15 == r1 ? 0 : -1))\n if (r3 != 0) goto L_0x01d9\n L_0x01cc:\n int r1 = (r17 > r21 ? 1 : (r17 == r21 ? 0 : -1))\n if (r1 <= 0) goto L_0x01d8\n int r1 = r14 + 1\n r0[r14] = r13\n long r17 = r17 / r19\n r14 = r1\n goto L_0x01cc\n L_0x01d8:\n return r14\n L_0x01d9:\n long r17 = r17 / r19\n goto L_0x017e\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.unboundid.util.ByteStringBuffer.getBytes(long):int\");\n }" ]
[ "0.6023085", "0.5982408", "0.5950374", "0.5950374", "0.5889459", "0.5876667", "0.58704734", "0.57830584", "0.5782474", "0.57475656", "0.57355666", "0.5733644", "0.5714246", "0.5657022", "0.5594215", "0.5560327", "0.5552504", "0.5518406", "0.55035686", "0.55013317", "0.5497115", "0.54970235", "0.54902625", "0.5459268", "0.5450347", "0.54404634", "0.5433705", "0.5433", "0.54314166", "0.5400418", "0.5398515", "0.5393183", "0.53814584", "0.5378807", "0.53776175", "0.5374148", "0.5368638", "0.53629225", "0.53611034", "0.5359504", "0.53520286", "0.53511053", "0.5350074", "0.5337882", "0.53298146", "0.5322998", "0.5322629", "0.53152335", "0.53040534", "0.5302405", "0.53020126", "0.53005564", "0.52627605", "0.52578014", "0.5257095", "0.52528715", "0.52514434", "0.52512854", "0.52366793", "0.5229239", "0.5222641", "0.5214373", "0.521077", "0.5210028", "0.520824", "0.5207261", "0.52056724", "0.51970214", "0.5196329", "0.5194278", "0.5185313", "0.51725966", "0.5168647", "0.51653785", "0.51611775", "0.5156834", "0.5142873", "0.5141171", "0.51372766", "0.5134734", "0.512962", "0.51277095", "0.5120208", "0.511873", "0.51137406", "0.50979537", "0.50975984", "0.5097572", "0.5092166", "0.50900775", "0.50871646", "0.50860274", "0.5085069", "0.50764537", "0.506959", "0.50687736", "0.50684047", "0.50644326", "0.50627947", "0.5059175", "0.50506043" ]
0.0
-1
/ JADX WARNING: Removed duplicated region for block: B:73:0x0188 / JADX WARNING: Removed duplicated region for block: B:76:0x0193 / JADX WARNING: Removed duplicated region for block: B:79:0x019e
public static java.util.Map<java.lang.String, java.lang.String> getImeiAndMeid() { /* java.lang.String r0 = "PhoneInfoUtil" java.util.HashMap r1 = new java.util.HashMap r1.<init>() r2 = 0 java.lang.StringBuilder r3 = new java.lang.StringBuilder // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } r3.<init>() // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } java.lang.String r4 = "android api: " r3.append(r4) // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } int r4 = android.os.Build.VERSION.SDK_INT // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } r3.append(r4) // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } java.lang.String r4 = "\n" r3.append(r4) // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } java.lang.String r3 = r3.toString() // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } com.tencent.p605ep.commonbase.api.Log.m31483i(r0, r3) // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } android.content.Context r3 = com.tencent.p605ep.commonbase.api.AppContext.getAppContext() // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } java.lang.String r4 = "phone" java.lang.Object r3 = r3.getSystemService(r4) // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } android.telephony.TelephonyManager r3 = (android.telephony.TelephonyManager) r3 // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } int r4 = android.os.Build.VERSION.SDK_INT // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } r5 = 21 if (r4 >= r5) goto L_0x0039 r4 = r2 r8 = r4 goto L_0x0182 L_0x0039: int r4 = android.os.Build.VERSION.SDK_INT // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } r5 = 26 r6 = 0 r7 = 1 if (r4 >= r5) goto L_0x00b3 java.lang.String r4 = r3.getDeviceId(r6) // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } boolean r5 = android.text.TextUtils.isEmpty(r4) // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } r6 = 14 if (r5 != 0) goto L_0x0059 int r5 = r4.length() // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } if (r5 != r6) goto L_0x0056 r5 = r2 r8 = r4 goto L_0x005b L_0x0056: r8 = r2 r5 = r4 goto L_0x005b L_0x0059: r5 = r2 r8 = r5 L_0x005b: java.lang.StringBuilder r9 = new java.lang.StringBuilder // Catch:{ SecurityException -> 0x00ae, all -> 0x00a9 } r9.<init>() // Catch:{ SecurityException -> 0x00ae, all -> 0x00a9 } java.lang.String r10 = "\ngetDeviceId(0): " r9.append(r10) // Catch:{ SecurityException -> 0x00ae, all -> 0x00a9 } r9.append(r4) // Catch:{ SecurityException -> 0x00ae, all -> 0x00a9 } java.lang.String r4 = r9.toString() // Catch:{ SecurityException -> 0x00ae, all -> 0x00a9 } com.tencent.p605ep.commonbase.api.Log.m31483i(r0, r4) // Catch:{ SecurityException -> 0x00ae, all -> 0x00a9 } java.lang.String r3 = r3.getDeviceId(r7) // Catch:{ SecurityException -> 0x00ae, all -> 0x00a9 } boolean r4 = android.text.TextUtils.isEmpty(r3) // Catch:{ SecurityException -> 0x00ae, all -> 0x00a9 } if (r4 != 0) goto L_0x0084 int r4 = r3.length() // Catch:{ SecurityException -> 0x00ae, all -> 0x00a9 } if (r4 != r6) goto L_0x0082 r4 = r2 r8 = r3 goto L_0x0085 L_0x0082: r4 = r3 goto L_0x0085 L_0x0084: r4 = r2 L_0x0085: java.lang.StringBuilder r6 = new java.lang.StringBuilder // Catch:{ SecurityException -> 0x00a7, all -> 0x00a5 } r6.<init>() // Catch:{ SecurityException -> 0x00a7, all -> 0x00a5 } java.lang.String r7 = "\ngetDeviceId(1): " r6.append(r7) // Catch:{ SecurityException -> 0x00a7, all -> 0x00a5 } r6.append(r3) // Catch:{ SecurityException -> 0x00a7, all -> 0x00a5 } java.lang.String r3 = r6.toString() // Catch:{ SecurityException -> 0x00a7, all -> 0x00a5 } com.tencent.p605ep.commonbase.api.Log.m31483i(r0, r3) // Catch:{ SecurityException -> 0x00a7, all -> 0x00a5 } boolean r3 = android.text.TextUtils.equals(r5, r4) // Catch:{ SecurityException -> 0x00a7, all -> 0x00a5 } if (r3 == 0) goto L_0x00a2 r4 = r8 goto L_0x0146 L_0x00a2: r2 = r5 goto L_0x0182 L_0x00a5: r3 = move-exception goto L_0x00ab L_0x00a7: r3 = move-exception goto L_0x00b0 L_0x00a9: r3 = move-exception r4 = r2 L_0x00ab: r2 = r5 goto L_0x0173 L_0x00ae: r3 = move-exception r4 = r2 L_0x00b0: r2 = r5 goto L_0x017f L_0x00b3: java.lang.Class r4 = r3.getClass() // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } java.lang.String r5 = "getMeid" java.lang.Class[] r8 = new java.lang.Class[r7] // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } java.lang.Class r9 = java.lang.Integer.TYPE // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } r8[r6] = r9 // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } java.lang.reflect.Method r4 = r4.getMethod(r5, r8) // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } r4.setAccessible(r7) // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } java.lang.Object[] r5 = new java.lang.Object[r7] // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } java.lang.Integer r8 = java.lang.Integer.valueOf(r6) // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } r5[r6] = r8 // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } java.lang.Object r4 = r4.invoke(r3, r5) // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } java.lang.String r4 = (java.lang.String) r4 // Catch:{ SecurityException -> 0x017c, all -> 0x0170 } java.lang.StringBuilder r5 = new java.lang.StringBuilder // Catch:{ SecurityException -> 0x016c, all -> 0x0168 } r5.<init>() // Catch:{ SecurityException -> 0x016c, all -> 0x0168 } java.lang.String r8 = "\napi 26+, meid: " r5.append(r8) // Catch:{ SecurityException -> 0x016c, all -> 0x0168 } r5.append(r4) // Catch:{ SecurityException -> 0x016c, all -> 0x0168 } java.lang.String r5 = r5.toString() // Catch:{ SecurityException -> 0x016c, all -> 0x0168 } com.tencent.p605ep.commonbase.api.Log.m31483i(r0, r5) // Catch:{ SecurityException -> 0x016c, all -> 0x0168 } java.lang.Class r5 = r3.getClass() // Catch:{ SecurityException -> 0x016c, all -> 0x0168 } java.lang.String r8 = "getImei" java.lang.Class[] r9 = new java.lang.Class[r7] // Catch:{ SecurityException -> 0x016c, all -> 0x0168 } java.lang.Class r10 = java.lang.Integer.TYPE // Catch:{ SecurityException -> 0x016c, all -> 0x0168 } r9[r6] = r10 // Catch:{ SecurityException -> 0x016c, all -> 0x0168 } java.lang.reflect.Method r5 = r5.getMethod(r8, r9) // Catch:{ SecurityException -> 0x016c, all -> 0x0168 } r5.setAccessible(r7) // Catch:{ SecurityException -> 0x016c, all -> 0x0168 } java.lang.Object[] r8 = new java.lang.Object[r7] // Catch:{ SecurityException -> 0x016c, all -> 0x0168 } java.lang.Integer r9 = java.lang.Integer.valueOf(r6) // Catch:{ SecurityException -> 0x016c, all -> 0x0168 } r8[r6] = r9 // Catch:{ SecurityException -> 0x016c, all -> 0x0168 } java.lang.Object r8 = r5.invoke(r3, r8) // Catch:{ SecurityException -> 0x016c, all -> 0x0168 } java.lang.String r8 = (java.lang.String) r8 // Catch:{ SecurityException -> 0x016c, all -> 0x0168 } java.lang.Object[] r9 = new java.lang.Object[r7] // Catch:{ SecurityException -> 0x0162, all -> 0x015c } java.lang.Integer r7 = java.lang.Integer.valueOf(r7) // Catch:{ SecurityException -> 0x0162, all -> 0x015c } r9[r6] = r7 // Catch:{ SecurityException -> 0x0162, all -> 0x015c } java.lang.Object r3 = r5.invoke(r3, r9) // Catch:{ SecurityException -> 0x0162, all -> 0x015c } java.lang.String r3 = (java.lang.String) r3 // Catch:{ SecurityException -> 0x0162, all -> 0x015c } java.lang.StringBuilder r5 = new java.lang.StringBuilder // Catch:{ SecurityException -> 0x0155, all -> 0x014e } r5.<init>() // Catch:{ SecurityException -> 0x0155, all -> 0x014e } java.lang.String r6 = "\napi 26+, imei1: " r5.append(r6) // Catch:{ SecurityException -> 0x0155, all -> 0x014e } r5.append(r8) // Catch:{ SecurityException -> 0x0155, all -> 0x014e } java.lang.String r5 = r5.toString() // Catch:{ SecurityException -> 0x0155, all -> 0x014e } com.tencent.p605ep.commonbase.api.Log.m31483i(r0, r5) // Catch:{ SecurityException -> 0x0155, all -> 0x014e } java.lang.StringBuilder r5 = new java.lang.StringBuilder // Catch:{ SecurityException -> 0x0155, all -> 0x014e } r5.<init>() // Catch:{ SecurityException -> 0x0155, all -> 0x014e } java.lang.String r6 = "\napi 26+, imei2: " r5.append(r6) // Catch:{ SecurityException -> 0x0155, all -> 0x014e } r5.append(r3) // Catch:{ SecurityException -> 0x0155, all -> 0x014e } java.lang.String r5 = r5.toString() // Catch:{ SecurityException -> 0x0155, all -> 0x014e } com.tencent.p605ep.commonbase.api.Log.m31483i(r0, r5) // Catch:{ SecurityException -> 0x0155, all -> 0x014e } boolean r5 = android.text.TextUtils.equals(r8, r3) // Catch:{ SecurityException -> 0x0155, all -> 0x014e } if (r5 == 0) goto L_0x014a r5 = r8 L_0x0146: r8 = r4 r4 = r2 goto L_0x00a2 L_0x014a: r2 = r8 r8 = r4 r4 = r3 goto L_0x0182 L_0x014e: r2 = move-exception r11 = r3 r3 = r2 r2 = r8 r8 = r4 r4 = r11 goto L_0x0173 L_0x0155: r2 = move-exception r11 = r3 r3 = r2 r2 = r8 r8 = r4 r4 = r11 goto L_0x017f L_0x015c: r3 = move-exception r11 = r4 r4 = r2 r2 = r8 r8 = r11 goto L_0x0173 L_0x0162: r3 = move-exception r11 = r4 r4 = r2 r2 = r8 r8 = r11 goto L_0x017f L_0x0168: r3 = move-exception r8 = r4 r4 = r2 goto L_0x0173 L_0x016c: r3 = move-exception r8 = r4 r4 = r2 goto L_0x017f L_0x0170: r3 = move-exception r4 = r2 r8 = r4 L_0x0173: r3.printStackTrace() java.lang.String r5 = "getImeiAndMeid" com.tencent.p605ep.commonbase.api.Log.m31488w(r0, r5, r3) goto L_0x0182 L_0x017c: r3 = move-exception r4 = r2 r8 = r4 L_0x017f: r3.printStackTrace() L_0x0182: boolean r3 = android.text.TextUtils.isEmpty(r8) if (r3 != 0) goto L_0x018d java.lang.String r3 = "meid" r1.put(r3, r8) L_0x018d: boolean r3 = android.text.TextUtils.isEmpty(r2) if (r3 != 0) goto L_0x0198 java.lang.String r3 = "imei1" r1.put(r3, r2) L_0x0198: boolean r3 = android.text.TextUtils.isEmpty(r4) if (r3 != 0) goto L_0x01a3 java.lang.String r3 = "imei2" r1.put(r3, r4) L_0x01a3: java.lang.StringBuilder r3 = new java.lang.StringBuilder r3.<init>() java.lang.String r5 = "meid: " r3.append(r5) r3.append(r8) java.lang.String r3 = r3.toString() com.tencent.p605ep.commonbase.api.Log.m31483i(r0, r3) java.lang.StringBuilder r3 = new java.lang.StringBuilder r3.<init>() java.lang.String r5 = "imei1: " r3.append(r5) r3.append(r2) java.lang.String r2 = r3.toString() com.tencent.p605ep.commonbase.api.Log.m31483i(r0, r2) java.lang.StringBuilder r2 = new java.lang.StringBuilder r2.<init>() java.lang.String r3 = "imei2: " r2.append(r3) r2.append(r4) java.lang.String r2 = r2.toString() com.tencent.p605ep.commonbase.api.Log.m31483i(r0, r2) return r1 */ throw new UnsupportedOperationException("Method not decompiled: com.tencent.p605ep.commonbase.utils.PhoneInfoUtil.getImeiAndMeid():java.util.Map"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test (timeout=180000)\n public void testDegenerateRegions() throws Exception {\n TableName table = TableName.valueOf(\"tableDegenerateRegions\");\n try {\n setupTable(table);\n assertNoErrors(doFsck(conf,false));\n assertEquals(ROWKEYS.length, countRows());\n\n // Now let's mess it up, by adding a region with a duplicate startkey\n HRegionInfo hriDupe =\n createRegion(tbl.getTableDescriptor(), Bytes.toBytes(\"B\"), Bytes.toBytes(\"B\"));\n TEST_UTIL.getHBaseCluster().getMaster().assignRegion(hriDupe);\n TEST_UTIL.getHBaseCluster().getMaster().getAssignmentManager()\n .waitForAssignment(hriDupe);\n ServerName server = regionStates.getRegionServerOfRegion(hriDupe);\n TEST_UTIL.assertRegionOnServer(hriDupe, server, REGION_ONLINE_TIMEOUT);\n\n HBaseFsck hbck = doFsck(conf,false);\n assertErrors(hbck, new ERROR_CODE[] { ERROR_CODE.DEGENERATE_REGION, ERROR_CODE.DUPE_STARTKEYS,\n ERROR_CODE.DUPE_STARTKEYS });\n assertEquals(2, hbck.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows());\n\n // fix the degenerate region.\n doFsck(conf,true);\n\n // check that the degenerate region is gone and no data loss\n HBaseFsck hbck2 = doFsck(conf,false);\n assertNoErrors(hbck2);\n assertEquals(0, hbck2.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows());\n } finally {\n cleanupTable(table);\n }\n }", "@Test (timeout=180000)\n public void testDupeRegion() throws Exception {\n TableName table =\n TableName.valueOf(\"tableDupeRegion\");\n try {\n setupTable(table);\n assertNoErrors(doFsck(conf, false));\n assertEquals(ROWKEYS.length, countRows());\n\n // Now let's mess it up, by adding a region with a duplicate startkey\n HRegionInfo hriDupe =\n createRegion(tbl.getTableDescriptor(), Bytes.toBytes(\"A\"), Bytes.toBytes(\"B\"));\n\n TEST_UTIL.getHBaseCluster().getMaster().assignRegion(hriDupe);\n TEST_UTIL.getHBaseCluster().getMaster().getAssignmentManager()\n .waitForAssignment(hriDupe);\n ServerName server = regionStates.getRegionServerOfRegion(hriDupe);\n TEST_UTIL.assertRegionOnServer(hriDupe, server, REGION_ONLINE_TIMEOUT);\n\n // Yikes! The assignment manager can't tell between diff between two\n // different regions with the same start/endkeys since it doesn't\n // differentiate on ts/regionId! We actually need to recheck\n // deployments!\n while (findDeployedHSI(getDeployedHRIs((HBaseAdmin) admin), hriDupe) == null) {\n Thread.sleep(250);\n }\n\n LOG.debug(\"Finished assignment of dupe region\");\n\n // TODO why is dupe region different from dupe start keys?\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] { ERROR_CODE.DUPE_STARTKEYS,\n ERROR_CODE.DUPE_STARTKEYS});\n assertEquals(2, hbck.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows()); // seems like the \"bigger\" region won.\n\n // fix the degenerate region.\n doFsck(conf,true);\n\n // check that the degenerate region is gone and no data loss\n HBaseFsck hbck2 = doFsck(conf,false);\n assertNoErrors(hbck2);\n assertEquals(0, hbck2.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows());\n } finally {\n cleanupTable(table);\n }\n }", "public void cleanupOldBlocks (long threshTime) ;", "int numberOfBlocksToRemove();", "public int numberOfBlocksToRemove() {\r\n return 105;\r\n }", "public void handlesBlockingRegionDrag() {\r\n \t\tObject[] cells = graph.getDescendants(graph.getSelectionCells());\r\n \t\t// Put cells not in a blocking region to back\r\n \t\tHashSet<Object> putBack = new HashSet<Object>();\r\n \t\tfor (Object cell2 : cells) {\r\n \t\t\tif (cell2 instanceof JmtCell && ((JmtCell) cell2).parentChanged()) {\r\n \t\t\t\t// This cell was moved in, out or between blocking regions\r\n \t\t\t\tJmtCell cell = (JmtCell) cell2;\r\n \t\t\t\tObject key = ((CellComponent) cell.getUserObject()).getKey();\r\n \t\t\t\tObject oldRegionKey, newRegionKey;\r\n \t\t\t\tif (!(cell.getParent() instanceof BlockingRegion)) {\r\n \t\t\t\t\t// Object removed from blocking region\r\n \t\t\t\t\tputBack.add(cell2);\r\n \t\t\t\t\toldRegionKey = ((BlockingRegion) cell.getPrevParent()).getKey();\r\n \t\t\t\t\tmodel.removeRegionStation(oldRegionKey, key);\r\n \t\t\t\t\t// If region is empty, removes region too\r\n \t\t\t\t\tif (model.getBlockingRegionStations(oldRegionKey).size() == 0) {\r\n \t\t\t\t\t\tmodel.deleteBlockingRegion(oldRegionKey);\r\n \t\t\t\t\t}\r\n \t\t\t\t\t// Allow adding of removed objects to a new blocking region\r\n \t\t\t\t\tenableAddBlockingRegion(true);\r\n \t\t\t\t} else if (cell.getPrevParent() instanceof BlockingRegion) {\r\n \t\t\t\t\t// Object changed blocking region\r\n \t\t\t\t\toldRegionKey = ((BlockingRegion) cell.getPrevParent()).getKey();\r\n \t\t\t\t\tmodel.removeRegionStation(oldRegionKey, key);\r\n \t\t\t\t\t// If region is empty, removes region too\r\n \t\t\t\t\tif (model.getBlockingRegionStations(oldRegionKey).size() == 0) {\r\n \t\t\t\t\t\tmodel.deleteBlockingRegion(oldRegionKey);\r\n \t\t\t\t\t}\r\n \t\t\t\t\tnewRegionKey = ((BlockingRegion) cell.getParent()).getKey();\r\n \t\t\t\t\tmodel.addRegionStation(newRegionKey, key);\r\n \t\t\t\t} else {\r\n \t\t\t\t\t// Object added to a blocking region\r\n \t\t\t\t\tnewRegionKey = ((BlockingRegion) cell.getParent()).getKey();\r\n \t\t\t\t\tif (!model.addRegionStation(newRegionKey, key)) {\r\n \t\t\t\t\t\t// object cannot be added to blocking region (for\r\n \t\t\t\t\t\t// example it's a source)\r\n \t\t\t\t\t\tcell.removeFromParent();\r\n \t\t\t\t\t\tgraph.getModel().insert(new Object[] { cell }, null, null, null, null);\r\n \t\t\t\t\t\tputBack.add(cell);\r\n \t\t\t\t\t}\r\n \t\t\t\t\t// Doesn't allow adding of selected objects to a new\r\n \t\t\t\t\t// blocking region\r\n \t\t\t\t\tenableAddBlockingRegion(false);\r\n \t\t\t\t}\r\n \t\t\t\t// Resets parent for this cell\r\n \t\t\t\tcell.resetParent();\r\n \t\t\t}\r\n \t\t\t// Avoid insertion of a blocking region in an other\r\n \t\t\telse if (cell2 instanceof BlockingRegion) {\r\n \t\t\t\tBlockingRegion region = (BlockingRegion) cell2;\r\n \t\t\t\tif (region.getParent() != null) {\r\n \t\t\t\t\tregion.removeFromParent();\r\n \t\t\t\t\tgraph.getModel().insert(new Object[] { region }, null, null, null, null);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\t// Puts cells removed from blocking regiont on background\r\n \t\tgraph.getModel().toBack(putBack.toArray());\r\n \t}", "private void repairGenome() {\n if (checkGenome(this.code)) {\n return;\n }\n int[] counters = new int[8];\n for (int c : code) { counters[c]++; }\n for (int i = 0; i < 8; ++i) {\n if (counters[i] == 0) {\n while (true) {\n int newPos = r.nextInt(GENOME_SIZE);\n if (counters[this.code[newPos]] > 1) {\n counters[this.code[newPos]]--;\n this.code[newPos] = i;\n break;\n }\n }\n }\n }\n }", "@Test\n public void testNonConsecutiveBlocks()\n {\n long blockSize = 1000;\n int noOfBlocks = (int)((testMeta.dataFile.length() / blockSize)\n + (((testMeta.dataFile.length() % blockSize) == 0) ? 0 : 1));\n\n testMeta.blockReader.beginWindow(1);\n\n for (int i = 0; i < 10; i++) {\n for (int j = 0; j < Math.ceil(noOfBlocks / 10.0); j++) {\n int blockNo = 10 * j + i;\n if (blockNo >= noOfBlocks) {\n continue;\n }\n BlockMetadata.FileBlockMetadata blockMetadata = new BlockMetadata.FileBlockMetadata(s3Directory + FILE_1,\n blockNo, blockNo * blockSize,\n blockNo == noOfBlocks - 1 ? testMeta.dataFile.length() : (blockNo + 1) * blockSize,\n blockNo == noOfBlocks - 1, blockNo - 1, testMeta.dataFile.length());\n testMeta.blockReader.blocksMetadataInput.process(blockMetadata);\n }\n }\n\n testMeta.blockReader.endWindow();\n\n List<Object> messages = testMeta.messageSink.collectedTuples;\n Assert.assertEquals(\"No of records\", testMeta.messages.size(), messages.size());\n\n Collections.sort(testMeta.messages, new Comparator<String[]>()\n {\n @Override\n public int compare(String[] rec1, String[] rec2)\n {\n return compareStringArrayRecords(rec1, rec2);\n }\n });\n\n Collections.sort(messages, new Comparator<Object>()\n {\n @Override\n public int compare(Object object1, Object object2)\n {\n String[] rec1 = new String((byte[])object1).split(\",\");\n String[] rec2 = new String((byte[])object2).split(\",\");\n return compareStringArrayRecords(rec1, rec2);\n }\n });\n for (int i = 0; i < messages.size(); i++) {\n byte[] msg = (byte[])messages.get(i);\n Assert.assertTrue(\"line \" + i, Arrays.equals(new String(msg).split(\",\"), testMeta.messages.get(i)));\n }\n }", "@Test (timeout=180000)\n public void testRegionHole() throws Exception {\n TableName table =\n TableName.valueOf(\"tableRegionHole\");\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // Mess it up by leaving a hole in the assignment, meta, and hdfs data\n admin.disableTable(table);\n deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes(\"B\"),\n Bytes.toBytes(\"C\"), true, true, true);\n admin.enableTable(table);\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] {\n ERROR_CODE.HOLE_IN_REGION_CHAIN});\n // holes are separate from overlap groups\n assertEquals(0, hbck.getOverlapGroups(table).size());\n\n // fix hole\n doFsck(conf, true);\n\n // check that hole fixed\n assertNoErrors(doFsck(conf,false));\n assertEquals(ROWKEYS.length - 2 , countRows()); // lost a region so lost a row\n } finally {\n cleanupTable(table);\n }\n }", "public boolean IsDisappearing(){\r\n for (int i = 2; i < 10; i++) {\r\n ArrayList<Block> blocks = blockList.GetBlockList(i);//get all blocks\r\n int[] indexI = new int[blocks.size()], indexJ = new int[blocks.size()];\r\n //put i and j of All blocks with same color on i&j arrays\r\n for (int j = 0; j < indexI.length; j++) {\r\n indexI[j] = blocks.get(j).getI();\r\n indexJ[j] = blocks.get(j).getJ();\r\n }\r\n //check if 2 block beside each other if yes return true\r\n if (CheckBoom(indexI, indexJ))\r\n return true;\r\n else if (blocks.size() == 3) {//else check if there is another block have same color if yes swap on i,j array\r\n int temp = indexI[2];\r\n indexI[2] = indexI[1];\r\n indexI[1] = temp;\r\n temp = indexJ[2];\r\n indexJ[2] = indexJ[1];\r\n indexJ[1] = temp;\r\n if (CheckBoom(indexI, indexJ))//check\r\n return true;\r\n else {//else check from another side\r\n temp = indexI[0];\r\n indexI[0] = indexI[2];\r\n indexI[2] = temp;\r\n temp = indexJ[0];\r\n indexJ[0] = indexJ[2];\r\n indexJ[2] = temp;\r\n if (CheckBoom(indexI, indexJ))//check\r\n return true;\r\n }\r\n }\r\n }\r\n //if not return true so its false\r\n return false;\r\n }", "@Test(timeout=120000)\n public void testMissingFirstRegion() throws Exception {\n TableName table = TableName.valueOf(\"testMissingFirstRegion\");\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // Mess it up by leaving a hole in the assignment, meta, and hdfs data\n admin.disableTable(table);\n deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes(\"\"), Bytes.toBytes(\"A\"), true,\n true, true);\n admin.enableTable(table);\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] { ERROR_CODE.FIRST_REGION_STARTKEY_NOT_EMPTY });\n // fix hole\n doFsck(conf, true);\n // check that hole fixed\n assertNoErrors(doFsck(conf, false));\n } finally {\n cleanupTable(table);\n }\n }", "public void collapseBlocks() {\n // Create it if it's null\n if (graph_bcc == null) {\n // Create graph parametrics (Only add linear time algorithms here...)\n graph_bcc = new BiConnectedComponents(graph);\n graph2p_bcc = new BiConnectedComponents(new UniTwoPlusDegreeGraph(graph));\n }\n BiConnectedComponents bcc = graph_bcc, bcc_2p = graph2p_bcc; if (bcc != null && bcc_2p != null) {\n // Get the vertex to block lookup\n Map<String,Set<MyGraph>> v_to_b = bcc.getVertexToBlockMap();\n // Go through the entities and accumulate the positions\n Map<MyGraph,Double> x_sum = new HashMap<MyGraph,Double>(), y_sum = new HashMap<MyGraph,Double>();\n Iterator<String> it_e = entity_to_wxy.keySet().iterator();\n while (it_e.hasNext()) {\n String entity = it_e.next(); Point2D pt = entity_to_wxy.get(entity);\n\tif (v_to_b.containsKey(entity)) {\n\t Iterator<MyGraph> it_mg = v_to_b.get(entity).iterator();\n\t while (it_mg.hasNext()) {\n\t MyGraph mg = it_mg.next();\n\t if (x_sum.containsKey(mg) == false) { x_sum.put(mg,0.0); y_sum.put(mg,0.0); }\n\t x_sum.put(mg,x_sum.get(mg)+pt.getX()); y_sum.put(mg,y_sum.get(mg)+pt.getY());\n\t }\n } else System.err.println(\"Vertex To Block Lookup missing \\\"\" + entity + \"\\\"\");\n }\n // Now position those entities that aren't cut vertices at the center of the graph\n it_e = entity_to_wxy.keySet().iterator();\n while (it_e.hasNext()) {\n String entity = it_e.next(); Point2D pt = entity_to_wxy.get(entity);\n\tif (v_to_b.containsKey(entity) && bcc.getCutVertices().contains(entity) == false) {\n MyGraph mg = v_to_b.get(entity).iterator().next();\n\t entity_to_wxy.put(entity, new Point2D.Double(x_sum.get(mg)/mg.getNumberOfEntities(),y_sum.get(mg)/mg.getNumberOfEntities()));\n\t transform(entity);\n\t}\n }\n // Re-render\n zoomToFit(); repaint();\n }\n }", "int regionSplitBits4DownSampledTable();", "@Override\r\n public int numberOfBlocksToRemove() {\r\n return blocks().size();\r\n }", "@Test (timeout=180000)\n public void testSidelineOverlapRegion() throws Exception {\n TableName table =\n TableName.valueOf(\"testSidelineOverlapRegion\");\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // Mess it up by creating an overlap\n MiniHBaseCluster cluster = TEST_UTIL.getHBaseCluster();\n HMaster master = cluster.getMaster();\n HRegionInfo hriOverlap1 =\n createRegion(tbl.getTableDescriptor(), Bytes.toBytes(\"A\"), Bytes.toBytes(\"AB\"));\n master.assignRegion(hriOverlap1);\n master.getAssignmentManager().waitForAssignment(hriOverlap1);\n HRegionInfo hriOverlap2 =\n createRegion(tbl.getTableDescriptor(), Bytes.toBytes(\"AB\"), Bytes.toBytes(\"B\"));\n master.assignRegion(hriOverlap2);\n master.getAssignmentManager().waitForAssignment(hriOverlap2);\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] {ERROR_CODE.DUPE_STARTKEYS,\n ERROR_CODE.DUPE_STARTKEYS, ERROR_CODE.OVERLAP_IN_REGION_CHAIN});\n assertEquals(3, hbck.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows());\n\n // mess around the overlapped regions, to trigger NotServingRegionException\n Multimap<byte[], HbckInfo> overlapGroups = hbck.getOverlapGroups(table);\n ServerName serverName = null;\n byte[] regionName = null;\n for (HbckInfo hbi: overlapGroups.values()) {\n if (\"A\".equals(Bytes.toString(hbi.getStartKey()))\n && \"B\".equals(Bytes.toString(hbi.getEndKey()))) {\n regionName = hbi.getRegionName();\n\n // get an RS not serving the region to force bad assignment info in to META.\n int k = cluster.getServerWith(regionName);\n for (int i = 0; i < 3; i++) {\n if (i != k) {\n HRegionServer rs = cluster.getRegionServer(i);\n serverName = rs.getServerName();\n break;\n }\n }\n\n HBaseFsckRepair.closeRegionSilentlyAndWait((HConnection) connection,\n cluster.getRegionServer(k).getServerName(), hbi.getHdfsHRI());\n admin.offline(regionName);\n break;\n }\n }\n\n assertNotNull(regionName);\n assertNotNull(serverName);\n try (Table meta = connection.getTable(TableName.META_TABLE_NAME, tableExecutorService)) {\n Put put = new Put(regionName);\n put.add(HConstants.CATALOG_FAMILY, HConstants.SERVER_QUALIFIER,\n Bytes.toBytes(serverName.getHostAndPort()));\n meta.put(put);\n }\n\n // fix the problem.\n HBaseFsck fsck = new HBaseFsck(conf, hbfsckExecutorService);\n fsck.connect();\n fsck.setDisplayFullReport(); // i.e. -details\n fsck.setTimeLag(0);\n fsck.setFixAssignments(true);\n fsck.setFixMeta(true);\n fsck.setFixHdfsHoles(true);\n fsck.setFixHdfsOverlaps(true);\n fsck.setFixHdfsOrphans(true);\n fsck.setFixVersionFile(true);\n fsck.setSidelineBigOverlaps(true);\n fsck.setMaxMerge(2);\n fsck.onlineHbck();\n fsck.close();\n\n // verify that overlaps are fixed, and there are less rows\n // since one region is sidelined.\n HBaseFsck hbck2 = doFsck(conf,false);\n assertNoErrors(hbck2);\n assertEquals(0, hbck2.getOverlapGroups(table).size());\n assertTrue(ROWKEYS.length > countRows());\n } finally {\n cleanupTable(table);\n }\n }", "public void MeasureMovement(int[] dupCellID, int numslices, int b){\r\n\t\tfor (int x = 1; x < b; x = x + 1){ \r\n\t\t\tIJ.selectWindow(dupCellID[x]);\r\n\t\t\tImagePlus TheDuplicate = WindowManager.getCurrentImage();\r\n\t\t\tIJ.run(\"Threshold...\",\"method='Default'\");\r\n\t\t\tnew WaitForUserDialog(\"Threshold\", \"Threshold yeast cell to select the nucleus, then click OK.\").show();\r\n\t\t\tResultsTable res = new ResultsTable();\r\n\t\t\tdouble[] SliceNumY = new double[numslices];\r\n\t\t\tdouble[] SliceNumX = new double[numslices];\r\n\t\t\t\tfor(int z = 1; z < numslices; z = z+1) {\r\n\t\t\t\t\tTheDuplicate.setSlice(z);\r\n\t\t\t\t\tIJ.run(TheDuplicate, \"Analyze Particles...\", \"size=100-550 pixel circularity=0.00-1.00 show=Nothing display clear include add slice\");\r\n\t\t\t\t\tres = Analyzer.getResultsTable();\r\n\t\t\t\t\t\r\n\t\t\t\t\tint MaxY = TheDuplicate.getHeight();\r\n\t\t\t\t\tint Midpoint = MaxY/2; \r\n\t\t\t\t\tint MaxCount = res.getCounter();\r\n\t\t\t\t\tdouble yVal = 0;\r\n\t\t\t\t\tdouble xVal = 0;\r\n\t\t\t\t\tif (MaxCount > 1){\r\n\t\t\t\t\t\tfor (int c = 0; c < (MaxCount - 1); c = c + 1){\r\n\t\t\t\t\t\t\tyVal = res.getValueAsDouble(7, c);\r\n\t\t\t\t\t\t\txVal = res.getValueAsDouble(6, c);\r\n\t\t\t\t\t\t\tif (Math.abs((yVal/0.13) - Midpoint) <= 10 ){\r\n\t\t\t\t\t\t\t\tyVal = res.getValueAsDouble(7, c);\r\n\t\t\t\t\t\t\t\txVal = res.getValueAsDouble(6, c);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * if statement to only record the centre X Y \r\n\t\t\t\t\t * coordinate of the nucleus when 1 object has \r\n\t\t\t\t\t * been found. If more than 1 object is identified\r\n\t\t\t\t\t * then the XY coordinates default to zero to prevent \r\n\t\t\t\t\t * other fluorescent cell components from skewing the data\r\n\t\t\t\t\t */\r\n\t\t\t\t\tif (MaxCount > 0 && MaxCount <2) {\r\n\t\t\t\t\t\tyVal = res.getValueAsDouble(7, 0);\r\n\t\t\t\t\t\txVal = res.getValueAsDouble(6, 0);\r\n\t\t\t\t\t\tSliceNumY[z] = yVal;\r\n\t\t\t\t\t\tSliceNumX[z] = xVal; \r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\tSliceNumY[z] = 0;\r\n\t\t\t\t\t\tSliceNumX[z] = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\toutputinfo(SliceNumY, SliceNumX, numslices); //Write the results to text file\r\n\t\t\tTheDuplicate.changes = false;\t\r\n\t\t\tTheDuplicate.close();\r\n\t\t}\r\n\t}", "void scanunique() {\n\t\tint oldline, newline;\n\t\tnode psymbol;\n\n\t\tfor (newline = 1; newline <= newinfo.maxLine; newline++) {\n\t\t\tpsymbol = newinfo.symbol[newline];\n\t\t\tif (psymbol.symbolIsUnique()) { // 1 use in each file\n\t\t\t\toldline = psymbol.linenum;\n\t\t\t\tnewinfo.other[newline] = oldline; // record 1-1 map\n\t\t\t\toldinfo.other[oldline] = newline;\n\t\t\t}\n\t\t}\n\t\tnewinfo.other[0] = 0;\n\t\toldinfo.other[0] = 0;\n\t\tnewinfo.other[newinfo.maxLine + 1] = oldinfo.maxLine + 1;\n\t\toldinfo.other[oldinfo.maxLine + 1] = newinfo.maxLine + 1;\n\t}", "@Override\n \tpublic void regionsRemoved(RegionEvent evt) {\n \t\t\n \t}", "@Test\n public void testColocatedPartitionedRegion_NoFullPath() throws Throwable {\n createCacheInAllVms();\n redundancy = 0;\n localMaxmemory = 50;\n totalNumBuckets = 11;\n\n regionName = \"A\";\n colocatedWith = null;\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"B\";\n colocatedWith = \"A\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"C\";\n colocatedWith = \"A\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"D\";\n colocatedWith = \"B\";\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"E\";\n colocatedWith = \"B\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"F\";\n colocatedWith = \"B\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"G\";\n colocatedWith = \"C\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"H\";\n colocatedWith = \"C\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"I\";\n colocatedWith = \"C\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"J\";\n colocatedWith = \"D\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"K\";\n colocatedWith = \"D\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"L\";\n colocatedWith = \"E\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"M\";\n colocatedWith = \"F\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"N\";\n colocatedWith = \"G\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"O\";\n colocatedWith = \"I\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n accessor.invoke(() -> PRColocationDUnitTest.validateColocatedRegions(\"A\"));\n\n accessor.invoke(() -> PRColocationDUnitTest.validateColocatedRegions(\"D\"));\n\n accessor.invoke(() -> PRColocationDUnitTest.validateColocatedRegions(\"H\"));\n\n accessor.invoke(() -> PRColocationDUnitTest.validateColocatedRegions(\"B\"));\n\n accessor.invoke(() -> PRColocationDUnitTest.validateColocatedRegions(\"K\"));\n }", "public abstract void removeBlock();", "void ompleBlocsHoritzontals() {\r\n\r\n for (int i = 0; i < N; i = i + SRN) // for diagonal box, start coordinates->i==j \r\n {\r\n ompleBloc(i, i);\r\n }\r\n }", "int regionSplitBits4PVTable();", "public void RemoveBlock(int NumOfB,ArrayList<Block> blocks,int[] i,int[] j){\r\n try {\r\n //2 blocks\r\n if (NumOfB == 2) {\r\n //update BlockList and map matrix\r\n map[i[0]][j[0]] = '0';\r\n map[i[1]][j[1]] = '0';\r\n blockList.RemovBlock(blockList.getBlock(blocks.get(0).getTypeOfBlock(), i[1], j[1]), blocks.get(1).getTypeOfBlock());\r\n blockList.RemovBlock(blockList.getBlock(blocks.get(0).getTypeOfBlock(), i[0], j[0]), blocks.get(0).getTypeOfBlock());\r\n }\r\n //3 blocks\r\n else {\r\n //update BlockList and map matrix\r\n map[i[0]][j[0]] = '0';\r\n map[i[1]][j[1]] = '0';\r\n map[i[2]][j[2]] = '0';\r\n blockList.RemovBlock(blocks.get(2), blocks.get(2).getTypeOfBlock());\r\n blockList.RemovBlock(blocks.get(1), blocks.get(1).getTypeOfBlock());\r\n blockList.RemovBlock(blocks.get(0), blocks.get(0).getTypeOfBlock());\r\n }\r\n gamePage.Sounds(2);//remove sound\r\n MoveBlock(2);//check if there is block will move down\r\n }catch (ArrayIndexOutOfBoundsException e) {\r\n\r\n }\r\n }", "public void remove( int position )\n {\n caller = \"remove\";\n byte byteSize = memoryPool[position];\n Integer size = (int)byteSize;\n // remove the record starting at the given position\n for ( int i = 0; i < size; i++ )\n {\n memoryPool[position + i] = 0;\n }\n\n findBlock( position );\n freeBlock = new HashMap<Integer, Integer>( 1 );\n freeBlock.put( position, size );\n freeBlockList.add( freeBlock );\n Object[] keyArray =\n freeBlockList.getCurrentElement().keySet().toArray();\n int key = (Integer)keyArray[0];\n\n caller = \"check\";\n int currentValue = freeBlockList.getCurrentElement().get( key );\n int mergePoint1 = position + currentValue;\n int rightKeyMatch = findBlock( mergePoint1 );\n\n int mergePoint2 = position;\n int leftKeyMatch = -1;\n int priorValue = -1;\n int key2 = -1;\n if ( 1==1)\n {\n findBlock(mergePoint2);\n freeBlockList.previous();\n if ( !( freeBlockList.getCurrent().equals( freeBlockList.getHead() ) )\n && !( freeBlockList.getCurrent().equals( freeBlockList.getTail() ) ) &&\n !( freeBlockList.getCurrent().equals( null )))\n {\n Object[] keyArray2 =\n freeBlockList.getCurrentElement().keySet().toArray();\n key2 = (Integer)keyArray2[0];\n priorValue = freeBlockList.getCurrentElement().get( key2 );\n leftKeyMatch = key2 + priorValue;\n }\n\n }\n\n if ( rightKeyMatch == mergePoint1 )\n {\n findBlock(mergePoint1);\n freeBlockList.previous();\n freeBlockList.removeCurrent();\n int rightValue =\n freeBlockList.getCurrentElement().get( rightKeyMatch );\n\n freeBlockList.getCurrentElement().clear();\n freeBlockList.getCurrentElement().put(\n position,\n currentValue + rightValue );\n //if()\n }\n if(leftKeyMatch == mergePoint2) {\n findBlock(mergePoint2);\n freeBlockList.previous();\n freeBlockList.removeCurrent();\n int rightValue =\n freeBlockList.getCurrentElement().get(leftKeyMatch);\n\n freeBlockList.getCurrentElement().clear();\n freeBlockList.getCurrentElement().put(\n key2,\n priorValue + rightValue );\n }\n\n }", "@Test (timeout=180000)\n public void testMissingRegionInfoQualifier() throws Exception {\n Connection connection = ConnectionFactory.createConnection(conf);\n TableName table = TableName.valueOf(\"testMissingRegionInfoQualifier\");\n try {\n setupTable(table);\n\n // Mess it up by removing the RegionInfo for one region.\n final List<Delete> deletes = new LinkedList<Delete>();\n Table meta = connection.getTable(TableName.META_TABLE_NAME, hbfsckExecutorService);\n MetaScanner.metaScan(connection, new MetaScanner.MetaScannerVisitor() {\n\n @Override\n public boolean processRow(Result rowResult) throws IOException {\n HRegionInfo hri = MetaTableAccessor.getHRegionInfo(rowResult);\n if (hri != null && !hri.getTable().isSystemTable()) {\n Delete delete = new Delete(rowResult.getRow());\n delete.addColumn(HConstants.CATALOG_FAMILY, HConstants.REGIONINFO_QUALIFIER);\n deletes.add(delete);\n }\n return true;\n }\n\n @Override\n public void close() throws IOException {\n }\n });\n meta.delete(deletes);\n\n // Mess it up by creating a fake hbase:meta entry with no associated RegionInfo\n meta.put(new Put(Bytes.toBytes(table + \",,1361911384013.810e28f59a57da91c66\")).add(\n HConstants.CATALOG_FAMILY, HConstants.SERVER_QUALIFIER, Bytes.toBytes(\"node1:60020\")));\n meta.put(new Put(Bytes.toBytes(table + \",,1361911384013.810e28f59a57da91c66\")).add(\n HConstants.CATALOG_FAMILY, HConstants.STARTCODE_QUALIFIER, Bytes.toBytes(1362150791183L)));\n meta.close();\n\n HBaseFsck hbck = doFsck(conf, false);\n assertTrue(hbck.getErrors().getErrorList().contains(ERROR_CODE.EMPTY_META_CELL));\n\n // fix reference file\n hbck = doFsck(conf, true);\n\n // check that reference file fixed\n assertFalse(hbck.getErrors().getErrorList().contains(ERROR_CODE.EMPTY_META_CELL));\n } finally {\n cleanupTable(table);\n }\n connection.close();\n }", "@Test (timeout=180000)\n public void testLingeringSplitParent() throws Exception {\n TableName table =\n TableName.valueOf(\"testLingeringSplitParent\");\n Table meta = null;\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // make sure data in regions, if in wal only there is no data loss\n admin.flush(table);\n HRegionLocation location = tbl.getRegionLocation(\"B\");\n\n // Delete one region from meta, but not hdfs, unassign it.\n deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes(\"B\"),\n Bytes.toBytes(\"C\"), true, true, false);\n\n // Create a new meta entry to fake it as a split parent.\n meta = connection.getTable(TableName.META_TABLE_NAME, tableExecutorService);\n HRegionInfo hri = location.getRegionInfo();\n\n HRegionInfo a = new HRegionInfo(tbl.getName(),\n Bytes.toBytes(\"B\"), Bytes.toBytes(\"BM\"));\n HRegionInfo b = new HRegionInfo(tbl.getName(),\n Bytes.toBytes(\"BM\"), Bytes.toBytes(\"C\"));\n\n hri.setOffline(true);\n hri.setSplit(true);\n\n MetaTableAccessor.addRegionToMeta(meta, hri, a, b);\n meta.close();\n admin.flush(TableName.META_TABLE_NAME);\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] {\n ERROR_CODE.LINGERING_SPLIT_PARENT, ERROR_CODE.HOLE_IN_REGION_CHAIN});\n\n // regular repair cannot fix lingering split parent\n hbck = doFsck(conf, true);\n assertErrors(hbck, new ERROR_CODE[] {\n ERROR_CODE.LINGERING_SPLIT_PARENT, ERROR_CODE.HOLE_IN_REGION_CHAIN });\n assertFalse(hbck.shouldRerun());\n hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] {\n ERROR_CODE.LINGERING_SPLIT_PARENT, ERROR_CODE.HOLE_IN_REGION_CHAIN});\n\n // fix lingering split parent\n hbck = new HBaseFsck(conf, hbfsckExecutorService);\n hbck.connect();\n hbck.setDisplayFullReport(); // i.e. -details\n hbck.setTimeLag(0);\n hbck.setFixSplitParents(true);\n hbck.onlineHbck();\n assertTrue(hbck.shouldRerun());\n hbck.close();\n\n Get get = new Get(hri.getRegionName());\n Result result = meta.get(get);\n assertTrue(result.getColumnCells(HConstants.CATALOG_FAMILY,\n HConstants.SPLITA_QUALIFIER).isEmpty());\n assertTrue(result.getColumnCells(HConstants.CATALOG_FAMILY,\n HConstants.SPLITB_QUALIFIER).isEmpty());\n admin.flush(TableName.META_TABLE_NAME);\n\n // fix other issues\n doFsck(conf, true);\n\n // check that all are fixed\n assertNoErrors(doFsck(conf, false));\n assertEquals(ROWKEYS.length, countRows());\n } finally {\n cleanupTable(table);\n IOUtils.closeQuietly(meta);\n }\n }", "@Test\n public void testColocatedPartitionedRegion() throws Throwable {\n createCacheInAllVms();\n redundancy = 0;\n localMaxmemory = 50;\n totalNumBuckets = 11;\n\n regionName = \"A\";\n colocatedWith = null;\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"B\";\n colocatedWith = SEPARATOR + \"A\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"C\";\n colocatedWith = SEPARATOR + \"A\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"D\";\n colocatedWith = SEPARATOR + \"B\";\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"E\";\n colocatedWith = SEPARATOR + \"B\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"F\";\n colocatedWith = SEPARATOR + \"B\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"G\";\n colocatedWith = SEPARATOR + \"C\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"H\";\n colocatedWith = SEPARATOR + \"C\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"I\";\n colocatedWith = SEPARATOR + \"C\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"J\";\n colocatedWith = SEPARATOR + \"D\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"K\";\n colocatedWith = SEPARATOR + \"D\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"L\";\n colocatedWith = SEPARATOR + \"E\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"M\";\n colocatedWith = SEPARATOR + \"F\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"N\";\n colocatedWith = SEPARATOR + \"G\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n regionName = \"O\";\n colocatedWith = SEPARATOR + \"I\";\n isPartitionResolver = Boolean.TRUE;\n attributeObjects = new Object[] {regionName, redundancy, localMaxmemory, totalNumBuckets,\n colocatedWith, isPartitionResolver};\n createPartitionedRegion(attributeObjects);\n\n accessor.invoke(() -> PRColocationDUnitTest.validateColocatedRegions(\"A\"));\n\n accessor.invoke(() -> PRColocationDUnitTest.validateColocatedRegions(\"D\"));\n\n accessor.invoke(() -> PRColocationDUnitTest.validateColocatedRegions(\"H\"));\n\n accessor.invoke(() -> PRColocationDUnitTest.validateColocatedRegions(\"B\"));\n\n accessor.invoke(() -> PRColocationDUnitTest.validateColocatedRegions(\"K\"));\n }", "@Test\n public void tesInvalidateMissingBlock() throws Exception {\n long blockSize = 1024;\n int heatbeatInterval = 1;\n HdfsConfiguration c = new HdfsConfiguration();\n c.setInt(DFSConfigKeys.DFS_HEARTBEAT_INTERVAL_KEY, heatbeatInterval);\n c.setLong(DFS_BLOCK_SIZE_KEY, blockSize);\n MiniDFSCluster cluster = new MiniDFSCluster.Builder(c).\n numDataNodes(1).build();\n try {\n cluster.waitActive();\n DFSTestUtil.createFile(cluster.getFileSystem(), new Path(\"/a\"),\n blockSize, (short)1, 0);\n\n String bpid = cluster.getNameNode().getNamesystem().getBlockPoolId();\n DataNode dn = cluster.getDataNodes().get(0);\n FsDatasetImpl fsdataset = (FsDatasetImpl) dn.getFSDataset();\n List<ReplicaInfo> replicaInfos = fsdataset.getFinalizedBlocks(bpid);\n assertEquals(1, replicaInfos.size());\n\n ReplicaInfo replicaInfo = replicaInfos.get(0);\n String blockPath = replicaInfo.getBlockURI().getPath();\n String metaPath = replicaInfo.getMetadataURI().getPath();\n File blockFile = new File(blockPath);\n File metaFile = new File(metaPath);\n\n // Mock local block file not found when disk with some exception.\n fsdataset.invalidateMissingBlock(bpid, replicaInfo);\n\n // Assert local block file wouldn't be deleted from disk.\n assertTrue(blockFile.exists());\n // Assert block info would be removed from ReplicaMap.\n assertEquals(\"null\",\n fsdataset.getReplicaString(bpid, replicaInfo.getBlockId()));\n BlockManager blockManager = cluster.getNameNode().\n getNamesystem().getBlockManager();\n GenericTestUtils.waitFor(() ->\n blockManager.getLowRedundancyBlocksCount() == 1, 100, 5000);\n\n // Mock local block file found when disk back to normal.\n FsVolumeSpi.ScanInfo info = new FsVolumeSpi.ScanInfo(\n replicaInfo.getBlockId(), blockFile.getParentFile().getAbsoluteFile(),\n blockFile.getName(), metaFile.getName(), replicaInfo.getVolume());\n fsdataset.checkAndUpdate(bpid, info);\n GenericTestUtils.waitFor(() ->\n blockManager.getLowRedundancyBlocksCount() == 0, 100, 5000);\n } finally {\n cluster.shutdown();\n }\n }", "private void cleanProblematicOverlappedRegions(RegionLocations locations) {\n RegionInfo region = locations.getRegionLocation().getRegion();\n\n boolean isLast = isEmptyStopRow(region.getEndKey());\n\n while (true) {\n Map.Entry<byte[], RegionLocations> overlap =\n isLast ? cache.lastEntry() : cache.lowerEntry(region.getEndKey());\n if (\n overlap == null || overlap.getValue() == locations\n || Bytes.equals(overlap.getKey(), region.getStartKey())\n ) {\n break;\n }\n\n if (LOG.isDebugEnabled()) {\n LOG.debug(\n \"Removing cached location {} (endKey={}) because it overlaps with \"\n + \"new location {} (endKey={})\",\n overlap.getValue(),\n Bytes.toStringBinary(overlap.getValue().getRegionLocation().getRegion().getEndKey()),\n locations, Bytes.toStringBinary(locations.getRegionLocation().getRegion().getEndKey()));\n }\n\n cache.remove(overlap.getKey());\n }\n }", "public static void fix(World world) {\n \t\tFile regionFolder = new File(Bukkit.getWorldContainer() + File.separator + world.getName() + File.separator + \"region\");\r\n \t\tif (regionFolder.exists()) {\r\n \t\t\t// Loop through all region files of the world\r\n \t\t\tint dx, dz;\r\n \t\t\tint rx, rz;\r\n \t\t\tfor (String regionFileName : regionFolder.list()) {\r\n \t\t\t\t// Validate file\r\n \t\t\t\tFile file = new File(regionFolder + File.separator + regionFileName);\r\n \t\t\t\tif (!file.isFile() || !file.exists()) {\r\n \t\t\t\t\tcontinue;\r\n \t\t\t\t}\r\n \t\t\t\tString[] parts = regionFileName.split(\"\\\\.\");\r\n \t\t\t\tif (parts.length != 4 || !parts[0].equals(\"r\") || !parts[3].equals(\"mca\")) {\r\n \t\t\t\t\tcontinue;\r\n \t\t\t\t}\r\n \t\t\t\t// Obtain the chunk offset of this region file\r\n \t\t\t\ttry {\r\n \t\t\t\t\trx = Integer.parseInt(parts[1]) << 5;\r\n \t\t\t\t\trz = Integer.parseInt(parts[2]) << 5;\r\n \t\t\t\t} catch (Exception ex) {\r\n \t\t\t\t\tcontinue;\r\n \t\t\t\t}\r\n \r\n \t\t\t\t// Is it contained in the cache?\r\n \t\t\t\tReference<RegionFile> ref = RegionFileCacheRef.FILES.get(file);\r\n \t\t\t\tRegionFile reg = null;\r\n \t\t\t\tif (ref != null) {\r\n \t\t\t\t\treg = ref.get();\r\n \t\t\t\t}\r\n \t\t\t\tboolean closeOnFinish = false;\r\n \t\t\t\tif (reg == null) {\r\n \t\t\t\t\tcloseOnFinish = true;\r\n \t\t\t\t\t// Manually load this region file\r\n \t\t\t\t\treg = new RegionFile(file);\r\n \t\t\t\t}\r\n \t\t\t\t// Obtain all generated chunks in this region file\r\n \t\t\t\tfor (dx = 0; dx < 32; dx++) {\r\n \t\t\t\t\tfor (dz = 0; dz < 32; dz++) {\r\n \t\t\t\t\t\tif (reg.c(dx, dz)) {\r\n \t\t\t\t\t\t\t// Region file exists - add it\r\n\t\t\t\t\t\t\tfix(world, rx + dx, rz + dz, 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\tif (closeOnFinish) {\r\n \t\t\t\t\t// Close the region file stream - we are done with it\r\n \t\t\t\t\treg.c();\r\n \t\t\t\t}\r\n \t\t\t}\r\n\t\t} else {\r\n\t\t\tNoLagg.plugin.log(Level.WARNING, \"Failed to fix world '\" + world.getName() + \"': Region folder is missing!\");\r\n \t\t}\r\n \t}", "@Test\r\n\t@Ignore\r\n\tpublic void shouldReturnLisOfBrokenByRegion() {\n\t}", "@Test (timeout=180000)\n public void testHDFSRegioninfoMissing() throws Exception {\n TableName table = TableName.valueOf(\"tableHDFSRegioninfoMissing\");\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // Mess it up by leaving a hole in the meta data\n admin.disableTable(table);\n deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes(\"B\"),\n Bytes.toBytes(\"C\"), true, true, false, true, HRegionInfo.DEFAULT_REPLICA_ID);\n TEST_UTIL.getHBaseAdmin().enableTable(table);\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] {\n ERROR_CODE.ORPHAN_HDFS_REGION,\n ERROR_CODE.NOT_IN_META_OR_DEPLOYED,\n ERROR_CODE.HOLE_IN_REGION_CHAIN});\n // holes are separate from overlap groups\n assertEquals(0, hbck.getOverlapGroups(table).size());\n\n // fix hole\n doFsck(conf, true);\n\n // check that hole fixed\n assertNoErrors(doFsck(conf, false));\n assertEquals(ROWKEYS.length, countRows());\n } finally {\n cleanupTable(table);\n }\n }", "public void a()\r\n/* 49: */ {\r\n/* 50: 64 */ HashSet<BlockPosition> localHashSet = Sets.newHashSet();\r\n/* 51: */ \r\n/* 52: 66 */ int m = 16;\r\n/* 53: 67 */ for (int n = 0; n < 16; n++) {\r\n/* 54: 68 */ for (int i1 = 0; i1 < 16; i1++) {\r\n/* 55: 69 */ for (int i2 = 0; i2 < 16; i2++) {\r\n/* 56: 70 */ if ((n == 0) || (n == 15) || (i1 == 0) || (i1 == 15) || (i2 == 0) || (i2 == 15))\r\n/* 57: */ {\r\n/* 58: 74 */ double d1 = n / 15.0F * 2.0F - 1.0F;\r\n/* 59: 75 */ double d2 = i1 / 15.0F * 2.0F - 1.0F;\r\n/* 60: 76 */ double d3 = i2 / 15.0F * 2.0F - 1.0F;\r\n/* 61: 77 */ double d4 = Math.sqrt(d1 * d1 + d2 * d2 + d3 * d3);\r\n/* 62: */ \r\n/* 63: 79 */ d1 /= d4;\r\n/* 64: 80 */ d2 /= d4;\r\n/* 65: 81 */ d3 /= d4;\r\n/* 66: */ \r\n/* 67: 83 */ float f2 = this.i * (0.7F + this.d.rng.nextFloat() * 0.6F);\r\n/* 68: 84 */ double d6 = this.e;\r\n/* 69: 85 */ double d8 = this.f;\r\n/* 70: 86 */ double d10 = this.g;\r\n/* 71: */ \r\n/* 72: 88 */ float f3 = 0.3F;\r\n/* 73: 89 */ while (f2 > 0.0F)\r\n/* 74: */ {\r\n/* 75: 90 */ BlockPosition localdt = new BlockPosition(d6, d8, d10);\r\n/* 76: 91 */ Block localbec = this.d.getBlock(localdt);\r\n/* 77: 93 */ if (localbec.getType().getMaterial() != Material.air)\r\n/* 78: */ {\r\n/* 79: 94 */ float f4 = this.h != null ? this.h.a(this, this.d, localdt, localbec) : localbec.getType().a((Entity)null);\r\n/* 80: 95 */ f2 -= (f4 + 0.3F) * 0.3F;\r\n/* 81: */ }\r\n/* 82: 98 */ if ((f2 > 0.0F) && ((this.h == null) || (this.h.a(this, this.d, localdt, localbec, f2)))) {\r\n/* 83: 99 */ localHashSet.add(localdt);\r\n/* 84: */ }\r\n/* 85:102 */ d6 += d1 * 0.300000011920929D;\r\n/* 86:103 */ d8 += d2 * 0.300000011920929D;\r\n/* 87:104 */ d10 += d3 * 0.300000011920929D;\r\n/* 88:105 */ f2 -= 0.225F;\r\n/* 89: */ }\r\n/* 90: */ }\r\n/* 91: */ }\r\n/* 92: */ }\r\n/* 93: */ }\r\n/* 94:111 */ this.j.addAll(localHashSet);\r\n/* 95: */ \r\n/* 96:113 */ float f1 = this.i * 2.0F;\r\n/* 97: */ \r\n/* 98:115 */ int i1 = MathUtils.floor(this.e - f1 - 1.0D);\r\n/* 99:116 */ int i2 = MathUtils.floor(this.e + f1 + 1.0D);\r\n/* 100:117 */ int i3 = MathUtils.floor(this.f - f1 - 1.0D);\r\n/* 101:118 */ int i4 = MathUtils.floor(this.f + f1 + 1.0D);\r\n/* 102:119 */ int i5 = MathUtils.floor(this.g - f1 - 1.0D);\r\n/* 103:120 */ int i6 = MathUtils.floor(this.g + f1 + 1.0D);\r\n/* 104:121 */ List<Entity> localList = this.d.b(this.h, new AABB(i1, i3, i5, i2, i4, i6));\r\n/* 105:122 */ Vec3 localbrw = new Vec3(this.e, this.f, this.g);\r\n/* 106:124 */ for (int i7 = 0; i7 < localList.size(); i7++)\r\n/* 107: */ {\r\n/* 108:125 */ Entity localwv = (Entity)localList.get(i7);\r\n/* 109:126 */ if (!localwv.aV())\r\n/* 110: */ {\r\n/* 111:129 */ double d5 = localwv.f(this.e, this.f, this.g) / f1;\r\n/* 112:131 */ if (d5 <= 1.0D)\r\n/* 113: */ {\r\n/* 114:132 */ double d7 = localwv.xPos - this.e;\r\n/* 115:133 */ double d9 = localwv.yPos + localwv.getEyeHeight() - this.f;\r\n/* 116:134 */ double d11 = localwv.zPos - this.g;\r\n/* 117: */ \r\n/* 118:136 */ double d12 = MathUtils.sqrt(d7 * d7 + d9 * d9 + d11 * d11);\r\n/* 119:137 */ if (d12 != 0.0D)\r\n/* 120: */ {\r\n/* 121:141 */ d7 /= d12;\r\n/* 122:142 */ d9 /= d12;\r\n/* 123:143 */ d11 /= d12;\r\n/* 124: */ \r\n/* 125:145 */ double d13 = this.d.a(localbrw, localwv.getAABB());\r\n/* 126:146 */ double d14 = (1.0D - d5) * d13;\r\n/* 127:147 */ localwv.receiveDamage(DamageSource.a(this), (int)((d14 * d14 + d14) / 2.0D * 8.0D * f1 + 1.0D));\r\n/* 128: */ \r\n/* 129:149 */ double d15 = EnchantmentProtection.a(localwv, d14);\r\n/* 130:150 */ localwv.xVelocity += d7 * d15;\r\n/* 131:151 */ localwv.yVelocity += d9 * d15;\r\n/* 132:152 */ localwv.zVelocity += d11 * d15;\r\n/* 133:154 */ if ((localwv instanceof EntityPlayer)) {\r\n/* 134:155 */ this.k.put((EntityPlayer)localwv, new Vec3(d7 * d14, d9 * d14, d11 * d14));\r\n/* 135: */ }\r\n/* 136: */ }\r\n/* 137: */ }\r\n/* 138: */ }\r\n/* 139: */ }\r\n/* 140: */ }", "private final void verifyGhostRegionValues(ComputationalComposedBlock block) throws MPIException {\n\t\tBoundaryIterator boundaryIterator = block.getBoundaryIterator();\n\t\tBoundaryIterator expectedValuesIterator = block.getBoundaryIterator();\n\t\tBoundaryId boundary = new BoundaryId();\n\t\tfor (int d=0; d<2*DIMENSIONALITY; d++) {\n\t\t\tblock.receiveDoneAt(boundary);\n\t\t\tboundaryIterator.setBoundaryToIterate(boundary);\n\t\t\tBoundaryId oppositeBoundary = boundary.oppositeSide();\n\t\t\texpectedValuesIterator.setBoundaryToIterate(oppositeBoundary);\n\t\t\twhile (boundaryIterator.isInField()) {\n\t\t\t\t// Check the ghost values outside the current element.\n\t\t\t\tfor (int offset=1; offset<extent; offset++) {\n\t\t\t\t\tint neighborOffset = offset-1;\n\t\t\t\t\tint directedOffset = boundary.isLowerSide() ? -offset : offset;\n\t\t\t\t\tint directedNeighborOffset = boundary.isLowerSide() ? -neighborOffset : neighborOffset;\n\t\t\t\t\tdouble expected = expectedValuesIterator.currentNeighbor(boundary.getDimension(), directedNeighborOffset);\n\t\t\t\t\tdouble actual = boundaryIterator.currentNeighbor(boundary.getDimension(), directedOffset);\n\t\t\t\t\tassertEquals(expected, actual, 4*Math.ulp(expected));\n\t\t\t\t}\n\t\t\t\tboundaryIterator.next();\n\t\t\t\texpectedValuesIterator.next();\n\t\t\t}\n\t\t}\n\t}", "@Test\r\n public void testCheckCollisionTankBlocks() {\r\n System.out.println(\"checkCollisionTankBlocks\");\r\n Rectangle r3 = new Rectangle(10, 10, 10, 10);\r\n boolean result = CollisionUtility.checkCollisionTankBlocks(r3);\r\n assertEquals(true, result);\r\n inblocks.remove(0);\r\n result = CollisionUtility.checkCollisionTankBlocks(r3);\r\n assertEquals(false, result);\r\n }", "public static void neighborhoodMaxLowMem(String szinputsegmentation,String szanchorpositions,\n int nbinsize, int numleft, int numright, int nspacing, \n\t\t\t\t\tboolean busestrand, boolean busesignal, String szcolfields,\n\t\t\t\t\tint noffsetanchor, String szoutfile,Color theColor, \n\t\t\t\t\t String sztitle,String szlabelmapping, boolean bprintimage, \n boolean bstringlabels, boolean bbrowser) throws IOException\n {\n\n\n\tboolean bchrommatch = false;//added in 1.23 to check for chromosome matches\n\t//an array of chromosome names\n\tArrayList alchromindex = new ArrayList();\n\n\tString szLine;\n\n\t//stores the largest index value for each chromosome\n\tHashMap hmchromMax = new HashMap();\n\n\t//maps chromosome names to index values\n\tHashMap hmchromToIndex = new HashMap();\n\tHashMap hmLabelToIndex = new HashMap(); //maps label to an index\n\tHashMap hmIndexToLabel = new HashMap(); //maps index string to label\n\t//stores the maximum integer label value\n\tint nmaxlabel=0;\n\tString szlabel =\"\";\n\tBufferedReader brinputsegment = Util.getBufferedReader(szinputsegmentation);\n\n\tboolean busedunderscore = false;\n //the number of additional intervals to the left and right to include\n \n \t//the center anchor position\n\tint numintervals = 1+numleft+numright;\n\n\n\t//this loops reads in the segmentation \n\twhile ((szLine = brinputsegment.readLine())!=null)\n\t{\n\t //added v1.24\n\t if (bbrowser)\n\t {\n\t\tif ((szLine.toLowerCase(Locale.ENGLISH).startsWith(\"browser\"))||(szLine.toLowerCase(Locale.ENGLISH).startsWith(\"track\")))\n\t\t{\n\t\t continue;\n\t\t}\n\t }\n\n\t StringTokenizer st;\n\t if (bstringlabels)\n\t {\n\t st = new StringTokenizer(szLine,\"\\t\");\n\t }\n\t else\n\t {\n\t st = new StringTokenizer(szLine,\"\\t \");\n\t }\n\n\t //added in v1.24\n\t int numtokens = st.countTokens();\n\t if (numtokens == 0)\n\t { \n\t //skip blank lines\n\t continue;\n\t }\n\t else if (numtokens < 4)\n\t {\n\t throw new IllegalArgumentException(\"Line \"+szLine+\" in \"+szinputsegmentation+\" only had \"+numtokens+\" token(s). Expecting at least 4\");\n\t }\n\n\t String szchrom = st.nextToken().trim();\n //assumes segments are in standard bed format which to get to \n\t //0-based inclusive requires substract 1 from the end\n\t //int nbegin = Integer.parseInt(st.nextToken().trim())/nbinsize; \n\t st.nextToken().trim();\n\t int nend = (Integer.parseInt(st.nextToken().trim())-1)/nbinsize; \n\t szlabel = st.nextToken().trim();\n\t short slabel;\n\n\t if (bstringlabels)\n\t {\n\t int nunderscoreindex = szlabel.indexOf(\"_\");\n\n\t if (nunderscoreindex >=0)\n\t {\n\t String szprefix = szlabel.substring(0,nunderscoreindex);\n\n try\n\t\t {\n\t slabel = (short) (Short.parseShort(szprefix));\n\t\t if (slabel > nmaxlabel)\n\t\t {\n\t nmaxlabel = slabel;\n\t\t }\n\t\t busedunderscore = true;\n\t\t hmLabelToIndex.put(szlabel, Short.valueOf(slabel));\n\t\t hmIndexToLabel.put(\"\"+slabel, szlabel);\n\t\t }\n catch (NumberFormatException ex)\n\t\t {\n try\n\t\t {\n\t\t slabel = (short) (Short.parseShort(szprefix.substring(1)));\n\t\t if (slabel > nmaxlabel)\n\t\t {\n\t\t nmaxlabel = slabel;\n\t\t }\n\t\t busedunderscore = true;\n\t\t hmLabelToIndex.put(szlabel, Short.valueOf(slabel));\n\t\t hmIndexToLabel.put(\"\"+slabel, szlabel);\n\t\t }\n\t\t catch (NumberFormatException ex2)\n\t\t {\n\t\t if (busedunderscore)\n\t\t {\n\t\t throw new IllegalArgumentException(\"Not a valid ID before '_' in \"+szlabel+\", while valid ID found for other entries\");\n\t\t }\n\t\t }\n\t\t }\n\t }\n\n\t if (!busedunderscore)\n\t {\n\t //handle string labels\n\t Short objshort = (Short) hmLabelToIndex.get(szlabel);\n\n\t if (objshort == null)\n\t {\n\t\t nmaxlabel = hmLabelToIndex.size()+1;\n\t\t slabel = (short) nmaxlabel;\n\t\t hmLabelToIndex.put(szlabel, Short.valueOf(slabel));\n\t\t hmIndexToLabel.put(\"\"+nmaxlabel, szlabel);\n\t\t }\n\t }\n\t }\n\t else\n\t {\n try\n\t {\n\t slabel = (short) (Short.parseShort(szlabel));\n\t }\n\t catch (NumberFormatException ex)\n\t {\n try\n\t {\n slabel = (short) (Short.parseShort(szlabel.substring(1)));\n\t }\n\t catch (NumberFormatException ex2)\n\t {\n\t throw new IllegalArgumentException(\"In fourth column neither state number or ID found in segmentation file. Use '-labels' option to run overlap enrichment treating fourth column as labels\");\n\t }\n\t }\n\t \n\t //alsegments.add(new SegmentRec(szchrom,nbegin,nend,slabel));\n\n\t if (slabel > nmaxlabel)\n\t {\n\t nmaxlabel = slabel;\n\t }\n\t }\n\n\t Integer objMax = (Integer) hmchromMax.get(szchrom);\n\t if (objMax == null)\n\t {\n\t\t//System.out.println(\"on chrom \"+szchrom);\n\t\thmchromMax.put(szchrom,Integer.valueOf(nend));\n\t\thmchromToIndex.put(szchrom, Integer.valueOf(hmchromToIndex.size()));\n\t\talchromindex.add(szchrom);\n\t }\n\t else\n\t {\n\t\tint ncurrmax = objMax.intValue();\n\t\tif (ncurrmax < nend)\n\t\t{\n\t\t hmchromMax.put(szchrom, Integer.valueOf(nend));\t\t \n\t\t}\n\t }\n\t}\n\tbrinputsegment.close();\n\n\t//stores a tally for each position relative to an anchor how frequently the label was observed\n\tdouble[][] tallyoverlaplabel = new double[numintervals][nmaxlabel+1]; \n\n\t//stores a tally for the total signal associated with each anchor position\n\tdouble[] dsumoverlaplabel = new double[numintervals];\n\n //a tally on how frequently each label occurs\n double[] tallylabel = new double[nmaxlabel+1];\n\n\n\tint numchroms = alchromindex.size();\n\n //short[][] labels = new short[numchroms][];\n\n\t//allocates space store all the segment labels for each chromosome\n\tfor (int nchrom = 0; nchrom < numchroms; nchrom++)\n\t{\n \t //stores all the segments in the data\n\t //ArrayList alsegments = new ArrayList();\n\t brinputsegment = Util.getBufferedReader(szinputsegmentation);\n\t String szchromwant = (String) alchromindex.get(nchrom);\n\t //System.out.println(\"processing \"+szchromwant);\n\t int nsize = ((Integer) hmchromMax.get(alchromindex.get(nchrom))).intValue()+1;\n\t short[] labels = new short[nsize];\n\t //this loops reads in the segmentation \n\n\n\t //short[] labels_nchrom = labels[nchrom];\n\t for (int npos = 0; npos < nsize; npos++)\n {\n labels[npos] = -1;\n }\n\t\t\n\t while ((szLine = brinputsegment.readLine())!=null)\n\t {\n\t //int numlines = alsegments.size();\n\t StringTokenizer st;\n\t if (bstringlabels)\n\t {\n\t st = new StringTokenizer(szLine,\"\\t\");\n\t }\n\t else\n\t {\n\t st = new StringTokenizer(szLine,\"\\t \");\n\t }\n\n\t String szchrom = st.nextToken().trim();\n\t if (!szchromwant.equals(szchrom))\n\t\t continue;\n\n\t bchrommatch = true;\n //assumes segments are in standard bed format which to get to \n\t //0-based inclusive requires substract 1 from the end\n\t int nbegin = Integer.parseInt(st.nextToken().trim())/nbinsize;\n\t int nend = (Integer.parseInt(st.nextToken().trim())-1)/nbinsize; \n\t szlabel = st.nextToken().trim();\n\t short slabel = -1;\n\n\t if (bstringlabels)\n\t {\n\t int nunderscoreindex = szlabel.indexOf(\"_\");\n\n\t\t if (nunderscoreindex >=0)\n\t\t {\n\t\t String szprefix = szlabel.substring(0,nunderscoreindex);\n\n try\n\t\t {\n\t\t slabel = (short) (Short.parseShort(szprefix));\n\t\t busedunderscore = true;\n\t\t }\n catch (NumberFormatException ex)\n\t\t {\n try\n\t\t {\n\t\t slabel = (short) (Short.parseShort(szprefix.substring(1)));\n\t\t\t busedunderscore = true;\n\t\t }\n\t\t catch (NumberFormatException ex2)\n\t\t {\n\t\t\t if (busedunderscore)\n\t\t\t {\n\t\t\t throw new IllegalArgumentException(\"Not a valid ID before '_' in \"+szlabel+\", while valid ID found for other entries\");\n\t\t\t }\n\t\t }\n\t\t }\n\t\t }\n\n\t\t if (!busedunderscore)\n\t\t {\n\t //handle string labels\n\t\t Short objshort = (Short) hmLabelToIndex.get(szlabel);\n\t\t slabel = ((Short) objshort).shortValue();\n\t }\n\t }\n\t else\n\t {\n try\n\t {\n\t\t slabel = (short) (Short.parseShort(szlabel));\n\t }\n\t catch (NumberFormatException ex)\n\t {\n try\n\t\t {\n slabel = (short) (Short.parseShort(szlabel.substring(1)));\n\t\t }\n\t\t catch (NumberFormatException ex2)\n\t\t {\n\t\t throw new IllegalArgumentException(\"In fourth column neither state number or ID found in segmentation file. Use '-labels' option to run overlap enrichment treating fourth column as labels\");\n\t\t }\n\t }\n\t }\n\n\t //this loop stores into labels the full segmentation\n\t //and a count of how often each label occurs\n\t //for (int nindex = 0; nindex < numlines; nindex++)\n\t //{\n\t //SegmentRec theSegmentRec = (SegmentRec) alsegments.get(nindex);\n\t //int nchrom = ((Integer) hmchromToIndex.get(theSegmentRec.szchrom)).intValue();\n\t //short[] labels_nchrom = labels[nchrom];\n\t //int nbegin = theSegmentRec.nbegin;\n\t //int nend = theSegmentRec.nend;\n\t //short slabel = theSegmentRec.slabel;\n\t for (int npos = nbegin; npos <= nend; npos++)\n\t {\n\t labels[npos] = slabel;\n\t }\n\n\t if (slabel >= 0)\n\t {\n\t tallylabel[slabel]+=(nend-nbegin)+1; \n\t }\t \n\t }\n\t brinputsegment.close();\n\n\n\t RecAnchorIndex theAnchorIndex = getAnchorIndex(szcolfields, busestrand, busesignal);\n\n \t //reads in the anchor position \n BufferedReader brcoords = Util.getBufferedReader(szanchorpositions);\n\t while ((szLine = brcoords.readLine())!=null)\n {\n\t if (szLine.trim().equals(\"\")) continue;\n\t String[] szLineA = szLine.split(\"\\\\s+\");\n\n String szchrom = szLineA[theAnchorIndex.nchromindex]; \n\t if (!szchrom.equals(szchromwant)) \n continue;\n\n\t int nanchor = (Integer.parseInt(szLineA[theAnchorIndex.npositionindex])-noffsetanchor);\n\t boolean bposstrand = true;\n\t if (busestrand)\n\t {\n\t String szstrand = szLineA[theAnchorIndex.nstrandindex];\t \n\t if (szstrand.equals(\"+\"))\n\t {\n\t bposstrand = true;\n\t }\n else if (szstrand.equals(\"-\"))\n {\n \t bposstrand = false;\n\t }\n\t else\n\t {\n \t throw new IllegalArgumentException(szstrand +\" is an invalid strand. Strand should be '+' or '-'\");\n\t\t }\t \n\t }\n\n\t double damount;\n\n\t if ((busesignal)&&(theAnchorIndex.nsignalindex< szLineA.length))\n\t {\n\t damount = Double.parseDouble(szLineA[theAnchorIndex.nsignalindex]);\n\t }\n\t else\n {\n\t damount = 1;\n\t }\n\n\t //updates the tallys for the given anchor position\n\t //Integer objChrom = (Integer) hmchromToIndex.get(szchrom);\n //if (objChrom != null)\n\t //{\n\t // int nchrom = objChrom.intValue();\n\t\t //short[] labels_nchrom = labels[nchrom];\n\n\t if (bposstrand)\n\t {\n\t int ntallyindex = 0;\n\t for(int noffset= -numleft; noffset <= numright; noffset++)\n\t {\n\t\t int nposindex = (nanchor + nspacing*noffset)/nbinsize;\n\n\t\t if ((nposindex >=0)&&(nposindex < labels.length)&&(labels[nposindex]>=0))\n\t\t {\n\t tallyoverlaplabel[ntallyindex][labels[nposindex]] += damount;\t\t \n\t\t }\n\t\t ntallyindex++;\n\t\t }\n\t\t }\n\t else\n\t {\n\t int ntallyindex = 0;\n\t for(int noffset= numright; noffset >= -numleft; noffset--)\n\t {\n\t\t int nposindex = (nanchor + nspacing*noffset)/nbinsize;\n\n\t\t if ((nposindex >=0)&&(nposindex < labels.length)&&(labels[nposindex]>=0))\n\t\t {\n\t tallyoverlaplabel[ntallyindex][labels[nposindex]]+=damount;\t\t \n\t\t }\n\t\t ntallyindex++;\n\t\t }\n\t\t //}\n\t\t }\n\t }\n brcoords.close(); \t \n\t}\n\n\tif (!bchrommatch)\n\t{\n\t throw new IllegalArgumentException(\"No chromosome name matches found between \"+szanchorpositions+\n \" and those in the segmentation file.\");\n\t}\n\n\toutputneighborhood(tallyoverlaplabel,tallylabel,dsumoverlaplabel,szoutfile,nspacing,numright,\n numleft,theColor,ChromHMM.convertCharOrderToStringOrder(szlabel.charAt(0)),sztitle,0,\n szlabelmapping,szlabel.charAt(0), bprintimage, bstringlabels, hmIndexToLabel);\n }", "void reportSplit(HRegionInfo oldRegion, HRegionInfo newRegionA,\n HRegionInfo newRegionB) {\n \n outboundMsgs.add(new HMsg(HMsg.Type.MSG_REPORT_SPLIT, oldRegion,\n (oldRegion.getRegionNameAsString() + \" split; daughters: \" +\n newRegionA.getRegionNameAsString() + \", \" +\n newRegionB.getRegionNameAsString()).getBytes()));\n outboundMsgs.add(new HMsg(HMsg.Type.MSG_REPORT_OPEN, newRegionA));\n outboundMsgs.add(new HMsg(HMsg.Type.MSG_REPORT_OPEN, newRegionB));\n }", "public final synchronized void mo5320b() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r6 = this;\n monitor-enter(r6);\n r0 = r6.f24853c;\t Catch:{ all -> 0x004c }\n r1 = 0;\t Catch:{ all -> 0x004c }\n r2 = 0;\t Catch:{ all -> 0x004c }\n if (r0 == 0) goto L_0x0046;\t Catch:{ all -> 0x004c }\n L_0x0007:\n r0 = r6.f24851a;\t Catch:{ all -> 0x004c }\n if (r0 != 0) goto L_0x0013;\t Catch:{ all -> 0x004c }\n L_0x000b:\n r0 = r6.f24854d;\t Catch:{ all -> 0x004c }\n r3 = r6.f24853c;\t Catch:{ all -> 0x004c }\n r0.deleteFile(r3);\t Catch:{ all -> 0x004c }\n goto L_0x0046;\t Catch:{ all -> 0x004c }\n L_0x0013:\n r0 = com.google.android.m4b.maps.cg.bx.m23058b();\t Catch:{ all -> 0x004c }\n r3 = r6.f24854d;\t Catch:{ IOException -> 0x0032, all -> 0x002f }\n r4 = r6.f24853c;\t Catch:{ IOException -> 0x0032, all -> 0x002f }\n r3 = r3.openFileOutput(r4, r1);\t Catch:{ IOException -> 0x0032, all -> 0x002f }\n r4 = r6.f24851a;\t Catch:{ IOException -> 0x0033 }\n r4 = r4.m20837d();\t Catch:{ IOException -> 0x0033 }\n r3.write(r4);\t Catch:{ IOException -> 0x0033 }\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x004c }\n L_0x002b:\n com.google.android.m4b.maps.ap.C4655c.m20770a(r3);\t Catch:{ all -> 0x004c }\n goto L_0x0046;\n L_0x002f:\n r1 = move-exception;\n r3 = r2;\n goto L_0x003f;\n L_0x0032:\n r3 = r2;\n L_0x0033:\n r4 = r6.f24854d;\t Catch:{ all -> 0x003e }\n r5 = r6.f24853c;\t Catch:{ all -> 0x003e }\n r4.deleteFile(r5);\t Catch:{ all -> 0x003e }\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x004c }\n goto L_0x002b;\t Catch:{ all -> 0x004c }\n L_0x003e:\n r1 = move-exception;\t Catch:{ all -> 0x004c }\n L_0x003f:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x004c }\n com.google.android.m4b.maps.ap.C4655c.m20770a(r3);\t Catch:{ all -> 0x004c }\n throw r1;\t Catch:{ all -> 0x004c }\n L_0x0046:\n r6.f24851a = r2;\t Catch:{ all -> 0x004c }\n r6.f24852b = r1;\t Catch:{ all -> 0x004c }\n monitor-exit(r6);\n return;\n L_0x004c:\n r0 = move-exception;\n monitor-exit(r6);\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.cg.q.b():void\");\n }", "@Test\n\tpublic void testForwardNonFrameBlockSubstitution() throws InvalidGenomeChange {\n\t\tGenomeChange change1 = new GenomeChange(new GenomePosition(refDict, '+', 1, 6642114, PositionType.ZERO_BASED),\n\t\t\t\t\"TAAACA\", \"GTT\");\n\t\tAnnotation annotation1 = new BlockSubstitutionAnnotationBuilder(infoForward, change1).build();\n\t\tAssert.assertEquals(infoForward.accession, annotation1.transcript.accession);\n\t\tAssert.assertEquals(AnnotationLocation.INVALID_RANK, annotation1.annoLoc.rank);\n\t\tAssert.assertEquals(\"c.691-3_693delinsGTT\", annotation1.ntHGVSDescription);\n\t\tAssert.assertEquals(\"p.Trp231Val\", annotation1.aaHGVSDescription);\n\t\tAssert.assertEquals(ImmutableSortedSet.of(VariantType.NON_FS_SUBSTITUTION, VariantType.SPLICE_ACCEPTOR),\n\t\t\t\tannotation1.effects);\n\n\t\t// deletion of three codons, insertion of one\n\t\tGenomeChange change2 = new GenomeChange(new GenomePosition(refDict, '+', 1, 6642126, PositionType.ZERO_BASED),\n\t\t\t\t\"GTGGTTCAA\", \"ACC\");\n\t\tAnnotation annotation2 = new BlockSubstitutionAnnotationBuilder(infoForward, change2).build();\n\t\tAssert.assertEquals(infoForward.accession, annotation2.transcript.accession);\n\t\tAssert.assertEquals(2, annotation2.annoLoc.rank);\n\t\tAssert.assertEquals(\"c.700_708delinsACC\", annotation2.ntHGVSDescription);\n\t\tAssert.assertEquals(\"p.Val234_Gln236delinsThr\", annotation2.aaHGVSDescription);\n\t\tAssert.assertEquals(ImmutableSortedSet.of(VariantType.NON_FS_SUBSTITUTION), annotation2.effects);\n\n\t\t// deletion of three codons, insertion of one, includes truncation of replacement ref from the right\n\t\tGenomeChange change3 = new GenomeChange(new GenomePosition(refDict, '+', 1, 6642134, PositionType.ZERO_BASED),\n\t\t\t\t\"AGTGGAGGAT\", \"CTT\");\n\t\tAnnotation annotation3 = new BlockSubstitutionAnnotationBuilder(infoForward, change3).build();\n\t\tAssert.assertEquals(infoForward.accession, annotation3.transcript.accession);\n\t\tAssert.assertEquals(2, annotation3.annoLoc.rank);\n\t\tAssert.assertEquals(\"c.708_716delinsCT\", annotation3.ntHGVSDescription);\n\t\tAssert.assertEquals(\"p.Gln236Hisfs*16\", annotation3.aaHGVSDescription);\n\t\tAssert.assertEquals(ImmutableSortedSet.of(VariantType.FS_SUBSTITUTION), annotation3.effects);\n\t}", "public void testConstructors()\n throws IOException\n {\n HeaderBlockWriter block = new HeaderBlockWriter();\n ByteArrayOutputStream output = new ByteArrayOutputStream(512);\n\n block.writeBlocks(output);\n byte[] copy = output.toByteArray();\n byte[] expected =\n {\n ( byte ) 0xD0, ( byte ) 0xCF, ( byte ) 0x11, ( byte ) 0xE0,\n ( byte ) 0xA1, ( byte ) 0xB1, ( byte ) 0x1A, ( byte ) 0xE1,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0x3B, ( byte ) 0x00, ( byte ) 0x03, ( byte ) 0x00,\n ( byte ) 0xFE, ( byte ) 0xFF, ( byte ) 0x09, ( byte ) 0x00,\n ( byte ) 0x06, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0xFE, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0x00, ( byte ) 0x10, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0xFE, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0xFE, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF,\n ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF, ( byte ) 0xFF\n };\n\n assertEquals(expected.length, copy.length);\n for (int j = 0; j < 512; j++)\n {\n assertEquals(\"testing byte \" + j, expected[ j ], copy[ j ]);\n }\n\n // verify we can read a 'good' HeaderBlockWriter (also test\n // getPropertyStart)\n block.setPropertyStart(0x87654321);\n output = new ByteArrayOutputStream(512);\n block.writeBlocks(output);\n assertEquals(0x87654321,\n new HeaderBlockReader(new ByteArrayInputStream(output\n .toByteArray())).getPropertyStart());\n }", "@Test(timeout=120000)\n public void testMissingLastRegion() throws Exception {\n TableName table =\n TableName.valueOf(\"testMissingLastRegion\");\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // Mess it up by leaving a hole in the assignment, meta, and hdfs data\n admin.disableTable(table);\n deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes(\"C\"), Bytes.toBytes(\"\"), true,\n true, true);\n admin.enableTable(table);\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] { ERROR_CODE.LAST_REGION_ENDKEY_NOT_EMPTY });\n // fix hole\n doFsck(conf, true);\n // check that hole fixed\n assertNoErrors(doFsck(conf, false));\n } finally {\n cleanupTable(table);\n }\n }", "private void DeleteBurnInsOnPreviousSamples() {\n\t\tif (gibbs_sample_num <= num_gibbs_burn_in + 1 && gibbs_sample_num >= 2){\n\t\t\tgibbs_samples_of_bart_trees[gibbs_sample_num - 2] = null;\n\t\t}\n\t}", "public void Inverse_macroblock_partition_scanning_process(){\n\t\tx=InverseRasterScan(mbPartIdx, MbPartWidth(mb_type),MbPartHeight(mb_type),16,0);\n\t\ty=InverseRasterScan(mbPartIdx, MbPartWidth(mb_type),MbPartHeight(mb_type),16,1);\n\n\t}", "public int getBlockID()\r\n/* 57: */ {\r\n/* 58: 46 */ return RedPowerMachine.blockFrame.cm;\r\n/* 59: */ }", "void m63702c() {\n for (C17455a c17455a : this.f53839c) {\n c17455a.f53844b.clear();\n }\n }", "@Test(timeout = 30000)\n public void testMoveBlockFailure() {\n // Test copy\n testMoveBlockFailure(conf);\n // Test hardlink\n conf.setBoolean(DFSConfigKeys\n .DFS_DATANODE_ALLOW_SAME_DISK_TIERING, true);\n conf.setDouble(DFSConfigKeys\n .DFS_DATANODE_RESERVE_FOR_ARCHIVE_DEFAULT_PERCENTAGE, 0.5);\n testMoveBlockFailure(conf);\n }", "public void onNeighborBlockChange(World var1, int var2, int var3, int var4, int var5)\n {\n byte var6 = 0;\n byte var7 = 1;\n\n if (var1.getBlockId(var2 - 1, var3, var4) == this.blockID || var1.getBlockId(var2 + 1, var3, var4) == this.blockID)\n {\n var6 = 1;\n var7 = 0;\n }\n\n int var8;\n\n for (var8 = var3; var1.getBlockId(var2, var8 - 1, var4) == this.blockID; --var8)\n {\n ;\n }\n\n if (var1.getBlockId(var2, var8 - 1, var4) != Block.glowStone.blockID)\n {\n var1.setBlock(var2, var3, var4, 0);\n } else\n {\n int var9;\n\n for (var9 = 1; var9 < 4 && var1.getBlockId(var2, var8 + var9, var4) == this.blockID; ++var9)\n {\n ;\n }\n\n if (var9 == 3 && var1.getBlockId(var2, var8 + var9, var4) == Block.glowStone.blockID)\n {\n boolean var10 = var1.getBlockId(var2 - 1, var3, var4) == this.blockID || var1.getBlockId(var2 + 1, var3, var4) == this.blockID;\n boolean var11 = var1.getBlockId(var2, var3, var4 - 1) == this.blockID || var1.getBlockId(var2, var3, var4 + 1) == this.blockID;\n\n if (var10 && var11)\n {\n var1.setBlock(var2, var3, var4, 0);\n } else if ((var1.getBlockId(var2 + var6, var3, var4 + var7) != Block.glowStone.blockID || var1.getBlockId(var2 - var6, var3, var4 - var7) != this.blockID) && (var1.getBlockId(var2 - var6, var3, var4 - var7) != Block.glowStone.blockID || var1.getBlockId(var2 + var6, var3, var4 + var7) != this.blockID))\n {\n var1.setBlock(var2, var3, var4, 0);\n }\n } else\n {\n var1.setBlock(var2, var3, var4, 0);\n }\n }\n }", "void scanblocks() {\n\t\tint oldline, newline;\n\t\tint oldfront = 0; // line# of front of a block in old, or 0\n\t\tint newlast = -1; // newline's value during prev. iteration\n\n\t\tfor (oldline = 1; oldline <= oldinfo.maxLine; oldline++)\n\t\t\tblocklen[oldline] = 0;\n\t\tblocklen[oldinfo.maxLine + 1] = UNREAL; // starts a mythical blk\n\n\t\tfor (oldline = 1; oldline <= oldinfo.maxLine; oldline++) {\n\t\t\tnewline = oldinfo.other[oldline];\n\t\t\tif (newline < 0)\n\t\t\t\toldfront = 0; /* no match: not in block */\n\t\t\telse { /* match. */\n\t\t\t\tif (oldfront == 0)\n\t\t\t\t\toldfront = oldline;\n\t\t\t\tif (newline != (newlast + 1))\n\t\t\t\t\toldfront = oldline;\n\t\t\t\t++blocklen[oldfront];\n\t\t\t}\n\t\t\tnewlast = newline;\n\t\t}\n\t}", "public void unifyAdjacentChests(World par1World, int par2, int par3, int par4) {\n\t\tif (!par1World.isRemote) {\n\t\t\tBlock l = par1World.getBlock(par2, par3, par4 - 1);\n\t\t\tBlock i1 = par1World.getBlock(par2, par3, par4 + 1);\n\t\t\tBlock j1 = par1World.getBlock(par2 - 1, par3, par4);\n\t\t\tBlock k1 = par1World.getBlock(par2 + 1, par3, par4);\n\t\t\tBlock l1;\n\t\t\tBlock i2;\n\n\t\t\tbyte b0;\n\t\t\tint j2;\n\n\t\t\tif (l != this && i1 != this) {\n\t\t\t\tif (j1 != this && k1 != this) {\n\t\t\t\t\tb0 = 3;\n\n\t\t\t\t\tif (l.func_149730_j() && !i1.func_149730_j()) {\n\t\t\t\t\t\tb0 = 3;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (i1.func_149730_j() && !l.func_149730_j()) {\n\t\t\t\t\t\tb0 = 2;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (j1.func_149730_j() && !k1.func_149730_j()) {\n\t\t\t\t\t\tb0 = 5;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (k1.func_149730_j() && !j1.func_149730_j()) {\n\t\t\t\t\t\tb0 = 4;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tl1 = par1World.getBlock(j1 == this ? par2 - 1 : par2 + 1, par3, par4 - 1);\n\t\t\t\t\ti2 = par1World.getBlock(j1 == this ? par2 - 1 : par2 + 1, par3, par4 + 1);\n\t\t\t\t\tb0 = 3;\n\n\t\t\t\t\tif (j1 == this) {\n\t\t\t\t\t\tj2 = par1World.getBlockMetadata(par2 - 1, par3, par4);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tj2 = par1World.getBlockMetadata(par2 + 1, par3, par4);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (j2 == 2) {\n\t\t\t\t\t\tb0 = 2;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((l.func_149730_j() || l1.func_149730_j()) && !i1.func_149730_j() && !i2.func_149730_j()) {\n\t\t\t\t\t\tb0 = 3;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ((i1.func_149730_j() || i2.func_149730_j()) && !l.func_149730_j() && !l1.func_149730_j()) {\n\t\t\t\t\t\tb0 = 2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tl1 = par1World.getBlock(par2 - 1, par3, l == this ? par4 - 1 : par4 + 1);\n\t\t\t\ti2 = par1World.getBlock(par2 + 1, par3, l == this ? par4 - 1 : par4 + 1);\n\t\t\t\tb0 = 5;\n\n\t\t\t\tif (l == this) {\n\t\t\t\t\tj2 = par1World.getBlockMetadata(par2, par3, par4 - 1);\n\t\t\t\t} else {\n\t\t\t\t\tj2 = par1World.getBlockMetadata(par2, par3, par4 + 1);\n\t\t\t\t}\n\n\t\t\t\tif (j2 == 4) {\n\t\t\t\t\tb0 = 4;\n\t\t\t\t}\n\n\t\t\t\tif ((j1.func_149730_j() || l1.func_149730_j()) && !k1.func_149730_j() && !i2.func_149730_j()) {\n\t\t\t\t\tb0 = 5;\n\t\t\t\t}\n\n\t\t\t\tif ((k1.func_149730_j() || i2.func_149730_j()) && !j1.func_149730_j() && !l1.func_149730_j()) {\n\t\t\t\t\tb0 = 4;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tpar1World.setBlockMetadataWithNotify(par2, par3, par4, b0, 3);\n\t\t}\n\t}", "@Override\n\tpublic int getReplaceBlock() {\n\t\treturn 0;\n\t}", "protected int getChunkInRegion() {\n\t\treturn (rnd.nextInt(structurePosRange) + rnd.nextInt(structurePosRange)) / 2;\n\t}", "public void repair () {\n WriteableByteArray whole = new WriteableByteArray ();\n WriteableByteArray piece = new WriteableByteArray ();\n int [] offsets = new int [sequences.size ()];\n for (int index = 0;index < commonSequence.length;index++) {\n byte b = commonSequence [index];\n int i = 0;\n for (byte [] sequence : sequences)\n if (sequence [index + offsets [i++]] != b) {\n CommonSequence commonPiece = new CommonSequence ();\n i = 0;\n for (byte [] s : sequences) {\n piece.reset ();\n for (;;) {\n byte c = s [index + offsets [i]];\n if (c == b)\n break;\n piece.write (c);\n offsets [i]++;\n }\n commonPiece.add (piece.toByteArray ());\n i++;\n }\n whole.write (commonPiece.getCommonSequence ());\n break;\n }\n // all sequences now coincide at b\n whole.write (b);\n }\n commonSequence = whole.toByteArray ();\n matched = false;\n throw new NotTestedException ();\n }", "@Test\n public void testWithAllCorruptReplicas() throws Exception {\n Configuration conf = new HdfsConfiguration();\n conf.setLong(DFSConfigKeys.DFS_BLOCKREPORT_INTERVAL_MSEC_KEY, 1000L);\n conf.set(DFSConfigKeys.DFS_NAMENODE_RECONSTRUCTION_PENDING_TIMEOUT_SEC_KEY, Integer.toString(2));\n MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf).numDataNodes(3).build();\n FileSystem fs = cluster.getFileSystem();\n final FSNamesystem namesystem = cluster.getNamesystem();\n\n try {\n final Path fileName = new Path(\"/foo1\");\n DFSTestUtil.createFile(fs, fileName, 2, (short) 3, 0L);\n DFSTestUtil.waitReplication(fs, fileName, (short) 3);\n\n ExtendedBlock block = DFSTestUtil.getFirstBlock(fs, fileName);\n corruptBlock(cluster, fs, fileName, 0, block);\n\n corruptBlock(cluster, fs, fileName, 1, block);\n\n corruptBlock(cluster, fs, fileName, 2, block);\n\n // wait for 3 seconds so that all block reports are processed.\n try {\n Thread.sleep(3000);\n } catch (InterruptedException ignored) {\n }\n\n assertEquals(0, countReplicas(namesystem, block).liveReplicas());\n assertEquals(3, countReplicas(namesystem, block).corruptReplicas());\n\n namesystem.setReplication(fileName.toString(), (short) 1);\n\n // wait for 3 seconds so that all block reports are processed.\n try {\n Thread.sleep(3000);\n } catch (InterruptedException ignored) {\n }\n\n assertEquals(0, countReplicas(namesystem, block).liveReplicas());\n assertEquals(3, countReplicas(namesystem, block).corruptReplicas());\n\n } finally {\n cluster.shutdown();\n }\n }", "@Test (timeout=180000)\n public void testValidLingeringSplitParent() throws Exception {\n TableName table =\n TableName.valueOf(\"testLingeringSplitParent\");\n Table meta = null;\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // make sure data in regions, if in wal only there is no data loss\n admin.flush(table);\n HRegionLocation location = tbl.getRegionLocation(Bytes.toBytes(\"B\"));\n\n meta = connection.getTable(TableName.META_TABLE_NAME, tableExecutorService);\n HRegionInfo hri = location.getRegionInfo();\n\n // do a regular split\n byte[] regionName = location.getRegionInfo().getRegionName();\n admin.splitRegion(location.getRegionInfo().getRegionName(), Bytes.toBytes(\"BM\"));\n TestEndToEndSplitTransaction.blockUntilRegionSplit(conf, 60000, regionName, true);\n\n // TODO: fixHdfsHoles does not work against splits, since the parent dir lingers on\n // for some time until children references are deleted. HBCK erroneously sees this as\n // overlapping regions\n HBaseFsck hbck = doFsck(\n conf, true, true, false, false, false, true, true, true, false, false, false, null);\n assertErrors(hbck, new ERROR_CODE[] {}); //no LINGERING_SPLIT_PARENT reported\n\n // assert that the split hbase:meta entry is still there.\n Get get = new Get(hri.getRegionName());\n Result result = meta.get(get);\n assertNotNull(result);\n assertNotNull(MetaTableAccessor.getHRegionInfo(result));\n\n assertEquals(ROWKEYS.length, countRows());\n\n // assert that we still have the split regions\n assertEquals(tbl.getStartKeys().length, SPLITS.length + 1 + 1); //SPLITS + 1 is # regions pre-split.\n assertNoErrors(doFsck(conf, false));\n } finally {\n cleanupTable(table);\n IOUtils.closeQuietly(meta);\n }\n }", "@Test\n public void undoCkpointTest() throws Exception {\n final int tableSize = PARAMETERS.NUM_ITERATIONS_LOW;\n final int trimPosition = tableSize / 2;\n final int snapshotPosition = trimPosition + 2;\n\n CountDownLatch latch = new CountDownLatch(1);\n\n t(1, () -> {\n\n CorfuRuntime rt = getNewRuntime();\n try {\n PersistentCorfuTable<String, Long> tableA = openTable(rt, streamNameA);\n\n // first, populate the map\n for (int i = 0; i < tableSize; i++) {\n tableA.insert(String.valueOf(i), (long) i);\n }\n\n // now, take a checkpoint and perform a prefix-trim\n MultiCheckpointWriter<PersistentCorfuTable<String, Long>> mcw1 = new MultiCheckpointWriter<>();\n mcw1.addMap(tableA);\n mcw1.appendCheckpoints(rt, author);\n\n // Trim the log\n Token token = new Token(rt.getLayoutView().getLayout().getEpoch(), trimPosition);\n rt.getAddressSpaceView().prefixTrim(token);\n rt.getAddressSpaceView().gc();\n rt.getAddressSpaceView().invalidateServerCaches();\n rt.getAddressSpaceView().invalidateClientCache();\n\n latch.countDown();\n } finally {\n rt.shutdown();\n }\n });\n\n AtomicBoolean trimExceptionFlag = new AtomicBoolean(false);\n\n // start a new runtime\n t(2, () -> {\n latch.await();\n CorfuRuntime rt = getNewRuntime();\n\n PersistentCorfuTable<String, Long> localm2A = openTable(rt, streamNameA);\n\n // start a snapshot TX at position snapshotPosition\n Token timestamp = new Token(0L, snapshotPosition - 1);\n rt.getObjectsView().TXBuild()\n .type(TransactionType.SNAPSHOT)\n .snapshot(timestamp)\n .build()\n .begin();\n\n // finally, instantiate the map for the snapshot and assert is has the right state\n try {\n localm2A.get(String.valueOf(0));\n } catch (TransactionAbortedException te) {\n assertThat(te.getAbortCause()).isEqualTo(AbortCause.TRIM);\n // this is an expected behavior!\n trimExceptionFlag.set(true);\n }\n\n try {\n if (!trimExceptionFlag.get()) {\n assertThat(localm2A.size())\n .isEqualTo(snapshotPosition);\n\n // check map positions 0..(snapshot-1)\n for (int i = 0; i < snapshotPosition; i++) {\n assertThat(localm2A.get(String.valueOf(i)))\n .isEqualTo(i);\n }\n\n // check map positions snapshot..(mapSize-1)\n for (int i = snapshotPosition; i < tableSize; i++) {\n assertThat(localm2A.get(String.valueOf(i))).isNull();\n }\n }\n } finally {\n rt.shutdown();\n }\n });\n }", "public LinearGenomeShrinkMutation(){\n\t\tnumberGenesToRemove = 1;\n\t}", "@Test (timeout=180000)\n public void testContainedRegionOverlap() throws Exception {\n TableName table =\n TableName.valueOf(\"tableContainedRegionOverlap\");\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // Mess it up by creating an overlap in the metadata\n HRegionInfo hriOverlap =\n createRegion(tbl.getTableDescriptor(), Bytes.toBytes(\"A2\"), Bytes.toBytes(\"B\"));\n TEST_UTIL.getHBaseCluster().getMaster().assignRegion(hriOverlap);\n TEST_UTIL.getHBaseCluster().getMaster().getAssignmentManager()\n .waitForAssignment(hriOverlap);\n ServerName server = regionStates.getRegionServerOfRegion(hriOverlap);\n TEST_UTIL.assertRegionOnServer(hriOverlap, server, REGION_ONLINE_TIMEOUT);\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] {\n ERROR_CODE.OVERLAP_IN_REGION_CHAIN });\n assertEquals(2, hbck.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows());\n\n // fix the problem.\n doFsck(conf, true);\n\n // verify that overlaps are fixed\n HBaseFsck hbck2 = doFsck(conf,false);\n assertNoErrors(hbck2);\n assertEquals(0, hbck2.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows());\n } finally {\n cleanupTable(table);\n }\n }", "public abstract int[] findEmptyBlock(int processSize);", "@Test(timeout=75000)\n public void testSplitDaughtersNotInMeta() throws Exception {\n TableName table = TableName.valueOf(\"testSplitdaughtersNotInMeta\");\n Table meta = connection.getTable(TableName.META_TABLE_NAME, tableExecutorService);\n try {\n setupTable(table);\n assertEquals(ROWKEYS.length, countRows());\n\n // make sure data in regions, if in wal only there is no data loss\n admin.flush(table);\n HRegionLocation location = tbl.getRegionLocation(Bytes.toBytes(\"B\"));\n\n HRegionInfo hri = location.getRegionInfo();\n\n // Disable CatalogJanitor to prevent it from cleaning up the parent region\n // after split.\n admin.enableCatalogJanitor(false);\n\n // do a regular split\n byte[] regionName = location.getRegionInfo().getRegionName();\n admin.splitRegion(location.getRegionInfo().getRegionName(), Bytes.toBytes(\"BM\"));\n TestEndToEndSplitTransaction.blockUntilRegionSplit(conf, 60000, regionName, true);\n\n PairOfSameType<HRegionInfo> daughters =\n MetaTableAccessor.getDaughterRegions(meta.get(new Get(regionName)));\n\n // Delete daughter regions from meta, but not hdfs, unassign it.\n Map<HRegionInfo, ServerName> hris = tbl.getRegionLocations();\n undeployRegion(connection, hris.get(daughters.getFirst()), daughters.getFirst());\n undeployRegion(connection, hris.get(daughters.getSecond()), daughters.getSecond());\n\n List<Delete> deletes = new ArrayList<>();\n deletes.add(new Delete(daughters.getFirst().getRegionName()));\n deletes.add(new Delete(daughters.getSecond().getRegionName()));\n meta.delete(deletes);\n\n // Remove daughters from regionStates\n RegionStates regionStates = TEST_UTIL.getMiniHBaseCluster().getMaster().\n getAssignmentManager().getRegionStates();\n regionStates.deleteRegion(daughters.getFirst());\n regionStates.deleteRegion(daughters.getSecond());\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck,\n new ERROR_CODE[] { ERROR_CODE.NOT_IN_META_OR_DEPLOYED, ERROR_CODE.NOT_IN_META_OR_DEPLOYED,\n ERROR_CODE.HOLE_IN_REGION_CHAIN }); //no LINGERING_SPLIT_PARENT\n\n // now fix it. The fix should not revert the region split, but add daughters to META\n hbck = doFsck(\n conf, true, true, false, false, false, false, false, false, false, false, false, null);\n assertErrors(hbck,\n new ERROR_CODE[] { ERROR_CODE.NOT_IN_META_OR_DEPLOYED, ERROR_CODE.NOT_IN_META_OR_DEPLOYED,\n ERROR_CODE.HOLE_IN_REGION_CHAIN });\n\n // assert that the split hbase:meta entry is still there.\n Get get = new Get(hri.getRegionName());\n Result result = meta.get(get);\n assertNotNull(result);\n assertNotNull(MetaTableAccessor.getHRegionInfo(result));\n\n assertEquals(ROWKEYS.length, countRows());\n\n // assert that we still have the split regions\n assertEquals(tbl.getStartKeys().length, SPLITS.length + 1 + 1); //SPLITS + 1 is # regions pre-split.\n assertNoErrors(doFsck(conf, false)); //should be fixed by now\n } finally {\n admin.enableCatalogJanitor(true);\n meta.close();\n cleanupTable(table);\n }\n }", "void combineAndCollectSnapshotBlocks(\n INode.ReclaimContext reclaimContext, INodeFile file, FileDiff removed) {\n BlockInfo[] removedBlocks = removed.getBlocks();\n if (removedBlocks == null) {\n FileWithSnapshotFeature sf = file.getFileWithSnapshotFeature();\n assert sf != null : \"FileWithSnapshotFeature is null\";\n if(sf.isCurrentFileDeleted())\n sf.collectBlocksAndClear(reclaimContext, file);\n return;\n }\n int p = getPrior(removed.getSnapshotId(), true);\n FileDiff earlierDiff = p == Snapshot.NO_SNAPSHOT_ID ? null : getDiffById(p);\n // Copy blocks to the previous snapshot if not set already\n if (earlierDiff != null) {\n earlierDiff.setBlocks(removedBlocks);\n }\n BlockInfo[] earlierBlocks =\n (earlierDiff == null ? new BlockInfoContiguous[]{} : earlierDiff.getBlocks());\n // Find later snapshot (or file itself) with blocks\n BlockInfo[] laterBlocks = findLaterSnapshotBlocks(removed.getSnapshotId());\n laterBlocks = (laterBlocks == null) ? file.getBlocks() : laterBlocks;\n // Skip blocks, which belong to either the earlier or the later lists\n int i = 0;\n for(; i < removedBlocks.length; i++) {\n if(i < earlierBlocks.length && removedBlocks[i] == earlierBlocks[i])\n continue;\n if(i < laterBlocks.length && removedBlocks[i] == laterBlocks[i])\n continue;\n break;\n }\n // Check if last block is part of truncate recovery\n BlockInfo lastBlock = file.getLastBlock();\n BlockInfo dontRemoveBlock = null;\n if (lastBlock != null && lastBlock.getBlockUCState().equals(\n HdfsServerConstants.BlockUCState.UNDER_RECOVERY)) {\n dontRemoveBlock = lastBlock.getUnderConstructionFeature()\n .getTruncateBlock();\n }\n // Collect the remaining blocks of the file, ignoring truncate block\n for (;i < removedBlocks.length; i++) {\n if(dontRemoveBlock == null || !removedBlocks[i].equals(dontRemoveBlock)) {\n reclaimContext.collectedBlocks().addDeleteBlock(removedBlocks[i]);\n }\n }\n }", "public int getInternalBlockLength()\r\n/* 40: */ {\r\n/* 41: 95 */ return 32;\r\n/* 42: */ }", "@Test (timeout=180000)\n public void testNotInHdfsWithReplicas() throws Exception {\n TableName table =\n TableName.valueOf(\"tableNotInHdfs\");\n HBaseAdmin admin = new HBaseAdmin(conf);\n try {\n HRegionInfo[] oldHris = new HRegionInfo[2];\n setupTableWithRegionReplica(table, 2);\n assertEquals(ROWKEYS.length, countRows());\n NavigableMap<HRegionInfo, ServerName> map = MetaScanner.allTableRegions(TEST_UTIL.getConnection(),\n tbl.getName());\n int i = 0;\n // store the HRIs of the regions we will mess up\n for (Map.Entry<HRegionInfo, ServerName> m : map.entrySet()) {\n if (m.getKey().getStartKey().length > 0 &&\n m.getKey().getStartKey()[0] == Bytes.toBytes(\"B\")[0]) {\n LOG.debug(\"Initially server hosting \" + m.getKey() + \" is \" + m.getValue());\n oldHris[i++] = m.getKey();\n }\n }\n // make sure data in regions\n TEST_UTIL.getHBaseAdmin().flush(table.getName());\n\n // Mess it up by leaving a hole in the hdfs data\n deleteRegion(conf, tbl.getTableDescriptor(), Bytes.toBytes(\"B\"),\n Bytes.toBytes(\"C\"), false, false, true); // don't rm meta\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] {ERROR_CODE.NOT_IN_HDFS});\n\n // fix hole\n doFsck(conf, true);\n\n // check that hole fixed\n assertNoErrors(doFsck(conf,false));\n assertEquals(ROWKEYS.length - 2, countRows());\n\n // the following code checks whether the old primary/secondary has\n // been unassigned and the new primary/secondary has been assigned\n i = 0;\n HRegionInfo[] newHris = new HRegionInfo[2];\n // get all table's regions from meta\n map = MetaScanner.allTableRegions(TEST_UTIL.getConnection(), tbl.getName());\n // get the HRIs of the new regions (hbck created new regions for fixing the hdfs mess-up)\n for (Map.Entry<HRegionInfo, ServerName> m : map.entrySet()) {\n if (m.getKey().getStartKey().length > 0 &&\n m.getKey().getStartKey()[0] == Bytes.toBytes(\"B\")[0]) {\n newHris[i++] = m.getKey();\n }\n }\n // get all the online regions in the regionservers\n Collection<ServerName> servers = admin.getClusterStatus().getServers();\n Set<HRegionInfo> onlineRegions = new HashSet<HRegionInfo>();\n for (ServerName s : servers) {\n List<HRegionInfo> list = admin.getOnlineRegions(s);\n onlineRegions.addAll(list);\n }\n // the new HRIs must be a subset of the online regions\n assertTrue(onlineRegions.containsAll(Arrays.asList(newHris)));\n // the old HRIs must not be part of the set (removeAll would return false if\n // the set didn't change)\n assertFalse(onlineRegions.removeAll(Arrays.asList(oldHris)));\n } finally {\n cleanupTable(table);\n admin.close();\n }\n }", "private void m29109d() {\n PersistentConfiguration cVar = this.f22554b;\n if (cVar != null) {\n if (C6804i.m29033a(cVar.getString(\"UTDID2\"))) {\n String string = this.f22554b.getString(\"UTDID\");\n if (!C6804i.m29033a(string)) {\n m29110f(string);\n }\n }\n boolean z = false;\n String str = \"DID\";\n if (!C6804i.m29033a(this.f22554b.getString(str))) {\n this.f22554b.remove(str);\n z = true;\n }\n String str2 = \"EI\";\n if (!C6804i.m29033a(this.f22554b.getString(str2))) {\n this.f22554b.remove(str2);\n z = true;\n }\n String str3 = \"SI\";\n if (!C6804i.m29033a(this.f22554b.getString(str3))) {\n this.f22554b.remove(str3);\n z = true;\n }\n if (z) {\n this.f22554b.commit();\n }\n }\n }", "public boolean willOverlap() {\n/* 208 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public void uncoverContiguous( int r , int c )\n { \n \n Stack<MineTile> stack = new Stack<MineTile>();\n stack.add(mineField[r][c]);\n \n while(!stack.empty())\n {\n MineTile curTile = stack.pop();\n r = curTile.getRow();\n c = curTile.getCol();\n for(int i = r-1; i <= r+1; i++)\n {\n for(int j = c-1; j <= c+1; j++)\n {\n if(isValid(i, j))\n {\n if(mineField[i][j].isCovered() & mineField[i][j].getCount() == 0)\n {\n stack.add(mineField[i][j]);\n }\n mineField[i][j].uncover();\n }\n \n } \n \n }\n \n }\n }", "@Test\n public void testSingleBlock()\n {\n BlockMetadata.FileBlockMetadata block = new BlockMetadata.FileBlockMetadata(s3Directory + FILE_1, 0L, 0L,\n testMeta.dataFile.length(), true, -1, testMeta.dataFile.length());\n\n testMeta.blockReader.beginWindow(1);\n testMeta.blockReader.blocksMetadataInput.process(block);\n testMeta.blockReader.endWindow();\n\n List<Object> actualMessages = testMeta.messageSink.collectedTuples;\n Assert.assertEquals(\"No of records\", testMeta.messages.size(), actualMessages.size());\n\n for (int i = 0; i < actualMessages.size(); i++) {\n byte[] msg = (byte[])actualMessages.get(i);\n Assert.assertTrue(\"line \" + i, Arrays.equals(new String(msg).split(\",\"), testMeta.messages.get(i)));\n }\n }", "private void resetMBPattern()\n {\n codedBlockPattern = 0;\n }", "public static void scanDirty(List<Intersection> sections){\n for(int i = 0; i<sections.size(); i++){\n Intersection section = sections.get(i);\n if(section.dirty != 0){\n int startI = i;\n double min = Double.MAX_VALUE;\n for(int j = 0; j<sections.size(); j++){\n if(j == startI){\n continue;\n }\n Intersection other = sections.get(j);\n\n double m = Vector3DOps.mag(Vector3DOps.difference(other.location, section.location));\n if(m < min){\n min = m;\n }\n if( m < Math.abs(section.dirty) ){\n System.out.println(\"should take it: \" + other.dirty);\n //System.out.println(\"removing: \" + i + \", \" + m + \" < \" + section.dirty);\n //System.out.println(\"\\t by: \" + j + \" , \" + other.dirty);\n if(startI > i){\n continue;\n }\n sections.remove(i);\n i--;j--;\n }\n }\n if( startI > i){\n System.out.println(\"removed\");\n } else{\n System.out.println(\"left\");\n }\n }\n }\n\n\n }", "void removebranchGroupInU(int i,boolean dead)\n {\n if(dead==true)\n {\n \n if(controlArray[i]==true)\n {\n //branchGroupArray[i].detach();\n \n branchGroupArray[i]=null ;\n controlArray[i]=false ;\n }\n \n \n }\n \n else \n {\n if(controlArray[i]==true)\n {\n branchGroupArray[i].detach();\n //branchGroupArray[i]=null;\n controlArray[i]=false ;\n }\n }\n }", "SerializableState getInvalidRegion(Long id,\n\t\t\t\t ParameterBlock oldParamBlock,\n\t\t\t\t SerializableState oldHints,\n\t\t\t\t ParameterBlock newParamBlock,\n\t\t\t\t SerializableState newHints)\n\tthrows RemoteException;", "void transform() {\n\t\tint oldline, newline;\n\t\tint oldmax = oldinfo.maxLine + 2; /* Count pseudolines at */\n\t\tint newmax = newinfo.maxLine + 2; /* ..front and rear of file */\n\n\t\tfor (oldline = 0; oldline < oldmax; oldline++)\n\t\t\toldinfo.other[oldline] = -1;\n\t\tfor (newline = 0; newline < newmax; newline++)\n\t\t\tnewinfo.other[newline] = -1;\n\n\t\tscanunique(); /* scan for lines used once in both files */\n\t\tscanafter(); /* scan past sure-matches for non-unique blocks */\n\t\tscanbefore(); /* scan backwards from sure-matches */\n\t\tscanblocks(); /* find the fronts and lengths of blocks */\n\t}", "public void RemoveRowsIfStackedTooHigh() {\n \t\t\n while (rowHasBlocks(Parameters.RemoveBiggestPartialRowIfBlockInRow)) {\n int NoOfPiecesRemoved = \n eraseBiggestRowGreaterThan(Parameters.RemoveBiggestPartialRowIfBlockInRow);\n //remove points for each empty square\n ComputeScoreAndDelay(-(COLUMNS - NoOfPiecesRemoved) * Parameters.PointsSubtractedPerEmptySpaceFromPartialRow);\n \n }\n game_grid.repaint();\n LogEvent(\"row_removed\");\n }", "public XnRegion sharedRegion(TracePosition trace) {\n\tthrow new SubclassResponsibilityException();\n/*\nudanax-top.st:9681:OrglRoot methodsFor: 'accessing'!\n{XnRegion} sharedRegion: trace {TracePosition}\n\t\"Return a region for all the stuff in this orgl that can backfollow to trace.\"\n\tself subclassResponsibility!\n*/\n}", "@Test(timeout=180000)\n public void testQuarantineMissingRegionDir() throws Exception {\n TableName table = TableName.valueOf(name.getMethodName());\n // inject a fault in the hfcc created.\n final FileSystem fs = FileSystem.get(conf);\n HBaseFsck hbck = new HBaseFsck(conf, hbfsckExecutorService) {\n @Override\n public HFileCorruptionChecker createHFileCorruptionChecker(boolean sidelineCorruptHFiles)\n throws IOException {\n return new HFileCorruptionChecker(conf, executor, sidelineCorruptHFiles) {\n AtomicBoolean attemptedFirstHFile = new AtomicBoolean(false);\n @Override\n protected void checkRegionDir(Path p) throws IOException {\n if (attemptedFirstHFile.compareAndSet(false, true)) {\n assertTrue(fs.delete(p, true)); // make sure delete happened.\n }\n super.checkRegionDir(p);\n }\n };\n }\n };\n doQuarantineTest(table, hbck, 3, 0, 0, 0, 1);\n hbck.close();\n }", "@Override\n \t/**\n \t * Called when the block is placed in the world.\n \t */\n \tpublic void auxiliaryOnBlockPlacedBy(TECarpentersBlock TE, World world, int x, int y, int z, EntityLivingBase entityLiving, ItemStack itemStack)\n \t{\n \t\tif (!entityLiving.isSneaking())\n \t\t{\n \t\t\t/* Match adjacent collapsible quadrant heights. */\n \t\t\t\n \t\t\tTECarpentersBlock TE_XN = world.getBlockId(x - 1, y, z) == blockID ? (TECarpentersBlock)world.getBlockTileEntity(x - 1, y, z) : null;\n \t\t\tTECarpentersBlock TE_XP = world.getBlockId(x + 1, y, z) == blockID ? (TECarpentersBlock)world.getBlockTileEntity(x + 1, y, z) : null;\n \t\t\tTECarpentersBlock TE_ZN = world.getBlockId(x, y, z - 1) == blockID ? (TECarpentersBlock)world.getBlockTileEntity(x, y, z - 1) : null;\n \t\t\tTECarpentersBlock TE_ZP = world.getBlockId(x, y, z + 1) == blockID ? (TECarpentersBlock)world.getBlockTileEntity(x, y, z + 1) : null;\n \n \t\t\tif (TE_XN != null) {\n \t\t\t\tCollapsible.setQuadHeight(TE, Collapsible.QUAD_XZNN, Collapsible.getQuadHeight(TE_XN, Collapsible.QUAD_XZPN));\n \t\t\t\tCollapsible.setQuadHeight(TE, Collapsible.QUAD_XZNP, Collapsible.getQuadHeight(TE_XN, Collapsible.QUAD_XZPP));\n \t\t\t}\n \t\t\tif (TE_XP != null) {\n \t\t\t\tCollapsible.setQuadHeight(TE, Collapsible.QUAD_XZPN, Collapsible.getQuadHeight(TE_XP, Collapsible.QUAD_XZNN));\n \t\t\t\tCollapsible.setQuadHeight(TE, Collapsible.QUAD_XZPP, Collapsible.getQuadHeight(TE_XP, Collapsible.QUAD_XZNP));\n \t\t\t}\n \t\t\tif (TE_ZN != null) {\n \t\t\t\tCollapsible.setQuadHeight(TE, Collapsible.QUAD_XZNN, Collapsible.getQuadHeight(TE_ZN, Collapsible.QUAD_XZNP));\n \t\t\t\tCollapsible.setQuadHeight(TE, Collapsible.QUAD_XZPN, Collapsible.getQuadHeight(TE_ZN, Collapsible.QUAD_XZPP));\n \t\t\t}\n \t\t\tif (TE_ZP != null) {\n \t\t\t\tCollapsible.setQuadHeight(TE, Collapsible.QUAD_XZNP, Collapsible.getQuadHeight(TE_ZP, Collapsible.QUAD_XZNN));\n \t\t\t\tCollapsible.setQuadHeight(TE, Collapsible.QUAD_XZPP, Collapsible.getQuadHeight(TE_ZP, Collapsible.QUAD_XZPN));\n \t\t\t}\n \t\t}\n \t}", "phaseI.Hdfs.BlockLocations getNewBlock();", "@Test\n public void test131() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Block block0 = (Block)errorPage0.legend();\n Block block1 = (Block)errorPage0.blockquote();\n Label label0 = (Label)errorPage0.del((Object) block1);\n assertEquals(\"wheel_ErrorPage\", errorPage0.getComponentId());\n assertTrue(block1._isGeneratedId());\n }", "static void hardDrop(Block b) {\n int[] pos = b.pos;\n char[][] piece = b.piece;\n\n while (canPlace(pos[0] + 1, pos[1], piece))\n pos[0]++;\n\n place(pos[0], pos[1], piece);\n }", "private Set<Long> removeSomeBlocks(Map<BlockStoreLocation, List<Long>> blockMap) {\n Set<Long> toRemove = new HashSet<>();\n // 1 block goes missing from each location\n for (Map.Entry<BlockStoreLocation, List<Long>> entry : blockMap.entrySet()) {\n List<Long> blocks = entry.getValue();\n if (blocks.isEmpty()) {\n continue;\n }\n toRemove.add(blocks.get(0));\n blocks.remove(0);\n }\n return toRemove;\n }", "@Test\n public void testSafeBlocks() {\n IntStream.iterate(0, i -> i + 1).limit(LevelImpl.LEVEL_MAX).forEach(k -> {\n terrain = terrainFactory.create(level.getBlocksNumber());\n /* use 0 and 1 position because the margin blocks are inserted initially*/\n assertEquals(new Position(3 * TerrainFactoryImpl.CELL_DIMENSION * ScreenToolUtils.SCALE, \n TerrainFactoryImpl.CELL_DIMENSION * ScreenToolUtils.SCALE), terrain.getBlocks().get(0).getPosition());\n assertEquals(new Position(TerrainFactoryImpl.CELL_DIMENSION * ScreenToolUtils.SCALE,\n 3 * TerrainFactoryImpl.CELL_DIMENSION * ScreenToolUtils.SCALE), terrain.getBlocks().get(1).getPosition());\n level.levelUp();\n });\n }", "@Test\n public void writing()\n throws IOException, DbfLibException\n {\n final Ranges ignoredRangesDbf = new Ranges();\n ignoredRangesDbf.addRange(0x01, 0x03); // modified\n ignoredRangesDbf.addRange(0x1d, 0x1d); // language driver\n ignoredRangesDbf.addRange(0x1e, 0x1f); // reserved\n ignoredRangesDbf.addRange(0x2c, 0x2f); // field description \"address in memory\"\n ignoredRangesDbf.addRange(0x4c, 0x4f); // idem\n ignoredRangesDbf.addRange(0x6c, 0x6f); // idem\n ignoredRangesDbf.addRange(0x8c, 0x8f); // idem\n ignoredRangesDbf.addRange(0xac, 0xaf); // idem\n ignoredRangesDbf.addRange(0xcc, 0xcf); // idem\n ignoredRangesDbf.addRange(0x34, 0x34); // work area id\n ignoredRangesDbf.addRange(0x54, 0x54); // work area id\n ignoredRangesDbf.addRange(0x74, 0x74); // work area id\n ignoredRangesDbf.addRange(0x94, 0x94); // work area id\n ignoredRangesDbf.addRange(0xb4, 0xb4); // work area id\n ignoredRangesDbf.addRange(0xd4, 0xd4); // work area id\n ignoredRangesDbf.addRange(0x105, 0x10e); // block number in memo file\n // (in some versions padded with zeros, in other versions with spaces)\n\n ignoredRangesDbf.addRange(0x161, 0x16a); // idem\n\n /*\n * in Clipper5 there is so much garbage in the header area that from the field definitions\n * on all the data is skipped\n */\n if (version == Version.CLIPPER_5)\n {\n ignoredRangesDbf.addRange(0x20, 0xdf); // reserved/garbage\n }\n\n final Ranges ignoredRangesDbt = new Ranges();\n\n if (version == Version.DBASE_3)\n {\n ignoredRangesDbt.addRange(0x04, 0x1ff); // reserved/garbage\n ignoredRangesDbt.addRange(0x432, 0x5ff); // zero padding beyond dbase eof bytes\n }\n else if (version == Version.DBASE_4)\n {\n ignoredRangesDbt.addRange(0x438, 0x5ff); // zero padding beyond dbase eof bytes\n }\n else if (version == Version.DBASE_5)\n {\n ignoredRangesDbt.addRange(0x16, 0x1ff); // reserved/garbage\n }\n else if (version == Version.CLIPPER_5)\n {\n ignoredRangesDbt.addRange(0x04, 0x3ff); // reserved/garbage\n ignoredRangesDbt.addRange(0x4f5, 0x5ff); // garbage beyond eof bytes\n ignoredRangesDbt.addRange(0x631, 0x7ff); // zero padding beyond eof bytes\n }\n else if (version == Version.FOXPRO_26)\n {\n ignoredRangesDbt.addRange(0x08, 0x0f); // file name (not written in FoxPro)\n ignoredRangesDbt.addRange(0x2f6, 0x2fb); // garbage\n ignoredRangesDbt.addRange(0x438, 0x4fb); // garbage\n }\n\n UnitTestUtil.doCopyAndCompareTest(versionDirectory + \"/cars\", \"cars\", version, ignoredRangesDbf,\n ignoredRangesDbt);\n }", "@DataProvider(name = \"TrimAssemblyRegionData\")\n public Object[][] makeTrimAssemblyRegionData() {\n final List<Object[]> tests = new ArrayList<>();\n\n // fully enclosed within active region\n tests.add(new Object[]{\n new SimpleInterval(\"1\", 10, 20), 10,\n new SimpleInterval(\"1\", 15, 16),\n new SimpleInterval(\"1\", 15, 16), 0});\n\n tests.add(new Object[]{\n new SimpleInterval(\"1\", 10, 20), 10,\n new SimpleInterval(\"1\", 10, 15),\n new SimpleInterval(\"1\", 10, 15), 0});\n\n tests.add(new Object[]{\n new SimpleInterval(\"1\", 10, 20), 10,\n new SimpleInterval(\"1\", 15, 20),\n new SimpleInterval(\"1\", 15, 20), 0});\n\n // needs extra padding on the right\n tests.add(new Object[]{\n new SimpleInterval(\"1\", 10, 20), 10,\n new SimpleInterval(\"1\", 15, 25),\n new SimpleInterval(\"1\", 15, 20), 5});\n\n // needs extra padding on the left\n tests.add(new Object[]{\n new SimpleInterval(\"1\", 10, 20), 10,\n new SimpleInterval(\"1\", 5, 15),\n new SimpleInterval(\"1\", 10, 15), 5});\n\n // needs extra padding on both\n tests.add(new Object[]{\n new SimpleInterval(\"1\", 10, 20), 10,\n new SimpleInterval(\"1\", 7, 21),\n new SimpleInterval(\"1\", 10, 20), 3});\n tests.add(new Object[]{\n new SimpleInterval(\"1\", 10, 20), 10,\n new SimpleInterval(\"1\", 9, 23),\n new SimpleInterval(\"1\", 10, 20), 3});\n\n // desired span captures everything, so we're returning everything. Tests that extension is set correctly\n tests.add(new Object[]{\n new SimpleInterval(\"1\", 10, 20), 10,\n new SimpleInterval(\"1\", 1, 50),\n new SimpleInterval(\"1\", 10, 20), 10});\n\n // At the start of the chromosome, potentially a bit weird\n tests.add(new Object[]{\n new SimpleInterval(\"1\", 1, 10), 10,\n new SimpleInterval(\"1\", 1, 50),\n new SimpleInterval(\"1\", 1, 10), 10});\n\n return tests.toArray(new Object[][]{});\n }", "public ByteBuf retainedDuplicate()\r\n/* 83: */ {\r\n/* 84:100 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 85:101 */ return super.retainedDuplicate();\r\n/* 86: */ }", "private void scanForBlockFarAway() {\r\n\t\tList<MapLocation> locations = gameMap.senseNearbyBlocks();\r\n\t\tlocations.removeAll(stairs);\r\n\t\tif (locations.size() == 0) {\r\n\t\t\tblockLoc = null;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t/* remove blocks that can be sensed */\r\n\t\tIterator<MapLocation> iter = locations.iterator();\r\n\t\twhile(iter.hasNext()) {\r\n\t\t\tMapLocation loc = iter.next();\r\n\t\t\tif (myRC.canSenseSquare(loc))\r\n\t\t\t\titer.remove();\r\n\t\t} \r\n\t\t\r\n\t\tlocations = navigation.sortLocationsByDistance(locations);\r\n\t\t//Collections.reverse(locations);\r\n\t\tfor (MapLocation block : locations) {\r\n\t\t\tif (gameMap.get(block).robotAtLocation == null){\r\n\t\t\t\t/* this location is unoccupied */\r\n\t\t\t\tblockLoc = block;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tblockLoc = null;\r\n\t}", "@Test (timeout=180000)\n public void testDupeStartKey() throws Exception {\n TableName table =\n TableName.valueOf(\"tableDupeStartKey\");\n try {\n setupTable(table);\n assertNoErrors(doFsck(conf, false));\n assertEquals(ROWKEYS.length, countRows());\n\n // Now let's mess it up, by adding a region with a duplicate startkey\n HRegionInfo hriDupe =\n createRegion(tbl.getTableDescriptor(), Bytes.toBytes(\"A\"), Bytes.toBytes(\"A2\"));\n TEST_UTIL.getHBaseCluster().getMaster().assignRegion(hriDupe);\n TEST_UTIL.getHBaseCluster().getMaster().getAssignmentManager()\n .waitForAssignment(hriDupe);\n ServerName server = regionStates.getRegionServerOfRegion(hriDupe);\n TEST_UTIL.assertRegionOnServer(hriDupe, server, REGION_ONLINE_TIMEOUT);\n\n HBaseFsck hbck = doFsck(conf, false);\n assertErrors(hbck, new ERROR_CODE[] { ERROR_CODE.DUPE_STARTKEYS,\n ERROR_CODE.DUPE_STARTKEYS});\n assertEquals(2, hbck.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows()); // seems like the \"bigger\" region won.\n\n // fix the degenerate region.\n doFsck(conf,true);\n\n // check that the degenerate region is gone and no data loss\n HBaseFsck hbck2 = doFsck(conf,false);\n assertNoErrors(hbck2);\n assertEquals(0, hbck2.getOverlapGroups(table).size());\n assertEquals(ROWKEYS.length, countRows());\n } finally {\n cleanupTable(table);\n }\n }", "private void b()\r\n/* 67: */ {\r\n/* 68: 73 */ this.c.clear();\r\n/* 69: 74 */ this.e.clear();\r\n/* 70: */ }", "public static void wipeBlocks() {\n for (String location : MyZ.instance.getBlocksConfig().getKeys(false))\n actOnBlock(location, false);\n MyZ.instance.saveBlocksConfig();\n }", "private static void registerBlock(Block b)\n\t{\n\t}", "private void collapseIgloo() {\n blocks.sort(Comparator.comparing(a -> a.center.getY()));\n\n double minDistance, distance;\n Point3D R = new Point3D(0, -1, 0);\n for (int i = 0; i < blocks.size(); i++) {\n minDistance = Double.MAX_VALUE;\n for (int j = i - 1; j >= 0; j--) {\n if (boundingSpheresIntersect(blocks.get(i), blocks.get(j))) {\n distance = minDistance(blocks.get(i), blocks.get(j), R);\n if (distance < minDistance) {\n minDistance = distance;\n }\n }\n }\n if (minDistance != Double.MAX_VALUE) {\n blocks.get(i).move(R.multiply(minDistance));\n }\n }\n }", "public void prepareForSnapshot() {\n if (readMap != null)\n return;\n\n readMap = new TreeMap<>();\n\n for (Map.Entry<GroupPartitionId, PagesAllocationRange> entry : writeMap.entrySet()) {\n if (!skippedParts.contains(entry.getKey()))\n readMap.put(entry.getKey(), entry.getValue());\n }\n\n skippedParts.clear();\n writeMap.clear();\n }", "public void deleteSelected() {\r\n \t\tObject cells[] = graph.getSelectionCells();\r\n \t\tGraphModel graphmodel = graph.getModel();\r\n \r\n \t\t// If a cell is a blocking region avoid removing its edges and\r\n \t\t// select its element at the end of the removal process\r\n \t\tSet edges = new HashSet();\r\n \t\tSet<Object> select = new HashSet<Object>();\r\n \r\n \t\t// Set with all regions that can be deleted as its child were removed\r\n \t\tSet<Object> regions = new HashSet<Object>();\r\n \t\t// Set with all JmtCells that we are removing\r\n \t\tSet<Object> jmtCells = new HashSet<Object>();\r\n \r\n \t\t// Giuseppe De Cicco & Fabio Granara\r\n \t\t// for(int k=0; k<cells.length; k++){\r\n \t\t// if(cells[k] instanceof JmtEdge){\r\n \t\t// ((JmtCell)(graphmodel.getParent(graphmodel.getSource((JmtEdge)cells[k])))).SubOut();\r\n \t\t// ((JmtCell)(graphmodel.getParent(graphmodel.getTarget((JmtEdge)cells[k])))).SubIn();\r\n \t\t// }\r\n \t\t//\r\n \t\t// }\r\n \t\tfor (int i = 0; i < cells.length; i++) {\r\n \t\t\tif (!(cells[i] instanceof BlockingRegion)) {\r\n \t\t\t\t// Adds edge for removal\r\n \t\t\t\tedges.addAll(DefaultGraphModel.getEdges(graphmodel, new Object[] { cells[i] }));\r\n \t\t\t\t// Giuseppe De Cicco & Fabio Granara\r\n \t\t\t\t// quando vado a eliminare un nodo, a cui collegato un arco,\r\n \t\t\t\t// vado ad incrementare o diminuire il contatore per il\r\n \t\t\t\t// pulsanteAGGIUSTATUTTO\r\n \t\t\t\t// Iterator iter = edges.iterator();\r\n \t\t\t\t// while (iter.hasNext()) {\r\n \t\t\t\t// Object next = iter.next();\r\n \t\t\t\t// if (next instanceof JmtEdge){\r\n \t\t\t\t// ((JmtCell)(graphmodel.getParent(graphmodel.getSource((JmtEdge)next)))).SubOut();\r\n \t\t\t\t// ((JmtCell)(graphmodel.getParent(graphmodel.getTarget((JmtEdge)next)))).SubIn();\r\n \t\t\t\t// }\r\n \t\t\t\t//\r\n \t\t\t\t// }\r\n \t\t\t\t// Stores parents information and cell\r\n \t\t\t\tif (cells[i] instanceof JmtCell) {\r\n \t\t\t\t\tif (((JmtCell) cells[i]).getParent() instanceof BlockingRegion) {\r\n \t\t\t\t\t\tregions.add(((JmtCell) cells[i]).getParent());\r\n \t\t\t\t\t}\r\n \t\t\t\t\tjmtCells.add(cells[i]);\r\n \t\t\t\t}\r\n \t\t\t} else {\r\n \t\t\t\t// Adds node for selection\r\n \t\t\t\tObject[] nodes = graph.getDescendants(new Object[] { cells[i] });\r\n \t\t\t\tfor (Object node : nodes) {\r\n \t\t\t\t\tif (node instanceof JmtCell || node instanceof JmtEdge) {\r\n \t\t\t\t\t\tselect.add(node);\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t\t// Removes blocking region from data structure\r\n \t\t\t\tmodel.deleteBlockingRegion(((BlockingRegion) cells[i]).getKey());\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\tif (!edges.isEmpty()) {\r\n \t\t\tgraphmodel.remove(edges.toArray());\r\n \t\t}\r\n \t\t// removes cells from graph\r\n \t\tgraphmodel.remove(cells);\r\n \r\n \t\t// Checks if all children of a blocking region have been removed\r\n \t\tIterator<Object> it = regions.iterator();\r\n \t\twhile (it.hasNext()) {\r\n \t\t\tjmtCells.add(null);\r\n \t\t\tBlockingRegion region = (BlockingRegion) it.next();\r\n \t\t\tList child = region.getChildren();\r\n \t\t\tboolean empty = true;\r\n \t\t\tfor (int i = 0; i < child.size(); i++) {\r\n \t\t\t\tif (child.get(i) instanceof JmtCell && !jmtCells.contains(child.get(i))) {\r\n \t\t\t\t\tempty = false;\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tif (empty) {\r\n \t\t\t\tmodel.deleteBlockingRegion(region.getKey());\r\n \t\t\t\tgraphmodel.remove(new Object[] { region });\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\t// Removes cells from data structure\r\n \t\tfor (Object cell : cells) {\r\n \t\t\tif (cell instanceof JmtCell) {\r\n \t\t\t\tmodel.deleteStation(((CellComponent) ((JmtCell) cell).getUserObject()).getKey());\r\n \t\t\t} else if (cell instanceof JmtEdge) {\r\n \t\t\t\tJmtEdge link = (JmtEdge) cell;\r\n \t\t\t\tmodel.setConnected(link.getSourceKey(), link.getTargetKey(), false);\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\t// If no stations remains gray select and link buttons\r\n \t\tif (graph.getModel().getRootCount() == 0) {\r\n \t\t\tcomponentBar.clearButtonGroupSelection(0);\r\n \t\t\tsetConnect.setEnabled(false);\r\n \t\t\tsetSelect.setEnabled(false);\r\n \t\t}\r\n \r\n \t\t// Selects components from removed blocking regions\r\n \t\tif (select.size() > 0) {\r\n \t\t\tgraph.setSelectionCells(select.toArray());\r\n \t\t\t// Resets parent information of cells that changed parent\r\n \t\t\tit = select.iterator();\r\n \t\t\twhile (it.hasNext()) {\r\n \t\t\t\tObject next = it.next();\r\n \t\t\t\tif (next instanceof JmtCell) {\r\n \t\t\t\t\t((JmtCell) next).resetParent();\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t}", "public void free(Block b) {\n if(b.length <= 0) return;\n\n if (b.start + b.length > limit) limit = b.start + b.length; // grows with free\n\n // query adjacent blocks\n Block prev = freeSpace.floor(b);\n Block next = freeSpace.higher(b);\n\n if (prev != null && prev.start + prev.length > b.start) {\n throw new RuntimeException(\"Corrupted. DEBUG PRV \" + prev.start + \"+\" + prev.length + \">\" + b.start);\n }\n if (next != null && next.start < b.start + b.length) {\n throw new RuntimeException(\"Corrupted. DEBUG NEX \" + next.start + \"<\" + b.start + \"+\" + b.length);\n }\n\n // merge them if possible\n \n Block n = Block.mergeBlocks(b, prev);\n if(n != null) { freeSpace.remove(prev); b = n; }\n\n n = Block.mergeBlocks(b, next);\n if(n != null) { freeSpace.remove(next); b = n; }\n\n freeSpace.add(b);\n }", "@Test\n\tpublic void testForwardFrameShiftBlockSubstitution() throws InvalidGenomeChange {\n\t\tGenomeChange change1 = new GenomeChange(new GenomePosition(refDict, '+', 1, 6647537, PositionType.ZERO_BASED),\n\t\t\t\t\"TGCCCCACCT\", \"CCC\");\n\t\tAnnotation annotation1 = new BlockSubstitutionAnnotationBuilder(infoForward, change1).build();\n\t\tAssert.assertEquals(infoForward.accession, annotation1.transcript.accession);\n\t\tAssert.assertEquals(6, annotation1.annoLoc.rank);\n\t\tAssert.assertEquals(\"c.1225_1234delinsCCC\", annotation1.ntHGVSDescription);\n\t\tAssert.assertEquals(\"p.Cys409Profs*127\", annotation1.aaHGVSDescription);\n\t\tAssert.assertEquals(ImmutableSortedSet.of(VariantType.FS_SUBSTITUTION, VariantType.SPLICE_REGION),\n\t\t\t\tannotation1.effects);\n\t}", "public ByteBuf duplicate()\r\n/* 95: */ {\r\n/* 96:112 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 97:113 */ return super.duplicate();\r\n/* 98: */ }", "@Override\n protected void updateEliminations() {\n\n }", "@Override\n public void breakBlock(World world, int i, int j, int k, int lol, int meh) {\n byte byte0 = 4;\n int l = byte0 + 1;\n if (world.checkChunksExist(i - l, j - l, k - l, i + l, j + l, k + l)) {\n for (int i1 = -byte0; i1 <= byte0; i1++) {\n for (int j1 = -byte0; j1 <= byte0; j1++) {\n for (int k1 = -byte0; k1 <= byte0; k1++) {\n int l1 = world.getBlockId(i + i1, j + j1, k + k1);\n if (l1 != TropicraftMod.tropicLeaves.blockID) {\n continue;\n }\n int i2 = world.getBlockMetadata(i + i1, j + j1, k + k1);\n if ((i2 & 8) == 0) {\n world.setBlockMetadata(i + i1, j + j1, k + k1, i2 | 8);\n }\n }\n\n }\n\n }\n\n }\n }", "@Test\n public void testRemoveDuplicateParentLabels() {\n System.out.println(\"removeDuplicateParentLabels\");\n HuffmanEncoder huffman = new HuffmanEncoder(p, ensemble);\n HuffmanNode root = huffman.createTree();\n HuffmanDemoComponent comp = new HuffmanDemoComponent(root, ensemble);\n HuffmanCell[][] cells = comp.cells;\n CellDisplayCleaner.removeDuplicateParentLabels(cells);\n assertEquals(6, cells.length);\n assertEquals(5, cells[0].length);\n assertTrue(cells[0][0].getLabel().getText().isEmpty());\n assertEquals(\"step 1\", cells[0][1].getLabel().getText());\n assertEquals(\"step 2\", cells[0][2].getLabel().getText());\n assertEquals(\"step 3\", cells[0][3].getLabel().getText());\n assertEquals(\"step 4\", cells[0][4].getLabel().getText());\n assertEquals(\"a\", cells[1][0].getLabel().getText());\n assertEquals(\"b\", cells[2][0].getLabel().getText());\n assertEquals(\"c\", cells[3][0].getLabel().getText());\n assertEquals(\"d\", cells[4][0].getLabel().getText());\n assertEquals(\"e\", cells[5][0].getLabel().getText());\n \n assertEquals(\"0.25\", cells[1][1].getLabel().getText());\n assertEquals(\"0.25\", cells[2][1].getLabel().getText());\n assertEquals(\"0.2\", cells[3][1].getLabel().getText());\n assertEquals(\"0.15\", cells[4][1].getLabel().getText());\n assertEquals(\"0.15\", cells[5][1].getLabel().getText());\n \n assertEquals(\"0.25\", cells[1][2].getLabel().getText());\n assertEquals(\"0.25\", cells[2][2].getLabel().getText());\n assertEquals(\"0.2\", cells[3][2].getLabel().getText());\n assertEquals(\"0.3\", cells[4][2].getLabel().getText());\n assertEquals(\"\", cells[5][2].getLabel().getText());\n \n assertEquals(\"0.25\", cells[1][3].getLabel().getText());\n assertEquals(\"0.45\", cells[2][3].getLabel().getText());\n assertEquals(\"\", cells[3][3].getLabel().getText());\n assertEquals(\"0.3\", cells[4][3].getLabel().getText());\n assertEquals(\"\", cells[5][3].getLabel().getText());\n \n assertEquals(\"0.55\", cells[1][4].getLabel().getText());\n assertEquals(\"0.45\", cells[2][4].getLabel().getText());\n assertEquals(\"\", cells[3][4].getLabel().getText());\n assertEquals(\"\", cells[4][4].getLabel().getText());\n assertEquals(\"\", cells[5][4].getLabel().getText());\n }", "private synchronized void m29549c() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r6 = this;\n monitor-enter(r6);\n r0 = r6.f24853c;\t Catch:{ all -> 0x0050 }\n if (r0 == 0) goto L_0x004b;\t Catch:{ all -> 0x0050 }\n L_0x0005:\n r0 = com.google.android.m4b.maps.cg.bx.m23056a();\t Catch:{ all -> 0x0050 }\n r1 = 0;\n r2 = r6.f24854d;\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n r3 = r6.f24853c;\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n r2 = r2.openFileInput(r3);\t Catch:{ IOException -> 0x0035, all -> 0x0030 }\n if (r2 == 0) goto L_0x0027;\n L_0x0014:\n r3 = new com.google.android.m4b.maps.ar.a;\t Catch:{ IOException -> 0x0036 }\n r4 = com.google.android.m4b.maps.de.af.f19891a;\t Catch:{ IOException -> 0x0036 }\n r3.<init>(r4);\t Catch:{ IOException -> 0x0036 }\n r6.f24851a = r3;\t Catch:{ IOException -> 0x0036 }\n r3 = r6.f24851a;\t Catch:{ IOException -> 0x0036 }\n r4 = com.google.android.m4b.maps.ap.C4655c.m20771a(r2);\t Catch:{ IOException -> 0x0036 }\n r3.m20819a(r4);\t Catch:{ IOException -> 0x0036 }\n goto L_0x0029;\t Catch:{ IOException -> 0x0036 }\n L_0x0027:\n r6.f24851a = r1;\t Catch:{ IOException -> 0x0036 }\n L_0x0029:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n L_0x002c:\n com.google.android.m4b.maps.ap.C4655c.m20773b(r2);\t Catch:{ all -> 0x0050 }\n goto L_0x004b;\n L_0x0030:\n r2 = move-exception;\n r5 = r2;\n r2 = r1;\n r1 = r5;\n goto L_0x0044;\n L_0x0035:\n r2 = r1;\n L_0x0036:\n r6.f24851a = r1;\t Catch:{ all -> 0x0043 }\n r1 = r6.f24854d;\t Catch:{ all -> 0x0043 }\n r3 = r6.f24853c;\t Catch:{ all -> 0x0043 }\n r1.deleteFile(r3);\t Catch:{ all -> 0x0043 }\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n goto L_0x002c;\t Catch:{ all -> 0x0050 }\n L_0x0043:\n r1 = move-exception;\t Catch:{ all -> 0x0050 }\n L_0x0044:\n com.google.android.m4b.maps.cg.bx.m23057a(r0);\t Catch:{ all -> 0x0050 }\n com.google.android.m4b.maps.ap.C4655c.m20773b(r2);\t Catch:{ all -> 0x0050 }\n throw r1;\t Catch:{ all -> 0x0050 }\n L_0x004b:\n r0 = 1;\t Catch:{ all -> 0x0050 }\n r6.f24852b = r0;\t Catch:{ all -> 0x0050 }\n monitor-exit(r6);\n return;\n L_0x0050:\n r0 = move-exception;\n monitor-exit(r6);\n throw r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.m4b.maps.cg.q.c():void\");\n }", "public interface NoCopySpan\n/* */ {\n/* */ public static class Concrete\n/* */ implements NoCopySpan\n/* */ {\n/* */ public Concrete() {\n/* 37 */ throw new RuntimeException(\"Stub!\");\n/* */ }\n/* */ }\n/* */ }", "void removeBlock(Block block);", "private void split(Map<Integer, SortedSet> invariants, Partition partition) {\n int nonEmptyInvariants = invariants.keySet().size();\n if (nonEmptyInvariants > 1) {\n List<Integer> invariantKeys = new ArrayList<Integer>();\n invariantKeys.addAll(invariants.keySet());\n partition.removeCell(currentBlockIndex);\n int k = currentBlockIndex;\n if (splitOrder == SplitOrder.REVERSE) {\n Collections.sort(invariantKeys);\n } else {\n Collections.sort(invariantKeys, Collections.reverseOrder());\n }\n for (int h : invariantKeys) {\n SortedSet setH = invariants.get(h);\n// System.out.println(\"adding block \" + setH + \" at \" + k + \" h=\" + h);\n partition.insertCell(k, setH);\n blocksToRefine.add(setH);\n k++;\n \n }\n // skip over the newly added blocks\n currentBlockIndex += nonEmptyInvariants - 1;\n }\n }" ]
[ "0.60376674", "0.588679", "0.58575296", "0.5767759", "0.5725728", "0.5559633", "0.5535541", "0.5514388", "0.5461028", "0.54601413", "0.5419855", "0.5357236", "0.5352923", "0.5319562", "0.5308847", "0.5292986", "0.5278772", "0.5268306", "0.52547765", "0.52541333", "0.52282286", "0.521305", "0.5210903", "0.51949346", "0.51906544", "0.51857823", "0.5185776", "0.51847434", "0.5181599", "0.51600003", "0.5156702", "0.5151608", "0.51430345", "0.5124617", "0.5121556", "0.5100799", "0.50836706", "0.5070037", "0.506128", "0.505357", "0.5042091", "0.5042082", "0.5041306", "0.5035178", "0.50325435", "0.50288874", "0.5019748", "0.501728", "0.5015601", "0.5006731", "0.49814242", "0.49774867", "0.49763373", "0.4975311", "0.49630406", "0.49510622", "0.49481624", "0.49365348", "0.49332142", "0.49322984", "0.49313486", "0.49286592", "0.49257818", "0.49211907", "0.4917319", "0.4905518", "0.490539", "0.49034628", "0.48999336", "0.4898698", "0.489652", "0.48936415", "0.4891668", "0.48879945", "0.48875466", "0.48777747", "0.48722413", "0.48697257", "0.4864932", "0.48639226", "0.48528892", "0.4848606", "0.48486054", "0.48476213", "0.48421946", "0.48382235", "0.4837147", "0.4827549", "0.48241562", "0.48237106", "0.4817838", "0.48113197", "0.48050004", "0.480264", "0.47960714", "0.47918007", "0.47911328", "0.47858846", "0.47858483", "0.4784502", "0.4780894" ]
0.0
-1
TODO: Add checks on input validity (see below) Note: so far assumes that the given level is the one to which the field belongs (which should be true but isn't guaranteed (?))
public String setField(BooleanFieldEditor field, Composite parent) { String level = field.getPreferencesLevel(); // If the level is "project" and project == null then just set // the field here (as a special case). // Note: without some project selected the field should not be // editable. Field will have to be set back to editable when // (and probably where) a project is selected. We might take // care of this elsewhere but, until that is verified, keep // doing it here. // Note also: loadWithInheritance (which calls setField(..)) // won't know that project == null and will try to set the field // from some higher level if (IPreferencesService.PROJECT_LEVEL.equals(level) && service.getProject() == null) { if (parent == null) { System.err.println("PreferencesUtilities.setField(): parent is null"); } if (parent.isDisposed()) { System.err.println("PreferencesUtilities.setField(): parent is disposed"); } // Don't have a null boolean value to set field to, // but would like to show it as "cleared" somehow // (presumably "false" shows as empty field.setFieldValueFromOutside(false); if (!parent.isDisposed()) { field.getChangeControl().setEnabled(false); field.getChangeControl().setBackground(colorBluish); } // Pretend that this was set at the project level? // (It was certainly cleared at that level) return IPreferencesService.PROJECT_LEVEL; } // Otherwise, we have a legitimate level, so set normally String levelFromWhichSet = field.loadWithInheritance(); // Note: You can evidently load a field even when its control // is disposed. In that case (evidently) you can change the // text in the field but not the background color. if (parent != null && !parent.isDisposed()) { if (level != null && level.equals(levelFromWhichSet)) { field.getChangeControl().setBackground(colorWhite); } else if (level != null && field.getChangeControl().getEnabled()) { field.getChangeControl().setBackground(colorBluish); } } else { // If composite.isDisposed(), then both field.getTextControl(composite) // and field.getTextControl() will return null; if needed, a text control // must be obtained from somewhere else--but I have no idea where that // might be. Not sure why composite.isDisposed() here in the first place, // especially considering that the field can be set } return levelFromWhichSet; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setLevel(String level) {\n this.level = level;\n }", "public void setLevel(String level) {\n this.level = level;\n }", "public void setLevel(String level){\n\t\tthis.level = level;\n\t}", "public void setLevel(String level) {\n this.level = level == null ? null : level.trim();\n }", "public void setLevel(String level) {\n this.level = level == null ? null : level.trim();\n }", "public void setLevel(String level) {\n this.level = level == null ? null : level.trim();\n }", "public void setLevel(String level) {\n this.level = level == null ? null : level.trim();\n }", "public static int validate(int level) {\n if (validLevels.contains(level)) {\n return level;\n } else {\n throw new IllegalArgumentException(\"Invalid level\");\n }\n }", "public void setLevel(String level);", "public int checkLevel(int level, String requestTask) {\n\t\tint ret = 1;\n\t\tswitch(requestTask) {\n\t\tcase \"add\":\n\t\t\tif(level == 2)\n\t\t\t\tret = 1;\n\t\t\tbreak;\n\t\tcase \"delete\":\n\t\tcase \"modify\":\n\t\t\tif(level == 3)\n\t\t\t\tret = 1;\n\t\t}\n\t\treturn ret;\n\t}", "public BuildALevel(List<String> level) {\n this.level = level;\n this.map = new TreeMap<String, String>();\n // call the splitLevelDetails method\n splitLevelDetails();\n }", "public void setLevel(int level) {\n if(level > Constant.MAX_LEVEL){\n this.level = Constant.MAX_LEVEL;\n }else {\n this.level = level;\n }\n this.expToLevelUp = this.expValues[this.level];\n }", "public void setLevel(int level) {\n this.level = level;\n }", "public void setLevel(int level) {\n this.level = level;\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(int level) {\n if (level < 1)\n throw new IllegalArgumentException(\"Cannot be a level less than 0\");\n\n this.level = level;\n }", "public void setLevel(String newLevel) {\n level = newLevel;\n }", "public void setLevel(String value) {\n this.level = value;\n }", "public void setLevel(Level level) {\r\n\t\tthis.level = level;\r\n\t}", "public void setLevel(Level level) {\n\t\tthis.level = level;\n\t}", "public abstract int levelRequired();", "public void setLevel(int level){\n\t\tthis.level = level;\n\t}", "public void setLevel(int level)\r\n {\r\n\tthis.level = level;\r\n }", "public void setLevel(int level) { \r\n\t\tthis.level = level; \r\n\t}", "protected void setLevel(int level)\n {\n this.level = level;\n }", "public void setLevel(int level) {\n\t\tthis.level = level;\n\t}", "public void setLevel(int level) {\n\t\tthis.level = level;\n\t}", "protected void setLevel(int level){\r\n this.level = level;\r\n }", "public int level(Tree<K, V> t, int level, K key) {\n\t\tif (key.compareTo(this.key) == 0) {\n\t\t\treturn level;\n\t\t} else if (key.compareTo(this.key) < 0) {\n\t\t\treturn left.level(left, level + 1, key);\n\t\t} else {\n\t\t\treturn right.level(right, level + 1, key);\n\t\t}\n\t}", "public void setLevel(int level) {\n \t\tthis.level = level;\n \t}", "public void setLevel(int level) {\r\n\t\t\r\n\t\tthis.level = level;\r\n\t\t\r\n\t}", "public void setLevel(int level) {\n\t\tthis.level = level;\t\n\t}", "private void getLevelByLevel(Node root, int level, ArrayList<LinkedList<Node>> arrL) {\n\t\tif(root == null) {\n\t\t\treturn;\n\t\t}\n\t\tLinkedList<Node> n = null;\n\t\tif(arrL.size() == level) {\n\t\t\t n = new LinkedList<>();\n\t\t\tn.add(root);\n\t\t\tarrL.add(n);\n\t\t} else {\n\t\t\tn = arrL.get(level);\n\t\t\tn.add(root);\n\t\t}\n\t\tgetLevelByLevel(root.left, level+1, arrL);\n\t\tgetLevelByLevel(root.right, level+1, arrL);\n\t\t\n\t}", "public ParseTreeNode visit(LevelNode levelNode) {\n return null;\n }", "public static void parseRegularLine(String line, int lineNum, SingleLevel level) {\r\n String[] parts = line.trim().split(\":\");\r\n if (!(parts.length == 2)) {\r\n System.out.println(\"Illegal input, must have a key before : and value after :,\"\r\n + \" in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n String key = parts[0];\r\n String value = parts[1];\r\n if (key.equals(\"level_name\")) {\r\n level.setName(value);\r\n }\r\n if (key.equals(\"ball_velocities\")) {\r\n int numberOfBalls = 0;\r\n String[] velocities = value.split(\" \");\r\n for (String velocity : velocities) {\r\n String[] velocityComponents = velocity.split(\",\");\r\n if (!(velocityComponents.length == 2)) {\r\n System.out.println(\"Illegal velocity input in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n String angle = velocityComponents[0];\r\n String speed = velocityComponents[1];\r\n try {\r\n if (Double.valueOf(speed) <= 0) {\r\n throw new NumberFormatException();\r\n }\r\n level.addBallVelocity(Velocity.fromAngleAndSpeed(Double.valueOf(angle),\r\n Double.valueOf(speed)));\r\n numberOfBalls++;\r\n } catch (NumberFormatException e) {\r\n System.out.println(\"Illegal velocity input, in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n level.setNumberOfBalls(numberOfBalls);\r\n }\r\n if (key.equals(\"background\")) {\r\n if (value.startsWith(\"image(\")) {\r\n value = value.substring(\"image(\".length());\r\n value = value.replace(\")\", \"\");\r\n try {\r\n Image image = ImageIO.read(ClassLoader.getSystemClassLoader().getResourceAsStream(value));\r\n LevelBackground background = new LevelBackground(image);\r\n level.setBackground(background);\r\n } catch (Exception e) {\r\n System.out.println(\"Can't find the background image, in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n } else if (value.startsWith(\"color(\")) {\r\n Color color = ColorParser.colorFromString(value);\r\n if (color == null) {\r\n System.out.println(\"Check color input, in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n LevelBackground background = new LevelBackground(color);\r\n level.setBackground(background);\r\n } else {\r\n System.out.println(\"No image or color for background, in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n if (key.equals(\"paddle_width\")) {\r\n try {\r\n if (Integer.valueOf(value) <= 0) {\r\n throw new NumberFormatException();\r\n }\r\n level.setPaddleWidth(Integer.valueOf(value));\r\n } catch (NumberFormatException e) {\r\n System.out.println(\"Illegal paddle width in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n if (key.equals(\"paddle_speed\")) {\r\n try {\r\n if (Integer.valueOf(value) <= 0) {\r\n throw new Exception();\r\n }\r\n level.setPaddleSpeed(Integer.valueOf(value));\r\n } catch (Exception e) {\r\n System.out.println(\"Illegal paddle speed in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n if (key.equals(\"block_definitions\")) {\r\n try {\r\n Reader blockReader = new InputStreamReader(ClassLoader.getSystemClassLoader()\r\n .getResourceAsStream(value));\r\n blocksFromSymbolsFactory = BlocksDefinitionReader.fromReader(blockReader);\r\n } catch (Exception e) {\r\n System.out.println(\"Illegal block defenitions file check line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n if (key.equals(\"blocks_start_x\")) {\r\n try {\r\n if (Integer.valueOf(value) < 0) {\r\n throw new Exception();\r\n }\r\n level.setBlocksXPos(Integer.valueOf(value));\r\n } catch (Exception e) {\r\n System.out.println(\"Illegal X value of printing blocks in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n if (key.equals(\"blocks_start_y\")) {\r\n try {\r\n if (Integer.valueOf(value) < 0) {\r\n throw new Exception();\r\n }\r\n level.setBlocksStartY(Integer.valueOf(value));\r\n } catch (Exception e) {\r\n System.out.println(\"Illegal Y value of printing blocks in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n\r\n if (key.equals(\"num_blocks\")) {\r\n try {\r\n if (Integer.valueOf(value) < 0) {\r\n throw new Exception();\r\n }\r\n level.setNumberOfBlocksToRemove(Integer.valueOf(value));\r\n } catch (Exception e) {\r\n System.out.println(\"Error in the number of blocks in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n if (key.equals(\"row_height\")) {\r\n try {\r\n if (Integer.valueOf(value) <= 0) {\r\n throw new Exception();\r\n }\r\n level.setRowHeight(Integer.valueOf(value));\r\n } catch (Exception e) {\r\n System.out.println(\"EIllegal row height in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n }", "protected int resolveLevel(FieldDeclaration field) {\n if (field.type != null || field.binding == null)\n return IMPOSSIBLE_MATCH;\n if (this.pattern.declaringSimpleName != null && !matchesName(this.pattern.declaringSimpleName, field.binding.type.sourceName()))\n return IMPOSSIBLE_MATCH;\n if (!(field.initialization instanceof AllocationExpression) || field.initialization.resolvedType.isLocalType())\n return IMPOSSIBLE_MATCH;\n return resolveLevel(((AllocationExpression) field.initialization).binding);\n }", "public void checkLevel(){\n if(score<50){\n level = 1;\n asteroidsMaxNumber = 5;\n }\n if(score>50 && level == 1){\n level = 2;\n asteroidsMaxNumber = 7;\n }\n if(score>100 && level == 2){\n level = 3;\n asteroidsMaxNumber = 10;\n }\n if(score>200 && level == 3){\n level = 4;\n asteroidsMaxNumber = 13;\n }\n if(score>350 && level == 4){\n level = 5;\n asteroidsMaxNumber = 15;\n }\n }", "public void setLevel (String newLevel)\n {\n this.level = newLevel; \n }", "public String getLevel() {\n return level;\n }", "public final void setLevel(final int level) {\n\t\tthis.level = level;\n\t}", "protected int getLevel(){\r\n return this.level;\r\n }", "public static void setMinimumLevel(Level level) {\n\t\tminLevel = level;\n\t}", "public String getLevel() {\n return level;\n }", "public String getLevel() {\n return level;\n }", "public String getLevel() {\n return level;\n }", "public String getLevel() {\n return level;\n }", "public String getLevel() {\n return level;\n }", "public String getLevel ()\n {\n return level;\n }", "public Builder setLevel(final String value) {\n _level = value;\n return this;\n }", "private void setLevel(int level){\r\n\t\tswitch(level){\r\n\t\t\tcase Game.LEVEL_ONE:\r\n\t\t\tcase Game.LEVEL_TWO:\r\n\t\t\tcase Game.LEVEL_THREE:\r\n\t\t\t\tthis.level = level;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tSystem.err.println(\"Improper level input, use 'Game.LEVEL_#' to accurately input a level into this method\");\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "private int getLevel(String nextLine){\n\t\t Matcher matcher = plusminus.matcher(nextLine);\n\t\t if(matcher.find())\n\t\t \treturn matcher.start()+1;\n\t\telse return 0;\n\t\t\n\t}", "public String getLevel() {\n return this.level;\n }", "public int getLevel()\n {\n return level; \n }", "public void setLevel(int level) {\r\n\t\tthis.level = Math.max(0, level);\r\n\t}", "public int getLevel(){\n return level;\n }", "public int getLevel(){\n return level;\n }", "public String getLevel()\n {\n return level;\n }", "public static TreeNode task2_3_Construct_Level_In(int[] in, int[] level) {\n\t\treturn null;\n\t}", "public String getLevel(){\n\t\treturn level;\n\t}", "public String getLevel() {\n return level;\n }", "public LevelParser(char[][] level) throws SyntacticIncException{\n\t\tlevelActive = new char[level.length+2][level[0].length+2];\n\t\tfile = null;\n\t\tthis.level = level.clone();\n\t\tfillActiveLevels();\n\t\tif (!syntaktischRichtig()) \n\t\t{\n\t\t\tlevel = null;\n\t\t\tlevelActive = null;\n\t\t\tthrow new SyntacticIncException(\"Syntaktisch Inkorrekt\");\n\t\t} else \n\t\t{\n\t\t\tlevelGeladen = true;\n\t\t}\n\t}", "public int getLevel(){\n\t\treturn level;\n\t}", "public void setLevel(final String level) {\n setAttribute(ATTRIBUTE_LEVEL, level);\n }", "public int getLevel() {\r\n return level;\r\n }", "public void setLevel(int value) {\n this.level = value;\n }", "abstract int getMaxLevel();", "public int getLevelValue() {\n return level_;\n }", "public int getLevel()\r\n {\r\n return level;\r\n }", "public void setLevel(String lev) {\n\t\tlevel = lev;\n\t}", "public Integer getLevel() {\n return level;\n }", "public Integer getLevel() {\n return level;\n }", "public Integer getLevel() {\n return level;\n }", "public Integer getLevel() {\n return level;\n }", "public Integer getLevel() {\n return level;\n }", "public int getLevel(){\n return this.level;\n }", "public int getLevel(){\n return this.level;\n }", "private void checkLevelUp() {\n // Count the number of levels gained, if any\n int levels = 0;\n int required;\n while (exp >= (required = classData.getRequiredExp(level + levels)) && level + levels < classData.getMaxLevel()) {\n exp -= required;\n levels++;\n }\n\n // Give the levels if applicable\n if (levels > 0) {\n giveLevels(levels);\n\n // Level up message\n if (SkillAPI.getSettings().isShowLevelMessages()) {\n TitleManager.show(\n player.getPlayer(),\n TitleType.LEVEL_UP,\n NotificationNodes.LVL,\n RPGFilter.LEVEL.setReplacement(level + \"\"),\n RPGFilter.CLASS.setReplacement(classData.getName()),\n RPGFilter.POINTS.setReplacement(points + \"\"),\n Filter.AMOUNT.setReplacement(levels + \"\")\n );\n }\n }\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public void setLevel(Level level) { this.currentLevel = level; }", "public int getLevel() { \r\n\t\treturn level; \r\n\t}", "Interface(Level level){\n\t\tthis.level=level;\n\t}", "public int getLevel()\n {\n return level;\n }", "public String getSqlFieldByDimensionLevelName(String dimension, String level) {\n\t\tList<Dimension> dimensions = this.Dim;\n\t\tfor (int j = 0; j < dimensions.size(); j++) { // for each dimension\n\t\t\tif (dimensions.get(j).hasSameName(dimension)) {\n\t\t\t\tArrayList<Hierarchy> current_hierachy = dimensions.get(j).getHier();\n\t\t\t\tfor (int k = 0; k < current_hierachy.size(); k++) {// for each\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// hierarchy\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// of\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// dimension\n\t\t\t\t\tList<Level> current_lvls = current_hierachy.get(k).lvls;\n\t\t\t\t\tfor (int l = 0; l < current_lvls.size(); l++) {\n\t\t\t\t\t\tif (current_lvls.get(l).getName().equals(level))\n\t\t\t\t\t\t\treturn current_lvls.get(l).getAttributeName(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}", "int getLevel();", "int getLevel();", "int getLevel();", "int getLevel();", "int getLevel();" ]
[ "0.6141118", "0.6141118", "0.6063639", "0.5997443", "0.5997443", "0.5997443", "0.5997443", "0.5974696", "0.587552", "0.58468944", "0.58358794", "0.58099204", "0.5779636", "0.5779636", "0.5771478", "0.5771478", "0.5771478", "0.5771478", "0.5771478", "0.5746632", "0.57180554", "0.57171434", "0.57035774", "0.57028526", "0.5689381", "0.56715375", "0.56612056", "0.56559867", "0.5641974", "0.561306", "0.561306", "0.5599429", "0.5574958", "0.55671203", "0.55504453", "0.55434126", "0.55416584", "0.54803485", "0.5472826", "0.54583704", "0.5415273", "0.54011524", "0.5376791", "0.53753245", "0.53616524", "0.53569865", "0.5333207", "0.5333207", "0.5333207", "0.5333207", "0.5333207", "0.53291833", "0.5306276", "0.53004974", "0.5299762", "0.52989954", "0.5292814", "0.5285807", "0.5285216", "0.5285216", "0.52787197", "0.52778625", "0.52629673", "0.5261757", "0.5259218", "0.5256287", "0.52545714", "0.5254328", "0.52513206", "0.52512604", "0.52397376", "0.5239703", "0.5238679", "0.52310586", "0.52310586", "0.52310586", "0.52310586", "0.52310586", "0.52291775", "0.52291775", "0.52256596", "0.5225616", "0.5225616", "0.5225616", "0.5225616", "0.5225616", "0.5225616", "0.5225616", "0.5225616", "0.5225616", "0.5225616", "0.52246106", "0.5219905", "0.5218369", "0.5215397", "0.52099276", "0.5189965", "0.5189965", "0.5189965", "0.5189965", "0.5189965" ]
0.0
-1
TODO: Add checks on input validity (see below) Note: so far assumes that the given level is the one to which the field belongs (which should be true but isn't guaranteed (?))
public String setField(ComboFieldEditor field, Composite parent) { String level = field.getPreferencesLevel(); // If the level is "project" and project == null then just set // the field here (as a special case). if (IPreferencesService.PROJECT_LEVEL.equals(level) && service.getProject() == null) { if (parent.isDisposed()) { System.err.println("PreferencesUtilities.setField(): composite is disposed"); } // Updating a radio field with a null value should // cause the first button to be selected field.setFieldValueFromOutside(null); if (!parent.isDisposed()) { // Assume that editability on the project level is set // appropriately by a project-selection listener //field.getTextControl(composite).setEditable(false); field.getComboBoxControl().setBackground(colorWhite); Control[] children = field.getComboBoxControl().getChildren(); if (children != null) { for (int i = 0; i < children.length; i++) { Button button = (Button) children[i]; button.setBackground(PreferencesUtilities.colorWhite); } } } // Pretend that this was set at the project level? // (It was certainly cleared at that level) return IPreferencesService.PROJECT_LEVEL; } // Otherwise, we have a legitimate level, so set normally String levelFromWhichSet = field.loadWithInheritance(); // Note: You can evidently load a field even when it's control // is disposed. In that case you can (evidently) change the // text in the field but not the background color. if (!parent.isDisposed()) { // Needed if color is set in loadWithInheritance()? // (Should the color be set in loadWithInheritance()? // if (field.isInherited()) { // field.getComboBoxControl(composite).setBackground(colorBluish); // } else { // field.getComboBoxControl(composite).setBackground(colorWhite); // } } else { // If composite.isDisposed(), then both field.getTextControl(composite) // and field.getTextControl() will return null; if needed, a text control // must be obtained from somewhere else--but I have no idea where that // might be. Not sure why composite.isDisposed() here in the first place, // especially considering that the field can be set } return levelFromWhichSet; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setLevel(String level) {\n this.level = level;\n }", "public void setLevel(String level) {\n this.level = level;\n }", "public void setLevel(String level){\n\t\tthis.level = level;\n\t}", "public void setLevel(String level) {\n this.level = level == null ? null : level.trim();\n }", "public void setLevel(String level) {\n this.level = level == null ? null : level.trim();\n }", "public void setLevel(String level) {\n this.level = level == null ? null : level.trim();\n }", "public void setLevel(String level) {\n this.level = level == null ? null : level.trim();\n }", "public static int validate(int level) {\n if (validLevels.contains(level)) {\n return level;\n } else {\n throw new IllegalArgumentException(\"Invalid level\");\n }\n }", "public void setLevel(String level);", "public int checkLevel(int level, String requestTask) {\n\t\tint ret = 1;\n\t\tswitch(requestTask) {\n\t\tcase \"add\":\n\t\t\tif(level == 2)\n\t\t\t\tret = 1;\n\t\t\tbreak;\n\t\tcase \"delete\":\n\t\tcase \"modify\":\n\t\t\tif(level == 3)\n\t\t\t\tret = 1;\n\t\t}\n\t\treturn ret;\n\t}", "public BuildALevel(List<String> level) {\n this.level = level;\n this.map = new TreeMap<String, String>();\n // call the splitLevelDetails method\n splitLevelDetails();\n }", "public void setLevel(int level) {\n if(level > Constant.MAX_LEVEL){\n this.level = Constant.MAX_LEVEL;\n }else {\n this.level = level;\n }\n this.expToLevelUp = this.expValues[this.level];\n }", "public void setLevel(int level) {\n this.level = level;\n }", "public void setLevel(int level) {\n this.level = level;\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(int level) {\n if (level < 1)\n throw new IllegalArgumentException(\"Cannot be a level less than 0\");\n\n this.level = level;\n }", "public void setLevel(String newLevel) {\n level = newLevel;\n }", "public void setLevel(String value) {\n this.level = value;\n }", "public void setLevel(Level level) {\r\n\t\tthis.level = level;\r\n\t}", "public void setLevel(Level level) {\n\t\tthis.level = level;\n\t}", "public abstract int levelRequired();", "public void setLevel(int level){\n\t\tthis.level = level;\n\t}", "public void setLevel(int level)\r\n {\r\n\tthis.level = level;\r\n }", "public void setLevel(int level) { \r\n\t\tthis.level = level; \r\n\t}", "protected void setLevel(int level)\n {\n this.level = level;\n }", "public void setLevel(int level) {\n\t\tthis.level = level;\n\t}", "public void setLevel(int level) {\n\t\tthis.level = level;\n\t}", "protected void setLevel(int level){\r\n this.level = level;\r\n }", "public int level(Tree<K, V> t, int level, K key) {\n\t\tif (key.compareTo(this.key) == 0) {\n\t\t\treturn level;\n\t\t} else if (key.compareTo(this.key) < 0) {\n\t\t\treturn left.level(left, level + 1, key);\n\t\t} else {\n\t\t\treturn right.level(right, level + 1, key);\n\t\t}\n\t}", "public void setLevel(int level) {\n \t\tthis.level = level;\n \t}", "public void setLevel(int level) {\r\n\t\t\r\n\t\tthis.level = level;\r\n\t\t\r\n\t}", "public void setLevel(int level) {\n\t\tthis.level = level;\t\n\t}", "private void getLevelByLevel(Node root, int level, ArrayList<LinkedList<Node>> arrL) {\n\t\tif(root == null) {\n\t\t\treturn;\n\t\t}\n\t\tLinkedList<Node> n = null;\n\t\tif(arrL.size() == level) {\n\t\t\t n = new LinkedList<>();\n\t\t\tn.add(root);\n\t\t\tarrL.add(n);\n\t\t} else {\n\t\t\tn = arrL.get(level);\n\t\t\tn.add(root);\n\t\t}\n\t\tgetLevelByLevel(root.left, level+1, arrL);\n\t\tgetLevelByLevel(root.right, level+1, arrL);\n\t\t\n\t}", "public ParseTreeNode visit(LevelNode levelNode) {\n return null;\n }", "public static void parseRegularLine(String line, int lineNum, SingleLevel level) {\r\n String[] parts = line.trim().split(\":\");\r\n if (!(parts.length == 2)) {\r\n System.out.println(\"Illegal input, must have a key before : and value after :,\"\r\n + \" in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n String key = parts[0];\r\n String value = parts[1];\r\n if (key.equals(\"level_name\")) {\r\n level.setName(value);\r\n }\r\n if (key.equals(\"ball_velocities\")) {\r\n int numberOfBalls = 0;\r\n String[] velocities = value.split(\" \");\r\n for (String velocity : velocities) {\r\n String[] velocityComponents = velocity.split(\",\");\r\n if (!(velocityComponents.length == 2)) {\r\n System.out.println(\"Illegal velocity input in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n String angle = velocityComponents[0];\r\n String speed = velocityComponents[1];\r\n try {\r\n if (Double.valueOf(speed) <= 0) {\r\n throw new NumberFormatException();\r\n }\r\n level.addBallVelocity(Velocity.fromAngleAndSpeed(Double.valueOf(angle),\r\n Double.valueOf(speed)));\r\n numberOfBalls++;\r\n } catch (NumberFormatException e) {\r\n System.out.println(\"Illegal velocity input, in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n level.setNumberOfBalls(numberOfBalls);\r\n }\r\n if (key.equals(\"background\")) {\r\n if (value.startsWith(\"image(\")) {\r\n value = value.substring(\"image(\".length());\r\n value = value.replace(\")\", \"\");\r\n try {\r\n Image image = ImageIO.read(ClassLoader.getSystemClassLoader().getResourceAsStream(value));\r\n LevelBackground background = new LevelBackground(image);\r\n level.setBackground(background);\r\n } catch (Exception e) {\r\n System.out.println(\"Can't find the background image, in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n } else if (value.startsWith(\"color(\")) {\r\n Color color = ColorParser.colorFromString(value);\r\n if (color == null) {\r\n System.out.println(\"Check color input, in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n LevelBackground background = new LevelBackground(color);\r\n level.setBackground(background);\r\n } else {\r\n System.out.println(\"No image or color for background, in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n if (key.equals(\"paddle_width\")) {\r\n try {\r\n if (Integer.valueOf(value) <= 0) {\r\n throw new NumberFormatException();\r\n }\r\n level.setPaddleWidth(Integer.valueOf(value));\r\n } catch (NumberFormatException e) {\r\n System.out.println(\"Illegal paddle width in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n if (key.equals(\"paddle_speed\")) {\r\n try {\r\n if (Integer.valueOf(value) <= 0) {\r\n throw new Exception();\r\n }\r\n level.setPaddleSpeed(Integer.valueOf(value));\r\n } catch (Exception e) {\r\n System.out.println(\"Illegal paddle speed in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n if (key.equals(\"block_definitions\")) {\r\n try {\r\n Reader blockReader = new InputStreamReader(ClassLoader.getSystemClassLoader()\r\n .getResourceAsStream(value));\r\n blocksFromSymbolsFactory = BlocksDefinitionReader.fromReader(blockReader);\r\n } catch (Exception e) {\r\n System.out.println(\"Illegal block defenitions file check line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n if (key.equals(\"blocks_start_x\")) {\r\n try {\r\n if (Integer.valueOf(value) < 0) {\r\n throw new Exception();\r\n }\r\n level.setBlocksXPos(Integer.valueOf(value));\r\n } catch (Exception e) {\r\n System.out.println(\"Illegal X value of printing blocks in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n if (key.equals(\"blocks_start_y\")) {\r\n try {\r\n if (Integer.valueOf(value) < 0) {\r\n throw new Exception();\r\n }\r\n level.setBlocksStartY(Integer.valueOf(value));\r\n } catch (Exception e) {\r\n System.out.println(\"Illegal Y value of printing blocks in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n\r\n if (key.equals(\"num_blocks\")) {\r\n try {\r\n if (Integer.valueOf(value) < 0) {\r\n throw new Exception();\r\n }\r\n level.setNumberOfBlocksToRemove(Integer.valueOf(value));\r\n } catch (Exception e) {\r\n System.out.println(\"Error in the number of blocks in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n if (key.equals(\"row_height\")) {\r\n try {\r\n if (Integer.valueOf(value) <= 0) {\r\n throw new Exception();\r\n }\r\n level.setRowHeight(Integer.valueOf(value));\r\n } catch (Exception e) {\r\n System.out.println(\"EIllegal row height in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n }", "protected int resolveLevel(FieldDeclaration field) {\n if (field.type != null || field.binding == null)\n return IMPOSSIBLE_MATCH;\n if (this.pattern.declaringSimpleName != null && !matchesName(this.pattern.declaringSimpleName, field.binding.type.sourceName()))\n return IMPOSSIBLE_MATCH;\n if (!(field.initialization instanceof AllocationExpression) || field.initialization.resolvedType.isLocalType())\n return IMPOSSIBLE_MATCH;\n return resolveLevel(((AllocationExpression) field.initialization).binding);\n }", "public void checkLevel(){\n if(score<50){\n level = 1;\n asteroidsMaxNumber = 5;\n }\n if(score>50 && level == 1){\n level = 2;\n asteroidsMaxNumber = 7;\n }\n if(score>100 && level == 2){\n level = 3;\n asteroidsMaxNumber = 10;\n }\n if(score>200 && level == 3){\n level = 4;\n asteroidsMaxNumber = 13;\n }\n if(score>350 && level == 4){\n level = 5;\n asteroidsMaxNumber = 15;\n }\n }", "public void setLevel (String newLevel)\n {\n this.level = newLevel; \n }", "public final void setLevel(final int level) {\n\t\tthis.level = level;\n\t}", "public String getLevel() {\n return level;\n }", "protected int getLevel(){\r\n return this.level;\r\n }", "public static void setMinimumLevel(Level level) {\n\t\tminLevel = level;\n\t}", "public String getLevel() {\n return level;\n }", "public String getLevel() {\n return level;\n }", "public String getLevel() {\n return level;\n }", "public String getLevel() {\n return level;\n }", "public String getLevel() {\n return level;\n }", "public String getLevel ()\n {\n return level;\n }", "public Builder setLevel(final String value) {\n _level = value;\n return this;\n }", "private void setLevel(int level){\r\n\t\tswitch(level){\r\n\t\t\tcase Game.LEVEL_ONE:\r\n\t\t\tcase Game.LEVEL_TWO:\r\n\t\t\tcase Game.LEVEL_THREE:\r\n\t\t\t\tthis.level = level;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tSystem.err.println(\"Improper level input, use 'Game.LEVEL_#' to accurately input a level into this method\");\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "private int getLevel(String nextLine){\n\t\t Matcher matcher = plusminus.matcher(nextLine);\n\t\t if(matcher.find())\n\t\t \treturn matcher.start()+1;\n\t\telse return 0;\n\t\t\n\t}", "public String getLevel() {\n return this.level;\n }", "public int getLevel()\n {\n return level; \n }", "public void setLevel(int level) {\r\n\t\tthis.level = Math.max(0, level);\r\n\t}", "public int getLevel(){\n return level;\n }", "public int getLevel(){\n return level;\n }", "public String getLevel()\n {\n return level;\n }", "public static TreeNode task2_3_Construct_Level_In(int[] in, int[] level) {\n\t\treturn null;\n\t}", "public String getLevel(){\n\t\treturn level;\n\t}", "public String getLevel() {\n return level;\n }", "public LevelParser(char[][] level) throws SyntacticIncException{\n\t\tlevelActive = new char[level.length+2][level[0].length+2];\n\t\tfile = null;\n\t\tthis.level = level.clone();\n\t\tfillActiveLevels();\n\t\tif (!syntaktischRichtig()) \n\t\t{\n\t\t\tlevel = null;\n\t\t\tlevelActive = null;\n\t\t\tthrow new SyntacticIncException(\"Syntaktisch Inkorrekt\");\n\t\t} else \n\t\t{\n\t\t\tlevelGeladen = true;\n\t\t}\n\t}", "public void setLevel(final String level) {\n setAttribute(ATTRIBUTE_LEVEL, level);\n }", "public int getLevel(){\n\t\treturn level;\n\t}", "public int getLevel() {\r\n return level;\r\n }", "public void setLevel(int value) {\n this.level = value;\n }", "abstract int getMaxLevel();", "public int getLevelValue() {\n return level_;\n }", "public int getLevel()\r\n {\r\n return level;\r\n }", "public void setLevel(String lev) {\n\t\tlevel = lev;\n\t}", "public Integer getLevel() {\n return level;\n }", "public Integer getLevel() {\n return level;\n }", "public Integer getLevel() {\n return level;\n }", "public Integer getLevel() {\n return level;\n }", "public Integer getLevel() {\n return level;\n }", "public int getLevel(){\n return this.level;\n }", "public int getLevel(){\n return this.level;\n }", "private void checkLevelUp() {\n // Count the number of levels gained, if any\n int levels = 0;\n int required;\n while (exp >= (required = classData.getRequiredExp(level + levels)) && level + levels < classData.getMaxLevel()) {\n exp -= required;\n levels++;\n }\n\n // Give the levels if applicable\n if (levels > 0) {\n giveLevels(levels);\n\n // Level up message\n if (SkillAPI.getSettings().isShowLevelMessages()) {\n TitleManager.show(\n player.getPlayer(),\n TitleType.LEVEL_UP,\n NotificationNodes.LVL,\n RPGFilter.LEVEL.setReplacement(level + \"\"),\n RPGFilter.CLASS.setReplacement(classData.getName()),\n RPGFilter.POINTS.setReplacement(points + \"\"),\n Filter.AMOUNT.setReplacement(levels + \"\")\n );\n }\n }\n }", "public void setLevel(Level level) { this.currentLevel = level; }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() { \r\n\t\treturn level; \r\n\t}", "Interface(Level level){\n\t\tthis.level=level;\n\t}", "public int getLevel()\n {\n return level;\n }", "public String getSqlFieldByDimensionLevelName(String dimension, String level) {\n\t\tList<Dimension> dimensions = this.Dim;\n\t\tfor (int j = 0; j < dimensions.size(); j++) { // for each dimension\n\t\t\tif (dimensions.get(j).hasSameName(dimension)) {\n\t\t\t\tArrayList<Hierarchy> current_hierachy = dimensions.get(j).getHier();\n\t\t\t\tfor (int k = 0; k < current_hierachy.size(); k++) {// for each\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// hierarchy\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// of\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// dimension\n\t\t\t\t\tList<Level> current_lvls = current_hierachy.get(k).lvls;\n\t\t\t\t\tfor (int l = 0; l < current_lvls.size(); l++) {\n\t\t\t\t\t\tif (current_lvls.get(l).getName().equals(level))\n\t\t\t\t\t\t\treturn current_lvls.get(l).getAttributeName(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}", "int getLevel();", "int getLevel();", "int getLevel();", "int getLevel();", "int getLevel();" ]
[ "0.61418784", "0.61418784", "0.6063864", "0.59983546", "0.59983546", "0.59983546", "0.59983546", "0.5976141", "0.5874746", "0.5848736", "0.5834868", "0.5810041", "0.5780163", "0.5780163", "0.57720494", "0.57720494", "0.57720494", "0.57720494", "0.57720494", "0.5747575", "0.571742", "0.57158524", "0.5704281", "0.57036847", "0.56861234", "0.5671637", "0.56613606", "0.565596", "0.5642172", "0.56138045", "0.56138045", "0.55990857", "0.5575828", "0.5567425", "0.5550837", "0.5543856", "0.5542866", "0.54792076", "0.54735637", "0.5456065", "0.5414618", "0.53979355", "0.5376496", "0.53755003", "0.53588104", "0.53573304", "0.5331944", "0.5331944", "0.5331944", "0.5331944", "0.5331944", "0.5325906", "0.5304693", "0.53013206", "0.52986133", "0.5297422", "0.5289817", "0.5287198", "0.5282668", "0.5282668", "0.52769774", "0.52766204", "0.5261374", "0.5260511", "0.52588415", "0.52561474", "0.52544385", "0.5252338", "0.5249446", "0.52477896", "0.5238001", "0.52373785", "0.52365524", "0.5229721", "0.5229721", "0.5229721", "0.5229721", "0.5229721", "0.52265996", "0.52265996", "0.5224331", "0.52238363", "0.5223748", "0.5223748", "0.5223748", "0.5223748", "0.5223748", "0.5223748", "0.5223748", "0.5223748", "0.5223748", "0.5223748", "0.5217674", "0.5216753", "0.5213047", "0.52121246", "0.51872104", "0.51872104", "0.51872104", "0.51872104", "0.51872104" ]
0.0
-1
TODO: Add checks on input validity (see below) Note: so far assumes that the given level is the one to which the field belongs (which should be true but isn't guaranteed (?))
public String setField(RadioGroupFieldEditor field, Composite composite) { String level = field.getPreferencesLevel(); // If the level is "project" and project == null then just set // the field here (as a special case). if (IPreferencesService.PROJECT_LEVEL.equals(level) && service.getProject() == null) { if (composite.isDisposed()) { System.err.println("PreferencesUtilities.setField(): composite is disposed"); } // Updating a radio field with a null value should // cause the first button to be selected field.setFieldValueFromOutside(null); if (!composite.isDisposed()) { // Assume that editability on the project level is set // appropriately by a project-selection listener //field.getTextControl(composite).setEditable(false); field.getRadioBoxControl().setBackground(colorBluish); Button[] radioButtons = field.getRadioButtons(); if (radioButtons != null) { for (int i = 0; i < radioButtons.length; i++) { Button button = (Button) radioButtons[i]; button.setBackground(colorBluish); } } } // Pretend that this was set at the project level? // (It was certainly cleared at that level) return IPreferencesService.PROJECT_LEVEL; } // Otherwise, we have a legitimate level, so set normally String levelFromWhichSet = field.loadWithInheritance(); // Note: You can evidently load a field even when it's control // is disposed. In that case (evidently) you can change the // text in the field but not the background color. if (!composite.isDisposed()) { // Needed if color is set in loadWithInheritance()? // (Should the color be set in loadWithInheritance()? // if (field.isInherited()) { // field.getRadioBoxControl(composite).setBackground(colorBluish); // } else { // field.getRadioBoxControl(composite).setBackground(colorWhite); // } } else { // If composite.isDisposed(), then both field.getTextControl(composite) // and field.getTextControl() will return null; if needed, a text control // must be obtained from somewhere else--but I have no idea where that // might be. Not sure why composite.isDisposed() here in the first place, // especially considering that the field can be set } return levelFromWhichSet; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setLevel(String level) {\n this.level = level;\n }", "public void setLevel(String level) {\n this.level = level;\n }", "public void setLevel(String level){\n\t\tthis.level = level;\n\t}", "public void setLevel(String level) {\n this.level = level == null ? null : level.trim();\n }", "public void setLevel(String level) {\n this.level = level == null ? null : level.trim();\n }", "public void setLevel(String level) {\n this.level = level == null ? null : level.trim();\n }", "public void setLevel(String level) {\n this.level = level == null ? null : level.trim();\n }", "public static int validate(int level) {\n if (validLevels.contains(level)) {\n return level;\n } else {\n throw new IllegalArgumentException(\"Invalid level\");\n }\n }", "public void setLevel(String level);", "public int checkLevel(int level, String requestTask) {\n\t\tint ret = 1;\n\t\tswitch(requestTask) {\n\t\tcase \"add\":\n\t\t\tif(level == 2)\n\t\t\t\tret = 1;\n\t\t\tbreak;\n\t\tcase \"delete\":\n\t\tcase \"modify\":\n\t\t\tif(level == 3)\n\t\t\t\tret = 1;\n\t\t}\n\t\treturn ret;\n\t}", "public BuildALevel(List<String> level) {\n this.level = level;\n this.map = new TreeMap<String, String>();\n // call the splitLevelDetails method\n splitLevelDetails();\n }", "public void setLevel(int level) {\n if(level > Constant.MAX_LEVEL){\n this.level = Constant.MAX_LEVEL;\n }else {\n this.level = level;\n }\n this.expToLevelUp = this.expValues[this.level];\n }", "public void setLevel(int level) {\n this.level = level;\n }", "public void setLevel(int level) {\n this.level = level;\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(int level) {\n if (level < 1)\n throw new IllegalArgumentException(\"Cannot be a level less than 0\");\n\n this.level = level;\n }", "public void setLevel(String newLevel) {\n level = newLevel;\n }", "public void setLevel(String value) {\n this.level = value;\n }", "public void setLevel(Level level) {\r\n\t\tthis.level = level;\r\n\t}", "public void setLevel(Level level) {\n\t\tthis.level = level;\n\t}", "public abstract int levelRequired();", "public void setLevel(int level){\n\t\tthis.level = level;\n\t}", "public void setLevel(int level)\r\n {\r\n\tthis.level = level;\r\n }", "public void setLevel(int level) { \r\n\t\tthis.level = level; \r\n\t}", "protected void setLevel(int level)\n {\n this.level = level;\n }", "public void setLevel(int level) {\n\t\tthis.level = level;\n\t}", "public void setLevel(int level) {\n\t\tthis.level = level;\n\t}", "protected void setLevel(int level){\r\n this.level = level;\r\n }", "public int level(Tree<K, V> t, int level, K key) {\n\t\tif (key.compareTo(this.key) == 0) {\n\t\t\treturn level;\n\t\t} else if (key.compareTo(this.key) < 0) {\n\t\t\treturn left.level(left, level + 1, key);\n\t\t} else {\n\t\t\treturn right.level(right, level + 1, key);\n\t\t}\n\t}", "public void setLevel(int level) {\n \t\tthis.level = level;\n \t}", "public void setLevel(int level) {\r\n\t\t\r\n\t\tthis.level = level;\r\n\t\t\r\n\t}", "public void setLevel(int level) {\n\t\tthis.level = level;\t\n\t}", "private void getLevelByLevel(Node root, int level, ArrayList<LinkedList<Node>> arrL) {\n\t\tif(root == null) {\n\t\t\treturn;\n\t\t}\n\t\tLinkedList<Node> n = null;\n\t\tif(arrL.size() == level) {\n\t\t\t n = new LinkedList<>();\n\t\t\tn.add(root);\n\t\t\tarrL.add(n);\n\t\t} else {\n\t\t\tn = arrL.get(level);\n\t\t\tn.add(root);\n\t\t}\n\t\tgetLevelByLevel(root.left, level+1, arrL);\n\t\tgetLevelByLevel(root.right, level+1, arrL);\n\t\t\n\t}", "public ParseTreeNode visit(LevelNode levelNode) {\n return null;\n }", "public static void parseRegularLine(String line, int lineNum, SingleLevel level) {\r\n String[] parts = line.trim().split(\":\");\r\n if (!(parts.length == 2)) {\r\n System.out.println(\"Illegal input, must have a key before : and value after :,\"\r\n + \" in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n String key = parts[0];\r\n String value = parts[1];\r\n if (key.equals(\"level_name\")) {\r\n level.setName(value);\r\n }\r\n if (key.equals(\"ball_velocities\")) {\r\n int numberOfBalls = 0;\r\n String[] velocities = value.split(\" \");\r\n for (String velocity : velocities) {\r\n String[] velocityComponents = velocity.split(\",\");\r\n if (!(velocityComponents.length == 2)) {\r\n System.out.println(\"Illegal velocity input in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n String angle = velocityComponents[0];\r\n String speed = velocityComponents[1];\r\n try {\r\n if (Double.valueOf(speed) <= 0) {\r\n throw new NumberFormatException();\r\n }\r\n level.addBallVelocity(Velocity.fromAngleAndSpeed(Double.valueOf(angle),\r\n Double.valueOf(speed)));\r\n numberOfBalls++;\r\n } catch (NumberFormatException e) {\r\n System.out.println(\"Illegal velocity input, in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n level.setNumberOfBalls(numberOfBalls);\r\n }\r\n if (key.equals(\"background\")) {\r\n if (value.startsWith(\"image(\")) {\r\n value = value.substring(\"image(\".length());\r\n value = value.replace(\")\", \"\");\r\n try {\r\n Image image = ImageIO.read(ClassLoader.getSystemClassLoader().getResourceAsStream(value));\r\n LevelBackground background = new LevelBackground(image);\r\n level.setBackground(background);\r\n } catch (Exception e) {\r\n System.out.println(\"Can't find the background image, in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n } else if (value.startsWith(\"color(\")) {\r\n Color color = ColorParser.colorFromString(value);\r\n if (color == null) {\r\n System.out.println(\"Check color input, in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n LevelBackground background = new LevelBackground(color);\r\n level.setBackground(background);\r\n } else {\r\n System.out.println(\"No image or color for background, in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n if (key.equals(\"paddle_width\")) {\r\n try {\r\n if (Integer.valueOf(value) <= 0) {\r\n throw new NumberFormatException();\r\n }\r\n level.setPaddleWidth(Integer.valueOf(value));\r\n } catch (NumberFormatException e) {\r\n System.out.println(\"Illegal paddle width in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n if (key.equals(\"paddle_speed\")) {\r\n try {\r\n if (Integer.valueOf(value) <= 0) {\r\n throw new Exception();\r\n }\r\n level.setPaddleSpeed(Integer.valueOf(value));\r\n } catch (Exception e) {\r\n System.out.println(\"Illegal paddle speed in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n if (key.equals(\"block_definitions\")) {\r\n try {\r\n Reader blockReader = new InputStreamReader(ClassLoader.getSystemClassLoader()\r\n .getResourceAsStream(value));\r\n blocksFromSymbolsFactory = BlocksDefinitionReader.fromReader(blockReader);\r\n } catch (Exception e) {\r\n System.out.println(\"Illegal block defenitions file check line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n if (key.equals(\"blocks_start_x\")) {\r\n try {\r\n if (Integer.valueOf(value) < 0) {\r\n throw new Exception();\r\n }\r\n level.setBlocksXPos(Integer.valueOf(value));\r\n } catch (Exception e) {\r\n System.out.println(\"Illegal X value of printing blocks in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n if (key.equals(\"blocks_start_y\")) {\r\n try {\r\n if (Integer.valueOf(value) < 0) {\r\n throw new Exception();\r\n }\r\n level.setBlocksStartY(Integer.valueOf(value));\r\n } catch (Exception e) {\r\n System.out.println(\"Illegal Y value of printing blocks in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n\r\n if (key.equals(\"num_blocks\")) {\r\n try {\r\n if (Integer.valueOf(value) < 0) {\r\n throw new Exception();\r\n }\r\n level.setNumberOfBlocksToRemove(Integer.valueOf(value));\r\n } catch (Exception e) {\r\n System.out.println(\"Error in the number of blocks in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n if (key.equals(\"row_height\")) {\r\n try {\r\n if (Integer.valueOf(value) <= 0) {\r\n throw new Exception();\r\n }\r\n level.setRowHeight(Integer.valueOf(value));\r\n } catch (Exception e) {\r\n System.out.println(\"EIllegal row height in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n }", "protected int resolveLevel(FieldDeclaration field) {\n if (field.type != null || field.binding == null)\n return IMPOSSIBLE_MATCH;\n if (this.pattern.declaringSimpleName != null && !matchesName(this.pattern.declaringSimpleName, field.binding.type.sourceName()))\n return IMPOSSIBLE_MATCH;\n if (!(field.initialization instanceof AllocationExpression) || field.initialization.resolvedType.isLocalType())\n return IMPOSSIBLE_MATCH;\n return resolveLevel(((AllocationExpression) field.initialization).binding);\n }", "public void checkLevel(){\n if(score<50){\n level = 1;\n asteroidsMaxNumber = 5;\n }\n if(score>50 && level == 1){\n level = 2;\n asteroidsMaxNumber = 7;\n }\n if(score>100 && level == 2){\n level = 3;\n asteroidsMaxNumber = 10;\n }\n if(score>200 && level == 3){\n level = 4;\n asteroidsMaxNumber = 13;\n }\n if(score>350 && level == 4){\n level = 5;\n asteroidsMaxNumber = 15;\n }\n }", "public void setLevel (String newLevel)\n {\n this.level = newLevel; \n }", "public String getLevel() {\n return level;\n }", "public final void setLevel(final int level) {\n\t\tthis.level = level;\n\t}", "protected int getLevel(){\r\n return this.level;\r\n }", "public static void setMinimumLevel(Level level) {\n\t\tminLevel = level;\n\t}", "public String getLevel() {\n return level;\n }", "public String getLevel() {\n return level;\n }", "public String getLevel() {\n return level;\n }", "public String getLevel() {\n return level;\n }", "public String getLevel() {\n return level;\n }", "public String getLevel ()\n {\n return level;\n }", "public Builder setLevel(final String value) {\n _level = value;\n return this;\n }", "private void setLevel(int level){\r\n\t\tswitch(level){\r\n\t\t\tcase Game.LEVEL_ONE:\r\n\t\t\tcase Game.LEVEL_TWO:\r\n\t\t\tcase Game.LEVEL_THREE:\r\n\t\t\t\tthis.level = level;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tSystem.err.println(\"Improper level input, use 'Game.LEVEL_#' to accurately input a level into this method\");\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "private int getLevel(String nextLine){\n\t\t Matcher matcher = plusminus.matcher(nextLine);\n\t\t if(matcher.find())\n\t\t \treturn matcher.start()+1;\n\t\telse return 0;\n\t\t\n\t}", "public String getLevel() {\n return this.level;\n }", "public int getLevel()\n {\n return level; \n }", "public void setLevel(int level) {\r\n\t\tthis.level = Math.max(0, level);\r\n\t}", "public int getLevel(){\n return level;\n }", "public int getLevel(){\n return level;\n }", "public String getLevel()\n {\n return level;\n }", "public static TreeNode task2_3_Construct_Level_In(int[] in, int[] level) {\n\t\treturn null;\n\t}", "public String getLevel(){\n\t\treturn level;\n\t}", "public String getLevel() {\n return level;\n }", "public LevelParser(char[][] level) throws SyntacticIncException{\n\t\tlevelActive = new char[level.length+2][level[0].length+2];\n\t\tfile = null;\n\t\tthis.level = level.clone();\n\t\tfillActiveLevels();\n\t\tif (!syntaktischRichtig()) \n\t\t{\n\t\t\tlevel = null;\n\t\t\tlevelActive = null;\n\t\t\tthrow new SyntacticIncException(\"Syntaktisch Inkorrekt\");\n\t\t} else \n\t\t{\n\t\t\tlevelGeladen = true;\n\t\t}\n\t}", "public int getLevel(){\n\t\treturn level;\n\t}", "public void setLevel(final String level) {\n setAttribute(ATTRIBUTE_LEVEL, level);\n }", "public int getLevel() {\r\n return level;\r\n }", "public void setLevel(int value) {\n this.level = value;\n }", "abstract int getMaxLevel();", "public int getLevelValue() {\n return level_;\n }", "public int getLevel()\r\n {\r\n return level;\r\n }", "public void setLevel(String lev) {\n\t\tlevel = lev;\n\t}", "public Integer getLevel() {\n return level;\n }", "public Integer getLevel() {\n return level;\n }", "public Integer getLevel() {\n return level;\n }", "public Integer getLevel() {\n return level;\n }", "public Integer getLevel() {\n return level;\n }", "public int getLevel(){\n return this.level;\n }", "public int getLevel(){\n return this.level;\n }", "private void checkLevelUp() {\n // Count the number of levels gained, if any\n int levels = 0;\n int required;\n while (exp >= (required = classData.getRequiredExp(level + levels)) && level + levels < classData.getMaxLevel()) {\n exp -= required;\n levels++;\n }\n\n // Give the levels if applicable\n if (levels > 0) {\n giveLevels(levels);\n\n // Level up message\n if (SkillAPI.getSettings().isShowLevelMessages()) {\n TitleManager.show(\n player.getPlayer(),\n TitleType.LEVEL_UP,\n NotificationNodes.LVL,\n RPGFilter.LEVEL.setReplacement(level + \"\"),\n RPGFilter.CLASS.setReplacement(classData.getName()),\n RPGFilter.POINTS.setReplacement(points + \"\"),\n Filter.AMOUNT.setReplacement(levels + \"\")\n );\n }\n }\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public void setLevel(Level level) { this.currentLevel = level; }", "public int getLevel() { \r\n\t\treturn level; \r\n\t}", "Interface(Level level){\n\t\tthis.level=level;\n\t}", "public int getLevel()\n {\n return level;\n }", "public String getSqlFieldByDimensionLevelName(String dimension, String level) {\n\t\tList<Dimension> dimensions = this.Dim;\n\t\tfor (int j = 0; j < dimensions.size(); j++) { // for each dimension\n\t\t\tif (dimensions.get(j).hasSameName(dimension)) {\n\t\t\t\tArrayList<Hierarchy> current_hierachy = dimensions.get(j).getHier();\n\t\t\t\tfor (int k = 0; k < current_hierachy.size(); k++) {// for each\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// hierarchy\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// of\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// dimension\n\t\t\t\t\tList<Level> current_lvls = current_hierachy.get(k).lvls;\n\t\t\t\t\tfor (int l = 0; l < current_lvls.size(); l++) {\n\t\t\t\t\t\tif (current_lvls.get(l).getName().equals(level))\n\t\t\t\t\t\t\treturn current_lvls.get(l).getAttributeName(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}", "int getLevel();", "int getLevel();", "int getLevel();", "int getLevel();", "int getLevel();" ]
[ "0.6141255", "0.6141255", "0.6063384", "0.59978324", "0.59978324", "0.59978324", "0.59978324", "0.5974642", "0.58750933", "0.584789", "0.5834927", "0.58100253", "0.5779621", "0.5779621", "0.577152", "0.577152", "0.577152", "0.577152", "0.577152", "0.5746758", "0.5717426", "0.5716852", "0.5703394", "0.5702717", "0.5688642", "0.5671153", "0.56608856", "0.5655544", "0.56416357", "0.5612963", "0.5612963", "0.55988055", "0.5574952", "0.5566759", "0.55500954", "0.55431277", "0.5541694", "0.54804736", "0.547321", "0.54574996", "0.5416214", "0.5399291", "0.5376417", "0.537544", "0.5360621", "0.53558415", "0.5332901", "0.5332901", "0.5332901", "0.5332901", "0.5332901", "0.5327795", "0.53051466", "0.5300533", "0.529934", "0.5298597", "0.5291681", "0.52862734", "0.5284288", "0.5284288", "0.5278204", "0.5277229", "0.52623534", "0.5261451", "0.52587473", "0.52555376", "0.52548", "0.5253718", "0.52507806", "0.52499294", "0.52392954", "0.52389467", "0.52372223", "0.5230723", "0.5230723", "0.5230723", "0.5230723", "0.5230723", "0.52283484", "0.52283484", "0.5225934", "0.52250767", "0.52250767", "0.52250767", "0.52250767", "0.52250767", "0.52250767", "0.52250767", "0.52250767", "0.52250767", "0.52250767", "0.522389", "0.5219093", "0.52168775", "0.52146643", "0.52105004", "0.518921", "0.518921", "0.518921", "0.518921", "0.518921" ]
0.0
-1
TODO: Add checks on input validity (see below) Note: so far assumes that the given level is the one to which the field belongs (which should be true but isn't guaranteed (?))
public String setField(StringFieldEditor field, Composite composite) { String level = field.getPreferencesLevel(); // If the level is "project" and project == null then just set // the field here (as a special case). if (IPreferencesService.PROJECT_LEVEL.equals(level) && service.getProject() == null) { if (composite.isDisposed()) { System.err.println("PreferencesUtilities.setField(): composite is disposed"); } field.setFieldValueFromOutside(null); if (!composite.isDisposed()) { // Assume that editability on the project level is set // appropriately by a project-selection listener //field.getTextControl(composite).setEditable(false); field.getTextControl(composite).setBackground(colorBluish); } // Pretend that this was set at the project level? // (It was certainly cleared at that level) return IPreferencesService.PROJECT_LEVEL; } // Otherwise, we have a legitimate level, so set normally String levelFromWhichSet = field.loadWithInheritance(); // Note: You can evidently load a field even when it's control // is disposed. In that case (evidently) you can change the // text in the field but not the background color. if (!composite.isDisposed()) { /* if (level != null && level.equals(levelFromWhichSet)) { field.getTextControl(composite).setBackground(colorWhite); } else if (level != null && field.getTextControl(composite).getEditable()) { field.getTextControl(composite).setBackground(colorBluish); } */ if (field.isInherited()) { field.getTextControl(composite).setBackground(colorBluish); } else { field.getTextControl(composite).setBackground(colorWhite); } } else { // If composite.isDisposed(), then both field.getTextControl(composite) // and field.getTextControl() will return null; if needed, a text control // must be obtained from somewhere else--but I have no idea where that // might be. Not sure why composite.isDisposed() here in the first place, // especially considering that the field can be set } return levelFromWhichSet; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setLevel(String level) {\n this.level = level;\n }", "public void setLevel(String level) {\n this.level = level;\n }", "public void setLevel(String level){\n\t\tthis.level = level;\n\t}", "public void setLevel(String level) {\n this.level = level == null ? null : level.trim();\n }", "public void setLevel(String level) {\n this.level = level == null ? null : level.trim();\n }", "public void setLevel(String level) {\n this.level = level == null ? null : level.trim();\n }", "public void setLevel(String level) {\n this.level = level == null ? null : level.trim();\n }", "public static int validate(int level) {\n if (validLevels.contains(level)) {\n return level;\n } else {\n throw new IllegalArgumentException(\"Invalid level\");\n }\n }", "public void setLevel(String level);", "public int checkLevel(int level, String requestTask) {\n\t\tint ret = 1;\n\t\tswitch(requestTask) {\n\t\tcase \"add\":\n\t\t\tif(level == 2)\n\t\t\t\tret = 1;\n\t\t\tbreak;\n\t\tcase \"delete\":\n\t\tcase \"modify\":\n\t\t\tif(level == 3)\n\t\t\t\tret = 1;\n\t\t}\n\t\treturn ret;\n\t}", "public BuildALevel(List<String> level) {\n this.level = level;\n this.map = new TreeMap<String, String>();\n // call the splitLevelDetails method\n splitLevelDetails();\n }", "public void setLevel(int level) {\n if(level > Constant.MAX_LEVEL){\n this.level = Constant.MAX_LEVEL;\n }else {\n this.level = level;\n }\n this.expToLevelUp = this.expValues[this.level];\n }", "public void setLevel(int level) {\n this.level = level;\n }", "public void setLevel(int level) {\n this.level = level;\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(int level) {\n if (level < 1)\n throw new IllegalArgumentException(\"Cannot be a level less than 0\");\n\n this.level = level;\n }", "public void setLevel(String newLevel) {\n level = newLevel;\n }", "public void setLevel(String value) {\n this.level = value;\n }", "public void setLevel(Level level) {\r\n\t\tthis.level = level;\r\n\t}", "public void setLevel(Level level) {\n\t\tthis.level = level;\n\t}", "public abstract int levelRequired();", "public void setLevel(int level){\n\t\tthis.level = level;\n\t}", "public void setLevel(int level)\r\n {\r\n\tthis.level = level;\r\n }", "public void setLevel(int level) { \r\n\t\tthis.level = level; \r\n\t}", "protected void setLevel(int level)\n {\n this.level = level;\n }", "public void setLevel(int level) {\n\t\tthis.level = level;\n\t}", "public void setLevel(int level) {\n\t\tthis.level = level;\n\t}", "protected void setLevel(int level){\r\n this.level = level;\r\n }", "public int level(Tree<K, V> t, int level, K key) {\n\t\tif (key.compareTo(this.key) == 0) {\n\t\t\treturn level;\n\t\t} else if (key.compareTo(this.key) < 0) {\n\t\t\treturn left.level(left, level + 1, key);\n\t\t} else {\n\t\t\treturn right.level(right, level + 1, key);\n\t\t}\n\t}", "public void setLevel(int level) {\n \t\tthis.level = level;\n \t}", "public void setLevel(int level) {\r\n\t\t\r\n\t\tthis.level = level;\r\n\t\t\r\n\t}", "public void setLevel(int level) {\n\t\tthis.level = level;\t\n\t}", "private void getLevelByLevel(Node root, int level, ArrayList<LinkedList<Node>> arrL) {\n\t\tif(root == null) {\n\t\t\treturn;\n\t\t}\n\t\tLinkedList<Node> n = null;\n\t\tif(arrL.size() == level) {\n\t\t\t n = new LinkedList<>();\n\t\t\tn.add(root);\n\t\t\tarrL.add(n);\n\t\t} else {\n\t\t\tn = arrL.get(level);\n\t\t\tn.add(root);\n\t\t}\n\t\tgetLevelByLevel(root.left, level+1, arrL);\n\t\tgetLevelByLevel(root.right, level+1, arrL);\n\t\t\n\t}", "public ParseTreeNode visit(LevelNode levelNode) {\n return null;\n }", "public static void parseRegularLine(String line, int lineNum, SingleLevel level) {\r\n String[] parts = line.trim().split(\":\");\r\n if (!(parts.length == 2)) {\r\n System.out.println(\"Illegal input, must have a key before : and value after :,\"\r\n + \" in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n String key = parts[0];\r\n String value = parts[1];\r\n if (key.equals(\"level_name\")) {\r\n level.setName(value);\r\n }\r\n if (key.equals(\"ball_velocities\")) {\r\n int numberOfBalls = 0;\r\n String[] velocities = value.split(\" \");\r\n for (String velocity : velocities) {\r\n String[] velocityComponents = velocity.split(\",\");\r\n if (!(velocityComponents.length == 2)) {\r\n System.out.println(\"Illegal velocity input in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n String angle = velocityComponents[0];\r\n String speed = velocityComponents[1];\r\n try {\r\n if (Double.valueOf(speed) <= 0) {\r\n throw new NumberFormatException();\r\n }\r\n level.addBallVelocity(Velocity.fromAngleAndSpeed(Double.valueOf(angle),\r\n Double.valueOf(speed)));\r\n numberOfBalls++;\r\n } catch (NumberFormatException e) {\r\n System.out.println(\"Illegal velocity input, in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n level.setNumberOfBalls(numberOfBalls);\r\n }\r\n if (key.equals(\"background\")) {\r\n if (value.startsWith(\"image(\")) {\r\n value = value.substring(\"image(\".length());\r\n value = value.replace(\")\", \"\");\r\n try {\r\n Image image = ImageIO.read(ClassLoader.getSystemClassLoader().getResourceAsStream(value));\r\n LevelBackground background = new LevelBackground(image);\r\n level.setBackground(background);\r\n } catch (Exception e) {\r\n System.out.println(\"Can't find the background image, in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n } else if (value.startsWith(\"color(\")) {\r\n Color color = ColorParser.colorFromString(value);\r\n if (color == null) {\r\n System.out.println(\"Check color input, in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n LevelBackground background = new LevelBackground(color);\r\n level.setBackground(background);\r\n } else {\r\n System.out.println(\"No image or color for background, in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n if (key.equals(\"paddle_width\")) {\r\n try {\r\n if (Integer.valueOf(value) <= 0) {\r\n throw new NumberFormatException();\r\n }\r\n level.setPaddleWidth(Integer.valueOf(value));\r\n } catch (NumberFormatException e) {\r\n System.out.println(\"Illegal paddle width in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n if (key.equals(\"paddle_speed\")) {\r\n try {\r\n if (Integer.valueOf(value) <= 0) {\r\n throw new Exception();\r\n }\r\n level.setPaddleSpeed(Integer.valueOf(value));\r\n } catch (Exception e) {\r\n System.out.println(\"Illegal paddle speed in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n if (key.equals(\"block_definitions\")) {\r\n try {\r\n Reader blockReader = new InputStreamReader(ClassLoader.getSystemClassLoader()\r\n .getResourceAsStream(value));\r\n blocksFromSymbolsFactory = BlocksDefinitionReader.fromReader(blockReader);\r\n } catch (Exception e) {\r\n System.out.println(\"Illegal block defenitions file check line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n if (key.equals(\"blocks_start_x\")) {\r\n try {\r\n if (Integer.valueOf(value) < 0) {\r\n throw new Exception();\r\n }\r\n level.setBlocksXPos(Integer.valueOf(value));\r\n } catch (Exception e) {\r\n System.out.println(\"Illegal X value of printing blocks in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n if (key.equals(\"blocks_start_y\")) {\r\n try {\r\n if (Integer.valueOf(value) < 0) {\r\n throw new Exception();\r\n }\r\n level.setBlocksStartY(Integer.valueOf(value));\r\n } catch (Exception e) {\r\n System.out.println(\"Illegal Y value of printing blocks in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n\r\n if (key.equals(\"num_blocks\")) {\r\n try {\r\n if (Integer.valueOf(value) < 0) {\r\n throw new Exception();\r\n }\r\n level.setNumberOfBlocksToRemove(Integer.valueOf(value));\r\n } catch (Exception e) {\r\n System.out.println(\"Error in the number of blocks in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n if (key.equals(\"row_height\")) {\r\n try {\r\n if (Integer.valueOf(value) <= 0) {\r\n throw new Exception();\r\n }\r\n level.setRowHeight(Integer.valueOf(value));\r\n } catch (Exception e) {\r\n System.out.println(\"EIllegal row height in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n }", "protected int resolveLevel(FieldDeclaration field) {\n if (field.type != null || field.binding == null)\n return IMPOSSIBLE_MATCH;\n if (this.pattern.declaringSimpleName != null && !matchesName(this.pattern.declaringSimpleName, field.binding.type.sourceName()))\n return IMPOSSIBLE_MATCH;\n if (!(field.initialization instanceof AllocationExpression) || field.initialization.resolvedType.isLocalType())\n return IMPOSSIBLE_MATCH;\n return resolveLevel(((AllocationExpression) field.initialization).binding);\n }", "public void checkLevel(){\n if(score<50){\n level = 1;\n asteroidsMaxNumber = 5;\n }\n if(score>50 && level == 1){\n level = 2;\n asteroidsMaxNumber = 7;\n }\n if(score>100 && level == 2){\n level = 3;\n asteroidsMaxNumber = 10;\n }\n if(score>200 && level == 3){\n level = 4;\n asteroidsMaxNumber = 13;\n }\n if(score>350 && level == 4){\n level = 5;\n asteroidsMaxNumber = 15;\n }\n }", "public void setLevel (String newLevel)\n {\n this.level = newLevel; \n }", "public String getLevel() {\n return level;\n }", "public final void setLevel(final int level) {\n\t\tthis.level = level;\n\t}", "protected int getLevel(){\r\n return this.level;\r\n }", "public static void setMinimumLevel(Level level) {\n\t\tminLevel = level;\n\t}", "public String getLevel() {\n return level;\n }", "public String getLevel() {\n return level;\n }", "public String getLevel() {\n return level;\n }", "public String getLevel() {\n return level;\n }", "public String getLevel() {\n return level;\n }", "public String getLevel ()\n {\n return level;\n }", "public Builder setLevel(final String value) {\n _level = value;\n return this;\n }", "private void setLevel(int level){\r\n\t\tswitch(level){\r\n\t\t\tcase Game.LEVEL_ONE:\r\n\t\t\tcase Game.LEVEL_TWO:\r\n\t\t\tcase Game.LEVEL_THREE:\r\n\t\t\t\tthis.level = level;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tSystem.err.println(\"Improper level input, use 'Game.LEVEL_#' to accurately input a level into this method\");\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "public String getLevel() {\n return this.level;\n }", "private int getLevel(String nextLine){\n\t\t Matcher matcher = plusminus.matcher(nextLine);\n\t\t if(matcher.find())\n\t\t \treturn matcher.start()+1;\n\t\telse return 0;\n\t\t\n\t}", "public int getLevel()\n {\n return level; \n }", "public void setLevel(int level) {\r\n\t\tthis.level = Math.max(0, level);\r\n\t}", "public int getLevel(){\n return level;\n }", "public int getLevel(){\n return level;\n }", "public String getLevel()\n {\n return level;\n }", "public static TreeNode task2_3_Construct_Level_In(int[] in, int[] level) {\n\t\treturn null;\n\t}", "public String getLevel(){\n\t\treturn level;\n\t}", "public String getLevel() {\n return level;\n }", "public LevelParser(char[][] level) throws SyntacticIncException{\n\t\tlevelActive = new char[level.length+2][level[0].length+2];\n\t\tfile = null;\n\t\tthis.level = level.clone();\n\t\tfillActiveLevels();\n\t\tif (!syntaktischRichtig()) \n\t\t{\n\t\t\tlevel = null;\n\t\t\tlevelActive = null;\n\t\t\tthrow new SyntacticIncException(\"Syntaktisch Inkorrekt\");\n\t\t} else \n\t\t{\n\t\t\tlevelGeladen = true;\n\t\t}\n\t}", "public int getLevel(){\n\t\treturn level;\n\t}", "public void setLevel(final String level) {\n setAttribute(ATTRIBUTE_LEVEL, level);\n }", "public int getLevel() {\r\n return level;\r\n }", "public void setLevel(int value) {\n this.level = value;\n }", "abstract int getMaxLevel();", "public int getLevelValue() {\n return level_;\n }", "public int getLevel()\r\n {\r\n return level;\r\n }", "public void setLevel(String lev) {\n\t\tlevel = lev;\n\t}", "public Integer getLevel() {\n return level;\n }", "public Integer getLevel() {\n return level;\n }", "public Integer getLevel() {\n return level;\n }", "public Integer getLevel() {\n return level;\n }", "public Integer getLevel() {\n return level;\n }", "public int getLevel(){\n return this.level;\n }", "public int getLevel(){\n return this.level;\n }", "private void checkLevelUp() {\n // Count the number of levels gained, if any\n int levels = 0;\n int required;\n while (exp >= (required = classData.getRequiredExp(level + levels)) && level + levels < classData.getMaxLevel()) {\n exp -= required;\n levels++;\n }\n\n // Give the levels if applicable\n if (levels > 0) {\n giveLevels(levels);\n\n // Level up message\n if (SkillAPI.getSettings().isShowLevelMessages()) {\n TitleManager.show(\n player.getPlayer(),\n TitleType.LEVEL_UP,\n NotificationNodes.LVL,\n RPGFilter.LEVEL.setReplacement(level + \"\"),\n RPGFilter.CLASS.setReplacement(classData.getName()),\n RPGFilter.POINTS.setReplacement(points + \"\"),\n Filter.AMOUNT.setReplacement(levels + \"\")\n );\n }\n }\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public void setLevel(Level level) { this.currentLevel = level; }", "public int getLevel() { \r\n\t\treturn level; \r\n\t}", "Interface(Level level){\n\t\tthis.level=level;\n\t}", "public int getLevel()\n {\n return level;\n }", "public String getSqlFieldByDimensionLevelName(String dimension, String level) {\n\t\tList<Dimension> dimensions = this.Dim;\n\t\tfor (int j = 0; j < dimensions.size(); j++) { // for each dimension\n\t\t\tif (dimensions.get(j).hasSameName(dimension)) {\n\t\t\t\tArrayList<Hierarchy> current_hierachy = dimensions.get(j).getHier();\n\t\t\t\tfor (int k = 0; k < current_hierachy.size(); k++) {// for each\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// hierarchy\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// of\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// dimension\n\t\t\t\t\tList<Level> current_lvls = current_hierachy.get(k).lvls;\n\t\t\t\t\tfor (int l = 0; l < current_lvls.size(); l++) {\n\t\t\t\t\t\tif (current_lvls.get(l).getName().equals(level))\n\t\t\t\t\t\t\treturn current_lvls.get(l).getAttributeName(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}", "int getLevel();", "int getLevel();", "int getLevel();", "int getLevel();", "int getLevel();" ]
[ "0.6143391", "0.6143391", "0.6065555", "0.5999067", "0.5999067", "0.5999067", "0.5999067", "0.5975304", "0.58767766", "0.5848699", "0.5837367", "0.5811583", "0.5781813", "0.5781813", "0.5773865", "0.5773865", "0.5773865", "0.5773865", "0.5773865", "0.5748354", "0.57204026", "0.57185274", "0.57056695", "0.5704983", "0.5689122", "0.5673328", "0.56629103", "0.5657546", "0.564362", "0.5615082", "0.5615082", "0.56009287", "0.5576993", "0.5568818", "0.555218", "0.55451655", "0.5543642", "0.54816425", "0.5473851", "0.5456477", "0.54163474", "0.5400932", "0.5377933", "0.53774863", "0.53619015", "0.53578246", "0.53342974", "0.53342974", "0.53342974", "0.53342974", "0.53342974", "0.53287673", "0.53070015", "0.5301618", "0.5300098", "0.52999926", "0.52928567", "0.5287992", "0.52854466", "0.52854466", "0.5279461", "0.5277394", "0.5263748", "0.5263022", "0.525808", "0.5257121", "0.52566534", "0.5255226", "0.52524817", "0.52507156", "0.52404743", "0.52403235", "0.52393025", "0.52321565", "0.52321565", "0.52321565", "0.52321565", "0.52321565", "0.5229441", "0.5229441", "0.5227341", "0.52265173", "0.52265173", "0.52265173", "0.52265173", "0.52265173", "0.52265173", "0.52265173", "0.52265173", "0.52265173", "0.52265173", "0.522617", "0.5220475", "0.5218522", "0.52159595", "0.5212001", "0.5190297", "0.5190297", "0.5190297", "0.5190297", "0.5190297" ]
0.0
-1
TODO: Add checks on input validity (see below) Note: so far assumes that the given level is the one to which the field belongs (which should be true but isn't guaranteed (?))
public String setField(FontFieldEditor field, Composite parent) { String level = field.getPreferencesLevel(); // If the level is "project" and project == null then just set // the field here (as a special case). // Note: without some project selected the field should not be // editable. Field will have to be set back to editable when // (and probably where) a project is selected. We might take // care of this elsewhere but, until that is verified, keep // doing it here. // Note also: loadWithInheritance (which calls setField(..)) // won't know that project == null and will try to set the field // from some higher level if (IPreferencesService.PROJECT_LEVEL.equals(level) && service.getProject() == null) { if (parent == null) { System.err.println("PreferencesUtilities.setField(): parent is null"); } if (parent.isDisposed()) { System.err.println("PreferencesUtilities.setField(): parent is disposed"); } field.setFieldValueFromOutside(null); if (!parent.isDisposed()) { field.getChangeControl().setEnabled(false); // TODO RMF 1/10/2009 - The change control probably isn't the control whose color we ought to change... field.getChangeControl().setBackground(colorBluish); } // Pretend that this was set at the project level? // (It was certainly cleared at that level) return IPreferencesService.PROJECT_LEVEL; } // Otherwise, we have a legitimate level, so set normally String levelFromWhichSet = field.loadWithInheritance(); // Note: You can evidently load a field even when its control // is disposed. In that case (evidently) you can change the // text in the field but not the background color. if (parent != null && !parent.isDisposed()) { // TODO RMF 1/10/2009 - The change control probably isn't the control whose color we ought to change... if (level != null && level.equals(levelFromWhichSet)) { field.getChangeControl().setBackground(colorWhite); } else if (level != null && field.getChangeControl().getEnabled()) { field.getChangeControl().setBackground(colorBluish); } } else { // If composite.isDisposed(), then both field.getTextControl(composite) // and field.getTextControl() will return null; if needed, a text control // must be obtained from somewhere else--but I have no idea where that // might be. Not sure why composite.isDisposed() here in the first place, // especially considering that the field can be set } return levelFromWhichSet; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setLevel(String level) {\n this.level = level;\n }", "public void setLevel(String level) {\n this.level = level;\n }", "public void setLevel(String level){\n\t\tthis.level = level;\n\t}", "public void setLevel(String level) {\n this.level = level == null ? null : level.trim();\n }", "public void setLevel(String level) {\n this.level = level == null ? null : level.trim();\n }", "public void setLevel(String level) {\n this.level = level == null ? null : level.trim();\n }", "public void setLevel(String level) {\n this.level = level == null ? null : level.trim();\n }", "public static int validate(int level) {\n if (validLevels.contains(level)) {\n return level;\n } else {\n throw new IllegalArgumentException(\"Invalid level\");\n }\n }", "public void setLevel(String level);", "public int checkLevel(int level, String requestTask) {\n\t\tint ret = 1;\n\t\tswitch(requestTask) {\n\t\tcase \"add\":\n\t\t\tif(level == 2)\n\t\t\t\tret = 1;\n\t\t\tbreak;\n\t\tcase \"delete\":\n\t\tcase \"modify\":\n\t\t\tif(level == 3)\n\t\t\t\tret = 1;\n\t\t}\n\t\treturn ret;\n\t}", "public BuildALevel(List<String> level) {\n this.level = level;\n this.map = new TreeMap<String, String>();\n // call the splitLevelDetails method\n splitLevelDetails();\n }", "public void setLevel(int level) {\n if(level > Constant.MAX_LEVEL){\n this.level = Constant.MAX_LEVEL;\n }else {\n this.level = level;\n }\n this.expToLevelUp = this.expValues[this.level];\n }", "public void setLevel(int level) {\n this.level = level;\n }", "public void setLevel(int level) {\n this.level = level;\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(int level) {\n if (level < 1)\n throw new IllegalArgumentException(\"Cannot be a level less than 0\");\n\n this.level = level;\n }", "public void setLevel(String newLevel) {\n level = newLevel;\n }", "public void setLevel(String value) {\n this.level = value;\n }", "public void setLevel(Level level) {\r\n\t\tthis.level = level;\r\n\t}", "public void setLevel(Level level) {\n\t\tthis.level = level;\n\t}", "public abstract int levelRequired();", "public void setLevel(int level){\n\t\tthis.level = level;\n\t}", "public void setLevel(int level)\r\n {\r\n\tthis.level = level;\r\n }", "public void setLevel(int level) { \r\n\t\tthis.level = level; \r\n\t}", "protected void setLevel(int level)\n {\n this.level = level;\n }", "public void setLevel(int level) {\n\t\tthis.level = level;\n\t}", "public void setLevel(int level) {\n\t\tthis.level = level;\n\t}", "protected void setLevel(int level){\r\n this.level = level;\r\n }", "public int level(Tree<K, V> t, int level, K key) {\n\t\tif (key.compareTo(this.key) == 0) {\n\t\t\treturn level;\n\t\t} else if (key.compareTo(this.key) < 0) {\n\t\t\treturn left.level(left, level + 1, key);\n\t\t} else {\n\t\t\treturn right.level(right, level + 1, key);\n\t\t}\n\t}", "public void setLevel(int level) {\n \t\tthis.level = level;\n \t}", "public void setLevel(int level) {\r\n\t\t\r\n\t\tthis.level = level;\r\n\t\t\r\n\t}", "public void setLevel(int level) {\n\t\tthis.level = level;\t\n\t}", "private void getLevelByLevel(Node root, int level, ArrayList<LinkedList<Node>> arrL) {\n\t\tif(root == null) {\n\t\t\treturn;\n\t\t}\n\t\tLinkedList<Node> n = null;\n\t\tif(arrL.size() == level) {\n\t\t\t n = new LinkedList<>();\n\t\t\tn.add(root);\n\t\t\tarrL.add(n);\n\t\t} else {\n\t\t\tn = arrL.get(level);\n\t\t\tn.add(root);\n\t\t}\n\t\tgetLevelByLevel(root.left, level+1, arrL);\n\t\tgetLevelByLevel(root.right, level+1, arrL);\n\t\t\n\t}", "public ParseTreeNode visit(LevelNode levelNode) {\n return null;\n }", "public static void parseRegularLine(String line, int lineNum, SingleLevel level) {\r\n String[] parts = line.trim().split(\":\");\r\n if (!(parts.length == 2)) {\r\n System.out.println(\"Illegal input, must have a key before : and value after :,\"\r\n + \" in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n String key = parts[0];\r\n String value = parts[1];\r\n if (key.equals(\"level_name\")) {\r\n level.setName(value);\r\n }\r\n if (key.equals(\"ball_velocities\")) {\r\n int numberOfBalls = 0;\r\n String[] velocities = value.split(\" \");\r\n for (String velocity : velocities) {\r\n String[] velocityComponents = velocity.split(\",\");\r\n if (!(velocityComponents.length == 2)) {\r\n System.out.println(\"Illegal velocity input in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n String angle = velocityComponents[0];\r\n String speed = velocityComponents[1];\r\n try {\r\n if (Double.valueOf(speed) <= 0) {\r\n throw new NumberFormatException();\r\n }\r\n level.addBallVelocity(Velocity.fromAngleAndSpeed(Double.valueOf(angle),\r\n Double.valueOf(speed)));\r\n numberOfBalls++;\r\n } catch (NumberFormatException e) {\r\n System.out.println(\"Illegal velocity input, in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n level.setNumberOfBalls(numberOfBalls);\r\n }\r\n if (key.equals(\"background\")) {\r\n if (value.startsWith(\"image(\")) {\r\n value = value.substring(\"image(\".length());\r\n value = value.replace(\")\", \"\");\r\n try {\r\n Image image = ImageIO.read(ClassLoader.getSystemClassLoader().getResourceAsStream(value));\r\n LevelBackground background = new LevelBackground(image);\r\n level.setBackground(background);\r\n } catch (Exception e) {\r\n System.out.println(\"Can't find the background image, in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n } else if (value.startsWith(\"color(\")) {\r\n Color color = ColorParser.colorFromString(value);\r\n if (color == null) {\r\n System.out.println(\"Check color input, in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n LevelBackground background = new LevelBackground(color);\r\n level.setBackground(background);\r\n } else {\r\n System.out.println(\"No image or color for background, in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n if (key.equals(\"paddle_width\")) {\r\n try {\r\n if (Integer.valueOf(value) <= 0) {\r\n throw new NumberFormatException();\r\n }\r\n level.setPaddleWidth(Integer.valueOf(value));\r\n } catch (NumberFormatException e) {\r\n System.out.println(\"Illegal paddle width in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n if (key.equals(\"paddle_speed\")) {\r\n try {\r\n if (Integer.valueOf(value) <= 0) {\r\n throw new Exception();\r\n }\r\n level.setPaddleSpeed(Integer.valueOf(value));\r\n } catch (Exception e) {\r\n System.out.println(\"Illegal paddle speed in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n if (key.equals(\"block_definitions\")) {\r\n try {\r\n Reader blockReader = new InputStreamReader(ClassLoader.getSystemClassLoader()\r\n .getResourceAsStream(value));\r\n blocksFromSymbolsFactory = BlocksDefinitionReader.fromReader(blockReader);\r\n } catch (Exception e) {\r\n System.out.println(\"Illegal block defenitions file check line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n if (key.equals(\"blocks_start_x\")) {\r\n try {\r\n if (Integer.valueOf(value) < 0) {\r\n throw new Exception();\r\n }\r\n level.setBlocksXPos(Integer.valueOf(value));\r\n } catch (Exception e) {\r\n System.out.println(\"Illegal X value of printing blocks in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n if (key.equals(\"blocks_start_y\")) {\r\n try {\r\n if (Integer.valueOf(value) < 0) {\r\n throw new Exception();\r\n }\r\n level.setBlocksStartY(Integer.valueOf(value));\r\n } catch (Exception e) {\r\n System.out.println(\"Illegal Y value of printing blocks in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n\r\n if (key.equals(\"num_blocks\")) {\r\n try {\r\n if (Integer.valueOf(value) < 0) {\r\n throw new Exception();\r\n }\r\n level.setNumberOfBlocksToRemove(Integer.valueOf(value));\r\n } catch (Exception e) {\r\n System.out.println(\"Error in the number of blocks in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n if (key.equals(\"row_height\")) {\r\n try {\r\n if (Integer.valueOf(value) <= 0) {\r\n throw new Exception();\r\n }\r\n level.setRowHeight(Integer.valueOf(value));\r\n } catch (Exception e) {\r\n System.out.println(\"EIllegal row height in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n }", "protected int resolveLevel(FieldDeclaration field) {\n if (field.type != null || field.binding == null)\n return IMPOSSIBLE_MATCH;\n if (this.pattern.declaringSimpleName != null && !matchesName(this.pattern.declaringSimpleName, field.binding.type.sourceName()))\n return IMPOSSIBLE_MATCH;\n if (!(field.initialization instanceof AllocationExpression) || field.initialization.resolvedType.isLocalType())\n return IMPOSSIBLE_MATCH;\n return resolveLevel(((AllocationExpression) field.initialization).binding);\n }", "public void checkLevel(){\n if(score<50){\n level = 1;\n asteroidsMaxNumber = 5;\n }\n if(score>50 && level == 1){\n level = 2;\n asteroidsMaxNumber = 7;\n }\n if(score>100 && level == 2){\n level = 3;\n asteroidsMaxNumber = 10;\n }\n if(score>200 && level == 3){\n level = 4;\n asteroidsMaxNumber = 13;\n }\n if(score>350 && level == 4){\n level = 5;\n asteroidsMaxNumber = 15;\n }\n }", "public void setLevel (String newLevel)\n {\n this.level = newLevel; \n }", "public String getLevel() {\n return level;\n }", "public final void setLevel(final int level) {\n\t\tthis.level = level;\n\t}", "protected int getLevel(){\r\n return this.level;\r\n }", "public static void setMinimumLevel(Level level) {\n\t\tminLevel = level;\n\t}", "public String getLevel() {\n return level;\n }", "public String getLevel() {\n return level;\n }", "public String getLevel() {\n return level;\n }", "public String getLevel() {\n return level;\n }", "public String getLevel() {\n return level;\n }", "public String getLevel ()\n {\n return level;\n }", "public Builder setLevel(final String value) {\n _level = value;\n return this;\n }", "private void setLevel(int level){\r\n\t\tswitch(level){\r\n\t\t\tcase Game.LEVEL_ONE:\r\n\t\t\tcase Game.LEVEL_TWO:\r\n\t\t\tcase Game.LEVEL_THREE:\r\n\t\t\t\tthis.level = level;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tSystem.err.println(\"Improper level input, use 'Game.LEVEL_#' to accurately input a level into this method\");\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "private int getLevel(String nextLine){\n\t\t Matcher matcher = plusminus.matcher(nextLine);\n\t\t if(matcher.find())\n\t\t \treturn matcher.start()+1;\n\t\telse return 0;\n\t\t\n\t}", "public String getLevel() {\n return this.level;\n }", "public int getLevel()\n {\n return level; \n }", "public void setLevel(int level) {\r\n\t\tthis.level = Math.max(0, level);\r\n\t}", "public int getLevel(){\n return level;\n }", "public int getLevel(){\n return level;\n }", "public String getLevel()\n {\n return level;\n }", "public static TreeNode task2_3_Construct_Level_In(int[] in, int[] level) {\n\t\treturn null;\n\t}", "public String getLevel(){\n\t\treturn level;\n\t}", "public String getLevel() {\n return level;\n }", "public LevelParser(char[][] level) throws SyntacticIncException{\n\t\tlevelActive = new char[level.length+2][level[0].length+2];\n\t\tfile = null;\n\t\tthis.level = level.clone();\n\t\tfillActiveLevels();\n\t\tif (!syntaktischRichtig()) \n\t\t{\n\t\t\tlevel = null;\n\t\t\tlevelActive = null;\n\t\t\tthrow new SyntacticIncException(\"Syntaktisch Inkorrekt\");\n\t\t} else \n\t\t{\n\t\t\tlevelGeladen = true;\n\t\t}\n\t}", "public int getLevel(){\n\t\treturn level;\n\t}", "public void setLevel(final String level) {\n setAttribute(ATTRIBUTE_LEVEL, level);\n }", "public int getLevel() {\r\n return level;\r\n }", "public void setLevel(int value) {\n this.level = value;\n }", "abstract int getMaxLevel();", "public int getLevelValue() {\n return level_;\n }", "public int getLevel()\r\n {\r\n return level;\r\n }", "public void setLevel(String lev) {\n\t\tlevel = lev;\n\t}", "public Integer getLevel() {\n return level;\n }", "public Integer getLevel() {\n return level;\n }", "public Integer getLevel() {\n return level;\n }", "public Integer getLevel() {\n return level;\n }", "public Integer getLevel() {\n return level;\n }", "public int getLevel(){\n return this.level;\n }", "public int getLevel(){\n return this.level;\n }", "private void checkLevelUp() {\n // Count the number of levels gained, if any\n int levels = 0;\n int required;\n while (exp >= (required = classData.getRequiredExp(level + levels)) && level + levels < classData.getMaxLevel()) {\n exp -= required;\n levels++;\n }\n\n // Give the levels if applicable\n if (levels > 0) {\n giveLevels(levels);\n\n // Level up message\n if (SkillAPI.getSettings().isShowLevelMessages()) {\n TitleManager.show(\n player.getPlayer(),\n TitleType.LEVEL_UP,\n NotificationNodes.LVL,\n RPGFilter.LEVEL.setReplacement(level + \"\"),\n RPGFilter.CLASS.setReplacement(classData.getName()),\n RPGFilter.POINTS.setReplacement(points + \"\"),\n Filter.AMOUNT.setReplacement(levels + \"\")\n );\n }\n }\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public void setLevel(Level level) { this.currentLevel = level; }", "public int getLevel() { \r\n\t\treturn level; \r\n\t}", "Interface(Level level){\n\t\tthis.level=level;\n\t}", "public int getLevel()\n {\n return level;\n }", "public String getSqlFieldByDimensionLevelName(String dimension, String level) {\n\t\tList<Dimension> dimensions = this.Dim;\n\t\tfor (int j = 0; j < dimensions.size(); j++) { // for each dimension\n\t\t\tif (dimensions.get(j).hasSameName(dimension)) {\n\t\t\t\tArrayList<Hierarchy> current_hierachy = dimensions.get(j).getHier();\n\t\t\t\tfor (int k = 0; k < current_hierachy.size(); k++) {// for each\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// hierarchy\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// of\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// dimension\n\t\t\t\t\tList<Level> current_lvls = current_hierachy.get(k).lvls;\n\t\t\t\t\tfor (int l = 0; l < current_lvls.size(); l++) {\n\t\t\t\t\t\tif (current_lvls.get(l).getName().equals(level))\n\t\t\t\t\t\t\treturn current_lvls.get(l).getAttributeName(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}", "int getLevel();", "int getLevel();", "int getLevel();", "int getLevel();", "int getLevel();" ]
[ "0.6141118", "0.6141118", "0.6063639", "0.5997443", "0.5997443", "0.5997443", "0.5997443", "0.5974696", "0.587552", "0.58468944", "0.58358794", "0.58099204", "0.5779636", "0.5779636", "0.5771478", "0.5771478", "0.5771478", "0.5771478", "0.5771478", "0.5746632", "0.57180554", "0.57171434", "0.57035774", "0.57028526", "0.5689381", "0.56715375", "0.56612056", "0.56559867", "0.5641974", "0.561306", "0.561306", "0.5599429", "0.5574958", "0.55671203", "0.55504453", "0.55434126", "0.55416584", "0.54803485", "0.5472826", "0.54583704", "0.5415273", "0.54011524", "0.5376791", "0.53753245", "0.53616524", "0.53569865", "0.5333207", "0.5333207", "0.5333207", "0.5333207", "0.5333207", "0.53291833", "0.5306276", "0.53004974", "0.5299762", "0.52989954", "0.5292814", "0.5285807", "0.5285216", "0.5285216", "0.52787197", "0.52778625", "0.52629673", "0.5261757", "0.5259218", "0.5256287", "0.52545714", "0.5254328", "0.52513206", "0.52512604", "0.52397376", "0.5239703", "0.5238679", "0.52310586", "0.52310586", "0.52310586", "0.52310586", "0.52310586", "0.52291775", "0.52291775", "0.52256596", "0.5225616", "0.5225616", "0.5225616", "0.5225616", "0.5225616", "0.5225616", "0.5225616", "0.5225616", "0.5225616", "0.5225616", "0.52246106", "0.5219905", "0.5218369", "0.5215397", "0.52099276", "0.5189965", "0.5189965", "0.5189965", "0.5189965", "0.5189965" ]
0.0
-1
TODO: Add checks on input validity (see below) Note: so far assumes that the given level is the one to which the field belongs (which should be true but isn't guaranteed (?))
public String setField(ColorFieldEditor field, Composite parent) { String level = field.getPreferencesLevel(); // If the level is "project" and project == null then just set // the field here (as a special case). // Note: without some project selected the field should not be // editable. Field will have to be set back to editable when // (and probably where) a project is selected. We might take // care of this elsewhere but, until that is verified, keep // doing it here. // Note also: loadWithInheritance (which calls setField(..)) // won't know that project == null and will try to set the field // from some higher level if (IPreferencesService.PROJECT_LEVEL.equals(level) && service.getProject() == null) { if (parent == null) { System.err.println("PreferencesUtilities.setField(): parent is null"); } if (parent.isDisposed()) { System.err.println("PreferencesUtilities.setField(): parent is disposed"); } field.setFieldValueFromOutside(null); if (!parent.isDisposed()) { field.getColorSelector().setEnabled(false); // TODO RMF 1/10/2009 - The change control probably isn't the control whose color we ought to change... field.getLabelControl(parent).setBackground(colorBluish); } // Pretend that this was set at the project level? // (It was certainly cleared at that level) return IPreferencesService.PROJECT_LEVEL; } // Otherwise, we have a legitimate level, so set normally String levelFromWhichSet = field.loadWithInheritance(); // Note: You can evidently load a field even when its control // is disposed. In that case (evidently) you can change the // text in the field but not the background color. if (parent != null && !parent.isDisposed()) { // TODO RMF 1/10/2009 - The change control probably isn't the control whose color we ought to change... if (level != null && level.equals(levelFromWhichSet)) { field.getLabelControl(parent).setBackground(colorWhite); } else if (level != null && field.getLabelControl(parent).getEnabled()) { field.getLabelControl(parent).setBackground(colorBluish); } } else { // If composite.isDisposed(), then both field.getTextControl(composite) // and field.getTextControl() will return null; if needed, a text control // must be obtained from somewhere else--but I have no idea where that // might be. Not sure why composite.isDisposed() here in the first place, // especially considering that the field can be set } return levelFromWhichSet; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setLevel(String level) {\n this.level = level;\n }", "public void setLevel(String level) {\n this.level = level;\n }", "public void setLevel(String level){\n\t\tthis.level = level;\n\t}", "public void setLevel(String level) {\n this.level = level == null ? null : level.trim();\n }", "public void setLevel(String level) {\n this.level = level == null ? null : level.trim();\n }", "public void setLevel(String level) {\n this.level = level == null ? null : level.trim();\n }", "public void setLevel(String level) {\n this.level = level == null ? null : level.trim();\n }", "public static int validate(int level) {\n if (validLevels.contains(level)) {\n return level;\n } else {\n throw new IllegalArgumentException(\"Invalid level\");\n }\n }", "public void setLevel(String level);", "public int checkLevel(int level, String requestTask) {\n\t\tint ret = 1;\n\t\tswitch(requestTask) {\n\t\tcase \"add\":\n\t\t\tif(level == 2)\n\t\t\t\tret = 1;\n\t\t\tbreak;\n\t\tcase \"delete\":\n\t\tcase \"modify\":\n\t\t\tif(level == 3)\n\t\t\t\tret = 1;\n\t\t}\n\t\treturn ret;\n\t}", "public BuildALevel(List<String> level) {\n this.level = level;\n this.map = new TreeMap<String, String>();\n // call the splitLevelDetails method\n splitLevelDetails();\n }", "public void setLevel(int level) {\n if(level > Constant.MAX_LEVEL){\n this.level = Constant.MAX_LEVEL;\n }else {\n this.level = level;\n }\n this.expToLevelUp = this.expValues[this.level];\n }", "public void setLevel(int level) {\n this.level = level;\n }", "public void setLevel(int level) {\n this.level = level;\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(Integer level) {\n this.level = level;\n }", "public void setLevel(int level) {\n if (level < 1)\n throw new IllegalArgumentException(\"Cannot be a level less than 0\");\n\n this.level = level;\n }", "public void setLevel(String newLevel) {\n level = newLevel;\n }", "public void setLevel(String value) {\n this.level = value;\n }", "public void setLevel(Level level) {\r\n\t\tthis.level = level;\r\n\t}", "public void setLevel(Level level) {\n\t\tthis.level = level;\n\t}", "public abstract int levelRequired();", "public void setLevel(int level){\n\t\tthis.level = level;\n\t}", "public void setLevel(int level)\r\n {\r\n\tthis.level = level;\r\n }", "public void setLevel(int level) { \r\n\t\tthis.level = level; \r\n\t}", "protected void setLevel(int level)\n {\n this.level = level;\n }", "public void setLevel(int level) {\n\t\tthis.level = level;\n\t}", "public void setLevel(int level) {\n\t\tthis.level = level;\n\t}", "protected void setLevel(int level){\r\n this.level = level;\r\n }", "public int level(Tree<K, V> t, int level, K key) {\n\t\tif (key.compareTo(this.key) == 0) {\n\t\t\treturn level;\n\t\t} else if (key.compareTo(this.key) < 0) {\n\t\t\treturn left.level(left, level + 1, key);\n\t\t} else {\n\t\t\treturn right.level(right, level + 1, key);\n\t\t}\n\t}", "public void setLevel(int level) {\n \t\tthis.level = level;\n \t}", "public void setLevel(int level) {\r\n\t\t\r\n\t\tthis.level = level;\r\n\t\t\r\n\t}", "public void setLevel(int level) {\n\t\tthis.level = level;\t\n\t}", "private void getLevelByLevel(Node root, int level, ArrayList<LinkedList<Node>> arrL) {\n\t\tif(root == null) {\n\t\t\treturn;\n\t\t}\n\t\tLinkedList<Node> n = null;\n\t\tif(arrL.size() == level) {\n\t\t\t n = new LinkedList<>();\n\t\t\tn.add(root);\n\t\t\tarrL.add(n);\n\t\t} else {\n\t\t\tn = arrL.get(level);\n\t\t\tn.add(root);\n\t\t}\n\t\tgetLevelByLevel(root.left, level+1, arrL);\n\t\tgetLevelByLevel(root.right, level+1, arrL);\n\t\t\n\t}", "public ParseTreeNode visit(LevelNode levelNode) {\n return null;\n }", "public static void parseRegularLine(String line, int lineNum, SingleLevel level) {\r\n String[] parts = line.trim().split(\":\");\r\n if (!(parts.length == 2)) {\r\n System.out.println(\"Illegal input, must have a key before : and value after :,\"\r\n + \" in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n String key = parts[0];\r\n String value = parts[1];\r\n if (key.equals(\"level_name\")) {\r\n level.setName(value);\r\n }\r\n if (key.equals(\"ball_velocities\")) {\r\n int numberOfBalls = 0;\r\n String[] velocities = value.split(\" \");\r\n for (String velocity : velocities) {\r\n String[] velocityComponents = velocity.split(\",\");\r\n if (!(velocityComponents.length == 2)) {\r\n System.out.println(\"Illegal velocity input in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n String angle = velocityComponents[0];\r\n String speed = velocityComponents[1];\r\n try {\r\n if (Double.valueOf(speed) <= 0) {\r\n throw new NumberFormatException();\r\n }\r\n level.addBallVelocity(Velocity.fromAngleAndSpeed(Double.valueOf(angle),\r\n Double.valueOf(speed)));\r\n numberOfBalls++;\r\n } catch (NumberFormatException e) {\r\n System.out.println(\"Illegal velocity input, in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n level.setNumberOfBalls(numberOfBalls);\r\n }\r\n if (key.equals(\"background\")) {\r\n if (value.startsWith(\"image(\")) {\r\n value = value.substring(\"image(\".length());\r\n value = value.replace(\")\", \"\");\r\n try {\r\n Image image = ImageIO.read(ClassLoader.getSystemClassLoader().getResourceAsStream(value));\r\n LevelBackground background = new LevelBackground(image);\r\n level.setBackground(background);\r\n } catch (Exception e) {\r\n System.out.println(\"Can't find the background image, in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n } else if (value.startsWith(\"color(\")) {\r\n Color color = ColorParser.colorFromString(value);\r\n if (color == null) {\r\n System.out.println(\"Check color input, in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n LevelBackground background = new LevelBackground(color);\r\n level.setBackground(background);\r\n } else {\r\n System.out.println(\"No image or color for background, in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n if (key.equals(\"paddle_width\")) {\r\n try {\r\n if (Integer.valueOf(value) <= 0) {\r\n throw new NumberFormatException();\r\n }\r\n level.setPaddleWidth(Integer.valueOf(value));\r\n } catch (NumberFormatException e) {\r\n System.out.println(\"Illegal paddle width in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n if (key.equals(\"paddle_speed\")) {\r\n try {\r\n if (Integer.valueOf(value) <= 0) {\r\n throw new Exception();\r\n }\r\n level.setPaddleSpeed(Integer.valueOf(value));\r\n } catch (Exception e) {\r\n System.out.println(\"Illegal paddle speed in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n if (key.equals(\"block_definitions\")) {\r\n try {\r\n Reader blockReader = new InputStreamReader(ClassLoader.getSystemClassLoader()\r\n .getResourceAsStream(value));\r\n blocksFromSymbolsFactory = BlocksDefinitionReader.fromReader(blockReader);\r\n } catch (Exception e) {\r\n System.out.println(\"Illegal block defenitions file check line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n if (key.equals(\"blocks_start_x\")) {\r\n try {\r\n if (Integer.valueOf(value) < 0) {\r\n throw new Exception();\r\n }\r\n level.setBlocksXPos(Integer.valueOf(value));\r\n } catch (Exception e) {\r\n System.out.println(\"Illegal X value of printing blocks in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n if (key.equals(\"blocks_start_y\")) {\r\n try {\r\n if (Integer.valueOf(value) < 0) {\r\n throw new Exception();\r\n }\r\n level.setBlocksStartY(Integer.valueOf(value));\r\n } catch (Exception e) {\r\n System.out.println(\"Illegal Y value of printing blocks in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n\r\n if (key.equals(\"num_blocks\")) {\r\n try {\r\n if (Integer.valueOf(value) < 0) {\r\n throw new Exception();\r\n }\r\n level.setNumberOfBlocksToRemove(Integer.valueOf(value));\r\n } catch (Exception e) {\r\n System.out.println(\"Error in the number of blocks in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n if (key.equals(\"row_height\")) {\r\n try {\r\n if (Integer.valueOf(value) <= 0) {\r\n throw new Exception();\r\n }\r\n level.setRowHeight(Integer.valueOf(value));\r\n } catch (Exception e) {\r\n System.out.println(\"EIllegal row height in line: \" + lineNum + \" Check the text file\");\r\n System.exit(0);\r\n }\r\n }\r\n }", "protected int resolveLevel(FieldDeclaration field) {\n if (field.type != null || field.binding == null)\n return IMPOSSIBLE_MATCH;\n if (this.pattern.declaringSimpleName != null && !matchesName(this.pattern.declaringSimpleName, field.binding.type.sourceName()))\n return IMPOSSIBLE_MATCH;\n if (!(field.initialization instanceof AllocationExpression) || field.initialization.resolvedType.isLocalType())\n return IMPOSSIBLE_MATCH;\n return resolveLevel(((AllocationExpression) field.initialization).binding);\n }", "public void checkLevel(){\n if(score<50){\n level = 1;\n asteroidsMaxNumber = 5;\n }\n if(score>50 && level == 1){\n level = 2;\n asteroidsMaxNumber = 7;\n }\n if(score>100 && level == 2){\n level = 3;\n asteroidsMaxNumber = 10;\n }\n if(score>200 && level == 3){\n level = 4;\n asteroidsMaxNumber = 13;\n }\n if(score>350 && level == 4){\n level = 5;\n asteroidsMaxNumber = 15;\n }\n }", "public void setLevel (String newLevel)\n {\n this.level = newLevel; \n }", "public final void setLevel(final int level) {\n\t\tthis.level = level;\n\t}", "public String getLevel() {\n return level;\n }", "protected int getLevel(){\r\n return this.level;\r\n }", "public static void setMinimumLevel(Level level) {\n\t\tminLevel = level;\n\t}", "public String getLevel() {\n return level;\n }", "public String getLevel() {\n return level;\n }", "public String getLevel() {\n return level;\n }", "public String getLevel() {\n return level;\n }", "public String getLevel() {\n return level;\n }", "public String getLevel ()\n {\n return level;\n }", "public Builder setLevel(final String value) {\n _level = value;\n return this;\n }", "private void setLevel(int level){\r\n\t\tswitch(level){\r\n\t\t\tcase Game.LEVEL_ONE:\r\n\t\t\tcase Game.LEVEL_TWO:\r\n\t\t\tcase Game.LEVEL_THREE:\r\n\t\t\t\tthis.level = level;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tSystem.err.println(\"Improper level input, use 'Game.LEVEL_#' to accurately input a level into this method\");\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "private int getLevel(String nextLine){\n\t\t Matcher matcher = plusminus.matcher(nextLine);\n\t\t if(matcher.find())\n\t\t \treturn matcher.start()+1;\n\t\telse return 0;\n\t\t\n\t}", "public String getLevel() {\n return this.level;\n }", "public int getLevel()\n {\n return level; \n }", "public void setLevel(int level) {\r\n\t\tthis.level = Math.max(0, level);\r\n\t}", "public int getLevel(){\n return level;\n }", "public int getLevel(){\n return level;\n }", "public String getLevel()\n {\n return level;\n }", "public static TreeNode task2_3_Construct_Level_In(int[] in, int[] level) {\n\t\treturn null;\n\t}", "public String getLevel(){\n\t\treturn level;\n\t}", "public String getLevel() {\n return level;\n }", "public LevelParser(char[][] level) throws SyntacticIncException{\n\t\tlevelActive = new char[level.length+2][level[0].length+2];\n\t\tfile = null;\n\t\tthis.level = level.clone();\n\t\tfillActiveLevels();\n\t\tif (!syntaktischRichtig()) \n\t\t{\n\t\t\tlevel = null;\n\t\t\tlevelActive = null;\n\t\t\tthrow new SyntacticIncException(\"Syntaktisch Inkorrekt\");\n\t\t} else \n\t\t{\n\t\t\tlevelGeladen = true;\n\t\t}\n\t}", "public void setLevel(final String level) {\n setAttribute(ATTRIBUTE_LEVEL, level);\n }", "public int getLevel(){\n\t\treturn level;\n\t}", "public int getLevel() {\r\n return level;\r\n }", "public void setLevel(int value) {\n this.level = value;\n }", "abstract int getMaxLevel();", "public int getLevelValue() {\n return level_;\n }", "public int getLevel()\r\n {\r\n return level;\r\n }", "public void setLevel(String lev) {\n\t\tlevel = lev;\n\t}", "public Integer getLevel() {\n return level;\n }", "public Integer getLevel() {\n return level;\n }", "public Integer getLevel() {\n return level;\n }", "public Integer getLevel() {\n return level;\n }", "public Integer getLevel() {\n return level;\n }", "public int getLevel(){\n return this.level;\n }", "public int getLevel(){\n return this.level;\n }", "private void checkLevelUp() {\n // Count the number of levels gained, if any\n int levels = 0;\n int required;\n while (exp >= (required = classData.getRequiredExp(level + levels)) && level + levels < classData.getMaxLevel()) {\n exp -= required;\n levels++;\n }\n\n // Give the levels if applicable\n if (levels > 0) {\n giveLevels(levels);\n\n // Level up message\n if (SkillAPI.getSettings().isShowLevelMessages()) {\n TitleManager.show(\n player.getPlayer(),\n TitleType.LEVEL_UP,\n NotificationNodes.LVL,\n RPGFilter.LEVEL.setReplacement(level + \"\"),\n RPGFilter.CLASS.setReplacement(classData.getName()),\n RPGFilter.POINTS.setReplacement(points + \"\"),\n Filter.AMOUNT.setReplacement(levels + \"\")\n );\n }\n }\n }", "public void setLevel(Level level) { this.currentLevel = level; }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() {\n return level;\n }", "public int getLevel() { \r\n\t\treturn level; \r\n\t}", "Interface(Level level){\n\t\tthis.level=level;\n\t}", "public int getLevel()\n {\n return level;\n }", "public String getSqlFieldByDimensionLevelName(String dimension, String level) {\n\t\tList<Dimension> dimensions = this.Dim;\n\t\tfor (int j = 0; j < dimensions.size(); j++) { // for each dimension\n\t\t\tif (dimensions.get(j).hasSameName(dimension)) {\n\t\t\t\tArrayList<Hierarchy> current_hierachy = dimensions.get(j).getHier();\n\t\t\t\tfor (int k = 0; k < current_hierachy.size(); k++) {// for each\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// hierarchy\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// of\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// dimension\n\t\t\t\t\tList<Level> current_lvls = current_hierachy.get(k).lvls;\n\t\t\t\t\tfor (int l = 0; l < current_lvls.size(); l++) {\n\t\t\t\t\t\tif (current_lvls.get(l).getName().equals(level))\n\t\t\t\t\t\t\treturn current_lvls.get(l).getAttributeName(0);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}", "int getLevel();", "int getLevel();", "int getLevel();", "int getLevel();", "int getLevel();" ]
[ "0.61418784", "0.61418784", "0.6063864", "0.59983546", "0.59983546", "0.59983546", "0.59983546", "0.5976141", "0.5874746", "0.5848736", "0.5834868", "0.5810041", "0.5780163", "0.5780163", "0.57720494", "0.57720494", "0.57720494", "0.57720494", "0.57720494", "0.5747575", "0.571742", "0.57158524", "0.5704281", "0.57036847", "0.56861234", "0.5671637", "0.56613606", "0.565596", "0.5642172", "0.56138045", "0.56138045", "0.55990857", "0.5575828", "0.5567425", "0.5550837", "0.5543856", "0.5542866", "0.54792076", "0.54735637", "0.5456065", "0.5414618", "0.53979355", "0.5376496", "0.53755003", "0.53588104", "0.53573304", "0.5331944", "0.5331944", "0.5331944", "0.5331944", "0.5331944", "0.5325906", "0.5304693", "0.53013206", "0.52986133", "0.5297422", "0.5289817", "0.5287198", "0.5282668", "0.5282668", "0.52769774", "0.52766204", "0.5261374", "0.5260511", "0.52588415", "0.52561474", "0.52544385", "0.5252338", "0.5249446", "0.52477896", "0.5238001", "0.52373785", "0.52365524", "0.5229721", "0.5229721", "0.5229721", "0.5229721", "0.5229721", "0.52265996", "0.52265996", "0.5224331", "0.52238363", "0.5223748", "0.5223748", "0.5223748", "0.5223748", "0.5223748", "0.5223748", "0.5223748", "0.5223748", "0.5223748", "0.5223748", "0.5217674", "0.5216753", "0.5213047", "0.52121246", "0.51872104", "0.51872104", "0.51872104", "0.51872104", "0.51872104" ]
0.0
-1
RMF 1/10/2009 Not sure this is at all necessary... but does it hurt? The X10DT PrefUtils did this...
protected void initializeField(FieldEditor pe, PreferencePage page) { if (page instanceof IPropertyChangeListener) { pe.setPropertyChangeListener((IPropertyChangeListener)page); } pe.setPreferenceStore(page.getPreferenceStore()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected boolean func_70041_e_() { return false; }", "protected boolean func_70814_o() { return true; }", "public void method_4270() {}", "protected void method_2665() {\r\n super.method_2427(awt.field_4171);\r\n this.method_2440(true);\r\n this.method_2521(class_872.field_4244);\r\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private void m50366E() {\n }", "void realizeMeaningPrefs(Object obj, Variable[] vars) {\n realizeMeaningPrefs(projectSettings, obj, vars);\n \t}", "private void showPreferenceSettings() {\n \tfor(PrefKeysE k: PrefKeysE.values()) {\n \t\tString key = k.getKey();\n \t\tboolean isFound = Tt.isPreferencePresent(key);\n \t\tint prtFlags = 0; //don't print from getPreference()\n// \t\tboolean valB;\n// \t\tint valI;\n// \t\tdouble valD;\n \t\tString valFoundStr = \"\";\n \t\tString prefix = String.format(\"%-40s: %-7s: found? %s, default \", key, k.getType().name(), (isFound ? \"Y\" : \"N\"));\n \t\tswitch(k.getType()) {\n \t\tcase BOOLEAN:\n \t\t\tboolean dfltB = k.getDefaultBoolean();\n \t\t\tvalFoundStr += dfltB;\n \t\t\tif(isFound) {\n \t\t\t\tboolean val = Tt.getPreference(k, dfltB, prtFlags, PrefCreateE.DO_NOT_CREATE);\n \t\t\t\tvalFoundStr += \", current \" + val;\n \t\t\t}\n \t\t\tbreak;\n \t\tcase INT:\n \t\t\tint dfltI = k.getDefaultInt();\n \t\t\tvalFoundStr += dfltI;\n \t\t\tif(isFound) {\n \t\t\t\tint val = Tt.getPreference(k, dfltI, prtFlags, PrefCreateE.DO_NOT_CREATE);\n \t\t\t\tvalFoundStr += \", current \" + val;\n \t\t\t}\n \t\t\tbreak;\n \t\tcase DOUBLE:\n \t\t\tdouble dfltD = k.getDefaultDouble();\n \t\t\tvalFoundStr = String.format(\"% 1.4f\", dfltD);\n \t\t\tif(isFound) {\n \t\t\t\tdouble val = Tt.getPreference(k, dfltD, prtFlags, PrefCreateE.DO_NOT_CREATE);\n \t\t\t\tvalFoundStr += String.format(\", current % 1.4f\", val);\n \t\t\t}\n \t\t\tbreak;\n \t\tcase STRING:\n \t\t\tString dfltS = k.getDefaultString();\n\t\t\t\tvalFoundStr += \"'\" + dfltS + \"'\";\n \t\t\tif(isFound) {\n \t\t\t\tString val = Tt.getPreference(k, dfltS, prtFlags, PrefCreateE.DO_NOT_CREATE);\n \t\t\t\tvalFoundStr += \", current '\" + val + \"'\";\n \t\t\t}\n \t\t\tbreak;\n \t\t}\n\t\t\tP.println(prefix + valFoundStr);\n\n// \t\tif(k.getType().equals(PrefTypeE.BOOLEAN)) \n \t}\n }", "protected void onPref(String name, String value){}", "static void realizeMeaningPrefs(HashMap<Setting,Object> projectSettings, Object obj, Variable[] vars) {\n HashMap<String,Object> settingsByPrefName = new HashMap<String,Object>();\n for (int i = 0; i < vars.length; i++) {\n Variable var = vars[i];\n if (var == null) continue;\n Object value = var.getObject();\n if (!(value instanceof String)) {\n if (value instanceof Short || value instanceof Byte)\n value = new Integer(((Number)value).intValue());\n if (!(value instanceof Number) && !(value instanceof Boolean))\n continue;\n }\n String prefName = var.getKey().getName();\n String prefPath = null;\n if (obj instanceof Technology) {\n prefPath = Technology.TECH_NODE + \"/\";\n Map<Setting,Object> convertedVars = ((Technology)obj).convertOldVariable(prefName, value);\n if (convertedVars != null) {\n for (Map.Entry<Setting,Object> e: convertedVars.entrySet()) {\n Setting setting = e.getKey();\n prefName = setting.getPrefName();\n value = e.getValue();\n projectSettings.put(setting, value);\n }\n continue;\n }\n } else if (obj instanceof Tool) {\n prefPath = ((Tool)obj).prefs.relativePath() + \"/\";\n }\n settingsByPrefName.put(prefPath + prefName, value);\n }\n Setting.Group grp = obj instanceof Technology ? ((Technology)obj).getProjectSettings() : ((Tool)obj).getProjectSettings();\n for (Setting setting: grp.getSettings()) {\n Object value = settingsByPrefName.get(setting.getPrefPath());\n if (value != null)\n projectSettings.put(setting, value);\n }\n \t}", "protected void method_4157() {\r\n super.method_4157();\r\n this.method_4211(class_1840.field_9390).method_390(200.0D);\r\n }", "private static ENXP eNXP2ENXPInternal(org.opencds.vmr.v1_0.schema.ENXP pENXP) \n\t\t\tthrows DataFormatException, InvalidDataException {\n\n\t\tString _METHODNAME = \"eNXP2ENXPInternal(): \";\n\t\tif (pENXP == null)\n\t\t\treturn null;\n\n\t\tENXP lENXPInt = new ENXP();\n\n\t\t// set XP.value \n\t\tlENXPInt.setValue(pENXP.getValue());\n\n\t\t// Now translate the external EntityNamePartType to external EntityNamePartType\n\t\torg.opencds.vmr.v1_0.schema.EntityNamePartType lEntityNamePartTypeExt = pENXP.getType();\n\t\tif (lEntityNamePartTypeExt == null) {\n\t\t\tString errStr = _METHODNAME + \"EntityPartType of external ENXP datatype not populated; required by vmr spec\";\n\t\t\tthrow new DataFormatException(errStr);\n\t\t}\n\t\tString lEntityNamePartTypeStrExt = lEntityNamePartTypeExt.toString();\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(_METHODNAME + \"External EntityNamePartType value: \" + lEntityNamePartTypeStrExt);\n\t\t}\n\t\tEntityNamePartType lEntityNamePartTypeInt = null;\n\t\ttry {\n\t\t\tlEntityNamePartTypeInt = EntityNamePartType.valueOf(lEntityNamePartTypeStrExt);\n\t\t}\n\t\tcatch (IllegalArgumentException iae) {\n\t\t\tString errStr = _METHODNAME + \"there was no direct value mapping from the external to internal enumeration\";\n\t\t\tthrow new InvalidDataException(errStr);\n\t\t}\n\t\tif (logger.isDebugEnabled()) {\n\t\t\tlogger.debug(_METHODNAME + \"Internal EntityNamePartType value: \" + lEntityNamePartTypeInt);\n\t\t}\n\t\tlENXPInt.setType(lEntityNamePartTypeInt);\n\n\t\t// Finally create the list of internal EntityNamePartQualifiers (optional in spec)\n\t\tList<org.opencds.vmr.v1_0.schema.EntityNamePartQualifier> lPartQualifierListExt = pENXP.getQualifier();\n\t\tif (lPartQualifierListExt != null) {\n\t\t\tIterator<org.opencds.vmr.v1_0.schema.EntityNamePartQualifier> lPartQualifierIterExt = lPartQualifierListExt.iterator();\n\t\t\twhile (lPartQualifierIterExt.hasNext()) {\n\t\t\t\t// Take each internal EntityNamePartQualifier and convert to internal EntityNamePartQualifier for addition to internal EN\n\t\t\t\torg.opencds.vmr.v1_0.schema.EntityNamePartQualifier lPartQualifierExt = lPartQualifierIterExt.next();\n\t\t\t\tEntityNamePartQualifier lPartQualifierInt = eNPartQualifier2eNPartQualifierInternal(lPartQualifierExt);\n\t\t\t\tlENXPInt.getQualifier().add(lPartQualifierInt);\n\t\t\t}\n\t\t}\t\t\n\n\t\treturn lENXPInt;\n\t}", "Object getXtrc();", "Object getXtrc();", "public String getJP_OrgTrx_Value();", "public void mo12628c() {\n }", "public boolean method_4102() {\n return false;\n }", "long getUnknown12();", "public void func_70295_k_() {}", "public void get_TableValues(){\r\n\tFFM=99;\r\n\tADFM=99;\r\n\tDF=0;\r\n\tFLOAD=0;\r\n\t\r\n}", "public int getExtendedID()\r\n/* 50: */ {\r\n/* 51: 39 */ return 0;\r\n/* 52: */ }", "private void m6601R() {\n if (AppFeature.f5609e) {\n this.f5399S.mo6174f(\"0\");\n }\n this.f5399S.mo6172e(\"1\");\n }", "private void _setRestriction(XSTCtrl_restrictionType rest) {\n\n\t}", "protected abstract Set method_1559();", "java.lang.String getField1489();", "public boolean method_210() {\r\n return false;\r\n }", "private PrefUtils() {\n }", "private void m11881f() {\n Boolean valueOf = Boolean.valueOf(!((Boolean) this.f9673b.getTag(R.id.dp7)).booleanValue());\n this.f9673b.setTag(R.id.dp7, valueOf);\n m11882g();\n this.f9685n.mo25021a(\"hotsoon.pref.LAST_SET_LANDSCAPE\", (Object) valueOf).mo25023a();\n }", "private void m145780j() {\n String str;\n if (!this.f119477j.mo115499a() && !this.f119478k) {\n if ((this.f119477j.f119578d & 536870912) != 0) {\n str = \"WAL\";\n } else {\n str = \"PERSIST\";\n }\n m145773d(str);\n }\n }", "java.lang.String getField1023();", "java.lang.String getField1084();", "private EclipsePrefUtils() {\n // Exists only to defeat instantiation.\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "protected String method_4266() {\r\n String[] var10000 = field_3418;\r\n return \"mob.enderdragon.growl\";\r\n }", "java.lang.String getField1837();", "private void kk12() {\n\n\t}", "public int method_2031() {\r\n return this.field_1790;\r\n }", "java.lang.String getField1853();", "java.lang.String getField1028();", "public void parseValidPres(XPRParser.Validate_presenceContext ctx, State rootState) {\n\n String name_state = rootState.getname();\n for (int i = 0; i < ctx.ID_GLOBAL().size(); i++) {\n String name = ctx.ID_GLOBAL().get(i).getText().substring(1);\n\n Sort sort1 = rootState.getSort(name_state);\n // this field is related to one of association rules\n if (rootState.getRelation(name) != null) {\n Sort sort2 = z3ctx.mkUninterpretedSort(z3ctx.mkSymbol(name));\n\n\n Expr item1 = z3ctx.mkConst(sort2.getName(), sort2);\n Expr item2 = z3ctx.mkConst(sort1.getName(), sort1);\n\n Expr[] argOwner = new Expr[2];\n argOwner[0] = item1;\n argOwner[1] = item2;\n\n Invariant inv = new presenceInv(sort1, sort2, name_state, name);\n db.addInv(inv);\n } else {\n Sort sort2 = z3ctx.mkUninterpretedSort(z3ctx.mkSymbol(name));\n if (rootState.getSort(name) == null) {\n rootState.addSort(sort2);\n }\n TupleSort t_sort = z3ctx.mkTupleSort(z3ctx.mkSymbol(\"mk_field_tuple\"), // name of\n new Symbol[]{sort2.getName(), sort1.getName()}, // names\n new Sort[]{sort2, sort1});\n\n SetSort sortRel = z3ctx.mkSetSort(t_sort);\n Expr relation = z3ctx.mkConst(name + \"_field\", sortRel);\n rootState.putSort(name, sort2);\n rootState.addFileds(name);\n\n rootState.putSort(rootState + name, sortRel);\n\n SetSort ss = z3ctx.mkSetSort(sort2);\n Expr field_set = z3ctx.mkConst(name, ss);\n rootState.putExpr(name, field_set);\n rootState.putExpr(name_state + name, relation);\n Invariant inv = new checkFieldInv(sort1, sort2, name_state, name);\n db.addInv(inv);\n }\n }\n }", "java.lang.String getField1838();", "java.lang.String getField1038();", "java.lang.String getField1637();", "public void aff() {\n\t\t\n\t}", "java.lang.String getField1737();", "java.lang.String getField1086();", "public int getExtendedID()\r\n/* 12: */ {\r\n/* 13:17 */ return 10;\r\n/* 14: */ }", "long getUnknown72();", "public void test_55410() {\n \t\tIProject project1 = getProject(getUniqueString());\n \t\tensureExistsInWorkspace(new IResource[] {project1}, true);\n \t\tPreferences node = new ProjectScope(project1).getNode(ResourcesPlugin.PI_RESOURCES).node(\"subnode\");\n \t\tString key1 = \".\";\n \t\tString key2 = \"x\";\n \t\tString value1 = getUniqueString();\n \t\tString value2 = getUniqueString();\n \t\tnode.put(key1, value1);\n \t\tnode.put(key2, value2);\n \t\tassertEquals(\"0.8\", value1, node.get(key1, null));\n \t\tassertEquals(\"0.9\", value2, node.get(key2, null));\n \t\tIFile prefsFile = getFileInWorkspace(project1, ResourcesPlugin.PI_RESOURCES);\n \t\tassertTrue(\"1.0\", !prefsFile.exists());\n \t\ttry {\n \t\t\tnode.flush();\n \t\t} catch (BackingStoreException e) {\n \t\t\tfail(\"1.1\", e);\n \t\t}\n \t\tassertTrue(\"1.1\", prefsFile.exists());\n \t\tProperties props = new Properties();\n \t\tInputStream contents = null;\n \t\ttry {\n \t\t\tcontents = prefsFile.getContents();\n \t\t} catch (CoreException e) {\n \t\t\tfail(\"1.2\", e);\n \t\t}\n \t\ttry {\n \t\t\tprops.load(contents);\n \t\t} catch (IOException e) {\n \t\t\tfail(\"1.3\", e);\n \t\t} finally {\n \t\t\tif (contents != null)\n \t\t\t\ttry {\n \t\t\t\t\tcontents.close();\n \t\t\t\t} catch (IOException e) {\n \t\t\t\t\t// ignore\n \t\t\t\t}\n \t\t}\n \t\tassertEquals(\"2.0\", value2, props.getProperty(\"subnode/\" + key2));\n \t\tassertEquals(\"2.1\", value1, props.getProperty(\"subnode/\" + key1));\n \t}", "public NM getPsl37_ExternalScalingFactorPP() { \r\n\t\tNM retVal = this.getTypedField(37, 0);\r\n\t\treturn retVal;\r\n }", "private void m50367F() {\n }", "private static final synchronized UnicodeSet internalGetNXHangul()\n/* */ {\n/* 2336 */ if (nxCache[1] == null) {\n/* 2337 */ nxCache[1] = new UnicodeSet(44032, 55203);\n/* */ }\n/* 2339 */ return nxCache[1];\n/* */ }", "protected void mo6255a() {\n }", "java.lang.String getField1839();", "java.lang.String getField1873();", "private void checkRep() {\n\t\tif (CHECK_CONSTANT) {\n\t\tassert (label != null && childNode != null);\n\t\t}\n\t}", "java.lang.String getField1780();", "public boolean method_208() {\r\n return false;\r\n }", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "java.lang.String getField1081();", "private final void setXPTable()\n\t{\n\t\txpTable.put(0, 0);\n\t\txpTable.put(1, 1000);\n\t\txpTable.put(2, 3000);\n\t\txpTable.put(3, 6000);\n\t\txpTable.put(4, 10000);\n\t\txpTable.put(5, 15000);\n\t\txpTable.put(6, 20000);\n\t\txpTable.put(7, 26000);\n\t\txpTable.put(8, 33000);\n\t\txpTable.put(9, 40000);\n\t\t\n\t}", "java.lang.String getField1784();", "java.lang.String getField1037();", "java.lang.String getField1083();", "private void poetries() {\n\n\t}", "public LNDCDC_ADS_PRPSL_DEAL_PNT_FEAT_LN() {}", "org.apache.xmlbeans.XmlBoolean xgetProbables();", "java.lang.String getField1884();", "@Override\n protected int getMinEntries(final PropertyContext context) {\n return 2;\n }", "public void mo38117a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "java.lang.String getField1881();", "java.lang.String getField1738();", "public abstract String mo9751p();", "java.lang.String getField1886();", "java.lang.String getField1286();", "java.lang.String getField1062();", "java.lang.String getField1786();", "public boolean onPreferenceChange(android.preference.Preference r8, java.lang.Object r9) {\n /*\n r7 = this;\n r2 = 0;\n r3 = 1;\n r4 = com.whatsapp.DialogToastActivity.f;\n r0 = android.os.Build.MODEL;\n r1 = z;\n r5 = 5;\n r1 = r1[r5];\n r0 = r0.contains(r1);\n if (r0 != 0) goto L_0x001d;\n L_0x0011:\n r0 = android.os.Build.MODEL;\n r1 = z;\n r1 = r1[r2];\n r0 = r0.contains(r1);\n if (r0 == 0) goto L_0x0032;\n L_0x001d:\n r0 = r9.toString();\n r1 = z;\n r5 = 4;\n r1 = r1[r5];\n r0 = r0.equals(r1);\n if (r0 != 0) goto L_0x0032;\n L_0x002c:\n r0 = r7.a;\n r1 = 7;\n r0.showDialog(r1);\n L_0x0032:\n r0 = r8;\n r0 = (android.preference.ListPreference) r0;\n r1 = r9;\n r1 = (java.lang.String) r1;\n r1 = r0.findIndexOfValue(r1);\n r0 = r0.getEntries();\n r0 = r0[r1];\n r0 = r0.toString();\n r8.setSummary(r0);\n r1 = r8.getKey();\n r0 = -1;\n r5 = r1.hashCode();\n switch(r5) {\n case -1806012668: goto L_0x0059;\n case -1040361276: goto L_0x0067;\n default: goto L_0x0055;\n };\n L_0x0055:\n switch(r0) {\n case 0: goto L_0x0074;\n case 1: goto L_0x0089;\n default: goto L_0x0058;\n };\n L_0x0058:\n return r3;\n L_0x0059:\n r5 = z;\n r6 = 2;\n r5 = r5[r6];\n r5 = r1.equals(r5);\n if (r5 == 0) goto L_0x0055;\n L_0x0064:\n if (r4 == 0) goto L_0x009b;\n L_0x0066:\n r0 = r2;\n L_0x0067:\n r2 = z;\n r5 = 6;\n r2 = r2[r5];\n r1 = r1.equals(r2);\n if (r1 == 0) goto L_0x0055;\n L_0x0072:\n r0 = r3;\n goto L_0x0055;\n L_0x0074:\n r0 = r8.getContext();\n r1 = com.whatsapp.a3b.a(r0);\n r0 = z;\n r2 = 3;\n r2 = r0[r2];\n r0 = r9;\n r0 = (java.lang.String) r0;\n r1.e(r2, r0);\n if (r4 == 0) goto L_0x0058;\n L_0x0089:\n r0 = r8.getContext();\n r0 = com.whatsapp.a3b.a(r0);\n r1 = z;\n r1 = r1[r3];\n r9 = (java.lang.String) r9;\n r0.e(r1, r9);\n goto L_0x0058;\n L_0x009b:\n r0 = r2;\n goto L_0x0055;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.whatsapp.awk.onPreferenceChange(android.preference.Preference, java.lang.Object):boolean\");\n }", "java.lang.String getField1078();", "java.lang.String getField1781();", "protected AbstractGeneratedPrefsTransform() {\n\t\tsuper(false);\n\t}", "java.lang.String getField1731();", "public void method_1142(bdw var1) {\r\n super.method_651();\r\n this.field_987 = -16;\r\n this.field_971 = var1;\r\n }", "java.lang.String getField1773();", "private void m125726u() {\n TopicTabConfig dVar = this.f90230w;\n if (dVar != null && dVar.mo109356a(C6969H.m41409d(\"G608DC108B0\"))) {\n m125696a(true, false);\n }\n }", "java.lang.String getField1040();", "java.lang.String getField1753();", "java.lang.String getField1127();", "java.lang.String getField1681();", "java.lang.String getField1673();", "java.lang.String getField1073();", "java.lang.String getField1186();", "static void complete_return_requirements(){\n\t\tString ad = memory.get(SP+1)+memory.get(SP);\n\t\tSP+=2;\n\t\tPC = hexa_to_deci(ad);\n\t\tmodified =true;\n\t}", "public void m23075a() {\n }", "java.lang.String getField1727();", "java.lang.String getField1638();", "java.lang.String getField1885();", "protected void initPreference(){\n DataUtils.savePreference(Const.REPORT, \"\");\n DataUtils.savePreference(Const.TRY_MATCH_PERSON,\"\");\n }", "java.lang.String getField1137();" ]
[ "0.53851527", "0.5343515", "0.51335764", "0.5048092", "0.49782336", "0.49721843", "0.4903862", "0.48984244", "0.48917782", "0.48908904", "0.48448518", "0.48353723", "0.48340094", "0.48340094", "0.48321527", "0.48187134", "0.48151392", "0.47745642", "0.47685242", "0.47420067", "0.4741655", "0.4740143", "0.47377938", "0.47321448", "0.47193426", "0.47119427", "0.4705465", "0.4704689", "0.47029823", "0.47002405", "0.4697803", "0.4696048", "0.46956044", "0.46928996", "0.4689128", "0.46861368", "0.46835995", "0.46811593", "0.46797767", "0.4678825", "0.46788073", "0.46774307", "0.46773055", "0.467629", "0.46760675", "0.46760094", "0.4675425", "0.46749073", "0.46726382", "0.46723723", "0.46718982", "0.4671812", "0.46692795", "0.46689275", "0.4668868", "0.4667367", "0.4665681", "0.46649876", "0.46627986", "0.46617836", "0.46611086", "0.46584642", "0.465184", "0.46491635", "0.46482", "0.464739", "0.46428162", "0.46401575", "0.4639866", "0.4639539", "0.4635765", "0.46350548", "0.46341354", "0.46339127", "0.46335065", "0.46317497", "0.46302846", "0.4629166", "0.46289328", "0.46275926", "0.46271503", "0.46247265", "0.46156007", "0.46142638", "0.46136272", "0.4613265", "0.46115738", "0.46080798", "0.4607104", "0.4606735", "0.4604239", "0.46041724", "0.46033108", "0.46021765", "0.4601003", "0.45996255", "0.4597294", "0.45967755", "0.45923752", "0.4591952", "0.4590277" ]
0.0
-1
System.err.println("SPU.makeNewBooleanField() starting for key = " + key);
public BooleanFieldEditor makeNewBooleanField( PreferencePage page, PreferencesTab tab, IPreferencesService service, String level, String key, String text, String toolTip, Composite parent, boolean isEnabled, boolean isEditable, boolean emptyValueAllowed, boolean emptyValue, boolean isRemovable) { Composite fieldHolder = new Composite(parent, SWT.NONE); fieldHolder.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); BooleanFieldEditor field = new BooleanFieldEditor(page, tab, service, level, key, text, fieldHolder); field.setToolTipText(toolTip); if (level != null && level.equals(IPreferencesService.PROJECT_LEVEL) && service.getProject() != null) { setField(field, fieldHolder); addBooleanPropertyChangeListeners(service, level, field, key, fieldHolder); } else { setField(field, fieldHolder); addBooleanPropertyChangeListeners(service, level, field, key, fieldHolder); } field.getChangeControl().setEnabled(isEnabled); // boolean controls have no setEditable() method // also cannot be empty //field.setEmptyValueAllowed(false); if (level == null) field.setRemovable(false); else if (level.equals(IPreferencesService.DEFAULT_LEVEL)) field.setRemovable(false); else field.setRemovable(isRemovable); initializeField(field, page); return field; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private CheckBoolean() {\n\t}", "public void setProcessed (boolean Processed)\n{\nset_Value (\"Processed\", new Boolean(Processed));\n}", "void setBoolean(String key, boolean val);", "public void setRequiresTaxCertificate (boolean RequiresTaxCertificate)\n{\nset_Value (COLUMNNAME_RequiresTaxCertificate, Boolean.valueOf(RequiresTaxCertificate));\n}", "BooleanValue createBooleanValue();", "BooleanValue createBooleanValue();", "BooleanValue createBooleanValue();", "BooleanValue createBooleanValue();", "@Test\n public void testBooleanPropertyQuick() {\n Assertions.assertTrue(classObject.getBoolean(\"Started\"));\n }", "public VfeLkBooleanAdp(Byte booleanId) { this.booleanId = booleanId; }", "public void setVar281(java.lang.Boolean value) {\n this.var281 = value;\n }", "private void setIsBinary(boolean value) {\r\n\t \t_isBinary = value;\r\n\t }", "boolean boolField(String name, boolean isDefined, boolean value)\n throws NullField, InvalidFieldValue;", "private BooleanValueProvider() {\n this.state = true;\n }", "public boolean isSetKeyfield() {\r\n return this.keyfield != null;\r\n }", "public boolean isSetKeyfield() {\r\n return this.keyfield != null;\r\n }", "public boolean isSetKeyfield() {\r\n return this.keyfield != null;\r\n }", "public boolean b(String key) throws AgentBuilderRuntimeException {\n\t\treturn getBoolean(key).booleanValue();\n\t}", "public DBBoolean() {\n\t}", "public CheckboxField addCheckboxField(final BooleanProperty property) {\n return addCheckboxField(property.getKey());\n }", "public TrueValue (){\n }", "public ActionChangeCheckBox(String name, Field field, boolean value) {\n\t\tsuper(\"Value (\" + value + \")\");\n\t\tthis.field = field;\n\t\tthis.value = value;\n\t\tthis.oldValue = (boolean) field.getValue();\n\t}", "boolean getBoolean(String key) throws KeyValueStoreException;", "public void setVar272(java.lang.Boolean value) {\n this.var272 = value;\n }", "private native void Df1_Write_Boolean(String plcAddress,boolean value) throws Df1LibraryNativeException;", "protected BooleanValue(Boolean bv) {\n boolValue = bv;\n }", "@Test\n public void testReflectionBoolean() {\n Boolean b;\n b = Boolean.TRUE;\n assertEquals(this.toBaseString(b) + \"[value=true]\", ToStringBuilder.reflectionToString(b));\n b = Boolean.FALSE;\n assertEquals(this.toBaseString(b) + \"[value=false]\", ToStringBuilder.reflectionToString(b));\n }", "public CheckboxField addCheckboxField(final String key) {\n String label = key;\n CheckboxField buttonField = new CheckboxField(getComposite(), _form, key, label, false);\n buttonField.adapt(_formToolkit);\n _form.mapField(key, buttonField);\n return buttonField;\n }", "public BooleanValue(boolean value) {\r\n\t\tthis.value = value;\r\n\t}", "public BooleanValue(boolean value) {\r\n\t\tthis.value = value;\r\n\t}", "public void setIsAutoNumbered(java.lang.Boolean value);", "public ByteBuf setBoolean(int index, boolean value)\r\n/* 265: */ {\r\n/* 266:280 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 267:281 */ return super.setBoolean(index, value);\r\n/* 268: */ }", "public static Value makeBool(boolean b) {\n if (b)\n return theBoolTrue;\n else\n return theBoolFalse;\n }", "@Override\n public final void setIsNew(final Boolean isNew) {\n //stub\n }", "public void setVar191(java.lang.Boolean value) {\n this.var191 = value;\n }", "public BooleanMetadata(String key, Object value) {\n\n this(key, value, false);\n }", "public BooleanValue(boolean bool) {\r\n this.val = bool;\r\n }", "public BooleanMetadata(String key) {\n\n this(key, null);\n }", "private void serializeBoolean(final Boolean value, final StringBuffer buffer)\n {\n buffer.append(\"b:\");\n buffer.append(value.booleanValue() ? 1 : 0);\n buffer.append(';');\n }", "public void method_9697(boolean var1) {\r\n this.field_9139 = var1;\r\n }", "public void setVar83(java.lang.Boolean value) {\n this.var83 = value;\n }", "void writeBool(boolean value);", "void setManualCheck (boolean value);", "public void method_103(boolean var1) {\n this.field_4130 = var1;\n }", "public abstract void setCheck(Boolean check);", "void setKeyBox(boolean keyBox);", "public Boolean() {\n\t\tsuper(false);\n\t}", "public void setKey(Boolean key) {\n this.key = key;\n }", "void put(String key, boolean value) throws StorageException, ValidationException, KeyValueStoreException;", "public void setGeneratedCheck(){\n generatedCheck = !generatedCheck;\n }", "public abstract boolean read_boolean();", "public static void method_1145(boolean var0) {\r\n field_988 = var0;\r\n }", "com.google.protobuf.BoolValue getPersistent();", "DialogField createBooleanField( final Composite parent,\r\n final String text,\r\n final String name ) {\r\n BooleanDialogField result = new BooleanDialogField( parent, text );\r\n result.addDialogFieldListener( new IDialogFieldListener() {\r\n public void infoChanged( final Object newInfo ) {\r\n boolean selected = ( ( Boolean )newInfo ).booleanValue();\r\n getPreferenceStore().setValue( name, selected );\r\n }\r\n } );\r\n result.setInfo( getFromStore( name ) );\r\n return result;\r\n }", "public ByteBuf writeBoolean(boolean value)\r\n/* 527: */ {\r\n/* 528:538 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 529:539 */ return super.writeBoolean(value);\r\n/* 530: */ }", "public PropertyBoolean(String uid, String value) {\n super(uid, value);\n setFixedValues(new HashSet<Boolean>(Arrays.asList(Boolean.TRUE, Boolean.FALSE)));\n }", "public Boolean getValue() {\n/* 60 */ return Boolean.valueOf(this.val);\n/* */ }", "public static void main(String[] args) {\n\r\n\r\n\t\t boolean value = true;\r\n\r\n\t\t value = false;\r\n\r\n\t\t System.out.println(\"The value for the Boolean variable is : \"+ value);\r\n\t\r\n\r\n}", "public DBBoolean(Boolean bool) {\n\t\tsuper(bool);\n\t}", "@Test\n public void testBooleanProperty() {\n try (ReleasableVariant started = classObject.get(\"Started\")) {\n Assertions.assertTrue(started.booleanValue());\n }\n }", "boolean getBoolValue();", "boolean getBoolValue();", "public void setVar182(java.lang.Boolean value) {\n this.var182 = value;\n }", "public static VariableValue createValueObject(boolean value) {\n\t\treturn new BooleanValue(value);\n\t}", "public String setField(BooleanFieldEditor field, Composite parent) {\n\n String level = field.getPreferencesLevel();\n\t\t\n // If the level is \"project\" and project == null then just set\n // the field here (as a special case).\n // Note: without some project selected the field should not be\n // editable. Field will have to be set back to editable when\n // (and probably where) a project is selected. We might take\n // care of this elsewhere but, until that is verified, keep\n // doing it here.\n // Note also: loadWithInheritance (which calls setField(..))\n // won't know that project == null and will try to set the field\n // from some higher level\n if (IPreferencesService.PROJECT_LEVEL.equals(level) && service.getProject() == null) {\n if (parent == null) {\n System.err.println(\"PreferencesUtilities.setField(): parent is null\");\n }\t\n if (parent.isDisposed()) {\n System.err.println(\"PreferencesUtilities.setField(): parent is disposed\");\n }\n // Don't have a null boolean value to set field to,\n // but would like to show it as \"cleared\" somehow\n // (presumably \"false\" shows as empty\n field.setFieldValueFromOutside(false);\n if (!parent.isDisposed()) {\n field.getChangeControl().setEnabled(false);\n field.getChangeControl().setBackground(colorBluish);\n }\n // Pretend that this was set at the project level?\n // (It was certainly cleared at that level)\n return IPreferencesService.PROJECT_LEVEL;\n }\n\n // Otherwise, we have a legitimate level, so set normally\n String levelFromWhichSet = field.loadWithInheritance();\n\n // Note: You can evidently load a field even when its control\n // is disposed. In that case (evidently) you can change the\n // text in the field but not the background color.\t\n\n if (parent != null && !parent.isDisposed()) {\n if (level != null && level.equals(levelFromWhichSet)) {\n field.getChangeControl().setBackground(colorWhite);\n } else if (level != null && field.getChangeControl().getEnabled()) {\n field.getChangeControl().setBackground(colorBluish);\n }\n } else {\n // If composite.isDisposed(), then both field.getTextControl(composite)\n // and field.getTextControl() will return null; if needed, a text control\n // must be obtained from somewhere else--but I have no idea where that\n // might be. Not sure why composite.isDisposed() here in the first place,\n // especially considering that the field can be set\n }\n\n return levelFromWhichSet;\n }", "public VirtualCheckBox createCheckBox ();", "public boolean isSetIs_new() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __IS_NEW_ISSET_ID);\n }", "public void setVar155(java.lang.Boolean value) {\n this.var155 = value;\n }", "public void setVar164(java.lang.Boolean value) {\n this.var164 = value;\n }", "public Boolean getBoolean(String fieldname) throws ServiceNowException {\n\t\tString value = getValue(fieldname);\n\t\tif (value == null) return null;\n\t\tif (value.equals(\"0\") || value.equals(\"false\")) return Boolean.FALSE;\n\t\tif (value.equals(\"1\") || value.equals(\"true\")) return Boolean.TRUE;\n\t\tthrow new ServiceNowException(\"getBoolean \" + fieldname + \"=\" + value);\n\t}", "public boolean bool(String key) throws AgentBuilderRuntimeException {\n\t\treturn getBoolean(key).booleanValue();\n\t}", "protected void doSetValue(Object _value) {\n\t\tthis.value = (Boolean) _value;\n\t}", "public abstract void setInput(boolean value);", "public BooleanPhenotype() {\n dataValues = new ArrayList<Boolean>();\n }", "@Override\n public boolean getBoolean(String key) {\n return random.nextInt(BOOLEAN_RANDOM_BOUND) == 1;\n }", "public void putBooleanData(String key, Boolean value) {\n editor.putBoolean(key, value);\n editor.apply();\n }", "@Test\n public void testGetInsulatedBool()\n {\n System.out.println(\"getInsulatedBool\");\n PipeTypeFour instance = new PipeTypeFour(1,39, PipeGrade.THREE, false);;\n boolean expResult = true;\n boolean result = instance.getInsulatedBool();\n assertEquals(expResult, result);\n }", "public BooleanStateValue( boolean value) {\n\t\tthis( value, false);\n\t}", "public void putBooleanValue(String key, boolean value){\n SharedPreferences sharedPreference = context.getSharedPreferences(LOGIN,Context.MODE_PRIVATE);\n SharedPreferences.Editor editor=sharedPreference.edit();\n editor.putBoolean(key,value);\n editor.apply();\n }", "@Override\n void generateFalseData() {\n \n }", "@NotNull\n public BooleanSetting method_1072() {\n return this.field_726;\n }", "private void saveBoolean(String paramString, boolean paramBoolean) {\n }", "public void method_2680(boolean var1) {\r\n super.method_2427(awt.field_4203);\r\n this.field_2143 = var1;\r\n this.method_2428(field_1980);\r\n this.method_2437(0.5F);\r\n this.method_2521(class_872.field_4246);\r\n }", "public void setVar290(java.lang.Boolean value) {\n this.var290 = value;\n }", "public Builder setField0(boolean value) {\n bitField0_ |= 0x00000001;\n field0_ = value;\n onChanged();\n return this;\n }", "public void putBoolean(String key, boolean value) {\n String valueAsString = value ? TRUE_AS_STRING : FALSE_AS_STRING;\n\n put(key, valueAsString);\n }", "private static void addBooleanTypeToIndexField(String fieldName, Map<String, Object> indexFieldProperties) {\n // create keyword type property\n Map<String, Object> keywordTypeProperty = new HashMap<>();\n keywordTypeProperty.put(\"type\", \"boolean\");\n addFieldMapping(fieldName, keywordTypeProperty, indexFieldProperties);\n }", "public void setVar245(java.lang.Boolean value) {\n this.var245 = value;\n }", "@Override\n public String getIsNew() {\n return \"0\";\n }", "boolean getBoolean(String key, boolean defaultValue);", "private void setUpCheckBox(final int flag, CheckBox checkBox, LinearLayout llCheckBox) {\n if ((movie.getAvailableExtras() & flag) != 0) {\n checkBox.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {\n @Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n flagsApplied = flagsApplied ^ flag;\n updatePriceAndSaving();\n }\n });\n } else {\n llCheckBox.setVisibility(View.GONE);\n }\n }", "public void setVar263(java.lang.Boolean value) {\n this.var263 = value;\n }", "boolean isSetQuick();", "protected void _setBooleanElement(int index, boolean value) {\n\t\tint bitOffset = Math.multiplyExact(index, this.step);\n\t\t// the number of the Bit in the byte it is in\n\t\tbyte bitnum = (byte) (bitOffset % Constants.BITS_PER_BYTE);\n\t\t// position of the byte in the data section\n\t\tint position = (this.ptr + bitOffset / Constants.BITS_PER_BYTE);\n\t\tbyte oldValue = this.segment.buffer.get(position);\n\t\t// the left side of the '|' zeros the selected bit; the right side sets the new value\n\t\tthis.segment.buffer.put(position, (byte) ((oldValue & (~(1 << bitnum))) | ((value ? 1 : 0) << bitnum)));\n\t}", "void set(boolean value);", "@Test\n public void testProcCodeProcFlag() {\n new ProcCodeFieldTester()\n .verifyStringFieldCopiedCorrectly(\n FissProcedureCode.Builder::setProcFlag,\n RdaFissProcCode::getProcFlag,\n RdaFissProcCode.Fields.procFlag,\n 4);\n }", "public void setVar56(java.lang.Boolean value) {\n this.var56 = value;\n }", "public com.dj.model.avro.LargeObjectAvro.Builder setVar281(java.lang.Boolean value) {\n validate(fields()[282], value);\n this.var281 = value;\n fieldSetFlags()[282] = true;\n return this;\n }", "BoolOperation createBoolOperation();", "@NotNull\n public BooleanSetting method_1062() {\n return this.field_729;\n }" ]
[ "0.61063576", "0.603974", "0.58433026", "0.5814604", "0.58066183", "0.58066183", "0.58066183", "0.58066183", "0.5731943", "0.5729617", "0.5713581", "0.57119983", "0.56394386", "0.56314385", "0.5631269", "0.5631269", "0.5631269", "0.56295735", "0.5620997", "0.5594865", "0.5591894", "0.55714285", "0.5562232", "0.55415803", "0.55200815", "0.55190575", "0.5512233", "0.5486937", "0.5467434", "0.5467434", "0.54556876", "0.5453147", "0.54467106", "0.53992265", "0.53771627", "0.53746444", "0.5372751", "0.53674424", "0.53627867", "0.5360141", "0.53595734", "0.5356511", "0.5345778", "0.5341158", "0.53391504", "0.53365636", "0.5335419", "0.53343374", "0.53342557", "0.53303975", "0.53117085", "0.53096104", "0.5299849", "0.529571", "0.528788", "0.5285485", "0.52850604", "0.52815354", "0.52655125", "0.52627516", "0.5261681", "0.5261681", "0.5256333", "0.5255262", "0.5249868", "0.52486616", "0.52472943", "0.5239679", "0.523749", "0.523517", "0.5235102", "0.5234902", "0.5233362", "0.52327263", "0.5226707", "0.5225183", "0.5223544", "0.522326", "0.52216625", "0.52160054", "0.5212632", "0.52080035", "0.5202598", "0.5201945", "0.51983637", "0.51834327", "0.5181804", "0.5180266", "0.51778233", "0.5167588", "0.5165019", "0.51602423", "0.5154183", "0.51524657", "0.5144506", "0.5141546", "0.51337093", "0.5132531", "0.5125603", "0.5119805" ]
0.5799826
8
Note: for a RadioGroupFieldEditor, the Radio Box plays the role of fieldHolder, and that is created by the Radio Group. It appears to work to use the parent as the container of the field here. Not sure if this may still be unnecessary
public ComboFieldEditor makeNewComboField( PreferencePage page, PreferencesTab tab, IPreferencesService service, String level, String name, String labelText, String toolTip, int numColumns, String[] valueList, String[] labelList, Composite parent, boolean isEnabled, boolean isRemovable) { Composite fieldHolder = new Composite(parent, SWT.NONE); fieldHolder.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); boolean onProjectLevelWithNullProject = level != null && level.equals(IPreferencesService.PROJECT_LEVEL) && service.getProject() == null; //boolean notOnARealLevel = level == null; //boolean onAFunctioningLevel = !onProjectLevelWithNullProject && !notOnARealLevel; ComboFieldEditor field = new ComboFieldEditor(page, tab, service, level, name, labelText, valueList, labelList, numColumns, fieldHolder, isEnabled, isRemovable); field.setToolTipText(toolTip); //Composite comboControl = field.getComboBoxControl(parent); //Composite radioBoxControlParent = field.getComboBoxControl(parent).getParent(); if (!onProjectLevelWithNullProject) { setField(field, fieldHolder); addComboPropertyChangeListeners(service, level, field, name, fieldHolder); } else { //setField(field, parent); //addStringPropertyChangeListeners(service, level, field, key, fieldHolder); } field.setEnabled(isEnabled, fieldHolder); if (level == null) field.setRemovable(false); // can never remove from a field that doesn't have a stored value else if (level.equals(IPreferencesService.DEFAULT_LEVEL)) field.setRemovable(false); // can never remove from Default level else field.setRemovable(isRemovable); return field; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String setField(RadioGroupFieldEditor field, Composite composite) {\n\n String level = field.getPreferencesLevel();\n\n // If the level is \"project\" and project == null then just set\n // the field here (as a special case).\n if (IPreferencesService.PROJECT_LEVEL.equals(level) && service.getProject() == null) {\n if (composite.isDisposed()) {\n System.err.println(\"PreferencesUtilities.setField(): composite is disposed\");\n }\n // Updating a radio field with a null value should\n // cause the first button to be selected\n field.setFieldValueFromOutside(null);\n if (!composite.isDisposed()) {\n // Assume that editability on the project level is set\n // appropriately by a project-selection listener\n //field.getTextControl(composite).setEditable(false);\n field.getRadioBoxControl().setBackground(colorBluish);\n Button[] radioButtons = field.getRadioButtons();\n if (radioButtons != null) {\n for (int i = 0; i < radioButtons.length; i++) {\n Button button = (Button) radioButtons[i];\n button.setBackground(colorBluish);\t\n }\n }\n }\n // Pretend that this was set at the project level?\n // (It was certainly cleared at that level)\n return IPreferencesService.PROJECT_LEVEL;\n }\n\n // Otherwise, we have a legitimate level, so set normally\n String levelFromWhichSet = field.loadWithInheritance();\n\n // Note: You can evidently load a field even when it's control\n // is disposed. In that case (evidently) you can change the\n // text in the field but not the background color.\t\n\n if (!composite.isDisposed()) {\n // Needed if color is set in loadWithInheritance()?\n // (Should the color be set in loadWithInheritance()?\n// if (field.isInherited()) {\n// field.getRadioBoxControl(composite).setBackground(colorBluish);\n// } else {\n// field.getRadioBoxControl(composite).setBackground(colorWhite);\n// }\n } else {\n // If composite.isDisposed(), then both field.getTextControl(composite)\n // and field.getTextControl() will return null; if needed, a text control\n // must be obtained from somewhere else--but I have no idea where that\n // might be. Not sure why composite.isDisposed() here in the first place,\n // especially considering that the field can be set\n }\n\n return levelFromWhichSet;\n }", "protected Composite getFieldEditorParent() {\n\t\tif (style == FLAT) {\n\t\t\t// Create a new parent for each field editor\n\t\t\tComposite parent = new Composite(fieldEditorParent, SWT.NULL);\n\t\t\tparent.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n\t\t\treturn parent;\n\t\t}\n\t\t// Just return the parent\n\t\treturn fieldEditorParent;\n\t}", "public RadioGroupFieldEditor makeNewRadioGroupField(\n PreferencePage page, PreferencesTab tab,\n IPreferencesService service, String level,\t\n String name, String labelText, String toolTip, int numColumns,\n String[] values, String[] labels, Composite parent, boolean useGroup,\n boolean isEnabled, boolean isRemovable)\t\n {\n\n boolean onProjectLevelWithNullProject =\n level != null && level.equals(IPreferencesService.PROJECT_LEVEL) && service.getProject() == null;\n boolean notOnARealLevel = level == null;\n boolean onAFunctioningLevel = !onProjectLevelWithNullProject && !notOnARealLevel;\n\n RadioGroupFieldEditor field = new RadioGroupFieldEditor(\n page, tab, service, level, name, labelText, numColumns,\n values, labels, parent, useGroup);\n\n field.setToolTipText(toolTip);\n //Composite radioBoxControl = field.getRadioBoxControl(parent);\n //Composite radioBoxControlParent = field.getRadioBoxControl(parent).getParent();\n\n if (!onProjectLevelWithNullProject) {\n setField(field, parent);\n addRadioGroupPropertyChangeListeners(service, level, field, name, parent);\n } else {\n //setField(field, parent);\n //addStringPropertyChangeListeners(service, level, field, key, fieldHolder);\n }\n\n // Set the enabled state\n // Assumes that RadioGroups use the Group representation for the button box;\n // if a Group is not used, then fill out the elxe branches below accordingly\n if (onProjectLevelWithNullProject || notOnARealLevel) {\n if (useGroup) {\n Group radioGroup = (Group) field.getRadioBoxControl();\n radioGroup.setEnabled(false);\n } else {\n // do something else as appropriate to the representation\n }\n field.setEnabled(false, parent);\n } else if (onAFunctioningLevel) {\n if (useGroup) {\n Group radioGroup = (Group) field.getRadioBoxControl();\n radioGroup.setEnabled(isEnabled);\n } else {\n // do something else as appropriate to the representation\n }\n field.setEnabled(isEnabled, parent);\t\n }\n\n if (level == null) field.setRemovable(false);\t// can never remove from a field that doesn't have a stored value\n else if (level.equals(IPreferencesService.DEFAULT_LEVEL)) field.setRemovable(false);\t// can never remove from Default level\n else field.setRemovable(isRemovable);\n\n return field;\n }", "public String setField(ComboFieldEditor field, Composite parent) {\n\n String level = field.getPreferencesLevel();\n\t\t\n // If the level is \"project\" and project == null then just set\n // the field here (as a special case).\n if (IPreferencesService.PROJECT_LEVEL.equals(level) && service.getProject() == null) {\n if (parent.isDisposed()) {\n System.err.println(\"PreferencesUtilities.setField(): composite is disposed\");\n }\n // Updating a radio field with a null value should\n // cause the first button to be selected\n field.setFieldValueFromOutside(null);\n if (!parent.isDisposed()) {\n // Assume that editability on the project level is set\n // appropriately by a project-selection listener\n //field.getTextControl(composite).setEditable(false);\n field.getComboBoxControl().setBackground(colorWhite);\n Control[] children = field.getComboBoxControl().getChildren();\n if (children != null) {\n for (int i = 0; i < children.length; i++) {\n Button button = (Button) children[i];\n button.setBackground(PreferencesUtilities.colorWhite);\t\n }\n }\n }\n // Pretend that this was set at the project level?\n // (It was certainly cleared at that level)\n return IPreferencesService.PROJECT_LEVEL;\n }\n\n // Otherwise, we have a legitimate level, so set normally\n String levelFromWhichSet = field.loadWithInheritance();\n\n // Note: You can evidently load a field even when it's control\n // is disposed. In that case you can (evidently) change the\n // text in the field but not the background color.\t\n\n if (!parent.isDisposed()) {\n // Needed if color is set in loadWithInheritance()?\n // (Should the color be set in loadWithInheritance()?\n// if (field.isInherited()) {\n// field.getComboBoxControl(composite).setBackground(colorBluish);\n// } else {\n// field.getComboBoxControl(composite).setBackground(colorWhite);\n// }\n } else {\n // If composite.isDisposed(), then both field.getTextControl(composite)\n // and field.getTextControl() will return null; if needed, a text control\n // must be obtained from somewhere else--but I have no idea where that\n // might be. Not sure why composite.isDisposed() here in the first place,\n // especially considering that the field can be set\n }\n\n return levelFromWhichSet;\n }", "void onChange_placeholder_xjal(ShapeRadioButtonGroup oldValue) {}", "public RadioGroupField addRadioGroupField(final String key, final Object[] options) {\n String label = key;\n RadioGroupField groupField = new RadioGroupField(getComposite(), _form, key, label, false);\n groupField.adapt(_formToolkit);\n _form.mapField(key, groupField);\n groupField.addButtons(options);\n return groupField;\n }", "@Override\n public Element createDomImpl(Renderable element) {\n InputElement radioInputElement =\n Document.get().createRadioInputElement(\"xx\");\n radioInputElement.setClassName(CheckConstants.css.radio());\n radioInputElement.setTabIndex(0);\n return radioInputElement;\n }", "public interface HRadioButton extends InputElement, Checkable, Requireable {\r\n\r\n\t@Override\r\n\tTagInputRadio getTagType();\r\n\r\n\t@Override\r\n\tdefault InputType getInputType() {\r\n\t\treturn InputType.RADIO;\r\n\t}\r\n\r\n\t/**\r\n\t * @return the radio button group\r\n\t */\r\n\tRadioButtonGroup getRadioButtonGroup();\r\n\r\n}", "public String setField(BooleanFieldEditor field, Composite parent) {\n\n String level = field.getPreferencesLevel();\n\t\t\n // If the level is \"project\" and project == null then just set\n // the field here (as a special case).\n // Note: without some project selected the field should not be\n // editable. Field will have to be set back to editable when\n // (and probably where) a project is selected. We might take\n // care of this elsewhere but, until that is verified, keep\n // doing it here.\n // Note also: loadWithInheritance (which calls setField(..))\n // won't know that project == null and will try to set the field\n // from some higher level\n if (IPreferencesService.PROJECT_LEVEL.equals(level) && service.getProject() == null) {\n if (parent == null) {\n System.err.println(\"PreferencesUtilities.setField(): parent is null\");\n }\t\n if (parent.isDisposed()) {\n System.err.println(\"PreferencesUtilities.setField(): parent is disposed\");\n }\n // Don't have a null boolean value to set field to,\n // but would like to show it as \"cleared\" somehow\n // (presumably \"false\" shows as empty\n field.setFieldValueFromOutside(false);\n if (!parent.isDisposed()) {\n field.getChangeControl().setEnabled(false);\n field.getChangeControl().setBackground(colorBluish);\n }\n // Pretend that this was set at the project level?\n // (It was certainly cleared at that level)\n return IPreferencesService.PROJECT_LEVEL;\n }\n\n // Otherwise, we have a legitimate level, so set normally\n String levelFromWhichSet = field.loadWithInheritance();\n\n // Note: You can evidently load a field even when its control\n // is disposed. In that case (evidently) you can change the\n // text in the field but not the background color.\t\n\n if (parent != null && !parent.isDisposed()) {\n if (level != null && level.equals(levelFromWhichSet)) {\n field.getChangeControl().setBackground(colorWhite);\n } else if (level != null && field.getChangeControl().getEnabled()) {\n field.getChangeControl().setBackground(colorBluish);\n }\n } else {\n // If composite.isDisposed(), then both field.getTextControl(composite)\n // and field.getTextControl() will return null; if needed, a text control\n // must be obtained from somewhere else--but I have no idea where that\n // might be. Not sure why composite.isDisposed() here in the first place,\n // especially considering that the field can be set\n }\n\n return levelFromWhichSet;\n }", "@Override\n\tprotected Control createContents(Composite parent) {\n\t\tfieldEditorParent = new Composite(parent, SWT.NULL);\n\t\tGridLayout layout = new GridLayout();\n\t\tlayout.numColumns = 1;\n\t\tlayout.marginHeight = 0;\n\t\tlayout.marginWidth = 0;\n\t\tfieldEditorParent.setLayout(layout);\n\t\tfieldEditorParent.setFont(parent.getFont());\n\n\t\tcreateFieldEditors();\n\n\t\tif (style == GRID) {\n\t\t\tadjustGridLayout();\n\t\t}\n\n\t\tinitialize();\n\t\tcheckState();\n\t\treturn fieldEditorParent;\n\t}", "public String setField(ColorFieldEditor field, Composite parent)\n {\n\n String level = field.getPreferencesLevel();\n\n // If the level is \"project\" and project == null then just set\n // the field here (as a special case).\n // Note: without some project selected the field should not be\n // editable. Field will have to be set back to editable when\n // (and probably where) a project is selected. We might take\n // care of this elsewhere but, until that is verified, keep\n // doing it here.\n // Note also: loadWithInheritance (which calls setField(..))\n // won't know that project == null and will try to set the field\n // from some higher level\n if (IPreferencesService.PROJECT_LEVEL.equals(level) && service.getProject() == null)\n {\n if (parent == null) {\n System.err.println(\"PreferencesUtilities.setField(): parent is null\");\n } \n if (parent.isDisposed()) {\n System.err.println(\"PreferencesUtilities.setField(): parent is disposed\");\n } \n field.setFieldValueFromOutside(null);\n if (!parent.isDisposed()) {\n field.getColorSelector().setEnabled(false);\n // TODO RMF 1/10/2009 - The change control probably isn't the control whose color we ought to change...\n field.getLabelControl(parent).setBackground(colorBluish);\n }\n // Pretend that this was set at the project level?\n // (It was certainly cleared at that level)\n return IPreferencesService.PROJECT_LEVEL;\n }\n\n // Otherwise, we have a legitimate level, so set normally\n String levelFromWhichSet = field.loadWithInheritance();\n\n // Note: You can evidently load a field even when its control\n // is disposed. In that case (evidently) you can change the\n // text in the field but not the background color. \n\n if (parent != null && !parent.isDisposed()) {\n // TODO RMF 1/10/2009 - The change control probably isn't the control whose color we ought to change...\n if (level != null && level.equals(levelFromWhichSet)) {\n field.getLabelControl(parent).setBackground(colorWhite);\n } else if (level != null && field.getLabelControl(parent).getEnabled()) {\n field.getLabelControl(parent).setBackground(colorBluish);\n }\n } else {\n // If composite.isDisposed(), then both field.getTextControl(composite)\n // and field.getTextControl() will return null; if needed, a text control\n // must be obtained from somewhere else--but I have no idea where that\n // might be. Not sure why composite.isDisposed() here in the first place,\n // especially considering that the field can be set\n }\n\n return levelFromWhichSet;\n }", "@Override\n\tprotected Button createRadioButton(Composite parent, String label) {\n\t\treturn super.createRadioButton(parent, label);\t\n\t}", "private void setupFieldRows(GridPane mergePanel) {\n int row = 2;\n for (Field field : allFields) {\n Label label = new Label(field.getDisplayName());\n label.setMinWidth(USE_PREF_SIZE);\n mergePanel.add(label, 0, row);\n Optional<String> leftString = leftEntry.getField(field);\n Optional<String> rightString = rightEntry.getField(field);\n if (leftString.equals(rightString)) {\n identicalFields.add(field);\n } else {\n differentFields.add(field);\n }\n\n // Left text pane\n if (leftString.isPresent()) {\n TextFlow tf = new DiffHighlightingTextPane();\n mergePanel.add(tf, 1, row);\n leftTextPanes.put(field, tf);\n }\n\n // Add radio buttons if the two entries do not have identical fields\n if (identicalFields.contains(field)) {\n mergedEntry.setField(field, leftString.get()); // Will only happen if both entries have the field and the content is identical\n } else {\n ToggleGroup group = new ToggleGroup();\n List<RadioButton> list = new ArrayList<>(3);\n for (int k = 0; k < 3; k++) {\n RadioButton button = new RadioButton();\n EasyBind.subscribe(button.selectedProperty(), selected -> updateMergedEntry());\n group.getToggles().add(button);\n mergePanel.add(button, 2 + k, row);\n list.add(button);\n }\n radioButtons.put(field, list);\n if (leftString.isPresent()) {\n leftRadioButtons.add(list.get(LEFT_RADIOBUTTON_INDEX));\n list.get(LEFT_RADIOBUTTON_INDEX).setSelected(true);\n if (!rightString.isPresent()) {\n list.get(RIGHT_RADIOBUTTON_INDEX).setDisable(true);\n } else if (this.defaultRadioButtonSelectionMode == DefaultRadioButtonSelectionMode.RIGHT) {\n list.get(RIGHT_RADIOBUTTON_INDEX).setSelected(true);\n rightRadioButtons.add(list.get(RIGHT_RADIOBUTTON_INDEX));\n } else {\n rightRadioButtons.add(list.get(RIGHT_RADIOBUTTON_INDEX));\n }\n } else {\n list.get(LEFT_RADIOBUTTON_INDEX).setDisable(true);\n list.get(RIGHT_RADIOBUTTON_INDEX).setSelected(true);\n rightRadioButtons.add(list.get(RIGHT_RADIOBUTTON_INDEX));\n }\n }\n\n // Right text pane\n if (rightString.isPresent()) {\n TextFlow tf = new DiffHighlightingTextPane();\n mergePanel.add(tf, 5, row);\n rightTextPanes.put(field, tf);\n }\n row++;\n }\n }", "public String setField(FontFieldEditor field, Composite parent) {\n\n String level = field.getPreferencesLevel();\n\n // If the level is \"project\" and project == null then just set\n // the field here (as a special case).\n // Note: without some project selected the field should not be\n // editable. Field will have to be set back to editable when\n // (and probably where) a project is selected. We might take\n // care of this elsewhere but, until that is verified, keep\n // doing it here.\n // Note also: loadWithInheritance (which calls setField(..))\n // won't know that project == null and will try to set the field\n // from some higher level\n if (IPreferencesService.PROJECT_LEVEL.equals(level) &&\n service.getProject() == null)\n {\n if (parent == null) {\n System.err.println(\"PreferencesUtilities.setField(): parent is null\");\n } \n if (parent.isDisposed()) {\n System.err.println(\"PreferencesUtilities.setField(): parent is disposed\");\n } \n field.setFieldValueFromOutside(null);\n if (!parent.isDisposed()) {\n field.getChangeControl().setEnabled(false);\n // TODO RMF 1/10/2009 - The change control probably isn't the control whose color we ought to change...\n field.getChangeControl().setBackground(colorBluish);\n }\n // Pretend that this was set at the project level?\n // (It was certainly cleared at that level)\n return IPreferencesService.PROJECT_LEVEL;\n }\n\n // Otherwise, we have a legitimate level, so set normally\n String levelFromWhichSet = field.loadWithInheritance();\n\n // Note: You can evidently load a field even when its control\n // is disposed. In that case (evidently) you can change the\n // text in the field but not the background color. \n\n if (parent != null && !parent.isDisposed()) {\n // TODO RMF 1/10/2009 - The change control probably isn't the control whose color we ought to change...\n if (level != null && level.equals(levelFromWhichSet)) {\n field.getChangeControl().setBackground(colorWhite);\n } else if (level != null && field.getChangeControl().getEnabled()) {\n field.getChangeControl().setBackground(colorBluish);\n }\n } else {\n // If composite.isDisposed(), then both field.getTextControl(composite)\n // and field.getTextControl() will return null; if needed, a text control\n // must be obtained from somewhere else--but I have no idea where that\n // might be. Not sure why composite.isDisposed() here in the first place,\n // especially considering that the field can be set\n }\n\n return levelFromWhichSet;\n }", "public void set_placeholder(ShapeRadioButtonGroup placeholder)\n/* 42: */ {\n/* 43: 73 */ if (placeholder == this.placeholder) {\n/* 44: 74 */ return;\n/* 45: */ }\n/* 46: 76 */ ShapeRadioButtonGroup _oldValue_xjal = this.placeholder;\n/* 47: 77 */ this.placeholder = placeholder;\n/* 48: 78 */ onChange_placeholder_xjal(_oldValue_xjal);\n/* 49: 79 */ onChange();\n/* 50: */ }", "@LayoutRes\n protected int getRadioButtonPreferenceCustomLayoutResId() {\n return 0;\n }", "private JRadioButton getJRadioButtonButtWrap() {\r\n\t\t// if (buttWrap == null) {\r\n\t\tbuttWrap = new JRadioButton();\r\n\t\tbuttWrap.setText(\"Wrap\");\r\n\t\tbuttWrap.setToolTipText(\"filling borders with copies of the whole image\");\r\n\t\tbuttWrap.addActionListener(this);\r\n\t\tbuttWrap.setActionCommand(\"parameter\");\r\n\t\t// }\r\n\t\treturn buttWrap;\r\n\t}", "@Override\n\tprotected Control createControl(Composite parent) {\n\t\tthis.parent = parent;\n\t\t//return cellEditor.getControl();\n\t\treturn null; \n\t}", "@Override\r\n protected Control createDialogArea(Composite parent) {\r\n Composite area = (Composite) super.createDialogArea(parent);\r\n container = createContainer(area);\r\n createField(container);\r\n return area;\r\n }", "private void setupEntryTypeRow(GridPane mergePanel) {\n int rowIndex = 1;\n mergePanel.add(new Label(Localization.lang(\"Entry type\")), 0, rowIndex);\n if (leftEntry.getType().equals(rightEntry.getType())) {\n mergePanel.add(DiffHighlighting.forUnchanged(leftEntry.getType().getDisplayName()), 1, rowIndex);\n mergePanel.add(DiffHighlighting.forUnchanged(rightEntry.getType().getDisplayName()), 5, rowIndex);\n identicalTypes = true;\n } else {\n mergePanel.add(DiffHighlighting.forChanged(leftEntry.getType().getDisplayName()), 1, rowIndex);\n mergePanel.add(DiffHighlighting.forChanged(rightEntry.getType().getDisplayName()), 5, rowIndex);\n identicalTypes = false;\n ToggleGroup group = new ToggleGroup();\n typeRadioButtons = new ArrayList<>(2);\n\n for (int k = 0; k < 3; k += 2) {\n RadioButton button = new RadioButton();\n EasyBind.subscribe(button.selectedProperty(), selected -> updateMergedEntry());\n typeRadioButtons.add(button);\n group.getToggles().add(button);\n mergePanel.add(button, 2 + k, rowIndex);\n }\n if (defaultRadioButtonSelectionMode == DefaultRadioButtonSelectionMode.RIGHT) {\n typeRadioButtons.get(1).setSelected(true); // This Radio Button list does not have a third option as compared to the fields, so do not use the constants here\n rightRadioButtons.add(typeRadioButtons.get(1));\n } else {\n typeRadioButtons.get(0).setSelected(true);\n leftRadioButtons.add(typeRadioButtons.get(0));\n }\n }\n }", "public RadioGroupField addRadioGroupField(final Property property, final Object[] options) {\n return addRadioGroupField(property.getKey(), options);\n }", "public void createFieldEditors() {\t\t\n\t\t\n//\t\taddField(new DirectoryFieldEditor(PreferenceConstants.P_PATH, \n//\t\t\t\tMessages.UMAPPreferencePage_1, getFieldEditorParent()));\n\t\tgroup = new Group(getFieldEditorParent(), SWT.SHADOW_ETCHED_IN);\n\t\tgroup.setText(Messages.UMAPPreferencesHeader);\n\t\tgroup.setLayout(new GridLayout());\n\t\tGridData gd = new GridData(GridData.FILL_HORIZONTAL);\n\t\tgd.horizontalSpan = 1;\n\t\tgroup.setLayoutData(gd);\t\t\n\t\t\n//\t\tgroup2 = new Group(getFieldEditorParent(), SWT.SHADOW_ETCHED_IN);\n//\t\tgroup2.setText(Messages.UmapStringButtonFieldEditor_0);\n//\t\tgd.horizontalSpan = 2;\n//\t\tgroup2.setLayoutData(gd);\n//\t\tgroup2.setLayout(new GridLayout());\n\t\t\n\t\t\n\t\tvalidation = new BooleanFieldEditor( PreferenceConstants.P_BOOLEAN,\tMessages.UMAPPreferencePage_2, group);\n\t\taddField( validation );\n\n\t\tclassAbreviation = new StringFieldEditor(PreferenceConstants.P_CLASS_NAME, Messages.UMAPPreferencePage_3, group);\n\t\tclassAbreviation.setEmptyStringAllowed(false);\n\t\tclassAbreviation.setEnabled(Activator.getDefault().getPreferenceStore().getBoolean(PreferenceConstants.P_BOOLEAN), group);\n\t\t\n\t\tintfAbreviation = new StringFieldEditor(PreferenceConstants.P_INTF_NAME, Messages.UMAPPreferencePage_4, group);\n\t\tintfAbreviation.setEmptyStringAllowed(false);\n\t\tintfAbreviation.setEnabled(Activator.getDefault().getPreferenceStore().getBoolean(PreferenceConstants.P_BOOLEAN), group);\n\t\t\n\t\texcAbreviation = new StringFieldEditor(PreferenceConstants.P_EXCP_NAME, Messages.UMAPPreferencePage_5, group);\n\t\texcAbreviation.setEmptyStringAllowed(false);\n\t\texcAbreviation.setEnabled(Activator.getDefault().getPreferenceStore().getBoolean(PreferenceConstants.P_BOOLEAN), group);\n\t\t\n\t\t\n//\t\tprojectAbbreviation = new StringFieldEditor(PreferenceConstants.P_PROJ_NAME, Messages.UMAPPreferencePage_6, group);\n//\t\tprojectAbbreviation.setEmptyStringAllowed(true);\n\n//\t\tStringFieldEditor name = new StringFieldEditor(PreferenceConstants.P_USER_NAME, Messages.UmapStringButtonFieldEditor_2, group2);\n//\t\t\n//\t\tStringFieldEditor pass = new StringFieldEditor(PreferenceConstants.P_PWD, Messages.UmapStringButtonFieldEditor_3, group2);\n\t\t\n//\t\tURIStringButtonFieldEditor button = new URIStringButtonFieldEditor(PreferenceConstants.P_URI, Messages.UmapStringButtonFieldEditor_1, group2);\n\t\t\n//\t\taddField(name);\n//\t\taddField(pass);\n//\t\taddField(button);\n\t\t\n\t\taddField( classAbreviation );\n\t\taddField( intfAbreviation );\n\t\taddField( excAbreviation );\n//\t\taddField( projectAbbreviation );\t\t\n\t}", "private void updateRadioGroup(String name){\n radioGroup = findViewById(R.id.radioGroup);\n RadioButton rb = new RadioButton(getApplicationContext());\n rb.setText(name);\n rb.setTextColor(Color.BLACK);\n radioGroup.addView(rb);\n }", "UIComponent getParent();", "public JComponent getWrappedComponent()\n {\n return field;\n }", "private void setupRadioGroup(){\n //region Used to set up the RadioGroup\n\n selectUserTypeRadioGroup.clearCheck();\n selectUserTypeRadioGroup.setOnCheckedChangeListener(\n new RadioGroup.OnCheckedChangeListener() {\n @Override\n public void onCheckedChanged(RadioGroup group, int checkedId) {\n RadioButton clickedButton = group.findViewById(checkedId);\n if(checkedId == R.id.createAccountStudentRadio){\n isStudent = true;\n isTeacher = false;}\n else if(checkedId == R.id.createAccountTeacherRadio){\n isTeacher = true;\n isStudent = false;}\n else\n Log.d(\"Create Account\", \"Something has gone wrong picking user type\");\n }\n }\n );\n\n //endregion\n }", "public JRadioButton getJRadioButtonBOhne()\n\t{\n\t\tif (jRadioButtonBOhne == null)\n\t\t{\n\t\t\tjRadioButtonBOhne = new JRadioButton();\n\t\t\tjRadioButtonBOhne.setText(\"ohne\");\n\t\t\tjRadioButtonBOhne.setVisible(false);\n\t\t\tjRadioButtonBOhne.setBounds(125, 145, 70, 20);\n\t\t\tjRadioButtonBOhne.addItemListener(new ItemListener() {\n\t\t\t\tpublic void itemStateChanged(ItemEvent evt) {\n\t\t\t\t\tonCheckBoxBreak(0, evt);}});\n\t\t\tjRadioButtonBOhne.addKeyListener(keyListener);\n\t\t}\n\t\treturn jRadioButtonBOhne;\n\t}", "public abstract void add(Field.RadioData radioData);", "static Icon getRadioButtonIcon()\r\n/* 37: */ {\r\n/* 38: 85 */ if (radioButtonIcon == null) {\r\n/* 39: 86 */ radioButtonIcon = new RadioButtonIcon(null);\r\n/* 40: */ }\r\n/* 41: 88 */ return radioButtonIcon;\r\n/* 42: */ }", "private void addListenerRadioGroup() {\n int selectedID = radioGroupJenisKel.getCheckedRadioButtonId();\n\n //Mencari radio Button\n radioButtonJenisKel = (RadioButton) findViewById(selectedID);\n }", "public void createControl(Composite parent) {\r\n\t\tComposite container = new Composite(parent, SWT.NONE);\r\n\t\tsetControl(container);\r\n\t\tGroup group = new Group(container, SWT.NONE);\r\n\t\tgroup.setBounds(0, 281, 533, 60);\r\n\t\t\r\n\t\tLabel lblSelectWhetherYou = new Label(group, SWT.NONE);\r\n\t\tlblSelectWhetherYou.setBounds(10, 22, 374, 26);\r\n\t\tlblSelectWhetherYou.setText(\"\\u9009\\u62E9\\u662F\\u5426\\u8981\\u53D1\\u5E03\\u3001\\u68C0\\u7D22\\u6216\\u5220\\u9664\\u670D\\u52A1\\u5668\\u4E0A\\u7684\\u62A5\\u544A\\u3002\");\r\n\t\t\r\n\t\tlb_pr = new Label(container, SWT.NONE);\r\n\t\tlb_pr.setBounds(69, 79, 48, 48);\r\n\t\tlb_pr.setImage(SwtImageConverter.ConvertToSwtImage(ImageResolver.get_Resolver().ResolveImage(\"[IMAGE]Core#Images.Icons.ReportPublish.png\"),48,48));\r\n\t\t\r\n\t\trbtn_pr = new Button(container, SWT.RADIO);\r\n\t\trbtn_pr.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\r\n\t\t\t\tgetNextPage();\r\n\t\t\t}\r\n\t\t});\r\n\t\trbtn_pr.setBounds(59, 133, 69, 16);\r\n\t\trbtn_pr.setText(\"\\u53D1\\u5E03\\u62A5\\u544A\");\r\n\t\trbtn_pr.setData(\"PublishedReportW2_Pub\");\r\n\t\t\r\n\t\tlb_rr = new Label(container, SWT.NONE);\r\n\t\tlb_rr.setBounds(185, 79, 48, 48);\r\n\t\tlb_rr.setImage(SwtImageConverter.ConvertToSwtImage(ImageResolver.get_Resolver().ResolveImage(\"[IMAGE]Core#Images.Icons.ReportRetrieve.png\"),48,48));\r\n\t\t\r\n\t\t\r\n\t\trbtn_rr = new Button(container, SWT.RADIO);\r\n\t\trbtn_rr.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\r\n\t\t\t\tgetNextPage();\r\n\t\t\t}\r\n\t\t});\r\n\t\trbtn_rr.setBounds(175, 133, 69, 16);\r\n\t\trbtn_rr.setText(\"\\u68C0\\u7D22\\u62A5\\u544A\");//»ρΘ‘\\u68C0\\u7D22\\\r\n\t\trbtn_rr.setData(\"PublishedReportW2_Ret\");\r\n\t\t\r\n\t\tlb_dr = new Label(container, SWT.NONE);\r\n\t\tlb_dr.setBounds(297, 79, 48, 48);\r\n\t\tlb_dr.setImage(SwtImageConverter.ConvertToSwtImage(ImageResolver.get_Resolver().ResolveImage(\"[IMAGE]Core#Images.Icons.ReportDelete.png\"),48,48));\r\n\t\t\r\n\t\t\r\n\t\trbtn_dr = new Button(container, SWT.RADIO);\r\n\t\trbtn_dr.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\r\n\t\t\t\tgetNextPage();\r\n\t\t\t}\r\n\t\t});\r\n\t\trbtn_dr.setBounds(287, 133, 69, 16);\r\n\t\trbtn_dr.setText(\"\\u5220\\u9664\\u62A5\\u544A\");\r\n\t\trbtn_dr.setData(\"PublishedReportW2_Del\");\r\n\t\t\r\n\t}", "public WidgetParent getParent() {\n return this.m_parent;\n }", "@Override\n public UIPanel getParentPanel() {\n return parentPanel;\n }", "@Override\n public MElementContainer<MUIElement> getParent()\n {\n return null;\n }", "public JPanel getParent() {\n\t\treturn cardLayoutPanel;\n\t}", "private void checkRadio( String groupName, String refValue ) throws com.sun.star.uno.Exception, java.lang.Exception\n {\n checkRadio( groupName, refValue, m_primaryForm );\n }", "@Override\n\n // The flow will come here when\n // any of the radio buttons in the radioGroup\n // has been clicked\n\n // Check which radio button has been clicked\n public void onCheckedChanged(RadioGroup group,\n int checkedId) {\n RadioButton\n radioButton\n = (RadioButton) group\n .findViewById(checkedId);\n }", "public RMParentShape getParent() { return _parent; }", "private void m16076c() {\n this.f13514c = (RadioButton) getInflater().inflate(C0633g.abc_list_menu_item_radio, this, false);\n addView(this.f13514c);\n }", "@Override\r\n\tpublic Control createControl (Composite parent) {\r\n\t\tSystem.out.println(\"CDTFoldingPreferenceBlock.createControl()\");\r\n\r\n\t\tchildPreferenceStore.load();\r\n\t\tchildPreferenceStore.start();\r\n\r\n\t\tComposite inner = new Composite(parent, SWT.NONE);\r\n\t\tsetLayout(inner);\r\n\r\n\t\tComposite group = ControlFactory.createGroup(inner, CDTFoldingConstants.TF_TEXTFIELD_NAME, 1);\r\n\r\n\t\tText t = addTextField(group);\r\n\r\n\t\tControlFactory.createEmptySpace(inner);\r\n\r\n\t\tcbtViewer = addCBTViewer(inner);\r\n\r\n\t\tComposite editButtons = ControlFactory.createComposite(group, 4);\r\n\r\n\t\taddButton(editButtons, t);\r\n\t\tremoveButton(editButtons);\r\n\r\n\t\tmoveButton(editButtons, Move.UP);\r\n\t\tmoveButton(editButtons, Move.DOWN);\r\n\r\n\t\thighlightOrFoldCheckBox(inner);\r\n\r\n\t\tComposite colorComposite = ControlFactory.createComposite(inner, 2);\r\n\t\tcolorScheme(colorComposite);\r\n\r\n\t\taddErrorLabel(inner);\r\n\r\n\t\treturn inner;\r\n\t}", "@Override\n public FormFieldComponent getEditorComponent() {\n return (FormFieldComponent)editor;\n }", "public void addRadioButtonField(String text, boolean compulsory, ArrayList<String> buttonTexts) {\n genderRadio = new RadioGroup(getContext());\n LinearLayout ll = new LinearLayout(getContext());\n ll.setOrientation(LinearLayout.HORIZONTAL);\n\n TextView textView = new TextView(getContext());\n textView.setTextSize(20);\n\n textView.setPadding(0, 15, 0, 0);\n\n String req = compulsory ? required : \"\";\n textView.setText(text + req);\n\n genderRadio.setOrientation(RadioGroup.HORIZONTAL);\n\n for (int i = 0; i < buttonTexts.size(); i++) {\n genderRadio.addView(new RadioButton(getContext()));\n ((RadioButton) genderRadio.getChildAt(i)).setText(buttonTexts.get(i));\n }\n if (compulsory)\n ((RadioButton) genderRadio.getChildAt(0)).setChecked(true);\n\n ll.addView(textView);\n ll.addView(genderRadio);\n\n mainll.addView(ll);\n }", "private boolean parentKiller() {\n RadioGroup radioGroupCity = (RadioGroup) findViewById(R.id.parent_killer);\n RadioButton parentCheckRadioButton = (RadioButton) radioGroupCity.findViewById(radioGroupCity.getCheckedRadioButtonId());\n boolean checked = (parentCheckRadioButton.isChecked());\n\n switch (parentCheckRadioButton.getId()) {\n case R.id.marconi_button:\n if (checked) {\n return false;\n }\n case R.id.falcone_button:\n if (checked) {\n return false;\n }\n case R.id.chill_button:\n if (checked) {\n return true;\n }\n case R.id.zucco_button:\n if (checked) {\n return false;\n }\n }\n return false;\n }", "public int getRadio() {\n return radio;\n }", "@Nullable <T extends ContainerHolder> T setParent(@Nullable T parent);", "@Override\n public void widgetSelected(SelectionEvent e) {\n if (e.getSource() instanceof Button) {\n onRadioTypeUpdated((Button) e.getSource());\n }\n }", "protected void createBrowseFilterGroup(Composite parent) {\n\t\tcheckButtonGroup = new Group(parent,SWT.SHADOW_ETCHED_IN);\r\n\t\tcheckButtonGroup.setText( Messages.BrowseSelectorDialog_4 );\r\n\t\t\r\n\t\tGridLayout layout = new GridLayout();\r\n\t\tlayout.makeColumnsEqualWidth = true;\t\t\r\n\t\tlayout.numColumns = 3;\t\t\r\n\t\tcheckButtonGroup.setLayout(layout);\r\n\t\tGridData data = new GridData(); \r\n\t data.grabExcessVerticalSpace = false;\r\n\t data.grabExcessHorizontalSpace = true;\r\n\t data.horizontalAlignment = GridData.FILL;\r\n\t data.verticalAlignment = GridData.FILL;\r\n\t checkButtonGroup.setLayoutData(data);\r\n\t\r\n\t createBrowseFilterGroupButtons ( checkButtonGroup );\r\n\t}", "@Override // com.android.settings.development.bluetooth.BaseBluetoothDialogPreference\n public int getRadioButtonGroupId() {\n return C0010R$id.bluetooth_audio_codec_radio_group;\n }", "ViewGroup getOptionsPanelContainer();", "public ShapeRadioButtonGroup _placeholder_DefaultValue_xjal()\n/* 36: */ {\n/* 37: 68 */ TileGIS self = this;\n/* 38: 69 */ return null;\n/* 39: */ }", "public ParentNode(GroupItem group, ParentNode parent) {\n super(group, parent);\n // TODO: this really should be a separate pass to handle fixed class names\n String prefix = NameUtils.toNameWord(group.getEffectiveClassName());\n m_prefix = prefix;\n int select = NestingCustomBase.SELECTION_UNCHECKED;\n boolean exposed = false;\n ComponentExtension extension = group.getComponentExtension();\n switch (group.getSchemaComponent().type()) {\n case SchemaBase.CHOICE_TYPE:\n select = extension.getChoiceType();\n exposed = extension.isChoiceExposed();\n break;\n case SchemaBase.UNION_TYPE:\n select = extension.getUnionType();\n exposed = extension.isUnionExposed();\n break;\n }\n if (select != NestingCustomBase.SELECTION_UNCHECKED) {\n \n // no selector needed if handled by parent, or if no choices\n if ((parent != null && parent.getSchemaComponent() == group.getSchemaComponent()) ||\n group.getChildCount() <= 1) {\n select = NestingCustomBase.SELECTION_UNCHECKED;\n exposed = false;\n }\n }\n m_selectorType = select;\n m_selectorExposed = exposed;\n m_values = new ArrayList();\n }", "@Override\n protected void createFieldEditors() {\n /* ------------------------ CLI setup ------------------------- */\n /* -------------------------------------------------------------- */\n createJenkinsCLIFieldEditors();\n\n /* -------------------------------------------------------------- */\n /* ------------------------ Log action ------------------------- */\n /* -------------------------------------------------------------- */\n createJenkinsWaitForLogsInSeconds(getFieldEditorParent());\n /* -------------------------------------------------------------- */\n /* ------------------------ ERROR LEVEL ------------------------- */\n /* -------------------------------------------------------------- */\n createJenkinsLinterErrorLevelComboBox(getFieldEditorParent());\n\n /* -------------------------------------------------------------- */\n /* ------------------------ APPEARANCE -------------------------- */\n /* -------------------------------------------------------------- */\n GridData appearanceLayoutData = new GridData();\n appearanceLayoutData.horizontalAlignment = GridData.FILL;\n appearanceLayoutData.verticalAlignment = GridData.BEGINNING;\n appearanceLayoutData.grabExcessHorizontalSpace = true;\n appearanceLayoutData.grabExcessVerticalSpace = false;\n appearanceLayoutData.verticalSpan = 2;\n appearanceLayoutData.horizontalSpan = 3;\n\n Composite appearanceComposite = new Composite(getFieldEditorParent(), SWT.NONE);\n GridLayout layout = new GridLayout();\n layout.numColumns = 2;\n appearanceComposite.setLayout(layout);\n appearanceComposite.setLayoutData(appearanceLayoutData);\n\n createOtherFieldEditors(appearanceComposite);\n\n createBracketsFieldEditors(appearanceComposite);\n }", "public void setRadio(GenericRadio radio) {\n\t\tthis.radio = radio;\r\n\t}", "@Override\n public View renderForEdit(LayoutInflater layout, Plot plot, Activity activity, ViewGroup parent) {\n\n View container = null;\n\n if (this.canEdit) {\n container = layout.inflate(R.layout.plot_field_edit_row, parent, false);\n Object value = plot.getValueForKey(this.key);\n\n// ((TextView) container.findViewById(R.id.field_label)).setText(this.label);\n TextInputLayout newEdit = container.findViewById(R.id.field_label_new);\n newEdit.setHint(this.label+\" in \"+this.unitText);\n TextInputEditText newEditValue= newEdit.findViewById(R.id.field_value_new);\n// EditText edit = (EditText) container.findViewById(R.id.field_value);\n// TextView unitLabel = ((TextView) container.findViewById(R.id.field_unit));\n\n String safeValue = (!JSONObject.NULL.equals(value)) ? value.toString() : \"\";\n// edit.setText(safeValue);\n ((TextInputEditText)newEdit.findViewById(R.id.field_value_new)).setText(safeValue);\n\n this.valueView = newEditValue;\n// unitLabel.setText(this.unitText);\n\n if (this.format != null) {\n setFieldKeyboard(newEditValue);\n }\n }\n\n return container;\n }", "public void createFieldEditors() {\n\t\t\n\t\tList<String> listOfValues = PreferenceOptions.GetTreeEditorFeatureOptions();\n\t\tint count = listOfValues.size();\n\t\tpreviously = Activator.getDefault().getPreferenceStore().getString(PreferenceOptions.FeatureEditor_CHOICE);\t\t\n\t\t\n\t\tString[][] labelAndvalues = new String[count][2];\n\t\tfor (int i = 0; i < count; i++)\n\t\t\tfor (int j = 0; j < 2; j++) \n\t\t\t\tlabelAndvalues[i][j] = listOfValues.get(i);\t\t\t\n\t\t\n\t\taddField(new RadioGroupFieldEditor(\n\t\t\t\tPreferenceOptions.FeatureEditor_CHOICE,\n\t\t\t\t\"Tree Editor Feature Wizard\",\n\t\t\t\t1,\n\t\t\t\tlabelAndvalues, \n\t\t\t\tgetFieldEditorParent()));\t\n\n\t\t/*Select the Engine to execute constraint*/\n\t\t\n\t\tList<String> listOfEngines = PreferenceOptions.getEngineOptions();\n\t\tint countEngines = listOfEngines.size();\t\t\n\t\t\n\t\tif (listOfEngines.size() != 0) {\n\t\t\t\n\t\t\tpreviouslyEngine = Activator.getDefault().getPreferenceStore().getString(PreferenceOptions.ENGINE_CHOICE);\n\t\t\t\n\t\t\tString[][] labelAndvaluesEngine = new String[countEngines][2];\n\t\t\tfor (int i = 0; i < countEngines; i++)\n\t\t\t\tfor (int j = 0; j < 2; j++) \n\t\t\t\t\tlabelAndvaluesEngine[i][j] = listOfEngines.get(i);\n\t\t\t\t\n\t\t\taddField(new RadioGroupFieldEditor(\n\t\t\t\t\tPreferenceOptions.ENGINE_CHOICE,\n\t\t\t\t\t\"Engine for the execution of constraints\",\n\t\t\t\t\t1,\n\t\t\t\t\tlabelAndvaluesEngine, \n\t\t\t\t\tgetFieldEditorParent()));\t\t\t\n\t\t}\t\n\t}", "@Override\n\tprotected void createAdditionalControls(Composite parent) {\n\t\tComposite container = new Composite(parent, SWT.NONE);\n\t\tcontainer.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n\t\tGridLayout containerLayout = new GridLayout(2, false);\n\t\tcontainerLayout.marginWidth = 0;\n\t\tcontainer.setLayout(containerLayout);\n\t\t\n\t\tLabel comboLabel = new Label(container, SWT.NONE);\n\t\tcomboLabel.setText(Messages.common_calculation);\n\t\t\n\t\tcalculationTypeCombo = new Combo(container, SWT.READ_ONLY);\n\t\tcalculationTypeCombo.setItems(NamedEnumPropertyDescriptor.getEnumItems(calculationTypes, NullEnum.NOTNULL));\n\t\tcalculationTypeCombo.select(0);\n\t\tcalculationTypeCombo.addSelectionListener(new SelectionAdapter() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tint selectedIndex = calculationTypeCombo.getSelectionIndex();\n\t\t\t\tselectedEnum = (CalculationEnum)calculationTypes[selectedIndex];\n\t\t\t}\n\t\t});\n\t}", "private JPanel getPanel() {\n\t\tint width = resources.getSize().width / 5;\n\t\tint height = resources.getSize().height / 14;\n\n\t\tJLabel limit = createJLabelImg(\"textfield.png\", width - width / 15,\n\t\t\t\theight, 1f);\n\t\tint limitWidth = limit.getIcon().getIconWidth();\n\t\tint limitHeight = limit.getIcon().getIconHeight();\n\n\t\ton = createJLabelImg(\"toggle_on.png\", limitWidth, limitHeight, 1f)\n\t\t\t\t.getIcon();\n\t\toff = createJLabelImg(\"toggle_off.png\", limitWidth, limitHeight, 1f)\n\t\t\t\t.getIcon();\n\n\t\ttoggle = new JCheckBox();\n\t\ttoggle.setSelectedIcon(on);\n\t\ttoggle.setIcon(off);\n\t\ttoggle.setEnabled(true);\n\t\ttoggle.setSelected(value);\n\t\ttoggle.setCursor(new Cursor(Cursor.HAND_CURSOR));\n\t\ttoggle.setFocusable(false);\n\t\ttoggle.setBorder(null);\n\t\ttoggle.setOpaque(false);\n\n\t\tint indent = limitWidth / 25;\n\t\tint textWidthLimit = limitWidth - indent * 2 - on.getIconWidth();\n\t\tString fieldStr = Util.clipText(fieldName + \" \",\n\t\t\t\tresources.getFont(\"italic\", 15f), textWidthLimit);\n\t\tJLabel label = new JLabel(fieldStr);\n\t\tlabel.setFont(resources.getFont(\"italic\", 15f));\n\t\tlabel.setForeground(resources.getTextColor());\n\n\t\tJPanel toggleWrapper = new JPanel(new FlowLayout(FlowLayout.LEFT,\n\t\t\t\tindent, 0));\n\t\ttoggleWrapper.setOpaque(false);\n\t\ttoggleWrapper.setPreferredSize(new Dimension(limitWidth, limitHeight));\n\t\ttoggleWrapper.setMaximumSize(toggleWrapper.getPreferredSize());\n\t\ttoggleWrapper.add(toggle);\n\t\ttoggleWrapper.add(label);\n\n\t\tJPanel container = new JPanel(new FlowLayout(FlowLayout.LEFT, 0,\n\t\t\t\theight / 7));\n\t\tcontainer.setOpaque(false);\n\t\tcontainer.add(toggleWrapper);\n\t\tcontainer.setPreferredSize(new Dimension(width, container\n\t\t\t\t.getPreferredSize().height));\n\t\tcontainer.setMaximumSize(container.getPreferredSize());\n\n\t\treturn container;\n\t}", "public void addListenerOnRadioGroupButton() {\n\n priorityRadioGroup = (RadioGroup) findViewById(R.id.priorityRadioGroup);\n medium = (RadioButton) findViewById(R.id.medium);\n high = (RadioButton) findViewById(R.id.high);\n low = (RadioButton) findViewById(R.id.low);\n\n //default value if no value change\n priorityLevel = \"low\";\n low.setChecked(true);\n\n priorityRadioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener()\n {\n public void onCheckedChanged(RadioGroup group, int checkedId) {\n switch(checkedId){\n case R.id.low:\n Log.d(\"TAG\", \"low checked\");\n priorityLevel = \"low\";\n break;\n case R.id.medium:\n Log.d(\"TAG\", \"medium checked\");\n priorityLevel = \"medium\";\n break;\n case R.id.high:\n Log.d(\"TAG\", \"high checked\");\n priorityLevel = \"high\";\n break;\n }\n }\n });\n\n }", "protected void createBracketsFieldEditors(Composite appearanceComposite) {\n Label spacer = new Label(appearanceComposite, SWT.LEFT);\n GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);\n gd.horizontalSpan = 2;\n gd.heightHint = convertHeightInCharsToPixels(1) / 2;\n spacer.setLayoutData(gd);\n\n String label = \"Bracket highlighting\";\n\n bracketHighlightingCheckbox = addButton(appearanceComposite, SWT.CHECK, label, 0, new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n matchingBrackets = bracketHighlightingCheckbox.getSelection();\n }\n });\n\n Composite radioComposite = new Composite(appearanceComposite, SWT.NONE);\n GridLayout radioLayout = new GridLayout();\n radioLayout.marginWidth = 0;\n radioLayout.marginHeight = 0;\n radioComposite.setLayout(radioLayout);\n\n label = \"highlight matching bracket\";\n matchingBracketRadioButton = addButton(radioComposite, SWT.RADIO, label, 0, new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n if (matchingBracketRadioButton.getSelection()) {\n highlightBracketAtCaretLocation = false;\n }\n }\n });\n createDependency(bracketHighlightingCheckbox, matchingBracketRadioButton);\n\n label = \"highlight matching bracket and caret location\";\n matchingBracketAndCaretLocationRadioButton = addButton(radioComposite, SWT.RADIO, label, 0, new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n if (matchingBracketAndCaretLocationRadioButton.getSelection()) {\n highlightBracketAtCaretLocation = true;\n }\n }\n });\n createDependency(bracketHighlightingCheckbox, matchingBracketAndCaretLocationRadioButton);\n\n label = \"highlight enclosing brackets\";\n enclosingBracketsRadioButton = addButton(radioComposite, SWT.RADIO, label, 0, new SelectionAdapter() {\n\n @Override\n public void widgetSelected(SelectionEvent e) {\n boolean selection = enclosingBracketsRadioButton.getSelection();\n enclosingBrackets = selection;\n if (selection) {\n highlightBracketAtCaretLocation = true;\n }\n }\n });\n createDependency(bracketHighlightingCheckbox, enclosingBracketsRadioButton);\n\n matchingBracketsColor = new ColorFieldEditor(P_EDITOR_MATCHING_BRACKETS_COLOR.getId(), \"Matching brackets color\", radioComposite);\n addField(matchingBracketsColor);\n createDependency(bracketHighlightingCheckbox, matchingBracketsColor.getLabelControl(radioComposite));\n createDependency(bracketHighlightingCheckbox, matchingBracketsColor.getColorSelector().getButton());\n\n autoCreateEndBrackets = new BooleanFieldEditor(P_EDITOR_AUTO_CREATE_END_BRACKETSY.getId(), \"Auto create ending brackets\", getFieldEditorParent());\n addField(autoCreateEndBrackets);\n\n onlyStrictCodeCompletion = new BooleanFieldEditor(P_EDITOR_SHOW_ALSO_NON_STRICT_CODE_PROPOSALS.getId(), \"Show also NON strict code proposals\", getFieldEditorParent());\n onlyStrictCodeCompletion.getDescriptionControl(getFieldEditorParent()).setToolTipText(\n \"When enabled even code proposals for not correct context situations are proposed (but with a warn icon).\\n\\nYou need to close editors and open again when changing this value!\");\n addField(onlyStrictCodeCompletion);\n\n }", "private void checkRadio( String groupName, String refValue, XPropertySet form ) throws com.sun.star.uno.Exception, java.lang.Exception\n {\n XPropertySet xRadio = getRadioModel( groupName, refValue, form );\n\n\t\tXRadioButton radioButton = (XRadioButton)UnoRuntime.queryInterface(\n\t\t\tXRadioButton.class, m_document.getCurrentView().getControl( xRadio ) );\n\t\tradioButton.setState( true );\n }", "public GroupPanel(GUIViewOther mainPanel, String groupName, JTabbedPane parent) {\n\t\tthis.groupName = groupName;\n\t\tthis.mainPanel = mainPanel;\n\t\tthis.parent = parent;\n initComponents();\n\t\ttextField.addActionListener(this);\n }", "@Override\n public Type getParentType() {\n return parentType;\n }", "public radioButtonClass()\n {\n setTitle(\"radioButtons\");\n setLayout(new FlowLayout());\n \n tf=new JTextField(\"DUDE!!! WTF\", 20);\n add(tf);\n \n plain_b= new JRadioButton(\"plain\",true); //for radio buttons one needs to be true so when they are grouped it unchecks all except one\n bold_b= new JRadioButton(\"bold\",false);\n italic_b= new JRadioButton(\"italic\",false);\n bi_b= new JRadioButton(\"bold&italic\",false);\n add(plain_b);\n add(bold_b);\n add(italic_b);\n add(bi_b);\n \n //needed to create a family so that each one knows who is checked/unchecked\n group= new ButtonGroup(); \n group.add(plain_b); //group.add as its being added to group only\n group.add(bold_b);\n group.add(italic_b);\n group.add(bi_b);\n \n \n //to create fonts that will be passsed directly as an object to handler class\n pf= new Font(\"Serif\",Font.PLAIN,15);\n bf= new Font(\"Serif\",Font.BOLD,15);\n itf= new Font(\"Serif\",Font.ITALIC,15);\n bif= new Font(\"Serif\",Font.BOLD+Font.ITALIC,15);\n tf.setFont(pf); //setting initial font for the text field\n \n //waits for event and directly pass object(Of font) to cnstructor \n plain_b.addItemListener(new Handler(pf));\n bold_b.addItemListener(new Handler(bf));\n italic_b.addItemListener(new Handler(itf));\n bi_b.addItemListener(new Handler(bif));\n }", "@Override\n public void setQuestion(Question question) {\n super.setQuestion(question);\n\n options = ((MultipleChoiceQuestionResponse) question.getCorrectAnswer()).getChoices();\n for (int i = 0; i < options.size(); i ++) {\n String option = options.get(i);\n RadioButton button = new RadioButton(option);\n button.setToggleGroup(group);\n\n button.setLayoutY(i * 30);\n choices.getChildren().add(button);\n }\n }", "@NonNull <T extends ContainerHolder> Optional<T> parent();", "protected Control createDialogArea(Composite parent) {\r\n \t\t// page group\r\n \t\tComposite composite= (Composite)super.createDialogArea(parent);\r\n \r\n \t\tfTree= new CheckboxTreeViewer(composite);\r\n \t\tfTree.setUseHashlookup(true);\r\n \t\tfTree.setContentProvider(new WorkbenchContentProvider());\r\n \t\tfTree.setLabelProvider(new WorkbenchLabelProvider());\r\n \t\tfTree.setInput(SearchPlugin.getWorkspace().getRoot());\r\n \r\n \t\tGridData gd= new GridData(GridData.FILL_BOTH | GridData.GRAB_VERTICAL);\r\n \t\tgd.heightHint= SIZING_SELECTION_WIDGET_HEIGHT;\r\n \t\tgd.widthHint= SIZING_SELECTION_WIDGET_WIDTH;\r\n \t\tfTree.getControl().setLayoutData(gd);\r\n \r\n \t\tfTree.addCheckStateListener(new ICheckStateListener() {\r\n \t\t\tpublic void checkStateChanged(CheckStateChangedEvent event) {\r\n \t\t\t\thandleCheckStateChange(event);\r\n \t\t\t}\r\n \t\t});\r\n \t\t\r\n \t\tfTree.addTreeListener(new ITreeViewerListener() {\r\n \t\t\tpublic void treeCollapsed(TreeExpansionEvent event) {\r\n \t\t\t}\r\n \t\t\tpublic void treeExpanded(TreeExpansionEvent event) {\r\n \t\t\t\tfinal Object element= event.getElement();\r\n \t\t\t\tif (!fTree.getGrayed(element))\r\n \t\t\t\t\tBusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {\r\n \t\t\t\t\t\tpublic void run() {\r\n \t\t\t\t\t\t\tsetSubtreeChecked((IContainer)element, fTree.getChecked(element), false);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t});\r\n \t\t\t}\r\n \t\t});\r\n \t\t\r\n \t\tinitializeCheckedState();\r\n \t\tdisableClosedProjects();\r\n \r\n \t\treturn composite;\r\n \t}", "private JRadioButton getJRadioButtonGrey() {\r\n\t\tif (buttGrey == null) {\r\n\t\t\tbuttGrey = new JRadioButton();\r\n\t\t\tbuttGrey.setText(\"Grey\");\r\n\t\t\tbuttGrey.setToolTipText(\"grey level output image\");\r\n\t\t\tbuttGrey.addActionListener(this);\r\n\t\t\tbuttGrey.setActionCommand(\"parameter\");\r\n\t\t}\r\n\t\treturn buttGrey;\r\n\t}", "public SecurityQuestionWithMaskedAnswerWidget() {\r\n\t\tanswer1.getElement().setId(\"answer1TextBox\");\r\n\t\tanswer2.getElement().setId(\"answer2TextBox\");\r\n\t\tanswer3.getElement().setId(\"answer3TextBox\");\r\n\t\tsecurityQuestion1.getElement().setId(\"securityQuestion1ListBoxMVP\");\r\n\t\tsecurityQuestion2.getElement().setId(\"securityQuestion2ListBoxMVP\");\r\n\t\tsecurityQuestion3.getElement().setId(\"securityQuestion3ListBoxMVP\");\r\n\t\t/*\r\n\t\tFlowPanel container = new FlowPanel();\r\n\t\tcontainer.getElement().setId(\"container_FlowPanel\");\r\n\t\tFlowPanel fp = addSecurityQuestionAnsertRules();\r\n\t\tcontainer.add(fp);\r\n\t\t\r\n\t\tcontainer.add(new SpacerWidget());*/\r\n\t\t\r\n\t\t/*container.add(LabelBuilder.buildLabel(securityQuestion1, \"Security Question 1\"));\r\n\t\tcontainer.add(wrap(securityQuestion1));\r\n\t\tcontainer.add(LabelBuilder.buildLabel(answer1, \"Security Answer 1\"));\r\n\t\tcontainer.add(wrap(answer1));\r\n\t\tanswer1.setFocus(false);\r\n\t\tcontainer.add(new SpacerWidget());\r\n\t\t\r\n\t\tcontainer.add(LabelBuilder.buildLabel(securityQuestion2, \"Security Question 2\"));\r\n\t\tcontainer.add(wrap(securityQuestion2));\r\n\t\tcontainer.add(LabelBuilder.buildLabel(answer2, \"Security Answer 2\"));\r\n\t\t\r\n\t\tcontainer.add(wrap(answer2));\r\n\t\tanswer2.setFocus(false);\r\n\t\tcontainer.add(new SpacerWidget());\r\n\t\t\r\n\t\tcontainer.add(LabelBuilder.buildLabel(securityQuestion3, \"Security Question 3\"));\r\n\t\tcontainer.add(wrap(securityQuestion3));\r\n\t\tcontainer.add(LabelBuilder.buildLabel(answer3, \"Security Answer 3\"));\r\n\t\t\r\n\t\tcontainer.add(wrap(answer3));\r\n\t\tanswer3.setFocus(false);*/\r\n\t\t\r\n\t\trulesGroup.add(addSecurityQuestionAnsertRules());\r\n\t\t\r\n\t\tFormLabel labelQns1 = new FormLabel();\r\n\t\tlabelQns1.setText(\"Security Question 1\");\r\n\t\tlabelQns1.setTitle(\"Security Question 1\");\r\n\t\tlabelQns1.setId(\"SecurityQnsLabel1\");\r\n\t\tlabelQns1.setFor(\"securityQuestion1ListBoxMVP\");\r\n\t\tlabelQns1.setShowRequiredIndicator(true);\r\n\t\t\r\n\t\tFormLabel labelQns2 = new FormLabel();\r\n\t\tlabelQns2.setText(\"Security Question 2\");\r\n\t\tlabelQns2.setTitle(\"Security Question 2\");\r\n\t\tlabelQns2.setId(\"SecurityQnsLabel2\");\r\n\t\tlabelQns2.setFor(\"securityQuestion2ListBoxMVP\");\r\n\t\tlabelQns2.setShowRequiredIndicator(true);\r\n\t\t\r\n\t\tFormLabel labelQns3 = new FormLabel();\r\n\t\tlabelQns3.setText(\"Security Question 3\");\r\n\t\tlabelQns3.setTitle(\"Security Question 3\");\r\n\t\tlabelQns3.setId(\"SecurityQnsLabel3\");\r\n\t\tlabelQns3.setFor(\"securityQuestion3ListBoxMVP\");\r\n\t\tlabelQns3.setShowRequiredIndicator(true);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tFormLabel labelAnswer1 = new FormLabel();\r\n\t\tlabelAnswer1.setText(\"Security Answer 1\");\r\n\t\tlabelAnswer1.setTitle(\"Security Answer 1\");\r\n\t\tlabelAnswer1.setId(\"SecurityAnswerLabel1\");\r\n\t\tlabelAnswer1.setFor(\"answer1TextBox\");\r\n\t\tlabelAnswer1.setShowRequiredIndicator(true);\r\n\t\t\r\n\t\tFormLabel labelAnswer2 = new FormLabel();\r\n\t\tlabelAnswer2.setText(\"Security Answer 2\");\r\n\t\tlabelAnswer2.setTitle(\"Security Answer 2\");\r\n\t\tlabelAnswer2.setId(\"SecurityAnswerLabel2\");\r\n\t\tlabelAnswer2.setFor(\"answer2TextBox\");\r\n\t\tlabelAnswer2.setShowRequiredIndicator(true);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tFormLabel labelAnswer3 = new FormLabel();\r\n\t\tlabelAnswer3.setText(\"Security Answer 3\");\r\n\t\tlabelAnswer3.setTitle(\"Security Answer 3\");\r\n\t\tlabelAnswer3.setId(\"SecurityAnswerLabel3\");\r\n\t\tlabelAnswer3.setFor(\"answer3TextBox\");\r\n\t\tlabelAnswer3.setShowRequiredIndicator(true);\r\n\t\t\r\n\t\tsecurityQuestion1.setWidth(\"320px\");\r\n\t\tsecurityQuestion2.setWidth(\"320px\");\r\n\t\tsecurityQuestion3.setWidth(\"320px\");\r\n\t\tanswer1.setPlaceholder(\"Enter Answer 1 here.\");\r\n\t\tanswer1.setWidth(\"320px\");\r\n\t\tanswer1.setMaxLength(100);\r\n\t\tanswer2.setWidth(\"320px\");\r\n\t\tanswer2.setMaxLength(100);\r\n\t\tanswer2.setPlaceholder(\"Enter Answer 2 here.\");\r\n\t\tanswer3.setWidth(\"320px\");\r\n\t\tanswer3.setMaxLength(100);\r\n\t\tanswer3.setPlaceholder(\"Enter Answer 3 here.\");\r\n\t\t\r\n\t\tQuestion1FormGroup.add(labelQns1);\r\n\t\tQuestion1FormGroup.add(securityQuestion1);\r\n\t\tlabelAnswer1.setMarginTop(10.00);\r\n\t\tAns1FormGroup.add(labelAnswer1);\r\n\t\tAns1FormGroup.add(answer1);\r\n\t\t\r\n\t\t\r\n\t\tQuestion2FormGroup.add(labelQns2);\r\n\t\tQuestion2FormGroup.add(securityQuestion2);\r\n\t\tlabelAnswer2.setMarginTop(10.00);\r\n\t\tAns2FormGroup.add(labelAnswer2);\r\n\t\tAns2FormGroup.add(answer2);\r\n\t\t\r\n\t\tQuestion3FormGroup.add(labelQns3);\r\n\t\tQuestion3FormGroup.add(securityQuestion3);\r\n\t\tlabelAnswer3.setMarginTop(10.00);\r\n\t\tAns3FormGroup.add(labelAnswer3);\r\n\t\tAns3FormGroup.add(answer3);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t/*container.add(new SpacerWidget());\r\n\t\t\r\n\t\t\r\n\t\tcontainer.setStyleName(\"securityQuestions\");\r\n\t\tinitWidget(container);*/\r\n\t}", "@Override\n public final ObjectNode findParent(String fieldName) {\n return null;\n }", "public Field() {\n\t\t\n\t\t//--- View:\n\t\t// > first line: a horizontal box containing open and closed content.\n\t\t\n\t\t// style\n\t\tgetStyleClass().add(\"field\");\n\t\tnameText.getStyleClass().add(\"field-name\");\n\t\tcontentClosed.getStyleClass().add(\"field-contentClosed-box\");\n\t\tcontentOpen.getStyleClass().add(\"field-contentOpen-box\");\n\t\tsubfieldHolder.getStyleClass().add(\"field-subfieldHolder\");\n\t\t\n\t\t// link the first line & the rest\n\t contentClosed.getChildren().add(valueLabel);\n\t\tfirstLine.getChildren().addAll(nameText, contentClosed, contentOpen);\n\t\tupdateGrid();\n\n\t\t// open true by default\n\t\tcontentClosed.setVisible(false);\n\t contentClosed.setManaged(false);\n\t \n\t\t//--- Control:\n\t\t// close on click if openable (without triangle buttons is always open)\n\t setOnMouseClicked(e -> { \n\t \tif (closable)\n\t\t \tthis.setOpen(!open()); \n\t \te.consume();\n\t });\n\t}", "private void setRadioOnCheckedChangedEvent() {\n ((RadioButton) findViewById(R.id.radio_akb48)).setOnCheckedChangeListener(this);\n ((RadioButton) findViewById(R.id.radio_ske48)).setOnCheckedChangeListener(this);\n ((RadioButton) findViewById(R.id.radio_nmb48)).setOnCheckedChangeListener(this);\n ((RadioButton) findViewById(R.id.radio_hkt48)).setOnCheckedChangeListener(this);\n }", "@NonNull\n @Override\n public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {\n LayoutInflater inflater = LayoutInflater.from(parent.getContext());\n View view = inflater.inflate(R.layout.rv_prefs_groups, parent, false);\n\n ViewHolder viewHolder = new ViewHolder(view);\n viewHolder.recyclerView.setLayoutManager(new LinearLayoutManager(context));\n viewHolder.recyclerView.setNestedScrollingEnabled(false);\n return viewHolder;\n }", "@Override\n public void onCheckedChanged(RadioGroup radioGroup, @IdRes int checked) {\n }", "@Override\r\n public void onCheckedChanged(RadioGroup group, int checkedId) {\n dialog.dismiss();\r\n MyLog.i(\"YUY\",\r\n String.valueOf(checkedId) + \" \"\r\n + group.getCheckedRadioButtonId());\r\n mVehicleTypeTV.setText(((RadioButton) layout\r\n .findViewById(checkedId)).getText().toString());\r\n }", "public RadioButtonPanel build()\r\n\t\t{\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"[INFO] <RADIOBUTTON_PANEL_BUILDER> Running build\"); // Debug\r\n\t\t\t\r\n\t\t\ttrimArray();\r\n\t\t\t\r\n\t\t\treturn new RadioButtonPanel(this);\r\n\t\t}", "public void setParent(RMParentShape aShape) { _parent = aShape; }", "public CoolBar getParent() {\n checkWidget();\n return parent;\n }", "@Override\r\n\tpublic void createPartControl(final Composite parent) {\r\n\t\t// Create the parent component\r\n\t\ttoolkit = new FormToolkit(Display.getDefault());\r\n\t\tform = toolkit.createForm(parent);\r\n\t\tform.setText(\"Vormerkungen\");\r\n\t\ttoolkit.decorateFormHeading(form);\r\n\r\n\t\tfinal Composite composite = form.getBody();\r\n\t\tcomposite.setLayout(new FillLayout());\r\n\r\n\t\tSashForm sash_prebooking = new SashForm(composite, SWT.HORIZONTAL);\r\n\r\n\t\t// groups-----------------------------------\r\n\t\tfinal SashForm sashForm_8 = new SashForm(sash_prebooking, SWT.VERTICAL);\r\n\r\n\t\tfinal Group richtungBruckGroup = new Group(sashForm_8, SWT.NONE);\r\n\t\trichtungBruckGroup.setLayout(new FillLayout());\r\n\t\trichtungBruckGroup.setForeground(CustomColors.COLOR_RED);\r\n\t\trichtungBruckGroup.setText(\"Richtung Bruck\");\r\n\r\n\t\tfinal SashForm sashForm_7 = new SashForm(sashForm_8, SWT.VERTICAL);\r\n\r\n\t\tfinal Group richtungKapfenbergGroup = new Group(sashForm_7, SWT.NONE);\r\n\t\trichtungKapfenbergGroup.setLayout(new FillLayout());\r\n\t\trichtungKapfenbergGroup.setText(\"Richtung Kapfenberg\");\r\n\r\n\t\tfinal Group richtungMariazellGroup = new Group(sashForm_7, SWT.NONE);\r\n\t\trichtungMariazellGroup.setLayout(new FillLayout());\r\n\t\trichtungMariazellGroup.setText(\"Richtung Mariazell\");\r\n\r\n\t\t// ----------------------------------------------\r\n\t\tfinal SashForm sashForm_9 = new SashForm(sash_prebooking, SWT.VERTICAL);\r\n\r\n\t\tfinal Group richtungGrazGroup = new Group(sashForm_9, SWT.NONE);\r\n\t\trichtungGrazGroup.setLayout(new FillLayout());\r\n\t\trichtungGrazGroup.setText(\"Richtung Graz\");\r\n\r\n\t\tfinal SashForm sashForm_1 = new SashForm(sashForm_9, SWT.VERTICAL);\r\n\r\n\t\tfinal Group richtungLeobenGroup = new Group(sashForm_1, SWT.NONE);\r\n\t\trichtungLeobenGroup.setLayout(new FillLayout());\r\n\t\trichtungLeobenGroup.setText(\"Richtung Leoben\");\r\n\r\n\t\tfinal Group richtungWienGroup = new Group(sashForm_1, SWT.NONE);\r\n\t\trichtungWienGroup.setLayout(new FillLayout());\r\n\t\trichtungWienGroup.setText(\"Richtung Wien\");\r\n\r\n\t\t// viewers\r\n\t\tviewerLeoben = createTableViewer(richtungLeobenGroup);\r\n\t\tviewerGraz = createTableViewer(richtungGrazGroup);\r\n\t\tviewerKapfenberg = createTableViewer(richtungKapfenbergGroup);\r\n\t\tviewerBruck = createTableViewer(richtungBruckGroup);\r\n\t\tviewerWien = createTableViewer(richtungWienGroup);\r\n\t\tviewerMariazell = createTableViewer(richtungMariazellGroup);\r\n\r\n\t\t// create the tooltip\r\n\t\ttooltipLeoben = new JournalViewTooltip(viewerLeoben.getControl());\r\n\t\ttooltipGraz = new JournalViewTooltip(viewerGraz.getControl());\r\n\t\ttooltipKapfenberg = new JournalViewTooltip(viewerKapfenberg.getControl());\r\n\t\ttooltipBruck = new JournalViewTooltip(viewerBruck.getControl());\r\n\t\ttooltipWien = new JournalViewTooltip(viewerWien.getControl());\r\n\t\ttooltipMariazell = new JournalViewTooltip(viewerMariazell.getControl());\r\n\r\n\t\t// show the tool tip when the selection has changed\r\n\t\tviewerLeoben.addSelectionChangedListener(createTooltipListener(viewerLeoben, tooltipLeoben));\r\n\t\tviewerGraz.addSelectionChangedListener(createTooltipListener(viewerGraz, tooltipGraz));\r\n\t\tviewerKapfenberg.addSelectionChangedListener(createTooltipListener(viewerKapfenberg, tooltipKapfenberg));\r\n\t\tviewerBruck.addSelectionChangedListener(createTooltipListener(viewerBruck, tooltipBruck));\r\n\t\tviewerWien.addSelectionChangedListener(createTooltipListener(viewerWien, tooltipWien));\r\n\t\tviewerMariazell.addSelectionChangedListener(createTooltipListener(viewerMariazell, tooltipMariazell));\r\n\r\n\t\t// sort the table by default\r\n\t\tviewerLeoben.setSorter(new TransportSorter(TransportSorter.ABF_SORTER, SWT.DOWN));\r\n\t\tviewerGraz.setSorter(new TransportSorter(TransportSorter.ABF_SORTER, SWT.DOWN));\r\n\t\tviewerKapfenberg.setSorter(new TransportSorter(TransportSorter.ABF_SORTER, SWT.DOWN));\r\n\t\tviewerBruck.setSorter(new TransportSorter(TransportSorter.ABF_SORTER, SWT.DOWN));\r\n\t\tviewerWien.setSorter(new TransportSorter(TransportSorter.ABF_SORTER, SWT.DOWN));\r\n\t\tviewerMariazell.setSorter(new TransportSorter(TransportSorter.ABF_SORTER, SWT.DOWN));\r\n\r\n\t\tmakeActionsBruck(viewerBruck);\r\n\t\tmakeActionsKapfenberg(viewerKapfenberg);\r\n\t\tmakeActionsLeoben(viewerLeoben);\r\n\t\tmakeActionsMariazell(viewerMariazell);\r\n\t\tmakeActionsGraz(viewerGraz);\r\n\t\tmakeActionsWien(viewerWien);\r\n\r\n\t\thookContextMenuLeoben(viewerLeoben);\r\n\t\thookContextMenuGraz(viewerGraz);\r\n\t\thookContextMenuWien(viewerWien);\r\n\t\thookContextMenuMariazell(viewerMariazell);\r\n\t\thookContextMenuBruck(viewerBruck);\r\n\t\thookContextMenuKapfenberg(viewerKapfenberg);\r\n\r\n\t\t// add the form actions\r\n\t\tcreateToolBarActions();\r\n\r\n\t\t// apply the filters\r\n\t\tapplyFilters();\r\n\r\n\t\t// register listeners to keep in track\r\n\t\tNetWrapper.registerListener(this, Transport.class);\r\n\t\tUiWrapper.getDefault().registerListener(this);\r\n\r\n\t\t// initialize the view with current data\r\n\t\tinitView();\r\n\t}", "public CheckGroupField addCheckGroupField(final String key, final Object[] options) {\n String label = key;\n CheckGroupField groupField = new CheckGroupField(getComposite(), _form, key, label, false);\n groupField.adapt(_formToolkit);\n _form.mapField(key, groupField);\n groupField.addButtons(options);\n return groupField;\n }", "protected JComponent createEditor() {\n/* 84 */ JComponent editor = super.createEditor();\n/* 85 */ if (editor instanceof JSpinner.DefaultEditor) {\n/* */ \n/* 87 */ JSpinner.DefaultEditor de = (JSpinner.DefaultEditor)editor;\n/* */ \n/* */ \n/* */ \n/* */ \n/* 92 */ de.getTextField().setBorder(new EmptyBorder(0, 0, 0, 0));\n/* */ \n/* 94 */ Dimension prefSize = de.getPreferredSize();\n/* 95 */ int compHeight = prefSize.height;\n/* */ \n/* 97 */ int height = LiquidSpinnerButtonUI.getSkin(1).getVsize() + LiquidSpinnerButtonUI.getSkin(5).getVsize();\n/* 98 */ int diff = height - compHeight;\n/* */ \n/* 100 */ if (diff > 0) {\n/* */ \n/* 102 */ int half = diff / 2;\n/* 103 */ de.getTextField().setBorder(new EmptyBorder(half, 0, diff - half, 0));\n/* */ } \n/* */ } \n/* 106 */ return editor;\n/* */ }", "@Override\n\tpublic void onCheckedChanged(RadioGroup group, int checkedId) {\n\t\tswitch(checkedId)\n\t\t{\n\t\tcase R.id.broad_radio_public:{\n\t\t\tcontactContainer.setVisibility(View.GONE);\n\t\t\tvisibility=\"1\";\n\t\t\taddContacts.setText(\"JU CMS\");\n\t\t\tcustom_name=\"\";\n\t\t\tcustom_id=\" \";\n\n\t\t}\n\t\tbreak;\n\n\t\tcase R.id.broad_radio_custom:{\n\t\t\tcontactContainer.setVisibility(View.VISIBLE);\n\t\t\tvisibility=\"0\";\n\t\t\taddContacts.setText(\"\");\n\t\t\taddContacts.setHint(\"Add Contacts\");\n\t\t}\n\t\tbreak;\n\t\t}\n\t}", "@SuppressWarnings(\"unused\")\r\n\tprivate SWTRadioButtonView() {\r\n\t\tthis.containingForm = null;\r\n\t}", "@Override\r\n\tpublic Control getControl() {\r\n\t\treturn container;\r\n\t}", "public CarrierShape parent()\n\t{\n\t\treturn parent;\n\t}", "@Override\r\n public void onCheckedChanged(RadioGroup group, int checkedId) {\n pos=rg.indexOfChild(findViewById(checkedId));\r\n\r\n\r\n\r\n //Method 2 For Getting Index of RadioButton\r\n pos1=rg.indexOfChild(findViewById(rg.getCheckedRadioButtonId()));\r\n\r\n\r\n\r\n switch (pos)\r\n {\r\n case 0 :\r\n layout_Firm.setVisibility(View.GONE);\r\n layout_Firmno.setVisibility(View.GONE);\r\n type=\"Proprietorship\";\r\n break;\r\n case 1 :\r\n layout_Firm.setVisibility(View.VISIBLE);\r\n layout_Firmno.setVisibility(View.VISIBLE);\r\n type=\"Partnership\";\r\n break;\r\n\r\n\r\n default :\r\n //The default selection is RadioButton 1\r\n layout_Firm.setVisibility(View.GONE);\r\n layout_Firmno.setVisibility(View.GONE);\r\n type=\"Proprietorship\";\r\n break;\r\n }\r\n }", "protected Component getControlOwner() {\r\n return null;\r\n }", "private void setupRadioList() {\r\n // setup the \r\n final ExpandableListView listViewRadioList = (ExpandableListView) findViewById(android.R.id.list);\r\n listViewRadioList.setAdapter(mRadioCategoryAdapter);\r\n listViewRadioList.setOnChildClickListener(new OnChildClickListener() {\r\n\r\n @Override\r\n public boolean onChildClick(final ExpandableListView parent, final View v,\r\n final int groupPosition,\r\n final int childPosition, final long id) {\r\n Radio radio = mRadioCategoryAdapter.getChild(groupPosition, childPosition);\r\n\r\n mRadioPlayer.playRadio(RadioType.RADIO, radio.getId());\r\n setPlayerVisible(true);\r\n return true;\r\n }\r\n });\r\n }", "public ConversionHelper getParent()\n {\n return parent;\n }", "abstract public Container<?> getParent();", "protected abstract void createFieldEditors();", "private void onClickRadioButton() {\n radioGroupChoice.setOnCheckedChangeListener(this);\n }", "public void testSetParent() {\n GeneralizableElement mockParent = EasyMock.createMock(GeneralizableElement.class);\n instance.setParent(mockParent);\n assertSame(\"same value expected.\", mockParent, instance.getParent());\n\n mockParent = EasyMock.createMock(GeneralizableElement.class);\n instance.setParent(mockParent);\n assertSame(\"same value expected.\", mockParent, instance.getParent());\n }", "public Form createEditorForm(boolean realTimeLinkWithParent, boolean exclusiveLinkWithParent) {\n\t\tObject capsule = getCapsule();\n\t\tForm result = getSwingRenderer().createForm(capsule);\n\t\tsetupLinkWithParent(result, realTimeLinkWithParent, exclusiveLinkWithParent);\n\t\treturn result;\n\t}", "@Override\r\n\tpublic void setParent(Tag arg0) {\n\t}", "@Override\n\tpublic FormContainer getFormContainer() {\n\t\treturn null;\n\t}", "@Override\n\tpublic void onParentSet() {\n\t\t\n\t}", "protected Control createControl(Composite parent) {\n\t\treturn null;\n\t}", "public DrawingComposite getParent() {\n\t\treturn parent;\n\t}", "protected void forwardEditorFormModificationsToParentObject(final Form editorForm,\n\t\t\tboolean exclusiveLinkWithParent) {\n\t\tAccessor<Boolean> childModifAcceptedGetter = new Accessor<Boolean>() {\n\t\t\t@Override\n\t\t\tpublic Boolean get() {\n\t\t\t\treturn shouldIntegrateNewObjectValue(getCurrentValue());\n\t\t\t}\n\t\t};\n\t\tAccessor<ValueReturnMode> childValueReturnModeGetter = new Accessor<ValueReturnMode>() {\n\t\t\t@Override\n\t\t\tpublic ValueReturnMode get() {\n\t\t\t\treturn getReturnModeFromParent();\n\t\t\t}\n\t\t};\n\t\tAccessor<Boolean> childValueReplacedGetter = new Accessor<Boolean>() {\n\t\t\t@Override\n\t\t\tpublic Boolean get() {\n\t\t\t\treturn isValueReplaced();\n\t\t\t}\n\t\t};\n\t\tAccessor<Boolean> childValueTransactionExecutedGetter = Accessor.returning(false);\n\t\tAccessor<IModification> committingModifGetter = new Accessor<IModification>() {\n\t\t\t@Override\n\t\t\tpublic IModification get() {\n\t\t\t\tif (!canCommitToParent()) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\treturn createCommittingModification(getCurrentValue());\n\t\t\t}\n\t\t};\n\t\tAccessor<String> masterModifTitleGetter = new Accessor<String>() {\n\t\t\t@Override\n\t\t\tpublic String get() {\n\t\t\t\treturn getParentModificationTitle();\n\t\t\t}\n\t\t};\n\t\tAccessor<ModificationStack> masterModifStackGetter = new Accessor<ModificationStack>() {\n\t\t\t@Override\n\t\t\tpublic ModificationStack get() {\n\t\t\t\tModificationStack result = getParentModificationStack();\n\t\t\t\tif (result == null) {\n\t\t\t\t\tthrow new ReflectionUIError();\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t}\n\t\t};\n\t\tAccessor<Boolean> masterModifFakeGetter = new Accessor<Boolean>() {\n\t\t\t@Override\n\t\t\tpublic Boolean get() {\n\t\t\t\treturn isParentModificationFake();\n\t\t\t}\n\t\t};\n\t\tListener<Throwable> masterModificationExceptionListener = new Listener<Throwable>() {\n\t\t\t@Override\n\t\t\tpublic void handle(Throwable t) {\n\t\t\t\thandleRealtimeLinkCommitException(t);\n\t\t\t}\n\t\t};\n\t\teditorForm.setModificationStack(new SlaveModificationStack(editorForm.toString(), childModifAcceptedGetter,\n\t\t\t\tchildValueReturnModeGetter, childValueReplacedGetter, childValueTransactionExecutedGetter,\n\t\t\t\tcommittingModifGetter, masterModifTitleGetter, masterModifStackGetter, masterModifFakeGetter,\n\t\t\t\texclusiveLinkWithParent, ReflectionUIUtils.getDebugLogListener(getSwingRenderer().getReflectionUI()),\n\t\t\t\tReflectionUIUtils.getErrorLogListener(getSwingRenderer().getReflectionUI()),\n\t\t\t\tmasterModificationExceptionListener));\n\t}", "@Override public void layoutContainer(Container parent) {\n int nc = parent.getComponentCount();\n if (nc == 0) {\n return;\n }\n int width = parent.getWidth(); // - insets.left - insets.right;\n int height = parent.getHeight(); // - insets.left - insets.right;\n int x = 0; // insets.left; int y = insets.top;\n // for (int i = 0; i < nc; i++) {\n Component c = parent.getComponent(0); // = toolBox;\n c.setBounds(x, height - yy, width, c.getPreferredSize().height);\n // }\n }", "public abstract void setParent(UIComponent parent);" ]
[ "0.653358", "0.6381856", "0.62743634", "0.5990106", "0.58887154", "0.5727767", "0.57120097", "0.5703587", "0.56511146", "0.5562403", "0.55408525", "0.5538235", "0.54571944", "0.5422784", "0.5408032", "0.5360472", "0.53255415", "0.53146666", "0.5289325", "0.52547747", "0.5216031", "0.5195918", "0.5173547", "0.5125815", "0.5107525", "0.50847125", "0.5073552", "0.50481915", "0.50297624", "0.4989717", "0.49878404", "0.4962402", "0.49565446", "0.4932315", "0.4929916", "0.49222153", "0.49221075", "0.4916812", "0.49013236", "0.48930812", "0.48923486", "0.4880162", "0.4879171", "0.48676223", "0.48627353", "0.4858166", "0.48541746", "0.48528248", "0.48522016", "0.48280942", "0.4824748", "0.48194754", "0.48176652", "0.48166505", "0.48123246", "0.48115128", "0.48097363", "0.4805988", "0.47938412", "0.47850424", "0.47814798", "0.47570175", "0.47485426", "0.47419113", "0.4737817", "0.47355834", "0.4732488", "0.47121358", "0.47111058", "0.4707722", "0.47075492", "0.4695236", "0.46949077", "0.46866304", "0.46842515", "0.46736857", "0.46695256", "0.46523684", "0.46494505", "0.46490386", "0.46473458", "0.4646409", "0.4644893", "0.46442512", "0.4640976", "0.46322998", "0.4631088", "0.46303964", "0.46248606", "0.4624707", "0.46206647", "0.46181497", "0.461617", "0.4614636", "0.46116003", "0.46081102", "0.46076474", "0.46073624", "0.46071303", "0.46038526", "0.46000668" ]
0.0
-1
Note: for a RadioGroupFieldEditor, the Radio Box plays the role of fieldHolder, and that is created by the Radio Group. It appears to work to use the parent as the container of the field here. Composite fieldHolder = new Composite(parent, SWT.NONE); fieldHolder.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
public RadioGroupFieldEditor makeNewRadioGroupField( PreferencePage page, PreferencesTab tab, IPreferencesService service, String level, String name, String labelText, String toolTip, int numColumns, String[] values, String[] labels, Composite parent, boolean useGroup, boolean isEnabled, boolean isRemovable) { boolean onProjectLevelWithNullProject = level != null && level.equals(IPreferencesService.PROJECT_LEVEL) && service.getProject() == null; boolean notOnARealLevel = level == null; boolean onAFunctioningLevel = !onProjectLevelWithNullProject && !notOnARealLevel; RadioGroupFieldEditor field = new RadioGroupFieldEditor( page, tab, service, level, name, labelText, numColumns, values, labels, parent, useGroup); field.setToolTipText(toolTip); //Composite radioBoxControl = field.getRadioBoxControl(parent); //Composite radioBoxControlParent = field.getRadioBoxControl(parent).getParent(); if (!onProjectLevelWithNullProject) { setField(field, parent); addRadioGroupPropertyChangeListeners(service, level, field, name, parent); } else { //setField(field, parent); //addStringPropertyChangeListeners(service, level, field, key, fieldHolder); } // Set the enabled state // Assumes that RadioGroups use the Group representation for the button box; // if a Group is not used, then fill out the elxe branches below accordingly if (onProjectLevelWithNullProject || notOnARealLevel) { if (useGroup) { Group radioGroup = (Group) field.getRadioBoxControl(); radioGroup.setEnabled(false); } else { // do something else as appropriate to the representation } field.setEnabled(false, parent); } else if (onAFunctioningLevel) { if (useGroup) { Group radioGroup = (Group) field.getRadioBoxControl(); radioGroup.setEnabled(isEnabled); } else { // do something else as appropriate to the representation } field.setEnabled(isEnabled, parent); } if (level == null) field.setRemovable(false); // can never remove from a field that doesn't have a stored value else if (level.equals(IPreferencesService.DEFAULT_LEVEL)) field.setRemovable(false); // can never remove from Default level else field.setRemovable(isRemovable); return field; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String setField(RadioGroupFieldEditor field, Composite composite) {\n\n String level = field.getPreferencesLevel();\n\n // If the level is \"project\" and project == null then just set\n // the field here (as a special case).\n if (IPreferencesService.PROJECT_LEVEL.equals(level) && service.getProject() == null) {\n if (composite.isDisposed()) {\n System.err.println(\"PreferencesUtilities.setField(): composite is disposed\");\n }\n // Updating a radio field with a null value should\n // cause the first button to be selected\n field.setFieldValueFromOutside(null);\n if (!composite.isDisposed()) {\n // Assume that editability on the project level is set\n // appropriately by a project-selection listener\n //field.getTextControl(composite).setEditable(false);\n field.getRadioBoxControl().setBackground(colorBluish);\n Button[] radioButtons = field.getRadioButtons();\n if (radioButtons != null) {\n for (int i = 0; i < radioButtons.length; i++) {\n Button button = (Button) radioButtons[i];\n button.setBackground(colorBluish);\t\n }\n }\n }\n // Pretend that this was set at the project level?\n // (It was certainly cleared at that level)\n return IPreferencesService.PROJECT_LEVEL;\n }\n\n // Otherwise, we have a legitimate level, so set normally\n String levelFromWhichSet = field.loadWithInheritance();\n\n // Note: You can evidently load a field even when it's control\n // is disposed. In that case (evidently) you can change the\n // text in the field but not the background color.\t\n\n if (!composite.isDisposed()) {\n // Needed if color is set in loadWithInheritance()?\n // (Should the color be set in loadWithInheritance()?\n// if (field.isInherited()) {\n// field.getRadioBoxControl(composite).setBackground(colorBluish);\n// } else {\n// field.getRadioBoxControl(composite).setBackground(colorWhite);\n// }\n } else {\n // If composite.isDisposed(), then both field.getTextControl(composite)\n // and field.getTextControl() will return null; if needed, a text control\n // must be obtained from somewhere else--but I have no idea where that\n // might be. Not sure why composite.isDisposed() here in the first place,\n // especially considering that the field can be set\n }\n\n return levelFromWhichSet;\n }", "@Override\n\tprotected Control createContents(Composite parent) {\n\t\tfieldEditorParent = new Composite(parent, SWT.NULL);\n\t\tGridLayout layout = new GridLayout();\n\t\tlayout.numColumns = 1;\n\t\tlayout.marginHeight = 0;\n\t\tlayout.marginWidth = 0;\n\t\tfieldEditorParent.setLayout(layout);\n\t\tfieldEditorParent.setFont(parent.getFont());\n\n\t\tcreateFieldEditors();\n\n\t\tif (style == GRID) {\n\t\t\tadjustGridLayout();\n\t\t}\n\n\t\tinitialize();\n\t\tcheckState();\n\t\treturn fieldEditorParent;\n\t}", "public RadioGroupField addRadioGroupField(final String key, final Object[] options) {\n String label = key;\n RadioGroupField groupField = new RadioGroupField(getComposite(), _form, key, label, false);\n groupField.adapt(_formToolkit);\n _form.mapField(key, groupField);\n groupField.addButtons(options);\n return groupField;\n }", "public String setField(ComboFieldEditor field, Composite parent) {\n\n String level = field.getPreferencesLevel();\n\t\t\n // If the level is \"project\" and project == null then just set\n // the field here (as a special case).\n if (IPreferencesService.PROJECT_LEVEL.equals(level) && service.getProject() == null) {\n if (parent.isDisposed()) {\n System.err.println(\"PreferencesUtilities.setField(): composite is disposed\");\n }\n // Updating a radio field with a null value should\n // cause the first button to be selected\n field.setFieldValueFromOutside(null);\n if (!parent.isDisposed()) {\n // Assume that editability on the project level is set\n // appropriately by a project-selection listener\n //field.getTextControl(composite).setEditable(false);\n field.getComboBoxControl().setBackground(colorWhite);\n Control[] children = field.getComboBoxControl().getChildren();\n if (children != null) {\n for (int i = 0; i < children.length; i++) {\n Button button = (Button) children[i];\n button.setBackground(PreferencesUtilities.colorWhite);\t\n }\n }\n }\n // Pretend that this was set at the project level?\n // (It was certainly cleared at that level)\n return IPreferencesService.PROJECT_LEVEL;\n }\n\n // Otherwise, we have a legitimate level, so set normally\n String levelFromWhichSet = field.loadWithInheritance();\n\n // Note: You can evidently load a field even when it's control\n // is disposed. In that case you can (evidently) change the\n // text in the field but not the background color.\t\n\n if (!parent.isDisposed()) {\n // Needed if color is set in loadWithInheritance()?\n // (Should the color be set in loadWithInheritance()?\n// if (field.isInherited()) {\n// field.getComboBoxControl(composite).setBackground(colorBluish);\n// } else {\n// field.getComboBoxControl(composite).setBackground(colorWhite);\n// }\n } else {\n // If composite.isDisposed(), then both field.getTextControl(composite)\n // and field.getTextControl() will return null; if needed, a text control\n // must be obtained from somewhere else--but I have no idea where that\n // might be. Not sure why composite.isDisposed() here in the first place,\n // especially considering that the field can be set\n }\n\n return levelFromWhichSet;\n }", "protected Composite getFieldEditorParent() {\n\t\tif (style == FLAT) {\n\t\t\t// Create a new parent for each field editor\n\t\t\tComposite parent = new Composite(fieldEditorParent, SWT.NULL);\n\t\t\tparent.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n\t\t\treturn parent;\n\t\t}\n\t\t// Just return the parent\n\t\treturn fieldEditorParent;\n\t}", "void onChange_placeholder_xjal(ShapeRadioButtonGroup oldValue) {}", "public void createFieldEditors() {\t\t\n\t\t\n//\t\taddField(new DirectoryFieldEditor(PreferenceConstants.P_PATH, \n//\t\t\t\tMessages.UMAPPreferencePage_1, getFieldEditorParent()));\n\t\tgroup = new Group(getFieldEditorParent(), SWT.SHADOW_ETCHED_IN);\n\t\tgroup.setText(Messages.UMAPPreferencesHeader);\n\t\tgroup.setLayout(new GridLayout());\n\t\tGridData gd = new GridData(GridData.FILL_HORIZONTAL);\n\t\tgd.horizontalSpan = 1;\n\t\tgroup.setLayoutData(gd);\t\t\n\t\t\n//\t\tgroup2 = new Group(getFieldEditorParent(), SWT.SHADOW_ETCHED_IN);\n//\t\tgroup2.setText(Messages.UmapStringButtonFieldEditor_0);\n//\t\tgd.horizontalSpan = 2;\n//\t\tgroup2.setLayoutData(gd);\n//\t\tgroup2.setLayout(new GridLayout());\n\t\t\n\t\t\n\t\tvalidation = new BooleanFieldEditor( PreferenceConstants.P_BOOLEAN,\tMessages.UMAPPreferencePage_2, group);\n\t\taddField( validation );\n\n\t\tclassAbreviation = new StringFieldEditor(PreferenceConstants.P_CLASS_NAME, Messages.UMAPPreferencePage_3, group);\n\t\tclassAbreviation.setEmptyStringAllowed(false);\n\t\tclassAbreviation.setEnabled(Activator.getDefault().getPreferenceStore().getBoolean(PreferenceConstants.P_BOOLEAN), group);\n\t\t\n\t\tintfAbreviation = new StringFieldEditor(PreferenceConstants.P_INTF_NAME, Messages.UMAPPreferencePage_4, group);\n\t\tintfAbreviation.setEmptyStringAllowed(false);\n\t\tintfAbreviation.setEnabled(Activator.getDefault().getPreferenceStore().getBoolean(PreferenceConstants.P_BOOLEAN), group);\n\t\t\n\t\texcAbreviation = new StringFieldEditor(PreferenceConstants.P_EXCP_NAME, Messages.UMAPPreferencePage_5, group);\n\t\texcAbreviation.setEmptyStringAllowed(false);\n\t\texcAbreviation.setEnabled(Activator.getDefault().getPreferenceStore().getBoolean(PreferenceConstants.P_BOOLEAN), group);\n\t\t\n\t\t\n//\t\tprojectAbbreviation = new StringFieldEditor(PreferenceConstants.P_PROJ_NAME, Messages.UMAPPreferencePage_6, group);\n//\t\tprojectAbbreviation.setEmptyStringAllowed(true);\n\n//\t\tStringFieldEditor name = new StringFieldEditor(PreferenceConstants.P_USER_NAME, Messages.UmapStringButtonFieldEditor_2, group2);\n//\t\t\n//\t\tStringFieldEditor pass = new StringFieldEditor(PreferenceConstants.P_PWD, Messages.UmapStringButtonFieldEditor_3, group2);\n\t\t\n//\t\tURIStringButtonFieldEditor button = new URIStringButtonFieldEditor(PreferenceConstants.P_URI, Messages.UmapStringButtonFieldEditor_1, group2);\n\t\t\n//\t\taddField(name);\n//\t\taddField(pass);\n//\t\taddField(button);\n\t\t\n\t\taddField( classAbreviation );\n\t\taddField( intfAbreviation );\n\t\taddField( excAbreviation );\n//\t\taddField( projectAbbreviation );\t\t\n\t}", "@Override\n\tprotected Button createRadioButton(Composite parent, String label) {\n\t\treturn super.createRadioButton(parent, label);\t\n\t}", "private void setupFieldRows(GridPane mergePanel) {\n int row = 2;\n for (Field field : allFields) {\n Label label = new Label(field.getDisplayName());\n label.setMinWidth(USE_PREF_SIZE);\n mergePanel.add(label, 0, row);\n Optional<String> leftString = leftEntry.getField(field);\n Optional<String> rightString = rightEntry.getField(field);\n if (leftString.equals(rightString)) {\n identicalFields.add(field);\n } else {\n differentFields.add(field);\n }\n\n // Left text pane\n if (leftString.isPresent()) {\n TextFlow tf = new DiffHighlightingTextPane();\n mergePanel.add(tf, 1, row);\n leftTextPanes.put(field, tf);\n }\n\n // Add radio buttons if the two entries do not have identical fields\n if (identicalFields.contains(field)) {\n mergedEntry.setField(field, leftString.get()); // Will only happen if both entries have the field and the content is identical\n } else {\n ToggleGroup group = new ToggleGroup();\n List<RadioButton> list = new ArrayList<>(3);\n for (int k = 0; k < 3; k++) {\n RadioButton button = new RadioButton();\n EasyBind.subscribe(button.selectedProperty(), selected -> updateMergedEntry());\n group.getToggles().add(button);\n mergePanel.add(button, 2 + k, row);\n list.add(button);\n }\n radioButtons.put(field, list);\n if (leftString.isPresent()) {\n leftRadioButtons.add(list.get(LEFT_RADIOBUTTON_INDEX));\n list.get(LEFT_RADIOBUTTON_INDEX).setSelected(true);\n if (!rightString.isPresent()) {\n list.get(RIGHT_RADIOBUTTON_INDEX).setDisable(true);\n } else if (this.defaultRadioButtonSelectionMode == DefaultRadioButtonSelectionMode.RIGHT) {\n list.get(RIGHT_RADIOBUTTON_INDEX).setSelected(true);\n rightRadioButtons.add(list.get(RIGHT_RADIOBUTTON_INDEX));\n } else {\n rightRadioButtons.add(list.get(RIGHT_RADIOBUTTON_INDEX));\n }\n } else {\n list.get(LEFT_RADIOBUTTON_INDEX).setDisable(true);\n list.get(RIGHT_RADIOBUTTON_INDEX).setSelected(true);\n rightRadioButtons.add(list.get(RIGHT_RADIOBUTTON_INDEX));\n }\n }\n\n // Right text pane\n if (rightString.isPresent()) {\n TextFlow tf = new DiffHighlightingTextPane();\n mergePanel.add(tf, 5, row);\n rightTextPanes.put(field, tf);\n }\n row++;\n }\n }", "public interface HRadioButton extends InputElement, Checkable, Requireable {\r\n\r\n\t@Override\r\n\tTagInputRadio getTagType();\r\n\r\n\t@Override\r\n\tdefault InputType getInputType() {\r\n\t\treturn InputType.RADIO;\r\n\t}\r\n\r\n\t/**\r\n\t * @return the radio button group\r\n\t */\r\n\tRadioButtonGroup getRadioButtonGroup();\r\n\r\n}", "public String setField(ColorFieldEditor field, Composite parent)\n {\n\n String level = field.getPreferencesLevel();\n\n // If the level is \"project\" and project == null then just set\n // the field here (as a special case).\n // Note: without some project selected the field should not be\n // editable. Field will have to be set back to editable when\n // (and probably where) a project is selected. We might take\n // care of this elsewhere but, until that is verified, keep\n // doing it here.\n // Note also: loadWithInheritance (which calls setField(..))\n // won't know that project == null and will try to set the field\n // from some higher level\n if (IPreferencesService.PROJECT_LEVEL.equals(level) && service.getProject() == null)\n {\n if (parent == null) {\n System.err.println(\"PreferencesUtilities.setField(): parent is null\");\n } \n if (parent.isDisposed()) {\n System.err.println(\"PreferencesUtilities.setField(): parent is disposed\");\n } \n field.setFieldValueFromOutside(null);\n if (!parent.isDisposed()) {\n field.getColorSelector().setEnabled(false);\n // TODO RMF 1/10/2009 - The change control probably isn't the control whose color we ought to change...\n field.getLabelControl(parent).setBackground(colorBluish);\n }\n // Pretend that this was set at the project level?\n // (It was certainly cleared at that level)\n return IPreferencesService.PROJECT_LEVEL;\n }\n\n // Otherwise, we have a legitimate level, so set normally\n String levelFromWhichSet = field.loadWithInheritance();\n\n // Note: You can evidently load a field even when its control\n // is disposed. In that case (evidently) you can change the\n // text in the field but not the background color. \n\n if (parent != null && !parent.isDisposed()) {\n // TODO RMF 1/10/2009 - The change control probably isn't the control whose color we ought to change...\n if (level != null && level.equals(levelFromWhichSet)) {\n field.getLabelControl(parent).setBackground(colorWhite);\n } else if (level != null && field.getLabelControl(parent).getEnabled()) {\n field.getLabelControl(parent).setBackground(colorBluish);\n }\n } else {\n // If composite.isDisposed(), then both field.getTextControl(composite)\n // and field.getTextControl() will return null; if needed, a text control\n // must be obtained from somewhere else--but I have no idea where that\n // might be. Not sure why composite.isDisposed() here in the first place,\n // especially considering that the field can be set\n }\n\n return levelFromWhichSet;\n }", "@Override\n\tpublic void createPartControl(final Composite parent) {\n\t\t\n\t\tComposite canvas = new Composite(parent, SWT.NONE);\n\t\tGridData gridData;\n\t\t\n\t\tGridLayout gridLayout = new GridLayout();\n\t\tgridLayout.numColumns = 2;\n\t\tcanvas.setLayout(gridLayout);\n\t\t\n\t\t//Sets up the ability for this view to get selection events from all views\n\t\tgetSite().getPage().addSelectionListener(this);\n\t\t\n\t\t//GalleryTreeViewer\n\n\t\tgallery = new GalleryViewer(canvas, SWT.V_SCROLL | SWT.VIRTUAL);\n\t\tgridData = new GridData(SWT.FILL, SWT.FILL, true, true);\n\t\tgridData.horizontalSpan = 2;\n\t\tgallery.setLayoutData(gridData);\n\t\t\n\t\tAbstractGridGroupRenderer gr = new NoGroupRenderer();//DefaultGalleryGroupRenderer();\n\t\t//gr.setMinMargin(2);\n\t\tgr.setItemHeight(64);\n\t\tgr.setItemWidth(84);\n\t\t//gr.setAutoMargin(true);\n\t\tgallery.setGroupRenderer(gr);\n\t\tgallery.setAntialias(SWT.OFF);\n\t\t//gallery.setLowQualityOnUserAction(true);\n\t\t//gallery.setHigherQualityDelay(500);\n\t\tgallery.setInterpolation(SWT.NONE);\n\t\t\n\t\tDefaultGalleryItemRenderer ir = new CustomItemRenderer();//DefaultGalleryItemRenderer();\n\t\tir.setShowLabels(true);\n\t\tir.setDropShadows(true);\n\t\tir.setDropShadowsSize(2);\n\t\tgallery.setItemRenderer(ir);\n\t\t\n\t\t//gallery.setDefaultRenderers();\n\n\t\t// SetData is called when Gallery creates an item.\n\t\tgallery.addListener(SWT.SetData, new Listener() {\n\t\t\tpublic void handleEvent(Event event) {\n\t\t\t\tGalleryItem item = (GalleryItem) event.item;\n\t\t\t\tif (item.getParentItem() == null) {\n\t\t\t\t\t// It's a group\n\t\t\t\t\tint index = gallery.indexOf(item);\n\t\t\t\t\tif (index >= 0 && index < ResourceTypes.TYPES.length) {\n\t\t\t\t\t\t// This is group 1\n\t\t\t\t\t\titem.setText(ResourceTypes.TYPES[index]);\n\t\t\t\t\t\titem.setItemCount(pakManager.getFileCount(ResourceTypes.TYPES[index]));\n\t\t\t\t\t\titem.setExpanded(true);\n\t\t\t\t\t} \n\t\t\t\t\telse {\n\t\t\t\t\t\t// Should never be used\n\t\t\t\t\t\titem.setItemCount(0);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// It's an item\n\t\t\t\t\tGalleryItem parentItem = item.getParentItem();\n\n\t\t\t\t\t// Get item index\n\t\t\t\t\tint index = parentItem.indexOf(item);\n\t\t\t\t\t\n\t\t\t\t\tFile resourceFile = pakManager.getFilesByType(parentItem.getText(), index);\n\t\t\t\t\t\n\t\t\t\t\tResource resource = CacheManager.getInstance().getResource(resourceFile);\n\t\t\t\t\t\n\t\t\t\t\titem.setText(resource.getResourceName());\n\n\t\t\t\t\tImage img = map.get(resource.getFile().getAbsolutePath());\n\t\t\t\t\tif(img == null){\n\t\t\t\t\t\timg = new Image(parent.getDisplay(), resource.getImageData());\n\t\t\t\t\t\tmap.put(resource.getFile().getAbsolutePath(), img);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\titem.setImage(img);\n\t\t\t\t\titem.setData(resourceFile);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tfinal Scale scale = new Scale(canvas, SWT.NONE);\n\t\tscale.setMinimum(2);\n\t\tscale.setMaximum(9);\n\t\tscale.setIncrement(1);\n\t\tgridData = new GridData(SWT.FILL, SWT.CENTER, true, false);\n\t\tscale.setLayoutData(gridData);\n\t\tscale.addSelectionListener(new SelectionListener(){\n\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tAbstractGridGroupRenderer gr = (AbstractGridGroupRenderer) gallery.getGroupRenderer();\n\t\t\t\tgr.setItemSize(32 * scale.getSelection()+ 10, 32 * scale.getSelection());\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tscale.setSelection(9);\n\t\tgr.setItemSize(32 * scale.getSelection()+ 10, 32 * scale.getSelection());\n\t}", "private void updateRadioGroup(String name){\n radioGroup = findViewById(R.id.radioGroup);\n RadioButton rb = new RadioButton(getApplicationContext());\n rb.setText(name);\n rb.setTextColor(Color.BLACK);\n radioGroup.addView(rb);\n }", "public void createControl(Composite parent) {\r\n\t\tComposite container = new Composite(parent, SWT.NONE);\r\n\t\tsetControl(container);\r\n\t\tGroup group = new Group(container, SWT.NONE);\r\n\t\tgroup.setBounds(0, 281, 533, 60);\r\n\t\t\r\n\t\tLabel lblSelectWhetherYou = new Label(group, SWT.NONE);\r\n\t\tlblSelectWhetherYou.setBounds(10, 22, 374, 26);\r\n\t\tlblSelectWhetherYou.setText(\"\\u9009\\u62E9\\u662F\\u5426\\u8981\\u53D1\\u5E03\\u3001\\u68C0\\u7D22\\u6216\\u5220\\u9664\\u670D\\u52A1\\u5668\\u4E0A\\u7684\\u62A5\\u544A\\u3002\");\r\n\t\t\r\n\t\tlb_pr = new Label(container, SWT.NONE);\r\n\t\tlb_pr.setBounds(69, 79, 48, 48);\r\n\t\tlb_pr.setImage(SwtImageConverter.ConvertToSwtImage(ImageResolver.get_Resolver().ResolveImage(\"[IMAGE]Core#Images.Icons.ReportPublish.png\"),48,48));\r\n\t\t\r\n\t\trbtn_pr = new Button(container, SWT.RADIO);\r\n\t\trbtn_pr.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\r\n\t\t\t\tgetNextPage();\r\n\t\t\t}\r\n\t\t});\r\n\t\trbtn_pr.setBounds(59, 133, 69, 16);\r\n\t\trbtn_pr.setText(\"\\u53D1\\u5E03\\u62A5\\u544A\");\r\n\t\trbtn_pr.setData(\"PublishedReportW2_Pub\");\r\n\t\t\r\n\t\tlb_rr = new Label(container, SWT.NONE);\r\n\t\tlb_rr.setBounds(185, 79, 48, 48);\r\n\t\tlb_rr.setImage(SwtImageConverter.ConvertToSwtImage(ImageResolver.get_Resolver().ResolveImage(\"[IMAGE]Core#Images.Icons.ReportRetrieve.png\"),48,48));\r\n\t\t\r\n\t\t\r\n\t\trbtn_rr = new Button(container, SWT.RADIO);\r\n\t\trbtn_rr.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\r\n\t\t\t\tgetNextPage();\r\n\t\t\t}\r\n\t\t});\r\n\t\trbtn_rr.setBounds(175, 133, 69, 16);\r\n\t\trbtn_rr.setText(\"\\u68C0\\u7D22\\u62A5\\u544A\");//»ρΘ‘\\u68C0\\u7D22\\\r\n\t\trbtn_rr.setData(\"PublishedReportW2_Ret\");\r\n\t\t\r\n\t\tlb_dr = new Label(container, SWT.NONE);\r\n\t\tlb_dr.setBounds(297, 79, 48, 48);\r\n\t\tlb_dr.setImage(SwtImageConverter.ConvertToSwtImage(ImageResolver.get_Resolver().ResolveImage(\"[IMAGE]Core#Images.Icons.ReportDelete.png\"),48,48));\r\n\t\t\r\n\t\t\r\n\t\trbtn_dr = new Button(container, SWT.RADIO);\r\n\t\trbtn_dr.addMouseListener(new MouseAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\r\n\t\t\t\tgetNextPage();\r\n\t\t\t}\r\n\t\t});\r\n\t\trbtn_dr.setBounds(287, 133, 69, 16);\r\n\t\trbtn_dr.setText(\"\\u5220\\u9664\\u62A5\\u544A\");\r\n\t\trbtn_dr.setData(\"PublishedReportW2_Del\");\r\n\t\t\r\n\t}", "public void set_placeholder(ShapeRadioButtonGroup placeholder)\n/* 42: */ {\n/* 43: 73 */ if (placeholder == this.placeholder) {\n/* 44: 74 */ return;\n/* 45: */ }\n/* 46: 76 */ ShapeRadioButtonGroup _oldValue_xjal = this.placeholder;\n/* 47: 77 */ this.placeholder = placeholder;\n/* 48: 78 */ onChange_placeholder_xjal(_oldValue_xjal);\n/* 49: 79 */ onChange();\n/* 50: */ }", "public String setField(BooleanFieldEditor field, Composite parent) {\n\n String level = field.getPreferencesLevel();\n\t\t\n // If the level is \"project\" and project == null then just set\n // the field here (as a special case).\n // Note: without some project selected the field should not be\n // editable. Field will have to be set back to editable when\n // (and probably where) a project is selected. We might take\n // care of this elsewhere but, until that is verified, keep\n // doing it here.\n // Note also: loadWithInheritance (which calls setField(..))\n // won't know that project == null and will try to set the field\n // from some higher level\n if (IPreferencesService.PROJECT_LEVEL.equals(level) && service.getProject() == null) {\n if (parent == null) {\n System.err.println(\"PreferencesUtilities.setField(): parent is null\");\n }\t\n if (parent.isDisposed()) {\n System.err.println(\"PreferencesUtilities.setField(): parent is disposed\");\n }\n // Don't have a null boolean value to set field to,\n // but would like to show it as \"cleared\" somehow\n // (presumably \"false\" shows as empty\n field.setFieldValueFromOutside(false);\n if (!parent.isDisposed()) {\n field.getChangeControl().setEnabled(false);\n field.getChangeControl().setBackground(colorBluish);\n }\n // Pretend that this was set at the project level?\n // (It was certainly cleared at that level)\n return IPreferencesService.PROJECT_LEVEL;\n }\n\n // Otherwise, we have a legitimate level, so set normally\n String levelFromWhichSet = field.loadWithInheritance();\n\n // Note: You can evidently load a field even when its control\n // is disposed. In that case (evidently) you can change the\n // text in the field but not the background color.\t\n\n if (parent != null && !parent.isDisposed()) {\n if (level != null && level.equals(levelFromWhichSet)) {\n field.getChangeControl().setBackground(colorWhite);\n } else if (level != null && field.getChangeControl().getEnabled()) {\n field.getChangeControl().setBackground(colorBluish);\n }\n } else {\n // If composite.isDisposed(), then both field.getTextControl(composite)\n // and field.getTextControl() will return null; if needed, a text control\n // must be obtained from somewhere else--but I have no idea where that\n // might be. Not sure why composite.isDisposed() here in the first place,\n // especially considering that the field can be set\n }\n\n return levelFromWhichSet;\n }", "@Override\r\n protected Control createDialogArea(Composite parent) {\r\n Composite area = (Composite) super.createDialogArea(parent);\r\n container = createContainer(area);\r\n createField(container);\r\n return area;\r\n }", "public String setField(FontFieldEditor field, Composite parent) {\n\n String level = field.getPreferencesLevel();\n\n // If the level is \"project\" and project == null then just set\n // the field here (as a special case).\n // Note: without some project selected the field should not be\n // editable. Field will have to be set back to editable when\n // (and probably where) a project is selected. We might take\n // care of this elsewhere but, until that is verified, keep\n // doing it here.\n // Note also: loadWithInheritance (which calls setField(..))\n // won't know that project == null and will try to set the field\n // from some higher level\n if (IPreferencesService.PROJECT_LEVEL.equals(level) &&\n service.getProject() == null)\n {\n if (parent == null) {\n System.err.println(\"PreferencesUtilities.setField(): parent is null\");\n } \n if (parent.isDisposed()) {\n System.err.println(\"PreferencesUtilities.setField(): parent is disposed\");\n } \n field.setFieldValueFromOutside(null);\n if (!parent.isDisposed()) {\n field.getChangeControl().setEnabled(false);\n // TODO RMF 1/10/2009 - The change control probably isn't the control whose color we ought to change...\n field.getChangeControl().setBackground(colorBluish);\n }\n // Pretend that this was set at the project level?\n // (It was certainly cleared at that level)\n return IPreferencesService.PROJECT_LEVEL;\n }\n\n // Otherwise, we have a legitimate level, so set normally\n String levelFromWhichSet = field.loadWithInheritance();\n\n // Note: You can evidently load a field even when its control\n // is disposed. In that case (evidently) you can change the\n // text in the field but not the background color. \n\n if (parent != null && !parent.isDisposed()) {\n // TODO RMF 1/10/2009 - The change control probably isn't the control whose color we ought to change...\n if (level != null && level.equals(levelFromWhichSet)) {\n field.getChangeControl().setBackground(colorWhite);\n } else if (level != null && field.getChangeControl().getEnabled()) {\n field.getChangeControl().setBackground(colorBluish);\n }\n } else {\n // If composite.isDisposed(), then both field.getTextControl(composite)\n // and field.getTextControl() will return null; if needed, a text control\n // must be obtained from somewhere else--but I have no idea where that\n // might be. Not sure why composite.isDisposed() here in the first place,\n // especially considering that the field can be set\n }\n\n return levelFromWhichSet;\n }", "protected void createBrowseFilterGroup(Composite parent) {\n\t\tcheckButtonGroup = new Group(parent,SWT.SHADOW_ETCHED_IN);\r\n\t\tcheckButtonGroup.setText( Messages.BrowseSelectorDialog_4 );\r\n\t\t\r\n\t\tGridLayout layout = new GridLayout();\r\n\t\tlayout.makeColumnsEqualWidth = true;\t\t\r\n\t\tlayout.numColumns = 3;\t\t\r\n\t\tcheckButtonGroup.setLayout(layout);\r\n\t\tGridData data = new GridData(); \r\n\t data.grabExcessVerticalSpace = false;\r\n\t data.grabExcessHorizontalSpace = true;\r\n\t data.horizontalAlignment = GridData.FILL;\r\n\t data.verticalAlignment = GridData.FILL;\r\n\t checkButtonGroup.setLayoutData(data);\r\n\t\r\n\t createBrowseFilterGroupButtons ( checkButtonGroup );\r\n\t}", "public RadioGroupField addRadioGroupField(final Property property, final Object[] options) {\n return addRadioGroupField(property.getKey(), options);\n }", "@Override\r\n\tpublic void createPartControl(final Composite parent) {\r\n\t\t// Create the parent component\r\n\t\ttoolkit = new FormToolkit(Display.getDefault());\r\n\t\tform = toolkit.createForm(parent);\r\n\t\tform.setText(\"Vormerkungen\");\r\n\t\ttoolkit.decorateFormHeading(form);\r\n\r\n\t\tfinal Composite composite = form.getBody();\r\n\t\tcomposite.setLayout(new FillLayout());\r\n\r\n\t\tSashForm sash_prebooking = new SashForm(composite, SWT.HORIZONTAL);\r\n\r\n\t\t// groups-----------------------------------\r\n\t\tfinal SashForm sashForm_8 = new SashForm(sash_prebooking, SWT.VERTICAL);\r\n\r\n\t\tfinal Group richtungBruckGroup = new Group(sashForm_8, SWT.NONE);\r\n\t\trichtungBruckGroup.setLayout(new FillLayout());\r\n\t\trichtungBruckGroup.setForeground(CustomColors.COLOR_RED);\r\n\t\trichtungBruckGroup.setText(\"Richtung Bruck\");\r\n\r\n\t\tfinal SashForm sashForm_7 = new SashForm(sashForm_8, SWT.VERTICAL);\r\n\r\n\t\tfinal Group richtungKapfenbergGroup = new Group(sashForm_7, SWT.NONE);\r\n\t\trichtungKapfenbergGroup.setLayout(new FillLayout());\r\n\t\trichtungKapfenbergGroup.setText(\"Richtung Kapfenberg\");\r\n\r\n\t\tfinal Group richtungMariazellGroup = new Group(sashForm_7, SWT.NONE);\r\n\t\trichtungMariazellGroup.setLayout(new FillLayout());\r\n\t\trichtungMariazellGroup.setText(\"Richtung Mariazell\");\r\n\r\n\t\t// ----------------------------------------------\r\n\t\tfinal SashForm sashForm_9 = new SashForm(sash_prebooking, SWT.VERTICAL);\r\n\r\n\t\tfinal Group richtungGrazGroup = new Group(sashForm_9, SWT.NONE);\r\n\t\trichtungGrazGroup.setLayout(new FillLayout());\r\n\t\trichtungGrazGroup.setText(\"Richtung Graz\");\r\n\r\n\t\tfinal SashForm sashForm_1 = new SashForm(sashForm_9, SWT.VERTICAL);\r\n\r\n\t\tfinal Group richtungLeobenGroup = new Group(sashForm_1, SWT.NONE);\r\n\t\trichtungLeobenGroup.setLayout(new FillLayout());\r\n\t\trichtungLeobenGroup.setText(\"Richtung Leoben\");\r\n\r\n\t\tfinal Group richtungWienGroup = new Group(sashForm_1, SWT.NONE);\r\n\t\trichtungWienGroup.setLayout(new FillLayout());\r\n\t\trichtungWienGroup.setText(\"Richtung Wien\");\r\n\r\n\t\t// viewers\r\n\t\tviewerLeoben = createTableViewer(richtungLeobenGroup);\r\n\t\tviewerGraz = createTableViewer(richtungGrazGroup);\r\n\t\tviewerKapfenberg = createTableViewer(richtungKapfenbergGroup);\r\n\t\tviewerBruck = createTableViewer(richtungBruckGroup);\r\n\t\tviewerWien = createTableViewer(richtungWienGroup);\r\n\t\tviewerMariazell = createTableViewer(richtungMariazellGroup);\r\n\r\n\t\t// create the tooltip\r\n\t\ttooltipLeoben = new JournalViewTooltip(viewerLeoben.getControl());\r\n\t\ttooltipGraz = new JournalViewTooltip(viewerGraz.getControl());\r\n\t\ttooltipKapfenberg = new JournalViewTooltip(viewerKapfenberg.getControl());\r\n\t\ttooltipBruck = new JournalViewTooltip(viewerBruck.getControl());\r\n\t\ttooltipWien = new JournalViewTooltip(viewerWien.getControl());\r\n\t\ttooltipMariazell = new JournalViewTooltip(viewerMariazell.getControl());\r\n\r\n\t\t// show the tool tip when the selection has changed\r\n\t\tviewerLeoben.addSelectionChangedListener(createTooltipListener(viewerLeoben, tooltipLeoben));\r\n\t\tviewerGraz.addSelectionChangedListener(createTooltipListener(viewerGraz, tooltipGraz));\r\n\t\tviewerKapfenberg.addSelectionChangedListener(createTooltipListener(viewerKapfenberg, tooltipKapfenberg));\r\n\t\tviewerBruck.addSelectionChangedListener(createTooltipListener(viewerBruck, tooltipBruck));\r\n\t\tviewerWien.addSelectionChangedListener(createTooltipListener(viewerWien, tooltipWien));\r\n\t\tviewerMariazell.addSelectionChangedListener(createTooltipListener(viewerMariazell, tooltipMariazell));\r\n\r\n\t\t// sort the table by default\r\n\t\tviewerLeoben.setSorter(new TransportSorter(TransportSorter.ABF_SORTER, SWT.DOWN));\r\n\t\tviewerGraz.setSorter(new TransportSorter(TransportSorter.ABF_SORTER, SWT.DOWN));\r\n\t\tviewerKapfenberg.setSorter(new TransportSorter(TransportSorter.ABF_SORTER, SWT.DOWN));\r\n\t\tviewerBruck.setSorter(new TransportSorter(TransportSorter.ABF_SORTER, SWT.DOWN));\r\n\t\tviewerWien.setSorter(new TransportSorter(TransportSorter.ABF_SORTER, SWT.DOWN));\r\n\t\tviewerMariazell.setSorter(new TransportSorter(TransportSorter.ABF_SORTER, SWT.DOWN));\r\n\r\n\t\tmakeActionsBruck(viewerBruck);\r\n\t\tmakeActionsKapfenberg(viewerKapfenberg);\r\n\t\tmakeActionsLeoben(viewerLeoben);\r\n\t\tmakeActionsMariazell(viewerMariazell);\r\n\t\tmakeActionsGraz(viewerGraz);\r\n\t\tmakeActionsWien(viewerWien);\r\n\r\n\t\thookContextMenuLeoben(viewerLeoben);\r\n\t\thookContextMenuGraz(viewerGraz);\r\n\t\thookContextMenuWien(viewerWien);\r\n\t\thookContextMenuMariazell(viewerMariazell);\r\n\t\thookContextMenuBruck(viewerBruck);\r\n\t\thookContextMenuKapfenberg(viewerKapfenberg);\r\n\r\n\t\t// add the form actions\r\n\t\tcreateToolBarActions();\r\n\r\n\t\t// apply the filters\r\n\t\tapplyFilters();\r\n\r\n\t\t// register listeners to keep in track\r\n\t\tNetWrapper.registerListener(this, Transport.class);\r\n\t\tUiWrapper.getDefault().registerListener(this);\r\n\r\n\t\t// initialize the view with current data\r\n\t\tinitView();\r\n\t}", "private void setupEntryTypeRow(GridPane mergePanel) {\n int rowIndex = 1;\n mergePanel.add(new Label(Localization.lang(\"Entry type\")), 0, rowIndex);\n if (leftEntry.getType().equals(rightEntry.getType())) {\n mergePanel.add(DiffHighlighting.forUnchanged(leftEntry.getType().getDisplayName()), 1, rowIndex);\n mergePanel.add(DiffHighlighting.forUnchanged(rightEntry.getType().getDisplayName()), 5, rowIndex);\n identicalTypes = true;\n } else {\n mergePanel.add(DiffHighlighting.forChanged(leftEntry.getType().getDisplayName()), 1, rowIndex);\n mergePanel.add(DiffHighlighting.forChanged(rightEntry.getType().getDisplayName()), 5, rowIndex);\n identicalTypes = false;\n ToggleGroup group = new ToggleGroup();\n typeRadioButtons = new ArrayList<>(2);\n\n for (int k = 0; k < 3; k += 2) {\n RadioButton button = new RadioButton();\n EasyBind.subscribe(button.selectedProperty(), selected -> updateMergedEntry());\n typeRadioButtons.add(button);\n group.getToggles().add(button);\n mergePanel.add(button, 2 + k, rowIndex);\n }\n if (defaultRadioButtonSelectionMode == DefaultRadioButtonSelectionMode.RIGHT) {\n typeRadioButtons.get(1).setSelected(true); // This Radio Button list does not have a third option as compared to the fields, so do not use the constants here\n rightRadioButtons.add(typeRadioButtons.get(1));\n } else {\n typeRadioButtons.get(0).setSelected(true);\n leftRadioButtons.add(typeRadioButtons.get(0));\n }\n }\n }", "private JRadioButton getJRadioButtonButtWrap() {\r\n\t\t// if (buttWrap == null) {\r\n\t\tbuttWrap = new JRadioButton();\r\n\t\tbuttWrap.setText(\"Wrap\");\r\n\t\tbuttWrap.setToolTipText(\"filling borders with copies of the whole image\");\r\n\t\tbuttWrap.addActionListener(this);\r\n\t\tbuttWrap.setActionCommand(\"parameter\");\r\n\t\t// }\r\n\t\treturn buttWrap;\r\n\t}", "public void createControl(Composite parent) {\r\n \t\tinitializeDialogUnits(parent);\r\n \r\n \t\tComposite root = new Composite(parent, SWT.NONE);\r\n \t\tGridData gd = new GridData();\r\n \r\n \t\tgd.horizontalSpan = 1;\r\n \t\tgd.horizontalAlignment = GridData.FILL;\r\n \t\tgd.grabExcessHorizontalSpace = true;\r\n \t\tgd.grabExcessVerticalSpace = false;\r\n \r\n \t\tGridLayout gridLayout = new GridLayout(1, false);\r\n \t\troot.setLayout(gridLayout);\r\n \t\tGroup generalGroup = new Group(root, SWT.NONE);\r\n \t\tgeneralGroup.setLayoutData(gd);\r\n \t\tgeneralGroup.setText(SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_GENERAL);\r\n \t\tgridLayout = new GridLayout(3, false);\r\n \r\n \t\tgeneralGroup.setLayout(gridLayout);\r\n \t\tregisterEditor(jBossSeamHomeEditor, generalGroup, 3);\r\n \t\tregisterEditor(jBossAsDeployAsEditor, generalGroup, 3);\r\n \r\n \t\tgd = new GridData();\r\n \t\tgd.horizontalSpan = 1;\r\n \t\tgd.horizontalAlignment = GridData.FILL;\r\n \t\tgd.grabExcessHorizontalSpace = true;\r\n \t\tgd.grabExcessVerticalSpace = false;\r\n \r\n \t\tGroup databaseGroup = new Group(root, SWT.NONE);\r\n \t\tdatabaseGroup.setLayoutData(gd);\r\n \t\tdatabaseGroup.setText(SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_DATABASE);\r\n \t\tgridLayout = new GridLayout(4, false);\r\n \t\tdatabaseGroup.setLayout(gridLayout);\r\n \t\tregisterEditor(jBossHibernateDbTypeEditor, databaseGroup, 4);\r\n \t\tregisterEditor(connProfileSelEditor, databaseGroup, 4);\r\n \t\tregisterEditor(dbSchemaName, databaseGroup, 4);\r\n \t\tregisterEditor(dbCatalogName, databaseGroup, 4);\r\n \t\tregisterEditor(dbTablesExists, databaseGroup, 4);\r\n \t\tregisterEditor(recreateTablesOnDeploy, databaseGroup, 4);\r\n \t\t// registerEditor(pathToJdbcDriverJar,databaseGroup, 4);\r\n \r\n \t\tGroup generationGroup = new Group(root, SWT.NONE);\r\n \t\tgd = new GridData();\r\n \t\tgd.horizontalSpan = 1;\r\n \t\tgd.horizontalAlignment = GridData.FILL;\r\n \t\tgd.grabExcessHorizontalSpace = true;\r\n \t\tgd.grabExcessVerticalSpace = false;\r\n \r\n \t\tgenerationGroup.setLayoutData(gd);\r\n \t\tgenerationGroup.setText(SeamUIMessages.SEAM_INSTALL_WIZARD_PAGE_CODE_GENERATION);\r\n \t\tgridLayout = new GridLayout(3, false);\r\n \t\tgenerationGroup.setLayout(gridLayout);\r\n \t\tregisterEditor(sessionBeanPkgNameditor, generationGroup, 3);\r\n \t\tregisterEditor(entityBeanPkgNameditor, generationGroup, 3);\r\n \t\tregisterEditor(testsPkgNameditor, generationGroup, 3);\r\n \r\n \t\tsetControl(root);\r\n \t\tNewProjectDataModelFacetWizard wizard = (NewProjectDataModelFacetWizard) getWizard();\r\n \r\n \t\tIDataModel model = wizard.getDataModel();\r\n \r\n \t\tif (validatorDelegate == null) {\r\n \t\t\tvalidatorDelegate = new DataModelValidatorDelegate(this.model, this);\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(jBossSeamHomeEditor\r\n \t\t\t\t\t.getName(),\r\n \t\t\t\t\tValidatorFactory.SEAM_RUNTIME_NAME_VALIDATOR);\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(connProfileSelEditor\r\n \t\t\t\t\t.getName(),\r\n \t\t\t\t\tValidatorFactory.CONNECTION_PROFILE_VALIDATOR);\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(testsPkgNameditor\r\n \t\t\t\t\t.getName(), new PackageNameValidator(testsPkgNameditor\r\n \t\t\t\t\t.getName(), \"tests\")); //$NON-NLS-1$\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(entityBeanPkgNameditor\r\n \t\t\t\t\t.getName(), new PackageNameValidator(entityBeanPkgNameditor\r\n \t\t\t\t\t.getName(), \"entity beans\")); //$NON-NLS-1$\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(sessionBeanPkgNameditor\r\n \t\t\t\t\t.getName(), new PackageNameValidator(\r\n \t\t\t\t\tsessionBeanPkgNameditor.getName(), \"session beans\")); //$NON-NLS-1$\r\n \t\t\tvalidatorDelegate.addValidatorForProperty(\r\n \t\t\t\t\tIFacetDataModelProperties.FACET_PROJECT_NAME, \r\n \t\t\t\t\tnew ProjectNamesDuplicationValidator(\r\n \t\t\t\t\t\t\tIFacetDataModelProperties.FACET_PROJECT_NAME));\r\n \t\t}\r\n \r\n \t\tjBossHibernateDbTypeEditor\r\n \t\t\t\t.addPropertyChangeListener(new PropertyChangeListener() {\r\n \t\t\t\t\tpublic void propertyChange(PropertyChangeEvent evt) {\r\n \t\t\t\t\t\tSeamInstallWizardPage.this.model.setProperty(ISeamFacetDataModelProperties.HIBERNATE_DIALECT,\r\n \t\t\t\t\t\tHIBERNATE_HELPER.getDialectClass(evt.getNewValue().toString()));\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t);\r\n \r\n\r\n\r\n Dialog.applyDialogFont(parent);\r\n \t}", "@Override\n public Element createDomImpl(Renderable element) {\n InputElement radioInputElement =\n Document.get().createRadioInputElement(\"xx\");\n radioInputElement.setClassName(CheckConstants.css.radio());\n radioInputElement.setTabIndex(0);\n return radioInputElement;\n }", "@Override\n\tprotected Control createControl(Composite parent) {\n\t\tthis.parent = parent;\n\t\t//return cellEditor.getControl();\n\t\treturn null; \n\t}", "private void createFieldsComp() {\n Composite fieldComp = new Composite(shell, SWT.NONE);\n GridLayout gl = new GridLayout(2, false);\n GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);\n fieldComp.setLayout(gl);\n fieldComp.setLayoutData(gd);\n\n Label nameLbl = new Label(fieldComp, SWT.LEFT);\n nameLbl.setText(\"Name: \");\n\n caseNameText = new Text(fieldComp, SWT.SINGLE);\n gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);\n gd.minimumWidth = 200;\n caseNameText.setLayoutData(gd);\n caseNameText.addKeyListener(new KeyAdapter() {\n\n @Override\n public void keyReleased(KeyEvent e) {\n super.keyReleased(e);\n if (e.character == SWT.CR || e.character == SWT.KEYPAD_CR) {\n if (verifySelection()) {\n close();\n }\n }\n }\n });\n }", "private void setupRadioGroup(){\n //region Used to set up the RadioGroup\n\n selectUserTypeRadioGroup.clearCheck();\n selectUserTypeRadioGroup.setOnCheckedChangeListener(\n new RadioGroup.OnCheckedChangeListener() {\n @Override\n public void onCheckedChanged(RadioGroup group, int checkedId) {\n RadioButton clickedButton = group.findViewById(checkedId);\n if(checkedId == R.id.createAccountStudentRadio){\n isStudent = true;\n isTeacher = false;}\n else if(checkedId == R.id.createAccountTeacherRadio){\n isTeacher = true;\n isStudent = false;}\n else\n Log.d(\"Create Account\", \"Something has gone wrong picking user type\");\n }\n }\n );\n\n //endregion\n }", "@Override\r\n\tpublic Control createControl (Composite parent) {\r\n\t\tSystem.out.println(\"CDTFoldingPreferenceBlock.createControl()\");\r\n\r\n\t\tchildPreferenceStore.load();\r\n\t\tchildPreferenceStore.start();\r\n\r\n\t\tComposite inner = new Composite(parent, SWT.NONE);\r\n\t\tsetLayout(inner);\r\n\r\n\t\tComposite group = ControlFactory.createGroup(inner, CDTFoldingConstants.TF_TEXTFIELD_NAME, 1);\r\n\r\n\t\tText t = addTextField(group);\r\n\r\n\t\tControlFactory.createEmptySpace(inner);\r\n\r\n\t\tcbtViewer = addCBTViewer(inner);\r\n\r\n\t\tComposite editButtons = ControlFactory.createComposite(group, 4);\r\n\r\n\t\taddButton(editButtons, t);\r\n\t\tremoveButton(editButtons);\r\n\r\n\t\tmoveButton(editButtons, Move.UP);\r\n\t\tmoveButton(editButtons, Move.DOWN);\r\n\r\n\t\thighlightOrFoldCheckBox(inner);\r\n\r\n\t\tComposite colorComposite = ControlFactory.createComposite(inner, 2);\r\n\t\tcolorScheme(colorComposite);\r\n\r\n\t\taddErrorLabel(inner);\r\n\r\n\t\treturn inner;\r\n\t}", "protected void createBracketsFieldEditors(Composite appearanceComposite) {\n Label spacer = new Label(appearanceComposite, SWT.LEFT);\n GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);\n gd.horizontalSpan = 2;\n gd.heightHint = convertHeightInCharsToPixels(1) / 2;\n spacer.setLayoutData(gd);\n\n String label = \"Bracket highlighting\";\n\n bracketHighlightingCheckbox = addButton(appearanceComposite, SWT.CHECK, label, 0, new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n matchingBrackets = bracketHighlightingCheckbox.getSelection();\n }\n });\n\n Composite radioComposite = new Composite(appearanceComposite, SWT.NONE);\n GridLayout radioLayout = new GridLayout();\n radioLayout.marginWidth = 0;\n radioLayout.marginHeight = 0;\n radioComposite.setLayout(radioLayout);\n\n label = \"highlight matching bracket\";\n matchingBracketRadioButton = addButton(radioComposite, SWT.RADIO, label, 0, new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n if (matchingBracketRadioButton.getSelection()) {\n highlightBracketAtCaretLocation = false;\n }\n }\n });\n createDependency(bracketHighlightingCheckbox, matchingBracketRadioButton);\n\n label = \"highlight matching bracket and caret location\";\n matchingBracketAndCaretLocationRadioButton = addButton(radioComposite, SWT.RADIO, label, 0, new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n if (matchingBracketAndCaretLocationRadioButton.getSelection()) {\n highlightBracketAtCaretLocation = true;\n }\n }\n });\n createDependency(bracketHighlightingCheckbox, matchingBracketAndCaretLocationRadioButton);\n\n label = \"highlight enclosing brackets\";\n enclosingBracketsRadioButton = addButton(radioComposite, SWT.RADIO, label, 0, new SelectionAdapter() {\n\n @Override\n public void widgetSelected(SelectionEvent e) {\n boolean selection = enclosingBracketsRadioButton.getSelection();\n enclosingBrackets = selection;\n if (selection) {\n highlightBracketAtCaretLocation = true;\n }\n }\n });\n createDependency(bracketHighlightingCheckbox, enclosingBracketsRadioButton);\n\n matchingBracketsColor = new ColorFieldEditor(P_EDITOR_MATCHING_BRACKETS_COLOR.getId(), \"Matching brackets color\", radioComposite);\n addField(matchingBracketsColor);\n createDependency(bracketHighlightingCheckbox, matchingBracketsColor.getLabelControl(radioComposite));\n createDependency(bracketHighlightingCheckbox, matchingBracketsColor.getColorSelector().getButton());\n\n autoCreateEndBrackets = new BooleanFieldEditor(P_EDITOR_AUTO_CREATE_END_BRACKETSY.getId(), \"Auto create ending brackets\", getFieldEditorParent());\n addField(autoCreateEndBrackets);\n\n onlyStrictCodeCompletion = new BooleanFieldEditor(P_EDITOR_SHOW_ALSO_NON_STRICT_CODE_PROPOSALS.getId(), \"Show also NON strict code proposals\", getFieldEditorParent());\n onlyStrictCodeCompletion.getDescriptionControl(getFieldEditorParent()).setToolTipText(\n \"When enabled even code proposals for not correct context situations are proposed (but with a warn icon).\\n\\nYou need to close editors and open again when changing this value!\");\n addField(onlyStrictCodeCompletion);\n\n }", "@Override\n protected void createFieldEditors() {\n /* ------------------------ CLI setup ------------------------- */\n /* -------------------------------------------------------------- */\n createJenkinsCLIFieldEditors();\n\n /* -------------------------------------------------------------- */\n /* ------------------------ Log action ------------------------- */\n /* -------------------------------------------------------------- */\n createJenkinsWaitForLogsInSeconds(getFieldEditorParent());\n /* -------------------------------------------------------------- */\n /* ------------------------ ERROR LEVEL ------------------------- */\n /* -------------------------------------------------------------- */\n createJenkinsLinterErrorLevelComboBox(getFieldEditorParent());\n\n /* -------------------------------------------------------------- */\n /* ------------------------ APPEARANCE -------------------------- */\n /* -------------------------------------------------------------- */\n GridData appearanceLayoutData = new GridData();\n appearanceLayoutData.horizontalAlignment = GridData.FILL;\n appearanceLayoutData.verticalAlignment = GridData.BEGINNING;\n appearanceLayoutData.grabExcessHorizontalSpace = true;\n appearanceLayoutData.grabExcessVerticalSpace = false;\n appearanceLayoutData.verticalSpan = 2;\n appearanceLayoutData.horizontalSpan = 3;\n\n Composite appearanceComposite = new Composite(getFieldEditorParent(), SWT.NONE);\n GridLayout layout = new GridLayout();\n layout.numColumns = 2;\n appearanceComposite.setLayout(layout);\n appearanceComposite.setLayoutData(appearanceLayoutData);\n\n createOtherFieldEditors(appearanceComposite);\n\n createBracketsFieldEditors(appearanceComposite);\n }", "public void addRadioButtonField(String text, boolean compulsory, ArrayList<String> buttonTexts) {\n genderRadio = new RadioGroup(getContext());\n LinearLayout ll = new LinearLayout(getContext());\n ll.setOrientation(LinearLayout.HORIZONTAL);\n\n TextView textView = new TextView(getContext());\n textView.setTextSize(20);\n\n textView.setPadding(0, 15, 0, 0);\n\n String req = compulsory ? required : \"\";\n textView.setText(text + req);\n\n genderRadio.setOrientation(RadioGroup.HORIZONTAL);\n\n for (int i = 0; i < buttonTexts.size(); i++) {\n genderRadio.addView(new RadioButton(getContext()));\n ((RadioButton) genderRadio.getChildAt(i)).setText(buttonTexts.get(i));\n }\n if (compulsory)\n ((RadioButton) genderRadio.getChildAt(0)).setChecked(true);\n\n ll.addView(textView);\n ll.addView(genderRadio);\n\n mainll.addView(ll);\n }", "private void checkRadio( String groupName, String refValue ) throws com.sun.star.uno.Exception, java.lang.Exception\n {\n checkRadio( groupName, refValue, m_primaryForm );\n }", "@Override\n\tprotected void createAdditionalControls(Composite parent) {\n\t\tComposite container = new Composite(parent, SWT.NONE);\n\t\tcontainer.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n\t\tGridLayout containerLayout = new GridLayout(2, false);\n\t\tcontainerLayout.marginWidth = 0;\n\t\tcontainer.setLayout(containerLayout);\n\t\t\n\t\tLabel comboLabel = new Label(container, SWT.NONE);\n\t\tcomboLabel.setText(Messages.common_calculation);\n\t\t\n\t\tcalculationTypeCombo = new Combo(container, SWT.READ_ONLY);\n\t\tcalculationTypeCombo.setItems(NamedEnumPropertyDescriptor.getEnumItems(calculationTypes, NullEnum.NOTNULL));\n\t\tcalculationTypeCombo.select(0);\n\t\tcalculationTypeCombo.addSelectionListener(new SelectionAdapter() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tint selectedIndex = calculationTypeCombo.getSelectionIndex();\n\t\t\t\tselectedEnum = (CalculationEnum)calculationTypes[selectedIndex];\n\t\t\t}\n\t\t});\n\t}", "protected Control createDialogArea(Composite parent) {\r\n \t\t// page group\r\n \t\tComposite composite= (Composite)super.createDialogArea(parent);\r\n \r\n \t\tfTree= new CheckboxTreeViewer(composite);\r\n \t\tfTree.setUseHashlookup(true);\r\n \t\tfTree.setContentProvider(new WorkbenchContentProvider());\r\n \t\tfTree.setLabelProvider(new WorkbenchLabelProvider());\r\n \t\tfTree.setInput(SearchPlugin.getWorkspace().getRoot());\r\n \r\n \t\tGridData gd= new GridData(GridData.FILL_BOTH | GridData.GRAB_VERTICAL);\r\n \t\tgd.heightHint= SIZING_SELECTION_WIDGET_HEIGHT;\r\n \t\tgd.widthHint= SIZING_SELECTION_WIDGET_WIDTH;\r\n \t\tfTree.getControl().setLayoutData(gd);\r\n \r\n \t\tfTree.addCheckStateListener(new ICheckStateListener() {\r\n \t\t\tpublic void checkStateChanged(CheckStateChangedEvent event) {\r\n \t\t\t\thandleCheckStateChange(event);\r\n \t\t\t}\r\n \t\t});\r\n \t\t\r\n \t\tfTree.addTreeListener(new ITreeViewerListener() {\r\n \t\t\tpublic void treeCollapsed(TreeExpansionEvent event) {\r\n \t\t\t}\r\n \t\t\tpublic void treeExpanded(TreeExpansionEvent event) {\r\n \t\t\t\tfinal Object element= event.getElement();\r\n \t\t\t\tif (!fTree.getGrayed(element))\r\n \t\t\t\t\tBusyIndicator.showWhile(getShell().getDisplay(), new Runnable() {\r\n \t\t\t\t\t\tpublic void run() {\r\n \t\t\t\t\t\t\tsetSubtreeChecked((IContainer)element, fTree.getChecked(element), false);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t});\r\n \t\t\t}\r\n \t\t});\r\n \t\t\r\n \t\tinitializeCheckedState();\r\n \t\tdisableClosedProjects();\r\n \r\n \t\treturn composite;\r\n \t}", "@LayoutRes\n protected int getRadioButtonPreferenceCustomLayoutResId() {\n return 0;\n }", "public void createPartControl(Composite parent) {\n\n\t\tGridLayout gridLayout = new GridLayout();\n\t\tgridLayout.marginWidth = 0;\n\t\tgridLayout.marginHeight = 0;\n\t\tparent.setLayout(gridLayout);\n\n\t\t// create a ShashForm\n\t\tthis.sashForm = new SashForm(parent, SWT.VERTICAL);\n\t\tthis.sashForm.setLayout(new GridLayout(2, false));\n\n\t\t// create a table viewer\n\t\tcreateTableViewer(this.sashForm);\n\n\t\t// create a report form to go with the table viewer\n\t\tcreateReportForm(this.sashForm);\n\n\t\tthis.sashForm.setLayoutData(new GridData(GridData.FILL_BOTH));\n\n\t\t// layout the text field below the tree viewer\n\t\tGridData layoutData = new GridData();\n\t\tlayoutData.grabExcessHorizontalSpace = true;\n\t\tlayoutData.grabExcessVerticalSpace = true;\n\t\tlayoutData.horizontalAlignment = GridData.FILL;\n\t\tlayoutData.verticalAlignment = GridData.FILL;\n\n\t}", "public abstract void add(Field.RadioData radioData);", "public String setField(StringFieldEditor field, Composite composite) {\n\n String level = field.getPreferencesLevel();\n\n // If the level is \"project\" and project == null then just set\n // the field here (as a special case).\n if (IPreferencesService.PROJECT_LEVEL.equals(level) && service.getProject() == null) {\n if (composite.isDisposed()) {\n System.err.println(\"PreferencesUtilities.setField(): composite is disposed\");\n }\n field.setFieldValueFromOutside(null);\n if (!composite.isDisposed()) {\n // Assume that editability on the project level is set\n // appropriately by a project-selection listener\n //field.getTextControl(composite).setEditable(false);\n field.getTextControl(composite).setBackground(colorBluish);\n }\n // Pretend that this was set at the project level?\n // (It was certainly cleared at that level)\n return IPreferencesService.PROJECT_LEVEL;\n }\n\n // Otherwise, we have a legitimate level, so set normally\n String levelFromWhichSet = field.loadWithInheritance();\n\n // Note: You can evidently load a field even when it's control\n // is disposed. In that case (evidently) you can change the\n // text in the field but not the background color.\t\n\n if (!composite.isDisposed()) {\n /*\n\t\tif (level != null && level.equals(levelFromWhichSet)) {\n\t\t\tfield.getTextControl(composite).setBackground(colorWhite);\n\t\t} else if (level != null && field.getTextControl(composite).getEditable()) {\n\t\t\tfield.getTextControl(composite).setBackground(colorBluish);\n\t\t}\n */\n if (field.isInherited()) {\n field.getTextControl(composite).setBackground(colorBluish);\n } else \t{\n field.getTextControl(composite).setBackground(colorWhite);\n }\n } else {\n // If composite.isDisposed(), then both field.getTextControl(composite)\n // and field.getTextControl() will return null; if needed, a text control\n // must be obtained from somewhere else--but I have no idea where that\n // might be. Not sure why composite.isDisposed() here in the first place,\n // especially considering that the field can be set\n }\n\n return levelFromWhichSet;\n }", "public void createFieldEditors() {\n\t\t\n\t\tList<String> listOfValues = PreferenceOptions.GetTreeEditorFeatureOptions();\n\t\tint count = listOfValues.size();\n\t\tpreviously = Activator.getDefault().getPreferenceStore().getString(PreferenceOptions.FeatureEditor_CHOICE);\t\t\n\t\t\n\t\tString[][] labelAndvalues = new String[count][2];\n\t\tfor (int i = 0; i < count; i++)\n\t\t\tfor (int j = 0; j < 2; j++) \n\t\t\t\tlabelAndvalues[i][j] = listOfValues.get(i);\t\t\t\n\t\t\n\t\taddField(new RadioGroupFieldEditor(\n\t\t\t\tPreferenceOptions.FeatureEditor_CHOICE,\n\t\t\t\t\"Tree Editor Feature Wizard\",\n\t\t\t\t1,\n\t\t\t\tlabelAndvalues, \n\t\t\t\tgetFieldEditorParent()));\t\n\n\t\t/*Select the Engine to execute constraint*/\n\t\t\n\t\tList<String> listOfEngines = PreferenceOptions.getEngineOptions();\n\t\tint countEngines = listOfEngines.size();\t\t\n\t\t\n\t\tif (listOfEngines.size() != 0) {\n\t\t\t\n\t\t\tpreviouslyEngine = Activator.getDefault().getPreferenceStore().getString(PreferenceOptions.ENGINE_CHOICE);\n\t\t\t\n\t\t\tString[][] labelAndvaluesEngine = new String[countEngines][2];\n\t\t\tfor (int i = 0; i < countEngines; i++)\n\t\t\t\tfor (int j = 0; j < 2; j++) \n\t\t\t\t\tlabelAndvaluesEngine[i][j] = listOfEngines.get(i);\n\t\t\t\t\n\t\t\taddField(new RadioGroupFieldEditor(\n\t\t\t\t\tPreferenceOptions.ENGINE_CHOICE,\n\t\t\t\t\t\"Engine for the execution of constraints\",\n\t\t\t\t\t1,\n\t\t\t\t\tlabelAndvaluesEngine, \n\t\t\t\t\tgetFieldEditorParent()));\t\t\t\n\t\t}\t\n\t}", "private void createGrpSelectStockCenter() {\n\t\t// create widgets\n\t\tgrpSelectStockCenter = new Group(getShell(), SWT.NONE);\n\t\tgrpSelectStockCenter.setBounds(new Rectangle(40, 100, 720, 120));\n\t\tgrpSelectStockCenter.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tgrpSelectStockCenter\n\t\t.setText(\"Pharmacy Details (related to where stock is held)\");\n\n\t\trdBtnAddStockCenter = new Button(grpSelectStockCenter, SWT.RADIO);\n\t\trdBtnAddStockCenter.setBounds(new Rectangle(105, 25, 150, 30));\n\t\trdBtnAddStockCenter.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\trdBtnAddStockCenter.setText(\"Add New Pharmacy\");\n\n\t\trdBtnUpdateStockCenter = new Button(grpSelectStockCenter, SWT.RADIO);\n\t\trdBtnUpdateStockCenter.setBounds(new Rectangle(280, 20, 150, 30));\n\t\trdBtnUpdateStockCenter.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\trdBtnUpdateStockCenter.setText(\"Update a Pharmacy\");\n\n\t\trdBtnUpdatePharmacyDetails = new Button(grpSelectStockCenter, SWT.RADIO);\n\t\trdBtnUpdatePharmacyDetails.setBounds(new Rectangle(455, 20, 160, 30));\n\t\trdBtnUpdatePharmacyDetails.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\trdBtnUpdatePharmacyDetails.setText(\"Update Facility Details\");\n\n\t\tlblStockCenterName = new Label(grpSelectStockCenter, SWT.NONE);\n\t\tlblStockCenterName.setBounds(new Rectangle(155, 60, 100, 20));\n\t\tlblStockCenterName.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tlblStockCenterName.setAlignment(SWT.RIGHT);\n\t\tlblStockCenterName.setText(\"Pharmacy name:\");\n\n\t\ttxtStockCenterName = new Text(grpSelectStockCenter, SWT.BORDER);\n\t\ttxtStockCenterName.setBounds(new Rectangle(\n\t\t\t\t265, 60, 200, 20));\n\t\ttxtStockCenterName.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\ttxtStockCenterName.addKeyListener(new KeyAdapter() {\n\t\t\t@Override\n\t\t\tpublic void keyReleased(KeyEvent evt) {\n\t\t\t\tif ((btnSearch != null) && (btnSearch.getEnabled()) && rdBtnUpdateStockCenter.getSelection()) {\n\t\t\t\t\tif (evt.character == SWT.CR) {\n\t\t\t\t\t\tcmdEnterPressed();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(rdBtnAddStockCenter.getSelection()) {\n\t\t\t\t\tfieldsChanged = true;\n\t\t\t\t}\n\t\t\t\trdBtnPreferredNo.setEnabled(true);\n\t\t\t\trdBtnPreferredYes.setEnabled(true);\n\n\t\t\t}\n\t\t});\n\t\ttxtStockCenterName.addModifyListener(new ModifyListener() {\n\t\t\t@Override\n\t\t\tpublic void modifyText(ModifyEvent event1) {\n\t\t\t\tif(rdBtnUpdateStockCenter.getSelection()) {\n\t\t\t\t\tfieldsChanged = true;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tbtnSearch = new Button(grpSelectStockCenter, SWT.NONE);\n\t\tbtnSearch.setBounds(new Rectangle(470, 57, 110, 28));\n\t\tbtnSearch.setText(\"Pharmacy Search\");\n\t\tbtnSearch\n\t\t.setToolTipText(\"Press this button to search for pharmacies.\");\n\t\tbtnSearch.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tbtnSearch.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {\n\t\t\t\tcmdSearchWidgetSelected();\n\t\t\t}\n\t\t});\n\t\tbtnSearch.setVisible(false);\n\n\t\tlblPreferredStockCenter = new Label(grpSelectStockCenter, SWT.NONE);\n\t\tlblPreferredStockCenter.setBounds(new Rectangle(140, 97, 200, 20));\n\t\tlblPreferredStockCenter.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tlblPreferredStockCenter.setAlignment(SWT.RIGHT);\n\t\tlblPreferredStockCenter.setText(\"Preferred Pharmacy?\");\n\n\t\tComposite cmpRadio = new Composite(grpSelectStockCenter, SWT.NONE);\n\t\tcmpRadio.setLayout(null);\n\t\tcmpRadio.setBounds(new Rectangle(340, 75, 100, 40));\n\n\t\trdBtnPreferredYes = new Button(cmpRadio, SWT.RADIO);\n\t\trdBtnPreferredYes.setBounds(new Rectangle(10, 10, 40, 30));\n\t\trdBtnPreferredYes.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\trdBtnPreferredYes.setText(\"Yes\");\n\t\trdBtnPreferredYes.setEnabled(false);\n\t\trdBtnPreferredYes.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tif(rdBtnUpdateStockCenter.getSelection() && (!rdBtnPreferredYes.getSelection())) {\n\t\t\t\t\tfieldsChanged = true;\n\t\t\t\t\tif(rdBtnUpdateStockCenter.getSelection() &&\n\t\t\t\t\t\t\t!\"\".equalsIgnoreCase(txtStockCenterName.getText()) &&\n\t\t\t\t\t\t\tlocalStockCenter.isPreferred()) {\n\t\t\t\t\t\tpreferredChanged = true;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tpreferredChanged = false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\trdBtnPreferredNo = new Button(cmpRadio, SWT.RADIO);\n\t\trdBtnPreferredNo.setBounds(new Rectangle(60, 10, 40, 30));\n\t\trdBtnPreferredNo.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\trdBtnPreferredNo.setText(\"No\");\n\t\trdBtnPreferredNo.setSelection(true);\n\t\trdBtnPreferredNo.setEnabled(false);\n\t\trdBtnPreferredNo.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tif (rdBtnUpdateStockCenter.getSelection()\n\t\t\t\t\t\t&& (!rdBtnPreferredNo.getSelection())) {\n\t\t\t\t\tfieldsChanged = true;\n\t\t\t\t}\n\t\t\t\tif (rdBtnUpdateStockCenter.getSelection() && preferredChanged\n\t\t\t\t\t\t&& rdBtnPreferredNo.getSelection()) {\n\t\t\t\t\tMessageBox mbox = new MessageBox(getShell(),\n\t\t\t\t\t\t\tSWT.ICON_INFORMATION | SWT.OK);\n\t\t\t\t\tmbox.setText(\"Cannot Change Preferred Pharmacy \");\n\t\t\t\t\tmbox\n\t\t\t\t\t.setMessage(\"'\"\n\t\t\t\t\t\t\t+ txtStockCenterName.getText()\n\t\t\t\t\t\t\t+ \"' is currently the preferred pharmacy and this cannot be changed here.\\n\\nIf you would like to make another pharmacy the preferred one, please select it using the search button, and then set that pharmacy to the preferred one. \");\n\t\t\t\t\tmbox.open();\n\n\t\t\t\t\trdBtnPreferredYes.setSelection(true);\n\t\t\t\t\trdBtnPreferredNo.setSelection(false);\n\n\t\t\t\t\tif (\"\"\n\t\t\t\t\t\t\t.equalsIgnoreCase(txtStockCenterName.getText()\n\t\t\t\t\t\t\t\t\t.trim())\n\t\t\t\t\t\t\t\t\t|| localStockCenter.getStockCenterName().equalsIgnoreCase(txtStockCenterName.getText())) {\n\t\t\t\t\t\tfieldsChanged = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\n\t\t// add listeners\n\t\trdBtnAddStockCenter\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\tif (rdBtnAddStockCenter.getSelection()) {\n\n\t\t\t\t\tif(changeModes()) {\n\n\t\t\t\t\t\tString headerTxt = \"Add a New Pharmacy\";\n\t\t\t\t\t\tiDartImage icoImage = iDartImage.PHARMACYUSER;\n\t\t\t\t\t\tbuildCompHeader(headerTxt, icoImage);\n\t\t\t\t\t\tgetShell().setText(\"Add a New Pharmacy\");\n\t\t\t\t\t\tcurrentScreenMode = screenModes[0];\n\t\t\t\t\t\tclearForm();\n\t\t\t\t\t\tenableFields();\n\t\t\t\t\t\t// reset fields changed\n\t\t\t\t\t\tfieldsChanged = false;\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\trdBtnAddStockCenter.setSelection(false);\n\t\t\t\t\t\trdBtnUpdateStockCenter.setSelection(false);\n\t\t\t\t\t\trdBtnUpdatePharmacyDetails.setSelection(false);\n\n\t\t\t\t\t\t// select previous value\n\t\t\t\t\t\tif(currentScreenMode.equalsIgnoreCase(screenModes[0])) {\n\t\t\t\t\t\t\trdBtnAddStockCenter.setSelection(true);\n\t\t\t\t\t\t} else if(currentScreenMode.equalsIgnoreCase(screenModes[1])) {\n\t\t\t\t\t\t\trdBtnUpdateStockCenter.setSelection(true);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trdBtnUpdatePharmacyDetails.setSelection(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\n\t\trdBtnUpdateStockCenter\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\tif (rdBtnUpdateStockCenter.getSelection()) {\n\n\t\t\t\t\tif (changeModes()) {\n\n\t\t\t\t\t\tString headerTxt = \"Update a Pharmacy\";\n\t\t\t\t\t\tiDartImage icoImage = iDartImage.PHARMACYUSER;\n\t\t\t\t\t\tbuildCompHeader(headerTxt, icoImage);\n\t\t\t\t\t\t\t\tgetShell().setText(\"Update a Pharmacy\");\n\t\t\t\t\t\tcurrentScreenMode = screenModes[1];\n\t\t\t\t\t\tclearForm();\n\t\t\t\t\t\tenableFields();\n\t\t\t\t\t\t// reset fields changed\n\t\t\t\t\t\tfieldsChanged = false;\n\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\trdBtnAddStockCenter.setSelection(false);\n\t\t\t\t\t\trdBtnUpdateStockCenter.setSelection(false);\n\t\t\t\t\t\trdBtnUpdatePharmacyDetails.setSelection(false);\n\n\t\t\t\t\t\t// select previous value\n\t\t\t\t\t\tif(currentScreenMode.equalsIgnoreCase(screenModes[0])) {\n\t\t\t\t\t\t\trdBtnAddStockCenter.setSelection(true);\n\t\t\t\t\t\t} else if(currentScreenMode.equalsIgnoreCase(screenModes[1])) {\n\t\t\t\t\t\t\trdBtnUpdateStockCenter.setSelection(true);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trdBtnUpdatePharmacyDetails.setSelection(true);\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});\n\n\t\trdBtnUpdatePharmacyDetails\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\tif (rdBtnUpdatePharmacyDetails.getSelection()) {\n\n\t\t\t\t\tif (changeModes()) {\n\n\t\t\t\t\t\tString headerTxt = \"Update Facility Details\";\n\t\t\t\t\t\tiDartImage icoImage = iDartImage.PHARMACYUSER;\n\t\t\t\t\t\tbuildCompHeader(headerTxt, icoImage);\n\t\t\t\t\t\tgetShell().setText(\"Update Facility Details\");\n\t\t\t\t\t\tcurrentScreenMode = screenModes[2];\n\t\t\t\t\t\tclearForm();\n\t\t\t\t\t\tenableFields();\n\t\t\t\t\t\t// reset fields changed\n\t\t\t\t\t\tfieldsChanged = false;\n\t\t\t\t\t\tloadPharmacyDetails();\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\trdBtnAddStockCenter.setSelection(false);\n\t\t\t\t\t\trdBtnUpdateStockCenter.setSelection(false);\n\t\t\t\t\t\trdBtnUpdatePharmacyDetails.setSelection(false);\n\n\t\t\t\t\t\t// select previous value\n\t\t\t\t\t\tif(currentScreenMode.equalsIgnoreCase(screenModes[0])) {\n\t\t\t\t\t\t\trdBtnAddStockCenter.setSelection(true);\n\t\t\t\t\t\t} else if(currentScreenMode.equalsIgnoreCase(screenModes[1])) {\n\t\t\t\t\t\t\trdBtnUpdateStockCenter.setSelection(true);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trdBtnUpdatePharmacyDetails.setSelection(true);\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});\n\n\t\t// set initial values\n\t\trdBtnAddStockCenter.setSelection(true);\n\t\trdBtnUpdateStockCenter.setSelection(false);\n\t\trdBtnUpdatePharmacyDetails.setSelection(false);\n\n\t}", "private void addListenerRadioGroup() {\n int selectedID = radioGroupJenisKel.getCheckedRadioButtonId();\n\n //Mencari radio Button\n radioButtonJenisKel = (RadioButton) findViewById(selectedID);\n }", "public JRadioButton getJRadioButtonBOhne()\n\t{\n\t\tif (jRadioButtonBOhne == null)\n\t\t{\n\t\t\tjRadioButtonBOhne = new JRadioButton();\n\t\t\tjRadioButtonBOhne.setText(\"ohne\");\n\t\t\tjRadioButtonBOhne.setVisible(false);\n\t\t\tjRadioButtonBOhne.setBounds(125, 145, 70, 20);\n\t\t\tjRadioButtonBOhne.addItemListener(new ItemListener() {\n\t\t\t\tpublic void itemStateChanged(ItemEvent evt) {\n\t\t\t\t\tonCheckBoxBreak(0, evt);}});\n\t\t\tjRadioButtonBOhne.addKeyListener(keyListener);\n\t\t}\n\t\treturn jRadioButtonBOhne;\n\t}", "@Override // com.android.settings.development.bluetooth.BaseBluetoothDialogPreference\n public int getRadioButtonGroupId() {\n return C0010R$id.bluetooth_audio_codec_radio_group;\n }", "@Override\r\n protected Control createDialogArea(final Composite parent) {\n Composite composite = new Composite(parent, SWT.NONE);\r\n GridLayout layout = new GridLayout();\r\n layout.numColumns = 2;\r\n\r\n composite.setLayout(layout);\r\n composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\r\n\r\n Label idLab = new Label(composite, SWT.NONE);\r\n idLab.setText(\"Id: \");\r\n idLab.setToolTipText(\"\");\r\n\r\n idText = new Text(composite, SWT.BORDER);\r\n idText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\r\n doSingleCheck(idText, ID_MIN);\r\n idText.addModifyListener(new TextBoxValidator(idText, Messages.getString(\r\n \"titleToShort\", ID_MIN)) {\r\n @Override\r\n public boolean check(final TypedEvent e) {\r\n return doCheck((Text) e.getSource(), ID_MIN);\r\n }\r\n });\r\n\r\n Label titleLab = new Label(composite, SWT.NONE);\r\n titleLab.setText(\"Title: \");\r\n titleLab.setToolTipText(\"\");\r\n\r\n titleText = new Text(composite, SWT.BORDER);\r\n titleText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\r\n doSingleCheck(titleText, TITLE_MIN);\r\n titleText.addModifyListener(new TextBoxValidator(titleText, Messages\r\n .getString(\"titleToShort\", TITLE_MIN)) {\r\n @Override\r\n public boolean check(final TypedEvent e) {\r\n return doCheck((Text) e.getSource(), TITLE_MIN);\r\n }\r\n });\r\n\r\n // TODO browse field.\r\n Label iconLab = new Label(composite, SWT.NONE);\r\n iconLab.setText(\"Icon: \");\r\n iconLab.setToolTipText(\"\");\r\n iconPath = new Text(composite, SWT.BORDER);\r\n iconPath.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\r\n\r\n Label parentCatLab = new Label(composite, SWT.NONE);\r\n parentCatLab.setText(\"Parent Category: \");\r\n parentCatCombo = new Combo(composite, SWT.BORDER);\r\n parentCatCombo.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\r\n parentCatCombo.add(NO_PARENT);\r\n parentCatCombo.select(0);\r\n // FIXME save performance, if loading categories only one time.\r\n List<Category> categories = ExampleManager.get().getCategories();\r\n for (Category cat : categories) {\r\n parentCatCombo.add(cat.getId());\r\n parentCatCombo.getText();\r\n }\r\n Label descLab = new Label(composite, SWT.NONE);\r\n descLab.setText(\"Description: \");\r\n\r\n descText = new Text(composite, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL\r\n | SWT.H_SCROLL);\r\n GridData descData = new GridData(GridData.FILL_HORIZONTAL);\r\n descData.heightHint = CAT_DESC_HEIGHT;\r\n descData.minimumHeight = CAT_DESC_MINHEIGHT;\r\n descText.setLayoutData(descData);\r\n doSingleCheck(descText, DESCRIPTION_MIN);\r\n descText.addModifyListener(new TextBoxValidator(descText, Messages\r\n .getString(\"titleToShort\", DESCRIPTION_MIN)) {\r\n @Override\r\n public boolean check(final TypedEvent e) {\r\n return doCheck((Text) e.getSource(), DESCRIPTION_MIN);\r\n }\r\n });\r\n\r\n return parent;\r\n }", "@Override\n public void widgetSelected(SelectionEvent e) {\n if (e.getSource() instanceof Button) {\n onRadioTypeUpdated((Button) e.getSource());\n }\n }", "protected void createContents(Composite parent) {\n\t\tComposite nameGroup = new Composite(parent, SWT.NONE);\n\t\tGridLayout layout = new GridLayout();\n\t\tlayout.numColumns = 2;\n\t\tnameGroup.setLayout(layout);\n\t\tGridData gridData = new GridData(GridData.FILL_HORIZONTAL);\n\t\tgridData.horizontalSpan = 3;\n\t\tnameGroup.setLayoutData(gridData);\n\t\tLabel label = new Label(nameGroup, SWT.NONE);\n\t\tlabel.setText(Messages.RemoteZendServerCompositeFragment_Server_name);\n\t\tGridData data = new GridData();\n\t\tlabel.setLayoutData(data);\n\t\tnameText = new Text(nameGroup, SWT.BORDER);\n\t\tdata = new GridData(GridData.FILL_HORIZONTAL);\n\t\tnameText.setLayoutData(data);\n\t\tnameText.addModifyListener(new ModifyListener() {\n\t\t\tpublic void modifyText(ModifyEvent e) {\n\t\t\t\tname = nameText.getText();\n\t\t\t\tvalidate();\n\t\t\t}\n\t\t});\n\t\tnameText.forceFocus();\n\t\t\n\t\tcreateURLGroup(parent);\n\t}", "static Icon getRadioButtonIcon()\r\n/* 37: */ {\r\n/* 38: 85 */ if (radioButtonIcon == null) {\r\n/* 39: 86 */ radioButtonIcon = new RadioButtonIcon(null);\r\n/* 40: */ }\r\n/* 41: 88 */ return radioButtonIcon;\r\n/* 42: */ }", "public void setRadio(GenericRadio radio) {\n\t\tthis.radio = radio;\r\n\t}", "@Override\n\tprotected Control createDialogArea(Composite parent) {\n\t\tComposite container = (Composite) super.createDialogArea(parent);\n\t\tGridLayout gridLayout = (GridLayout) container.getLayout();\n\t\tgridLayout.numColumns = 3;\n\t\tnew Label(container, SWT.NONE);\n\t\t\n\t\tComposite composite = new Composite(container, SWT.NONE);\n\t\tGridData gd_composite = new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1);\n\t\tgd_composite.heightHint = 85;\n\t\tgd_composite.widthHint = 243;\n\t\tcomposite.setLayoutData(gd_composite);\n\t\t\n\t\ttext = new Text(composite, SWT.BORDER);\n\t\ttext.setBounds(10, 10, 78, 26);\t\t\n\t\t\n\t\tLabel lblLastEntered = new Label(composite, SWT.NONE);\n\t\tlblLastEntered.setBounds(18, 55, 90, 20);\n\t\tlblLastEntered.setText(\"Last entered:\");\n\n\t\tPreferences preferences = ConfigurationScope.INSTANCE\n\t\t .getNode(\"de.vogella.preferences.test\");\n Preferences entries = preferences.node(\"lastEntered\");\n\t\ttext_1 = new Text(composite, SWT.BORDER);\n\t\ttext_1.setEditable(false);\n\t\ttext_1.setText(entries.get(\"last\", \"\"));\n\t\ttext_1.setBounds(114, 55, 102, 26);\n\t\t\n\t\tButton btnSave = new Button(composite, SWT.NONE);\n\t\tbtnSave.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tPreferences preferences = ConfigurationScope.INSTANCE\n\t\t\t .getNode(\"de.vogella.preferences.test\");\n\t\t\t\tPreferences entries = preferences.node(\"lastEntered\");\n\t\t\t\tString entry = text.getText();\n\t\t\t\ttext_1.setText(entry);\n\t\t\t\tentries.put(\"last\", entry);\n\t\t\t}\n\t\t});\n\t\tbtnSave.setBounds(143, 6, 90, 30);\n\t\tbtnSave.setText(\"Save\");\n\n\t\treturn container;\n\t}", "private void checkRadio( String groupName, String refValue, XPropertySet form ) throws com.sun.star.uno.Exception, java.lang.Exception\n {\n XPropertySet xRadio = getRadioModel( groupName, refValue, form );\n\n\t\tXRadioButton radioButton = (XRadioButton)UnoRuntime.queryInterface(\n\t\t\tXRadioButton.class, m_document.getCurrentView().getControl( xRadio ) );\n\t\tradioButton.setState( true );\n }", "public void createControl(Composite parent) {\r\n\t\tComposite container = new Composite(parent, SWT.NULL);\r\n\t\tfinal GridLayout gridLayout = new GridLayout();\r\n\t\tcontainer.setLayout(gridLayout);\r\n\t\tsetControl(container);\r\n\r\n\t\tfinal SubscriptionWorkingCopy workingCopy = wizard.getWorkingCopy();\r\n\r\n\t\tfinal SashForm sashForm = new SashForm(container, SWT.NONE);\r\n\t\tsashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));\r\n\r\n\t\tGroup treeGroup = new Group(sashForm, SWT.NONE);\r\n\t\ttreeGroup.setLayout(new FillLayout());\r\n\t\ttreeGroup.setText(\"Detected feeds\");\r\n\r\n\t\tfinal TreeViewer treeViewer = new TreeViewer(treeGroup, SWT.BORDER);\r\n\t\ttreeViewer.addSelectionChangedListener(new ISelectionChangedListener() {\r\n\t\t\tpublic void selectionChanged(final SelectionChangedEvent event) {\r\n\t\t\t\tISelection selection = event.getSelection();\r\n\t\t\t\tif (selection instanceof IStructuredSelection) {\r\n\t\t\t\t\tObject selected = ((IStructuredSelection) selection)\r\n\t\t\t\t\t\t\t.getFirstElement();\r\n\t\t\t\t\tif (selected instanceof Subscription) {\r\n\t\t\t\t\t\tworkingCopy.copy((Subscription) selected);\r\n\t\t\t\t\t\turlText.setText(workingCopy.getURL());\r\n\t\t\t\t\t\tcombo.setText(workingCopy.getTitle());\r\n\t\t\t\t\t\tif (authenticationButton != null) {\r\n\t\t\t\t\t\t\tIFeedCatalog catalog = ((Subscription) selected)\r\n\t\t\t\t\t\t\t\t\t.getCatalog();\r\n\t\t\t\t\t\t\tif (catalog.supportsAuthentication()) {\r\n\t\t\t\t\t\t\t\tauthenticationButton.setEnabled(true);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tauthenticationButton.setSelection(false);\r\n\t\t\t\t\t\t\t\tauthenticationButton.setEnabled(false);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tTree tree = treeViewer.getTree();\r\n\t\ttree.setFocus();\r\n\t\ttreeViewer.setContentProvider(new ITreeContentProvider() {\r\n\r\n\t\t\tprivate IFeedCatalog[] catalogs;\r\n\r\n\t\t\tpublic Object[] getElements(Object inputElement) {\r\n\t\t\t\treturn catalogs;\r\n\t\t\t}\r\n\r\n\t\t\tpublic void dispose() {\r\n\t\t\t}\r\n\r\n\t\t\tpublic void inputChanged(Viewer viewer, Object oldInput,\r\n\t\t\t\t\tObject newInput) {\r\n\t\t\t\tcatalogs = AggregatorPlugin.getDefault().getCatalogs();\r\n\t\t\t}\r\n\r\n\t\t\tpublic Object[] getChildren(Object parentElement) {\r\n\t\t\t\tif (parentElement instanceof IFeedCatalog) {\r\n\t\t\t\t\t((IFeedCatalog) parentElement).getLabels();\r\n\t\t\t\t\treturn ((IFeedCatalog) parentElement).getFeeds();\r\n\t\t\t\t}\r\n\t\t\t\tif (parentElement instanceof IFeedCatalog[]) {\r\n\t\t\t\t\treturn catalogs;\r\n\t\t\t\t}\r\n\t\t\t\treturn new Object[0];\r\n\t\t\t}\r\n\r\n\t\t\tpublic Object getParent(Object element) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t\tpublic boolean hasChildren(Object element) {\r\n\t\t\t\tif (element instanceof Subscription) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t});\r\n\t\ttreeViewer.setInput(this);\r\n\t\ttreeViewer.setLabelProvider(new LabelProvider() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic String getText(Object element) {\r\n\t\t\t\tif (element instanceof IFeedCatalog) {\r\n\t\t\t\t\treturn ((IFeedCatalog) element).getName();\r\n\t\t\t\t}\r\n\t\t\t\tif (element instanceof Subscription) {\r\n\t\t\t\t\treturn ((Subscription) element).getTitle();\r\n\t\t\t\t}\r\n\t\t\t\treturn super.getText(element);\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic Image getImage(Object element) {\r\n\t\t\t\tif (element instanceof IFeedCatalog) {\r\n\t\t\t\t\tIFeedCatalog catalog = (IFeedCatalog) element;\r\n\t\t\t\t\tImageRegistry registry = AggregatorUIPlugin.getDefault()\r\n\t\t\t\t\t\t\t.getImageRegistry();\r\n\t\t\t\t\tString id = \"catalog.\" + catalog.getId() + \".\"\r\n\t\t\t\t\t\t\t+ catalog.getIcon();\r\n\t\t\t\t\tif (registry.get(id) == null) {\r\n\t\t\t\t\t\tImageDescriptor img = ImageDescriptor\r\n\t\t\t\t\t\t\t\t.createFromURL(catalog.getIcon());\r\n\t\t\t\t\t\tregistry.put(id, img);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn registry.get(id);\r\n\t\t\t\t}\r\n\t\t\t\tif (element instanceof Subscription) {\r\n\t\t\t\t\tImageRegistry registry = AggregatorUIPlugin.getDefault()\r\n\t\t\t\t\t\t\t.getImageRegistry();\r\n\t\t\t\t\treturn registry.get(AggregatorUIPlugin.IMG_FEED_OBJ);\r\n\t\t\t\t}\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t});\r\n\r\n\t\tComposite detailsGroup = new Composite(sashForm, SWT.NONE);\r\n\t\tdetailsGroup.setLayout(new FillLayout(SWT.VERTICAL));\r\n\t\tcreateConnectionGroup(workingCopy, detailsGroup);\r\n\t\tcreateAuthenticationGroup(workingCopy, detailsGroup);\r\n\t\tsashForm.setWeights(new int[] { 1, 1 });\r\n\t}", "public void createControl(Composite parent) {\n Composite main = new Composite(parent, SWT.NONE);\n GridLayout layout = new GridLayout();\n layout.numColumns = 1;\n main.setLayout(layout);\n if (parent.getLayout() instanceof GridLayout) {\n // This is necessary otherwise Eclipse does not properly layout\n // the main control. Really the parent Composite should be doing\n // this but this seems to be how Eclipse expects search dialogs\n // to be layed out see\n // org.eclipse.search.internal.ui.text.TextSearchPage.\n main.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n }\n\n Label label = new Label(main, SWT.LEFT);\n label.setText(SearchMessages.getString(RESOURCE_PREFIX +\n \"searchStringCombo.text\"));\n\n Composite innerComposite = new Composite(main, SWT.NONE);\n innerComposite.setLayoutData(new GridData(GridData.FILL_BOTH));\n layout = new GridLayout();\n layout.numColumns = 2;\n layout.marginHeight = 0;\n layout.marginWidth = 0;\n innerComposite.setLayout(layout);\n\n Composite comboComposite = new Composite(innerComposite, SWT.NONE);\n comboComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n layout = new GridLayout();\n layout.numColumns = 1;\n layout.marginHeight = 0;\n layout.marginWidth = 0;\n comboComposite.setLayout(layout);\n\n searchStringCombo = new Combo(comboComposite, SWT.DROP_DOWN);\n searchStringCombo.setItems(historyManager.getHistory());\n GridData data = new GridData(GridData.FILL_BOTH);\n searchStringCombo.setLayoutData(data);\n\n searchStringCombo.addModifyListener(new ModifyListener() {\n public void modifyText(ModifyEvent event) {\n getContainer().setPerformActionEnabled(!searchStringCombo.\n getText().equals(\"\"));\n }\n });\n Composite checkBoxComposite = new Composite(innerComposite, SWT.NONE);\n layout = new GridLayout();\n layout.numColumns = 1;\n layout.marginHeight = 0;\n layout.marginWidth = 0;\n\n checkBoxComposite.setLayout(layout);\n\n caseButton = new Button(checkBoxComposite, SWT.CHECK);\n caseButton.setText(SearchMessages.getString(RESOURCE_PREFIX +\n \"caseSensitive.text\"));\n caseButton.setSelection(dialogSettings.\n getBoolean(caseButton.getText()));\n\n regExpButton = new Button(checkBoxComposite, SWT.CHECK);\n regExpButton.setText(SearchMessages.getString(RESOURCE_PREFIX +\n \"regularExpression.text\"));\n regExpButton.setSelection(dialogSettings.\n getBoolean(regExpButton.getText()));\n\n final Label hint = new Label(comboComposite, SWT.LEFT);\n hint.setText(SearchMessages.getString(RESOURCE_PREFIX +\n \"nonRegExp.hint.label\"));\n hint.setVisible(!regExpButton.getSelection());\n\n\t\tregExpButton.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\thint.setVisible(!regExpButton.getSelection());\n\t\t\t}\n\t\t});\n\n Group searchGroup = new Group(main, SWT.SHADOW_ETCHED_IN);\n data = new GridData(GridData.FILL_HORIZONTAL);\n searchGroup.setLayoutData(data);\n searchGroup.setText(SearchMessages.getString(RESOURCE_PREFIX +\n \"searchGroup.text\"));\n searchGroup.setLayout(new FillLayout());\n\n deviceNameSearch = new Button(searchGroup, SWT.RADIO);\n deviceNameSearch.setText(SearchMessages.getString(RESOURCE_PREFIX +\n \"deviceNameSearch.text\"));\n deviceNameSearch.setSelection(dialogSettings.\n getBoolean(deviceNameSearch.getText()));\n\n devicePatternsSearch = new Button(searchGroup, SWT.RADIO);\n devicePatternsSearch.setText(SearchMessages.getString(RESOURCE_PREFIX +\n \"devicePatternsSearch.text\"));\n devicePatternsSearch.setSelection(dialogSettings.\n getBoolean(devicePatternsSearch.getText()));\n\n if(!devicePatternsSearch.getSelection() &&\n !deviceNameSearch.getSelection()) {\n deviceNameSearch.setSelection(true); // default\n }\n setControl(main);\n getContainer().setPerformActionEnabled(false);\n }", "public LibraryUI(Composite parent) {\n super(parent, SWT.NONE);\n\n// resourcePublishSubject = PublishSubject.create();\n\n Layouts.setGrid(this).numColumns(1).columnsEqualWidth(false).margin(0).spacing(0);\n\n SashForm parentSashForm = new SashForm(this, SWT.VERTICAL);\n Layouts.setGridData(parentSashForm).grabAll();\n\n\n //Layouts.setGridData(sashForm).grabAll();\n\n //Layouts.setGridData(new ResourceLibraryUI(sashForm)).grabAll();\n\n //Layouts.setGridData(new ResourceLibraryUI(sashForm)).grabAll();\n\n\n new SequenceLibraryUI(parentSashForm/*, resourcePublishSubject*/);\n\n SashForm sashForm = new SashForm(parentSashForm, SWT.HORIZONTAL);\n\n new ResourceLibraryUI(sashForm/*, resourcePublishSubject*/);\n\n\n// sashForm = new SashForm(parentSashForm, SWT.VERTICAL);\n //Layouts.setGridData(sashForm).grabAll();\n\n //Layouts.setGridData(new ResourceLibraryUI(sashForm)).grabAll();\n\n //Layouts.setGridData(new ResourceLibraryUI(sashForm)).grabAll();\n\n new PreviewLibraryUI(sashForm/*, resourcePublishSubject*/);\n\n int [] weights = {3,1};\n sashForm.setWeights(weights);\n\n }", "private void createSequenceWidget(Composite settingComposite,\r\n\t\t\tObject parentElement, ILabelProvider labelProvider,\r\n\t\t\tfinal IValuesContentProvider valuesContentProvider, Image image) {\n\r\n\t\tObject[] children = valuesContentProvider.getChildren(parentElement);\r\n\t\tESequenceValueItem seqValItem = (ESequenceValueItem)parentElement;\r\n\t\tESequenceValue seqVal = (ESequenceValue)seqValItem.eContainer();\r\n\t\tESequenceSetting ss = (ESequenceSetting)seqValItem.eContainer().eContainer();\r\n\t\tString absRef = ((ESequenceSettingImpl)seqVal.eContainer()).getAbsRef();\r\n\t\tString headerTitle = \"\";\r\n\t\tint m = children.length;\r\n\t\tif (ss.getVisibleSubSettings().size()>0)\r\n\t\t\tm = Math.min(ss.getVisibleSubSettings().size(), children.length);\r\n\t\tfor (int i = 0; i < m; i++) {\r\n\t\t\tObject child = children[i];\r\n\t\t\tif (ss.getVisibleSubSettings().size()>0)\r\n\t\t\t{\r\n\t\t\t\tString ref = ss.getVisibleSubSettings().get(i);\r\n\t\t\t\tfor (int j = 0 ; j < children.length ; j++)\r\n\t\t\t\t{\r\n\t\t\t\t\tESettingValue sv = (ESettingValue)children[j];\r\n\t\t\t\t\tif (sv.getRef().equals(ref))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tchild = children[j];\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\tString labelText = \" \"+labelProvider.getText(child);\r\n\t\t\tComposite textBox = null;\r\n\r\n\t\t\tif (i==0)\r\n\t\t\t{\r\n\t\t\t\theaderTitle = \"\";\r\n\t\t\t\tif (seqVal != null && seqVal.getTemplate() != null && seqVal.getTemplate().equals(seqValItem))\r\n\t\t\t\t{\r\n\t\t\t\t\theaderTitle = \"Template\";\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tfor (int j = 0 ; j < seqVal.getItems().size() ; j++)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif (seqVal.getItems().get(j).equals(seqValItem))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tString file = seqVal.getItems().get(j).getFrameLocationUri().lastSegment();\r\n\t\t\t\t\t\t\theaderTitle = \"Sequence \"+(j+1)+\" (\"+file+\")\";\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}\r\n\r\n\t\t\t\ttextBox = new DummySeqHeader(settingComposite, SWT.BOLD,\r\n\t\t\t\t\t\theaderTitle);\r\n\r\n\t\t\t\tshiftWidget(i, textBox);\r\n\t\t\t\tinitializeWidget(valuesContentProvider, seqValItem, textBox);\r\n\t\t\t\tadd2SqWidgetListener((BaseConfMLWidget) textBox);\r\n\t\t\t}\r\n\r\n\t\t\tif (labelProvider instanceof ISettingsLabelProvider) {\r\n\t\t\t\tISettingsLabelProvider settingsLabelProvider = (ISettingsLabelProvider) labelProvider;\r\n\t\t\t\tUISettingType type = settingsLabelProvider.getType(child);\r\n\t\t\t\tif (type.equals(UISettingType.INT)) {\r\n\t\t\t\t\ttextBox = new IntegerTextBox(settingComposite, SWT.NONE,\r\n\t\t\t\t\t\t\tlabelText, settingsLabelProvider.getOptions(child),image);\r\n\t\t\t\t}\r\n\t\t\t\telse if (type.equals(UISettingType.SELECTION)) {\r\n\t\t\t\t\ttextBox = new SelectionComboBox(settingComposite, SWT.NONE,\r\n\t\t\t\t\t\t\tlabelText, settingsLabelProvider.getOptions(child),\r\n\t\t\t\t\t\t\timage);\r\n\t\t\t\t}\r\n\t\t\t\telse if (type.equals(UISettingType.MULTISELECTION)) {\r\n\t\t\t\t\ttextBox = new MultiSelectionWidget(settingComposite, SWT.NONE,\r\n\t\t\t\t\t\t\tlabelText, settingsLabelProvider.getOptions(child), image);\r\n\t\t\t\t}\r\n\t\t\t\telse if (type.equals(UISettingType.BOOLEAN)) {\r\n\t\t\t\t\ttextBox = new BooleanCheckBox(settingComposite, SWT.NONE,\r\n\t\t\t\t\t\t\tlabelText, settingsLabelProvider.getOptions(child),image);\r\n\t\t\t\t}\r\n\r\n\t\t\t\telse if (type.equals(UISettingType.STRING)) {\r\n\t\t\t\t\ttextBox = new StringTextBox(settingComposite, SWT.NONE,\r\n\t\t\t\t\t\t\tlabelText, settingsLabelProvider.getOptions(child),image);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse if (type.equals(UISettingType.REAL)) { \r\n\t\t\t\t\ttextBox = new RealTextBox(settingComposite, SWT.NONE,labelText, settingsLabelProvider.getOptions(child),image);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//\t\t\t\tif (type.equals(UISettingType.FILE)) {\r\n\t\t\t\t//\t\t\t\t\tObject[] fileValues = valuesContentProvider\r\n\t\t\t\t//\t\t\t\t\t\t\t.getChildren(child);\r\n\t\t\t\t//\r\n\t\t\t\t//\t\t\t\t\ttextBox = new FileTextBox(settingComposite, SWT.NONE,\r\n\t\t\t\t//\t\t\t\t\t\t\tlabelText, image);\r\n\t\t\t\t//\r\n\t\t\t\t//\t\t\t\t\t// FileTextBox fileTextBox = (FileTextBox) textBox;\r\n\t\t\t\t//\r\n\t\t\t\t//\t\t\t\t\tDropTargetListener adapter = valuesContentProvider\r\n\t\t\t\t//\t\t\t\t\t\t\t.getDropTargetListener(child);\r\n\t\t\t\t//\t\t\t\t\t((BaseConfMLWidget) textBox).addDropListener(adapter);\r\n\t\t\t\t//\t\t\t\t\t// DropTarget dropTarget = new DropTarget(textBox, ops\r\n\t\t\t\t//\t\t\t\t\t// | DND.DROP_DEFAULT);\r\n\t\t\t\t//\t\t\t\t\t// dropTarget.setTransfer(transfers);\r\n\t\t\t\t//\t\t\t\t\t// dropTarget.addDropListener(adapter);\r\n\t\t\t\t//\t\t\t\t\tshiftWidget(i, textBox);\r\n\t\t\t\t//\t\t\t\t\tinitializeWidget(valuesContentProvider, fileValues[0],\r\n\t\t\t\t//\t\t\t\t\t\t\ttextBox);\r\n\t\t\t\t//\t\t\t\t\tadd2SqWidgetListener((BaseConfMLWidget) textBox);\r\n\t\t\t\t//\r\n\t\t\t\t//\t\t\t\t\ttextBox = new StringTextBox(settingComposite, SWT.NONE,\r\n\t\t\t\t//\t\t\t\t\t\t\t\"Location in Phone\", PluginImages.FILE);\r\n\t\t\t\t//\t\t\t\t\tadd2SqWidgetListener((BaseConfMLWidget) textBox);\r\n\t\t\t\t//\t\t\t\t\tshiftWidget(i, textBox);\r\n\t\t\t\t//\t\t\t\t\tinitializeWidget(valuesContentProvider, fileValues[1],\r\n\t\t\t\t//\t\t\t\t\t\t\ttextBox);\r\n\t\t\t\t//\t\t\t\t\tcontinue;\r\n\t\t\t\t//\t\t\t\t}\r\n\t\t\t\t//\t\t\t\tif (type.equals(UISettingType.SIMPLE_FILE)) {\r\n\t\t\t\t//\t\t\t\t\ttextBox = createSourcePathWidget(child,\r\n\t\t\t\t//\t\t\t\t\t\t\tvaluesContentProvider, image, settingComposite,\r\n\t\t\t\t//\t\t\t\t\t\t\tlabelText, child);\r\n\t\t\t\t//\t\t\t\t\tDropTargetListener adapter = valuesContentProvider\r\n\t\t\t\t//\t\t\t\t\t\t\t.getDropTargetListener(child);\r\n\t\t\t\t//\t\t\t\t\t((BaseConfMLWidget) textBox).addDropListener(adapter);\r\n\t\t\t\t//\t\t\t\t}\r\n\t\t\t\telse if (type.equals(UISettingType.SEQUENCE)) {\r\n\t\t\t\t\ttextBox = createSequenceWidget(settingComposite,\r\n\t\t\t\t\t\t\tSWT.BORDER, child, settingsLabelProvider,\r\n\t\t\t\t\t\t\tvaluesContentProvider);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse if (type.equals(UISettingType.FOLDER)) \r\n\t\t\t\t{\r\n\t\t\t\t\ttextBox = new FolderTextBox(settingComposite,SWT.NONE,labelText, settingsLabelProvider.getOptions(child),image);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse if (type.equals(UISettingType.FILE)) \r\n\t\t\t\t{\r\n\t\t\t\t\ttextBox = new FileTextBox(settingComposite,SWT.NONE,labelText, settingsLabelProvider.getOptions(child),image);\r\n\t\t\t\t}\r\n\t\t\t\telse if (type.equals(UISettingType.DATE)) {\r\n\t\t\t\t\ttextBox = new DateWidget(settingComposite, SWT.NONE,\r\n\t\t\t\t\t\t\tlabelText, settingsLabelProvider.getOptions(child),image);\r\n\t\t\t\t}\r\n\t\t\t\telse if (type.equals(UISettingType.TIME)) {\r\n\t\t\t\t\ttextBox = new TimeWidget(settingComposite, SWT.NONE,\r\n\t\t\t\t\t\t\tlabelText, settingsLabelProvider.getOptions(child),image);\r\n\t\t\t\t}\r\n\t\t\t\telse if (type.equals(UISettingType.DATETIME)) {\r\n\t\t\t\t\ttextBox = new DateTimeWidget(settingComposite, SWT.NONE,\r\n\t\t\t\t\t\t\tlabelText, settingsLabelProvider.getOptions(child),image);\r\n\t\t\t\t}\r\n\t\t\t\telse if (type.equals(UISettingType.DURATION)) {\r\n\t\t\t\t\ttextBox = new DurationWidget(settingComposite, SWT.NONE,\r\n\t\t\t\t\t\t\tlabelText, settingsLabelProvider.getOptions(child),image);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif (textBox == null) {\r\n\t\t\t\ttextBox = new IntegerTextBox(settingComposite, SWT.NONE,\r\n\t\t\t\t\t\tlabelText, null,image);\r\n\t\t\t}\r\n\t\t\tshiftWidget(i+1, textBox);\r\n\t\t\tinitializeWidget(valuesContentProvider, child, textBox);\r\n\t\t\tESettingValueImpl sv = (ESettingValueImpl)child;\r\n\t\t\tURI uri = seqValItem.getFrameLocationUri();\r\n\t\t\tif (uri!=null)\r\n\t\t\t{\r\n\t\t\t\tString frameUri = uri.toPlatformString(true);\r\n\t\t\t\tString fragment = uri.fragment();\r\n\t\t\t\tString subRef = sv.getRef();\r\n\t\t\t\trefToWidgetMap.put(absRef+\"/\"+subRef+\":\"+frameUri+\"#\"+fragment, textBox);\r\n\t\t\t}\r\n\t\t\tif (headerTitle.equals(\"Template\"))\r\n\t\t\t{\r\n\t\t\t\tString subRef = sv.getRef();\r\n\t\t\t\trefToWidgetMap.put(absRef+\"/\"+subRef, textBox);\r\n\t\t\t}\r\n\t\t\tadd2SqWidgetListener((BaseConfMLWidget) textBox);\r\n\t\t}\r\n\t}", "public void addListenerOnRadioGroupButton() {\n\n priorityRadioGroup = (RadioGroup) findViewById(R.id.priorityRadioGroup);\n medium = (RadioButton) findViewById(R.id.medium);\n high = (RadioButton) findViewById(R.id.high);\n low = (RadioButton) findViewById(R.id.low);\n\n //default value if no value change\n priorityLevel = \"low\";\n low.setChecked(true);\n\n priorityRadioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener()\n {\n public void onCheckedChanged(RadioGroup group, int checkedId) {\n switch(checkedId){\n case R.id.low:\n Log.d(\"TAG\", \"low checked\");\n priorityLevel = \"low\";\n break;\n case R.id.medium:\n Log.d(\"TAG\", \"medium checked\");\n priorityLevel = \"medium\";\n break;\n case R.id.high:\n Log.d(\"TAG\", \"high checked\");\n priorityLevel = \"high\";\n break;\n }\n }\n });\n\n }", "public void createControl(Composite parent) {\n\t\tComposite container = new Composite(parent, SWT.NONE);\n\t\tcontainer.setLayout(new GridLayout());\n\t\tsetControl(container);\n\n\t\tComposite container2 = new Composite(container, SWT.BORDER);\n\t\tcontainer2.setLayout(new GridLayout());\n\t\tcontainer2.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));\n\n\t\ttxtSummary = new StyledText(container2, SWT.LEFT | SWT.BORDER\n\t\t\t\t| SWT.READ_ONLY | SWT.WRAP | SWT.V_SCROLL);\n\t\ttxtSummary.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));\n\t\ttxtSummary.setBackground(SWTResourceConstents.COLOR_WHITE);\n\n\t\ttxtDDL = new StyledText(container2, SWT.LEFT | SWT.BORDER\n\t\t\t\t| SWT.READ_ONLY | SWT.WRAP | SWT.V_SCROLL);\n\t\tGridData gd = new GridData(SWT.FILL, SWT.FILL, true, true);\n\t\tgd.exclude = true;\n\t\ttxtDDL.setLayoutData(gd);\n\t\ttxtDDL.setVisible(false);\n\t\ttxtDDL.setBackground(SWTResourceConstents.COLOR_WHITE);\n\t\tcreateButtons(container);\n\t}", "private void createGrpContactDetails() {\n\n\t\tgrpContactDetails = new Group(grpPharmacyDetails, SWT.NONE);\n\t\tgrpContactDetails.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tgrpContactDetails.setBounds(new Rectangle(20, 40, 350, 230));\n\n\t\tlblInstructions = new Label(grpContactDetails, SWT.CENTER);\n\t\tlblInstructions.setBounds(new org.eclipse.swt.graphics.Rectangle(50,\n\t\t\t\t20, 260, 20));\n\t\tlblInstructions.setText(\"All fields marked with * are compulsory\");\n\t\tlblInstructions.setFont(ResourceUtils\n\t\t\t\t.getFont(iDartFont.VERASANS_8_ITALIC));\n\n\t\tlblPharmacyName = new Label(grpContactDetails, SWT.NONE);\n\t\tlblPharmacyName.setBounds(new org.eclipse.swt.graphics.Rectangle(18, 45, 120,\n\t\t\t\t20));\n\t\tlblPharmacyName.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tlblPharmacyName.setText(\"* Facility Name:\");\n\t\ttxtPharmacyName = new Text(grpContactDetails, SWT.BORDER);\n\t\ttxtPharmacyName.setBounds(new org.eclipse.swt.graphics.Rectangle(150, 45, 180,\n\t\t\t\t20));\n\t\ttxtPharmacyName.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\ttxtPharmacyName.setFocus();\n\t\ttxtPharmacyName.addKeyListener(new KeyAdapter() {\n\t\t\t@Override\n\t\t\tpublic void keyReleased(KeyEvent evt) {\n\t\t\t\ttxtNameKeyReleased();\n\t\t\t\tfieldsChanged = true;\n\t\t\t}\n\n\t\t});\n\t\ttxtPharmacyName.setEnabled(false);\n\n\t\tlblStreetAdd = new Label(grpContactDetails, SWT.NONE);\n\t\tlblStreetAdd.setBounds(new org.eclipse.swt.graphics.Rectangle(18, 75,\n\t\t\t\t120, 20));\n\t\tlblStreetAdd.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tlblStreetAdd.setText(\"* Street Address:\");\n\t\ttxtStreetAdd = new Text(grpContactDetails, SWT.BORDER);\n\t\ttxtStreetAdd.setBounds(new org.eclipse.swt.graphics.Rectangle(150, 75,\n\t\t\t\t180, 20));\n\t\ttxtStreetAdd.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\ttxtStreetAdd.addKeyListener(new KeyAdapter() {\n\t\t\t@Override\n\t\t\tpublic void keyReleased(KeyEvent evt) {\n\t\t\t\ttxtStreetKeyReleased();\n\t\t\t\tfieldsChanged = true;\n\t\t\t}\n\t\t});\n\t\ttxtStreetAdd.setEnabled(false);\n\n\t\tlblCity = new Label(grpContactDetails, SWT.NONE);\n\t\tlblCity.setBounds(new org.eclipse.swt.graphics.Rectangle(18, 105, 120,\n\t\t\t\t20));\n\t\tlblCity.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tlblCity.setText(\"* City:\");\n\t\ttxtCity = new Text(grpContactDetails, SWT.BORDER);\n\t\ttxtCity.setBounds(new org.eclipse.swt.graphics.Rectangle(150, 105, 180,\n\t\t\t\t20));\n\t\ttxtCity.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\ttxtCity.addKeyListener(new KeyAdapter() {\n\t\t\t@Override\n\t\t\tpublic void keyReleased(KeyEvent evt) {\n\t\t\t\ttxtCityKeyReleased();\n\t\t\t\tfieldsChanged = true;\n\t\t\t}\n\t\t});\n\t\ttxtCity.setEnabled(false);\n\n\t\tlblTel = new Label(grpContactDetails, SWT.NONE);\n\t\tlblTel.setBounds(new org.eclipse.swt.graphics.Rectangle(18, 135, 124,\n\t\t\t\t20));\n\t\tlblTel.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tlblTel.setText(\"* Telephone Number:\");\n\t\ttxtTel = new Text(grpContactDetails, SWT.BORDER);\n\t\ttxtTel.setBounds(new org.eclipse.swt.graphics.Rectangle(150, 135, 180,\n\t\t\t\t20));\n\t\ttxtTel.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\ttxtTel.addKeyListener(new KeyAdapter() {\n\t\t\t@Override\n\t\t\tpublic void keyReleased(KeyEvent evt) {\n\t\t\t\ttxtTelNoKeyReleased();\n\t\t\t\tfieldsChanged = true;\n\t\t\t}\n\t\t});\n\t\ttxtTel.setEnabled(false);\n\n\t\tlblPharmacistName1 = new Label(grpContactDetails, SWT.NONE);\n\t\tlblPharmacistName1.setBounds(new org.eclipse.swt.graphics.Rectangle(18,\n\t\t\t\t165, 120, 20));\n\t\tlblPharmacistName1.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tlblPharmacistName1.setText(\"* Head Pharmacist:\");\n\t\ttxtPharmacistName1 = new Text(grpContactDetails, SWT.BORDER);\n\t\ttxtPharmacistName1.setBounds(new org.eclipse.swt.graphics.Rectangle(\n\t\t\t\t150, 165, 180, 20));\n\t\ttxtPharmacistName1.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\ttxtPharmacistName1.addKeyListener(new KeyAdapter() {\n\t\t\t@Override\n\t\t\tpublic void keyReleased(KeyEvent evt) {\n\t\t\t\ttxtPharmacistKeyReleased();\n\t\t\t\tfieldsChanged = true;\n\t\t\t}\n\t\t});\n\t\ttxtPharmacistName1.setEnabled(false);\n\n\t\tlblPharmacyAssistant = new Label(grpContactDetails, SWT.NONE);\n\t\tlblPharmacyAssistant.setBounds(new org.eclipse.swt.graphics.Rectangle(18,\n\t\t\t\t195, 120, 20));\n\t\tlblPharmacyAssistant.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\tlblPharmacyAssistant.setText(\" Pharmacy Assistant:\");\n\t\ttxtPharmacyAssistant = new Text(grpContactDetails, SWT.BORDER);\n\t\ttxtPharmacyAssistant.setBounds(new org.eclipse.swt.graphics.Rectangle(\n\t\t\t\t150, 195, 180, 20));\n\t\ttxtPharmacyAssistant.setFont(ResourceUtils.getFont(iDartFont.VERASANS_8));\n\t\ttxtPharmacyAssistant.addKeyListener(new KeyAdapter() {\n\t\t\t@Override\n\t\t\tpublic void keyReleased(KeyEvent evt) {\n\t\t\t\ttxtPharmacistKeyReleased();\n\t\t\t\tfieldsChanged = true;\n\t\t\t}\n\t\t});\n\t\ttxtPharmacyAssistant.setEnabled(false);\n\n\t}", "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 }", "@Override\r\n public void onCheckedChanged(RadioGroup group, int checkedId) {\n dialog.dismiss();\r\n MyLog.i(\"YUY\",\r\n String.valueOf(checkedId) + \" \"\r\n + group.getCheckedRadioButtonId());\r\n mVehicleTypeTV.setText(((RadioButton) layout\r\n .findViewById(checkedId)).getText().toString());\r\n }", "@Test\n\tpublic void testRadioGroup_8()\n\t\tthrows Exception {\n\t\tJSONObject jsonWrapperObj = new JSONObject();\n\n\t\tRadioGroup result = new RadioGroup(jsonWrapperObj);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getOptions());\n\t\tassertEquals(null, result.getName());\n\t\tassertEquals(null, result.getId());\n\t}", "protected Control createSpinnerControl(Composite parent) {\r\n \t\tcomposite = new Composite(parent, SWT.NONE);\r\n \t\tGridLayout gridLayout = new GridLayout();\r\n \t\tgridLayout.numColumns = 2;\r\n gridLayout.marginWidth = 0;\r\n gridLayout.marginHeight = 0;\r\n gridLayout.horizontalSpacing = HORIZONTAL_GAP;\r\n \t\tcomposite.setLayout(gridLayout);\r\n \t\tGridData gd;\r\n \t\tgd = new GridData(GridData.FILL_HORIZONTAL);\r\n \t\tcomposite.setLayoutData(gd);\r\n \t\t\r\n \t\t/*\r\n \t\t * Create label\r\n \t\t */\r\n \t\tsliderLabel = new Label(composite,SWT.NONE);\r\n \t\tgd = new GridData(SWT.LEFT);\r\n \t\tsliderLabel.setLayoutData(gd);\r\n \t\tsliderLabel.setText(SLIDER_LABEL_DEFAULT_TEXT);\r\n \t\tPoint size = sliderLabel.computeSize(SWT.DEFAULT, SWT.DEFAULT);\r\n \t\tsliderLabel.setSize(size);\r\n \t\t\r\n \t\t/*\r\n \t\t * Create slider\r\n \t\t */\r\n \t\tslider = new Slider(composite, SWT.HORIZONTAL);\r\n \t\tgd = new GridData(SWT.RIGHT | GridData.FILL_HORIZONTAL);\r\n \t\tslider.setLayoutData(gd);\r\n \t\t\r\n \t\tslider.setMaximum(MAX_SLIDER_VALUE + slider.getThumb());\r\n \t\tslider.setMinimum(MIN_SLIDER_VALUE);\r\n \t\tslider.setIncrement(INCREMENT_SLIDER_VALUE);\r\n \r\n \t\t/*\r\n \t\t * Add listener to handle value change \r\n \t\t */\r\n \t\tselectionListener = new SelectionListener() {\r\n \t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n \t\t\t\tvalueChanged();\r\n \t\t\t}\r\n \r\n \t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\r\n \t\t\t\t// Do nothing\r\n \t\t\t}\r\n \t\t};\r\n \t\tslider.addSelectionListener(selectionListener);\r\n \t\ttry {\r\n \t\t\tintValue = Integer.parseInt(valueProvider.getStringValue(true).toString());\r\n\t\t} catch (Exception e) {\r\n \t\t\tintValue = DEFAULT_SLIDER_VALUE;\r\n \t\t}\r\n \t\t\r\n \t\t/*\r\n \t\t * Initialize slider presentation\r\n \t\t */\r\n \t\tslider.setSelection(intValue);\r\n \t\tString weightsString = \"\" + (intValue /10) + \"%\"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\r\n \t\tslider.setToolTipText(weightsString);\r\n \t\tsliderLabel.setText(weightsString);\r\n \t\t\r\n \t\tslider.pack();\r\n \t\tsliderLabel.pack();\r\n \t\treturn composite;\r\n \t}", "@Override\n\tprotected Control createDialogArea(Composite parent) {\n\t\tsetMessage(\"Allows you to create or edit a task\");\n\t\tsetTitle(\"Task's Editor\");\n\t\tComposite area = (Composite) super.createDialogArea(parent);\n\t\tComposite container = new Composite(area, SWT.NONE);\n\t\tcontainer.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\tcontainer.setLayoutData(new GridData(GridData.FILL_BOTH));\n\t\t\n\t\tTabFolder tabFolder = new TabFolder(container, SWT.BORDER);\n\t\t\n\t\tTabItem tbtmGeneral = new TabItem(tabFolder, SWT.NONE);\n\t\ttbtmGeneral.setText(\"General\");\n\t\t\n\t\tComposite composite = new Composite(tabFolder, SWT.NONE);\n\t\ttbtmGeneral.setControl(composite);\n\t\t\n\t\tLabel lblName = new Label(composite, SWT.NONE);\n\t\tlblName.setBounds(24, 29, 70, 17);\n\t\tlblName.setText(\"Name:\");\n\t\t\n\t\tLabel lblImportance = new Label(composite, SWT.NONE);\n\t\tlblImportance.setBounds(24, 63, 94, 17);\n\t\tlblImportance.setText(\"Importance:\");\n\t\t\n\t\tLabel lblStatus = new Label(composite, SWT.NONE);\n\t\tlblStatus.setBounds(24, 104, 70, 17);\n\t\tlblStatus.setText(\"Status:\");\n\t\t\n\t\tLabel lblDescription = new Label(composite, SWT.NONE);\n\t\tlblDescription.setBounds(24, 152, 94, 17);\n\t\tlblDescription.setText(\"Description:\");\n\t\t\n\t\ttextName = new Text(composite, SWT.BORDER);\n\t\ttextName.setBounds(124, 29, 150, 27);\n\t\t\n\t\ttextDescription = new Text(composite, SWT.BORDER);\n\t\ttextDescription.setBounds(124, 142, 261, 27);\n\t\t\n\t\tcomboImportance = new Combo(composite, SWT.NONE);\n\t\tcomboImportance.setBounds(124, 63, 189, 29);\n\t\tfor(Iterator it = Importance.VALUES.iterator(); it.hasNext(); ){\n\t\t\tImportance i = (Importance) it.next();\n\t\t\tcomboImportance.add(i.getName());\n\t\t}\n\t\t\n\t\tcomboStatus = new Combo(composite, SWT.NONE);\n\t\tcomboStatus.setBounds(124, 104, 189, 29);\n\t\tfor(Iterator it = Status.VALUES.iterator(); it.hasNext(); ){\n\t\t\tStatus i = (Status) it.next();\n\t\t\tcomboStatus.add(i.getName());\n\t\t}\n\t\t\n\t\tTabItem tbtmFolders = new TabItem(tabFolder, SWT.NONE);\n\t\ttbtmFolders.setText(\"Folders\");\n\t\t\n\t\tComposite composite_1 = new Composite(tabFolder, SWT.NONE);\n\t\ttbtmFolders.setControl(composite_1);\n\t\tcomposite_1.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tcheckboxTreeViewer = new CheckboxTreeViewer(composite_1, SWT.BORDER);\n\t\tcheckboxTreeViewer.setContentProvider(new FolderContentProvider());\n\t\tcheckboxTreeViewer.setLabelProvider(new FolderLabelProvider());\n\t\tcheckboxTreeViewer.setInput(EMFManager.getInstance().getToDoListManager());\n\t\tcheckboxTreeViewer.expandAll();\n\t\tTree tree = checkboxTreeViewer.getTree();\n\t\t\n\t\tpreFillDialog();\n\t\tparent.layout();\n\t\treturn area;\n\t}", "@Override\n\n // The flow will come here when\n // any of the radio buttons in the radioGroup\n // has been clicked\n\n // Check which radio button has been clicked\n public void onCheckedChanged(RadioGroup group,\n int checkedId) {\n RadioButton\n radioButton\n = (RadioButton) group\n .findViewById(checkedId);\n }", "@Override\n\tprotected Control createDialogArea(Composite parent) {\n\n\t\tgetShell().setText(\"Person anlegen oder anpassen\");\n\n\t\tComposite container = (Composite) super.createDialogArea(parent);\n\t\tcontainer.setLayout(new FillLayout(SWT.HORIZONTAL));\n\n\t\tparentForm = formToolkit.createForm(container);\n\t\tformToolkit.paintBordersFor(parentForm);\n\t\tformToolkit.decorateFormHeading(parentForm);\n\t\tparentForm.setText(\"Person anlegen oder anpassen\");\n\t\tparentForm.getBody().setLayout(new GridLayout(1, false));\n\n\t\tSection baseSection = formToolkit.createSection(parentForm.getBody(),\n\t\t\t\tSection.TITLE_BAR);\n\t\tbaseSection.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true,\n\t\t\t\t1, 1));\n\t\tformToolkit.paintBordersFor(baseSection);\n\t\tbaseSection.setText(\"Basisdaten\");\n\n\t\tComposite composite = formToolkit\n\t\t\t\t.createComposite(baseSection, SWT.NONE);\n\t\tformToolkit.paintBordersFor(composite);\n\t\tbaseSection.setClient(composite);\n\t\tcomposite.setLayout(new GridLayout(4, false));\n\n\t\tLabel nameLabel = formToolkit.createLabel(composite, \"Name\", SWT.NONE);\n\t\tnameLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false,\n\t\t\t\tfalse, 1, 1));\n\n\t\tnameText = formToolkit.createText(composite, \"\", SWT.BORDER);\n\t\tnameText.setText(\"\");\n\t\tnameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false,\n\t\t\t\t1, 1));\n\n\t\tLabel firstnameLabel = formToolkit.createLabel(composite, \"Vorname\",\n\t\t\t\tSWT.NONE);\n\t\tfirstnameLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false,\n\t\t\t\tfalse, 1, 1));\n\n\t\tfirstnameText = formToolkit.createText(composite, \"\", SWT.BORDER);\n\t\tGridData gd_firstnameText = new GridData(SWT.FILL, SWT.CENTER, true,\n\t\t\t\tfalse, 1, 1);\n\t\tgd_firstnameText.minimumWidth = 175;\n\t\tfirstnameText.setLayoutData(gd_firstnameText);\n\n\t\tLabel streetLabel = formToolkit.createLabel(composite, \"Strasse\",\n\t\t\t\tSWT.NONE);\n\t\tstreetLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false,\n\t\t\t\tfalse, 1, 1));\n\n\t\tstreetText = formToolkit.createText(composite, \"\", SWT.BORDER);\n\t\tstreetText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true,\n\t\t\t\tfalse, 1, 1));\n\t\tnew Label(composite, SWT.NONE);\n\t\tnew Label(composite, SWT.NONE);\n\n\t\tLabel postalcodeLabel = formToolkit.createLabel(composite, \"PLZ\",\n\t\t\t\tSWT.NONE);\n\t\tpostalcodeLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER,\n\t\t\t\tfalse, false, 1, 1));\n\n\t\tpostalcodeText = formToolkit.createText(composite, \"\", SWT.BORDER);\n\t\tpostalcodeText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true,\n\t\t\t\tfalse, 1, 1));\n\n\t\tLabel cityLabel = formToolkit.createLabel(composite, \"Ort\", SWT.NONE);\n\t\tcityLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false,\n\t\t\t\tfalse, 1, 1));\n\n\t\tcityText = formToolkit.createText(composite, \"\", SWT.BORDER);\n\t\tcityText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false,\n\t\t\t\t1, 1));\n\n\t\tLabel birthdayLabel = formToolkit.createLabel(composite, \"Geburtstag\",\n\t\t\t\tSWT.NONE);\n\t\tbirthdayLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false,\n\t\t\t\tfalse, 1, 1));\n\n\t\tfinal DateTime dateTime = new DateTime(composite, SWT.BORDER\n\t\t\t\t| SWT.CALENDAR);\n\t\tformToolkit.adapt(dateTime);\n\t\tformToolkit.paintBordersFor(dateTime);\n\t\tnew Label(composite, SWT.NONE);\n\t\tnew Label(composite, SWT.NONE);\n\n\t\tformToolkit.adapt(composite);\n\t\tformToolkit.paintBordersFor(composite);\n\n\t\tSection advancedSection = formToolkit.createSection(\n\t\t\t\tparentForm.getBody(), Section.TITLE_BAR);\n\t\tadvancedSection.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true,\n\t\t\t\tfalse, 1, 1));\n\t\tformToolkit.paintBordersFor(advancedSection);\n\t\tadvancedSection.setText(\"erweiterte Daten\");\n\n\t\tComposite advancedComposite = formToolkit.createComposite(\n\t\t\t\tadvancedSection, SWT.NONE);\n\t\tformToolkit.paintBordersFor(advancedComposite);\n\t\tadvancedSection.setClient(advancedComposite);\n\t\tadvancedComposite.setLayout(new GridLayout(2, false));\n\n\t\tnew Label(advancedComposite, SWT.NONE);\n\n\t\tfinal Button activeMemberCheckButton = new Button(advancedComposite,\n\t\t\t\tSWT.CHECK);\n\t\tformToolkit.adapt(activeMemberCheckButton, true, true);\n\t\tactiveMemberCheckButton.setText(\"Aktives Mitglied\");\n\n\t\tLabel telephoneLabel = formToolkit.createLabel(advancedComposite,\n\t\t\t\t\"Telefon\", SWT.NONE);\n\t\ttelephoneLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false,\n\t\t\t\tfalse, 1, 1));\n\n\t\ttelephoneText = formToolkit.createText(advancedComposite, \"\",\n\t\t\t\tSWT.BORDER);\n\t\ttelephoneText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true,\n\t\t\t\tfalse, 1, 1));\n\n\t\tLabel mobileLabel = formToolkit.createLabel(advancedComposite, \"Handy\",\n\t\t\t\tSWT.NONE);\n\t\tmobileLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false,\n\t\t\t\tfalse, 1, 1));\n\n\t\tmobileText = formToolkit.createText(advancedComposite, \"\", SWT.BORDER);\n\t\tgd_firstnameText.minimumWidth = 175;\n\t\tmobileText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true,\n\t\t\t\tfalse, 1, 1));\n\n\t\tLabel faxLabel = formToolkit.createLabel(advancedComposite, \"Fax\",\n\t\t\t\tSWT.NONE);\n\t\tfaxLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false,\n\t\t\t\t1, 1));\n\n\t\tfaxText = formToolkit.createText(advancedComposite, \"\", SWT.BORDER);\n\t\tfaxText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false,\n\t\t\t\t1, 1));\n\n\t\tLabel emailLabel = formToolkit.createLabel(advancedComposite, \"E-Mail\",\n\t\t\t\tSWT.NONE);\n\t\temailLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false,\n\t\t\t\t1, 1));\n\n\t\temailText = formToolkit.createText(advancedComposite, \"\", SWT.BORDER);\n\t\temailText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false,\n\t\t\t\t1, 1));\n\n\t\tnameText.setText(person.getName() != null ? person.getName() : \"\");\n\t\tfirstnameText.setText(person.getFirstname() != null ? person\n\t\t\t\t.getFirstname() : \"\");\n\t\tstreetText\n\t\t\t\t.setText(person.getStreet() != null ? person.getStreet() : \"\");\n\t\tpostalcodeText.setText(person.getPostalcode() != null ? person\n\t\t\t\t.getPostalcode() : \"\");\n\t\tcityText.setText(person.getCity() != null ? person.getCity() : \"\");\n\t\tif (person.getBirthday() != null) {\n\t\t\tCalendar c = Calendar.getInstance();\n\t\t\tc.setTime(person.getBirthday());\n\t\t\tdateTime.setDate(c.get(Calendar.YEAR), c.get(Calendar.MONTH),\n\t\t\t\t\tc.get(Calendar.DAY_OF_MONTH));\n\t\t}\n\n\t\tactiveMemberCheckButton\n\t\t\t\t.setSelection(person.isActiveMember() != null ? person\n\t\t\t\t\t\t.isActiveMember() : false);\n\t\ttelephoneText.setText(person.getPhone() != null ? person.getPhone()\n\t\t\t\t: \"\");\n\t\tmobileText\n\t\t\t\t.setText(person.getMobile() != null ? person.getMobile() : \"\");\n\t\tfaxText.setText(person.getFax() != null ? person.getFax() : \"\");\n\t\temailText.setText(person.getEmail() != null ? person.getEmail() : \"\");\n\n\t\tModifyListener modifyListener = new ModifyListener() {\n\t\t\t@Override\n\t\t\tpublic void modifyText(ModifyEvent e) {\n\t\t\t\tif (e.widget == nameText) {\n\t\t\t\t\tperson.setName(nameText.getText());\n\t\t\t\t} else if (e.widget == firstnameText) {\n\t\t\t\t\tperson.setFirstname(firstnameText.getText());\n\t\t\t\t} else if (e.widget == streetText) {\n\t\t\t\t\tperson.setStreet(streetText.getText());\n\t\t\t\t} else if (e.widget == postalcodeText) {\n\t\t\t\t\tperson.setPostalcode(postalcodeText.getText());\n\t\t\t\t} else if (e.widget == cityText) {\n\t\t\t\t\tperson.setCity(cityText.getText());\n\t\t\t\t} else if (e.widget == telephoneText) {\n\t\t\t\t\tperson.setPhone(telephoneText.getText());\n\t\t\t\t} else if (e.widget == mobileText) {\n\t\t\t\t\tperson.setMobile(mobileText.getText());\n\t\t\t\t} else if (e.widget == faxText) {\n\t\t\t\t\tperson.setFax(faxText.getText());\n\t\t\t\t} else if (e.widget == emailText) {\n\t\t\t\t\tperson.setEmail(emailText.getText());\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\tnameText.addModifyListener(modifyListener);\n\t\tfirstnameText.addModifyListener(modifyListener);\n\t\tstreetText.addModifyListener(modifyListener);\n\t\tpostalcodeText.addModifyListener(modifyListener);\n\t\tcityText.addModifyListener(modifyListener);\n\t\ttelephoneText.addModifyListener(modifyListener);\n\t\tmobileText.addModifyListener(modifyListener);\n\t\tfaxText.addModifyListener(modifyListener);\n\t\temailText.addModifyListener(modifyListener);\n\t\tactiveMemberCheckButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tperson.setActiveMember(activeMemberCheckButton.getSelection());\n\t\t\t}\n\t\t});\n\t\tdateTime.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tCalendar c = Calendar.getInstance();\n\t\t\t\tc.set(dateTime.getYear(), dateTime.getMonth(),\n\t\t\t\t\t\tdateTime.getDay());\n\t\t\t\tperson.setBirthday(c.getTime());\n\t\t\t}\n\t\t});\n\n\t\treturn container;\n\t}", "public FlxRadioButtonGroup()\n\t{\n\t\tthis(0);\n\t}", "private JRadioButton getJRadioButtonGrey() {\r\n\t\tif (buttGrey == null) {\r\n\t\t\tbuttGrey = new JRadioButton();\r\n\t\t\tbuttGrey.setText(\"Grey\");\r\n\t\t\tbuttGrey.setToolTipText(\"grey level output image\");\r\n\t\t\tbuttGrey.addActionListener(this);\r\n\t\t\tbuttGrey.setActionCommand(\"parameter\");\r\n\t\t}\r\n\t\treturn buttGrey;\r\n\t}", "@Override\n\tpublic void onCheckedChanged(RadioGroup group, int checkedId) {\n\t\tswitch(checkedId)\n\t\t{\n\t\tcase R.id.broad_radio_public:{\n\t\t\tcontactContainer.setVisibility(View.GONE);\n\t\t\tvisibility=\"1\";\n\t\t\taddContacts.setText(\"JU CMS\");\n\t\t\tcustom_name=\"\";\n\t\t\tcustom_id=\" \";\n\n\t\t}\n\t\tbreak;\n\n\t\tcase R.id.broad_radio_custom:{\n\t\t\tcontactContainer.setVisibility(View.VISIBLE);\n\t\t\tvisibility=\"0\";\n\t\t\taddContacts.setText(\"\");\n\t\t\taddContacts.setHint(\"Add Contacts\");\n\t\t}\n\t\tbreak;\n\t\t}\n\t}", "private void m16076c() {\n this.f13514c = (RadioButton) getInflater().inflate(C0633g.abc_list_menu_item_radio, this, false);\n addView(this.f13514c);\n }", "@Test\n\tpublic void testRadioGroup_4()\n\t\tthrows Exception {\n\t\tJSONObject jsonWrapperObj = new JSONObject();\n\n\t\tRadioGroup result = new RadioGroup(jsonWrapperObj);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getOptions());\n\t\tassertEquals(null, result.getName());\n\t\tassertEquals(null, result.getId());\n\t}", "@Override\n public View renderForEdit(LayoutInflater layout, Plot plot, Activity activity, ViewGroup parent) {\n\n View container = null;\n\n if (this.canEdit) {\n container = layout.inflate(R.layout.plot_field_edit_row, parent, false);\n Object value = plot.getValueForKey(this.key);\n\n// ((TextView) container.findViewById(R.id.field_label)).setText(this.label);\n TextInputLayout newEdit = container.findViewById(R.id.field_label_new);\n newEdit.setHint(this.label+\" in \"+this.unitText);\n TextInputEditText newEditValue= newEdit.findViewById(R.id.field_value_new);\n// EditText edit = (EditText) container.findViewById(R.id.field_value);\n// TextView unitLabel = ((TextView) container.findViewById(R.id.field_unit));\n\n String safeValue = (!JSONObject.NULL.equals(value)) ? value.toString() : \"\";\n// edit.setText(safeValue);\n ((TextInputEditText)newEdit.findViewById(R.id.field_value_new)).setText(safeValue);\n\n this.valueView = newEditValue;\n// unitLabel.setText(this.unitText);\n\n if (this.format != null) {\n setFieldKeyboard(newEditValue);\n }\n }\n\n return container;\n }", "@Test\n\tpublic void testRadioGroup_7()\n\t\tthrows Exception {\n\t\tJSONObject jsonWrapperObj = new JSONObject();\n\n\t\tRadioGroup result = new RadioGroup(jsonWrapperObj);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getOptions());\n\t\tassertEquals(null, result.getName());\n\t\tassertEquals(null, result.getId());\n\t}", "public CheckGroupField addCheckGroupField(final String key, final Object[] options) {\n String label = key;\n CheckGroupField groupField = new CheckGroupField(getComposite(), _form, key, label, false);\n groupField.adapt(_formToolkit);\n _form.mapField(key, groupField);\n groupField.addButtons(options);\n return groupField;\n }", "public Alunos() {\n initComponents();\n ButtonGroup bg = new ButtonGroup(); \n \n//Agora basta vc adicionar os seus RadioButtons ao objeto desta classe. \n \nbg.add(rdNome); \nbg.add(rdID); \nbg.add(rdNomeEditar);\nbg.add(rdIdEditar);\n }", "@Test\n\tpublic void testRadioGroup_2()\n\t\tthrows Exception {\n\t\tJSONObject jsonWrapperObj = new JSONObject();\n\n\t\tRadioGroup result = new RadioGroup(jsonWrapperObj);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getOptions());\n\t\tassertEquals(null, result.getName());\n\t\tassertEquals(null, result.getId());\n\t}", "Composite createBlockContent( Composite parent, FormToolkit toolkit );", "@Override\n\tprotected Control createDialogArea(Composite parent) {\n\t\tComposite container = (Composite) super.createDialogArea(parent);\n\n\t\tLabel lblAreYouSure = new Label(container, SWT.WRAP | SWT.CENTER);\n\t\tGridData gd_lblAreYouSure = new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1);\n\t\tlblAreYouSure.setLayoutData(gd_lblAreYouSure);\n\t\tlblAreYouSure.setText(DialogStrings.RemoveUserDialog_AreYouSure1 + username + DialogStrings.RemoveUserDialog_AreYouSure2 + projectName + DialogStrings.RemoveUserDialog_AreYouSure3);\n\n\t\treturn container;\n\t}", "protected Control createDialogArea(Composite parent) {\n\t\t//Composite composite = (Composite) super.createDialogArea(parent);\n\t\tComposite composite = new Composite(parent, SWT.NULL);\n\t\t\n\t\tGridLayout layout = new GridLayout(5, false);\n\t\tlayout.marginWidth = 15;\n\t\tlayout.marginHeight = 10;\n\t\tlayout.verticalSpacing = 8;\n\t\tcomposite.setLayout(layout);\n\t\t\n\t\tLabel l;\n\t\tGridData gridData;\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\tl.setText(\"Fecha:\");\n\t\ttxtFecha = new Text(composite, SWT.BORDER);\n\t\tgridData = new GridData(60,15);\n\t\ttxtFecha.setLayoutData(gridData);\n\t\t//txtFecha.addKeyListener(this.crearKeyAdapter(txtFecha)); // calendar ya incluye esto\n\t\t\n\t\tbFecha = new Button(composite, SWT.NONE);\n\t\tgridData = new GridData(16,16);\n\t\t//gridData.horizontalSpan = 2;\n\t\tbFecha.setLayoutData(gridData);\n\t\timage = AbstractUIPlugin.imageDescriptorFromPlugin(pluginId, IImageKeys.CALENDARIO);\n\t\tbFecha.setImage(image.createImage());\n\t\tbFecha.addSelectionListener(this.crearCalendario(shell, txtFecha));\n\n\t\tfinal Label labelNoches = new Label(composite, SWT.NONE);\n\t\tlabelNoches.setText(\"Cantidad:\");\n\t\t\n\t\tComposite compQty = new Composite(composite, SWT.NONE);\n\t\tlayout = new GridLayout(3, false);\n\t\tlayout.marginWidth = 0;\n\t\tcompQty.setLayout(layout);\n\t\t\n\t\ttxtCantidad = new Text(compQty, SWT.BORDER);\n\t\tgridData = new GridData(25,15);\n\t\ttxtCantidad.setLayoutData(gridData);\n\t\t\n\t\tfinal Label labelEspacios = new Label(compQty, SWT.NONE);\n\t\tlabelEspacios.setText(\"PAX(s):\");\n\t\tlabelEspacios.setAlignment(SWT.RIGHT);\n\t\tgridData = new GridData(45, 15);\n\t\tgridData.horizontalIndent = 10;\n\t\tlabelEspacios.setLayoutData(gridData);\n\t\ttxtEspacios = new Text(compQty, SWT.BORDER);\n\t\ttxtEspacios.setLayoutData(new GridData(25,15));\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\tl.setText(\"Tipo:\");\n\t\tcomboTipo = new Combo(composite, SWT.READ_ONLY);\n\t\tgridData = new GridData();\n\t\tgridData.widthHint = 120;\n\t\tgridData.horizontalSpan = 2;\n\t\tcomboTipo.setLayoutData(gridData);\n\t\tcdTipoProductos = cdController.getComboDataTipoProductos();\n\t\tcomboTipo.setItems(cdTipoProductos.getTexto());\n\t\tcomboTipo.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tint indice = comboTipo.getSelectionIndex();\n\t\t\t\tif (indice != -1) {\n\t\t\t\t\tLong seleccionado = cdTipoProductos.getKeyAsLongByIndex(indice);\n\t\t\t\t\tproductos.filtrarByTipo(seleccionado, true); // eliminamos cualquier filtro previo\n\t\t\t\t}\n\t\t\t\tcomboProducto.setItems(productos.getTexto());\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\tl.setText(\"Actividad:\");\n\t\tcomboProducto = new Combo(composite, SWT.READ_ONLY);\n\t\tgridData = new GridData();\n\t\tgridData.widthHint = 150;\n\t\tcomboProducto.setLayoutData(gridData);\n\t\t/*\n\t\tcomboProducto.addSelectionListener(new SelectionListener() {\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\n\t\t\t\tSystem.out.println(\"widgetDefSel: \" + comboProducto.getText());\n\t\t\t}\n\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tSystem.out.println(\"widgetSelected: \" + comboProducto.getText());\t\n\t\t\t}\n\t\t});\n\t\tcomboProducto.addModifyListener(new ModifyListener() {\n\t\t\tpublic void modifyText(ModifyEvent e) {\n\t\t\t\tSystem.out.println(\"modifyText: \" + comboProducto.getText());\t\n\t\t\t}\n\t\t});\n\t\t*/\n\t\t\n\t\tcomboProducto.addModifyListener(new ModifyListener() {\n\t\t\tpublic void modifyText(ModifyEvent e) {\n\t\t\t\tif (!comboProducto.getText().equals(\"\")) {\n\t\t\t\t\tLong idProducto = productos.getIdProductoByName(comboProducto.getText());\n\t\t\t\t\tProducto p = productos.getProductoByIdProducto(idProducto);\n\t\t\t\t\tString tipoReserva = p.getTipoReserva();\n\t\t\t\t\tisRecursoAEP = p.isHotelAEP();\n\t\t\t\t\tisModificable = p.isModificable();\n\t\t\t\t\tprecioMinimo = p.getPrecioMinimo();\n\t\t\t\t\tSystem.out.println(\"Minimo: \" + precioMinimo);\n\t\t\t\t\tif (tipoReserva.equals(\"Hotel\") || tipoReserva.equals(\"Hospedaje\")) {\n\t\t\t\t\t\tlabelNoches.setText(\"Noche(s):\");\n\t\t\t\t\t\tlabelNoches.pack();\n\t\t\t\t\t\tlabelNoches.redraw();\n\t\t\t\t\t\tlabelEspacios.setText(\"Room(s):\");\n\t\t\t\t\t\tlabelEspacios.pack();\n\t\t\t\t\t\tlabelEspacios.redraw();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tlabelNoches.setText(\"Cantidad:\");\n\t\t\t\t\t\tlabelNoches.pack();\n\t\t\t\t\t\tlabelNoches.redraw();\n\t\t\t\t\t\tlabelEspacios.setText(\"PAX(s):\");\n\t\t\t\t\t\tlabelEspacios.setAlignment(SWT.RIGHT);\n\t\t\t\t\t\tlabelEspacios.pack();\n\t\t\t\t\t\tlabelEspacios.redraw();\n\t\t\t\t\t}\n\t\t\t\t\tlistaTipoPrecio.setEnabled(true);\n\t\t\t\t\tlistaTipoPrecio.deselectAll();\n\t\t\t\t\ttxtPrecio.setText(\"\");\n\t\t\t\t\ttxtPrecio.setEditable(isModificable == null ? false : isModificable.booleanValue());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\t/*\n\t\tcomboProducto.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tint idProducto = productos.getIdProductoByName(comboProducto.getText());\n\t\t\t\tProducto p = productos.getProductoByIdProducto(idProducto);\n\t\t\t\tString tipoReserva = p.getTipoReserva();\n\t\t\t\tif (tipoReserva.equals(\"Hotel\") || tipoReserva.equals(\"Hospedaje\")) {\n\t\t\t\t\tlabelNoches.setText(\"Noche(s):\");\n\t\t\t\t\tlabelNoches.pack();\n\t\t\t\t\tlabelNoches.redraw();\n\t\t\t\t\tlabelEspacios.setText(\"Room(s):\");\n\t\t\t\t\tlabelEspacios.pack();\n\t\t\t\t\tlabelEspacios.redraw();\n\t\t\t\t} else {\n\t\t\t\t\tlabelNoches.setText(\"Cantidad:\");\n\t\t\t\t\tlabelNoches.pack();\n\t\t\t\t\tlabelNoches.redraw();\n\t\t\t\t\tlabelEspacios.setText(\"PAXs:\");\n\t\t\t\t\tlabelEspacios.setAlignment(SWT.RIGHT);\n\t\t\t\t\tlabelEspacios.pack();\n\t\t\t\t\tlabelEspacios.redraw();\n\t\t\t\t}\n\t\t\t\tlistaTipoPrecio.setEnabled(true);\n\t\t\t\tlistaTipoPrecio.deselectAll();\n\t\t\t\ttxtPrecio.setText(\"\");\n\t\t\t}\n\t\t});\n\t\t*/\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\tl.setText(\"Tipo de precio:\");\n\t\tgridData = new GridData();\n\t\tgridData.verticalAlignment = SWT.TOP;\n\t\tgridData.verticalIndent = 3;\n\t\tl.setLayoutData(gridData);\n\t\tgridData = new GridData();\n\t\tgridData.widthHint = 75;\n\t\tgridData.horizontalSpan = 2;\n\n\t\tlistaTipoPrecio = new List(composite, SWT.SINGLE | SWT.BORDER);\n\t\tlistaTipoPrecio.setLayoutData(gridData);\n\t\tlistaTipoPrecio.setItems(new String[] {\"Comisionable\", \"Operador\", \"Público\"});\n\t\tlistaTipoPrecio.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tobtenerPrecio(listaTipoPrecio.getSelection()[0]);\n\t\t\t}\n\t\t});\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\tl.setText(\"Precio:\");\n\t\tgridData = new GridData();\n\t\tgridData.verticalAlignment = SWT.TOP;\n\t\tgridData.verticalIndent = 3;\n\t\tl.setLayoutData(gridData);\n\t\t\n\t\tComposite compPrecio = new Composite(composite, SWT.NONE);\n\t\tlayout = new GridLayout(3, false);\n\t\tlayout.marginWidth = 0;\n\t\tlayout.marginHeight = 0;\n\t\tcompPrecio.setLayout(layout);\n\t\tgridData = new GridData();\n\t\tgridData.verticalAlignment = SWT.TOP;\n\t\tcompPrecio.setLayoutData(gridData);\n\t\t\n\t\ttxtPrecio = new Text(compPrecio, SWT.BORDER);\n\t\ttxtPrecio.setEditable(false);\n\t\tgridData = new GridData(50,15);\n\t\tgridData.verticalAlignment = SWT.TOP;\n\t\ttxtPrecio.setLayoutData(gridData);\n\n\t\tButton bCuadrar = new Button(compPrecio, SWT.PUSH);\n\t\tgridData = new GridData(12,16);\n\t\tbCuadrar.setLayoutData(gridData);\n\t\timage = AbstractUIPlugin.imageDescriptorFromPlugin(pluginId, \"icons/cuadrar.gif\");\n\t\tbCuadrar.setImage(image.createImage());\n\t\tbCuadrar.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tSystem.out.println(\"Botón de cuadrar...\");\n\t\t\t\tcuadrarCotizacion();\n\t\t\t}\n\t\t});\t\n\t\t\n\t\tbVisible = new Button(compPrecio, SWT.CHECK);\n\t\tbVisible.setText(\"Visible\");\n\t\tgridData = new GridData();\n\t\tgridData.horizontalIndent = 15;\n\t\tbVisible.setLayoutData(gridData);\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\tl.setText(\"Comentarios:\");\n\t\tgridData = new GridData();\n\t\tgridData.verticalAlignment = SWT.TOP;\n\t\tgridData.verticalIndent = 3;\n\t\tl.setLayoutData(gridData);\n\t\ttxtComentario = new Text(composite, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.WRAP);\n\t\tgridData = new GridData(GridData.FILL, GridData.CENTER, false, false);\n\t\tgridData.horizontalSpan = 4;\n\t\tgridData.heightHint = 40;\n\t\ttxtComentario.setLayoutData(gridData);\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\tl.setText(\"Un \\\"*\\\" al inicio del comentario mostrará el mismo en el PDF de la cotización.\");\n\t\tgridData = new GridData();\n\t\tgridData.horizontalSpan = 4;\n\t\tl.setLayoutData(gridData);\n\t\t\n\t\tl = new Label(composite, SWT.NONE);\n\t\t\n\t\tl = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);\n\t gridData = new GridData(GridData.FILL, GridData.CENTER, false, false);\n\t\tgridData.heightHint = 10;\n\t\tgridData.horizontalSpan = 5;\n\t\tl.setLayoutData(gridData);\n\n\t\tllenarCampos();\n\t\t\n\t\treturn composite;\n\t}", "public void setReaderGroup(String value) {\n setAttributeInternal(READERGROUP, value);\n }", "public void createControl(Composite parent) {\r\n\t\tComposite container = new Composite(parent, SWT.NULL);\r\n\r\n\t\tsetControl(container);\r\n\t\tcontainer.setLayout(new GridLayout(2, false));\r\n\r\n\t\tLabel lblNewLabel = new Label(container, SWT.NONE);\r\n\t\tlblNewLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false,\r\n\t\t\t\tfalse, 1, 1));\r\n\t\tlblNewLabel.setText(\"Package:\");\r\n\r\n\t\ttext = new Text(container, SWT.BORDER);\r\n\t\ttext.addModifyListener(this);\r\n\t\ttext.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\r\n\r\n\t\tGroup grpAutoCreate = new Group(container, SWT.NONE);\r\n\t\tgrpAutoCreate.setText(\"auto create\");\r\n\t\tgrpAutoCreate.setLayout(new GridLayout(1, false));\r\n\t\tgrpAutoCreate.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false,\r\n\t\t\t\tfalse, 2, 1));\r\n\r\n\t\tSelectionAdapter sa = new SelectionAdapter() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tButton b = (Button) e.getSource();\r\n\t\t\t\tInteger index = (Integer) b.getData(\"index\");\r\n\t\t\t\tselectionStats[index] = b.getSelection();\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tfor (int i = 0; i < chkBtns.length; i++) {\r\n\t\t\tButton b = chkBtns[i] = new Button(grpAutoCreate, SWT.CHECK);\r\n\t\t\tb.setSelection(selectionStats[i]);\r\n\t\t\tb.setText(baseFileNames[i]);\r\n\t\t\tb.setData(\"index\", i);\r\n\t\t\tb.addSelectionListener(sa);\r\n\t\t}\r\n\t}", "@Test\n\tpublic void testRadioGroup_1()\n\t\tthrows Exception {\n\n\t\tRadioGroup result = new RadioGroup();\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getOptions());\n\t\tassertEquals(null, result.getName());\n\t\tassertEquals(null, result.getId());\n\t}", "@Override\r\n\tpublic void createControl(Composite parent) {\n\t\t\r\n\t\tComposite container = new Composite(parent, SWT.NONE);\r\n\t\tGridData gd = new GridData(GridData.FILL_HORIZONTAL);\r\n\t\tcontainer.setLayout(new GridLayout(2, false));\r\n\t\t\r\n\t\tLabel nameLabel = new Label(container, SWT.NULL);\r\n\t\tnameText = new Text(container, SWT.BORDER | SWT.SINGLE);\r\n\t\tnameLabel.setText(BundleInternationalization.getString(\"NameLabel\")+\":\");\r\n\t\tnameText.setLayoutData(gd);\r\n\t\t// Listener to validate the project name when user finishes writing\r\n\t\tnameText.addModifyListener(new ModifyListener() {\r\n\t\t\tpublic void modifyText(ModifyEvent e) {\r\n\t\t\t\twizardChanged();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tLabel descriptionLabel = new Label(container, SWT.NULL);\r\n\t\tdescriptionText = new Text(container, SWT.BORDER | SWT.SINGLE);\r\n\t\tdescriptionLabel.setText(BundleInternationalization.getString(\"DescriptionLabel\")+\":\");\r\n\t\tdescriptionText.setLayoutData(gd);\r\n\t\t// Listener to validate the project description when user finishes writing\r\n\t\tdescriptionText.addModifyListener(new ModifyListener() {\r\n\t\t\tpublic void modifyText(ModifyEvent e) {\r\n\t\t\t\twizardChanged();\r\n\t\t\t}\r\n\t\t});\t\t\r\n\t\t\r\n\t\tLabel startDateLabel = new Label(container, SWT.NULL);\r\n\t\tstartDateText = new DateTime(container, SWT.DATE | SWT.BORDER | SWT.SINGLE);\r\n\t\tstartDateLabel.setText(BundleInternationalization.getString(\"StartDateLabel\")+\":\");\t\r\n\t\tstartDateText.setLayoutData(gd);\r\n\t\t\r\n\r\n\t\tLabel endDateLabel = new Label(container, SWT.NULL);\r\n\t\tendDateText = new DateTime(container, SWT.DATE | SWT.BORDER | SWT.SINGLE);\r\n\t\tendDateLabel.setText(BundleInternationalization.getString(\"EndDateLabel\")+\":\");\t\r\n\t\tendDateText.setLayoutData(gd);\r\n\t\t\r\n\t\tLabel budgetLabel = new Label(container, SWT.NULL);\r\n\t\tbudgetText = new Text(container, SWT.BORDER | SWT.SINGLE);\r\n\t\tbudgetLabel.setText(BundleInternationalization.getString(\"BudgetLabel\")+\":\");\r\n\t\tbudgetText.setLayoutData(gd);\r\n\t\tbudgetText.addListener (SWT.Verify, new Listener () {\r\n public void handleEvent (Event event) {\r\n \tvalidateDouble(event);\r\n }\r\n\t\t}); \r\n\t\tbudgetText.addModifyListener(new ModifyListener() {\r\n\t\t\tpublic void modifyText(ModifyEvent e) {\r\n\t\t\t\twizardChanged();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tLabel quantityLinesLabel = new Label(container, SWT.NULL);\r\n\t\tquantityLinesText = new Text(container, SWT.BORDER | SWT.SINGLE);\r\n\t\tquantityLinesLabel.setText(BundleInternationalization.getString(\"NumberCodeLinesLabel\")+\":\");\r\n\t\tquantityLinesText.setLayoutData(gd);\r\n\t\tquantityLinesText.addListener (SWT.Verify, new Listener () {\r\n public void handleEvent (Event event) {\r\n \tvalidateInt(event);\r\n }\r\n\r\n\t\t});\r\n\t\tquantityLinesText.addModifyListener(new ModifyListener() {\r\n\t\t\tpublic void modifyText(ModifyEvent e) {\r\n\t\t\t\twizardChanged();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tLabel domainLabel = new Label(container, SWT.NULL);\r\n\t\tdomainText = new Text(container, SWT.BORDER | SWT.SINGLE);\r\n\t\tdomainLabel.setText(BundleInternationalization.getString(\"DomainLabel\")+\":\");\r\n\t\tdomainText.setLayoutData(gd);\r\n\t\t// Listener to validate the domain text when user finishes writing\r\n\t\tdomainText.addModifyListener(new ModifyListener() {\r\n\t\t\tpublic void modifyText(ModifyEvent e) {\r\n\t\t\t\twizardChanged();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tLabel progLanguageLabel = new Label(container, SWT.NULL);\r\n\t\tprogLanguageCombo = new Combo(container, SWT.DROP_DOWN | SWT.READ_ONLY);\r\n\t\tprogLanguageLabel.setText(BundleInternationalization.getString(\"ProgrammingLanguageLabel\")+\":\");\r\n\t\t// progLanguageCombo.setLayoutData(gd);\t\r\n\t\tprogLanguageCombo.setItems (new String [] {\"Java\", \"Ada\", \"C++\", \"C#\", \"Cobol\", \"ASP\", \"JSP\"});\r\n\t\tprogLanguageCombo.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\twizardChanged();\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tLabel estimatedHoursLabel = new Label(container, SWT.NULL);\r\n\t\testimatedHoursText = new Text(container, SWT.BORDER | SWT.SINGLE);\r\n\t\testimatedHoursLabel.setText(BundleInternationalization.getString(\"EstimatedHoursLabel\")+\":\");\r\n\t\testimatedHoursText.setLayoutData(gd);\r\n\t\testimatedHoursText.addListener (SWT.Verify, new Listener () {\r\n public void handleEvent (Event event) {\r\n \tvalidateInt(event);\r\n }\r\n\r\n\t\t});\r\n\t\testimatedHoursText.addModifyListener(new ModifyListener() {\r\n\t\t\tpublic void modifyText(ModifyEvent e) {\r\n\t\t\t\twizardChanged();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\twizardChanged();\r\n\t\tsetControl(container);\r\n\r\n\t}", "protected void createControl() {\n\t\tGridLayout layout = new GridLayout(1, true);\n\t\tsetLayout(layout);\n\t\tsetLayoutData(new GridData(GridData.FILL_BOTH));\n\n\t\tComposite nameGroup = new Composite(this, SWT.NONE);\n\t\tlayout = new GridLayout();\n\t\tlayout.numColumns = 2;\n\t\tnameGroup.setLayout(layout);\n\t\tnameGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n\n\t\tLabel label = new Label(nameGroup, SWT.NONE);\n\t\tlabel.setText(PHPServerUIMessages\n\t\t\t\t.getString(\"ServerCompositeFragment.nameLabel\")); //$NON-NLS-1$\n\t\tGridData data = new GridData();\n\t\tlabel.setLayoutData(data);\n\n\t\tname = new Text(nameGroup, SWT.BORDER);\n\t\tdata = new GridData(GridData.FILL_HORIZONTAL);\n\t\tname.setLayoutData(data);\n\t\tname.addModifyListener(new ModifyListener() {\n\t\t\tpublic void modifyText(ModifyEvent e) {\n\t\t\t\tif (getServer() != null)\n\t\t\t\t\tmodifiedValuesCache.serverName = name.getText();\n\t\t\t\tvalidate();\n\t\t\t}\n\t\t});\n\t\tcreateURLGroup(this);\n\t\tinit();\n\t\tvalidate();\n\n\t\tDialog.applyDialogFont(this);\n\n\t\tname.forceFocus();\n\t}", "protected void createJenkinsCLIFieldEditors() {\n /* ------------------------ JENKINS CLI ------------------------- */\n /* -------------------------------------------------------------- */\n Group jenkinsCLIComposite = new Group(getFieldEditorParent(), SWT.NONE);\n jenkinsCLIComposite.setText(\"Jenkins CLI setup\");\n GridLayout jenkinsCLICompositeLayout = new GridLayout(3, true);\n jenkinsCLICompositeLayout.marginWidth = 10;\n jenkinsCLICompositeLayout.marginHeight = 0;\n jenkinsCLICompositeLayout.marginLeft = 20;\n jenkinsCLIComposite.setLayout(jenkinsCLICompositeLayout);\n\n GridData jenkinsCLICompositeLayoutData = new GridData();\n jenkinsCLICompositeLayoutData.horizontalAlignment = GridData.FILL;\n jenkinsCLICompositeLayoutData.verticalAlignment = GridData.BEGINNING;\n jenkinsCLICompositeLayoutData.grabExcessHorizontalSpace = true;\n jenkinsCLICompositeLayoutData.grabExcessVerticalSpace = false;\n // jenkinsCLICompositeLayoutData.verticalSpan = 2;\n jenkinsCLICompositeLayoutData.horizontalSpan = 3;\n\n jenkinsCLIComposite.setLayoutData(jenkinsCLICompositeLayoutData);\n\n jenkinsUrl = new StringFieldEditor(P_JENKINS_URL.getId(), \"Jenkins URL (optional)\", jenkinsCLIComposite);\n jenkinsUrl.getLabelControl(jenkinsCLIComposite).setToolTipText(\"Set jenkins URL - when empty default value will be used\");\n jenkinsUrl.setEmptyStringAllowed(true);\n addField(jenkinsUrl);\n\n Text jenkinsDefaultURLtext = SWTFactory.createText(jenkinsCLIComposite, SWT.NONE, SWT.FILL);\n jenkinsDefaultURLtext.setFont(JFaceResources.getFontRegistry().getItalic(JFaceResources.DEFAULT_FONT));\n jenkinsDefaultURLtext.setEditable(false);\n jenkinsDefaultURLtext.setText(\"(\" + jenkinsDefaultURLProvider.createDefaultURLDescription() + \")\");\n\n // disable certificate check\n certificateCheckDisabled = new BooleanFieldEditor(P_CERTIFICATE_CHECK_DISABLED.getId(), \"Disable certificate check\", jenkinsCLIComposite);\n addField(certificateCheckDisabled);\n\n BooleanFieldEditor useEclipseProxySettingsEnabled = new BooleanFieldEditor(P_USE_ECLIPSE_PROXY_SETTINGS_ENABLED.getId(), \"Use eclipse proxy settings\", jenkinsCLIComposite);\n addField(useEclipseProxySettingsEnabled);\n\n String name = JenkinsEditorPreferenceConstants.JENKINS_AUTH_MODE.getId();\n String labelText = \"Authentication done by\";\n\n /* @formatter:off */\n String[][] entryNamesAndValues = \n new String[][] { \n getLabelAndValue(AuthMode.API_TOKEN),\n getLabelAndValue(AuthMode.SSH)\n };\n /* @formatter:on */\n ComboFieldEditor comboFieldEditor = new ComboFieldEditor(name, labelText, entryNamesAndValues, jenkinsCLIComposite);\n addField(comboFieldEditor);\n\n jarFileLocation = new FileFieldEditor(P_PATH_TO_JENKINS_CLI_JAR.getId(), \"Path to jenkins-cli.jar (optional)\", jenkinsCLIComposite);\n jarFileLocation.setFileExtensions(new String[] { \"*.jar\" });\n jarFileLocation.getLabelControl(jenkinsCLIComposite).setToolTipText(\"You can set here the location of another jenkins-cli.jar which you can download by your running Jenkins instance.\");\n addField(jarFileLocation);\n\n Label passwordLabel = new Label(jenkinsCLIComposite, SWT.LEFT);\n passwordLabel.setText(\"User credentials : \");\n\n Text passwordField = new Text(jenkinsCLIComposite, SWT.SINGLE | SWT.PASSWORD);\n GridData data = new GridData(GridData.FILL_HORIZONTAL);\n passwordField.setLayoutData(data);\n if (temporaryCredentials == null) {\n ISecurePreferences preferences = SecurePreferencesFactory.getDefault();\n ISecurePreferences node = preferences.node(ID_SECURED_CREDENTIALS);\n temporaryCredentials = new UserCredentials();\n try {\n temporaryCredentials.username = node.get(ID_SECURED_USER_KEY, \"\");\n temporaryCredentials.secret = node.get(ID_SECURED_API_KEY, \"\");\n } catch (StorageException e1) {\n temporaryCredentials.username = \"\";\n temporaryCredentials.secret = \"\";\n }\n }\n passwordField.setText(temporaryCredentials.secret);\n\n Button credentialsButton = new Button(jenkinsCLIComposite, SWT.PUSH);\n credentialsButton.setText(\"Credentials ...\");\n credentialsButton.addSelectionListener(new SelectionAdapter() {\n\n @Override\n public void widgetSelected(SelectionEvent e) {\n temporaryCredentials = JenkinsEditorMessageDialogSupport.INSTANCE.showUsernamePassword(\"API Key\", temporaryCredentials);\n }\n });\n credentialsButton.setLayoutData(data);\n\n Button connectionTestButton = new Button(jenkinsCLIComposite, SWT.PUSH);\n connectionTestButton.setText(\"Test connection\");\n connectionTestButton.setImage(EclipseUtil.getImage(\"icons/jenkinseditor/preferences/check.png\", JenkinsEditorActivator.getDefault()));\n connectionTestButton.setToolTipText(\"Tries to connect to Jenkins via current configuration\");\n connectionTestButton.addSelectionListener(new JenkinsTestCommandExecutionListener(this, new JenkinsLinterCLICommand(), null));\n\n Button createAPITokenButton = new Button(jenkinsCLIComposite, SWT.PUSH);\n createAPITokenButton.setText(\"Create new API token\");\n createAPITokenButton.setImage(EclipseUtil.getImage(\"icons/jenkinseditor/preferences/add_apitoken.png\", JenkinsEditorActivator.getDefault()));\n createAPITokenButton.setToolTipText(\"Opens the jenkins user configuration of the configured user in Browser. Here a new API token can be added\");\n createAPITokenButton.addSelectionListener(new JenkinsOpenLinkInBrowserListener(new URIFetcher() {\n\n @Override\n public URI getURI() {\n StringBuilder sb = createStringBuilderWithConfiguredJenkinsBaseURL();\n if (!StringUtils.isEmpty(temporaryCredentials.username)) {\n sb.append(\"/user/\");\n sb.append(temporaryCredentials.username);\n sb.append(\"/configure\");\n }\n\n return URI.create(sb.toString());\n }\n\n }));\n\n Button downloadCLIButton = new Button(jenkinsCLIComposite, SWT.PUSH);\n downloadCLIButton.setText(\"Download CLI.jar\");\n downloadCLIButton.setImage(EclipseUtil.getImage(\"icons/jenkinseditor/preferences/download.png\", JenkinsEditorActivator.getDefault()));\n downloadCLIButton.setToolTipText(\"Downloads new jenkins CLI jar via browser. Uses the current configuration to determine Jenkins URL\");\n downloadCLIButton.addSelectionListener(new JenkinsOpenLinkInBrowserListener(new URIFetcher() {\n\n @Override\n public URI getURI() {\n StringBuilder sb = createStringBuilderWithConfiguredJenkinsBaseURL();\n if (!StringUtils.isEmpty(temporaryCredentials.username)) {\n sb.append(\"/jnlpJars/jenkins-cli.jar\");\n }\n\n return URI.create(sb.toString());\n }\n\n }));\n\n if (EclipseDevelopmentSettings.DEBUG_ADD_SPECIAL_MENUS) {\n Button showCommandsTestButton = new Button(jenkinsCLIComposite, SWT.PUSH);\n JenkinsTestCommandExecutionListener listener = new JenkinsTestCommandExecutionListener(this, new JenkinsHelpCommand(), new HelpCommandResultHandler());\n listener.setErrorMessage(\"Was not able to fetch commands\");\n listener.setStartMessage(\"Try to fetch commands from server\");\n listener.setSuccessmessage(\"Fetched commands from server look at console\");\n showCommandsTestButton.setText(\"Show commands\");\n showCommandsTestButton.addSelectionListener(listener);\n }\n\n }", "@Override\r\n\tpublic void createPartControl(Composite parent) {\n\t\tthis.parent = parent;\r\n\t\tColor backgroundColor = Display.getCurrent().getSystemColor(SWT.COLOR_WHITE);\r\n\t\t\r\n\t\tGridLayout rl_parent = new GridLayout();\r\n\t\trl_parent.numColumns = 2;\r\n//\t\trl_parent.wrap = false;\r\n\t\tparent.setLayout(rl_parent);\r\n\t\t\r\n\t\tforwardBackComposite = new Composite(parent, SWT.NONE);\r\n\t\tGridData gd_forwardBackComposite = new GridData(917, 480);\r\n\t\tgd_forwardBackComposite.horizontalAlignment = SWT.FILL;\r\n\t\tgd_forwardBackComposite.verticalAlignment = SWT.FILL;\r\n\t\tgd_forwardBackComposite.grabExcessHorizontalSpace = true;\r\n\t\tgd_forwardBackComposite.grabExcessVerticalSpace = true;\r\n\t\tforwardBackComposite.setLayoutData(gd_forwardBackComposite);\r\n\t\tforwardBackComposite.setBackground(backgroundColor);\r\n\t\tGridLayout rl_forwardBackComposite = new GridLayout();\r\n//\t\trl_forwardBackComposite.wrap = false;\r\n\t\tforwardBackComposite.setLayout(rl_forwardBackComposite);\r\n\t\t\r\n\t\tComposite forwardBackTimelineComposite = new Composite(forwardBackComposite, SWT.NONE);\r\n\t\tGridData gd_forwardBackTimelineComposite = new GridData(541, -1);\r\n\t\tgd_forwardBackTimelineComposite.horizontalAlignment = SWT.FILL;\r\n\t\tgd_forwardBackTimelineComposite.verticalAlignment = SWT.TOP;\r\n\t\tforwardBackTimelineComposite.setLayoutData(gd_forwardBackTimelineComposite);\r\n\t\tforwardBackTimelineComposite.setBackground(backgroundColor);\r\n\t\tGridLayout gl_forwardBackTimelineComposite = new GridLayout();\r\n\t\tgl_forwardBackTimelineComposite.numColumns = 2;\r\n\t\tforwardBackTimelineComposite.setLayout(gl_forwardBackTimelineComposite);\r\n\t\t\r\n\t\ttimeCombo = new Combo(forwardBackTimelineComposite, SWT.READ_ONLY);\r\n\t\tGridData gd_timeCombo = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_timeCombo.widthHint = 86;\r\n\t\ttimeCombo.setLayoutData(gd_timeCombo);\r\n\t\ttimeCombo.setItems(TIME);\r\n\t\ttimeCombo.select(0);\r\n\t\ttimeCombo.addSelectionListener(new SelectionAdapter() {\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tANotificationBalloon.getInstance().showNotification();\r\n\t\t\t\tif (EditorsUI.getPreferenceStore().getBoolean(Preferences.CONNECT_TO_SERVER)) {\r\n\t\t\t\t\tString text = timeCombo.getText();\r\n\t\t\t\t\tString path = getCurrentProjectPath();\r\n\t\t\t\t\tnew Thread(()->{\r\n\t\t\t\t\t\treplayListener.updateTimeSpent(path, text);\r\n\t\t\t\t\t\tEHEventRecorder.getInstance().recordCommand(new ShowStatCommand(text));\r\n\t\t\t\t\t}).start();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tJOptionPane optionPane = new JOptionPane(NOT_CONNECTED, JOptionPane.WARNING_MESSAGE);\r\n\t\t\t\t\tJDialog dialog = optionPane.createDialog(\"ERROR\");\r\n\t\t\t\t\tdialog.setAlwaysOnTop(true);\r\n\t\t\t\t\tdialog.setVisible(true);\r\n\t\t\t\t}\r\n//\t\t\t\tPlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {\r\n//\t\t\t\t\tpublic void run() {\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\tString text = timeCombo.getText();\r\n//\t\t\t\treplayListener.updateTimeSpent(text);\r\n//\t\t\t\tEHEventRecorder.getInstance().recordCommand(new ShowStatCommand(text));\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n//\t\ttimer.schedule(new TimerTask() {\r\n//\t\t\tpublic void run() {\r\n//\t\t\t\tPlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() {\r\n//\t\t\t\t\tpublic void run() {\r\n//\t\t\t\t\t\t//exception, may due to Eclipse versions\r\n//\t\t\t\t\t\ttry {\r\n//\t\t\t\t\t\t\treplayListener.updateTimeSpent(timeCombo.getText());\r\n//\t\t\t\t\t\t} catch (Exception e) {\r\n//\t\t\t\t\t\t\t// TODO: handle exception\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}, ONE_MIN, ONE_MIN);\r\n\t\t\r\n\t\ttimelbl = new Label(forwardBackTimelineComposite, SWT.NONE);\r\n\t\ttimelbl.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\r\n\t\t\r\n\t\ttabFolder2 = new TabFolder(forwardBackComposite, SWT.NONE);\r\n\t\tGridData gd_tabFolder2 = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);\r\n\t\tgd_tabFolder2.heightHint = 287;\r\n\t\ttabFolder2.setLayoutData(gd_tabFolder2);\r\n\t\t\r\n\t\tcommandsTab = new TabItem(tabFolder2, SWT.NONE);\r\n\t\tcommandsTab.setText(\"Commands\");\r\n\t\t\r\n\t\tsc_1 = new ScrolledComposite(tabFolder2, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);\r\n\t\tcommandsTab.setControl(sc_1);\r\n\t\tsc_1.setTouchEnabled(true);\r\n\t\tsc_1.setShowFocusedControl(true);\r\n\t\tsc_1.setAlwaysShowScrollBars(true);\r\n\t\tsc_1.setExpandHorizontal(true);\r\n\t\tsc_1.setExpandVertical(true);\r\n\t\tcommandLabel = new Label(sc_1, SWT.NONE);\r\n\t\tsc_1.setMinSize(new Point(5000, 5000));\r\n\t\tsc_1.setContent(commandLabel);\r\n\t\t\r\n\t\tmetricsTab = new TabItem(tabFolder2, SWT.NONE);\r\n\t\tmetricsTab.setText(\"Metrics\");\r\n\t\t\r\n\t\tsc = new ScrolledComposite(tabFolder2, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);\r\n\t\tsc.setTouchEnabled(true);\r\n\t\tsc.setShowFocusedControl(true);\r\n\t\tsc.setExpandVertical(true);\r\n\t\tsc.setExpandHorizontal(true);\r\n\t\tsc.setAlwaysShowScrollBars(true);\r\n\t\tmetricsTab.setControl(sc);\r\n\t\t\r\n\t\tMetricTable = new Table(sc, SWT.NONE);\r\n\t\tMetricTable.setLinesVisible(true);\r\n\t\tMetricTable.setHeaderVisible(true);\r\n\t\t\r\n\t\tfillMetricHeaders();\r\n\t\t\r\n\t\tsc.setContent(MetricTable);\r\n\t\tsc.setMinSize(MetricTable.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\t\tsc.setMinSize(new Point(5000, 5000));\r\n\t\t\r\n\t\tComposite timelineComposite = new Composite(forwardBackComposite, SWT.NONE);\r\n\t\tGridData gd_timelineComposite = new GridData(SWT.FILL, SWT.BOTTOM, true, false, 1, 1);\r\n\t\tgd_timelineComposite.widthHint = 910;\r\n\t\ttimelineComposite.setLayoutData(gd_timelineComposite);\r\n\t\tGridLayout timelineLayout = new GridLayout(1, false);\r\n\t\ttimelineComposite.setLayout(timelineLayout);\r\n\t\t\r\n\t\tComposite composite = new Composite(timelineComposite, SWT.NONE);\r\n\t\tGridData gd_composite = new GridData(SWT.FILL, SWT.CENTER, true, true, 1, 1);\r\n\t\tgd_composite.widthHint = 1088;\r\n\t\tcomposite.setLayoutData(gd_composite);\r\n\t\tcomposite.setLayout(new GridLayout(2, false));\r\n\t\tLabel timelineLabel = new Label(composite, SWT.NONE);\r\n\t\ttimelineLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\r\n\t\ttimelineLabel.setText(\"Timeline \");\r\n\t\ttimeline = new Slider(composite, SWT.HORIZONTAL);\r\n\t\tGridData gd_timeline = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);\r\n\t\tgd_timeline.widthHint = 826;\r\n\t\ttimeline.setLayoutData(gd_timeline);\r\n\t\ttimeline.setMinimum(0);\r\n\t\ttimeline.setMaximum(1000);\r\n\t\ttimeline.setSelection(1000);\r\n\t\ttimeline.setIncrement(1);\r\n\t\ttimeline.setBounds(115, 50, 500, 500);\r\n\t\ttimeline.addDragDetectListener(new SliderHandler());\r\n\t\t\r\n\t\tComposite composite_1 = new Composite(timelineComposite, SWT.NONE);\r\n\t\tcomposite_1.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, true, 1, 1));\r\n\t\tcomposite_1.setLayout(new GridLayout(7, false));\r\n\t\t\r\n\t\tbtnExport = new Button(composite_1, SWT.NONE);\r\n\t\tGridData gd_btnExport = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_btnExport.widthHint = 70;\r\n\t\tbtnExport.setLayoutData(gd_btnExport);\r\n\t\tbtnExport.setText(\"Export\");\r\n\t\tbtnExport.addSelectionListener(new SelectionAdapter() {\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n//\t\t\t\tString path = getCurrentProjectPath();\r\n\t\t\t\tIProject project = EHUtilities.getCurrentProject();\r\n\t\t\t\tnew Thread(()->{\r\n\t\t\t\t\treplayListener.zipCurrentProject(project);\r\n\t\t\t\t}).start();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tButton backButton = new Button(composite_1, SWT.PUSH);\r\n\t\tGridData gd_backButton = new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_backButton.widthHint = 70;\r\n\t\tbackButton.setLayoutData(gd_backButton);\r\n\t\tbackButton.setBackground(backgroundColor);\r\n\t\tbackButton.addSelectionListener(new BackButtonHandler());\r\n\t\tbackButton.setText(\"Back\");\r\n\t\t\r\n\t\ttext = new Text(composite_1, SWT.BORDER);\r\n\t\ttext.setText(\"1\");\r\n\t\tGridData gd_text = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1);\r\n\t\tgd_text.widthHint = 50;\r\n\t\ttext.setLayoutData(gd_text);\r\n\t\t\r\n\t\tstepSelector = new Combo(composite_1, SWT.DROP_DOWN | SWT.READ_ONLY);\r\n\t\tstepSelector.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, true, 1, 1));\r\n\t\tstepSelector.setItems(steps);\r\n\t\tstepSelector.setText(EDIT);\r\n\t\t\r\n\t\tButton forwardButton = new Button(composite_1, SWT.PUSH);\r\n\t\tforwardButton.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\r\n\t\tforwardButton.setBackground(backgroundColor);\r\n\t\tforwardButton.addSelectionListener(new ForwardButtonHandler());\r\n\t\tforwardButton.setBackground(backgroundColor);\r\n\t\tforwardButton.setText(\"Forward\");\r\n\t\t\r\n\t\tbtnShowPause = new Button(composite_1, SWT.CHECK);\r\n\t\tbtnShowPause.setText(\"Show Pause\");\r\n\t\tnew Label(composite_1, SWT.NONE);\r\n\t\tbtnShowPause.addSelectionListener(new SelectionListener() {\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tshowPause = !showPause;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent e) {\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\ttabFolder = new CTabFolder(parent, SWT.BORDER);\r\n\t\tGridData gd_tabFolder = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);\r\n\t\tgd_tabFolder.widthHint = 1046;\r\n\t\ttabFolder.setLayoutData(gd_tabFolder);\r\n\t\ttabFolder.setSelectionBackground(Display.getCurrent().getSystemColor(SWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT));\r\n\t\t\r\n\t\ttabItem = new CTabItem(tabFolder, SWT.CLOSE);\r\n\t\ttabItem.setText(\"New Item\");\r\n\t\t\r\n\t\tscrolledComposite = new ScrolledComposite(tabFolder, SWT.H_SCROLL | SWT.V_SCROLL);\r\n\t\ttabItem.setControl(scrolledComposite);\r\n\t\tscrolledComposite.setExpandHorizontal(true);\r\n\t\tscrolledComposite.setExpandVertical(true);\r\n\t\t\r\n\t\tlblFile = new Label(scrolledComposite, SWT.NONE);\r\n\t\tlblFile.setText(\"File\");\r\n\t\tscrolledComposite.setContent(lblFile);\r\n\t\tscrolledComposite.setMinSize(lblFile.computeSize(SWT.DEFAULT, SWT.DEFAULT));\r\n\t\tparent.layout(true);\r\n\t}", "@Override\n public void createPartControl(Composite parent) {\n errorColor = parent.getDisplay().getSystemColor(SWT.COLOR_RED);\n parent.addControlListener(new ControlListener() {\n\n @Override\n public void controlMoved(ControlEvent e) {\n //\n }\n\n @Override\n public void controlResized(ControlEvent e) {\n computeOrientation();\n }\n });\n\n GridLayout parentLayout = new GridLayout();\n parentLayout.numColumns = 1;\n parentLayout.marginBottom = -5;\n parentLayout.marginTop = -5;\n parentLayout.marginLeft = -5;\n parentLayout.marginRight = -5;\n\n parent.setLayout(parentLayout);\n\n stackComposite = new Composite(parent, SWT.NONE);\n stackComposite.setLayoutData(new GridData(GridData.FILL_BOTH));\n stackComposite.setLayout(new StackLayout());\n\n statusLineManager = new StatusLineManager();\n statusControl = statusLineManager.createControl(parent, SWT.NONE);\n statusControl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n\n createTextControl();\n\n createTextContextMenu();\n\n createVerifyControl();\n\n initModes();\n\n if (modes.get(BCOConstants.F_SHOW_ANALYZER)) {\n ((StackLayout) stackComposite.getLayout()).topControl = verifyControl;\n } else {\n ((StackLayout) stackComposite.getLayout()).topControl = textControl;\n }\n\n createSelectionProvider();\n\n createToolbarActions();\n\n setEnabled(false);\n\n// activateView();\n }", "public radioButtonClass()\n {\n setTitle(\"radioButtons\");\n setLayout(new FlowLayout());\n \n tf=new JTextField(\"DUDE!!! WTF\", 20);\n add(tf);\n \n plain_b= new JRadioButton(\"plain\",true); //for radio buttons one needs to be true so when they are grouped it unchecks all except one\n bold_b= new JRadioButton(\"bold\",false);\n italic_b= new JRadioButton(\"italic\",false);\n bi_b= new JRadioButton(\"bold&italic\",false);\n add(plain_b);\n add(bold_b);\n add(italic_b);\n add(bi_b);\n \n //needed to create a family so that each one knows who is checked/unchecked\n group= new ButtonGroup(); \n group.add(plain_b); //group.add as its being added to group only\n group.add(bold_b);\n group.add(italic_b);\n group.add(bi_b);\n \n \n //to create fonts that will be passsed directly as an object to handler class\n pf= new Font(\"Serif\",Font.PLAIN,15);\n bf= new Font(\"Serif\",Font.BOLD,15);\n itf= new Font(\"Serif\",Font.ITALIC,15);\n bif= new Font(\"Serif\",Font.BOLD+Font.ITALIC,15);\n tf.setFont(pf); //setting initial font for the text field\n \n //waits for event and directly pass object(Of font) to cnstructor \n plain_b.addItemListener(new Handler(pf));\n bold_b.addItemListener(new Handler(bf));\n italic_b.addItemListener(new Handler(itf));\n bi_b.addItemListener(new Handler(bif));\n }", "protected abstract void createFieldEditors();", "private JPanel makeFieldPanel(int type, int which)\r\n {\r\n\t JPanel panel = new JPanel();\r\n\t panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));\r\n panel.setBackground(new Color(168,168,168));\r\n\t panel.add(new JLabel(\" \"));\r\n\t \r\n\t panel.add(new JLabel(\"Field\"));\r\n\t panel.add(Box.createHorizontalStrut(GAP));\r\n\r\n\t JComboBox<String> field = new JComboBox<String>(fields);\r\n\t components[type][which][FormatData.F_FIELD] = field;\r\n\t \r\n\t setComboParams(field, FIELD_SIZE);\r\n field.setToolTipText(\"Select field to be included in output\");\r\n field.setSelectedIndex(0);\r\n\r\n\t panel.add(field);\r\n\t panel.add(Box.createHorizontalStrut(GAP));\r\n\t \r\n\t panel.add(new JLabel(\"Title\"));\r\n\t panel.add(Box.createHorizontalStrut(GAP));\r\n\r\n\t JTextField title = new JTextField();\r\n\t components[type][which][FormatData.F_TITLE] = title;\r\n title.setMinimumSize(TEXT_SIZE);\r\n title.setMaximumSize(TEXT_SIZE);\r\n title.setPreferredSize(TEXT_SIZE);\r\n title.setToolTipText(\"Title of field (Use \\\\n to skip lines)\");\r\n panel.add(title);\r\n\t panel.add(Box.createHorizontalStrut(GAP));\r\n \t \r\n\t panel.add(new JLabel(\"Format\"));\r\n\t panel.add(Box.createHorizontalStrut(GAP));\r\n\r\n\t JComboBox<String> format = new JComboBox<String>(formats);\r\n\t components[type][which][FormatData.F_FORMAT] = format;\r\n\t setComboParams(format, FORMAT_SIZE);\r\n format.setToolTipText(\"Selection controls the field format\");\r\n format.setSelectedItem(\"Normal\");\r\n panel.add(format);\r\n\t panel.add(Box.createHorizontalStrut(GAP));\r\n \r\n\t JComboBox<String> separator = new JComboBox<String>(separators);\r\n\t components[type][which][FormatData.F_SEPARATOR] = separator;\r\n\t setComboParams(separator, SEPARATOR_SIZE);\r\n separator.setToolTipText(\"Selection controls how field separates from other text\");\r\n\t panel.add(separator);\r\n\t panel.add(Box.createHorizontalStrut(GAP));\r\n\t \r\n\t if (type==FormatData.t.D_FLD.ordinal())\r\n\t {\t\t \r\n\t\t JLabel label = new JLabel(\"Position Before\");\r\n\t\t panel.add(label);\r\n\t\t panel.add(Box.createHorizontalStrut(GAP));\r\n\t\r\n\t\t JCheckBox position = new JCheckBox();\r\n\t components[type][which][FormatData.F_POSITION] = position;\r\n\t \r\n\t String tip = \"Position field before or after Definition\";\r\n\t \t \r\n\t position.setToolTipText(tip);\r\n\t\t panel.add(position);\r\n\t }\r\n\t panel.add(Box.createHorizontalGlue());\r\n\t return panel;\r\n }", "@Override\r\n\tpublic void createPartControl(Composite parent) {\n\r\n\t}", "public void actionPerformed( ActionEvent e )\r\n {\n JRadioButton b = new JRadioButton();\r\n radioGroup.add( b );\r\n b.setSelected( true );\r\n radioGroup.remove( b );\r\n }", "public GroupPanel(GUIViewOther mainPanel, String groupName, JTabbedPane parent) {\n\t\tthis.groupName = groupName;\n\t\tthis.mainPanel = mainPanel;\n\t\tthis.parent = parent;\n initComponents();\n\t\ttextField.addActionListener(this);\n }", "@Test\n\tpublic void testRadioGroup_5()\n\t\tthrows Exception {\n\t\tJSONObject jsonWrapperObj = new JSONObject();\n\n\t\tRadioGroup result = new RadioGroup(jsonWrapperObj);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getOptions());\n\t\tassertEquals(null, result.getName());\n\t\tassertEquals(null, result.getId());\n\t}", "@Test\n\tpublic void testRadioGroup_6()\n\t\tthrows Exception {\n\t\tJSONObject jsonWrapperObj = new JSONObject();\n\n\t\tRadioGroup result = new RadioGroup(jsonWrapperObj);\n\n\t\t// add additional test code here\n\t\tassertNotNull(result);\n\t\tassertEquals(null, result.getOptions());\n\t\tassertEquals(null, result.getName());\n\t\tassertEquals(null, result.getId());\n\t}", "private void onClickRadioButton() {\n radioGroupChoice.setOnCheckedChangeListener(this);\n }", "protected Control createDialogArea(Composite root) {\n\t\tdisplayDevice = root.getDisplay();\n\t\tComposite parent = new Composite(root, SWT.NONE);//SWT.NONE);\n\t\t//parent.setText(\"夜服功能\");\n\t\tGridLayout toplayout = new GridLayout(1,true);\n\t\ttoplayout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);\n\t\ttoplayout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);\n\t\ttoplayout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);\n\t\ttoplayout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);\n\t\tparent.setLayout(toplayout);\n\t\tparent.setLayoutData(new GridData(GridData.FILL_BOTH));\n\t\t\n\t\t\n\t\t\n\t\n\t\t//RadioGroupFieldEditor rdGroup = new RadioGroupFieldEditor(\"dt_en\",\"夜服功能\",2,new String[][]{{\"启用\",\"true\"},{\"禁用\",\"false\"}},composite,true);\n\t\t//rdGroup.setPreferenceName(\"dt_en\");\n\t\t/*Label enPre = new Label(composite,SWT.NONE);\n\t\tenPre.setText(\"enable:\");\n\t\tenPre.setLayoutData(new GridData(SWT.END,SWT.CENTER,false,false));\n\t\t\n\t\tT_dt_en = new Text(composite,SWT.SINGLE | SWT.BORDER);\n\t\t//keyLabel.setTextLimit(36);\n\t\tT_dt_en.setText(this.m_dt_en);\n\t\tGridData keyGridData = new GridData(SWT.FILL,SWT.FILL,false,false);\n\t\tkeyGridData.widthHint = 200;\n\t\tT_dt_en.setLayoutData(keyGridData);\n\t\t*/\n\t\ttabFolder = new TabFolder(parent,SWT.NONE);\n\t\t\n\t\t\n\t\tComposite composite = new Composite(tabFolder,SWT.NONE);\n\t\tcomposite.setLayoutData(new GridData(SWT.CENTER,SWT.CENTER,false,false));\n\t\tcreateDTArea(composite);\n\t\tTabItem numTab = new TabItem(tabFolder,SWT.NONE);\n\t\tnumTab.setText(\"夜服号码\");\n\t\tnumTab.setControl(composite);\n\t\t\n\t\t\n\t\t\n\t\tComposite composite2 = new Composite(tabFolder,SWT.NONE);\n\t\tcomposite2.setLayoutData(new GridData(SWT.CENTER,SWT.CENTER,false,false));\n\t\tcreateTimeArea(composite2);\n\t\tTabItem timeTab = new TabItem(tabFolder,SWT.NONE);\n\t\ttimeTab.setText(\"夜服时间段\");\n\t\ttimeTab.setControl(composite2);\n\t\t\n\t\tComposite header = new Composite(parent,SWT.NONE);\n\t\t\n\t\tGridLayout headerlayout = new GridLayout(3,true);\n\t\theaderlayout.marginHeight = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN);\n\t\theaderlayout.marginWidth = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN);\n\t\theaderlayout.verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);\n\t\theaderlayout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);\n\t\theader.setLayout(headerlayout);\n\t\theader.setLayoutData(new GridData(GridData.FILL_BOTH));\n\t\t\n\t\tLabel enPre = new Label(header,SWT.NONE);\n\t\tenPre.setText(\"夜服功能:\");\n\t\tenPre.setLayoutData(new GridData(SWT.END,SWT.CENTER,false,false));\n\t\t\n\t\t//Button[] rds = n Button[2]; \n\t\tdt_choice_en = new Button(header,SWT.RADIO);\n\t\tdt_choice_en.setText(\"启用\");\n\t\tdt_choice_en.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,false));\n\t\t\n\t\tdt_choice_dis = new Button(header,SWT.RADIO);\n\t\tdt_choice_dis.setText(\"禁用\");\n\t\tdt_choice_dis.setLayoutData(new GridData(SWT.FILL,SWT.FILL,false,false));\n\t\t\n\t\t\n\t\t//T_dt_en.setFocus();\n\t\tdt_choice_en.addSelectionListener(new SelectionListener(){\n\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\t\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttabFolder.setEnabled(true);\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tdt_choice_dis.addSelectionListener(new SelectionListener(){\n\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\t\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\ttabFolder.setEnabled(false);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tupdateDisplay();\n\t\t\n\t\t\n\t\t\n\t\treturn parent;\n\t}", "public ViewHolderRadioButton(@org.jetbrains.annotations.NotNull com.iaai.android.bdt.feature.fastSearchFilter.newFindVehicle.FastSearchMoreFilterAdapter r2, com.iaai.android.databinding.RowItemFastSearchMoreFacetRadioButtonBinding r3) {\n /*\n r1 = this;\n java.lang.String r0 = \"binding\"\n kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull(r3, r0)\n r1.this$0 = r2\n android.view.View r2 = r3.getRoot()\n java.lang.String r0 = \"binding.root\"\n kotlin.jvm.internal.Intrinsics.checkExpressionValueIsNotNull(r2, r0)\n r1.<init>(r2)\n r1.binding = r3\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.iaai.android.bdt.feature.fastSearchFilter.newFindVehicle.FastSearchMoreFilterAdapter.ViewHolderRadioButton.<init>(com.iaai.android.bdt.feature.fastSearchFilter.newFindVehicle.FastSearchMoreFilterAdapter, com.iaai.android.databinding.RowItemFastSearchMoreFacetRadioButtonBinding):void\");\n }", "public int getRadio() {\n return radio;\n }", "private Button addRadioOption(Composite composite, final boolean requiresTextBox, \n\t\t\t\t\t\t\t\t final int selectedButtonIndex, String label) {\n\t\tfinal Button newButton = new Button(composite, SWT.RADIO);\n\t\tnewButton.setText(label);\n\t\tGridData gridData = new GridData();\n\t\tnewButton.setLayoutData(gridData);\n\t\t\n\t\t/* \n\t\t * Add a listener for this radio button. Depending on the radio button chosen,\n\t\t * we may (or may not) want to enable the text box entry.\n\t\t */\n\t\tnewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t\t/* was the radio button recently selected? */\n\t\t\t\tif (newButton.getSelection()) {\n\t\t\t\t\tradioButtonState = selectedButtonIndex;\n\t\t\t\t\t\n\t\t\t\t\t/* does this option require a (non-empty) text box field? */\n\t\t\t\t\tif (requiresTextBox) {\n\t\t\t\t\t\ttextBox.setEnabled(true);\n\t\t\t\t\t\tgetButton(OK).setEnabled(!textBox.getText().isEmpty());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t/* or is no text box input required? */\n\t\t\t\t\telse {\n\t\t\t\t\t\ttextBox.setEnabled(false);\n\t\t\t\t\t\tgetButton(OK).setEnabled(true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\treturn newButton;\n\t}", "public void createPartControl(Composite parent) {\n\n\t\tGridLayout gridLayout;\n\t\tgridLayout = new GridLayout();\n\t\tparent.setLayout(gridLayout);\n\t\tgridLayout.numColumns = 1;\n\n\t\tthis.dateLabel = new Label(parent, SWT.NONE);\n\t\tthis.dateLabel.setText(STOP_MSG);\n\n\t\tGridData gridData1;\n\t\tgridData1 = new GridData();\n\t\tgridData1.horizontalAlignment = GridData.FILL;\n\t\tgridData1.grabExcessHorizontalSpace = true;\n\t\tgridData1.grabExcessVerticalSpace = false;\n\t\tthis.dateLabel.setLayoutData(gridData1);\n\n\t\tLabel separator;\n\t\tseparator =\n\t\t\t\tnew Label(parent, SWT.SEPARATOR | SWT.HORIZONTAL | SWT.LINE_SOLID);\n\t\tseparator.setLayoutData(gridData1);\n\n\t\tLabel label2 = new Label(parent, SWT.NONE);\n\t\tlabel2.setText(\"select format:\");\n\t\tlabel2.setLayoutData(gridData1);\n\n\t\tthis.viewer =\n\t\t\t\tnew TableViewer(parent, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL\n\t\t\t\t\t\t| SWT.CENTER | SWT.FULL_SELECTION);\n\t\tthis.viewer.setContentProvider(new ViewContentProvider());\n\t\tthis.viewer.setLabelProvider(new ViewLabelProvider());\n\t\tthis.viewer.getTable().setHeaderVisible(true);\n\n\t\tTableColumn column1;\n\t\tcolumn1 = new TableColumn(viewer.getTable(), SWT.LEFT);\n\t\tcolumn1.setText(\"Date Renderer\");\n\t\tcolumn1.setWidth(180);\n\n\t\tTableColumn column2;\n\t\tcolumn2 = new TableColumn(viewer.getTable(), SWT.LEFT);\n\t\tcolumn2.setText(\"Type\");\n\t\tcolumn2.setWidth(250);\n\n\t\tTableColumn column3;\n\t\tcolumn3 = new TableColumn(viewer.getTable(), SWT.LEFT);\n\t\tcolumn3.setText(\"Resource\");\n\t\tcolumn3.setWidth(200);\n\n\t\tTableColumn column4;\n\t\tcolumn4 = new TableColumn(viewer.getTable(), SWT.LEFT);\n\t\tcolumn4.setText(\"Provider\");\n\t\tcolumn4.setWidth(200);\n\n\t\tthis.viewer.setInput(getViewSite());\n\n\t\tGridData gridData2;\n\t\tgridData2 = new GridData();\n\t\tgridData2.horizontalAlignment = GridData.FILL;\n\t\tgridData2.verticalAlignment = GridData.FILL;\n\t\tgridData2.grabExcessHorizontalSpace = true;\n\t\tgridData2.grabExcessVerticalSpace = true;\n\t\tthis.viewer.getTable().setLayoutData(gridData2);\n\n\t\tthis.viewer.addSelectionChangedListener(new ISelectionChangedListener() {\n\n\t\t\t/*\n\t\t\t * (non-Javadoc)\n\t\t\t * @see\n\t\t\t * org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged\n\t\t\t * (org.eclipse.jface.viewers.SelectionChangedEvent)\n\t\t\t */\n\t\t\tpublic void selectionChanged(SelectionChangedEvent e) {\n\n\t\t\t\tint index;\n\t\t\t\tindex = viewer.getTable().getSelectionIndex();\n\n\t\t\t\tif (index > -1) {\n\t\t\t\t\tdateFormatProvider = dateFormatProviders.get(index);\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tdateFormatProvider = null;\n\t\t\t\t}\n\t\t\t\t// end else.\n\t\t\t}\n\t\t});\n\n\t\tthis.makeActions();\n\t\tthis.hookContextMenu();\n\t\tthis.contributeToActionBars();\n\t}" ]
[ "0.71095717", "0.61426526", "0.6068514", "0.6004979", "0.59971845", "0.5839324", "0.5826389", "0.569249", "0.56682444", "0.5639574", "0.56268966", "0.56154037", "0.5566035", "0.5556295", "0.5543362", "0.5530603", "0.5491002", "0.5488758", "0.5488138", "0.54518723", "0.5411516", "0.5391341", "0.53825784", "0.5348026", "0.5345605", "0.5336816", "0.5295296", "0.5293819", "0.5287893", "0.5282684", "0.52415055", "0.5215673", "0.519741", "0.51903754", "0.51673466", "0.51614773", "0.5110481", "0.51104575", "0.5106251", "0.5105766", "0.5050372", "0.50407594", "0.5034864", "0.50279576", "0.5022612", "0.5004596", "0.49897686", "0.49892378", "0.49865255", "0.4971546", "0.49661088", "0.4958592", "0.49532506", "0.4944907", "0.4938558", "0.4930917", "0.49218324", "0.49159783", "0.48918277", "0.48870504", "0.48791504", "0.4873149", "0.4868279", "0.48617423", "0.48608768", "0.48477122", "0.48362783", "0.48361772", "0.48134646", "0.4809395", "0.48081893", "0.48042294", "0.48028278", "0.47956777", "0.4792392", "0.47883976", "0.47877476", "0.47842252", "0.4779016", "0.477106", "0.4761208", "0.47540885", "0.47538114", "0.4753413", "0.47465813", "0.47458324", "0.47392473", "0.4738349", "0.47363323", "0.47335914", "0.47319737", "0.4731127", "0.4716768", "0.4715055", "0.47116083", "0.47070113", "0.47050318", "0.47030783", "0.46992555", "0.4698362" ]
0.6668513
1
System.err.println("SPU.makeNewStringField() starting for key = " + key);
public StringFieldEditor makeNewModifiedMarkField( PreferencePage page, PreferencesTab tab, IPreferencesService service, String level, String key, String text, Composite parent // boolean isEnabled, boolean isEditable, // boolean hasSpecialValue, String specialValue, // boolean emptyValueAllowed, String emptyValue, // boolean isRemovable ) { Composite fieldHolder = new Composite(parent, SWT.NONE); fieldHolder.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); // boolean onProjectLevelWithNullProject = // level != null && level.equals(IPreferencesService.PROJECT_LEVEL) && service.getProject() == null; // boolean notOnARealLevel = level == null; // boolean onAFunctioningLevel = !onProjectLevelWithNullProject && !notOnARealLevel; StringFieldEditor field = new StringFieldEditor(page, tab, service, level, key + "Marker", "", 1, fieldHolder); // if (!onProjectLevelWithNullProject) { // setField(field, fieldHolder); // addStringPropertyChangeListeners(service, level, field, key, fieldHolder); // } else { // //setField(field, fieldHolder); // //addStringPropertyChangeListeners(service, level, field, key, fieldHolder); // } // //field.getTextControl().setEnabled(isEnabled); // if (onProjectLevelWithNullProject || notOnARealLevel) { // //System.out.println("SPU.makeNewStringField(..): disabling all"); // field.getTextControl().setEnabled(false); // field.getTextControl().setEditable(false); // field.setEnabled(false, field.getParent()); // } else if (onAFunctioningLevel) { // //System.out.println("SPU.makeNewStringField(..): setting all to " + isEnabled); // field.getTextControl().setEnabled(isEnabled); // field.getTextControl().setEditable(isEditable); // field.setEnabled(isEnabled, field.getParent()); // } // // if (hasSpecialValue) // field.setSpecialValue(specialValue); // else // field.setNoSpecialValue(); // field.setEmptyValueAllowed(emptyValueAllowed); // if (level == null) field.setRemovable(false); // can never remove from a field that doesn't have a stored value // else if (level.equals(IPreferencesService.DEFAULT_LEVEL)) field.setRemovable(false); // can never remove from Default level // else field.setRemovable(isRemovable); //System.err.println("SPU.makeNewStringField() ending for key = " + key); return field; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void rebuildKey() {\r\n\r\n final StringBuffer sb = new StringBuffer();\r\n\r\n sb.append(getClassField().getCanonicalName());\r\n for (final Object k : this.keyPartList) {\r\n sb.append(k.toString()).append('|');\r\n }\r\n this.key = sb.toString();\r\n }", "public String func_176882_c() {\n/* */ return this.field_176891_j;\n/* */ }", "protected abstract SingleKeyVersionDataExtractor<DATA> generateDataKeyAsString () ;", "java.lang.String getField1338();", "java.lang.String getFieldOrThrow(\n java.lang.String key);", "public String toString() {\n/* */ return this.field_176894_i;\n/* */ }", "java.lang.String getField1337();", "java.lang.String getField1003();", "java.lang.String getField1862();", "java.lang.String getField1330();", "java.lang.String getField1336();", "java.lang.String getField1334();", "java.lang.String getField1762();", "private ModelValidationException constructFieldException (String fieldName, \n\t\tString key)\n\t{\n\t\treturn constructFieldException(ModelValidationException.ERROR, \n\t\t\tfieldName, key);\n\t}", "java.lang.String getField1339();", "java.lang.String getField1343();", "java.lang.String getField1373();", "java.lang.String getField1342();", "java.lang.String getField1713();", "java.lang.String getField1335();", "java.lang.String getField1307();", "java.lang.String getField1741();", "java.lang.String getField1317();", "java.lang.String getField1726();", "java.lang.String getField1344();", "java.lang.String getField1744();", "java.lang.String getField1361();", "java.lang.String getField1353();", "java.lang.String getField1331();", "java.lang.String getField1844();", "java.lang.String getField1853();", "java.lang.String getField1026();", "java.lang.String getField1332();", "java.lang.String getField1009();", "java.lang.String getField1841();", "java.lang.String getField1834();", "java.lang.String getField1734();", "java.lang.String getField1743();", "java.lang.String getField1641();", "java.lang.String getField1838();", "java.lang.String getField1386();", "java.lang.String getField1753();", "java.lang.String getField1347();", "java.lang.String getField1387();", "java.lang.String getField1392();", "java.lang.String getField1372();", "java.lang.String getField1742();", "java.lang.String getField1562();", "java.lang.String getField1462();", "com.icare.eai.schema.om.evSORequest.EvSORequestDocument.EvSORequest.Key addNewKey();", "java.lang.String getField1826();", "java.lang.String getField1351();", "java.lang.String getField1761();", "java.lang.String getField1312();", "java.lang.String getField1829();", "java.lang.String getField1873();", "java.lang.String getField1843();", "java.lang.String getField1364();", "java.lang.String getField1316();", "java.lang.String getField1729();", "java.lang.String getField1543();", "java.lang.String getField1732();", "java.lang.String getField1643();", "java.lang.String getField1653();", "java.lang.String getField1315();", "java.lang.String getField1773();", "java.lang.String getField1727();", "java.lang.String getField1861();", "java.lang.String getField1352();", "java.lang.String getField1662();", "java.lang.String getField1738();", "java.lang.String getField1273();", "java.lang.String getField1374();", "java.lang.String getField1382();", "java.lang.String getField1673();", "java.lang.String getField1837();", "java.lang.String getField1434();", "java.lang.String getField1368();", "java.lang.String getField1443();", "java.lang.String getField1747();", "java.lang.String getField1473();", "java.lang.String getField1311();", "java.lang.String getField1513();", "java.lang.String getField1863();", "java.lang.String getField1314();", "java.lang.String getField1313();", "java.lang.String getField1367();", "java.lang.String getField1381();", "java.lang.String getField1823();", "java.lang.String getField1388();", "java.lang.String getField1573();", "java.lang.String getField1377();", "java.lang.String getField1714();", "java.lang.String getField1213();", "java.lang.String getField1846();", "java.lang.String getField1813();", "java.lang.String getField1764();", "java.lang.String getField1389();", "java.lang.String getField1453();", "java.lang.String getField1661();", "java.lang.String getField1786();" ]
[ "0.6112467", "0.5840598", "0.58028156", "0.57344896", "0.5668754", "0.56683165", "0.56586", "0.56549907", "0.56494343", "0.563262", "0.5628146", "0.5609847", "0.560172", "0.56004155", "0.5582382", "0.55530614", "0.55471146", "0.5546123", "0.55456924", "0.55414987", "0.5531903", "0.5531302", "0.5529998", "0.552674", "0.552597", "0.5521435", "0.5516285", "0.5509625", "0.5506241", "0.5505462", "0.5504345", "0.5503619", "0.55034876", "0.5502749", "0.55001104", "0.5493686", "0.5493261", "0.54903984", "0.54902726", "0.5482216", "0.5482187", "0.5481234", "0.548073", "0.54793084", "0.5478508", "0.5476342", "0.5475509", "0.54740334", "0.54723924", "0.5470563", "0.54704803", "0.54700136", "0.54688466", "0.5467844", "0.5464624", "0.54632556", "0.5462367", "0.54606515", "0.54605687", "0.54572207", "0.54561394", "0.54561156", "0.54550034", "0.54541224", "0.54502875", "0.5448594", "0.5447401", "0.544528", "0.5445104", "0.54436094", "0.54435605", "0.5441864", "0.5439275", "0.5436461", "0.54333603", "0.5433076", "0.54325783", "0.5431555", "0.5431012", "0.5430733", "0.5428721", "0.542872", "0.54271024", "0.5426843", "0.5426132", "0.54260856", "0.5426043", "0.5426012", "0.54244334", "0.5424371", "0.54232335", "0.5421128", "0.5420854", "0.54200864", "0.54189664", "0.5417258", "0.54153186", "0.5414997", "0.5414183", "0.5413598", "0.5413281" ]
0.0
-1
/ Elements relating to project selection (As of 13 Sep 2006 these are only needed in the project preferences tab, so I have not made versions of them publicly available in the utilities class. They might be represented here if and when there is a need for creating project selection/deselection links in other places.)
public Control[] createDefaultAndApplyButtons(Composite parent, final PreferencesTab buttonHolder) { Composite buttonBar = new Composite(parent, SWT.NONE); GridLayout layout = new GridLayout(); layout.numColumns = 0; layout.marginHeight = 0; layout.marginWidth = 0; layout.makeColumnsEqualWidth = false; buttonBar.setLayout(layout); GridData bbgd = new GridData(SWT.END); buttonBar.setLayoutData(bbgd); //contributeButtons(buttonBar); boolean createDefaultAndApplyButton = true; if (createDefaultAndApplyButton) { layout.numColumns = layout.numColumns + 2; String[] labels = JFaceResources.getStrings(new String[] { "defaults", "apply" }); //$NON-NLS-2$//$NON-NLS-1$ //int widthHint = convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH); Button defaultsButton = new Button(buttonBar, SWT.PUSH); defaultsButton.setText(labels[0]); Dialog.applyDialogFont(defaultsButton); //GridData GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL); Point minButtonSize = defaultsButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true); //data.widthHint = Math.max(widthHint, minButtonSize.x); defaultsButton.setLayoutData(data); defaultsButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { buttonHolder.performDefaults(); } }); Button applyButton = new Button(buttonBar, SWT.PUSH); applyButton.setText(labels[1]); Dialog.applyDialogFont(applyButton); data = new GridData(GridData.HORIZONTAL_ALIGN_FILL); minButtonSize = applyButton.computeSize(SWT.DEFAULT, SWT.DEFAULT, true); //data.widthHint = Math.max(widthHint, minButtonSize.x); applyButton.setLayoutData(data); applyButton.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { buttonHolder.performApply(); } }); //applyButton.setEnabled(true); //isValid()); Dialog.applyDialogFont(buttonBar); } else { /* Check if there are any other buttons on the button bar. * If not, throw away the button bar composite. Otherwise * there is an unusually large button bar. */ if (buttonBar.getChildren().length < 1) buttonBar.dispose(); } return buttonBar.getChildren(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onSelectProject();", "private void updateProjectList() {\n\t\tfinal MultipleSelectionModel<Project> selectionModel = selectionList.getSelectionModel();\n\t\tfinal Object[] selectedIndices = selectionModel.getSelectedIndices().toArray();\n\t\tselectionModel.clearSelection();\n\t\tfor (final Object i : selectedIndices) {\n\t\t\tselectionModel.select((int) i);\n\t\t}\n\t}", "public SelectViewDialog(ProjectElement project, int selectedElements) {\r\n\t\tthis.selectedElements = selectedElements;\r\n\t\tthis.project = project;\r\n\t}", "static interface ElementSelectionListener {\n \n public void selectionChanged(MultiViewDescription oldOne, MultiViewDescription newOne);\n \n public void selectionActivatedByButton(MouseEvent e);\n \n public void selectionActivatedByButton(ActionEvent e);\n \n }", "public static AbstractElementListSelectionDialog createHaxeProjectsNamesDialog(\r\n\t\t\tShell shell, String selectedProject) {\r\n\r\n\t\tILabelProvider labelProvider = new LabelProvider() {\r\n\t\t\t@Override\r\n\t\t\tpublic Image getImage(Object element) {\r\n\t\t\t\treturn PluginImages.get(PluginImages.IMG_PROJECT);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tElementListSelectionDialog dialog = new ElementListSelectionDialog(\r\n\t\t\t\tshell, labelProvider);\r\n\r\n\t\t// Messages\r\n\t\tdialog.setTitle(\"Select Haxe Project\");\r\n\t\tdialog.setMessage(\"Enter a string to search for a project:\");\r\n\t\tdialog\r\n\t\t\t\t.setEmptyListMessage(\"There are no haXe projects. You should create one first.\");\r\n\r\n\t\t// Initialize the list of elements\r\n\t\tString[] projectNames = EclihxCore.getDefault().getHaxeWorkspace()\r\n\t\t\t\t.getHaxeProjectsNames();\r\n\r\n\t\tdialog.setElements(projectNames);\r\n\t\tdialog.setInitialSelections(new Object[] { selectedProject });\r\n\r\n\t\treturn dialog;\r\n\t}", "public abstract void selectInTree(@NotNull Project project, @NotNull SModel model, boolean focus);", "public abstract void selectInTree(@NotNull Project project, @NotNull SModule module, boolean focus);", "private ElementSelection getSelectedElements()\n {\n final int[] rowViewIndexes = this.getSelectedRows();\n final NetPlan np = callback.getDesign();\n\n final List<NetworkElement> elementList = new ArrayList<>();\n final List<Pair<Demand, Link>> frList = new ArrayList<>();\n\n if (rowViewIndexes.length != 0)\n {\n final int maxValidRowIndex = model.getRowCount() - 1 - (hasAggregationRow() ? 1 : 0);\n final List<Integer> validRows = new ArrayList<Integer>();\n for (int a : rowViewIndexes) if ((a >= 0) && (a <= maxValidRowIndex)) validRows.add(a);\n\n if (networkElementType == NetworkElementType.FORWARDING_RULE)\n {\n for (int rowViewIndex : validRows)\n {\n final int viewRowIndex = this.convertRowIndexToModel(rowViewIndex);\n final String demandInfo = (String) getModel().getValueAt(viewRowIndex, AdvancedJTable_forwardingRule.COLUMN_DEMAND);\n final String linkInfo = (String) getModel().getValueAt(viewRowIndex, AdvancedJTable_forwardingRule.COLUMN_OUTGOINGLINK);\n final int demandIndex = Integer.parseInt(demandInfo.substring(0, demandInfo.indexOf(\"(\")).trim());\n final int linkIndex = Integer.parseInt(linkInfo.substring(0, linkInfo.indexOf(\"(\")).trim());\n frList.add(Pair.of(np.getDemand(demandIndex), np.getLink(linkIndex)));\n }\n } else\n {\n for (int rowViewIndex : validRows)\n {\n final int viewRowIndex = this.convertRowIndexToModel(rowViewIndex);\n final long id = (long) getModel().getValueAt(viewRowIndex, 0);\n elementList.add(np.getNetworkElement(id));\n }\n }\n }\n\n // Parse into ElementSelection\n final Pair<List<NetworkElement>, List<Pair<Demand, Link>>> selection = Pair.of(elementList, frList);\n final boolean nothingSelected = selection.getFirst().isEmpty() && selection.getSecond().isEmpty();\n\n // Checking for selection type\n final ElementSelection elementHolder;\n\n if (!nothingSelected)\n {\n if (!selection.getFirst().isEmpty())\n elementHolder = new ElementSelection(NetworkElementType.getType(selection.getFirst()), selection.getFirst());\n else if (!selection.getSecond().isEmpty())\n elementHolder = new ElementSelection(selection.getSecond());\n else elementHolder = new ElementSelection();\n } else\n {\n elementHolder = new ElementSelection();\n }\n\n return elementHolder;\n }", "public void openProject(File pfile, FileOpenSelector files) { }", "void updateTreeSelection() {\n\n TreePath[] selections = tree.getSelectionPaths();\n currentSelectedPaths.clear();\n if (selections != null) {\n for (TreePath selection : selections) {\n currentSelectedPaths.add(selection);\n }\n }\n if ((selections == null) || (selections.length == 0)) {\n farmStatistics.setEnabled(false);\n linkStatistics.setEnabled(false);\n synchronized (basicPanel.getClusterPanel().getTreeLock()) {\n basicPanel.getClusterPanel().updateClusters(new Vector(), new Hashtable());\n }\n synchronized (basicPanel.getValPanel().getTreeLock()) {\n basicPanel.getValPanel().updateValues(new Vector());\n }\n synchronized (basicPanel.getModPanel().getTreeLock()) {\n basicPanel.getModPanel().updateList(new Vector());\n }\n return;\n }\n if ((selections.length == 1)\n && (((DefaultMutableTreeNode) selections[0].getLastPathComponent()).getUserObject() instanceof rcNode)) {\n farmStatistics.setEnabled(canShowFarmStatistics());\n linkStatistics.setEnabled(canShowLinkStatistics());\n } else {\n farmStatistics.setEnabled(false);\n linkStatistics.setEnabled(false);\n }\n Object[] userSel = new Object[selections.length];\n selectedGroups.clear();\n for (int j = 0; j < selections.length; j++) {\n userSel[j] = ((DefaultMutableTreeNode) selections[j].getLastPathComponent()).getUserObject();\n if (userSel[j] instanceof String) { // group selected\n selectedGroups.add(userSel[j]);\n DefaultMutableTreeNode groupNode = ((DefaultMutableTreeNode) selections[j].getLastPathComponent());\n for (int i = 0; i < treeModel.getChildCount(groupNode); i++) {\n tree.addSelectionPath(selections[j].pathByAddingChild(treeModel.getChild(groupNode, i)));\n }\n }\n }\n\n // update the parameters window to show only common parameters\n updateParamAndModPanels(userSel);\n }", "void getHighlightedProjectList(int id, UserType userType);", "public SelectHandlerPanel(Project project) {\n this.project = project;\n initComponents();\n manager = new ExplorerManager();\n manager.addPropertyChangeListener(\n new PropertyChangeListener() {\n public void propertyChange(PropertyChangeEvent pce) {\n selectedNodes = manager.getSelectedNodes();\n }\n });\n populateTree();\n }", "public void getProject(){\n\t\n\t String getList[] = clientFacade.GetProjects().split(\"\\n\");\n\t DefaultComboBoxModel addPro = new DefaultComboBoxModel();\n\t\tfor(int i=1; i<getList.length; i+=2) \n\t\t\t addPro.addElement(getList[i]);\n\t\t\t \n\t\tcPro.setModel(addPro);\t\n\t}", "private void browseProject()\n {\n List<FileFilter> filters = new ArrayList<>();\n filters.add(new FileNameExtensionFilter(\"Bombyx3D project file\", \"yml\"));\n\n File directory = new File(projectPathEdit.getText());\n File selectedFile = FileDialog.chooseOpenFile(this, BROWSE_DIALOG_TITLE, directory, filters);\n if (selectedFile != null) {\n projectDirectory = selectedFile.getParentFile();\n projectPathEdit.setText(projectDirectory.getPath());\n projectPathEdit.selectAll();\n }\n }", "private void loadGUI() {\n JMenuItem tmp;\n Font font = new Font(\"Arial\", Font.ITALIC, 10);\n \n // Project menu\n projectMenu = new JPopupMenu();\n tmp = new JMenuItem(\"Selected project\");\n tmp.setEnabled(false);\n tmp.setFont(font);\n projectMenu.add(tmp);\n projectMenu.addSeparator();\n \n properties = new JMenuItem(\"Properties\");\n properties.addActionListener(this);\n projectMenu.add(properties);\n \n reimport = new JMenuItem(\"Re-Import Files\");\n reimport.addActionListener(this);\n projectMenu.add(reimport);\n \n removeProject = new JMenuItem(\"Remove project\");\n removeProject.addActionListener(this);\n projectMenu.add(removeProject);\n \n // Directory menu\n dirMenu = new JPopupMenu();\n tmp = new JMenuItem(\"Selected directory\");\n tmp.setEnabled(false);\n tmp.setFont(font);\n dirMenu.add(tmp);\n dirMenu.addSeparator();\n \n removeDir = new JMenuItem(\"Remove from project\");\n removeDir.addActionListener(this);\n dirMenu.add(removeDir);\n \n deleteDir = new JMenuItem(\"Delete from disk\");\n deleteDir.addActionListener(this);\n dirMenu.add(deleteDir);\n \n renameDir = new JMenuItem(\"Rename\");\n renameDir.addActionListener(this);\n dirMenu.add(renameDir);\n \n // File menu\n fileMenu = new JPopupMenu();\n tmp = new JMenuItem(\"Selected file\");\n tmp.setEnabled(false);\n tmp.setFont(font);\n fileMenu.add(tmp);\n fileMenu.addSeparator();\n \n removeFile = new JMenuItem(\"Remove from project\");\n removeFile.addActionListener(this);\n fileMenu.add(removeFile);\n \n deleteFile = new JMenuItem(\"Delete from disk\");\n deleteFile.addActionListener(this);\n fileMenu.add(deleteFile);\n \n renameFile = new JMenuItem(\"Rename\");\n renameFile.addActionListener(this);\n fileMenu.add(renameFile);\n\t\n\t // sutter2k: need to tap in here for preview in browser\n miLaunchBrowser= new JMenuItem(\"Preview in Browser\");\n miLaunchBrowser.addActionListener(this);\n fileMenu.add(miLaunchBrowser);\n\t\n // Menu to show when multiple nodes are selected\n multipleSelMenu = new JPopupMenu();\n tmp = new JMenuItem(\"Multiple selection\");\n tmp.setEnabled(false);\n tmp.setFont(font);\n multipleSelMenu.add(tmp);\n multipleSelMenu.addSeparator();\n \n removeMulti = new JMenuItem(\"Remove from project\");\n removeMulti.addActionListener(this);\n multipleSelMenu.add(removeMulti);\n \n deleteMulti = new JMenuItem(\"Delete from disk\");\n deleteMulti.addActionListener(this);\n multipleSelMenu.add(deleteMulti);\n \n }", "public abstract void selectInTree(@NotNull Project project, @NotNull SNode node, boolean focus);", "@DISPID(1610743811) //= 0x60020003. The runtime will prefer the VTID if present\r\n @VTID(10)\r\n uic.prominent.ScreenLogging.wsh.FolderItems selectedItems();", "Object getSelection();", "private void selected(ListSelectionEvent e) {\n\t\tProject project = (Project) list.getSelectedValue();\n\t\tif (project != null) {\n\t\t\tinfo.setText(\"Description: \" + project.getDescription());\n\t\t} else {\n\t\t\tinfo.setText(\"Description: \");\n\t\t}\n\t}", "public void selectAllAccessibleSelection() {\n // To be fully implemented in a future release\n }", "private void helperDisplayProjectFiles ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tString[] fileNameList = DataController.scenarioGetFileNames();\r\n\r\n\t\t\tmainFormLink.getComponentPanelLeft().getComponentComboboxFileName().removeAllItems();\r\n\r\n\t\t\tfor (int i = 0; i < fileNameList.length; i++)\r\n\t\t\t{\r\n\t\t\t\tmainFormLink.getComponentPanelLeft().getComponentComboboxFileName().addItem(fileNameList[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (ExceptionMessage e)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(e);\r\n\t\t}\r\n\t}", "ResourceSelection createResourceSelection();", "private void onProjectBrowse() {\n IJavaProject p = mProjectChooserHelper.chooseJavaProject(mProjectTextField.getText(),\n \"Please select the target project\");\n if (p != null) {\n changeProject(p.getProject());\n mProjectTextField.setText(mProject.getName());\n }\n }", "public void testProjectsView() {\n ProjectsTabOperator.invoke();\n // needed for slower machines\n JemmyProperties.setCurrentTimeout(\"JTreeOperator.WaitNextNodeTimeout\", 30000); // NOI18N\n SourcePackagesNode sourcePackagesNode = new SourcePackagesNode(SAMPLE_PROJECT_NAME);\n Node sample1Node = new Node(sourcePackagesNode, SAMPLE1_PACKAGE_NAME);\n Node sampleClass1Node = new Node(sample1Node, SAMPLE1_FILE_NAME);\n // test pop-up menu actions\n // \"Copy\"\n CopyAction copyAction = new CopyAction();\n copyAction.perform(sampleClass1Node);\n // \"Paste\"\n PasteAction pasteAction = new PasteAction();\n // \"Refactor\"\n String refactorItem = Bundle.getStringTrimmed(\"org.netbeans.modules.refactoring.spi.impl.Bundle\", \"LBL_Action\");\n // \"Copy...\"\n String copyItem = Bundle.getStringTrimmed(\"org.netbeans.modules.refactoring.spi.impl.Bundle\", \"LBL_CopyAction\");\n new ActionNoBlock(null, pasteAction.getPopupPath() + \"|\" + refactorItem + \" \" + copyItem).perform(sample1Node);\n\n String copyClassTitle = Bundle.getString(\"org.netbeans.modules.refactoring.java.ui.Bundle\", \"LBL_CopyClass\");\n NbDialogOperator copyClassDialog = new NbDialogOperator(copyClassTitle);\n // \"Refactor\"\n String refactorLabel = Bundle.getStringTrimmed(\"org.netbeans.modules.refactoring.spi.impl.Bundle\", \"CTL_Finish\");\n new JButtonOperator(copyClassDialog, refactorLabel).push();\n // refactoring is done asynchronously => need to wait until dialog dismisses\n copyClassDialog.waitClosed();\n\n Node newClassNode = new Node(sample1Node, \"SampleClass11\"); // NOI18N\n // \"Cut\"\n CutAction cutAction = new CutAction();\n cutAction.perform(newClassNode);\n // package created by default when the sample project was created\n Node sampleProjectPackage = new Node(sourcePackagesNode, SAMPLE_PROJECT_NAME.toLowerCase());\n // \"Move...\"\n String moveItem = Bundle.getStringTrimmed(\"org.netbeans.modules.refactoring.spi.impl.Bundle\", \"LBL_MoveAction\");\n new ActionNoBlock(null, pasteAction.getPopupPath() + \"|\" + refactorItem + \" \" + moveItem).perform(sampleProjectPackage);\n new EventTool().waitNoEvent(1000);\n // confirm refactoring\n // \"Move Class\"\n String moveClassTitle = Bundle.getString(\"org.netbeans.modules.refactoring.java.ui.Bundle\", \"LBL_MoveClass\");\n NbDialogOperator moveClassDialog = new NbDialogOperator(moveClassTitle);\n new JButtonOperator(moveClassDialog, refactorLabel).push();\n // refactoring is done asynchronously => need to wait until dialog dismisses\n try {\n moveClassDialog.waitClosed();\n } catch (TimeoutExpiredException e) {\n // try it once more\n moveClassDialog = new NbDialogOperator(moveClassTitle);\n new JButtonOperator(moveClassDialog, refactorLabel).push();\n }\n // \"Delete\"\n newClassNode = new Node(sampleProjectPackage, \"SampleClass11\"); // NOI18N\n new EventTool().waitNoEvent(2000);\n new DeleteAction().perform(newClassNode);\n DeleteAction.confirmDeletion();\n }", "public interface IContentSelection\n{\n \n /**\n * Returns true if this object has a selected part, false otherwise.\n * \n * @return true if a selected part is within this object, false otherwise.\n */\n public abstract boolean hasSelection();\n \n /**\n * Returns the selection start within this object.\n * \n * @return start position in atoms.\n */\n public abstract int getSelectionStart();\n \n /**\n * Returns the selection end within this object.\n * \n * @return end position in atoms.\n */\n public abstract int getSelectionEnd();\n \n /**\n * Removes all selections from this object. No content is removed.\n */\n public abstract void clearSelection(TextAppearance appearance);\n \n /**\n * Removes everything that is selected including the content of this object.\n */\n public abstract void removeSelection(IContentFactory factory,\n TextAppearance appearance);\n \n /**\n * Selected the parts between the to atom positions.\n * \n * @param start\n * start position in atoms\n * @param end\n * end position in atoms\n */\n public abstract void setSelection(int start, int end,\n TextAppearance appearance);\n \n}", "public String getSelectedProjectName(){\n\t\treturn DataManager.getProjectFolderName();\n\t}", "public static ElementTreeSelectionDialog createHaxeProjectsDialog(\r\n\t\t\tShell shell) {\r\n\r\n\t\tElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(\r\n\t\t\t\tshell, new HaxeElementsLabelProvider(),\r\n\t\t\t\tnew HaxeElementsContentProvider(new HaxeElementFilter(\r\n\t\t\t\t\t\tShowElement.Project)));\r\n\r\n\t\tdialog.setTitle(\"haXe Project\");\r\n\t\tdialog.setMessage(\"Choose a haXe project:\");\r\n\t\tdialog.setHelpAvailable(false);\r\n\r\n\t\t// Sets haXe workspace as a root of the resource tree\r\n\t\tdialog.setInput(EclihxCore.getDefault().getHaxeWorkspace());\r\n\r\n\t\treturn dialog;\r\n\t}", "private Collection<EclipseProject> allProjects() {\n Collection<EclipseProject> all = new HashSet<EclipseProject>(selectedProjects);\n all.addAll(requiredProjects);\n return all;\n }", "protected String getFieldSelectionForUpdate() {\n\t\treturn fieldSetForUpdateProject;\n\t}", "public SelectPanel(Vector projectList)\r\n {\r\n this.projectList = projectList;\r\n selectedList=new Vector();//initialize selectedList vector\r\n totalSelected=0;\r\n setLayout(new GridLayout(3,1));//set layout\r\n projects= new JList(projectList);//initialize JLists\r\n selection=new JList(selectedList);\r\n JScrollPane sp1=new JScrollPane(projects);//initialize Scrollpanes\r\n JScrollPane sp2=new JScrollPane(selection);\r\n\r\n proj=new JLabel(\"Available project(s)\");//initialize JLabels\r\n selectedProj=new JLabel(\"Selected project(s)\");\r\n numSelected=new JLabel(\"Total number of selected projects: \"+totalSelected);\r\n\r\n JPanel top=new JPanel(new GridLayout(2,1));//initialize the subpanels and set layouts\r\n JPanel middle=new JPanel(new GridLayout(1,2));\r\n JPanel bottom=new JPanel(new GridLayout(3,1));\r\n\r\n addProj=new JButton(\"Add\");//intialize buttons\r\n removeProj=new JButton(\"Remove\");\r\n addProj.addActionListener(new ButtonListener());//add listener\r\n removeProj.addActionListener(new ButtonListener());\r\n projects.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);//set selection mode to single\r\n\r\n top.add(proj);//add the components to the different subpanels\r\n top.add(sp1);\r\n middle.add(addProj);\r\n middle.add(removeProj);\r\n bottom.add(selectedProj);\r\n bottom.add(sp2);\r\n bottom.add(numSelected);\r\n add(top);\r\n add(middle);\r\n add(bottom);\r\n\r\n\r\n\r\n\r\n // organize components for the select panel\r\n }", "public boolean projectsPageNav() {\n\t\treturn hdrProjects.getText().equals(\"Projects\");\n\t}", "@Override\n\tpublic List<ProjectInfo> findAllProject() {\n\t\treturn sqlSession.selectList(\"cn.sep.samp2.project.findAllProject\");\n\t}", "private void createProjectComposite() {\r\n\t\tGridLayout gridLayout2 = new GridLayout();\r\n\t\tgridLayout2.numColumns = 2;\r\n\t\tprojectComposite = new Composite(composite, SWT.NONE);\r\n\t\tprojectComposite.setLayout(gridLayout2);\r\n\t\tprojectComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));\r\n\t\toutputChooserTreeViewer = new TreeViewer(projectComposite, SWT.BORDER);\r\n\t\toutputChooserTreeViewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));\r\n\t\toutputChooserTreeViewer.setContentProvider(new ProjectContentProvider());\r\n\t\toutputChooserTreeViewer.setLabelProvider(new DecoratingLabelProvider(\r\n\t\t\t\t\t\t\t\tnew WorkbenchLabelProvider(), \r\n\t\t\t\t\t\t\t\tPlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator()));\r\n\t\toutputChooserTreeViewer.setInput(ResourcesPlugin.getWorkspace().getRoot());\r\n\t\toutputChooserTreeViewer.getTree().addSelectionListener(new SelectionListener() {\r\n\r\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent arg0) {\r\n\t\t\t}\r\n\r\n\t\t\tpublic void widgetSelected(SelectionEvent arg0) {\t\r\n\t\t\t\tvalidatePage();\r\n\t\t\t}\r\n\t\t});\r\n\t\toutputChooserTreeViewer.addSelectionChangedListener(new ISelectionChangedListener() {\r\n\r\n\t\t\tpublic void selectionChanged(SelectionChangedEvent arg0) {\r\n\t\t\t\tTreeSelection selection = (TreeSelection) outputChooserTreeViewer.getSelection();\r\n\t\t\t\tif (selection != null) {\r\n\t\t\t\t\tObject selected = selection.getFirstElement();\r\n\t\t\t\t\tif (selected != null) {\r\n\t\t\t\t\t\tif (selected instanceof IContainer) {\r\n\t\t\t\t\t\t\tNewPIWizardSettings.getInstance().outputContainer = (IContainer) selected;\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\r\n\t\tcreateButtonComposite();\r\n\t}", "protected String getSelectionTitle() {\n\t\treturn Messages.ModelElementSelectionPageMessage;\n\t}", "public static IProject getSelectedProject() {\n\t\tIProject activeProject = null;\n\t\tIWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();\n\t\tISelectionService selectionService = window.getSelectionService();\n\t\tISelection selection = selectionService.getSelection(IPageLayout.ID_PROJECT_EXPLORER);\n\t\tif (selection instanceof StructuredSelection) {\n\t\t\tIResource resource = (IResource) ((StructuredSelection) selection).getFirstElement();\n\t\t\tactiveProject = resource.getProject();\n\t\t}\n\t\t\n\t\treturn activeProject;\n\t}", "public SelectionDialog(HarmonyModel harmonyModel, Integer mode)\r\n\t{\r\n\t\tsuper((mode==SELECT ? \"Select\" : \"Remove\") + \" Links\");\r\n\t\tthis.harmonyModel = harmonyModel;\r\n\t\tthis.mode = mode;\r\n\t\t\r\n\t\t// Initialize the type filter\r\n\t\ttypeFilter = new OptionPane(\"Type\",new String[]{\"All\",\"User\",\"System\"});\r\n\t\ttypeFilter.setBorder(new EmptyBorder(0,20,0,0));\r\n\t\ttypeFilter.setSelectedButton(\"All\");\r\n\t\t\r\n\t\t// Initialize the focus filter\r\n\t\tfocusFilter = new OptionPane(\"Focus\",new String[]{\"All\",\"Focused\",\"Unfocused\"});\r\n\t\tfocusFilter.setBorder(new EmptyBorder(0,13,0,0));\r\n\t\tfocusFilter.setSelectedButton(mode==SELECT ? \"Focused\" : \"All\");\r\n\t\tfocusFilter.setEnabled(mode==DELETE);\r\n\r\n\t\t// Initialize the visibility filter\r\n\t\tvisibilityFilter = new OptionPane(\"Visibility\",new String[]{\"All\",\"Visible\",\"Hidden\"});\t\t\r\n\t\tvisibilityFilter.setSelectedButton(mode==SELECT ? \"Visible\" : \"All\");\r\n\t\tvisibilityFilter.setEnabled(mode==DELETE);\r\n\t\t\r\n\t\t// Create the info pane\r\n\t\tJPanel infoPane = new JPanel();\r\n\t\tinfoPane.setBorder(new CompoundBorder(new EmptyBorder(5,5,0,5),new CompoundBorder(new LineBorder(Color.gray),new EmptyBorder(5,5,5,5))));\r\n\t\tinfoPane.setLayout(new GridLayout(3,1));\r\n\t\tinfoPane.add(typeFilter);\r\n\t\tinfoPane.add(focusFilter);\r\n\t\tinfoPane.add(visibilityFilter);\r\n\t\t\r\n\t\t// Generate the main dialog pane\r\n\t\tJPanel pane = new JPanel();\r\n\t\tpane.setBorder(BorderFactory.createLineBorder(Color.black));\r\n\t\tpane.setLayout(new BorderLayout());\r\n\t\tpane.add(infoPane,BorderLayout.CENTER);\r\n\t\tpane.add(new ButtonPane(),BorderLayout.SOUTH);\r\n\t\t\r\n\t\t// Initialize the dialog parameters\r\n\t\tsetContentPane(pane);\r\n\t\tsetSize(200,250);\r\n\t\tpack();\r\n\t\tsetVisible(true);\r\n\t}", "private void initComponents() {\n\n buttonGroup1 = new javax.swing.ButtonGroup();\n projectListLabel = new javax.swing.JLabel();\n projectTableSP = new javax.swing.JScrollPane();\n projectTable = new javax.swing.JTable();\n prjLocationLBL = new javax.swing.JLabel();\n destination = new javax.swing.JTextField();\n chooseDestButton = new javax.swing.JButton();\n jRadioInsideEclipse = new javax.swing.JRadioButton();\n jRadioSeparate = new javax.swing.JRadioButton();\n prjLocationLBL1 = new javax.swing.JLabel();\n\n projectListLabel.setLabelFor(projectTable);\n org.openide.awt.Mnemonics.setLocalizedText(projectListLabel, org.openide.util.NbBundle.getMessage(ProjectSelectionPanel.class, \"LBL_ProjectsToImport\")); // NOI18N\n projectListLabel.setVerticalTextPosition(javax.swing.SwingConstants.TOP);\n\n projectTable.setOpaque(false);\n projectTable.setShowHorizontalLines(false);\n projectTable.setShowVerticalLines(false);\n projectTableSP.setViewportView(projectTable);\n projectTable.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectSelectionPanel.class, \"ACSD_ProjectSelectionPanel_NA\")); // NOI18N\n\n prjLocationLBL.setLabelFor(jRadioInsideEclipse);\n org.openide.awt.Mnemonics.setLocalizedText(prjLocationLBL, org.openide.util.NbBundle.getMessage(ProjectSelectionPanel.class, \"LBL_LocationOfNBProjects\")); // NOI18N\n\n org.openide.awt.Mnemonics.setLocalizedText(chooseDestButton, org.openide.util.NbBundle.getMessage(ProjectSelectionPanel.class, \"CTL_BrowseButton_B\")); // NOI18N\n chooseDestButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n chooseDestButtonActionPerformed(evt);\n }\n });\n\n buttonGroup1.add(jRadioInsideEclipse);\n org.openide.awt.Mnemonics.setLocalizedText(jRadioInsideEclipse, org.openide.util.NbBundle.getMessage(ProjectSelectionPanel.class, \"RADIO_LOCATION_ECLIPSE\")); // NOI18N\n jRadioInsideEclipse.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jRadioInsideEclipseActionPerformed(evt);\n }\n });\n\n buttonGroup1.add(jRadioSeparate);\n org.openide.awt.Mnemonics.setLocalizedText(jRadioSeparate, org.openide.util.NbBundle.getMessage(ProjectSelectionPanel.class, \"RADIO_LOCATION_SEPARATE\")); // NOI18N\n jRadioSeparate.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jRadioSeparateActionPerformed(evt);\n }\n });\n\n prjLocationLBL1.setLabelFor(destination);\n org.openide.awt.Mnemonics.setLocalizedText(prjLocationLBL1, org.openide.util.NbBundle.getMessage(ProjectSelectionPanel.class, \"LBL_LocationOfNBProjects2\")); // 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 .addComponent(prjLocationLBL)\n .addContainerGap())\n .addGroup(layout.createSequentialGroup()\n .addGap(34, 34, 34)\n .addComponent(prjLocationLBL1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(destination, javax.swing.GroupLayout.DEFAULT_SIZE, 304, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(chooseDestButton))\n .addComponent(projectTableSP, javax.swing.GroupLayout.DEFAULT_SIZE, 524, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jRadioInsideEclipse, javax.swing.GroupLayout.DEFAULT_SIZE, 516, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jRadioSeparate, javax.swing.GroupLayout.DEFAULT_SIZE, 516, Short.MAX_VALUE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(projectListLabel)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(projectListLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(projectTableSP, javax.swing.GroupLayout.DEFAULT_SIZE, 214, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(prjLocationLBL)\n .addGap(0, 0, 0)\n .addComponent(jRadioInsideEclipse)\n .addGap(0, 0, 0)\n .addComponent(jRadioSeparate)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(prjLocationLBL1)\n .addComponent(chooseDestButton)\n .addComponent(destination, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n );\n\n projectListLabel.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectSelectionPanel.class, \"ACSD_ProjectSelectionPanel_NA\")); // NOI18N\n projectTableSP.getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(ProjectSelectionPanel.class, \"ACSD_ProjectSelectionPanel_NA\")); // NOI18N\n projectTableSP.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectSelectionPanel.class, \"ACSD_ProjectSelectionPanel_NA\")); // NOI18N\n prjLocationLBL.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectSelectionPanel.class, \"ACSD_ProjectSelectionPanel_NA\")); // NOI18N\n destination.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectSelectionPanel.class, \"ACSD_ProjectSelectionPanel_NA\")); // NOI18N\n chooseDestButton.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectSelectionPanel.class, \"ACSD_ProjectSelectionPanel_NA\")); // NOI18N\n jRadioInsideEclipse.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectSelectionPanel.class, \"ACSD_ProjectSelectionPanel_NA\")); // NOI18N\n jRadioSeparate.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectSelectionPanel.class, \"ACSD_ProjectSelectionPanel_NA\")); // NOI18N\n prjLocationLBL1.getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectSelectionPanel.class, \"ACSD_ProjectSelectionPanel_NA\")); // NOI18N\n\n getAccessibleContext().setAccessibleName(org.openide.util.NbBundle.getMessage(ProjectSelectionPanel.class, \"ACSD_ProjectSelectionPanel_NA\")); // NOI18N\n getAccessibleContext().setAccessibleDescription(org.openide.util.NbBundle.getMessage(ProjectSelectionPanel.class, \"ACSD_ProjectSelectionPanel_NA\")); // NOI18N\n }", "public static IProject getSelectedProject() {\n\t\tIWorkbench workbench = PlatformUI.getWorkbench();\n\t\tIWorkbenchWindow window = workbench.getActiveWorkbenchWindow();\n\t\tISelectionService service = window.getSelectionService();\n\t\tISelection selection = service.getSelection();\n\t\tObject element = null;\n\t\tIResource resource;\n\t\tIProject selProject = null;\n\t\tif (selection instanceof IStructuredSelection) {\n\t\t\tIStructuredSelection structuredSel =\n\t\t\t\t\t(IStructuredSelection) selection;\n\t\t\telement = structuredSel.getFirstElement();\n\t\t}\n\t\tif (element instanceof IResource) {\n\t\t\tresource = (IResource) element;\n\t\t\tselProject = resource.getProject();\n\t\t} else {\n\t\t\tIWorkbenchPage page = window.getActivePage();\n\t\t\tIFile file = (IFile) page.getActiveEditor().\n\t\t\t\t\tgetEditorInput().getAdapter(IFile.class);\n\t\t\tselProject = file.getProject();\n\t\t}\n\t\treturn selProject;\n\t}", "protected String getHelpContextId() {\r\n\t\treturn IRubyHelpContextIds.PROJECTS_VIEW;\r\n\t}", "public void buildSelectedAction() {\n\t\tfinal List<Project> selectedItems = selectionList.getSelectionModel().getSelectedItems();\n\t\tif (!selectedItems.isEmpty()) {\n\t\t\tnavigationController.clickProgress();\n\t\t\tprojectService.build(selectedItems, false);\n\t\t}\n\t}", "public Subproject drawProject() {\n\t\tSubproject result=projectsAvailable.get(0);\n\t\tprojectsAvailable.remove(result);\n\t\tprojectsActive.add(result);\n\t\treturn result;\n\t}", "private boolean containsOnlyProjects(IResource[] resources) {\r\n int types = getSelectedResourceTypes(resources);\r\n // note that the selection may contain multiple types of resource\r\n return types == IResource.PROJECT;\r\n }", "List<EclipseProject> getProjects() {\n return getFlattenedProjects(selectedProjects);\n }", "public java.lang.String[] getSelectPresentation();", "public void selectionChanged(IWorkbenchPart part, ISelection selection) {\r\n\t\tif (!needsToProcessSelectionChanged(part, selection))\r\n\t\t\treturn;\r\n\r\n//\t\tif (selection instanceof IStructuredSelection) {\r\n//\t\t\tIStructuredSelection sel= (IStructuredSelection)selection;\r\n//\t\t\tIterator iter= sel.iterator();\r\n//\t\t\twhile (iter.hasNext()) {\r\n//\t\t\t\tObject selectedElement= iter.next();\r\n//\t\t\t\tif (selectedElement instanceof LogicalPackage) {\r\n//\t\t\t\t\tselection= new StructuredSelection(((LogicalPackage)selectedElement).getRubyProject());\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\tsuper.selectionChanged(part, selection);\r\n\t}", "public abstract String getSelectedNode();", "public void projectOpened(File pfile, FileOpenSelector files) { }", "public static String menuSelection() throws ParseException {\n System.out.print(\"\\nWelcome to Poised!\");\n System.out.print(\"\\n1\\t-\\tAdd a new project\");\n System.out.print(\"\\n2\\t-\\tChange due date of a project\");\n System.out.print(\"\\n3\\t-\\tChange payment on project\");\n System.out.print(\"\\n4\\t-\\tUpdate contact details\");\n System.out.print(\"\\n5\\t-\\tFinalise a project\");\n System.out.print(\"\\nPlease make your selection: \");\n\n // User's selection determine which method should be called\n // If user's selection is '1', then user can create a new project\n int userSelection = input.nextInt();\n input.nextLine();\n if (userSelection == 1) {\n ProjectList.add(createProject());\n }\n\n // If user selection '2', then can amend the due date of the project\n else if (userSelection == 2) {\n Project selectedProj = getProject();\n if (selectedProj == null) {\n return menuSelection();\n }\n\n newDeadline(selectedProj);\n }\n\n // If user selects '3', then user can change the payment on the project\n else if (userSelection == 3) {\n Project selectedProj = getProject();\n if (selectedProj == null) {\n return menuSelection();\n }\n\n makePayment(selectedProj);\n }\n\n // If user selects '4', then user can update the details of either the\n // contractor, client or architect.\n else if (userSelection == 4) {\n Project selectedProj = getProject();\n if (selectedProj == null) {\n return menuSelection();\n }\n\n updateDetails(selectedProj);\n }\n\n // If user selects '5', then user can finalise the project\n else if (userSelection == 5) {\n Project selectedProj = getProject();\n if (selectedProj == null) {\n return menuSelection();\n }\n\n finalisation(selectedProj);\n }\n\n return menuSelection();\n }", "public static AbstractElementListSelectionDialog createBuildFilesDialog(\r\n\t\t\tShell shell, IHaxeProject haxeProject, String buildFileSelection) {\r\n\r\n\t\tILabelProvider labelProvider = new LabelProvider() {\r\n\t\t\t@Override\r\n\t\t\tpublic Image getImage(Object element) {\r\n\t\t\t\treturn PluginImages.get(PluginImages.IMG_BUILD_FILE);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\tElementListSelectionDialog dialog = new ElementListSelectionDialog(\r\n\t\t\t\tshell, labelProvider);\r\n\r\n\t\t// Messages\r\n\t\tdialog.setTitle(\"Select Haxe Build File\");\r\n\t\tdialog.setMessage(\"Enter a string to search for a file:\");\r\n\t\tdialog.setEmptyListMessage(\"The project has no build files. \"\r\n\t\t\t\t+ \"Please, create one before to proceed.\");\r\n\r\n\t\t// Initialize\r\n\r\n\t\ttry {\r\n\r\n\t\t\tIFile[] paths = haxeProject.getBuildFiles();\r\n\r\n\t\t\t// FIXME 2 Move to separate method\r\n\t\t\tList<String> stringPaths = new ArrayList<String>(paths.length);\r\n\t\t\tfor (IFile file : paths) {\r\n\t\t\t\tstringPaths.add(file.getLocation().toOSString());\r\n\t\t\t}\r\n\r\n\t\t\tdialog.setElements(stringPaths.toArray(new String[0]));\r\n\t\t\tdialog.setInitialSelections(new Object[] { buildFileSelection });\r\n\r\n\t\t} catch (CoreException e) {\r\n\t\t\tEclihxUIPlugin.getLogHelper().logError(e);\r\n\t\t}\r\n\r\n\t\treturn dialog;\r\n\t}", "public void chooseCurentInstructuon(Event event) {\n InstructionsModel selectProject = lvInstructions.getSelectionModel().getSelectedItem();\n labelInstructions.setText(selectProject.getContent());\n }", "private void determineMenuSelection(String filePath) throws IOException {\n\t\tBufferedImage currentImage = Utils.readInImage(filePath);\n\t\tArrayList<Rectangle> boxes = model.getTemplateBoxes();\n\t\tArrayList<Rectangle> used = new ArrayList<>();\n\t\tdetermineInitSelections(boxes, used, currentImage);\n\t\tfor(int i = 7; i < boxes.size(); i++) { // Start at i = 2 for initial selections\n\t\t\t\n\t\t\tif(!used.contains(boxes.get(i))) {\n\t\t\t\tboolean a = searchBlackPixels(boxes.get(i), currentImage);\n\t\t\t\tboolean b = searchBlackPixels(boxes.get(i + 5), currentImage);\n\t\t\t\tif(a) {\n\t\t\t\t\tmodel.getSelections()[i] = 'A';\n\t\t\t\t\tused.add(boxes.get(i));\n\t\t\t\t\tused.add(boxes.get(i + 5));\n\t\t\t\t} else if(b) {\n\t\t\t\t\tmodel.getSelections()[i] = 'B';\n\t\t\t\t\tused.add(boxes.get(i));\n\t\t\t\t\tused.add(boxes.get(i + 5));\n\t\t\t\t} else {\n\t\t\t\t\tmodel.getSelections()[i] = 'A';\n\t\t\t\t\tused.add(boxes.get(i));\n\t\t\t\t\tused.add(boxes.get(i + 5));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tprotected String getProjectHelpId() {\n\t\treturn null;\r\n\t}", "public int getSelectionMode() {\n/* 2902 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public boolean selectProject(String projectName){\n\t\ttry{\n\t\t\tAssert.assertTrue(CommonUtil.titleContains(\"Browse Projects\", Constants.EXPLICIT_WAIT_LOW), \"Browse Project Page title is not same.\");\n\t\t\tlogger.info(\"Browse Projects page is selected successfully.\");\n\t\t\t//allProjectsLink.click();\n\t\t\t//Assert.assertTrue(CommonUtil.visibilityOfElementLocated(\"//div[@id='none-panel' and @class='module inall active']\"));\n\t\t\tAssert.assertTrue(CommonUtil.searchAndClickFromList(allProjectList, projectName), \"Project is not selected successfully.\");\n\t\t\tlogger.info(projectName + \" is selected successfully.\");\n\t\t\t\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private void updateSelectedDetailsPanel() {\n\t\tfinal ObservableList<Project> selectedItems = selectionList.getSelectionModel().getSelectedItems();\n\t\tif (selectedItems.size() == 1) {\n\t\t\tselectedPanel.setVisible(true);\n\t\t\tfinal Project p = selectedItems.get(0);\n\t\t\tselectedName.setText(p.getName());\n\t\t\tfinal DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss\", Locale.getDefault());\n\t\t\tselectedBuildDate.setText(\n\t\t\t\t\tp.getLastBuildDateTime() == null ? \"-\" : p.getLastBuildDateTime().format(formatter));\n\t\t\tselectedBuildSize.setText(\n\t\t\t\t\tp.getLastBuildSize() == 0 ? \"-\" : (String.format(\"%,d\", p.getLastBuildSize() / 1024) + \" kb\"));\n\t\t\ttry {\n\t\t\t\tfinal Path path = Path.of(p.getProjectPath());\n\t\t\t\tselectedDirFiles.setText(String.format(\"%,d\", fileService.getFileCountOfDirectory(path)) + \" files\");\n\t\t\t\tselectedDirSize.setText(String.format(\"%,d\", fileService.getDirectorySize(path) / 1024) + \" kb\");\n\t\t\t} catch (final IOException e) {\n\t\t\t\tselectedDirSize.setText(\"-\");\n\t\t\t\tselectedDirFiles.setText(\"-\");\n\t\t\t\tlogger.trace(\"Error updating selected details panel.\", e);\n\t\t\t}\n\t\t\tselectedPath.setText(p.getProjectPath());\n\t\t\ttry {\n\t\t\t\tselectedImage.setImage(new Image(getResourceAsUrl(gameService.getGameItemPath(p.getGame())).toString()));\n\t\t\t} catch (final IOException e) {\n\t\t\t\tlogger.error(\"Failed to load image from project's game setting.\", e);\n\t\t\t}\n\t\t} else {\n\t\t\tselectedPanel.setVisible(false);\n\t\t}\n\t}", "private void createGrpClinicSelection() {\n\n\t}", "public interface SelectElement extends Editor {\n\t\t\n\tpublic String getParamName();\n\t\n\tpublic void renderOption(OptionItem option);\n\n\tpublic boolean isSelected(OptionItem option);\n\t\n\tpublic Object getOptions();\n\t\n\tpublic void setOptions(Object model);\n\t\n\tpublic int getOptionIndex(OptionItem option);\n\n\tpublic void reset();\n\n}", "private URI getSelectionURI(ISelection currentSelection) {\n\n\t\tif (currentSelection instanceof IStructuredSelection) {\n\t\t\tfinal IStructuredSelection iss = (IStructuredSelection) currentSelection;\n\t\t\tif (iss.size() == 1) {\n\t\t\t\tfinal Object obj = iss.getFirstElement();\n//\t\t\t\tif (obj instanceof DiagramElement) {\n//\t\t\t\t\tfinal DiagramElement diagramElement = (DiagramElement) obj;\n//\t\t\t\t\tEObject eObj = (EObject) diagramElement.getBusinessObject();\n//\t\t\t\t\treturn EcoreUtil.getURI(eObj);\n//\t\t\t\t} else {\n\t\t\t\treturn ((EObjectNode) obj).getEObjectURI();\n//\t\t\t\t}\n\t\t\t}\n\t\t} else if (currentSelection instanceof TextSelection) {\n\t\t\t// Selection may be stale, get latest from editor\n\t\t\tXtextEditor xtextEditor = EditorUtils.getActiveXtextEditor();\n\t\t\tTextSelection ts = (TextSelection) xtextEditor.getSelectionProvider().getSelection();\n\t\t\treturn xtextEditor.getDocument().readOnly(resource -> {\n\t\t\t\tEObject e = new EObjectAtOffsetHelper().resolveContainedElementAt(resource, ts.getOffset());\n\t\t\t\treturn EcoreUtil.getURI(e);\n\t\t\t});\n\t\t}\n\t\treturn null;\n\t}", "StyleSelectionSettings getSelectablepageStyle();", "List<Project> selectAll();", "public String getMySelection() {\n return mySelection;\n }", "public interface EclipseConstants {\n\n\t/**\n\t * Id of the <code>EclipseUIService</code>.\n\t */\n\tpublic static final String ID_SERVICE_ECLIPSE_UI = \"org.dotplot.standard.EclipseUI\";\n\n\t/**\n\t * ID of the dotplot perspective.\n\t */\n\tpublic static final String ID_PERSPECTIVE_DOTPLOT = \"org.dotplot.plugin.perspective1\";\n\n\t/**\n\t * Id of the dotplot plugin.\n\t */\n\tpublic static final String ID_PLUGIN_DOTPLOT = \"org.dotplot.plugin\";\n\n\t/**\n\t * Id of the dotplot menu.\n\t */\n\tpublic static final String ID_MENU_DOTPLOT = \"org.dotplot.plugin.menu1\";\n}", "public void projectPropertiesDisplay()\n\t{\n\t\ttree.setModel(null);\n\t\tredoProjectProperties();\n\t\tFileTree model = new FileTree(currentProject.toString()); //Create a new FileTree using the Selected File\n tree.setModel(model); //Set the model as the FileTree class model\n /***************************************************************************************\n * Title: FileSelectorModel \n * Author: S�bastien Le Callonnec\n * Date: September 18, 2019\n * Code version: version 1.0\n * Availability: https://www.weblogism.com/item/300/use-jtree-to-display-files-in-filesystem-ii\n * Modified slightly by the team to work with our project\n ***************************************************************************************/\n JLabel status = new JLabel(currentProject.toString());\n tree.addTreeSelectionListener(new TreeSelectionListener() \n {\n public void valueChanged(TreeSelectionEvent e) \n {\n folderNameGetter selectedNode = (folderNameGetter) tree.getLastSelectedPathComponent();\n if(selectedNode != null)\n {\n \tstatus.setText(selectedNode.getAbsolutePath());\n if (selectedNode.isFile()) \n {\n try \n {\n \tcurrentFile.setLength(0);\n \tcurrentFile.append(selectedNode);\n \tresetFileTitle();\n BufferedReader br = new BufferedReader(new FileReader(selectedNode.getAbsolutePath()));\n String line = \"\";\n String l = \"\";\n while ((line = br.readLine()) != null) \n {\n \tl += line + \"\\n\" ;\n }\n displayText(l);\n br.close();\n } \n catch (Exception exc) \n {\n exc.printStackTrace();\n }\n }\n }\n }\n });\n//*********************************************************************************************************************************************************************************************************************************\n spectralFilesScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); //Show scroll bars when necessary\n projectProperties.add(spectralFilesScrollPane); //Add to projectProperties JPanel\n redoProjectProperties();\n\t}", "public ProjectsPage() {\n\t\tthis.driver = DriverManager.getDriver();\n\t\tElementFactory.initElements(driver, this);\n\t\t// sets the name of the project to add, with a random integer ending for slight\n\t\t// ease on multiple test runs\n\t\tnameOfProject = \"testz2018\" + (int) Math.random() * 500;\n\t}", "public PanelDisplayProject getDisplayProject(){\n return displayProject;\n }", "public interface SelectionTreeNode extends TreeNode {\n public static enum State {\n NONE_SELECTED, SOME_SELECTED, ALL_SELECTED\n }\n\n /**\n * Returns this node's current state.\n *\n * @return this node's current state.\n */\n public State getState();\n\n /**\n * Updates this node's current state.\n *\n * @param state new state for this node.\n */\n public void setState(final State state);\n\n /**\n * Instructs the node to update its state. The node will then scan its children to determine whether all, some or\n * none of them are selected. If the node does not have children, the value provided by the last call of setState\n * will be retained.\n */\n public void updateState();\n\n /**\n * Adds a selection listener to the node, which will be notified when the node's state changes.\n *\n * @param listener listener to add.\n * @see net.sarcommand.swingextensions.selectiontree.SelectionTreeListener\n */\n public void addSelectionTreeListener(final SelectionTreeListener listener);\n\n /**\n * Removes a selection listener from the node.\n *\n * @param listener listener to remove.\n * @see net.sarcommand.swingextensions.selectiontree.SelectionTreeListener\n */\n public void removeSelectionTreeListener(final SelectionTreeListener listener);\n}", "@Override\n\tpublic SortedSet<ProjectModule> getSelectedModules(Collection<String> templateNameList) throws UtilityException \n\t{\n\t\tSortedSet<ProjectModule> out = super.getSelectedModules(templateNameList);\n\t\tif (out.isEmpty())\n\t\t\tout = getSelectedModules(Arrays.asList(TEMPLATE_BASE));\n\t\treturn out;\n\t}", "@Override\r\n\tprotected void directorySelectionChangedDirectly() {\n\r\n\t}", "protected void createSelection() {\r\n\t\tsel = new GraphSelection();\r\n\t}", "public ISelection getSelection(IClientContext context) throws Exception;", "public List<ProjectNameControl> getProjectNames() {\r\n\t\tfinal List<ProjectNameControl> result = new ArrayList<ProjectNameControl>(5);\r\n\t\tresult.add(new ProjectNameControl(getResourceName(), getResourceNameText()));\r\n\t\treturn result;\r\n\t}", "abstract public void showSelection(Node[] nodes) ;", "private static void list_projects(String select, String list_heading) {\r\n\t\ttry (// Creates a connection and statement object\r\n\t\t\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/PoisedPMS\",\"poisedpms\",\"poisedpms\");\r\n\t\t\t\t\r\n\t\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\t\t\r\n\t\t\t){\r\n\t\t\r\n\t\t\tString strSelectProject = String.format(select);\r\n\t\t\tResultSet project_rset = stmt.executeQuery(strSelectProject);\r\n\t\t\t\r\n\t\t\tSystem.out.println(list_heading);\r\n\t\t\r\n\t\t\twhile (project_rset.next()) {\r\n\t\t\t\tSystem.out.println(\"Project ID: \" + project_rset.getInt(\"project_id\") + \r\n\t\t\t\t\t\t\"\\nProject Name: \" + project_rset.getString(\"project_name\") + \"\\n\");\r\n\t\t\t}\r\n\t\t/**\r\n\t\t * @exception When something cannot be retrieved from the database then an SQLException is thrown\t\r\n\t\t */\r\n\t\t} catch ( SQLException ex ) {\r\n\t\t\tex . printStackTrace ();\r\n\t\t}\r\n\t}", "public interface ModuleSelector {\n String select(String name, int index, VectorDescription pos, RotationDescription rot, int lx, int ly, int lz);\n }", "public SelectPanel() {\n initComponents();\n \n buttonSelection.add(jRadioButtonEverything);\n buttonSelection.add(jRadioButtonLinesCurves);\n buttonSelection.add(jRadioButtonControlPoints);\n buttonSelection.add(jRadioButtonAllItem);\n jRadioButtonControlPoints.setSelected(true);\n \n buttonLayer.add(jRadioButtonCurrentLayer);\n buttonLayer.add(jRadioButtonAllVisibleLayers);\n jRadioButtonCurrentLayer.setSelected(true);\n }", "@objid (\"d4464549-baf6-4f7e-8bce-318139ba1226\")\n public void setInput(ProjectModel selectedProject) {\n this.projectAdapter = selectedProject;\n \n if (selectedProject != null) {\n List<UrlEntry> urls = selectedProject.getUrls();\n this.viewer.setInput(urls);\n Boolean isUrlSelected = false;\n // Default: select the first available url\n if (urls.size() > 0) {\n selectUrl(urls.get(0));\n isUrlSelected = true;\n }\n this.addBtn.setEnabled(this.projectAdapter.isLocalProject());\n this.editBtn.setEnabled(isUrlSelected);\n this.removeBtn.setEnabled(isUrlSelected && this.projectAdapter.isLocalProject());\n } else {\n this.viewer.setInput(new Object[0]);\n this.addBtn.setEnabled(false);\n this.editBtn.setEnabled(false);\n this.removeBtn.setEnabled(false);\n }\n }", "@Override\n public void actionPerformed(AnActionEvent e) {\n VirtualFile vFile = e.getData(PlatformDataKeys.VIRTUAL_FILE);\n Project project = e.getData(PlatformDataKeys.PROJECT);\n CompareManager instance = getBCInstance();\n if (instance == null){\n return;\n }\n instance.setLeftCompare(new CompareObject(vFile,project));\n instance.setCurrentState(CompareManager.SelectState.WAITFORCOMPARE);\n\n\n System.out.println(\"select left project name: \"+project.getName()+\" path: \"+project.getBasePath());\n }", "protected String getFieldSelectionForRead() {\n\t\treturn fieldSelectionForReadProject;\n\t}", "public void componentSelected(MenuEvent ce) {\n\t\t\t\tREModel.setResourceExplorer(null);\n\t\t\t\t\n\t\t\t\tif (REModel.CLOSE){\n\t\t\t\t\t//hide the context menu\n\t\t\t\t\tREModel.getResourceExplorer().setCatalogueContextMenu(null);\n\t\t\t\t\tREModel.getResourceExplorer().getWindow().close();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfinal List<ResourceChildModel> projectList = new ArrayList<ResourceChildModel>();\n\t\t\t\tfinal List<ResourceChildModel> selectedItems = table.getSelectionModel().getSelectedItems();\n\t\t\t\n\t\t\t\tfor (ResourceChildModel model : selectedItems) {\n\t\t\t\t\t\n\t\t\t\t\tif(model.getType().equals(ResourceType.PROJECT))\n\t\t\t\t\t projectList.add(model);\n\t\t\t\t\telse {\n\t\t\t\t\t\t//projectList.add((ResourceChildModel)((item.getParentItem()).getParentItem()).getModel());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//open project resources\n\t\t\t\tfor (ResourceChildModel rsrcModel: selectedItems){\n\t\t\t\t\tString type = rsrcModel.getType();\n\t\t\t\t\tLong id = Long.valueOf(rsrcModel.getId());\n\t\t\t\t\t\t\n\t\t\t\t\tif(type.equals(ResourceType.MAPVIEW)) {\n\t\t\t\t\t\tMapWindow mw = new MapWindow(rsrcModel.getId(), rsrcModel.getName());\n\t\t\t\t\t\tmw.show();\n\t\t\t\t\t}\n\t\t\t\t\telse if(type.equals(ResourceType.CHARTVIEW)) {\n\t\t\t\t\t\tnew ChartViewer(rsrcModel.getId());\n\t\t\t\t\t}\n\t\t\t\t\telse if(type.equals(ResourceType.TABLEVIEW)) {\t\t\t\t\t\n\t\t\t\t\t\tnew TableWindow().showAllData(id, rsrcModel.hasWritePermission(), rsrcModel.isFlexDatasetType(), rsrcModel.getName());\n\t\t\t\t\t\t//new TableWindow().build(id, rsrcModel.hasWritePermission(), rsrcModel.isFlexDatasetType(), rsrcModel.getName());\n\t\t\t\t\t}\n\t\t\t\t\telse if(type.equals(ResourceType.DATASET)) {\t\t\t\t\t\t\n\t\t\t\t\t\tnew TableWindow().showAllData(id, rsrcModel.hasWritePermission(), rsrcModel.isFlexDatasetType(), rsrcModel.getName());\n\t\t\t\t\t\t//new TableWindow().build(id, rsrcModel.hasWritePermission(), rsrcModel.isFlexDatasetType(), rsrcModel.getName());\n\t\t\t\t\t}\n\t\t\t\t\telse if(type.equals(ResourceType.REPORT)) {\n\t\t\t\t\t\tnew ReportViewer(id);\n\t\t\t\t\t}\n\t\t\t\t\telse if(type.equals(ResourceType.TEXTVIEW)) {\n\t\t\t\t\t\tResourceOpener.openTextViewer(id, rsrcModel.hasWritePermission());\t\n\t\t\t\t\t}\n\t\t\t\t\telse if(type.equals(ResourceType.LAYER)) {\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse if(type.equals(ResourceType.PATTERN)) {\n\t\t\t\t\t\tFenixAlert.info(\"Info\", \"The associated datasets for the data theme can be viewed from the project manager.\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\t\n\t\t\n\t\t\t\tif(projectList!=null){\n\t\t\t\t//add parent project to project manager\n\t\t\t\tPMModel.addProjectToProjectManager(projectList);\n\t\t\t\t} else {\n\t\t\t\t\tPMModel.addResourceToProjectManager(selectedItems, \"addResource\");\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t}", "@Override\r\n\tpublic void selectionChanged(IWorkbenchPart part, ISelection selection) {\n\r\n\t}", "protected abstract boolean isVisibleForSelection(T1 object, Vector<T2> globalSelection);", "@Override\n\tpublic Object execute(ExecutionEvent event) throws ExecutionException {\n\t\tIStructuredSelection selection = (IStructuredSelection) HandlerUtil\n\t\t\t\t.getActiveSite(event).getSelectionProvider().getSelection();\n\t\tObject firstElement = selection.getFirstElement();\n\t\ttry {\n\t\t\tif (firstElement instanceof IJavaProject) {\n\t\t\t\tIJavaProject selectedProject = (IJavaProject) firstElement;\n\t\t\t\t// get the current class path entries\n\t\t\t\tIClasspathEntry[] classPaths = selectedProject\n\t\t\t\t\t\t.getResolvedClasspath(false);\n\t\t\t\tBundle thisBundle = Activator.getDefault().getBundle();\n\t\t\t\tString location = thisBundle.getLocation();\n\t\t\t\tString bundlePath = location.substring(location.indexOf(\"file\") + 5);\n\t\t\t\t\n\t\t\t\t// add our classpaths to a IClassPathEntry array and set it to the project\n\t\t\t\tIClasspathEntry[] modifiedClassPaths = null;\n\t\t\t\tIPath libPath = new Path(bundlePath + IPath.SEPARATOR + \"lib\").makeAbsolute();\n\t\t\t\tIPath annotationPath = libPath.append(\"org.eclipse.jconqurr.annotations.jar\");\n\t\t\t\tIClasspathEntry aptCpEntry = JavaCore.newLibraryEntry(annotationPath, null, null);\n\t\t\t\tmodifiedClassPaths = addClassPathEntry(classPaths, aptCpEntry);\n\t\t\t\tIPath directivesPath = libPath.append(\"org.eclipse.jconqurr.directives.jar\");\n\t\t\t\tIClasspathEntry drctvsCpEntry = JavaCore.newLibraryEntry(directivesPath, null, null);\n\t\t\t\tmodifiedClassPaths = addClassPathEntry(modifiedClassPaths, drctvsCpEntry);\n\t\t\t\tselectedProject.setRawClasspath(modifiedClassPaths, null);\n\t\t\t\t\n\t\t\t\t// add JConq nature\n\t\t\t\tIProjectDescription projDescription = selectedProject.getProject().getDescription();\n\t\t\t\tString[] natures = projDescription.getNatureIds();\n\t\t\t\tString[] modifiedNatures = new String[natures.length+1];\n\t\t\t\tSystem.arraycopy(natures, 0, modifiedNatures, 0, natures.length);\n\t\t\t\tmodifiedNatures[natures.length] = JConqurrNature.JCONQ_NATURE;\n\t\t\t\tprojDescription.setNatureIds(modifiedNatures);\n\t\t\t\tselectedProject.getProject().setDescription(projDescription, null);\n\t\t\t}\n\t\t} catch (JavaModelException e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t} catch (CoreException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "private void selectFieldsToDisplay()\n\t{\n\t\t_X_A0.setEnabled(true);\n\t\t_Y_A0.setEnabled(true);\n\t\tif ( _downStream == ProjectData.CAMS_NO_DOWNSTREAM || \n\t\t _downStream == ProjectData.LEVER_NO_DOWNSTREAM || \n\t\t _downStream == ProjectData.LEVER_PUSHER_TUGS)\n\t\t{\n\t\t\t_X_d.setEnabled(false);\n\t\t\t_Y_d.setEnabled(false);\n\t\t}\n\t\tif ( _camType == ProjectData.ROLLER_SLIDE || \n\t\t\t _downStream != ProjectData.LEVER_FOUR_JOIN)\n\t\t{\n\t\t\t_X_s.setEnabled(false);\n\t\t\t_Y_s.setEnabled(false);\n\t\t}\n\t\t_ro_min.setEnabled(true);\n\t\t_L3.setEnabled(true);\n\t\tif ( _camProfile != ProjectData.LEVER_DOUBLE_CAM &&\n\t\t\t _camProfile != ProjectData.LEVER_BEAD_CAM &&\n\t\t\t _camProfile != ProjectData.SLIDER_DOUBLE_CAM &&\n\t\t\t _camProfile != ProjectData.SLIDER_BEAD_CAM)\n\t\t{\n\t\t\t_L31.setEnabled(false);\n\t\t}\n\t\tif ( _camType == ProjectData.ROLLER_SLIDE ||\n\t\t\t _camType == ProjectData.ROLLER_LEVER && _downStream == ProjectData.LEVER_NO_DOWNSTREAM)\n\t\t{\n\t\t\t_L3p.setEnabled(false);\n\t\t}\n\t\tif ( _downStream == ProjectData.CAMS_NO_DOWNSTREAM || \n\t\t\t _downStream == ProjectData.LEVER_NO_DOWNSTREAM || \n\t\t\t _downStream == ProjectData.LEVER_PUSHER_TUGS)\n\t\t{\n\t\t\t_L4.setEnabled(false);\n\t\t}\n\t\t/*On L5 easier to use opposite logic.*/\n\t\t_L5.setEnabled(false);\n\t\tif ( _camType == ProjectData.ROLLER_SLIDE && _downStream == ProjectData.CAMS_CRANK \n\t\t\t\t||\n\t\t\t _camType == ProjectData.ROLLER_LEVER && _downStream == ProjectData.LEVER_FOUR_JOIN)\n\t\t{\n\t\t\t_L5.setEnabled(true);\n\t\t}\n\t\t_L1.setEnabled(false);\n\t\t_rR.setEnabled(true);\n\t\t_rG.setEnabled(true);\n\t\t/*On ep easier to use opposite logic.*/\n\t\t_ep.setEnabled(false);\n\t\tif ( _camProfile == ProjectData.SLIDER_DOUBLE_CAM )\n\t\t{\n\t\t\t_ep.setEnabled(true);\n\t\t}\n\t\t/*On y easier to use opposite logic.*/\n\t\t_y.setEnabled(false);\n\t\tif ( _camType == ProjectData.ROLLER_SLIDE || _downStream == ProjectData.LEVER_PUSHER_TUGS)\n\t\t{\n\t\t\t_y.setEnabled(true);\n\t\t}\n\t\tif ( _downStream == ProjectData.LEVER_NO_DOWNSTREAM ||\n\t\t\t _downStream == ProjectData.CAMS_CRANK)\n\t\t{\n\t\t\t_delta.setEnabled(false);\n\t\t}\n\t\tif ( _camProfile != ProjectData.LEVER_DOUBLE_CAM &&\n\t\t\t _camProfile != ProjectData.LEVER_BEAD_CAM )\t\n\t\t{\n\t\t\t_gama.setEnabled(false);\n\t\t}\n\t\t_miu_an_min.setEnabled(true);\n\t\t_miu_ab_min.setEnabled(true);\n\t\t_n.setEnabled(true);\n\t}", "protected void updateSelection ()\n {\n // find the selected node\n ConfigTreeNode node = _tree.getSelectedNode();\n\n // update the editor panel\n _epanel.removeChangeListener(ManagerPanel.this);\n try {\n ManagedConfig cfg = (node == null) ? null : node.getConfig();\n _epanel.setObject(cfg);\n _lastValue = (cfg == null) ? null : (ManagedConfig)cfg.clone();\n } finally {\n _epanel.addChangeListener(ManagerPanel.this);\n }\n\n // enable or disable the menu items\n boolean enable = (node != null);\n boolean writeable = !_readOnly;\n _exportConfigs.setEnabled(enable);\n _cut.setEnabled(enable && writeable);\n _copy.setEnabled(enable);\n _delete.setEnabled(enable && writeable);\n _findUses.setEnabled(enable);\n }", "public interface Selectable {\n\n /**\n * Initializes the current selection to begin with the character at (x, y).\n * @return true if action resulted in change of selection.\n */\n boolean selectAt(double x, double y);\n\n /**\n * Extends the current selection to the character at (x, y)..\n * @return true if action resulted in change of selection.\n */\n boolean selectTo(double x, double y);\n\n /**\n * Selects the entire contents of the GraphicsNode at (x, y).\n * @return true if action resulted in change of selection.\n */\n boolean selectAll(double x, double y);\n\n /**\n * Get the current text selection.\n * @return an object containing the selected content.\n */\n Object getSelection();\n\n /**\n * Return a shape in user coords which encloses the current selection.\n */\n Shape getHighlightShape();\n}", "public interface Selectable\n{\n\tboolean isSelected();\n\n\tvoid setSelected(boolean selected);\n\n\tvoid setGroup(SelectionGroup group);\n}", "public abstract ProjectBean getSystemProject();", "@Override\r\n\tString getProjectName();", "public IStructuredSelection getSelection() {\n \t\treturn selection;\n \t}", "public static String openClassSelectDialog(IJavaProject project, Control parent) {\r\n\t\ttry {\r\n\t\t\tShell shell = parent.getShell();\r\n\t\t\tSelectionDialog dialog = JavaUI.createTypeDialog(\r\n\t\t\t\t\tshell,new ProgressMonitorDialog(shell),\r\n\t\t\t\t\tSearchEngine.createJavaSearchScope(new IJavaElement[]{project}),\r\n\t\t\t\t\tIJavaElementSearchConstants.CONSIDER_CLASSES,false);\r\n\t\t\t\t\r\n\t\t\tif(dialog.open()==SelectionDialog.OK){\r\n\t\t\t\tObject[] result = dialog.getResult();\r\n\t\t\t\treturn ((IType)result[0]).getFullyQualifiedName();\r\n\t\t\t}\r\n\t\t} catch(Exception ex){\r\n\t\t\tHTMLPlugin.logException(ex);\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public interface ProjectPropertiesView extends View<ProjectPropertiesView.ActionDelegate> {\n \n public interface ActionDelegate {\n /** Performs any actions appropriate in response to the user having pressed the Add button. */\n void onAddClicked();\n \n /** Performs any actions appropriate in response to the user having pressed the Edit button. */\n void onEditClicked();\n \n /** Performs any actions appropriate in response to the user having pressed the Delete button. */\n void onDeleteClicked();\n \n /** Performs any actions appropriate in response to the user having pressed the Save button. */\n void onSaveClicked();\n\n /** Performs any actions appropriate in response to the user having pressed the Cancel button. */\n void onCancelClicked();\n \n /** Returns selected property. */\n void selectedProperty(Property property);\n }\n \n /**\n * Sets whether Edit button is enabled.\n *\n * @param isEnabled\n * <code>true</code> to enable the button, <code>false</code> to disable it\n */\n void setEditButtonEnabled(boolean isEnabled);\n \n /**\n * Sets whether Delete button is enabled.\n *\n * @param isEnabled\n * <code>true</code> to enable the button, <code>false</code> to disable it\n */\n void setDeleteButtonEnabled(boolean isEnabled);\n \n /**\n * Sets whether Save button is enabled.\n *\n * @param isEnabled\n * <code>true</code> to enable the button, <code>false</code> to disable it\n */\n void setSaveButtonEnabled(boolean isEnabled);\n\n /**\n * Sets properties.\n *\n * @param projects\n */\n void setProperties(Array<Property> properties);\n \n /** Close dialog. */\n void close();\n\n /** Show dialog. */\n void showDialog();\n}", "private void info(ActionEvent x) {\n\t\tProject p = this.list.getSelectedValue();\n\t\tif (p != null) {\n\t\t\tcontroller.moreinfo(p.getName());\n\t\t}\n\t}", "private void createProjectGroup(Composite parent) {\n int col = 0;\n\n // project name\n String tooltip = \"The Android Project where the new resource file will be created.\";\n Label label = new Label(parent, SWT.NONE);\n label.setText(\"Project\");\n label.setToolTipText(tooltip);\n ++col;\n\n mProjectTextField = new Text(parent, SWT.BORDER);\n mProjectTextField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n mProjectTextField.setToolTipText(tooltip);\n mProjectTextField.addModifyListener(new ModifyListener() {\n public void modifyText(ModifyEvent e) {\n onProjectFieldUpdated();\n }\n });\n ++col;\n\n mProjectBrowseButton = new Button(parent, SWT.NONE);\n mProjectBrowseButton.setText(\"Browse...\");\n mProjectBrowseButton.setToolTipText(\"Allows you to select the Android project to modify.\");\n mProjectBrowseButton.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n onProjectBrowse();\n }\n });\n mProjectChooserHelper = new ProjectChooserHelper(parent.getShell(), null /*filter*/);\n ++col;\n\n col = padWithEmptyCells(parent, col);\n\n // file name\n tooltip = \"The name of the resource file to create.\";\n label = new Label(parent, SWT.NONE);\n label.setText(\"File\");\n label.setToolTipText(tooltip);\n ++col;\n\n mFileNameTextField = new Text(parent, SWT.BORDER);\n mFileNameTextField.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n mFileNameTextField.setToolTipText(tooltip);\n mFileNameTextField.addModifyListener(new ModifyListener() {\n public void modifyText(ModifyEvent e) {\n validatePage();\n }\n });\n ++col;\n\n padWithEmptyCells(parent, col);\n }", "@objid (\"7d53581b-3adc-11e2-916e-002564c97630\")\n public void setInput(ProjectModel selectedProject) {\n this.projectAdapter = selectedProject;\n \n if (selectedProject != null) {\n List<IProjectFragment> sel = getSelectedFragments();\n boolean isFragmentSelected = !sel.isEmpty();\n boolean areLocal = isFragmentSelected && areAllLocalFragments(sel);\n boolean isLocalProject = this.projectAdapter.isLocalProject();\n \n this.viewer.setInput(selectedProject.getLocalLibraryFragments());\n this.addFromFileBtn.setEnabled(true && isLocalProject);\n this.addFromUpdateSiteBtn.setEnabled(isLocalProject);\n this.removeBtn.setEnabled(areLocal && isLocalProject);\n this.showFragmentBtn.setEnabled(isFragmentSelected);\n } else {\n this.viewer.setInput(new Object[0]);\n this.addFromFileBtn.setEnabled(false);\n this.addFromUpdateSiteBtn.setEnabled(false);\n this.removeBtn.setEnabled(false);\n this.showFragmentBtn.setEnabled(false);\n }\n \n for (TableColumn col : this.viewer.getTable().getColumns()) {\n col.pack();\n }\n }", "public java.util.List<Node> getSelection() {\n\t\treturn selected_nodes;\n\t}", "public Object getSelection() {\n return selection;\n }", "List<String> getSelectedItems();", "@Test\n public void projectIsNotSelected_doesNotTriggerListeners() {\n projectSelector.handleOpenProjectSelectionDialog();\n\n verifyNoMoreInteractions(projectSelectionListener);\n }", "void selectionModeChanged(SelectionMode mode);", "private int getMenuSelection() {\n return view.printMenuAndGetSelection();\n }", "@Override\r\n\tprotected Component[] createToggledComponents() throws ThinklabException {\r\n\t\tHbox classel = new Hbox();\r\n\r\n\t\tclassel.setWidth(\"100%\");\r\n\t\t\r\n\t\tWindow wc = new Window();\r\n\t\twc.setWidth(\"100%\");\r\n\t\twc.setBorder(\"normal\");\r\n\t\t\r\n\t\tclassel.appendChild(new Label(\"restrict type to \"));\r\n\t\tclassel.appendChild(new ObjectClassSelector(conceptID, indentLevel));\r\n\t\t\r\n\t\t/* TODO we must track the recursion level and insert an \"indent\" component if > 0 */\r\n\t\t\r\n\t\tInstanceSelector subc = new InstanceSelector(indentLevel);\r\n\t\tsubc.setConcept(conceptID);\r\n\t\tsubc.setWidth(\"100%\");\r\n\t\tobjComponent = subc;\r\n\t\t\r\n\t\tVbox amo = new Vbox(); amo.setWidth(\"100%\");\r\n\t\tHbox uff = new Hbox(); uff.setWidth(\"100%\");\r\n\t\r\n\t\tamo.appendChild(classel);\r\n\t\tamo.appendChild(subc);\r\n\t\twc.appendChild(amo);\r\n\t\t\r\n\t\tif (indentLevel > 0) {\r\n\t\t\tSeparator sep = new Separator(\"vertical\");\r\n\t\t\tsep.setWidth((30*indentLevel) + \"px\");\r\n\t\t\tuff.appendChild(sep);\r\n\t\t}\r\n\t\tuff.appendChild(wc);\r\n\t\t\r\n\t\tComponent[] c = new Component[1];\r\n\t\tc[0] = uff;\r\n\t\t\r\n\t\treturn c;\r\n\t\t\r\n\t}" ]
[ "0.62593496", "0.60788053", "0.60299516", "0.59126574", "0.58246714", "0.58228344", "0.5781721", "0.5704147", "0.5672387", "0.56357723", "0.5621095", "0.56061524", "0.5583107", "0.55706286", "0.55666196", "0.55590945", "0.5559053", "0.55301553", "0.54911244", "0.54787457", "0.5470546", "0.546159", "0.544621", "0.54258084", "0.54217076", "0.5406009", "0.5395571", "0.53709936", "0.5365908", "0.53556746", "0.5354325", "0.5341571", "0.5338501", "0.5330329", "0.5322833", "0.53206694", "0.5305421", "0.52998996", "0.529698", "0.52912885", "0.52897644", "0.52758807", "0.5271751", "0.52626115", "0.5247166", "0.5246811", "0.52380663", "0.5227837", "0.52210826", "0.52139705", "0.52136374", "0.52070236", "0.5205473", "0.52054036", "0.52014583", "0.5198884", "0.5191156", "0.51781654", "0.5176381", "0.51542425", "0.51468194", "0.5146446", "0.51397777", "0.5135034", "0.5129492", "0.5128762", "0.5119257", "0.5115556", "0.51152396", "0.51144636", "0.5109067", "0.5102627", "0.51023674", "0.50937873", "0.5091558", "0.5091012", "0.50842667", "0.5078262", "0.50781626", "0.5069327", "0.5057448", "0.5054048", "0.5051726", "0.50498384", "0.5046812", "0.50360686", "0.5030396", "0.5022401", "0.501847", "0.501394", "0.50137883", "0.5008017", "0.50034857", "0.49940863", "0.49912927", "0.49867508", "0.4979491", "0.49784568", "0.4974677", "0.49728456", "0.4972045" ]
0.0
-1
/ For laying out grid data in widgets for preferences pages (or anything else)
public static void fillGridPlace(Composite composite, int num) { for (int i = 1; i <= num; i++) { Label label = new Label(composite, SWT.NONE); label.setText("This space intentionally left blank"); label.setVisible(false); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addGrid() {\n\n\t\tList<ColumnConfig> configs = new LinkedList<ColumnConfig>();\n\n\t\tColumnConfig column = new ColumnConfig(InheritedComponentInstanceSelModelData.PROPERTY_ID, messages\n\t\t\t.columnHeaderId(), 15);\n\t\tcolumn.setSortable(false);\n\t\tcolumn.setRenderer(idCellRenderer);\n\t\tconfigs.add(column);\n\n\t\tcolumn = new ColumnConfig(Constants.PROPERTY_KEY, Constants.EMPTY_STRING, 15);\n\t\tcolumn.setRenderer(gearCellRenderer);\n\t\tcolumn.setSortable(false);\n\t\tconfigs.add(column);\n\n\t\tcolumn = new ColumnConfig();\n\t\tcolumn.setId(Constants.PROPERTY_NAME);\n\t\tcolumn.setHeaderText(pmsMessages.columnHeaderName());\n\t\tcolumn.setWidth(COLUMN_NAME_WIDTH);\n\t\tconfigs.add(column);\n\n\t\tcolumn = new ColumnConfig();\n\t\tcolumn.setId(InheritedComponentInstanceSelModelData.PROPERTY_MODULE);\n\t\tcolumn.setHeaderText(pmsMessages.columnHeaderModule());\n\t\tcolumn.setWidth(COLUMN_MODULE_WIDTH);\n\t\tconfigs.add(column);\n\n\t\tcolumn = new ColumnConfig();\n\t\tcolumn.setId(InheritedComponentInstanceSelModelData.PROPERTY_CONFIGURATION);\n\t\tcolumn.setHeaderText(pmsMessages.columnHeaderConfiguration());\n\t\tcolumn.setWidth(COLUMN_CONFIGURATION_WIDTH);\n\t\tcolumn.setRenderer(new GridCellRenderer<InheritedComponentInstanceSelModelData>() {\n\n\t\t\tpublic Object render(InheritedComponentInstanceSelModelData model, String property, ColumnData config,\n\t\t\t\tint rowIndex, int colIndex, ListStore<InheritedComponentInstanceSelModelData> store,\n\t\t\t\tGrid<InheritedComponentInstanceSelModelData> grid) {\n\n\t\t\t\tString icon = null;\n\t\t\t\tString title = null;\n\t\t\t\tBoolean configuration = model.getDTO().getConfiguration();\n\t\t\t\tif (configuration == null) {\n\t\t\t\t\treturn \"\";\n\t\t\t\t} else if (configuration) {\n\t\t\t\t\ticon = Constants.OK_IMAGE;\n\t\t\t\t\ttitle = pmsMessages.titleComponentOverrideConfiguration();\n\t\t\t\t} else {\n\t\t\t\t\ticon = Constants.ERROR_IMAGE;\n\t\t\t\t\ttitle = pmsMessages.titleComponentInheritedConfiguration();\n\t\t\t\t}\n\t\t\t\treturn TEMPLATE_ICON_CELL.replaceAll(PATTERN_ICON, icon).replaceAll(PATTERN_TITLE, title);\n\t\t\t}\n\t\t});\n\t\tconfigs.add(column);\n\n\t\tcolumn = new ColumnConfig();\n\t\tcolumn.setId(InheritedComponentInstanceSelModelData.PROPERTY_DEPENDENCIES);\n\t\tcolumn.setHeaderText(pmsMessages.columnHeaderDependences());\n\t\tcolumn.setWidth(COLUMN_DEPENDENCIES_WIDTH);\n\t\tcolumn.setRenderer(new GridCellRenderer<InheritedComponentInstanceSelModelData>() {\n\n\t\t\tpublic Object render(InheritedComponentInstanceSelModelData model, String property, ColumnData config,\n\t\t\t\tint rowIndex, int colIndex, ListStore<InheritedComponentInstanceSelModelData> store,\n\t\t\t\tGrid<InheritedComponentInstanceSelModelData> grid) {\n\n\t\t\t\tString icon = null;\n\t\t\t\tString title = null;\n\t\t\t\tBoolean dependencies = model.getDTO().getDependencies();\n\t\t\t\tif (dependencies == null) {\n\t\t\t\t\treturn \"\";\n\t\t\t\t} else if (dependencies) {\n\t\t\t\t\ticon = Constants.OK_IMAGE;\n\t\t\t\t\ttitle = pmsMessages.titleComponentOverrideDependences();\n\t\t\t\t} else {\n\t\t\t\t\ticon = Constants.ERROR_IMAGE;\n\t\t\t\t\ttitle = pmsMessages.titleComponentInheritedDependences();\n\t\t\t\t}\n\t\t\t\treturn TEMPLATE_ICON_CELL.replaceAll(PATTERN_ICON, icon).replaceAll(PATTERN_TITLE, title);\n\t\t\t}\n\t\t});\n\t\tconfigs.add(column);\n\n\t\tColumnModel cm = new ColumnModel(configs);\n\n\t\tstore = new ListStore<InheritedComponentInstanceSelModelData>();\n\t\tstore.setStoreSorter((StoreSorter) storeSorter);\n\t\tstore.setSortField(ModuleInstanceSelModelData.PROPERTY_NAME);\n\n\t\tgrid = new Grid<InheritedComponentInstanceSelModelData>(\n\t\t\t(ListStore<InheritedComponentInstanceSelModelData>) store, cm);\n\t\tgrid.setSelectionModel(new GridSelectionModel<InheritedComponentInstanceSelModelData>());\n\t\tgrid.setAutoExpandColumn(InheritedComponentInstanceSelModelData.PROPERTY_MODULE);\n\t\tgrid.setLoadMask(true);\n\n\t\tGridView gridView = grid.getView();\n\t\tgridView.setForceFit(true);\n\n\t\tadd(grid);\n\t}", "private GridLayout buildGridData() {\n\t\tgridData = new GridLayout();\r\n\t\tgridData.setImmediate(false);\r\n\t\tgridData.setWidth(\"-1px\");\r\n\t\tgridData.setHeight(\"100.0%\");\r\n\t\tgridData.setMargin(false);\r\n\t\tgridData.setSpacing(true);\r\n\t\tgridData.setColumns(2);\r\n\t\tgridData.setRows(2);\r\n\t\t\r\n\t\t// labelA\r\n\t\tlabelA = new Label();\r\n\t\tlabelA.setImmediate(false);\r\n\t\tlabelA.setWidth(\"-1px\");\r\n\t\tlabelA.setHeight(\"-1px\");\r\n\t\tlabelA.setValue(\"<b>Autor:</b>\");\r\n\t\tlabelA.setContentMode(3);\r\n\t\tgridData.addComponent(labelA, 0, 0);\r\n\t\t\r\n\t\t// labelAuthor\r\n\t\tlabelAuthor = new Label();\r\n\t\tlabelAuthor.setImmediate(false);\r\n\t\tlabelAuthor.setWidth(\"-1px\");\r\n\t\tlabelAuthor.setHeight(\"-1px\");\r\n\t\tlabelAuthor.setValue(\"Label\");\r\n\t\tgridData.addComponent(labelAuthor, 1, 0);\r\n\t\t\r\n\t\t// labelB\r\n\t\tlabelB = new Label();\r\n\t\tlabelB.setImmediate(false);\r\n\t\tlabelB.setWidth(\"-1px\");\r\n\t\tlabelB.setHeight(\"-1px\");\r\n\t\tlabelB.setValue(\"<b>Editorial:</b>\");\r\n\t\tlabelB.setContentMode(3);\r\n\t\tgridData.addComponent(labelB, 0, 1);\r\n\t\t\r\n\t\t// labelPublisher\r\n\t\tlabelPublisher = new Label();\r\n\t\tlabelPublisher.setImmediate(false);\r\n\t\tlabelPublisher.setWidth(\"-1px\");\r\n\t\tlabelPublisher.setHeight(\"-1px\");\r\n\t\tlabelPublisher.setValue(\"Label\");\r\n\t\tgridData.addComponent(labelPublisher, 1, 1);\r\n\t\t\r\n\t\treturn gridData;\r\n\t}", "public PropertiesView(){\n\n\t\tbtnDescTemplate = new DescTemplateWidget(this);\n\t\tbtnCalculation = new DescTemplateWidget(this);\n\n\t\ttable.setWidget(0, 0, new Label(LocaleText.get(\"text\")));\n\t\ttable.setWidget(1, 0, new Label(LocaleText.get(\"helpText\")));\n\t\ttable.setWidget(2, 0, new Label(LocaleText.get(\"type\")));\n\t\ttable.setWidget(3, 0, new Label(LocaleText.get(\"binding\")));\n\t\ttable.setWidget(4, 0, new Label(LocaleText.get(\"visible\")));\n\t\ttable.setWidget(5, 0, new Label(LocaleText.get(\"enabled\")));\n\t\ttable.setWidget(6, 0, new Label(LocaleText.get(\"locked\")));\n\t\ttable.setWidget(7, 0, new Label(LocaleText.get(\"required\")));\n\t\ttable.setWidget(8, 0, new Label(LocaleText.get(\"defaultValue\")));\n\t\ttable.setWidget(9, 0, new Label(LocaleText.get(\"calculation\")));\n\t\t\n\t\tlblDescTemplate = new Label(LocaleText.get(\"descriptionTemplate\"));\n\t\ttable.setWidget(10, 0, lblDescTemplate);\n\t\ttable.setWidget(11, 0, new Label(LocaleText.get(\"formKey\")));\n\n\t\ttable.setWidget(0, 1, txtText);\n\t\ttable.setWidget(1, 1, txtHelpText);\n\t\ttable.setWidget(2, 1, cbDataType);\n\t\ttable.setWidget(3, 1, txtBinding);\n\t\ttable.setWidget(4, 1, chkVisible);\n\t\ttable.setWidget(5, 1, chkEnabled);\n\t\ttable.setWidget(6, 1, chkLocked);\n\t\ttable.setWidget(7, 1, chkRequired);\n\t\ttable.setWidget(8, 1, txtDefaultValue);\n\n\t\tHorizontalPanel panel = new HorizontalPanel();\n\t\tpanel.add(txtCalculation);\n\t\tpanel.add(btnCalculation);\n\t\tpanel.setCellWidth(btnCalculation, \"20%\");\n\t\tFormUtil.maximizeWidget(txtCalculation);\n\t\tFormUtil.maximizeWidget(panel);\n\t\ttable.setWidget(9, 1, panel);\n\n\t\tpanel = new HorizontalPanel();\n\t\tpanel.add(txtDescTemplate);\n\t\tpanel.add(btnDescTemplate);\n\t\tpanel.setCellWidth(btnDescTemplate, \"20%\");\n\t\tFormUtil.maximizeWidget(txtDescTemplate);\n\t\tFormUtil.maximizeWidget(panel);\n\t\ttable.setWidget(10, 1, panel);\n\t\t\n\t\ttable.setWidget(11, 1, txtFormKey);\n\n\t\ttable.setStyleName(\"cw-FlexTable\");\n\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeText\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeNumber\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeDecimal\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeDate\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeTime\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeDateTime\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeBoolean\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeSingleSelect\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeMultSelect\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeRepeat\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypePicture\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeVideo\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeAudio\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeSingleSelectDynamic\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeGPS\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeBarcode\"));\n\n\t\tFlexCellFormatter cellFormatter = table.getFlexCellFormatter();\n\t\tcellFormatter.setHorizontalAlignment(15, 1, HasHorizontalAlignment.ALIGN_CENTER);\n\n\t\ttable.setWidth(\"100%\");\n\t\tcellFormatter.setWidth(0, 0, \"20%\");\n\t\t//cellFormatter.setColSpan(0, 0, 2);\n\t\t\n\t\t//cellFormatter.setWidth(9, 0, \"20\"+PurcConstants.UNITS);\n\t\t//cellFormatter.setWidth(9, 1, \"20\"+PurcConstants.UNITS);\n\n\t\ttxtText.setWidth(\"100%\");\n\t\ttxtHelpText.setWidth(\"100%\");\n\t\ttxtBinding.setWidth(\"100%\");\n\t\ttxtDefaultValue.setWidth(\"100%\");\n\t\tcbDataType.setWidth(\"100%\");\n\t\ttxtFormKey.setWidth(\"100%\");\n\n\t\tVerticalPanel verticalPanel = new VerticalPanel();\n\t\tverticalPanel.setSpacing(5);\n\t\tverticalPanel.add(table);\n\n\t\tDecoratedTabPanel tabs = new DecoratedTabPanel();\n\t\ttabs.add(skipRulesView, LocaleText.get(\"skipLogic\"));\n\t\ttabs.add(validationRulesView, LocaleText.get(\"validationLogic\"));\n\t\ttabs.add(dynamicListsView, LocaleText.get(\"dynamicLists\"));\n\n\t\ttabs.selectTab(0);\n\t\tverticalPanel.add(tabs);\n\t\tFormUtil.maximizeWidget(tabs);\n\n\t\tFormUtil.maximizeWidget(verticalPanel);\n\t\tinitWidget(verticalPanel);\n\n\t\tsetupEventListeners();\n\n\t\tcbDataType.setSelectedIndex(-1);\n\n\t\tenableQuestionOnlyProperties(false);\n\t\ttxtText.setEnabled(false);\n\t\t//txtDescTemplate.setVisible(false);\n\t\t//btnDescTemplate.setVisible(false);\n\t\tenableDescriptionTemplate(false);\n\t\ttxtCalculation.setEnabled(false);\n\t\tbtnCalculation.setEnabled(false);\n\t\ttxtBinding.setEnabled(false);\n\n\t\ttxtText.setTitle(LocaleText.get(\"questionTextDesc\"));\n\t\ttxtHelpText.setTitle(LocaleText.get(\"questionDescDesc\"));\n\t\ttxtBinding.setTitle(LocaleText.get(\"questionIdDesc\"));\n\t\ttxtDefaultValue.setTitle(LocaleText.get(\"defaultValDesc\"));\n\t\tcbDataType.setTitle(LocaleText.get(\"questionTypeDesc\"));\n\n\t\tDOM.sinkEvents(getElement(), Event.ONKEYDOWN | DOM.getEventsSunk(getElement()));\n\t}", "private void createContents()\n\t{\n\t\tGridLayout clayout = new GridLayout();\n\t\tclayout.marginHeight = 2;\n\t\tclayout.marginWidth = 2;\n\t\tclayout.marginTop = 2;\n\t\tclayout.marginBottom = 2;\n\t\tclayout.marginLeft = 2;\n\t\tclayout.marginRight = 2;\n\t\tclayout.numColumns = 1;\n\t\tsetLayout(clayout);\n\t\t\n\t\t\n\t\tm_executorsTable = new ExecutorsTable(this);\n\t\tGridData tableLayoutData = new GridData(GridData.FILL_BOTH);\n\t\ttableLayoutData.grabExcessHorizontalSpace = true;\n\t\ttableLayoutData.widthHint = 700;\n\t\ttableLayoutData.heightHint = 200;\n\t\tm_executorsTable.getGrid().setLayoutData(tableLayoutData);\n\t\tm_executorsTable.addDoubleClickListener(this);\n\t\tm_executorsTable.addSelectionChangedListener( new ISelectionChangedListener(){\n\n\t\t\t@Override\n public void selectionChanged(SelectionChangedEvent arg0)\n {\n\t\t\t\tupdateButtons();\n }\n\t\t\t\n\t\t});\n\n\t\tComposite buttonBar = new Composite(this, SWT.BORDER);\n\t\tbuttonBar.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\tbuttonBar.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\n\t\t\n\t\tm_btnTakeControl = new Button(buttonBar, SWT.PUSH);\n\t\tm_btnTakeControl.setText(BTN_TAKE_CONTROL);\n\t\tm_btnTakeControl.addSelectionListener(this);\n\t\t\n\t\tm_btnReleaseControl = new Button(buttonBar, SWT.PUSH);\n\t\tm_btnReleaseControl.setText(BTN_RELEASE_CONTROL);\n\t\tm_btnReleaseControl.addSelectionListener(this);\n\t\t\n\t\tm_btnBackground = new Button(buttonBar, SWT.PUSH);\n\t\tm_btnBackground.setText(BTN_BACKGROUND);\n\t\tm_btnBackground.addSelectionListener(this);\n\n\t\tm_btnStartMonitor = new Button(buttonBar, SWT.PUSH);\n\t\tm_btnStartMonitor.setText(BTN_START_MONITOR);\n\t\tm_btnStartMonitor.addSelectionListener(this);\n\t\t\n\t\tm_btnStopMonitor = new Button(buttonBar, SWT.PUSH);\n\t\tm_btnStopMonitor.setText(BTN_STOP_MONITOR);\n\t\tm_btnStopMonitor.addSelectionListener(this);\n\t\t\n\t\tm_btnStopExecutor = new Button(buttonBar, SWT.PUSH);\n\t\tm_btnStopExecutor.setText(BTN_STOP_EXECUTOR);\n\t\tm_btnStopExecutor.addSelectionListener(this);\n\n\t\tm_btnKillExecutor = new Button(buttonBar, SWT.PUSH);\n\t\tm_btnKillExecutor.setText(BTN_KILL_EXECUTOR);\n\t\tm_btnKillExecutor.addSelectionListener(this);\n\t\t\n\t\tm_btnRefresh = new Button(buttonBar, SWT.PUSH);\n\t\tm_btnRefresh.setText(BTN_REFRESH);\n\t\tm_btnRefresh.addSelectionListener(this);\n\t\t\n\t\tapplyFonts();\n\t\tdisableButtons();\n\t}", "private void createPageContent() \n\t{\n\t\tGridLayout gl = new GridLayout(4, true);\n gl.verticalSpacing = 10;\n\t\t\n\t\tGridData gd;\n\t\tfinal Label wiz1Label = new Label(shell, SWT.NONE);\n\t\twiz1Label.setText(\"Enter Fields\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 4;\n\t\twiz1Label.setLayoutData(gd);\n\t\twiz1Label.pack();\n\t\tText nameInput = new Text(shell, SWT.BORDER);\n\t\tnameInput.setMessage(\"Name\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tnameInput.setLayoutData(gd);\n\t\tnameInput.pack();\n\t\t//Component\n\t\tText componentInput = new Text(shell, SWT.BORDER);\n\t\tcomponentInput.setMessage(\"Component\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\tcomponentInput.setLayoutData(gd);\n\t\tcomponentInput.pack();\n\t\t//school\n\t\tText schoolInput = new Text(shell, SWT.BORDER);\n\t\tschoolInput.setMessage(\"School\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tschoolInput.setLayoutData(gd);\n\t\tschoolInput.pack();\n\t\t//range\n\t\tText rangeInput = new Text(shell, SWT.BORDER);\n\t\trangeInput.setMessage(\"Range\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\trangeInput.setLayoutData(gd);\n\t\trangeInput.pack();\n\t\t//Effect\n\t\tText effectInput = new Text(shell, SWT.BORDER);\n\t\teffectInput.setMessage(\"Effect\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 4;\n\t\teffectInput.setLayoutData(gd);\n\t\teffectInput.pack();\n\t\t//castingtime\n\t\tText castimeInput = new Text(shell, SWT.BORDER);\n\t\tcastimeInput.setMessage(\"Casting Time\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tcastimeInput.setLayoutData(gd);\n\t\tcastimeInput.pack();\n\t\t//materialcomponent\n\t\tText materialInput = new Text(shell, SWT.BORDER);\n\t\tmaterialInput.setMessage(\"Material Component\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\tmaterialInput.setLayoutData(gd);\n\t\tmaterialInput.pack();\n\t\t//Savingthrow\n\t\tText savthrowInput = new Text(shell, SWT.BORDER);\n\t\tsavthrowInput.setMessage(\"Saving Throw\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tsavthrowInput.setLayoutData(gd);\n\t\tsavthrowInput.pack();\n\t\t//Focus\n\t\tText focusInput = new Text(shell, SWT.BORDER);\n\t\tfocusInput.setMessage(\"Focus\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tfocusInput.setLayoutData(gd);\n\t\tfocusInput.pack();\n\t\t//Duration\n\t\tText durationInput = new Text(shell, SWT.BORDER);\n\t\tdurationInput.setMessage(\"Duration\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\tdurationInput.setLayoutData(gd);\n\t\tdurationInput.pack();\n\t\t//spellresistance\n\t\tLabel resistanceLabel = new Label(shell, SWT.NONE);\n\t\tresistanceLabel.setText(\"Can Spell Be Resisted\");\n\t\tgd = new GridData(GridData.CENTER, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 1;\n\t\tresistanceLabel.setLayoutData(gd);\n\t\tresistanceLabel.pack();\n\t\tButton resistanceInput = new Button(shell, SWT.CHECK);\n\t\tgd = new GridData(GridData.CENTER, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 1;\n\t\tresistanceInput.setLayoutData(gd);\n\t\tresistanceInput.pack();\n\t\t//level\n\t\tText levelInput = new Text(shell, SWT.BORDER);\n\t\tlevelInput.setMessage(\"Level\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tlevelInput.setLayoutData(gd);\n\t\tlevelInput.pack();\n\t\t//Damage\n\t\tText damageInput = new Text(shell, SWT.BORDER);\n\t\tdamageInput.setMessage(\"Damage\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 1;\n\t\tdamageInput.setLayoutData(gd);\n\t\tdamageInput.pack();\n\t\t//DamageAlternative\n\t\tText damagealterInput = new Text(shell, SWT.BORDER);\n\t\tdamagealterInput.setMessage(\"Damage Alternative\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\tdamagealterInput.setLayoutData(gd);\n\t\tdamagealterInput.pack();\n\t\n\t\t//description\n\t\t\n\t\tText descriptionInput = new Text(shell, SWT.WRAP | SWT.V_SCROLL);\n\t\tdescriptionInput.setText(\"Description (Optional)\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 4;\n\t\tgd.verticalSpan = 15;\n\t\tdescriptionInput.setLayoutData(gd);\n\t\tdescriptionInput.pack();\n\t\tLabel blank = new Label(shell, SWT.NONE);\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, true);\n\t\tgd.horizontalSpan = 4;\n\t\tblank.setLayoutData(gd);\n\t\tblank.pack();\n\t\tButton save = new Button(shell, SWT.PUSH);\n\n\t\tsave.setText(\"Save\");\n\t\tsave.addListener(SWT.Selection, new Listener()\n\t\t{\n\t\t\tpublic void handleEvent(Event event)\n\t\t\t{\n\t\t\t\tBoolean checkfault = false;\n\t\t\t\tLinkedHashMap<String, String> a = new LinkedHashMap<String, String>();\n\t\t\t\tif(nameInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tnameInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\tif(componentInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tcomponentInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\tif(schoolInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tschoolInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(castimeInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tcastimeInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(levelInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tlevelInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\tif(checkfault)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\ta.put(\"NAME\", nameInput.getText());\n\t\t\t\ta.put(\"COMPONENTS\", componentInput.getText());\n\t\t\t\ta.put(\"SCHOOL\", schoolInput.getText());\n\t\t\t\ta.put(\"CASTINGTIME\", castimeInput.getText());\n\t\t\t\ta.put(\"LEVEL\", levelInput.getText());\n\t\t\t\tif(resistanceInput.getSelection())\n\t\t\t\t{\n\t\t\t\t\ta.put(\"SPELLRESISTANCE\", \"YES\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ta.put(\"SPELLRESISTANCE\", \"NO\");\n\t\t\t\t}\n\t\t\t\tif(!materialInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"MATERIALCOMPONENT\", materialInput.getText());\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(!savthrowInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"SAVINGTHROW\", savthrowInput.getText());\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(!focusInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"FOCUS\", focusInput.getText());\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(!durationInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"DURATION\", durationInput.getText());\n\t\t\t\t}\n\t\t\t\tif(!damageInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"DAMAGE\", damageInput.getText());\n\t\t\t\t}\n\t\t\t\tif(!damagealterInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"DAMAGEALTERNATE\", damagealterInput.getText());\n\t\t\t\t}\n\t\t\t\tif(!rangeInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"RANGE\", rangeInput.getText());\n\t\t\t\t}\n\t\t\t\tif(!effectInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"EFFECT\", effectInput.getText());\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\ta.put(\"DESCRIPTION\", descriptionInput.getText());\n\t\t\t\tnewspell = new SpellEntity(a);\n\t\t\t\tMain.gameState.abilities.put(newspell.getName(), newspell);\n\t\t\t\tMain.gameState.customContent.put(newspell.getName(), newspell);\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t}\n\t\t);\n\t\tgd = new GridData(GridData.FILL, GridData.CENTER, false, false);\n\t\tgd.horizontalSpan = 1;\n\t\tsave.setLayoutData(gd);\n\t\tsave.pack();\n\t\tshell.setLayout(gl);\n\t\tshell.layout();\n\t\tshell.pack();\n//\t\t//wizard\n//\t\t\t\tfinal Composite wizPanel = new Composite(shell, SWT.BORDER);\n//\t\t\t\twizPanel.setBounds(0,0,WIDTH, HEIGHT);\n//\t\t\t\tfinal StackLayout wizLayout = new StackLayout();\n//\t\t\t\twizPanel.setLayout(wizLayout);\n//\t\t\t\t\n//\t\t\t\t//Page1 -- Name\n//\t\t\t\tfinal Composite wizpage1 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\twizpage1.setBounds(0,0,WIDTH,HEIGHT);\n//\t\t\t\t\n//\t\t\t\tfinal Label wiz1Label = new Label(wizpage1, SWT.NONE);\n//\t\t\t\twiz1Label.setText(\"Enter Name (required)\");\n//\t\t\t\twiz1Label.pack();\n//\t\t\t\tfinal Text wizpage1text = new Text(wizpage1, SWT.BORDER);\n//\t\t\t\twizpage1text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage1text.setText(\"FireBall\");\n//\t\t\t\tButton next1 = createNextButton(wizpage1);//TODO cancel and previous button\n//\t\t\t\tcreateBackButton(wizpage1, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage1, wizPanel, wizLayout);\n//\t\t\t\tnext1.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage1text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellname = wizpage1text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tSystem.out.println(\"PANIC: ITEM WIZARD PAGE 1 OUT\");\n//\t\t\t\t\t\t\t\tshell.close();\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{\n//\t\t\t\t\t\t\twiz1Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\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\t\n//\t\t\t\twizPages.add(wizpage1);\n//\t\t\t\t//Page2 -- component\n//\t\t\t\tfinal Composite wizpage2 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz2Label = new Label(wizpage2, SWT.NONE);\n//\t\t\t\twiz2Label.setText(\"Enter Component: (required)\");\n//\t\t\t\twiz2Label.pack();\n//\t\t\t\tfinal Text wizpage2text = new Text(wizpage2, SWT.BORDER);\n//\t\t\t\twizpage2text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage2text.setText(\"Fire\");\n//\t\t\t\tButton next2 = createNextButton(wizpage2);\n//\t\t\t\tcreateBackButton(wizpage2, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage2, wizPanel, wizLayout);\n//\t\t\t\tnext2.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage2text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellcomp = wizpage2text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\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{\n//\t\t\t\t\t\t\twiz2Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage2);\n//\t\t\t\t//Page3 -- School\n//\t\t\t\tfinal Composite wizpage3 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz3Label = new Label(wizpage3, SWT.NONE);\n//\t\t\t\twiz3Label.setText(\"Enter School: (required)\");\n//\t\t\t\twiz3Label.pack();\n//\t\t\t\tfinal Text wizpage3text = new Text(wizpage3, SWT.BORDER);\n//\t\t\t\twizpage3text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage3text.setText(\"Descruction\");\n//\t\t\t\tButton next3 = createNextButton(wizpage3);\n//\t\t\t\tcreateBackButton(wizpage3, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage3, wizPanel, wizLayout);\n//\t\t\t\tnext3.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage3text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellschool = wizpage3text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\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{\n//\t\t\t\t\t\t\twiz3Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage3);\n//\t\t\t\t//Page4 -- Range\n//\t\t\t\tfinal Composite wizpage4 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz4Label = new Label(wizpage4, SWT.NONE);\n//\t\t\t\twiz4Label.setText(\"Enter Range: (required)\");\n//\t\t\t\twiz4Label.pack();\n//\t\t\t\tfinal Text wizpage4text = new Text(wizpage4, SWT.BORDER);\n//\t\t\t\twizpage4text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage4text.setText(\"50 feet\");\n//\t\t\t\tButton next4 = createNextButton(wizpage4);\n//\t\t\t\tcreateBackButton(wizpage4, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage4, wizPanel, wizLayout);\n//\t\t\t\tnext4.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage4text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellrange = wizpage4text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\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{\n//\t\t\t\t\t\t\twiz4Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage4);\n//\t\t\t\t//Page5 -- effect\n//\t\t\t\tfinal Composite wizpage5 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz5Label = new Label(wizpage5, SWT.NONE);\n//\t\t\t\twiz5Label.setText(\"Enter Effect: (required)\");\n//\t\t\t\twiz5Label.pack();\n//\t\t\t\tfinal Text wizpage5text = new Text(wizpage5, SWT.BORDER);\n//\t\t\t\twizpage5text.setBounds(50, 50, 250, 150);\n//\t\t\t\twizpage5text.setText(\"No effect\");\n//\t\t\t\tButton next5 = createNextButton(wizpage5);\n//\t\t\t\tcreateBackButton(wizpage5, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage5, wizPanel, wizLayout);\n//\t\t\t\tnext5.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage5text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspelleffect = wizpage5text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\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{\n//\t\t\t\t\t\t\twiz5Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage5);\n//\t\t\t\t//Page6 -- casting time\n//\t\t\t\tfinal Composite wizpage6 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz6Label = new Label(wizpage6, SWT.NONE);\n//\t\t\t\twiz6Label.setText(\"Enter Casting Time: (required)\");\n//\t\t\t\twiz6Label.pack();\n//\t\t\t\tfinal Text wizpage6text = new Text(wizpage6, SWT.BORDER);\n//\t\t\t\twizpage6text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage6text.setText(\"1 turn\");\n//\t\t\t\tButton next6 = createNextButton(wizpage6);\n//\t\t\t\tcreateBackButton(wizpage6, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage6, wizPanel, wizLayout);\n//\t\t\t\tnext6.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage5text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellcastime = wizpage6text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\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{\n//\t\t\t\t\t\t\twiz6Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage6);\n//\t\t\t\t//Page7 -- Material Component\n//\t\t\t\tfinal Composite wizpage7 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz7Label = new Label(wizpage7, SWT.NONE);\n//\t\t\t\twiz7Label.setText(\"Enter Material Component: (required)\");\n//\t\t\t\twiz7Label.pack();\n//\t\t\t\tfinal Text wizpage7text = new Text(wizpage7, SWT.BORDER);\n//\t\t\t\twizpage7text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage7text.setText(\"None\");\n//\t\t\t\tButton next7 = createNextButton(wizpage7);\n//\t\t\t\tcreateBackButton(wizpage7, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage7, wizPanel, wizLayout);\n//\t\t\t\tnext7.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage7text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellmaterial = wizpage7text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\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{\n//\t\t\t\t\t\t\twiz7Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage7);\n//\t\t\t\t//Page8 -- saving throw\n//\t\t\t\tfinal Composite wizpage8 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz8Label = new Label(wizpage8, SWT.NONE);\n//\t\t\t\twiz8Label.setText(\"Enter Saving Throw: (required)\");\n//\t\t\t\twiz8Label.pack();\n//\t\t\t\tfinal Text wizpage8text = new Text(wizpage8, SWT.BORDER);\n//\t\t\t\twizpage8text.setBounds(50, 50, 200, 100);\n//\t\t\t\twizpage8text.setText(\"Will negate XX\");\n//\t\t\t\tButton next8 = createNextButton(wizpage8);\n//\t\t\t\tcreateBackButton(wizpage8, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage8, wizPanel, wizLayout);\n//\t\t\t\tnext8.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage8text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellsaving = wizpage8text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\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{\n//\t\t\t\t\t\t\twiz8Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage8);\n//\t\t\t\t//Page9 -- Focus\n//\t\t\t\tfinal Composite wizpage9 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz9Label = new Label(wizpage9, SWT.NONE);\n//\t\t\t\twiz9Label.setText(\"Enter Focus: (required)\");\n//\t\t\t\twiz9Label.pack();\n//\t\t\t\tfinal Text wizpage9text = new Text(wizpage9, SWT.BORDER);\n//\t\t\t\twizpage9text.setBounds(50, 50, 200, 100);\n//\t\t\t\twizpage9text.setText(\"A dart\");\n//\t\t\t\tButton next9 = createNextButton(wizpage9);\n//\t\t\t\tcreateBackButton(wizpage9, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage9, wizPanel, wizLayout);\n//\t\t\t\tnext9.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage9text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellfocus = wizpage9text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\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{\n//\t\t\t\t\t\t\twiz9Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage9);\n//\t\t\t\t//Page10 -- Duration\n//\t\t\t\tfinal Composite wizpage10 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz10Label = new Label(wizpage10, SWT.NONE);\n//\t\t\t\twiz10Label.setText(\"Enter Duration: (required)\");\n//\t\t\t\twiz10Label.pack();\n//\t\t\t\tfinal Text wizpage10text = new Text(wizpage10, SWT.BORDER);\n//\t\t\t\twizpage10text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage10text.setText(\"5 Turns\");\n//\t\t\t\tButton next10 = createNextButton(wizpage10);\n//\t\t\t\tcreateBackButton(wizpage10, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage10, wizPanel, wizLayout);\n//\t\t\t\tnext10.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage10text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellduration = wizpage10text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\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{\n//\t\t\t\t\t\t\twiz10Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage10);\n//\t\t\t\t//Page11 -- Level\n//\t\t\t\tfinal Composite wizpage11 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz11Label = new Label(wizpage11, SWT.NONE);\n//\t\t\t\twiz11Label.setText(\"Enter Level (required)\");\n//\t\t\t\twiz11Label.pack();\n//\t\t\t\tfinal Text wizpage11text = new Text(wizpage11, SWT.BORDER);\n//\t\t\t\twizpage11text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage11text.setText(\"1\");\n//\t\t\t\tButton next11 = createNextButton(wizpage11);\n//\t\t\t\tcreateBackButton(wizpage11, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage11, wizPanel, wizLayout);\n//\t\t\t\tnext11.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage11text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\ttry\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tif(Integer.parseInt(wizpage11text.getText()) >= 0)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspelllevel = String.valueOf(Integer.parseInt(wizpage11text.getText()));\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\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\telse\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twiz11Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\tcatch(NumberFormatException a)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twiz11Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\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{\n//\t\t\t\t\t\t\twiz11Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage11);\n//\t\t\t\t//Page12 -- resistance\n//\t\t\t\tfinal Composite wizpage12 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz12Label = new Label(wizpage12, SWT.NONE);\n//\t\t\t\twiz12Label.setText(\"Enter Spell resistance: (Yes/No)\");\n//\t\t\t\twiz12Label.pack();\n//\t\t\t\tfinal Text wizpage12text = new Text(wizpage12, SWT.BORDER);\n//\t\t\t\twizpage12text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage12text.setText(\"Yes\");\n//\t\t\t\tButton next12 = createNextButton(wizpage12);\n//\t\t\t\tcreateBackButton(wizpage12, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage12, wizPanel, wizLayout);\n//\t\t\t\tnext12.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage12text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellresistance = wizpage12text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\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{\n//\t\t\t\t\t\t\twiz12Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage12);\n//\t\t\t\t//Page13 - Description\n//\t\t\t\tfinal Composite wizpage13 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tLabel wiz13Label = new Label(wizpage13, SWT.NONE);\n//\t\t\t\twiz13Label.setText(\"Enter Description (Optional)\");\n//\t\t\t\twiz13Label.pack(); \n//\t\t\t\tfinal Text wizpage13text = new Text(wizpage13, SWT.BORDER);\n//\t\t\t\twizpage13text.setBounds(50, 50, 300, 200);\n//\t\t\t\twizpage13text.setText(\"Description here\");\n//\t\t\t\tButton next13 = createNextButton(wizpage13);\n//\t\t\t\tcreateBackButton(wizpage13, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage13, wizPanel, wizLayout);\n//\t\t\t\tnext13.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage13text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellscript = wizpage13text.getText();\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\tspellscript = \"<empty>\";\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\tCreateVerificationPage(wizPanel, wizLayout);\n//\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\n//\t\t\t\t\t\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage13);\n//\t\t\t\t\n//\t\t\t\twizLayout.topControl = wizpage1;\n//\t\t\t\twizPanel.layout();\n\t}", "private void addElementsGridPane(GridPane infosPane, Label toDrawLbl, \n Label wordLbl, Label avgPropsTitleLbl, \n Label avgPropsLbl) {\n infosPane.add(super.getGameStatusTitleLbl(), 0, 0);\n infosPane.add(super.getGameStatusLbl(), 0, 1);\n infosPane.add(toDrawLbl, 0, 5);\n infosPane.add(wordLbl, 0, 6);\n infosPane.add(avgPropsTitleLbl, 0, 8);\n infosPane.add(avgPropsLbl, 0, 9);\n infosPane.add(super.getHistoryLbl(), 0, 11);\n infosPane.add(super.getPropositionHist(), 0, 12);\n infosPane.add(super.getHistoryBtn(), 0, 18);\n infosPane.add(super.getQuitBtn(), 0, 20);\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 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 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 placeContentsInPanel() {\n\t\tGridBagConstraints constraints = new GridBagConstraints();\n\t\tconstraints.gridx = 0; \n\t\tconstraints.gridy = 0; \n\t\tconstraints.gridwidth = 1; \n\t\tconstraints.gridheight = 1; \n\t\tconstraints.insets = new Insets(10,0,0,0);\n\t\tconstraints.weighty = 0.0;\n\t\tconstraints.weightx = 1.0;\n\t\tthis.add(jpYourMusic,constraints);\n\n\t\tconstraints.gridx = 0; \n\t\tconstraints.gridy = 2; \n\t\tconstraints.gridwidth = 1; \n\t\tconstraints.gridheight = 1; \n\t\tconstraints.weighty = 0.0;\n\t\tthis.add(jpPreLists,constraints);\n\t\t\n\t\tconstraints.gridx = 0; \n\t\tconstraints.gridy = 3; \n\t\tconstraints.gridwidth = 1; \n\t\tconstraints.gridheight = 1; \n\t\tconstraints.weighty = 0.0;\n\t\tthis.add(jlYourLists,constraints);\n\t\t\n\t\tconstraints.gridx = 0; \n\t\tconstraints.gridy = 4; \n\t\tconstraints.gridwidth = 1; \n\t\tconstraints.gridheight = 1; \n\t\tconstraints.weighty = 0.0;\n\t\tthis.add(jbCreateLists,constraints);\n\t\t\n\t\t\n\t\tconstraints.gridx = 0; \n\t\tconstraints.gridy = 5; \n\t\tconstraints.gridwidth = 1; \n\t\tconstraints.gridheight = 1; \n\t\tconstraints.weighty = 0.0;\n\t\tthis.add(jpIntroduceNameList,constraints);\n\t\t\n\t\tconstraints.anchor = GridBagConstraints.NORTH;\n\t\tconstraints.gridx = 0; \n\t\tconstraints.gridy = 6; \n\t\tconstraints.gridwidth = 1; \n\t\tconstraints.gridheight = 1; \n\t\tconstraints.weighty = 1.0;\n\t\tthis.add(myTable,constraints);\n\t}", "private void setupSettings() {\n add(announcementBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(currentGamesBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(chatRoomBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(friendsListBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(leaderboardBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\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 }", "private void buildElements() {\n JPanel mainPanel = new JPanel(new BorderLayout());\n\n String[] columnNames = {\n \"Id\",\n \"Number of transaction\",\n \"Transaction price\",\n \"Paid type\",\n \"Buyer\",\n \"Amazon SKU\",\n \"Action\",\n };\n\n Object[][] emptyData = {};\n\n providerTableModel = new DefaultTableModel(emptyData, columnNames);\n\n providerTable = new JTable(providerTableModel) {\n public TableCellRenderer getCellRenderer(int row, int column) {\n return new ProviderTableCellRenderer();\n }\n };\n\n providerTable.addMouseListener(new ProviderTableMouseListener());\n\n providerTable.getTableHeader().setReorderingAllowed(false);\n\n /*providerTable.getColumnModel().getColumn(6).setMinWidth(100);\n providerTable.getColumnModel().getColumn(6).setMaxWidth(100);\n providerTable.getColumnModel().getColumn(6).setPreferredWidth(100);*/\n\n // Set rows height for providerTable (for all rows).\n providerTable.setRowHeight(40);\n\n // Set 'Actions' column width. All buttons normally see.\n //TableColumnModel columnModel = providerTable.getColumnModel();\n //columnModel.getColumn(5).setPreferredWidth(120);\n\n JScrollPane tableScrollPane = new JScrollPane(providerTable);\n\n mainPanel.add(tableScrollPane, BorderLayout.CENTER);\n\n this.add(mainPanel);\n }", "public void setGui()\n\t{\n\t\tdisplay = new Display();\n\t\tshell = new Shell(display, SWT.CLOSE | SWT.TITLE | SWT.MIN);\n\t\tshell.setText(\"Sensor Configurator\");\n\t\t// create a new GridLayout with 3 columns of same size\n\t\tGridLayout layout = new GridLayout(3, false);\n\t\tshell.setLayout(layout);\n\n\t\tsetTrayIcon();\n\n\t\tGroup groupLeft = new Group(shell, SWT.SHADOW_OUT);\n\t\tgroupLeft.setLayout(new GridLayout());\n\t\tgroupLeft.setText(\"Customer Group\");\n\n\t\tlistLabel = new Label(groupLeft, SWT.NONE);\n\t\tlistLabel.setText(\"List of Customers\");\n\t\tlistLabel.setLayoutData(new GridData(SWT.CENTER, SWT.TOP, false, false, 1, 1));\n\n\t\tcustomerList = new List(groupLeft, SWT.BORDER | SWT.V_SCROLL);\n\t\tGridData gridData = new GridData();\n\t\tgridData.horizontalAlignment = GridData.FILL;\n\t\tgridData.verticalAlignment = GridData.BEGINNING;\n\t\tgridData.heightHint = 220;\n\t\tgridData.widthHint = 150;\n\t\tgridData.grabExcessHorizontalSpace = true;\n\t\tgridData.grabExcessVerticalSpace = false;\n\t\tgridData.horizontalSpan = 1;\n\t\tgridData.verticalSpan = 1;\n\t\tcustomerList.setLayoutData(gridData);\n\t\tcustomerList.select(0);\n\t\t// customerList.showSelection();\n\n\t\t// Combo selection\n\t\tpriorityCombo = new Combo(groupLeft, SWT.READ_ONLY);\n\t\tpriorityCombo.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, true, 1, 1));\n\t\tpriorityCombo.setItems(new String[] {\"Filter by Priority\", \"HIGH\", \"MEDIUM\", \"LOW\"});\n\t\tpriorityCombo.select(0);\n\n\t\t// updateButton\n\t\tupdateButton = new Button(groupLeft, SWT.PUSH);\n\t\tupdateButton.setText(\"Update List\");\n\t\tgridData = new GridData();\n\t\tgridData.verticalAlignment = GridData.CENTER;\n\t\tgridData.horizontalAlignment = GridData.CENTER;\n\t\tgridData.widthHint = 100;\n\t\tgridData.heightHint = 30;\n\t\tgridData.grabExcessHorizontalSpace = true;\n\t\tgridData.grabExcessVerticalSpace = true;\n\t\tgridData.horizontalSpan = 1;\n\t\tgridData.verticalSpan = 1;\n\t\tupdateButton.setLayoutData(gridData);\n\n\t\t// center group\n\t\tGroup groupCenter = new Group(shell, SWT.SHADOW_OUT);\n\t\tGridLayout groupLayout = new GridLayout(2, false);\n\t\tgroupCenter.setLayout(groupLayout);\n\t\tgroupCenter.setText(\"Measurement group\");\n\n\t\tcustomerLabel = new Label(groupCenter, SWT.NONE);\n\t\tcustomerLabel.setText(\"Customer Info\");\n\t\tcustomerLabel.setLayoutData(new GridData(SWT.CENTER, SWT.TOP, false, false, 1, 1));\n\n\t\t// Measurement Label\n\t\tmeasLabel = new Label(groupCenter, SWT.NONE);\n\t\tmeasLabel.setText(\"Measurement Info\");\n\t\tmeasLabel.setLayoutData(new GridData(SWT.CENTER, SWT.TOP, true, false, 1, 1));\n\n\t\t// customerText\n\t\tcustomerText = new StyledText(groupCenter, SWT.BORDER | SWT.V_SCROLL | SWT.READ_ONLY | SWT.MULTI);\n\t\tgridData = new GridData();\n\t\tgridData.horizontalAlignment = GridData.FILL;\n\t\tgridData.verticalAlignment = GridData.BEGINNING;\n\t\tgridData.heightHint = 145;\n\t\tgridData.widthHint = 110;\n\t\tgridData.grabExcessHorizontalSpace = true;\n\t\tgridData.grabExcessVerticalSpace = false;\n\t\tgridData.horizontalSpan = 1;\n\t\tgridData.verticalSpan = 1;\n\t\tcustomerText.setLayoutData(gridData);\n\n\t\t// Measurement Text\n\t\tmeasureText = new StyledText(groupCenter, SWT.BORDER | SWT.V_SCROLL | SWT.READ_ONLY | SWT.MULTI);\n\t\tgridData = new GridData();\n\t\tgridData.horizontalAlignment = GridData.FILL;\n\t\tgridData.verticalAlignment = GridData.BEGINNING;\n\t\tgridData.heightHint = 145;\n\t\tgridData.widthHint = 160;\n\t\tgridData.grabExcessHorizontalSpace = true;\n\t\tgridData.grabExcessVerticalSpace = true;\n\t\tgridData.horizontalSpan = 1;\n\t\tgridData.verticalSpan = 1;\n\t\tmeasureText.setLayoutData(gridData);\n\n\t\t// Comment Label\n\t\tcommentLabel = new Label(groupCenter, SWT.NONE);\n\t\tcommentLabel.setText(\"Comment Here!\");\n\t\tcommentLabel.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, false, 1, 1));\n\n\t\t// Measurement Task Label\n\t\tmeasTaskLabel = new Label(groupCenter, SWT.NONE);\n\t\tmeasTaskLabel.setText(\"Measurement Tasks!\");\n\t\tmeasTaskLabel.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, false, 1, 1));\n\n\t\t// Comment Text\n\t\tcommentText = new StyledText(groupCenter, SWT.BORDER | SWT.MULTI);\n\t\tgridData = new GridData();\n\t\tgridData.horizontalAlignment = GridData.FILL;\n\t\tgridData.verticalAlignment = GridData.BEGINNING;\n\t\tgridData.heightHint = 80;\n\t\tgridData.widthHint = 110;\n\t\tgridData.grabExcessHorizontalSpace = true;\n\t\tgridData.grabExcessVerticalSpace = true;\n\t\tgridData.horizontalSpan = 1;\n\t\tgridData.verticalSpan = 1;\n\t\tcommentText.setLayoutData(gridData);\n\n\t\t// Measurement Task Text\n\t\tmeasurTaskText = new StyledText(groupCenter, SWT.BORDER | SWT.READ_ONLY | SWT.MULTI);\n\t\tgridData = new GridData();\n\t\tgridData.horizontalAlignment = GridData.FILL;\n\t\tgridData.verticalAlignment = GridData.BEGINNING;\n\t\tgridData.heightHint = 80;\n\t\tgridData.widthHint = 160;\n\t\tgridData.grabExcessHorizontalSpace = true;\n\t\tgridData.grabExcessVerticalSpace = true;\n\t\tgridData.horizontalSpan = 1;\n\t\tgridData.verticalSpan = 1;\n\t\tmeasurTaskText.setLayoutData(gridData);\n\n\t\t// Electrode selection\n\t\telectrodeCombo = new Combo(groupCenter, SWT.READ_ONLY);\n\t\telectrodeCombo.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, true, 2, 1));\n\t\telectrodeCombo.setItems(new String[] {\"Electrode\", \"Simple\", \"Test\", \"New\"});\n\t\telectrodeCombo.select(0);\n\n\t\t// right group\n\t\tGroup groupRight = new Group(shell, SWT.SHADOW_OUT);\n\t\tgroupRight.setLayout(new GridLayout());\n\t\tgroupRight.setText(\"Sensor group\");\n\n\t\tsensorLabel = new Label(groupRight, SWT.NONE);\n\t\tsensorLabel.setText(\"Sensor Info\");\n\t\tsensorLabel.setLayoutData(new GridData(SWT.CENTER, SWT.TOP, false, false, 1, 1));\n\n\t\tsensorText = new StyledText(groupRight, SWT.BORDER | SWT.V_SCROLL | SWT.READ_ONLY | SWT.MULTI);\n\t\tgridData = new GridData();\n\t\tgridData.horizontalAlignment = GridData.FILL;\n\t\tgridData.verticalAlignment = GridData.FILL;\n\t\tgridData.heightHint = 140;\n\t\tgridData.widthHint = 180;\n\t\tgridData.grabExcessHorizontalSpace = true;\n\t\tgridData.grabExcessVerticalSpace = false;\n\t\tgridData.horizontalSpan = 1;\n\t\tgridData.verticalSpan = 1;\n\t\tsensorText.setLayoutData(gridData);\n\n\t\t// sensor Task label\n\t\tsensorTaskLabel = new Label(groupRight, SWT.NONE);\n\t\tsensorTaskLabel.setText(\"Sensor Tasks\");\n\t\tsensorTaskLabel.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, false, 1, 1));\n\n\t\tsensorTaskText = new StyledText(groupRight, SWT.BORDER | SWT.READ_ONLY | SWT.MULTI);\n\t\tgridData = new GridData();\n\t\tgridData.horizontalAlignment = GridData.CENTER;\n\t\tgridData.verticalAlignment = GridData.BEGINNING;\n\t\tgridData.heightHint = 80;\n\t\tgridData.widthHint = 180;\n\t\tgridData.grabExcessHorizontalSpace = true;\n\t\tgridData.grabExcessVerticalSpace = true;\n\t\tgridData.horizontalSpan = 1;\n\t\tgridData.verticalSpan = 1;\n\t\tsensorTaskText.setLayoutData(gridData);\n\n\t\t// configButton\n\t\tconfigButton = new Button(groupRight, SWT.PUSH);\n\t\tconfigButton.setText(\"Start Configure\");\n\t\tgridData = new GridData();\n\t\tgridData.horizontalAlignment = GridData.CENTER;\n\t\tgridData.verticalAlignment = GridData.CENTER;\n\t\tgridData.widthHint = 100;\n\t\tgridData.heightHint = 30;\n\t\tgridData.grabExcessHorizontalSpace = true;\n\t\tgridData.grabExcessVerticalSpace = true;\n\t\tgridData.horizontalSpan = 1;\n\t\tgridData.verticalSpan = 1;\n\t\tconfigButton.setLayoutData(gridData);\n\n\t\tstatusBar = new Text(shell, SWT.BORDER | SWT.READ_ONLY | SWT.SINGLE);\n\t\tgridData = new GridData();\n\t\tgridData.horizontalAlignment = GridData.FILL;\n\t\tgridData.verticalAlignment = GridData.FILL;\n\t\tgridData.grabExcessHorizontalSpace = true;\n\t\tgridData.grabExcessVerticalSpace = true;\n\t\tgridData.horizontalSpan = 4;\n\t\tgridData.verticalSpan = 1;\n\t\tstatusBar.setLayoutData(gridData);\n\n\t}", "private void createAndAddViews() {\n \t\t// Create the layout parameters for each field\n \t\tfinal LinearLayout.LayoutParams labelParams = new LinearLayout.LayoutParams(\n \t\t\t\t0, LayoutParams.WRAP_CONTENT, 0.3f);\n \t\tlabelParams.gravity = Gravity.RIGHT;\n \t\tlabelParams.setMargins(0, 25, 0, 0);\n \t\tfinal LinearLayout.LayoutParams valueParams = new LinearLayout.LayoutParams(\n \t\t\t\t0, LayoutParams.WRAP_CONTENT, 0.7f);\n \t\tvalueParams.gravity = Gravity.LEFT;\n \t\tvalueParams.setMargins(0, 25, 0, 0);\n \n \t\t// Add a layout and text views for each property\n \t\tfor (final StockProperty property : m_propertyList) {\n \t\t\tLog.d(TAG, \"Adding row for property: \" + property.getPropertyName());\n \n \t\t\t// Create a horizontal layout for the label and value\n \t\t\tfinal LinearLayout layout = new LinearLayout(this);\n \t\t\tlayout.setLayoutParams(new LinearLayout.LayoutParams(\n \t\t\t\t\tLayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));\n \n \t\t\t// Create a TextView for the label\n \t\t\tfinal TextView label = new TextView(this);\n \t\t\tlabel.setLayoutParams(labelParams);\n \t\t\tlabel.setText(property.getLabelText());\n \t\t\tlabel.setTextAppearance(this, android.R.style.TextAppearance_Medium);\n \t\t\tlayout.addView(label);\n \n \t\t\t// Configure and add the value TextView (created when the property\n \t\t\t// was constructed)\n \t\t\tfinal TextView value = property.getView();\n \t\t\tvalue.setLayoutParams(valueParams);\n \t\t\tvalue.setHint(\"None\");\n \t\t\tvalue.setTextAppearance(this, android.R.style.TextAppearance_Medium);\n \t\t\tvalue.setTypeface(null, Typeface.BOLD);\n \t\t\tlayout.addView(value);\n \n \t\t\t// Add the row to the main layout\n \t\t\tm_resultsLayout.addView(layout);\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 createContents() {\n shell = new Shell(getParent(), SWT.BORDER | SWT.TITLE | SWT.APPLICATION_MODAL);\n shell.setSize(FORM_WIDTH, 700);\n shell.setText(getText());\n shell.setLayout(new GridLayout(1, false));\n\n TabFolder tabFolder = new TabFolder(shell, SWT.NONE);\n tabFolder.setLayoutData(TAB_GROUP_LAYOUT_DATA);\n\n // STRUCTURE PARAMETERS\n\n TabItem tbtmStructure = new TabItem(tabFolder, SWT.NONE);\n tbtmStructure.setText(\"Structure\");\n\n Composite grpStructure = new Composite(tabFolder, SWT.NONE);\n tbtmStructure.setControl(grpStructure);\n grpStructure.setLayout(TAB_GROUP_LAYOUT);\n grpStructure.setLayoutData(TAB_GROUP_LAYOUT_DATA);\n\n ParmDialogText.load(grpStructure, parms, \"meta\");\n ParmDialogText.load(grpStructure, parms, \"col\");\n ParmDialogText.load(grpStructure, parms, \"id\");\n ParmDialogChoices.load(grpStructure, parms, \"init\", Activation.values());\n ParmDialogChoices.load(grpStructure, parms, \"activation\", Activation.values());\n ParmDialogFlag.load(grpStructure, parms, \"raw\");\n ParmDialogFlag.load(grpStructure, parms, \"batch\");\n ParmDialogGroup cnn = ParmDialogText.load(grpStructure, parms, \"cnn\");\n ParmDialogGroup filters = ParmDialogText.load(grpStructure, parms, \"filters\");\n ParmDialogGroup strides = ParmDialogText.load(grpStructure, parms, \"strides\");\n ParmDialogGroup subs = ParmDialogText.load(grpStructure, parms, \"sub\");\n if (cnn != null) {\n if (filters != null) cnn.setGrouped(filters);\n if (strides != null) cnn.setGrouped(strides);\n if (subs != null) cnn.setGrouped(subs);\n }\n ParmDialogText.load(grpStructure, parms, \"lstm\");\n ParmDialogGroup wGroup = ParmDialogText.load(grpStructure, parms, \"widths\");\n ParmDialogGroup bGroup = ParmDialogText.load(grpStructure, parms, \"balanced\");\n if (bGroup != null && wGroup != null) {\n wGroup.setExclusive(bGroup);\n bGroup.setExclusive(wGroup);\n }\n\n // SEARCH CONTROL PARAMETERS\n\n TabItem tbtmSearch = new TabItem(tabFolder, SWT.NONE);\n tbtmSearch.setText(\"Training\");\n\n ScrolledComposite grpSearch0 = new ScrolledComposite(tabFolder, SWT.V_SCROLL);\n grpSearch0.setLayout(new FillLayout());\n grpSearch0.setLayoutData(TAB_GROUP_LAYOUT_DATA);\n tbtmSearch.setControl(grpSearch0);\n Composite grpSearch = new Composite(grpSearch0, SWT.NONE);\n grpSearch0.setContent(grpSearch);\n grpSearch.setLayout(TAB_GROUP_LAYOUT);\n grpSearch.setLayoutData(TAB_GROUP_LAYOUT_DATA);\n\n Enum<?>[] preferTypes = (this.modelType == TrainingProcessor.Type.CLASS ? RunStats.OptimizationType.values()\n : RunStats.RegressionType.values());\n ParmDialogChoices.load(grpSearch, parms, \"prefer\", preferTypes);\n ParmDialogChoices.load(grpSearch, parms, \"method\", Trainer.Type.values());\n ParmDialogText.load(grpSearch, parms, \"bound\");\n ParmDialogChoices.load(grpSearch, parms, \"lossFun\", LossFunctionType.values());\n ParmDialogText.load(grpSearch, parms, \"weights\");\n ParmDialogText.load(grpSearch, parms, \"iter\");\n ParmDialogText.load(grpSearch, parms, \"batchSize\");\n ParmDialogText.load(grpSearch, parms, \"testSize\");\n ParmDialogText.load(grpSearch, parms, \"maxBatches\");\n ParmDialogText.load(grpSearch, parms, \"earlyStop\");\n ParmDialogChoices.load(grpSearch, parms, \"regMode\", Regularization.Mode.values());\n ParmDialogText.load(grpSearch, parms, \"regFactor\");\n ParmDialogText.load(grpSearch, parms, \"seed\");\n ParmDialogChoices.load(grpSearch, parms, \"start\", WeightInit.values());\n ParmDialogChoices.load(grpSearch, parms, \"gradNorm\", GradientNormalization.values());\n ParmDialogChoices.load(grpSearch, parms, \"updater\", GradientUpdater.Type.values());\n ParmDialogText.load(grpSearch, parms, \"learnRate\");\n ParmDialogChoices.load(grpSearch, parms, \"bUpdater\", GradientUpdater.Type.values());\n ParmDialogText.load(grpSearch, parms, \"updateRate\");\n\n grpSearch.setSize(grpSearch.computeSize(FORM_WIDTH - 50, SWT.DEFAULT));\n\n // BOTTOM BUTTON BAR\n\n Composite grpButtonBar = new Composite(shell, SWT.NONE);\n grpButtonBar.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1));\n grpButtonBar.setLayout(new FillLayout(SWT.HORIZONTAL));\n\n Button btnSave = new Button(grpButtonBar, SWT.NONE);\n btnSave.setText(\"Save\");\n btnSave.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent evt) {\n try {\n parms.save(parmFile);\n } catch (IOException e) {\n ShellUtils.showErrorBox(getParent(), \"Error Saving Parm File\", e.getMessage());\n }\n }\n });\n\n Button btnClose = new Button(grpButtonBar, SWT.NONE);\n btnClose.setText(\"Cancel\");\n btnClose.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent evt) {\n shell.close();\n }\n });\n\n Button btnOK = new Button(grpButtonBar, SWT.NONE);\n btnOK.setText(\"Save and Close\");\n btnOK.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent evt) {\n try {\n parms.save(parmFile);\n shell.close();\n } catch (IOException e) {\n ShellUtils.showErrorBox(getParent(), \"Error Saving Parm File\", e.getMessage());\n }\n }\n });\n\n }", "private VerticalLayout buildGridInfo() {\n\t\tgridInfo = new VerticalLayout();\r\n\t\tgridInfo.setImmediate(false);\r\n\t\tgridInfo.setWidth(\"100%\");\r\n\t\tgridInfo.setHeight(\"100.0%\");\r\n\t\tgridInfo.setMargin(false);\r\n\t\tgridInfo.setSpacing(true);\r\n\t\t\r\n\t\t// gridTitle\r\n\t\tgridTitle = buildGridTitle();\r\n\t\tgridInfo.addComponent(gridTitle);\r\n\t\tgridInfo.setExpandRatio(gridTitle, 1.0f);\r\n\t\t\r\n\t\t// gridData\r\n\t\tgridData = buildGridData();\r\n\t\tgridInfo.addComponent(gridData);\r\n\t\tgridInfo.setExpandRatio(gridData, 1.0f);\r\n\t\t\r\n\t\treturn gridInfo;\r\n\t}", "ParametersView(){\r\n\t\ttable.setWidget(0, 0,new Label(OpenXDataFacade.getOpenXDataConstants().label_name()));\r\n\t\ttable.setWidget(0, 1,new Label(OpenXDataFacade.getOpenXDataConstants().label_value()));\r\n\t\ttable.setWidget(0, 2,new Label(OpenXDataFacade.getOpenXDataConstants().label_action()));\r\n\r\n\t\tFlexCellFormatter cellFormatter = table.getFlexCellFormatter();\r\n\t\tcellFormatter.setWidth(0, 2, \"10%\");\r\n\t\ttable.setStyleName(\"cw-FlexTable\");\r\n\r\n\t\tpanel.add(table);\r\n\t\tpanel.add(btnAdd);\r\n\r\n\t\tbtnAdd.addClickHandler(this);\r\n\t\tbtnAdd.setEnabled(false);\r\n\t\t\r\n\t\tinitWidget(panel);\r\n\t}", "private RGridBagLayoutPane getDatabasePane() {\n if (databasePane == null) {\n ULCTitledBorder ULCTitledBorder2 =\n BorderFactory.createTitledBorder(null, \"Database\", ULCTitledBorder.LEADING, ULCTitledBorder.DEFAULT_POSITION,\n new Font(\"Tahoma\", Font.PLAIN, 11), new Color(23, 64, 140));\n ULCTitledBorder2.setTitle(\"<%=ivy.cms.co(\\\"/Dialogs/about/databaseTitle\\\")%>\");\n ULCTitledBorder2.setBorder(null);\n RFiller filler1 = new RFiller();\n filler1\n .setStyleProperties(\"{/usePreferredSizeAsExactSize \\\"true\\\"/preferredSizeWidth \\\"135\\\"/preferredSizeHeight \\\"0\\\"}\");\n databasePane = new RGridBagLayoutPane();\n databasePane.setName(\"databasePane\");\n databasePane.setBorder(BorderFactory.createTitledBorder(null, \"Database\", ULCTitledBorder.LEADING,\n ULCTitledBorder.DEFAULT_POSITION, new Font(\"Tahoma\", Font.PLAIN, 11), new Color(23, 64, 140)));\n databasePane.setStyleProperties(\"{/fill \\\"HORIZONTAL\\\"/weightY \\\"0\\\"/insetsLeft \\\"5\\\"}\");\n databasePane.setBorder(ULCTitledBorder2);\n databasePane.add(getDbProductLabel(), new com.ulcjava.base.application.GridBagConstraints(0, 1, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n databasePane.add(getDbSystemLabel(), new com.ulcjava.base.application.GridBagConstraints(0, 0, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n databasePane.add(getDbSystemTextField(), new com.ulcjava.base.application.GridBagConstraints(1, 0, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n databasePane.add(getDbProductTextField(), new com.ulcjava.base.application.GridBagConstraints(1, 1, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n databasePane.add(getDbVersionLabel(), new com.ulcjava.base.application.GridBagConstraints(0, 2, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n databasePane.add(getDbVersionTextField(), new com.ulcjava.base.application.GridBagConstraints(1, 2, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n databasePane.add(filler1, new com.ulcjava.base.application.GridBagConstraints(0, 3, 1, 1, -1, -1,\n com.ulcjava.base.application.GridBagConstraints.CENTER, com.ulcjava.base.application.GridBagConstraints.NONE,\n new com.ulcjava.base.application.util.Insets(0, 0, 0, 0), 0, 0));\n }\n return databasePane;\n }", "private JScrollPane createInferenceHistoryOptionsPanel() {\n\n\t\tJPanel filterpanel = new JPanel();\n\t\t// filterpanel.setBackground(Color.BLUE);\n\t\tfilterpanel.setLayout(new BoxLayout(filterpanel, BoxLayout.Y_AXIS));\n\t\tfilterpanel.setBorder(new EmptyBorder(3, 10, 3, 10));\n\n\t\tJPanel panel_axiomtypecheckboxes_plus_label = createLabelledGridLayoutPanel(\"Filter Axiomtypes\",\n\t\t\t\ttypecheckboxpanel);\n\t\t// JPanel panel_group_plus_label =\n\t\t// getLabelledGridLayoutPanel(\"Grouping\", combo_group);\n\t\t// JPanel panel_renderer_plus_label =\n\t\t// getLabelledGridLayoutPanel(\"Renderer\", combo_renderer);\n\n\t\taxiomtypelist.addListSelectionListener(e -> {\n //updateConsequenceTables();\n //updateView();\n EventLogging.saveEvent(System.currentTimeMillis(), getOWLWorkspace().getSelectedTab().getId(),\n \"list_axiomtypes_selection\", \"NA\", \"wii\");\n });\n\n\t\tJPanel panel_axiomprio_plus_label = createLabelledGridLayoutPanel(\"Priority Table\",\n\t\t\t\ttable_axiom_pattern_priority);\n\n\t\ttable_axiom_pattern_priority.addMouseListener(new LoggingMouseListener(table_axiom_pattern_priority,\n\t\t\t\t\"table_axiom_pattern_priority_click\", getOWLWorkspace()));\n\n\t\tJPanel gl = new JPanel(new GridLayout(1, 2));\n\t\tgl.add(bt_entity_filter);\n\t\tgl.add(bt_entity_filter_reset);\n\t\tgl.setPreferredSize(new Dimension(0, 25));\n\t\tJPanel panel_entityfilter_plus_label = createLabelledGridLayoutPanel(\"Entity Filter\", gl);\n\n\t\t// JPanel panel_tautology_select_plus_label =\n\t\t// createTautologyCheckboxPanel(cl);\n\n\t\t// panel_axiomtypecheckboxes_plus_label.setMaximumSize(new\n\t\t// Dimension(0,10));\n\t\t// filterpanel.add(getMainLabel(\"Options\"));\n\t\t// filterpanel.add(Box.createRigidArea(new Dimension(10, 20)));\n\t\t// filterpanel.add(fontsize_panel);\n\t\t// filterpanel.add(Box.createRigidArea(new Dimension(10, 10)));\n\t\t// filterpanel.add(new JSeparator(SwingConstants.HORIZONTAL));\n\n\t\tJPanel tautologypanel = createTautologyCheckboxPanel();\n\n\t\tfilterpanel.add(panel_axiomtypecheckboxes_plus_label);\n\t\tfilterpanel.add(Box.createRigidArea(new Dimension(10, 5)));\n\t\tfilterpanel.add(bt_axtypes_advanced);\n\t\tfilterpanel.add(Box.createRigidArea(new Dimension(10, 10)));\n\t\tfilterpanel.add(new JSeparator(SwingConstants.HORIZONTAL));\n\t\tfilterpanel.add(Box.createRigidArea(new Dimension(10, 5)));\n\t\tfilterpanel.add(tautologypanel);\n\t\tfilterpanel.add(Box.createRigidArea(new Dimension(10, 10)));\n\t\t// filterpanel.add(new JSeparator(SwingConstants.HORIZONTAL));\n\t\t// filterpanel.add(Box.createRigidArea(new Dimension(10, 5)));\n\t\t// filterpanel.add(panel_at_advanced_plus_label);\n\t\t// filterpanel.add(Box.createRigidArea(new Dimension(10, 10)));\n\t\t// filterpanel.add(new JSeparator(SwingConstants.HORIZONTAL));\n\t\t// filterpanel.add(Box.createRigidArea(new Dimension(10, 5)));\n\t\t// filterpanel.add(panel_renderer_plus_label);\n\t\t// filterpanel.add(Box.createRigidArea(new Dimension(10, 10)));\n\t\tfilterpanel.add(new JSeparator(SwingConstants.HORIZONTAL));\n\t\tfilterpanel.add(Box.createRigidArea(new Dimension(10, 5)));\n\t\tfilterpanel.add(panel_entityfilter_plus_label);\n\t\tfilterpanel.add(Box.createRigidArea(new Dimension(10, 5)));\n\t\tfilterpanel.add(entity_select_label);\n\t\tfilterpanel.add(Box.createRigidArea(new Dimension(10, 10)));\n\t\tfilterpanel.add(new JSeparator(SwingConstants.HORIZONTAL));\n\t\tfilterpanel.add(Box.createRigidArea(new Dimension(10, 5)));\n\t\tfilterpanel.add(panel_axiomprio_plus_label);\n\t\t// filterpanel.add(panel_tautology_select_plus_label);\n\n\t\treturn new JScrollPane(filterpanel);\n\t}", "private JPanel createAvailableConditionsSetPanel() {\n\t\tJPanel toReturn = new JPanel(new GridBagLayout());\n\n\t\t\n\t\t// Action for show profiling preferences.\n\t\t AbstractAction showProfilingPageAction = new AbstractAction(\"Profiling Preferences\") {\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tPluginWorkspaceProvider.getPluginWorkspace().showPreferencesPages(new String[] { \"profiling.conditions\" },\n\t\t\t\t\t\t\"profiling.conditions\", true);\n\t\t\t\n\t\t\t\t//update the panel \n\t\t\t\tcomboBoxUpdate();\n\t\t\t}\n\t\t};\n\n\t\t\n\t\t // Button for display profiling preferences\n\t\t ToolbarButton buttonToProfiling = new ToolbarButton(showProfilingPageAction, true);\n\t\t\n\t\t\n\t\tGridBagConstraints gbc = new GridBagConstraints();\n\t\t\n\t\t//add the checkBox\n\t\tgbc.gridx = 0;\n\t\tgbc.gridy = 0;\n\t\tgbc.weightx = 1;\n\t\ttoReturn.add(useAllCondSetsRBtn, gbc);\n\t\t\n\t\t//add the button\n\t\tgbc.gridx = 1;\n\t\tgbc.weightx = 0;\n\n\t\tURL imageToLoad = getClass().getClassLoader().getResource(Images.PREFERENCES_ICON);\n\t\tif (imageToLoad != null) {\n\t\t\tbuttonToProfiling.setIcon(ro.sync.ui.Icons.getIcon(imageToLoad.toString()));\n\t\t\tbuttonToProfiling.setText(\"\");\n\t\t} else {\n\t\t\tbuttonToProfiling.setText(\"PC\");\n\t\t}\n\t\ttoReturn.add(buttonToProfiling, gbc);\n\n\t\treturn toReturn;\n\t}", "private void buildGrid()\n {\n actions.setText(\"Select\");\n\n actions.setMenu(new MenuBuilder()\n .build(visit, icons.contact16())\n .build(delete, icons.delete16())\n .build(message, icons.mail16())\n .get());\n\n contactsColumnModel = new ColumnModel<ContactInfo>(new ColumnsBuilder<ContactInfo>()\n .build(\"\", props.name(), 50, true, new IconCell(icons.contact16()))\n .build(\"Name\", props.name(), 150, false)\n .build(\"Lastname1\", props.lastname1(), 150, false)\n .build(\"Lastname2\", props.lastname2(), 150, true)\n .build(\"Actions\", props.name(), 50, false, actions)\n .get());\n }", "void initLayout() {\n\t\t/* Randomize the number of rows and columns */\n\t\tNUM = Helper.randomizeNumRowsCols();\n\n\t\t/* Remove all the children of the gridContainer. It will be added again */\n\t\tpiecesGrid.removeAllViews();\n\t\t\n\t\t/* Dynamically calculate the screen positions and sizes of the individual pieces\n\t * Store the starting (x,y) of all the pieces in pieceViewLocations */\n\t\tpieceViewLocations = InitDisplay.initialize(getScreenDimensions(), getRootLayoutPadding());\n\t\t\n\t\t/* Create an array of ImageViews to store the individual piece images */\n\t\tcreatePieceViews();\n\t\t\n\t\t/* Add listeners to the ImageViews that were created above */\n\t\taddImageViewListeners();\n\t}", "@Override\r\n\tprotected void initPage() {\n\t\t\r\n\t\t\r\n\t\tJPanel paneLabel = new JPanel();\r\n\t\t//JPanel panelTabs = new JPanel();\r\n\t\t\r\n\t\t\r\n\t\t//pack.setVisible(false);\r\n\r\n\t\t//setlay out\r\n\t\t//panelTabs.setLayout(new GridLayout(1, 1));\r\n\t\t\r\n\t\t//add label to label panel\r\n\t\tpaneLabel.add(new JLabel(\"Please select Objects To export\"));\r\n\t\t//tabs.setLayout(new GridLayout(1, 1));\r\n\t\t\r\n\t\t//add tabs\r\n\t\ttabs.addTab(\"Packages\", null, pack, \"Packages\");\r\n\t\ttabs.addTab(\"Functions\", null, fun, \"Functions\");\r\n\t\ttabs.addTab(\"Procedures\", null, proc, \"Procedures\");\r\n\t\ttabs.addTab(\"Schemas\", null, sch, \"Schemas\");\r\n\t\t\r\n\t\t\r\n\t\ttabs.setTabPlacement(JTabbedPane.TOP);\r\n\t\t\r\n\t\t//add tabs to tabpanel panel\r\n\t\t//panelTabs.add(tabs);\r\n\t\t\r\n\t\t//add data tables to panels\r\n\t\tpackTbl = new JObjectTable(pack);\r\n\t\tfunTbl = new JObjectTable(fun);\r\n\t\tschTbl = new JObjectTable(sch);\r\n\t\tprocTbl = new JObjectTable(proc);\r\n\t\t\r\n\t\t//set layout\r\n\t\tsetLayout(new GridLayout(1,1));\r\n\t\t\r\n\t\t//add label & tabs to page panel\r\n\t\t//add(paneLabel, BorderLayout.NORTH);\r\n\t\t//add(panelTabs,BorderLayout.CENTER);\r\n\t\tadd(tabs);\r\n\t\t\r\n\t\t//init select all check boxes\r\n\t\tinitChecks();\r\n\t\t\r\n\t\t//add checks to panel\r\n\t\tpack.add(ckPack);\r\n\t\tfun.add(ckFun);\r\n\t\tsch.add(ckSchema);\r\n\t\tproc.add(ckProc);\r\n\t\t\r\n\t}", "public void setSoundBoardLayout() {\n\n soundBoardList = new SoundBoardListType();\n soundBoardList = db.getAllSoundboards();\n soundBoardNames = new ArrayList();\n\n for (int i = 0; i < soundBoardList.getSoundBoardList().size(); i++) {\n soundBoardNames.add(soundBoardList.getSoundBoardList().get(i).getSoundBoardName());\n }\n\n soundBoardNames.add(\"+\");\n setContentView(R.layout.main_grid);\n GridView gridView = (GridView) findViewById(R.id.soundboardgrid);\n\n soundBoardListAdapter = new ArrayAdapter<String>(this, R.layout.main_sbrowtext, soundBoardNames);\n gridView.setAdapter(soundBoardListAdapter);\n gridView.setOnItemClickListener(openSoundBoardListener);\n gridView.setOnItemLongClickListener(editSoundBoardListener);\n gridView.setBackgroundColor(Color.BLACK);\n gridView.setStretchMode(GridView.STRETCH_COLUMN_WIDTH);\n gridView.getSelector().setAlpha(100);\n\n }", "private void setupLeaderBoards() {\n add(announcementBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(currentGamesBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(chatRoomBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(friendsListBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(settingsBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n }", "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 InitilizeGridLayout() {\n Resources r = getResources();\n float padding = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,\n Const.GRID_PADDING, r.getDisplayMetrics());\n\n // Column width\n columnWidth = (int) ((getScreenWidth() - ((4) * padding)) / 2);\n\n // Setting number of grid columns\n mGridView.setNumColumns(2);\n mGridView.setColumnWidth(columnWidth);\n mGridView.setStretchMode(GridView.NO_STRETCH);\n mGridView.setPadding((int) padding, (int) padding, (int) padding,\n (int) padding);\n\n // Setting horizontal and vertical padding\n mGridView.setHorizontalSpacing((int) padding);\n mGridView.setVerticalSpacing((int) padding);\n }", "public void createLayout() {\n\t\tpersons = createPersonGuessPanel();\t\t\n\t\tweapons = createWeaponGuessPanel();\n\t\trooms = createRoomGuessPanel();\n\t\t\n\t\tpersonCheckList = createPeoplePanel();\n\t\tweaponCheckList =createWeaponsPanel(); \n\t\troomCheckList = createRoomsPanel();\n\t\t\n\t\tJPanel completed = new JPanel();\n\t\tcompleted.setLayout(new GridLayout(3, 2));\n\t\tadd(completed, BorderLayout.CENTER);\n\t\tcompleted.add(personCheckList);\n\t\tcompleted.add(persons);\n\t\tcompleted.add(weaponCheckList);\n\t\tcompleted.add(weapons);\n\t\tcompleted.add(roomCheckList);\n\t\tcompleted.add(rooms);\n\t}", "private void createContents() {\n shell = new Shell(getParent(), getStyle());\n shell.setSize(540, 297);\n shell.setLayout(new GridLayout(1, false));\n\n Composite cmpTop = new Composite(shell, SWT.NONE);\n cmpTop.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n GridLayout gl_cmpTop = new GridLayout(4, false);\n gl_cmpTop.verticalSpacing = 0;\n cmpTop.setLayout(gl_cmpTop);\n\n Label lblBankAccountNumber = new Label(cmpTop, SWT.CENTER);\n lblBankAccountNumber.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n lblBankAccountNumber.setBounds(0, 0, 59, 14);\n lblBankAccountNumber.setText(\"Bank Account\");\n Label lblBranch = new Label(cmpTop, SWT.CENTER);\n lblBranch.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n lblBranch.setBounds(0, 0, 59, 14);\n lblBranch.setText(\"Branch\");\n\n Label lblBank = new Label(cmpTop, SWT.CENTER);\n lblBank.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));\n lblBank.setText(\"Bank\");\n new Label(cmpTop, SWT.NONE);\n\n txtBankAccountNumber = new Text(cmpTop, SWT.BORDER);\n txtBankAccountNumber.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));\n txtBankAccountNumber.setBounds(0, 0, 64, 19);\n\n txtBranch = new Text(cmpTop, SWT.BORDER);\n GridData gd_txtBranch = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1);\n gd_txtBranch.widthHint = 50;\n txtBranch.setLayoutData(gd_txtBranch);\n txtBranch.setBounds(0, 0, 64, 19);\n\n txtBank = new Text(cmpTop, SWT.BORDER);\n GridData gd_txtBank = new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1);\n gd_txtBank.widthHint = 50;\n txtBank.setLayoutData(gd_txtBank);\n btnSearch = new Button(cmpTop, SWT.NONE);\n btnSearch.setAlignment(SWT.RIGHT);\n btnSearch.setText(\"Search\");\n btnSearch.setEnabled(false);\n\n Composite cmpResults = new Composite(shell, SWT.NONE);\n cmpResults.setLayout(new GridLayout(1, false));\n GridData gd_cmpResults = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);\n gd_cmpResults.heightHint = 129;\n cmpResults.setLayoutData(gd_cmpResults);\n\n tblAccounts = new Table(cmpResults, SWT.BORDER);\n GridData gd_tblAccounts = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);\n gd_tblAccounts.heightHint = 71;\n tblAccounts.setLayoutData(gd_tblAccounts);\n tblAccounts.setHeaderVisible(true);\n tblAccounts.setLinesVisible(true);\n\n TableColumn tblclmnAccountNumber = new TableColumn(tblAccounts, SWT.NONE);\n tblclmnAccountNumber.setWidth(120);\n tblclmnAccountNumber.setText(\"Player Account\");\n\n TableColumn tblclmsFirstName = new TableColumn(tblAccounts, SWT.NONE);\n tblclmsFirstName.setWidth(100);\n tblclmsFirstName.setText(\"First Name\");\n\n TableColumn tblclmnLastName = new TableColumn(tblAccounts, SWT.NONE);\n tblclmnLastName.setWidth(100);\n tblclmnLastName.setText(\"Last Name\");\n\n TableColumn tblclmnActivated = new TableColumn(tblAccounts, SWT.NONE);\n tblclmnActivated.setWidth(95);\n tblclmnActivated.setText(\"From\");\n\n TableColumn tblclmnDeactivated = new TableColumn(tblAccounts, SWT.NONE);\n tblclmnDeactivated.setWidth(100);\n tblclmnDeactivated.setText(\"To\");\n\n Composite cmpFooter = new Composite(shell, SWT.NONE);\n cmpFooter.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n cmpFooter.setLayout(new GridLayout(2, false));\n\n lblResultsMessage = new Label(cmpFooter, SWT.NONE);\n lblResultsMessage.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));\n\n Composite cmpButtons = new Composite(cmpFooter, SWT.NONE);\n cmpButtons.setLayout(new GridLayout(3, false));\n cmpButtons.setLayoutData(new GridData(SWT.RIGHT, SWT.BOTTOM, true, false, 1, 1));\n\n btnLoad = new Button(cmpButtons, SWT.NONE);\n btnLoad.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1));\n btnLoad.setText(\"Load Account\");\n btnLoad.setEnabled(false);\n\n btnCancel = new Button(cmpButtons, SWT.NONE);\n btnCancel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false, 1, 1));\n btnCancel.setText(\"Cancel\");\n new Label(cmpButtons, SWT.NONE);\n }", "@Override\n public void initialiseUiCells() {\n }", "private void setupLayout() {\n this.setLayout(new BorderLayout());\n\t\tthis.setupConstraints();\n\n\t\tJPanel titleAuthorFields = new JPanel(new GridBagLayout());\n\t\ttitleAuthorFields.add(Pirex.inputField(titleLabel, titleTextField, null), cTitleField);\n\t\ttitleAuthorFields.add(Pirex.inputField(authorLabel, authorTextField, null), cAuthorField);\n\n\t\tJPanel inputFields = new JPanel(new GridLayout(3, 0));\n\t\tinputFields.add(Pirex.inputField(fileLabel, fileTextField, fileBrowseButton));\n\t\tinputFields.add(Pirex.inputField(fileTypeLabel, fileTypeComboBox, null));\n\t\tinputFields.add(titleAuthorFields);\n\t\tinputFields = Pirex.borderLayoutWrap(null, null, inputFields, null, separator);\n\n\t\tJPanel leftAlignedProcessButton = Pirex.leftAlign(processButton);\n\t\tJPanel processPanel = Pirex.borderLayoutWrap(leftAlignedProcessButton, null, summaryScrollPanel, null, null);\n\t\tJPanel loadTabPanel = Pirex.borderLayoutWrap(inputFields, null, processPanel, null, null);\n\n\t\tthis.add(Pirex.withBorder(loadTabPanel), BorderLayout.CENTER);\n\n }", "@Override\n protected List<IColumn<PrismContainerValueWrapper<AssignmentType>, String>> initBasicColumns() {\n List<IColumn<PrismContainerValueWrapper<AssignmentType>, String>> columns = new ArrayList<>();\n\n columns.add(new IconColumn<PrismContainerValueWrapper<AssignmentType>>(Model.of(\"\")) {\n\n private static final long serialVersionUID = 1L;\n\n @Override\n protected DisplayType getIconDisplayType(IModel<PrismContainerValueWrapper<AssignmentType>> rowModel) {\n return WebComponentUtil.createDisplayType(WebComponentUtil.createDefaultBlackIcon(\n AssignmentsUtil.getTargetType(rowModel.getObject().getRealValue())));\n }\n\n });\n\n columns.add(new AbstractColumn<PrismContainerValueWrapper<AssignmentType>, String>(createStringResource(\"PolicyRulesPanel.nameColumn\")){\n private static final long serialVersionUID = 1L;\n\n @Override\n public void populateItem(Item<ICellPopulator<PrismContainerValueWrapper<AssignmentType>>> cellItem,\n String componentId, final IModel<PrismContainerValueWrapper<AssignmentType>> rowModel) {\n String name = AssignmentsUtil.getName(rowModel.getObject(), getParentPage());\n if (StringUtils.isBlank(name)) {\n name = createStringResource(\"AssignmentPanel.noName\").getString();\n }\n cellItem.add(new Label(componentId, Model.of(name)));\n }\n });\n return columns;\n }", "@Override\n protected void initialiseUiColumns() {\n }", "private Composite createProcedureSettingComposite() {\n\t\tfinal Composite composite = new Composite(tabFolder, SWT.LEFT | SWT.WRAP);\n\t\tcomposite.setLayoutData(new GridData(GridData.FILL_BOTH));\n\t\tGridLayout layoutComp;\n\t\tlayoutComp = new GridLayout();\n\t\tlayoutComp.marginWidth = 10;\n\t\tlayoutComp.marginHeight = 10;\n\t\tlayoutComp.numColumns = 2;\n\t\tcomposite.setLayout(layoutComp);\n\t\tfinal Label functionNameLabel = new Label(composite, SWT.NONE);\n\t\tfunctionNameLabel.setLayoutData(CommonUITool.createGridData(1, 1, -1, -1));\n\t\tfunctionNameLabel.setText(Messages.lblProcedureName);\n\n\t\tprocNameText = new Text(composite, SWT.BORDER);\n\t\tprocNameText.setTextLimit(ValidateUtil.MAX_SCHEMA_NAME_LENGTH);\n\t\tprocNameText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));\n\t\tprocNameText.addKeyListener(new org.eclipse.swt.events.KeyAdapter() {\n\t\t\tpublic void keyPressed(KeyEvent event) {\n\t\t\t}\n\n\t\t\tpublic void keyReleased(KeyEvent event) {\n\t\t\t\tif (StringUtil.isEmpty(procNameText.getText())) {\n\t\t\t\t\tgetButton(IDialogConstants.OK_ID).setEnabled(false);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tgetButton(IDialogConstants.OK_ID).setEnabled(true);\n\t\t\t}\n\t\t});\n\n\t\tif (isCommentSupport) {\n\t\t\tfinal Label procDescriptionLabel = new Label(composite, SWT.NONE);\n\t\t\tprocDescriptionLabel.setLayoutData(CommonUITool.createGridData(1, 1, -1, -1));\n\t\t\tprocDescriptionLabel.setText(Messages.lblProcedureDescription);\n\n\t\t\tprocDescriptionText = new Text(composite, SWT.BORDER);\n\t\t\tprocDescriptionText.setTextLimit(ValidateUtil.MAX_DB_OBJECT_COMMENT);\n\t\t\tprocDescriptionText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));\n\t\t}\n\n\t\tfinal String[] userColumnNameArr = isCommentSupport\n\t\t\t\t? new String[] {\n\t\t\t\t\tMessages.tblColProcedureParamName,\n\t\t\t\t\tMessages.tblColProcedureParamType,\n\t\t\t\t\tMessages.tblColProcedureJavaParamType,\n\t\t\t\t\tMessages.tblColProcedureModel,\n\t\t\t\t\tMessages.tblColProcedureMemo }\n\t\t\t\t: new String[] {\n\t\t\t\t\tMessages.tblColProcedureParamName,\n\t\t\t\t\tMessages.tblColProcedureParamType,\n\t\t\t\t\tMessages.tblColProcedureJavaParamType,\n\t\t\t\t\tMessages.tblColProcedureModel };\n\t\tprocParamsTableViewer = CommonUITool.createCommonTableViewer(composite,\n\t\t\t\tnull, userColumnNameArr,\n\t\t\t\tCommonUITool.createGridData(GridData.FILL_BOTH, 6, 4, -1, 200));\n\t\tprocParamsTable = procParamsTableViewer.getTable();\n\t\tprocParamsTableViewer.getTable().addSelectionListener(new SelectionListener() {\n\t\t\tpublic void widgetDefaultSelected(SelectionEvent event) {\n\t\t\t}\n\n\t\t\tpublic void widgetSelected(SelectionEvent event) {\n\t\t\t\tif (procParamsTableViewer.getTable().getSelectionCount() > 0) {\n\t\t\t\t\tgetButton(BUTTON_EDIT_ID).setEnabled(true);\n\t\t\t\t\tgetButton(BUTTON_UP_ID).setEnabled(true);\n\t\t\t\t\tgetButton(BUTTON_DOWN_ID).setEnabled(true);\n\t\t\t\t\tgetButton(BUTTON_DROP_ID).setEnabled(true);\n\t\t\t\t}\n\t\t\t}\n\n\t\t});\n\t\tprocParamsTableViewer.setInput(procParamsListData);\n\t\tprocParamsTable.setLinesVisible(true);\n\t\tprocParamsTable.setHeaderVisible(true);\n\t\tprocParamsTable.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(SelectionEvent event) {\n\t\t\t\t// setBtnEnableDisable();\n\t\t\t}\n\t\t});\n\n\t\tbarComp = new Composite(composite, SWT.NONE);\n\t\tfinal GridData gdbarComp = new GridData(GridData.FILL_HORIZONTAL);\n\t\tgdbarComp.horizontalSpan = 2;\n\t\tbarComp.setLayoutData(gdbarComp);\n\t\tGridLayout layout = new GridLayout();\n\t\tlayout.marginWidth = 10;\n\t\tlayout.marginHeight = 10;\n\t\tbarComp.setLayout(layout);\n\n\t\tfinal Label javaNameLabel = new Label(composite, SWT.LEFT | SWT.WRAP);\n\t\tjavaNameLabel.setLayoutData(CommonUITool.createGridData(1, 1, -1, -1));\n\t\tjavaNameLabel.setText(Messages.lblJavaFunctionName);\n\n\t\tjavaNameText = new Text(composite, SWT.BORDER);\n\t\tGridData gdJavaNameText = new GridData(GridData.FILL_HORIZONTAL);\n\t\tjavaNameText.setLayoutData(gdJavaNameText);\n\n\t\treturn composite;\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 }", "private void initColumns() throws Exception {\n\t\t\n\t\tTree tree = wrapedViewer.getTree();\n\t\ttree.setHeaderVisible(true);\n\t\t\n\t\t//PreferenceStore prefStore = mOyster2.getPreferenceStore();\n\t\tProperties mprop = mOyster2.getProperties();\n\t\t//IPreferenceStore prefStore = JFacePreferences.getPreferenceStore();\n\t\tint count = mprop.getInteger(Constants.NUMBER_OF_COLUMNS);\n\t\tfor(int i=0; i<count; i++){\n\t\t\tString columnType = mprop.getString(Constants.COLUMN_TYPE+i);\n\t\t\tString columnName = mprop.getString(Constants.COLUMN_NAME+i);\n\t\t\tint columnWidth = mprop.getInteger(Constants.COLUMN_WIDTH+i);\n\t\t\taddColumn(new ResultViewerColumnInfo(columnName, columnType, columnWidth));\n\t\t}\n\t\t\n\t}", "private void initializeGrid() {\n // 50 pixel first row for banner\n addPercentRows(root, 5);\n // second row takes up 100% of the remaining space\n addPercentRows(root, 95);\n // One column at 100% width\n addPercentColumns(root, 100);\n\n Label title = new Label(\"Mission Control\");\n title.setFont(new Font(\"Arial\", 22));\n title.setTextFill(Color.WHITE);\n\n GridPane contentGrid = new GridPane();\n // Only need one row as content will fill the entire vertical space\n addPercentRows(contentGrid, 100);\n\n // Need three columns, 1/6 column for nav, 2/3 for main content, 1/6 for warnings\n double sidePanelPercent = (1d / 6d) * 100d;\n double centerPanelPercent = (2d / 3d) * 100d;\n addPercentColumns(contentGrid, sidePanelPercent, centerPanelPercent, sidePanelPercent);\n\n\n addNodeToGrid(title, root, 0, 0, Pos.CENTER, Colours.PRIMARY_COLOUR, Insets.EMPTY);\n // NOTE:: This assumes that it is the only child added to root by this point to set ID.\n // If this is changed DynamicGuiTests will break.\n root.getChildren().get(0).setId(\"pnBanner\");\n\n addNodeToGrid(contentGrid, root, 1, 0);\n\n setupCenterPanel(contentGrid);\n setupRightHandSidePanel(contentGrid);\n setupLeftHandSidePanel(contentGrid);\n\n // Assert they are created - mainly to bypass Spot bugs issues.\n assert this.navigationView != null;\n assert this.graphView != null;\n assert this.informationView != null;\n }", "private void $$$setupUI$$$() {\n mainPanel = new JPanel();\n mainPanel.setLayout(new GridLayoutManager(6, 2, new Insets(0, 0, 0, 0), -1, -1));\n final JScrollPane scrollPane1 = new JScrollPane();\n scrollPane1.setVerticalScrollBarPolicy(22);\n scrollPane1.setVisible(true);\n mainPanel.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 mapTable = new MapTable();\n mapTable.setVisible(false);\n scrollPane1.setViewportView(mapTable);\n final JScrollPane scrollPane2 = new JScrollPane();\n scrollPane2.setVerticalScrollBarPolicy(22);\n mainPanel.add(scrollPane2, new GridConstraints(1, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(200, -1), null, 0, false));\n samplesList = new JList<>();\n samplesList.setSelectionMode(0);\n scrollPane2.setViewportView(samplesList);\n final JSeparator separator1 = new JSeparator();\n mainPanel.add(separator1, new GridConstraints(4, 0, 1, 2, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n statusBox = new JComboBox<>();\n mainPanel.add(statusBox, new GridConstraints(5, 0, 1, 2, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(2, 5, new Insets(0, 0, 0, 0), -1, -1));\n mainPanel.add(panel1, new GridConstraints(2, 0, 2, 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 currentSampleLabel = new JLabel();\n currentSampleLabel.setText(\"<текущий образец>\");\n panel1.add(currentSampleLabel, new GridConstraints(0, 1, 2, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"от:\");\n panel1.add(label1, new GridConstraints(0, 2, 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 panel1.add(label2, new GridConstraints(1, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n fromPosLabel = new JLabel();\n fromPosLabel.setText(\"<from>\");\n panel1.add(fromPosLabel, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\n toPosLabel = new JLabel();\n toPosLabel.setText(\"<to>\");\n panel1.add(toPosLabel, new GridConstraints(1, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_WANT_GROW, 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 Spacer spacer2 = new Spacer();\n panel1.add(spacer2, new GridConstraints(0, 4, 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, 6, new Insets(0, 0, 0, 0), -1, -1));\n mainPanel.add(panel2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_SOUTH, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(372, 14), null, 0, false));\n boxesCountLabel = new JLabel();\n boxesCountLabel.setText(\"Кол-во коробок:\");\n panel2.add(boxesCountLabel, new GridConstraints(0, 5, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n currentPosLabel = new JLabel();\n currentPosLabel.setText(\"Позиция:\");\n panel2.add(currentPosLabel, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer3 = new Spacer();\n panel2.add(spacer3, new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JLabel label3 = new JLabel();\n label3.setText(\"Номер отправки:\");\n panel2.add(label3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n shipmentNumberField = new JTextField();\n panel2.add(shipmentNumberField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_SOUTHWEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(60, -1), null, 0, false));\n final Spacer spacer4 = new Spacer();\n panel2.add(spacer4, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n final JPanel panel3 = new JPanel();\n panel3.setLayout(new GridBagLayout());\n mainPanel.add(panel3, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(-1, 28), null, 0, false));\n sampleDeleteButton = new JButton();\n sampleDeleteButton.setIcon(new ImageIcon(getClass().getResource(\"/delSample16.png\")));\n sampleDeleteButton.setMinimumSize(new Dimension(-1, -1));\n sampleDeleteButton.setPreferredSize(new Dimension(32, -1));\n sampleDeleteButton.setText(\"\");\n GridBagConstraints gbc;\n gbc = new GridBagConstraints();\n gbc.gridx = 1;\n gbc.gridy = 0;\n gbc.gridheight = 2;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n gbc.anchor = GridBagConstraints.EAST;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel3.add(sampleDeleteButton, gbc);\n sampleEditButton = new JButton();\n sampleEditButton.setIcon(new ImageIcon(getClass().getResource(\"/change16.png\")));\n sampleEditButton.setMinimumSize(new Dimension(-1, -1));\n sampleEditButton.setPreferredSize(new Dimension(32, -1));\n sampleEditButton.setText(\"\");\n gbc = new GridBagConstraints();\n gbc.gridx = 2;\n gbc.gridy = 0;\n gbc.gridheight = 2;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n gbc.anchor = GridBagConstraints.EAST;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel3.add(sampleEditButton, gbc);\n sampleMoveUpButton = new JButton();\n sampleMoveUpButton.setIcon(new ImageIcon(getClass().getResource(\"/upSample10.png\")));\n sampleMoveUpButton.setMinimumSize(new Dimension(-1, -1));\n sampleMoveUpButton.setPreferredSize(new Dimension(32, -1));\n sampleMoveUpButton.setText(\"\");\n gbc = new GridBagConstraints();\n gbc.gridx = 3;\n gbc.gridy = 0;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n gbc.anchor = GridBagConstraints.EAST;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel3.add(sampleMoveUpButton, gbc);\n sampleMoveDownButton = new JButton();\n sampleMoveDownButton.setIcon(new ImageIcon(getClass().getResource(\"/downSample10.png\")));\n sampleMoveDownButton.setMinimumSize(new Dimension(-1, -1));\n sampleMoveDownButton.setPreferredSize(new Dimension(32, -1));\n sampleMoveDownButton.setText(\"\");\n sampleMoveDownButton.setVerticalAlignment(0);\n gbc = new GridBagConstraints();\n gbc.gridx = 3;\n gbc.gridy = 1;\n gbc.weightx = 1.0;\n gbc.weighty = 1.0;\n gbc.anchor = GridBagConstraints.EAST;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel3.add(sampleMoveDownButton, gbc);\n sampleAddButton = new JButton();\n sampleAddButton.setIcon(new ImageIcon(getClass().getResource(\"/addSample16.png\")));\n sampleAddButton.setMinimumSize(new Dimension(-1, -1));\n sampleAddButton.setPreferredSize(new Dimension(32, -1));\n sampleAddButton.setText(\"\");\n gbc = new GridBagConstraints();\n gbc.gridx = 0;\n gbc.gridy = 0;\n gbc.gridheight = 2;\n gbc.weighty = 1.0;\n gbc.anchor = GridBagConstraints.EAST;\n gbc.fill = GridBagConstraints.VERTICAL;\n panel3.add(sampleAddButton, gbc);\n final JPanel panel4 = new JPanel();\n panel4.setLayout(new GridLayoutManager(2, 3, new Insets(0, 0, 0, 0), -1, -1));\n mainPanel.add(panel4, new GridConstraints(2, 1, 1, 1, GridConstraints.ANCHOR_NORTH, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, new Dimension(180, -1), null, 0, false));\n loadListButton = new JButton();\n loadListButton.setIcon(new ImageIcon(getClass().getResource(\"/import16.png\")));\n loadListButton.setText(\"\");\n panel4.add(loadListButton, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(48, -1), null, 0, false));\n startButton = new JButton();\n startButton.setText(\"Начать работу\");\n panel4.add(startButton, new GridConstraints(0, 2, 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 debugButton = new JButton();\n debugButton.setText(\"debug\");\n panel4.add(debugButton, new GridConstraints(1, 2, 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 saveMapButton = new JButton();\n saveMapButton.setIcon(new ImageIcon(getClass().getResource(\"/save16.png\")));\n saveMapButton.setText(\"\");\n panel4.add(saveMapButton, 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 }", "protected void adjustGridLayout() {\n\t\tint numColumns = calcNumberOfColumns();\n\t\t((GridLayout) fieldEditorParent.getLayout()).numColumns = numColumns;\n\t\tif (fields != null) {\n\t\t\tfor (int i = 0; i < fields.size(); i++) {\n\t\t\t\tFieldEditor fieldEditor = fields.get(i);\n\t\t\t\tfieldEditor.fillIntoGrid(fieldEditorParent, numColumns);\n\t\t\t}\n\t\t}\n\t}", "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 }", "@Override\n\tprotected Control createContents(final Composite parent) {\n\t\tfinal Composite composite = new Composite(parent, SWT.NONE);\n\t\tcomposite.setLayout(new GridLayout());\n\n\t\t// Get the preference store\n\t\tfinal IPreferenceStore preferenceStore = getPreferenceStore();\n\n\t\tfinal Label lblRandomRules = new Label(composite, SWT.NONE);\n\t\tlblRandomRules.setText(Messages.getString(\"PasswordPolicyPreferences.RulesLabel\")); //$NON-NLS-1$\n\n\t\tfinal Composite composite_1 = new Composite(composite, SWT.NONE);\n\t\tfinal GridLayout gridLayout = new GridLayout();\n\t\tgridLayout.marginHeight = 0;\n\t\tgridLayout.marginWidth = 0;\n\t\tgridLayout.numColumns = 2;\n\t\tcomposite_1.setLayout(gridLayout);\n\n\t\tfinal Label lblDefaultLength = new Label(composite_1, SWT.NONE);\n\t\tlblDefaultLength.setText(Messages.getString(\"PasswordPolicyPreferences.PasswordLength\")); //$NON-NLS-1$\n\n\t\tspiLength = new Spinner(composite_1, SWT.BORDER);\n\t\tspiLength.setSelection(preferenceStore.getInt(DEFAULT_PASSWORD_LENGTH));\n\n\t\tbtnUseLowercase = new Button(composite, SWT.CHECK);\n\t\tbtnUseLowercase.setText(Messages.getString(\"PasswordPolicyPreferences.Lowercase\")); //$NON-NLS-1$\n\t\tbtnUseLowercase.setSelection(preferenceStore.getBoolean(USE_LOWERCASE_LETTERS));\n\n\t\tbtnUserUppercase = new Button(composite, SWT.CHECK);\n\t\tbtnUserUppercase.setText(Messages.getString(\"PasswordPolicyPreferences.Uppercase\")); //$NON-NLS-1$\n\t\tbtnUserUppercase.setSelection(preferenceStore.getBoolean(USE_UPPERCASE_LETTERS));\n\n\t\tbtnUseDigits = new Button(composite, SWT.CHECK);\n\t\tbtnUseDigits.setText(Messages.getString(\"PasswordPolicyPreferences.Digits\")); //$NON-NLS-1$\n\t\tbtnUseDigits.setSelection(preferenceStore.getBoolean(USE_DIGITS));\n\n\t\tbtnUseSymbols = new Button(composite, SWT.CHECK);\n\t\tbtnUseSymbols.setText(Messages.getString(\"PasswordPolicyPreferences.Symbols\")); //$NON-NLS-1$\n\t\tbtnUseSymbols.setSelection(preferenceStore.getBoolean(USE_SYMBOLS));\n\n\t\tbtnUseEaseToRead = new Button(composite, SWT.CHECK);\n\t\tbtnUseEaseToRead.setText(Messages.getString(\"PasswordPolicyPreferences.EasyToRead\")); //$NON-NLS-1$\n\t\tbtnUseEaseToRead.setSelection(preferenceStore.getBoolean(USE_EASY_TO_READ));\n\n\t\tbtnUseHexOnly = new Button(composite, SWT.CHECK);\n\t\tbtnUseHexOnly.setEnabled(false);\n\t\tbtnUseHexOnly.setText(Messages.getString(\"PasswordPolicyPreferences.HexOnly\")); //$NON-NLS-1$\n\t\tbtnUseHexOnly.setSelection(preferenceStore.getBoolean(USE_HEX_ONLY));\n\n\t\treturn composite;\n\t}", "@SuppressWarnings(\"unchecked\")\n private void initializeGeneralSettingsPanel() {\n generalSettingsPanel = new JPanel(new GridBagLayout());\n\n GridBagConstraints c = new GridBagConstraints();\n c.anchor = GridBagConstraints.NORTHWEST;\n c.fill = GridBagConstraints.HORIZONTAL;\n c.insets = new Insets(5, 5, 5, 5);\n\n int row = 0;\n\n // input column >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n c.gridx = 0;\n c.gridwidth = 1;\n c.weightx = 0.0;\n c.weighty = 0.0;\n generalSettingsPanel.add(new JLabel(\"Column to PIA XML file (on port 0)\"), c);\n\n inputColumnBox = new ColumnSelectionComboxBox((Border)null, DataValue.class);\n try {\n inputColumnBox.setColumnFilter(new ColumnFilter() {\n @Override\n public boolean includeColumn(DataColumnSpec colSpec) {\n return colSpec.getType().isCompatible(StringValue.class)\n || colSpec.getType().isCompatible(BinaryObjectDataValue.class);\n }\n\n @Override\n public String allFilteredMsg() {\n return \"No column with needed data found, needs String or BinaryObjectData\";\n }\n });\n } catch (NotConfigurableException e) {\n LOGGER.warn(\"Could not find a compatible column in the input datatable.\");\n }\n\n c.gridx = 1;\n c.gridy = row++;\n c.gridwidth = 1;\n c.weightx = 1.0;\n c.weighty = 0.0;\n generalSettingsPanel.add(inputColumnBox, c);\n // input column <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n\n // fail on no decoys >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n checkErrorOnNoDecoys = new JCheckBox(\"Fail on no decoys (select, if a decoy database was used for identification)\");\n checkErrorOnNoDecoys.setSelected(PIASettings.ERROR_ON_NO_DECOYS.getDefaultBoolean());\n\n c.gridx = 0;\n c.gridy = row++;\n c.gridwidth = 2;\n generalSettingsPanel.add(checkErrorOnNoDecoys, c);\n // fail on no decoys <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n\n // create PSM sets >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n checkCreatePSMSets = new JCheckBox(\"Create PSM sets (select, if multiple search engines were used for identification)\");\n checkCreatePSMSets.setSelected(PIASettings.CREATE_PSMSETS.getDefaultBoolean());\n checkCreatePSMSets.addChangeListener(this);\n\n c.gridy = row++;\n generalSettingsPanel.add(checkCreatePSMSets, c);\n // create PSM sets <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n\n // consider modifications >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n checkConsiderModifications = new JCheckBox(\"consider modifications to distinguish peptides\");\n checkConsiderModifications.setSelected(PIASettings.CONSIDER_MODIFICATIONS.getDefaultBoolean());\n\n c.gridy = row++;\n generalSettingsPanel.add(checkConsiderModifications, c);\n // consider modifications <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n\n // Export settings >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n JPanel exportSettingsPanel = new JPanel(new GridBagLayout());\n exportSettingsPanel.setBorder(BorderFactory.createTitledBorder(\"Export settings\"));\n\n c.gridx = 0;\n c.gridy = 0;\n c.gridwidth = 1;\n c.weightx = 0.0;\n exportSettingsPanel.add(new JLabel(\"Export level\"), c);\n\n comboExportLevel = new JComboBox<>();\n\n for (ExportLevels lvl : ExportLevels.values()) {\n comboExportLevel.addItem(lvl);\n }\n comboExportLevel.addActionListener(this);\n c.gridx = 1;\n c.gridy = 0;\n c.gridwidth = 1;\n c.weightx = 1.0;\n exportSettingsPanel.add(comboExportLevel, c);\n\n\n c.gridx = 0;\n c.gridy = 2;\n c.gridwidth = 1;\n c.weightx = 0.0;\n exportSettingsPanel.add(new JLabel(\"Export format\"), c);\n\n comboExportFormat = new JComboBox<>();\n updateExportAvailables();\n comboExportFormat.addActionListener(this);\n comboExportLevel.setSelectedItem(PIASettings.EXPORT_LEVEL.getDefaultString());\n c.gridx = 1;\n c.gridy = 2;\n c.gridwidth = 1;\n c.weightx = 1.0;\n exportSettingsPanel.add(comboExportFormat, c);\n\n checkExportFilter = new JCheckBox(\"Filter Export (works only on some formats and levels)\");\n checkExportFilter.setSelected(PIASettings.EXPORT_FILTER.getDefaultBoolean());\n checkExportFilter.addChangeListener(this);\n c.gridx = 0;\n c.gridy = 3;\n c.gridwidth = 2;\n c.weightx = 1.0;\n exportSettingsPanel.add(checkExportFilter, c);\n\n\n c.gridx = 0;\n c.gridy = 4;\n c.gridwidth = 1;\n c.weightx = 0.0;\n exportSettingsPanel.add(new JLabel(\"Filename for export:\"), c);\n\n fieldExportFileBasename = new JTextField(PIASettings.EXPORT_FILEBASENAME.getDefaultString(), 10);\n c.gridx = 1;\n c.gridy = 4;\n c.gridwidth = 1;\n c.weightx = 1.0;\n exportSettingsPanel.add(fieldExportFileBasename, c);\n\n c.gridx = 0;\n c.gridy = row++;\n c.gridwidth = 2;\n c.weightx = 1.0;\n generalSettingsPanel.add(exportSettingsPanel, c);\n // Export settings <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n }", "private void initialize() {\n setPrefWidth(800);\n\n setupFields();\n\n fillDiffModes();\n\n GridPane mergePanel = new GridPane();\n mergePanel.setVgap(10);\n mergePanel.setHgap(15);\n ColumnConstraints columnLabel = new ColumnConstraints();\n columnLabel.setHgrow(Priority.ALWAYS);\n ColumnConstraints columnValues = new ColumnConstraints();\n columnValues.setHgrow(Priority.NEVER);\n columnValues.setPercentWidth(40);\n ColumnConstraints columnSelect = new ColumnConstraints();\n columnSelect.setHgrow(Priority.NEVER);\n columnSelect.setHalignment(HPos.CENTER);\n // See columnHeadings variable for the headings: 1) field, 2) left content, 3) left arrow, 4) \"none\", 5) right arrow, 6) right content\n mergePanel.getColumnConstraints().setAll(columnLabel, columnValues, columnSelect, columnSelect, columnSelect, columnValues);\n\n setupHeadingRows(mergePanel);\n setupEntryTypeRow(mergePanel);\n setupFieldRows(mergePanel);\n\n ScrollPane scrollPane = new ScrollPane(mergePanel);\n scrollPane.setFitToWidth(true);\n setCenter(scrollPane);\n\n updateFieldValues(allFields);\n\n updateMergedEntry();\n\n getStylesheets().add(0, MergeEntries.class.getResource(\"MergeEntries.css\").toExternalForm());\n }", "private void createContents() {\r\n\t\tshell = new Shell(getParent(), SWT.RESIZE | SWT.TITLE);\r\n\t\tshell.setSize(690, 436);\r\n\t\t\r\n\t\tDimension scrSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n\t\tint w = 690;\r\n\t\tint h = 436;\r\n\t\tshell.setBounds((int)(scrSize.width-w)/2,(int)(scrSize.height-h)/2,w, h);\r\n\t\tshell.setText(getText());\r\n\r\n\t\t\r\n\t\tloadData();\r\n\t\t\r\n\t\tviewer = new TableViewer(shell,SWT.FULL_SELECTION |SWT.MULTI |SWT.BORDER);\r\n\t\t\r\n\t\tfinal Table table = viewer.getTable();\r\n\t\ttable.setBounds(23, 53, 638, 285);\r\n\t\ttable.setLinesVisible(true);\r\n\t\ttable.setHeaderVisible(true);\r\n\t\ttable.setRedraw(true);\r\n\t\t\r\n\t\tTableColumn tbCol_Time = new TableColumn(table, SWT.NONE);\r\n\t\ttbCol_Time.setWidth(69);\r\n\t\ttbCol_Time.setText(\"序号\");\t\t\r\n\t\t\r\n\t\tTableColumn tbCol_Path = new TableColumn(table, SWT.NONE);\r\n\t\ttbCol_Path.setWidth(127);\r\n\t\ttbCol_Path.setText(\"进程\");\t\r\n\t\t\r\n\t\tTableColumn tbCol_Info = new TableColumn(table, SWT.NONE);\r\n\t\ttbCol_Info.setWidth(123);\r\n\t\ttbCol_Info.setText(\"Hash值\");\r\n\t\t\r\n\t\tTableColumn tbCol_Type = new TableColumn(table, SWT.NONE);\r\n\t\ttbCol_Type.setWidth(92);\r\n\t\ttbCol_Type.setText(\"类型\");\r\n\t\t\r\n\t\tTableColumn tbCol_Hash = new TableColumn(table, SWT.NONE);\r\n\t\ttbCol_Hash.setWidth(196);\r\n\t\ttbCol_Hash.setText(\"描述信息\");\r\n\t\t\r\n\t\tviewer.setContentProvider(new TableViewerContentProvider());\r\n\t\tviewer.setLabelProvider(new TableViewerLabelProvider());\r\n\t\tviewer.setInput(white_list);\t\t\t\t//===== 设置数据源 ======\r\n\t\t\r\n\t\trefresh();\r\n\t\t\r\n\t\tlbl_ItemCount = new Label(shell, SWT.NONE);\r\n\t\tlbl_ItemCount.setBounds(43, 355, 194, 21);\r\n\t\tlbl_ItemCount.setText(\"未通过验证进程: \"+ table.getItemCount() +\"个\");\r\n\t\t\r\n\t\tButton button = new Button(shell, SWT.NONE);\r\n\t\tbutton.setBounds(309, 344, 88, 25);\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\tcount--;\r\n\t\t\t\tshell.close();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton.setText(\"确定\");\r\n\t\t\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setFont(SWTResourceManager.getFont(\"楷体_GB2312\", 16, SWT.BOLD));\r\n\t\tlabel.setBounds(301, 10, 118, 21);\r\n\t\tlabel.setText(\"详细信息\");\r\n\t\t\r\n\t\tLabel label_1 = new Label(shell, SWT.SEPARATOR|SWT.HORIZONTAL);\r\n\t\tlabel_1.setBounds(10, 45, 664, 2);\r\n\r\n\t\t\r\n\t\t//添加窗体鼠标事件\r\n\t\tshell.addMouseListener(new MouseListener(){\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseDoubleClick(MouseEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseDown(MouseEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\t\t\t\t\r\n\t\t\t\tx=e.x;\r\n\t\t\t\ty=e.y;\t\t\t\t\r\n\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseUp(MouseEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tx=y=-1;\r\n\t\t\t}\r\n\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t});\r\n\t\t\r\n\t\t//鼠标移动事件\r\n\t\tshell.addMouseMoveListener(new MouseMoveListener(){\r\n\t\t\t@Override\r\n\t\t\tpublic void mouseMove(MouseEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tif(x>0)\r\n\t\t\t\t{\r\n\t\t\t\t\tshell.setLocation(e.x-x + shell.getLocation().x,\r\n\t\t\t\t\t\te.y-y + shell.getLocation().y);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t}", "private void createGrid() {\n Platform.runLater(() -> {\n\n // Update UI here\n //createGrid(numRows); // E.g. let's create a 20 x 20 grid\n createGrid(20);\n });\n }", "private void $$$setupUI$$$() {\r\n final JPanel panel1 = new JPanel();\r\n panel1.setLayout(new GridLayoutManager(1, 4, new Insets(0, 0, 0, 0), -1, -1));\r\n mMainPanel = new JPanel();\r\n mMainPanel.setLayout(new GridLayoutManager(15, 3, new Insets(0, 0, 0, 0), -1, -1));\r\n panel1.add(mMainPanel, 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));\r\n label = new JLabel();\r\n Font labelFont = this.$$$getFont$$$(null, -1, 28, label.getFont());\r\n if (labelFont != null) label.setFont(labelFont);\r\n label.setText(\"CodeRecommender\");\r\n mMainPanel.add(label, new GridConstraints(0, 0, 2, 1, GridConstraints.ANCHOR_NORTHWEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final Spacer spacer1 = new Spacer();\r\n mMainPanel.add(spacer1, new GridConstraints(5, 2, 1, 1, GridConstraints.ANCHOR_NORTH, GridConstraints.FILL_NONE, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\r\n final JPanel panel2 = new JPanel();\r\n panel2.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n mMainPanel.add(panel2, new GridConstraints(4, 0, 6, 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));\r\n final JPanel panel3 = new JPanel();\r\n panel3.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel2.add(panel3, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n statement = new JTextArea();\r\n statement.setBackground(new Color(-12434103));\r\n statement.setColumns(0);\r\n statement.setEditable(false);\r\n statement.setEnabled(true);\r\n Font statementFont = this.$$$getFont$$$(\"Arial\", Font.PLAIN, 15, statement.getFont());\r\n if (statementFont != null) statement.setFont(statementFont);\r\n statement.setText(\" In the current ai craze, we want to use neural network-related technology to grab a large amount of source code from the open source community to achieve the recommendation of the N+1 line of code from the known N lines of code, and package this function into a practical plug-in on the IDE.\");\r\n panel3.add(statement, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(200, 70), null, 1, false));\r\n final JPanel panel4 = new JPanel();\r\n panel4.setLayout(new GridLayoutManager(12, 2, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.setBackground(new Color(-12828863));\r\n panel3.add(panel4, 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));\r\n Download = new JButton();\r\n Font DownloadFont = this.$$$getFont$$$(null, -1, 12, Download.getFont());\r\n if (DownloadFont != null) Download.setFont(DownloadFont);\r\n Download.setText(\"Find\");\r\n panel4.add(Download, new GridConstraints(4, 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));\r\n final JPanel panel5 = new JPanel();\r\n panel5.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel5, new GridConstraints(11, 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));\r\n final JLabel label1 = new JLabel();\r\n label1.setText(\"See the guide on the https://github.com/huangjihui511/java-code-recommand-IDEA-plugin \");\r\n panel5.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final Spacer spacer2 = new Spacer();\r\n panel5.add(spacer2, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\r\n pathTextField = new JTextField();\r\n pathTextField.setEditable(false);\r\n Font pathTextFieldFont = this.$$$getFont$$$(\"Arial\", Font.PLAIN, 12, pathTextField.getFont());\r\n if (pathTextFieldFont != null) pathTextField.setFont(pathTextFieldFont);\r\n pathTextField.setText(\"/Library/Frameworks/Python.framework/Versions/3.6/bin/python3 \");\r\n panel4.add(pathTextField, new GridConstraints(7, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\r\n SetPath = new JButton();\r\n Font SetPathFont = this.$$$getFont$$$(null, -1, 12, SetPath.getFont());\r\n if (SetPathFont != null) SetPath.setFont(SetPathFont);\r\n SetPath.setText(\"Set\");\r\n panel4.add(SetPath, new GridConstraints(7, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n Help = new JButton();\r\n Help.setText(\"Help\");\r\n panel4.add(Help, new GridConstraints(11, 1, 1, 1, GridConstraints.ANCHOR_EAST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final JPanel panel6 = new JPanel();\r\n panel6.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel6.setFocusTraversalPolicyProvider(false);\r\n panel6.setFocusable(false);\r\n panel4.add(panel6, new GridConstraints(10, 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));\r\n final JPanel panel7 = new JPanel();\r\n panel7.setLayout(new GridLayoutManager(2, 2, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel7, 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));\r\n final JLabel label2 = new JLabel();\r\n label2.setIcon(new ImageIcon(getClass().getResource(\"/timg (1) - 副本.jpg\")));\r\n label2.setText(\"\");\r\n panel7.add(label2, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final JLabel label3 = new JLabel();\r\n label3.setIcon(new ImageIcon(getClass().getResource(\"/微信图片_20190328224952 (2) - 副本.jpg\")));\r\n label3.setText(\"\");\r\n panel7.add(label3, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final JPanel panel8 = new JPanel();\r\n panel8.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel7.add(panel8, 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));\r\n final JPanel panel9 = new JPanel();\r\n panel9.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel9, 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));\r\n webaddressTextField = new JTextField();\r\n webaddressTextField.setEditable(false);\r\n Font webaddressTextFieldFont = this.$$$getFont$$$(\"Arial\", Font.PLAIN, 12, webaddressTextField.getFont());\r\n if (webaddressTextFieldFont != null) webaddressTextField.setFont(webaddressTextFieldFont);\r\n webaddressTextField.setText(\"/Volumes/PythonSupporting\");\r\n panel4.add(webaddressTextField, new GridConstraints(4, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null, new Dimension(150, -1), null, 0, false));\r\n final JPanel panel10 = new JPanel();\r\n panel10.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel10, new GridConstraints(3, 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));\r\n final JLabel label4 = new JLabel();\r\n Font label4Font = this.$$$getFont$$$(\"Consolas\", Font.BOLD, 14, label4.getFont());\r\n if (label4Font != null) label4.setFont(label4Font);\r\n label4.setText(\"Find the package\");\r\n panel10.add(label4, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final Spacer spacer3 = new Spacer();\r\n panel10.add(spacer3, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\r\n final JPanel panel11 = new JPanel();\r\n panel11.setLayout(new GridLayoutManager(1, 2, new Insets(0, 0, 0, 0), -1, -1));\r\n panel11.setToolTipText(\"\");\r\n panel4.add(panel11, new GridConstraints(6, 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));\r\n final JLabel label5 = new JLabel();\r\n Font label5Font = this.$$$getFont$$$(\"Consolas\", Font.BOLD, 14, label5.getFont());\r\n if (label5Font != null) label5.setFont(label5Font);\r\n label5.setText(\"Set the path\");\r\n panel11.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));\r\n final Spacer spacer4 = new Spacer();\r\n panel11.add(spacer4, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\r\n final JPanel panel12 = new JPanel();\r\n panel12.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel12, new GridConstraints(9, 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));\r\n final JPanel panel13 = new JPanel();\r\n panel13.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel13, 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));\r\n final JPanel panel14 = new JPanel();\r\n panel14.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel14, new GridConstraints(5, 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));\r\n final JPanel panel15 = new JPanel();\r\n panel15.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel4.add(panel15, new GridConstraints(8, 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));\r\n pic = new JPanel();\r\n pic.setLayout(new GridLayoutManager(3, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n pic.putClientProperty(\"html.disable\", Boolean.FALSE);\r\n panel3.add(pic, 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));\r\n a = new JLabel();\r\n a.setText(\"\");\r\n pic.add(a, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\r\n final JPanel panel16 = new JPanel();\r\n panel16.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n pic.add(panel16, 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));\r\n final JPanel panel17 = new JPanel();\r\n panel17.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n pic.add(panel17, 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));\r\n final JPanel panel18 = new JPanel();\r\n panel18.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n panel2.add(panel18, 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));\r\n final Spacer spacer5 = new Spacer();\r\n mMainPanel.add(spacer5, new GridConstraints(5, 1, 10, 1, GridConstraints.ANCHOR_NORTH, GridConstraints.FILL_NONE, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\r\n final JPanel panel19 = new JPanel();\r\n panel19.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n mMainPanel.add(panel19, 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));\r\n final JPanel panel20 = new JPanel();\r\n panel20.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\r\n mMainPanel.add(panel20, new GridConstraints(3, 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));\r\n final Spacer spacer6 = new Spacer();\r\n panel1.add(spacer6, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\r\n final Spacer spacer7 = new Spacer();\r\n panel1.add(spacer7, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\r\n final Spacer spacer8 = new Spacer();\r\n panel1.add(spacer8, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));\r\n }", "void drawGridLayout() {\n\t\tpiecesGrid = (GridLayout) findViewById(R.id.layout_container); //get a reference to the GridLayout\n\t\tpiecesGrid.setColumnCount(NUM[COLS]); //set number of columns\n\t\tpiecesGrid.setRowCount(NUM[ROWS]); //set number of rows\n\t\tfor (int i=0; i<NUM[TOTAL]; i++) {\n\t\t\tpiecesGrid.addView(pieceViews.get(i), i); //add the ImageViews\n\t\t}\n\t}", "private Pane createSettings() {\n HBox row = new HBox(20);\n row.setAlignment(Pos.CENTER);\n Label langIcon = createIcon(\"icons/language.png\");\n Label themeIcon = createIcon(\"icons/theme.png\");\n\n ComboBox<Language> langSelect = new ComboBox<>();\n langSelect.getItems().addAll(UIController.Language.values());\n langSelect.setValue(UIController.Language.values()[0]);\n langSelect.setOnAction(e -> changeLanguage(langSelect.getValue()));\n\n ComboBox<Theme> themeSelect = new ComboBox<>();\n themeSelect.getItems().addAll(UIController.Theme.values());\n themeSelect.setValue(UIController.Theme.values()[0]);\n themeSelect.setOnAction(e -> changeTheme(themeSelect.getValue()));\n\n row.getChildren().addAll(langIcon, langSelect, themeIcon, themeSelect);\n\n return row;\n }", "@Override\n\tprotected Control createDialogArea(Composite parent) {\n\n\t\t// Mark the columns that are used by the search function.\n\t\tsearchColumns = new String[4];\n\t\tsearchColumns[0] = \"itemnr\";\n\t\tsearchColumns[1] = \"category\";\n\t\tsearchColumns[2] = \"name\";\n\t\tsearchColumns[3] = \"description\";\n\n\t\t// Create the dialog area\n\t\tControl control = super.createDialogArea(parent);\n\n\t\t// Set the content provider\n\t\ttableViewer.setContentProvider(new ViewDataSetTableContentProvider(tableViewer));\n\t\ttableViewer.setSorter(new TableSorter());\n\n\t\t// Get the column width from the preferences\n\t\tint cw_itemno = Activator.getDefault().getPreferenceStore().getInt(\"COLUMNWIDTH_DIALOG_PRODUCTS_ITEMNO\");\n\t\tint cw_name = Activator.getDefault().getPreferenceStore().getInt(\"COLUMNWIDTH_DIALOG_PRODUCTS_NAME\");\n\t\tint cw_description = Activator.getDefault().getPreferenceStore().getInt(\"COLUMNWIDTH_DIALOG_PRODUCTS_DESCRIPTION\");\n\t\tint cw_price = Activator.getDefault().getPreferenceStore().getInt(\"COLUMNWIDTH_DIALOG_PRODUCTS_PRICE\");\n\t\tint cw_vat = Activator.getDefault().getPreferenceStore().getInt(\"COLUMNWIDTH_DIALOG_PRODUCTS_VAT\");\n\t\t\n\t\t// Create the table columns\n\t\tif (Activator.getDefault().getPreferenceStore().getBoolean(\"PRODUCT_USE_ITEMNR\"))\n\t\t\t//T: Used as heading of a table. Keep the word short.\n\t\t\tnew UniDataSetTableColumn(tableColumnLayout, tableViewer, SWT.RIGHT, _(\"Item No.\"), cw_itemno, true, \"itemnr\");\n\n\t\t//T: Used as heading of a table. Keep the word short.\n\t\tnew UniDataSetTableColumn(tableColumnLayout, tableViewer, SWT.LEFT, _(\"Category\"), cw_name, false, \"category\");\n\t\t\n\t\t//T: Used as heading of a table. Keep the word short.\n\t\tnew UniDataSetTableColumn(tableColumnLayout, tableViewer, SWT.LEFT, _(\"Name\"), cw_name, false, \"name\");\n\t\t//T: Used as heading of a table. Keep the word short.\n\t\tnew UniDataSetTableColumn(tableColumnLayout, tableViewer, SWT.LEFT, _(\"Description\"), cw_description, false, \"description\");\n\t\tif (Activator.getDefault().getPreferenceStore().getInt(\"DOCUMENT_USE_NET_GROSS\") == 1)\n\t\t\t//T: Used as heading of a table. Keep the word short.\n\t\t\tnew UniDataSetTableColumn(tableColumnLayout, tableViewer, SWT.RIGHT, _(\"Price\"), cw_price, true, \"$Price1Gross\");\n\t\telse\n\t\t\t//T: Used as heading of a table. Keep the word short.\n\t\t\tnew UniDataSetTableColumn(tableColumnLayout, tableViewer, SWT.RIGHT, _(\"Price\"), cw_price, true, \"$Price1Net\");\n\t\t//T: Used as heading of a table. Keep the word short.\n\t\tnew UniDataSetTableColumn(tableColumnLayout, tableViewer, SWT.RIGHT, _(\"VAT\"), cw_vat, true, \"$vatbyid\");\n\n\t\t// Set the input\n\t\ttableViewer.setInput(Data.INSTANCE.getProducts());\n\n\t\treturn control;\n\t}", "private void populateUI() {\n\n tipPercentTextView.setText(Double.toString(tipPercent));\n noPersonsTextView.setText(Integer.toString(noPersons));\n populateResultsUI();\n }", "private JPanel buildMainPanel() {\n FormLayout layout = new FormLayout(\"pref:grow\",\n \"pref, 3dlu, pref, 3dlu, pref, 12dlu, pref, 3dlu, pref, pref, \"\n + \"pref, pref, 9dlu, pref, 3dlu, pref, \"\n + \"pref, pref, pref, 0:grow, pref\");\n\n PanelBuilder builder = new PanelBuilder(layout);\n // Bottom border\n builder.setBorder(Borders.createEmptyBorder(\"1dlu, 3dlu, 2dlu, 3dlu\"));\n CellConstraints cc = new CellConstraints();\n\n int row = 1;\n\n builder.addSeparator(Translation.getTranslation(\"status_tab.status\"),\n cc.xy(1, row));\n row += 2;\n builder.add(synchronizationStatusLabel, cc.xy(1, row));\n row += 2;\n builder.add(synchronizationDateLabel, cc.xy(1, row));\n row += 2;\n\n builder.addSeparator(Translation.getTranslation(\"status_tab.you_have\"),\n cc.xy(1, row));\n row += 2;\n builder.add(newNoticesLine.getUIComponent(), cc.xy(1, row));\n row++;\n builder.add(filesAvailableLine.getUIComponent(), cc.xy(1, row));\n row++;\n builder.add(downloadsLine.getUIComponent(), cc.xy(1, row));\n row++;\n builder.add(uploadsLine.getUIComponent(), cc.xy(1, row));\n row += 2;\n\n builder.addSeparator(\n Translation.getTranslation(\"status_tab.online_storage.title\"),\n cc.xy(1, row));\n row += 2;\n builder.add(onlineStorageAccountLabel.getUIComponent(), cc.xy(1, row));\n row++;\n builder.add(onlineStorageSection.getUIComponent(), cc.xy(1, row));\n row++;\n builder.add(licenseInfoSection.getUIComponent(), cc.xy(1, row));\n row++;\n builder.add(buyNowLabel.getUIComponent(), cc.xy(1, row));\n if (PreferencesEntry.SHOW_TELL_A_FRIEND\n .getValueBoolean(getController()))\n {\n row += 2;\n builder.add(tellFriendLabel.getUIComponent(), cc.xy(1, row));\n }\n\n return builder.getPanel();\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 createContents() {\n\t\tshell = new Shell(getParent(), SWT.DIALOG_TRIM | SWT.RESIZE);\n\t\tshell.setSize(750, 450);\n\t\tshell.setText(\"Sensitivity Analysis for: \" + parentNode.getName());\n\t\tshell.setLayout(new FillLayout(SWT.HORIZONTAL));\n\n\t\tsashForm = new SashForm(shell, SWT.NONE);\n\n\t\tscrolledComposite = new ScrolledComposite(sashForm, SWT.BORDER\n\t\t\t\t| SWT.H_SCROLL | SWT.V_SCROLL);\n\t\tscrolledComposite.setExpandHorizontal(true);\n\t\tscrolledComposite.setExpandVertical(true);\n\n\t\tSaCriterionListComp = new Composite(scrolledComposite, SWT.NONE);\n\t\tSaCriterionListComp.setLayout(new RowLayout(SWT.VERTICAL));\n\n\t\t// Create a criterion weighting SaCriterionListComp for every criterion\n\t\tweightingSelectComponents = new SaCriterionWeightingSelectComp[c.length];\n\n\t\tArrayList<Criterion> criteria = parentNode.getCriteria();\n\t\tfor (int i = 0; i < c.length; i++) {\n\n\t\t\tSaCriterionWeightingSelectComp scwsc = new SaCriterionWeightingSelectComp(\n\t\t\t\t\tSaCriterionListComp, SWT.None, criteria.get(i), c[i], i);\n\n\t\t\tscwsc.addWeightingChangedListener(new SaCriterionWeightingChangedListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void doCriterionWeightingChanged(\n\t\t\t\t\t\tSaCriterionWeightingChangedEvent e) {\n\t\t\t\t\tupdateCriteriaWeightings(e.getCriterionIndex(),\n\t\t\t\t\t\t\te.getNewValue());\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tweightingSelectComponents[i] = scwsc;\n\t\t}\n\n\t\tscrolledComposite.setContent(SaCriterionListComp);\n\t\tscrolledComposite.setMinSize(SaCriterionListComp.computeSize(\n\t\t\t\tSWT.DEFAULT, SWT.DEFAULT));\n\n\t\tscrolledComposite_1 = new ScrolledComposite(sashForm, SWT.BORDER\n\t\t\t\t| SWT.H_SCROLL | SWT.V_SCROLL);\n\t\tscrolledComposite_1.setExpandHorizontal(true);\n\t\tscrolledComposite_1.setExpandVertical(true);\n\n\t\tSaAlternativeWeighingComp = new Composite(scrolledComposite_1, SWT.NONE);\n\t\tSaAlternativeWeighingComp.setLayout(new RowLayout(SWT.VERTICAL));\n\n\t\t// Create a bar component for every alternative\n\t\talternativeBarComponents = new SaAlternativeWeightingBarComp[a.length];\n\n\t\tfor (int i = 0; i < alternatives.size(); i++) {\n\t\t\tSaAlternativeWeightingBarComp sawc = new SaAlternativeWeightingBarComp(\n\t\t\t\t\tSaAlternativeWeighingComp, SWT.NONE, alternatives.get(i)\n\t\t\t\t\t\t\t.getName(), a[i]);\n\n\t\t\talternativeBarComponents[i] = sawc;\n\t\t}\n\n\t\tscrolledComposite_1.setContent(SaAlternativeWeighingComp);\n\t\tscrolledComposite_1.setMinSize(SaAlternativeWeighingComp.computeSize(\n\t\t\t\tSWT.DEFAULT, SWT.DEFAULT));\n\n\t\tsashForm.setWeights(new int[] { 1, 1 });\n\n\t\tsetBarValues();\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 }", "GridPanel create(GridDataModel model);", "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}", "@Override\r\n\t\t\tpublic void onApply() {\n\t\t\t\tList<ColumnConfig> configs = new ArrayList<ColumnConfig>();\r\n\t\t\t\r\n\t\t\t\t// Create columns as ColumnConfig objects, add to the above list\r\n\t\t\t\tColumnConfig column = new ColumnConfig(\"name\", \"Company\", 200);\r\n\t\t\t\tconfigs.add(column);\r\n\t\t\t\r\n\t\t\t\tcolumn = new ColumnConfig(\"last\", \"Last\", 75);\r\n\t\t\t\t//format value as US currency\r\n\t\t\t\tcolumn.setNumberFormat(NumberFormat.getCurrencyFormat());\r\n\t\t\t\tconfigs.add(column);\r\n\t\t\t\r\n\t\t\t\tcolumn = new ColumnConfig(\"date\", \"Last Updated\", 125);\r\n\t\t\t\t// format date as Oct 1, 1960\r\n\t\t\t\tcolumn.setDateTimeFormat(DateTimeFormat\r\n\t\t\t\t\t\t.getFormat(\"MMM dd, yyyy\"));\r\n\t\t\t\tconfigs.add(column);\r\n\t\t\t\r\n\t\t\t\t// Create the expander with a Template,\r\n\t\t\t\t// its just HTML with mapped place-holders \r\n\t\t\t\t// (properties in the intended bean model) \r\n\t\t\t\t// wrapped in curly brackets e.g {name} or {about}\r\n\t\t\t\t// RowExpander is a special ColumnConfig\r\n\t\t\t\tXTemplate tpl = XTemplate.create(getTemplate());\r\n\t\t\t\tRowExpander expander = new RowExpander();\r\n\t\t\t\texpander.setTemplate(tpl);\r\n\t\t\t\r\n\t\t\t\t// make the expander the first column!\r\n\t\t\t\tconfigs.add(0, expander);\r\n\t\t\t\r\n\t\t\t\tListStore<ModelData> store = new ListStore<ModelData>();\r\n\t\t\t\tstore.add(LocalData.getStocks());\r\n\t\t\t\r\n\t\t\t\tColumnModel cm = new ColumnModel(configs);\r\n\t\t\t\tGrid<ModelData> grid = new Grid<ModelData>(store, cm);\r\n\t\t\t\t\r\n\t\t\t\t// Our RowExpander template uses a {about} place-holder\r\n\t\t\t\t// meaning it expects an 'about' property in the bean model.\r\n\t\t\t\t// We'll quickly setup one with a ModelProcessor since there's \r\n\t\t\t\t// no 'about' property in our beans.\r\n\t\t\t\tgrid.setModelProcessor(new ModelProcessor<ModelData>() {\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic ModelData prepareData(ModelData model) {\r\n\t\t\t\t\t\tStock stk = (Stock) model;\r\n\t\t\t\t\t\tdouble last = stk.getLast();\r\n\t\t\t\t\t\tDate date = stk.getLastTrans();\r\n\t\t\t\t\t\tdouble change = stk.getChange();\r\n\t\t\t\r\n\t\t\t\t\t\tStringBuilder sb = new StringBuilder(stk.getName());\r\n\t\t\t\t\t\tsb.append(\" identified as \").append(stk.getSymbol());\r\n\t\t\t\t\t\tsb.append(change < 0 ? \", lost \" : \", gained \");\r\n\t\t\t\t\t\tsb.append(NumberFormat.getDecimalFormat().format(\r\n\t\t\t\t\t\t\t\tMath.abs(change)));\r\n\t\t\t\t\t\tsb.append(\" over it's \").append(\r\n\t\t\t\t\t\t\t\tNumberFormat.getCurrencyFormat().format(last));\r\n\t\t\t\t\t\tsb.append(\" share value on \");\r\n\t\t\t\t\t\tsb.append(DateTimeFormat.getFormat(\"MMMM dd, yyyy\")\r\n\t\t\t\t\t\t\t\t.format(date));\r\n\t\t\t\r\n\t\t\t\t\t\t// Put the 'about' property in this model\r\n\t\t\t\t\t\tstk.set(\"about\", sb.toString());\r\n\t\t\t\t\t\treturn stk;\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// RowExpander is a special \r\n\t\t\t\t// ColumnConfig, actually a plugin!\r\n\t\t\t\tgrid.addPlugin(expander);\r\n\t\t\t\r\n\t\t\t\tgrid.setBorders(true);\r\n\t\t\t\tgrid.setSize(400, 300);\r\n\t\t\t\tgrid.setAutoExpandColumn(\"name\");\r\n\t\t\t\r\n\t\t\t\t// show it up, equivalent to\r\n\t\t\t\t// RootPanel.get().add(grid)\r\n\t\t\t\r\n\t\t\t\tGxtCookBk.getAppCenterPanel().add(grid);\r\n\t\t\t}", "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}", "private Tab getBillTab() {\n /*\n * Creates a new ArrayList for the Fields to be stored in.\n */\n billFields = new ArrayList<TextField>();\n /*\n * Creates a new ArrayList for the Labels to be stored in.\n */\n billLabels = new ArrayList<Label>();\n \n /*\n * Creates a GridPane to display all Nodes for this Tab.\n */\n GridPane grid = new GridPane();\n grid.setAlignment(Pos.CENTER);\n grid.setHgap(10);\n grid.setVgap(10);\n grid.setPadding(new Insets(10, 10, 10, 10));\n \n /*\n * Adds Columns to the GridPane, so they can be configured.\n */\n for (int i = 0; i <= 5; i++) {\n grid.getColumnConstraints().add(new ColumnConstraints());\n grid.getColumnConstraints().get(i).setHalignment(HPos.CENTER);\n }\n /*\n * Configures the Width for all columns, so they match the wanted design.\n */\n grid.getColumnConstraints().get(0).setMinWidth(60);\n grid.getColumnConstraints().get(1).setMaxWidth(60);\n grid.getColumnConstraints().get(2).setMinWidth(50);\n grid.getColumnConstraints().get(2).setMaxWidth(50);\n grid.getColumnConstraints().get(3).setMinWidth(50);\n grid.getColumnConstraints().get(3).setMaxWidth(50);\n grid.getColumnConstraints().get(4).setMinWidth(70);\n grid.getColumnConstraints().get(4).setMaxWidth(70);\n grid.getColumnConstraints().get(4).setHalignment(HPos.RIGHT);\n grid.getColumnConstraints().get(5).setMinWidth(50);\n grid.getColumnConstraints().get(5).setHalignment(HPos.LEFT);\n \n /*\n * The Content for the Cells with given Content.\n */\n String[] billBase = {\"5€\", \"10€\", \"20€\", \"50€\", \"100€\", \"200€\", \"500€\"};\n \n /*\n * Creates the first Row, where basic Information is displayed.\n */\n Label lbChange = new Label(\"Geldscheine:\");\n grid.add(lbChange, 0, 0);\n \n Label lbAmount = new Label(\"Anzahl:\");\n grid.add(lbAmount, 3, 0);\n \n /*\n * Creates the Area, where the User can enter the amount of each Coinage type,\n */\n for (int i = 0; i <= 6; i++) {\n Label lbBillBase = new Label(billBase[i]);\n grid.add(lbBillBase, 1, i + 1);\n \n TextField tfAmount = new TextField(\"0\");\n tfAmount.setAlignment(Pos.CENTER);\n tfAmount.focusedProperty().addListener(new TextFieldFocusChangedListener(tfAmount, this));\n tfAmount.textProperty().addListener(new TextFieldTextChangedListener(this));\n tfAmount.setTooltip(new Tooltip(\"Geben Sie hier die Anzahl der \\\"\" + billBase[i] \n + \"\\\"-Scheine ein.\"));\n grid.add(tfAmount, 3, i + 1);\n billFields.add(tfAmount);\n \n Label lbSum = new Label(\"Summe:\");\n grid.add(lbSum, 4, i + 1);\n \n Label lbSumDisplay = new Label(\"0,00€\");\n grid.add(lbSumDisplay, 5, i + 1);\n billLabels.add(lbSumDisplay);\n }\n \n /*\n * Creates a new Tab to store the created content in.\n */\n Tab billTab = new Tab();\n billTab.setText(\"Geldscheine\");\n billTab.setContent(grid);\n return billTab;\n }", "private void setGrid() {\r\n maxRows = (FORM_HEIGHT - FORM_HEIGHT_ADJUST) / SQUARE_SIZE;\r\n maxColumns = (FORM_WIDTH - FORM_WIDTH_ADJUST) / SQUARE_SIZE; \r\n grid = new JLabel[maxRows][maxColumns];\r\n int y = (FORM_HEIGHT - (maxRows * SQUARE_SIZE)) / 2;\r\n for (int row = 0; row < maxRows; row++) {\r\n int x = (FORM_WIDTH - (maxColumns * SQUARE_SIZE)) / 2;\r\n for (int column = 0; column < maxColumns; column++) {\r\n createSquare(x,y,row,column);\r\n x += SQUARE_SIZE;\r\n }\r\n y += SQUARE_SIZE;\r\n } \r\n }", "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 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 JPanel getConfigurationInfo() {\r\n\t\tif (configurationInfo == null) {\r\n\t\t\tGridBagConstraints gridBagConstraints36 = new GridBagConstraints();\r\n\t\t\tgridBagConstraints36.gridx = 1;\r\n\t\t\tgridBagConstraints36.fill = GridBagConstraints.HORIZONTAL;\r\n\t\t\tgridBagConstraints36.anchor = GridBagConstraints.WEST;\r\n\t\t\tgridBagConstraints36.weightx = 0.0;\r\n\t\t\tgridBagConstraints36.insets = new Insets(6, 5, 0, 5);\r\n\t\t\tgridBagConstraints36.gridy = 5;\r\n\t\t\tnumberEngines = new JLabel();\r\n\t\t\tnumberEngines.setText(\"-\");\r\n\t\t\tGridBagConstraints gridBagConstraints35 = new GridBagConstraints();\r\n\t\t\tgridBagConstraints35.gridx = 1;\r\n\t\t\tgridBagConstraints35.fill = GridBagConstraints.HORIZONTAL;\r\n\t\t\tgridBagConstraints35.anchor = GridBagConstraints.WEST;\r\n\t\t\tgridBagConstraints35.weightx = 0.0;\r\n\t\t\tgridBagConstraints35.insets = new Insets(6, 5, 0, 5);\r\n\t\t\tgridBagConstraints35.gridy = 4;\r\n\t\t\tcenterOfGravity = new JLabel();\r\n\t\t\tcenterOfGravity.setText(\"-\");\r\n\t\t\tGridBagConstraints gridBagConstraints34 = new GridBagConstraints();\r\n\t\t\tgridBagConstraints34.gridx = 1;\r\n\t\t\tgridBagConstraints34.fill = GridBagConstraints.HORIZONTAL;\r\n\t\t\tgridBagConstraints34.anchor = GridBagConstraints.WEST;\r\n\t\t\tgridBagConstraints34.weightx = 0.0;\r\n\t\t\tgridBagConstraints34.insets = new Insets(6, 5, 0, 5);\r\n\t\t\tgridBagConstraints34.gridy = 3;\r\n\t\t\tgrossWeight = new JLabel();\r\n\t\t\tgrossWeight.setText(\"-\");\r\n\t\t\tGridBagConstraints gridBagConstraints33 = new GridBagConstraints();\r\n\t\t\tgridBagConstraints33.gridx = 1;\r\n\t\t\tgridBagConstraints33.fill = GridBagConstraints.HORIZONTAL;\r\n\t\t\tgridBagConstraints33.anchor = GridBagConstraints.WEST;\r\n\t\t\tgridBagConstraints33.weightx = 0.0;\r\n\t\t\tgridBagConstraints33.insets = new Insets(6, 5, 0, 5);\r\n\t\t\tgridBagConstraints33.gridy = 2;\r\n\t\t\tmaximumLoadFactor = new JLabel();\r\n\t\t\tmaximumLoadFactor.setText(\"-\");\r\n\t\t\tGridBagConstraints gridBagConstraints32 = new GridBagConstraints();\r\n\t\t\tgridBagConstraints32.gridx = 3;\r\n\t\t\tgridBagConstraints32.fill = GridBagConstraints.HORIZONTAL;\r\n\t\t\tgridBagConstraints32.anchor = GridBagConstraints.WEST;\r\n\t\t\tgridBagConstraints32.weightx = 0.0;\r\n\t\t\tgridBagConstraints32.insets = new Insets(6, 5, 0, 5);\r\n\t\t\tgridBagConstraints32.gridy = 5;\r\n\t\t\toptimumEndurance = new JLabel();\r\n\t\t\toptimumEndurance.setText(\"-\");\r\n\t\t\tGridBagConstraints gridBagConstraints30 = new GridBagConstraints();\r\n\t\t\tgridBagConstraints30.gridx = 3;\r\n\t\t\tgridBagConstraints30.fill = GridBagConstraints.HORIZONTAL;\r\n\t\t\tgridBagConstraints30.anchor = GridBagConstraints.WEST;\r\n\t\t\tgridBagConstraints30.weightx = 0.0;\r\n\t\t\tgridBagConstraints30.insets = new Insets(6, 5, 0, 5);\r\n\t\t\tgridBagConstraints30.gridy = 4;\r\n\t\t\toptimumCruiseIAS = new JLabel();\r\n\t\t\toptimumCruiseIAS.setText(\"-\");\r\n\t\t\tGridBagConstraints gridBagConstraints29 = new GridBagConstraints();\r\n\t\t\tgridBagConstraints29.gridx = 3;\r\n\t\t\tgridBagConstraints29.fill = GridBagConstraints.HORIZONTAL;\r\n\t\t\tgridBagConstraints29.anchor = GridBagConstraints.WEST;\r\n\t\t\tgridBagConstraints29.weightx = 0.0;\r\n\t\t\tgridBagConstraints29.insets = new Insets(6, 5, 0, 5);\r\n\t\t\tgridBagConstraints29.gridy = 3;\r\n\t\t\tmaximumIAS = new JLabel();\r\n\t\t\tmaximumIAS.setText(\"-\");\r\n\t\t\tGridBagConstraints gridBagConstraints28 = new GridBagConstraints();\r\n\t\t\tgridBagConstraints28.gridx = 3;\r\n\t\t\tgridBagConstraints28.fill = GridBagConstraints.HORIZONTAL;\r\n\t\t\tgridBagConstraints28.anchor = GridBagConstraints.WEST;\r\n\t\t\tgridBagConstraints28.weightx = 0.0;\r\n\t\t\tgridBagConstraints28.insets = new Insets(6, 5, 0, 5);\r\n\t\t\tgridBagConstraints28.gridy = 2;\r\n\t\t\tpropulsionBatery = new JLabel();\r\n\t\t\tpropulsionBatery.setText(\"-\");\r\n\t\t\tGridBagConstraints gridBagConstraints27 = new GridBagConstraints();\r\n\t\t\tgridBagConstraints27.gridx = 3;\r\n\t\t\tgridBagConstraints27.fill = GridBagConstraints.HORIZONTAL;\r\n\t\t\tgridBagConstraints27.anchor = GridBagConstraints.WEST;\r\n\t\t\tgridBagConstraints27.weightx = 0.0;\r\n\t\t\tgridBagConstraints27.insets = new Insets(6, 5, 0, 5);\r\n\t\t\tgridBagConstraints27.gridy = 0;\r\n\t\t\tpropulsionFuel = new JLabel();\r\n\t\t\tpropulsionFuel.setText(\"-\");\r\n\t\t\tGridBagConstraints gridBagConstraints26 = new GridBagConstraints();\r\n\t\t\tgridBagConstraints26.gridx = 1;\r\n\t\t\tgridBagConstraints26.insets = new Insets(6, 5, 0, 5);\r\n\t\t\tgridBagConstraints26.weightx = 5.0;\r\n\t\t\tgridBagConstraints26.anchor = GridBagConstraints.WEST;\r\n\t\t\tgridBagConstraints26.fill = GridBagConstraints.HORIZONTAL;\r\n\t\t\tgridBagConstraints26.gridy = 0;\r\n\t\t\tconfigurationId = new JLabel();\r\n\t\t\tconfigurationId.setText(\"-\");\r\n\t\t\tGridBagConstraints gridBagConstraints25 = new GridBagConstraints();\r\n\t\t\tgridBagConstraints25.gridx = 0;\r\n\t\t\tgridBagConstraints25.weightx = 0.0;\r\n\t\t\tgridBagConstraints25.anchor = GridBagConstraints.EAST;\r\n\t\t\tgridBagConstraints25.insets = new Insets(6, 5, 0, 0);\r\n\t\t\tgridBagConstraints25.gridy = 5;\r\n\t\t\tjLabel8111111111 = new JLabel();\r\n\t\t\tjLabel8111111111.setText(\"Number of engines:\");\r\n\t\t\tGridBagConstraints gridBagConstraints24 = new GridBagConstraints();\r\n\t\t\tgridBagConstraints24.gridx = 0;\r\n\t\t\tgridBagConstraints24.weightx = 0.0;\r\n\t\t\tgridBagConstraints24.anchor = GridBagConstraints.EAST;\r\n\t\t\tgridBagConstraints24.insets = new Insets(6, 5, 0, 0);\r\n\t\t\tgridBagConstraints24.gridy = 4;\r\n\t\t\tjLabel811111111 = new JLabel();\r\n\t\t\tjLabel811111111.setText(\"Center of gravity from nose:\");\r\n\t\t\tGridBagConstraints gridBagConstraints23 = new GridBagConstraints();\r\n\t\t\tgridBagConstraints23.gridx = 0;\r\n\t\t\tgridBagConstraints23.weightx = 0.0;\r\n\t\t\tgridBagConstraints23.anchor = GridBagConstraints.EAST;\r\n\t\t\tgridBagConstraints23.insets = new Insets(6, 5, 0, 0);\r\n\t\t\tgridBagConstraints23.gridy = 3;\r\n\t\t\tjLabel81111111 = new JLabel();\r\n\t\t\tjLabel81111111.setText(\"Gross weight:\");\r\n\t\t\tGridBagConstraints gridBagConstraints22 = new GridBagConstraints();\r\n\t\t\tgridBagConstraints22.gridx = 0;\r\n\t\t\tgridBagConstraints22.weightx = 0.0;\r\n\t\t\tgridBagConstraints22.anchor = GridBagConstraints.EAST;\r\n\t\t\tgridBagConstraints22.insets = new Insets(6, 5, 0, 0);\r\n\t\t\tgridBagConstraints22.gridy = 2;\r\n\t\t\tjLabel8111111 = new JLabel();\r\n\t\t\tjLabel8111111.setText(\"Maximum load factor:\");\r\n\t\t\tGridBagConstraints gridBagConstraints20 = new GridBagConstraints();\r\n\t\t\tgridBagConstraints20.gridx = 2;\r\n\t\t\tgridBagConstraints20.weightx = 0.0;\r\n\t\t\tgridBagConstraints20.anchor = GridBagConstraints.EAST;\r\n\t\t\tgridBagConstraints20.insets = new Insets(6, 5, 0, 0);\r\n\t\t\tgridBagConstraints20.gridy = 5;\r\n\t\t\tjLabel811111 = new JLabel();\r\n\t\t\tjLabel811111.setText(\"Optimum endurance IAS:\");\r\n\t\t\tGridBagConstraints gridBagConstraints19 = new GridBagConstraints();\r\n\t\t\tgridBagConstraints19.gridx = 2;\r\n\t\t\tgridBagConstraints19.weightx = 0.0;\r\n\t\t\tgridBagConstraints19.anchor = GridBagConstraints.EAST;\r\n\t\t\tgridBagConstraints19.insets = new Insets(6, 5, 0, 0);\r\n\t\t\tgridBagConstraints19.gridy = 4;\r\n\t\t\tjLabel81111 = new JLabel();\r\n\t\t\tjLabel81111.setText(\"Optimum cruise IAS::\");\r\n\t\t\tGridBagConstraints gridBagConstraints18 = new GridBagConstraints();\r\n\t\t\tgridBagConstraints18.gridx = 2;\r\n\t\t\tgridBagConstraints18.weightx = 0.0;\r\n\t\t\tgridBagConstraints18.anchor = GridBagConstraints.EAST;\r\n\t\t\tgridBagConstraints18.insets = new Insets(6, 5, 0, 0);\r\n\t\t\tgridBagConstraints18.gridy = 3;\r\n\t\t\tjLabel8111 = new JLabel();\r\n\t\t\tjLabel8111.setText(\"Maximum IAS:\");\r\n\t\t\tGridBagConstraints gridBagConstraints17 = new GridBagConstraints();\r\n\t\t\tgridBagConstraints17.gridx = 2;\r\n\t\t\tgridBagConstraints17.weightx = 0.0;\r\n\t\t\tgridBagConstraints17.anchor = GridBagConstraints.EAST;\r\n\t\t\tgridBagConstraints17.insets = new Insets(6, 5, 0, 0);\r\n\t\t\tgridBagConstraints17.gridy = 2;\r\n\t\t\tjLabel811 = new JLabel();\r\n\t\t\tjLabel811.setText(\"Propulsion battery capacity:\");\r\n\t\t\tGridBagConstraints gridBagConstraints16 = new GridBagConstraints();\r\n\t\t\tgridBagConstraints16.gridx = 2;\r\n\t\t\tgridBagConstraints16.weightx = 0.0;\r\n\t\t\tgridBagConstraints16.anchor = GridBagConstraints.EAST;\r\n\t\t\tgridBagConstraints16.insets = new Insets(6, 5, 0, 0);\r\n\t\t\tgridBagConstraints16.gridy = 0;\r\n\t\t\tjLabel81 = new JLabel();\r\n\t\t\tjLabel81.setText(\"Propulsion fuel capacity:\");\r\n\t\t\tGridBagConstraints gridBagConstraints15 = new GridBagConstraints();\r\n\t\t\tgridBagConstraints15.gridx = 0;\r\n\t\t\tgridBagConstraints15.weightx = 1.0;\r\n\t\t\tgridBagConstraints15.anchor = GridBagConstraints.EAST;\r\n\t\t\tgridBagConstraints15.insets = new Insets(6, 5, 0, 0);\r\n\t\t\tgridBagConstraints15.fill = GridBagConstraints.NONE;\r\n\t\t\tgridBagConstraints15.gridy = 0;\r\n\t\t\tjLabel8 = new JLabel();\r\n\t\t\tjLabel8.setText(\"Configuration ID:\");\r\n\t\t\tconfigurationInfo = new JPanel();\r\n\t\t\tconfigurationInfo.setLayout(new GridBagLayout());\r\n\t\t\tconfigurationInfo.add(jLabel8, gridBagConstraints15);\r\n\t\t\tconfigurationInfo.add(jLabel81, gridBagConstraints16);\r\n\t\t\tconfigurationInfo.add(jLabel811, gridBagConstraints17);\r\n\t\t\tconfigurationInfo.add(jLabel8111, gridBagConstraints18);\r\n\t\t\tconfigurationInfo.add(jLabel81111, gridBagConstraints19);\r\n\t\t\tconfigurationInfo.add(jLabel811111, gridBagConstraints20);\r\n\t\t\tconfigurationInfo.add(jLabel8111111, gridBagConstraints22);\r\n\t\t\tconfigurationInfo.add(jLabel81111111, gridBagConstraints23);\r\n\t\t\tconfigurationInfo.add(jLabel811111111, gridBagConstraints24);\r\n\t\t\tconfigurationInfo.add(jLabel8111111111, gridBagConstraints25);\r\n\t\t\tconfigurationInfo.add(configurationId, gridBagConstraints26);\r\n\t\t\tconfigurationInfo.add(propulsionFuel, gridBagConstraints27);\r\n\t\t\tconfigurationInfo.add(propulsionBatery, gridBagConstraints28);\r\n\t\t\tconfigurationInfo.add(maximumIAS, gridBagConstraints29);\r\n\t\t\tconfigurationInfo.add(optimumCruiseIAS, gridBagConstraints30);\r\n\t\t\tconfigurationInfo.add(optimumEndurance, gridBagConstraints32);\r\n\t\t\tconfigurationInfo.add(maximumLoadFactor, gridBagConstraints33);\r\n\t\t\tconfigurationInfo.add(grossWeight, gridBagConstraints34);\r\n\t\t\tconfigurationInfo.add(centerOfGravity, gridBagConstraints35);\r\n\t\t\tconfigurationInfo.add(numberEngines, gridBagConstraints36);\r\n\t\t}\r\n\t\treturn configurationInfo;\r\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 }", "@Override\n\tpublic void bind() {\n\t\tview.getDocFieldWidgets().clear();\n\t\tif (!(controller.getSelectedPlugin() != null && controller.getSelectedPlugin().getPlugin().getPluginName().equals(\n\t\t\t\tPluginNameConstants.FUZZYDB_PLUGIN))) {\n\t\t\treturn;\n\t\t}\n\t\tBatchClassPluginDTO batchPluginDTO = controller.getSelectedPlugin();\n\t\tint row = 0;\n\t\tfor (BatchClassPluginConfigDTO pluginConfigDTO : batchPluginDTO.getBatchClassPluginConfigs()) {\n\t\t\tif (!(pluginConfigDTO.getName().equalsIgnoreCase(AdminConstants.DOCUMENT_TYPE)\n\t\t\t\t\t|| pluginConfigDTO.getName().equalsIgnoreCase(AdminConstants.FIELD_TYPE) || pluginConfigDTO.getName()\n\t\t\t\t\t.equalsIgnoreCase(AdminConstants.ROW_TYPE))) {\n\t\t\t\tview.setProperties(pluginConfigDTO, row);\n\t\t\t\trow++;\n\t\t\t}\n\t\t}\n\t\tview.addButtons(row);\n\t\tint index=0;\n\t\tif ((view.getDocFieldWidgets()!=null)&&(view.getDocFieldWidgets().size()!=0)) {\n\t\t\twhile ((index < view.getDocFieldWidgets().size() && !view.getDocFieldWidgets().get(index).isListBox())\n\t\t\t\t\t&& view.getDocFieldWidgets().get(index).getTextBoxWidget().getWidget().isReadOnly()) {\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\tif (index < view.getDocFieldWidgets().size()) {\n\t\t\t\tif (view.getDocFieldWidgets().get(index).isListBox()) {\n\t\t\t\t\tview.getDocFieldWidgets().get(index).getListBoxwidget().setFocus(true);\n\t\t\t\t} else {\n\t\t\t\t\tview.getDocFieldWidgets().get(index).getTextBoxWidget().getWidget().setFocus(true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void buildLayout() {\n HorizontalLayout actions = new HorizontalLayout(filter, newPart);\n actions.setWidth(\"100%\"); //what portion of screen to take\n filter.setWidth(\"100%\"); //what portion filter textbox takes\n actions.setExpandRatio(filter, 1); //expand (leaves no gaps)\n\n VerticalLayout left = new VerticalLayout(actions, partList);\n left.setSizeFull();\n partList.setSizeFull();\n left.setExpandRatio(partList, 1);\n\n HorizontalLayout mainLayout = new HorizontalLayout(left, partForm);\n mainLayout.setSizeFull();\n mainLayout.setExpandRatio(left, 1);\n\n // Split and allow resizing\n setContent(mainLayout);\n }", "private GridLayout initGridLayout(int rows, int colums) {\n GridLayout gridLayout = new GridLayout(this);\n gridLayout = findViewById(R.id.game_grid);\n gridLayout.setColumnCount(colums);\n gridLayout.setRowCount(rows);\n\n // gridLayout.setLayoutParams(gridLayoutParams);\n gridLayout.setOrientation(GridLayout.HORIZONTAL);\n return gridLayout;\n }", "private void setupExportValuesWithDataPanel(){\n exportValuesWithDataPanel = new JPanel();\n exportValuesWithDataPanel.setLayout(new BoxLayout(exportValuesWithDataPanel, BoxLayout.X_AXIS));\n\n exportValuesCheckBox = new JCheckBox(\"Include associated input values\");\n exportValuesCheckBox.setSelected(true);\n exportValuesCheckBox.setToolTipText(\"Includes unit system, width and depth, diameter, and gauge length\");\n\n exportValuesWithDataPanel.add(Box.createHorizontalStrut(HORIZONTAL_BUFFER));\n exportValuesWithDataPanel.add(exportValuesCheckBox);\n exportValuesWithDataPanel.add(Box.createHorizontalGlue());\n }", "private void setupCurrentGames() {\n add(announcementBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(chatRoomBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(friendsListBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(leaderboardBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(settingsBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n // TODO\n // TODO\n\n\n GridPane grid = new GridPane();\n\n grid.setPadding(new javafx.geometry.Insets(10,10,10,10));\n \n \n \nProduitService sb=new ProduitService();\nList<Produit>lst=sb.FindAll();\nint elements=sb.counte();\n\n\n grid.setHgap(10);\n grid.setVgap(10);\n int cols=4, colCnt = 0, rowCnt = 0;\n\n for (int i=0; i<elements; i++) {\nFileInputStream input = null;\n try {\n input = new FileInputStream(\"C:\\\\images\\\\\"+lst.get(i).getPhoto());\n \n Image image = new Image(input);\n ImageView imageView = new ImageView(image);\n imageView.setFitHeight(100);\n imageView.setFitWidth(100);\n Label label1 = new Label(lst.get(i).getModel());\n Label label2 = new Label(lst.get(i).getType());\n Label label3 = new Label(lst.get(i).getQuantity());\n Label label4 = new Label(lst.get(i).getPrice()+\" $\");\n int x=lst.get(i).getId();\n \n VBox root = new VBox(label1,imageView,label2,label3,label4);\n grid.add(root,colCnt,rowCnt);\n colCnt+=1;\n if (colCnt>cols) {\n rowCnt++;\n colCnt=0;\n } } catch (FileNotFoundException ex) {\n Logger.getLogger(FXML_ProductController.class.getName()).log(Level.SEVERE, null, ex);\n } \n }\n panell.getChildren().add(grid);\n \n \n\n \n\n \n \n \n \n \n \n }", "private void initUIElements() \n\t{\n\t\t// Init UI element collections.\n\t\tbarcharts\t\t= new HashMap<String, BarChart>();\n\t\t//spinners\t\t= new HashMap<String, Spinner<Float>>();\n\t\trangeSliders\t= new HashMap<String, RangeSlider>();\n\t\tvBoxes\t\t\t= new HashMap<String, VBox>();\n\t\t\n\t\t// Remove deprecated UI elements in parameter configuration grid pane.\n\t\tint vboxCount = 0;\n\t\tfor (Object child : parameterConfiguration_gridPane.getChildren().toArray()) {\n\t\t\tNode node = (Node)child;\n\t\t\t\n\t\t\t//System.out.println(node.getClass().getName());\n\t\t\tswitch (node.getClass().getName()) \n\t\t\t{\n\t \t\t// Replace TextFields with numeric steppers / spinners.\n\t \t\tcase \"javafx.scene.control.TextField\":\n\t \t\t\t// Set initial values.\n\t \t\t\tif (node.getId().contains(\"min\"))\n\t \t\t\t\t((TextField)node).setText(\"0\");\n\t \t\t\telse\n\t \t\t\t\t((TextField)node).setText(\"100\");\n\t \t\tbreak;\n\t \t\t\n\t \t\tcase \"javafx.scene.layout.VBox\":\n\t \t\t\tVBox currentVBox = ((VBox)node);\n\t \t\t\t// Look for Sliders in VBox nodes; replace with RangeSliders.\n\t \t\t\tfor (Object vboxChild : currentVBox.getChildren().toArray()) {\n\t \t\t\t\tNode vboxNode = (Node)vboxChild;\n\t \t\t\t\t\n\t \t\t\t\tif (vboxNode.getClass().getName() == \"javafx.scene.control.Slider\") {\n\t \t\t\t\t\tcurrentVBox.getChildren().remove(vboxNode);\n\t \t\t\t\t}\n\t \t\t\t}\n\t \t\t\t\n\t \t\t\t// Store references to VBoxes.\n\t \t\t\tswitch(vboxCount++)\n\t \t\t\t{\n\t \t\t\t\tcase 0:\n\t \t\t\t\t\tvBoxes.put(\"alpha\", currentVBox);\n\t \t\t\t\tbreak;\n\t \t\t\t\t\n\t \t\t\t\tcase 1:\n\t \t\t\t\t\tvBoxes.put(\"eta\", currentVBox);\n\t \t\t\t\tbreak;\n\t \t\t\t\t\n\t \t\t\t\tcase 2:\n\t \t\t\t\t\tvBoxes.put(\"kappa\", currentVBox);\n\t \t\t\t\tbreak;\n\t \t\t\t}\n\t \t\tbreak;\n\t \t}\n\t }\n\t\t\n\t\t// Init barcharts.\n\t\tinitBarcharts();\n\t\t\n\t\t// Init range sliders.\n\t\tinitRangeSliders();\n\t\t\n\t\t// Init textfields.\n\t\tinitTextFields();\n\t\t\n\t\t// Init combobox.\n\t\tinitComboBoxes();\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 }", "private void $$$setupUI$$$() {\n panel_ProfessorApp = new JPanel();\n panel_ProfessorApp.setLayout(new GridLayoutManager(4, 1, new Insets(0, 0, 0, 0), -1, -1));\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n panel_ProfessorApp.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 questionNumberLabel = new JLabel();\n questionNumberLabel.setText(\"Question 1\");\n panel1.add(questionNumberLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n QuestionInput = new JTextArea();\n QuestionInput.setText(\"\");\n panel_ProfessorApp.add(QuestionInput, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, new Dimension(150, 50), null, 0, false));\n final JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(4, 2, new Insets(0, 0, 0, 0), -1, -1));\n panel_ProfessorApp.add(panel2, 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 answerInput1 = new JTextField();\n answerInput1.setText(\"Answer Text\");\n panel2.add(answerInput1, 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 answerInput2 = new JTextField();\n answerInput2.setText(\"Answer Text\");\n panel2.add(answerInput2, 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 answerInput3 = new JTextField();\n answerInput3.setText(\"Answer Text\");\n panel2.add(answerInput3, 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 answerInput4 = new JTextField();\n answerInput4.setText(\"Answer Text\");\n panel2.add(answerInput4, 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 OptionA = new JRadioButton();\n OptionA.setText(\"A\");\n panel2.add(OptionA, 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 OptionB = new JRadioButton();\n OptionB.setText(\"B\");\n panel2.add(OptionB, new GridConstraints(1, 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 OptionC = new JRadioButton();\n OptionC.setText(\"C\");\n panel2.add(OptionC, new GridConstraints(2, 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 OptionD = new JRadioButton();\n OptionD.setText(\"D\");\n panel2.add(OptionD, new GridConstraints(3, 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 JPanel panel3 = new JPanel();\n panel3.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));\n panel_ProfessorApp.add(panel3, new GridConstraints(3, 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 nextButton = new JButton();\n nextButton.setText(\"Next\");\n panel3.add(nextButton, new GridConstraints(0, 2, 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 panel3.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 saveButton = new JButton();\n saveButton.setText(\"Save\");\n panel3.add(saveButton, 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 ButtonGroup buttonGroup;\n buttonGroup = new ButtonGroup();\n buttonGroup.add(OptionA);\n buttonGroup.add(OptionB);\n buttonGroup.add(OptionC);\n buttonGroup.add(OptionD);\n }", "private void setupPanel()\n\t{\n\t\tthis.setLayout(baseLayout);\n\t\tqueryButton = new JButton(\"query\");\n\t\tthis.add(queryButton);\n\t\tthis.add(displayPane);\n\t\tdisplayArea = new JTextArea(10,30);\n\t\tadd(displayArea);\n\t\t\n\t\t\n\t}", "private void buildTables(){\r\n\t\tarticleTable.setWidth(50, Unit.PERCENTAGE);\r\n\t\tarticleTable.setPageLength(5);\r\n\t\tlabel = new Label(\"No article found\");\r\n\t\tlabel2 = new Label(\"No image found\");\r\n\t\timageTable.setWidth(50, Unit.PERCENTAGE);\r\n\t\timageTable.setPageLength(5);\r\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}", "private void $$$setupUI$$$() {\n createUIComponents();\n panel = new JPanel();\n panel.setLayout(new GridLayoutManager(2, 1, new Insets(10, 10, 10, 10), -1, -1));\n final JScrollPane scrollPane1 = new JScrollPane();\n panel.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 scrollPane1.setViewportView(table);\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));\n panel.add(panel1, 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 buttonRegister = new JButton();\n buttonRegister.setText(\"Track\");\n panel1.add(buttonRegister, 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 buttonMenu = new JButton();\n buttonMenu.setText(\"Menu\");\n panel1.add(buttonMenu, new GridConstraints(0, 2, 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(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n }", "@Override\n public void reloadGridsData() {\n \n }", "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 viewConfiguration(String table) {\n if (view != null) {\n frame.getContentPane().remove(view);\n }\n if (scrollPane != null) {\n frame.getContentPane().remove(scrollPane);\n }\n\n int imageWidth, imageHeight;\n\n // render image\n if (config.useBlankImage()) {\n imageWidth = config.getImageWidth();\n imageHeight = config.getImageHeight();\n canvas = new ZImageCanvas(imageWidth, imageHeight);\n }\n else {\n ImageIcon icon = new ImageIcon(config.getImageName(), config.getImageName());\n Image base = icon.getImage();\n imageHeight = base.getHeight(null);\n imageWidth = base.getWidth(null);\n canvas = new ZImageCanvas(base);\n }\n\n // render surrounding rectangle\n ZLayerGroup layer = canvas.getLayer();\n ZLine line = new ZLine(config.getMinimumPixelX(), config.getMinimumPixelY(), \n config.getMaximumPixelX(), config.getMinimumPixelY());\n ZVisualLeaf leaf = new ZVisualLeaf(line);\n layer.addChild(leaf);\n line = new ZLine(config.getMinimumPixelX(), config.getMinimumPixelY(), \n config.getMinimumPixelX(), config.getMaximumPixelY());\n leaf = new ZVisualLeaf(line);\n layer.addChild(leaf);\n line = new ZLine(config.getMaximumPixelX(), config.getMinimumPixelY(), \n config.getMaximumPixelX(), config.getMaximumPixelY());\n leaf = new ZVisualLeaf(line);\n layer.addChild(leaf);\n line = new ZLine(config.getMinimumPixelX(), config.getMaximumPixelY(), \n config.getMaximumPixelX(), config.getMaximumPixelY());\n leaf = new ZVisualLeaf(line);\n layer.addChild(leaf);\n\n // render the static motes\n for (Enumeration e=motes.elements(); e.hasMoreElements(); ) {\n leaf = new ZVisualLeaf((Mote)e.nextElement());\n layer.addChild(leaf);\n }\n\n JPanel main = new JPanel(new BorderLayout());\n\n // add scroll pane\n int x=0, y = 0;\n if (imageWidth > SCROLL_WIDTH) {\n x = SCROLL_WIDTH;\n }\n else {\n x = imageWidth;\n }\n\n if (imageHeight > SCROLL_HEIGHT) {\n y = SCROLL_HEIGHT;\n }\n else {\n y = imageHeight;\n }\n\n scrollPane = new ZScrollPane(canvas);\n\n scrollPane.setPreferredSize(new Dimension(x+20, y+20));\n frame.getContentPane().add(scrollPane, BorderLayout.CENTER);\n\n view = new JPanel(new GridLayout(0,3));\n view.add(new JLabel(\" X Position \"));\n view.add(new JLabel(\" Y Position \"));\n view.add(new JLabel(\" Mote ID \"));\n xpos = new JLabel (\" 0.0 \");\n ypos = new JLabel (\" 0.0 \");\n moteId = new JLabel(\" ID \");\n view.add(xpos);\n view.add(ypos);\n view.add(moteId);\n frame.getContentPane().add(view, BorderLayout.EAST);\n\n frame.pack();\n\n formatter = new DecimalFormat(\"###.##\");\n\n // create all the event handlers\n panEventHandler = new ZPanEventHandler(canvas.getCameraNode());\n zoomEventHandler = new ZoomEventHandler(canvas.getCameraNode());\n addEventHandler = new AddEventHandler(canvas, this, this, imageWidth, imageHeight, motes, frame);\n moveEventHandler = new MoveEventHandler(canvas, this, imageWidth, imageHeight, true);\n removeEventHandler = new RemoveEventHandler(canvas, canvas.getLayer(), motes, this);\n autoEventHandler = new AutoEventHandler(canvas, motes, imageWidth, imageHeight);\n \n // set the zoom and move event handlers to active\n zoomEventHandler.setActive(true);\n moveEventHandler.setActive(true);\n\n setMode(ADD_MODE);\n/*\n imageWithGrid = new BufferedImage(imageWidth, imageHeight, BufferedImage.TYPE_INT_RGB);\n Graphics g = imageWithGrid.createGraphics();\n g.drawImage(base, 0, 0, null);\n g.setColor(Color.black);\n \n double xdist = Math.abs(config.getMaximumRealX() - config.getMinimumRealX());\n double pxdist = (double)Math.abs((config.getMaximumPixelX() - config.getMinimumPixelX()));\n double xRatio = pxdist/xdist;\n double minX = (double)Math.min(config.getMinimumPixelX(), config.getMaximumPixelX());\n double maxX = (double)Math.max(config.getMinimumPixelX(), config.getMaximumPixelX());\n for (double i=minX; i<=maxX; i+=(xRatio*GRID_DISTANCE)) {\n g.drawLine((int)i,config.getMinimumPixelY(),(int)i,config.getMaximumPixelY());\n }\n g.drawLine(config.getMaximumPixelX(), config.getMinimumPixelY(), config.getMaximumPixelX(), config.getMaximumPixelY());\n\n double ydist = Math.abs(config.getMaximumRealY() - config.getMinimumRealY());\n double pydist = (double)Math.abs((config.getMaximumPixelY() - config.getMinimumPixelY()));\n double yRatio = pydist/ydist;\n double minY = (double)Math.min(config.getMinimumPixelY(), config.getMaximumPixelY());\n double maxY = (double)Math.max(config.getMinimumPixelY(), config.getMaximumPixelY());\n for (double i=minY; i<=maxY; i+=(yRatio*GRID_DISTANCE)) {\n g.drawLine(config.getMinimumPixelX(),(int)i,config.getMaximumPixelX(),(int)i);\n }\n g.drawLine(config.getMinimumPixelX(), config.getMaximumPixelY(), config.getMaximumPixelX(), config.getMaximumPixelY());\n*/\n }", "private void InitData() {\n\t\tmOptList = new HashMap<Integer, PlaylistEntry>();\n\t\tplaylist = new Playlist();\n\t\tmAdapter = new MusicAdapter(getContext());\n\n\t\tmListView = new ListView(getContext());\n\t\tmListView.setDividerHeight(0);\n\t\tmListView.setCacheColorHint(0x00000000);\n\t\tmListView.setFadingEdgeLength(0);\n\t\tmListView.setFastScrollEnabled(true);\n\t\tmListView.setFooterDividersEnabled(true);\n\t\tmListView.setSelector(R.drawable.press_list_sum);\n\t\tmListView.setOnItemClickListener(mOnItemClickListener);\n\t\tmListView.setPadding(1, 1, 1, 1);\n\n\t\t// 设置最后一个View\n\t\tView mFooterView = new View(getContext());\n\t\tmFooterView.setLayoutParams(new ListView.LayoutParams(\n\t\t\t\tLayoutParams.FILL_PARENT, Util.dipTopx(getContext(), 1)));// 以前是66\n\t\tmListView.addFooterView(mFooterView);\n\t\tmListView.setAdapter(mAdapter);\n\t\tmLinearLayout.addView(mListView);\n\n\t\tLinearLayout mLayout = new LinearLayout(getContext());\n\t\t// mLayout.setPadding(2, 0, 2, Util.dipTopx(getContext(), 13));\n\t\tmLayout.setOrientation(LinearLayout.VERTICAL);\n\t\tmLayout.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,\n\t\t\t\tLayoutParams.FILL_PARENT));\n\n\t\tView mView = new View(mLayout.getContext());\n\t\tmView.setLayoutParams(new LinearLayout.LayoutParams(\n\t\t\t\tLayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT, 1));\n\n\t\tmLayout.addView(mView);\n\t\tmLayout.addView(mControlBar);\n\n\t\tthis.addView(mLinearLayout);\n\t\tthis.addView(mLayout);\n\t}", "private void setComponents() {\n datumPanel.setLayout(new GridLayout(9,2));\n delete.setText(\"Löschen\");\n addAttr.setText(\"Attribut hinzufügen\");\n deleteAttr.setText(\"Attribut löschen\");\n nameText.setText(DefaultValues.PRODUKTDATUM_NAME);\n idText.setText(DefaultValues.ID);\n attributeText.setText(DefaultValues.PRODUKTDATUM_ATTRIBUTE);\n verweiseText.setText(DefaultValues.PRODUKTDATUM_VERWEISE);\n title.setForeground(Color.BLUE);\n attributList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n attributList.setSelectedIndex(0);\n }", "protected void createContents() {\n shell = new Shell();\n shell.setSize(1024, 650);\n shell.setText(\"GMToolsTD\");\n shell.setLayout(new GridLayout());\n\n\n /* Création du menu principal */\n Menu menuPrincipal = new Menu(shell, SWT.BAR);\n shell.setMenuBar(menuPrincipal);\n\n MenuItem mntmModule = new MenuItem(menuPrincipal, SWT.CASCADE);\n mntmModule.setText(\"Module\");\n\n Menu menuModule = new Menu(mntmModule);\n mntmModule.setMenu(menuModule);\n\n mntmSpoolUsage = new MenuItem(menuModule, SWT.NONE);\n mntmSpoolUsage.setText(\"Spool Usage\");\n\n mntmUser = new MenuItem(menuModule, SWT.NONE);\n mntmUser.setText(\"User Information\");\n\n new MenuItem(menuModule, SWT.SEPARATOR);\n\n mntmConfig = new MenuItem(menuModule, SWT.NONE);\n mntmConfig.setText(\"Configuration\");\n\n new MenuItem(menuModule, SWT.SEPARATOR);\n\n mntmExit = new MenuItem(menuModule, SWT.NONE);\n mntmExit.setText(\"Exit\");\n\n MenuItem mntmHelp = new MenuItem(menuPrincipal, SWT.CASCADE);\n mntmHelp.setText(\"Help\");\n\n Menu menuAbout = new Menu(mntmHelp);\n mntmHelp.setMenu(menuAbout);\n\n mntmAbout = new MenuItem(menuAbout, SWT.NONE);\n mntmAbout.setText(\"About\");\n\n\n /* Creation main screen elements */\n pageComposite = new Composite(shell, SWT.NONE);\n pageComposite.setLayout(new GridLayout(2,false));\n gridData = new GridData();\n gridData.horizontalAlignment = SWT.FILL;\n gridData.grabExcessHorizontalSpace = true;\n gridData.verticalAlignment = SWT.FILL;\n gridData.grabExcessVerticalSpace = true;\n pageComposite.setLayoutData(gridData);\n\n\n grpConnexion = new Group(pageComposite, SWT.NONE );\n grpConnexion.setText(\"Connection\");\n grpConnexion.setLayout(new GridLayout(2,false));\n gridData = new GridData();\n gridData.heightHint = 110;\n grpConnexion.setLayoutData(gridData);\n\n\n Label lblServer = new Label(grpConnexion, SWT.NONE);\n lblServer.setText(\"Server :\");\n\n textServer = new Text(grpConnexion, SWT.NONE);\n textServer.setLayoutData(new GridData(110,20));\n\n Label lblUsername = new Label(grpConnexion, SWT.NONE);\n lblUsername.setSize(65, 20);\n lblUsername.setText(\"Username :\");\n\n textUsername = new Text(grpConnexion,SWT.NONE);\n textUsername.setLayoutData(new GridData(110,20));\n\n Label lblPassword = new Label(grpConnexion, SWT.NONE);\n lblPassword.setSize(65, 20);\n lblPassword.setText(\"Password :\");\n\n textPassword = new Text(grpConnexion, SWT.PASSWORD);\n textPassword.setLayoutData(new GridData(110,20));\n\n btnConnect = new Button(grpConnexion, SWT.NONE);\n btnConnect.setLayoutData(new GridData(SWT.RIGHT,SWT.CENTER, false, false));\n btnConnect.setText(\"Connect\");\n\n btnDisconnect = new Button(grpConnexion, SWT.NONE);\n btnDisconnect.setEnabled(false);\n btnDisconnect.setText(\"Disconnect\");\n\n\n\n groupInfo = new Group(pageComposite, SWT.NONE);\n groupInfo.setText(\"Information\");\n groupInfo.setLayout(new GridLayout(1, false));\n gridData = new GridData();\n gridData.horizontalAlignment = SWT.FILL;\n gridData.grabExcessHorizontalSpace = true;\n gridData.heightHint = 110;\n groupInfo.setLayoutData(gridData);\n\n textInformation = new Text(groupInfo, SWT.READ_ONLY | SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI);\n gridData = new GridData();\n gridData.horizontalAlignment = SWT.FILL;\n gridData.grabExcessHorizontalSpace = true;\n gridData.verticalAlignment = SWT.FILL;\n gridData.grabExcessVerticalSpace = true;\n textInformation.setLayoutData(gridData);\n\n\n // renseignement des informations provenant de config\n textServer.setText(conf.getValueConf(conf.SERVER_TD));\n textUsername.setText(conf.getValueConf(conf.USERNAME_TD));\n textPassword.setText(\"\");\n\n\n mntmSpoolUsage.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n majAffichage(AFFICHE_SPOOL);\n }\n });\n\n\n mntmUser.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent selectionEvent) {\n majAffichage(AFFICHE_USER);\n }\n });\n\n mntmConfig.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent selectionEvent) {\n majAffichage(AFFICHE_CONFIG);\n }\n });\n\n mntmAbout.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent selectionEvent) {\n MessageBox messageBox = new MessageBox(shell, SWT.ICON_INFORMATION);\n messageBox.setText(\"About...\");\n messageBox.setMessage(\"Not implemented yet ...\");\n messageBox.open();\n }\n });\n\n mntmExit.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent selectionEvent) {\n // afficher un message box avec du blabla\n shell.close();\n\n }\n });\n\n btnConnect.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n // connexion Teradata\n btnConnect.setEnabled(false);\n entryServer = textServer.getText();\n entryUsername = textUsername.getText();\n entryPassword = textPassword.getText();\n\n new Thread(new Runnable() {\n public void run() {\n try {\n\n tdConnect = new TDConnexion(entryServer, entryUsername, entryPassword, conf);\n majInformation(MESSAGE_INFORMATION,nomModuleConnexion,\"Connexion OK\");\n connexionStatut = true;\n } catch ( SQLException err) {\n majInformation(MESSAGE_ERROR,nomModuleConnexion,\"Connexion KO : \"+err.getMessage());\n connexionStatut = false;\n } catch (ClassNotFoundException err) {\n majInformation(MESSAGE_ERROR,nomModuleConnexion,\"Error ClassNotFoundException : \"+err.getMessage());\n connexionStatut = false;\n }\n if (connexionStatut) {\n try {\n nbrAMP = tdConnect.requestNumberAMP();\n } catch (Exception err) {\n majInformation(MESSAGE_ERROR,nomModuleConnexion,\"Calculation of AMPs KO : \"+err.getMessage());\n connexionStatut = false;\n tdConnect.deconnexion();\n }\n }\n\n Display.getDefault().asyncExec(new Runnable() {\n public void run() {\n\n if (connexionStatut) {\n activationON();\n\n textServer.setEnabled(false);\n textUsername.setEnabled(false);\n textPassword.setEnabled(false);\n\n btnConnect.setEnabled(false);\n btnDisconnect.setEnabled(true);\n } else {\n btnConnect.setEnabled(true);\n }\n }\n });\n }\n }).start();\n\n\n\n\n }\n });\n\n\n btnDisconnect.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n manageDisconnection();\n }\n });\n\n\n //creating secondary screen\n ecranUser = new EcranUser(this);\n ecranSpool = new EcranSpool(this);\n ecranConfig = new EcranConfig(this);\n\n\n // update of the information message (log)\n new Thread(new Runnable() {\n public void run() {\n try {\n while (true) {\n if (!listMessageInfo.isEmpty()) {\n Display.getDefault().asyncExec(new Runnable() {\n public void run() {\n refreshInformation();\n }\n });\n }\n try {\n Thread.sleep(500);\n } catch (Exception e) {\n //nothing to do\n }\n }\n } catch (Exception e) {\n //What to do when the while send an error ?\n }\n }\n }).start();\n\n }", "private void createContents() {\r\n shell = new Shell(getParent(), getStyle());\r\n shell.setSize(650, 300);\r\n shell.setText(getText());\r\n\r\n shell.setLayout(new FormLayout());\r\n\r\n lblSOName = new Label(shell, SWT.CENTER);\r\n lblSOName.setFont(SWTResourceManager.getFont(\"Segoe UI\", 11, SWT.NORMAL));\r\n FormData fd_lblSOName = new FormData();\r\n fd_lblSOName.bottom = new FormAttachment(0, 20);\r\n fd_lblSOName.right = new FormAttachment(100, -2);\r\n fd_lblSOName.top = new FormAttachment(0, 2);\r\n fd_lblSOName.left = new FormAttachment(0, 2);\r\n lblSOName.setLayoutData(fd_lblSOName);\r\n lblSOName.setText(soName);\r\n\r\n tableParams = new Table(shell, SWT.BORDER | SWT.FULL_SELECTION | SWT.H_SCROLL | SWT.V_SCROLL);\r\n tableParams.setFont(SWTResourceManager.getFont(\"Segoe UI\", 11, SWT.NORMAL));\r\n FormData fd_tableParams = new FormData();\r\n fd_tableParams.bottom = new FormAttachment(100, -40);\r\n fd_tableParams.right = new FormAttachment(100, -2);\r\n fd_tableParams.top = new FormAttachment(0, 22);\r\n fd_tableParams.left = new FormAttachment(0, 2);\r\n tableParams.setLayoutData(fd_tableParams);\r\n tableParams.setHeaderVisible(true);\r\n tableParams.setLinesVisible(true);\r\n fillInTable(tableParams);\r\n tableParams.addControlListener(new ControlAdapter() {\r\n\r\n @Override\r\n public void controlResized(ControlEvent e) {\r\n Table table = (Table)e.getSource();\r\n table.getColumn(0).setWidth((int)(table.getClientArea().width*nameSpace));\r\n table.getColumn(1).setWidth((int)(table.getClientArea().width*valueSpace));\r\n table.getColumn(2).setWidth((int)(table.getClientArea().width*hintSpace));\r\n }\r\n });\r\n tableParams.pack();\r\n //paramName.pack();\r\n //paramValue.pack();\r\n\r\n final TableEditor editor = new TableEditor(tableParams);\r\n //The editor must have the same size as the cell and must\r\n //not be any smaller than 50 pixels.\r\n editor.horizontalAlignment = SWT.LEFT;\r\n editor.grabHorizontal = true;\r\n editor.minimumWidth = 50;\r\n // editing the second column\r\n tableParams.addSelectionListener(new SelectionAdapter() {\r\n @Override\r\n public void widgetSelected(SelectionEvent e) {\r\n // Identify the selected row\r\n TableItem item = (TableItem) e.item;\r\n if (item == null) {\r\n return;\r\n }\r\n\r\n // The control that will be the editor must be a child of the Table\r\n IReplaceableParam<?> editedParam = (IReplaceableParam<?>)item.getData(DATA_VALUE_PARAM);\r\n if (editedParam != null) {\r\n // Clean up any previous editor control\r\n Control oldEditor = editor.getEditor();\r\n if (oldEditor != null) {\r\n oldEditor.dispose();\r\n }\r\n\r\n Control editControl = null;\r\n String cellText = item.getText(columnValueIndex);\r\n switch (editedParam.getType()) {\r\n case BOOLEAN:\r\n Combo cmb = new Combo(tableParams, SWT.READ_ONLY);\r\n String[] booleanItems = {Boolean.toString(true), Boolean.toString(false)};\r\n cmb.setItems(booleanItems);\r\n cmb.select(1);\r\n if (Boolean.parseBoolean(cellText)) {\r\n cmb.select(0);\r\n }\r\n editControl = cmb;\r\n cmb.addSelectionListener(new SelectionAdapter() {\r\n\r\n @Override\r\n public void widgetSelected(SelectionEvent se) {\r\n Combo text = (Combo) editor.getEditor();\r\n editor.getItem().setText(columnValueIndex, text.getText());\r\n }\r\n });\r\n break;\r\n case DATE:\r\n IReplaceableParam<LocalDateTime> calParam = (IReplaceableParam<LocalDateTime>)editedParam;\r\n LocalDateTime calToUse = calParam.getValue();\r\n Composite dateAndTime = new Composite(tableParams, SWT.NONE);\r\n RowLayout rl = new RowLayout();\r\n rl.wrap = false;\r\n dateAndTime.setLayout(rl);\r\n //Date cellDt;\r\n try {\r\n LocalDateTime locDT = LocalDateTime.parse(cellText, dtFmt);\r\n if (locDT != null) {\r\n calToUse = locDT;\r\n }\r\n /*cellDt = dateFmt.parse(cellText);\r\n if (cellDt != null) {\r\n calToUse.setTime(cellDt);\r\n }*/\r\n } catch (DateTimeParseException e1) {\r\n log.error(\"widgetSelected \", e1);\r\n }\r\n\r\n DateTime datePicker = new DateTime(dateAndTime, SWT.DATE | SWT.MEDIUM | SWT.DROP_DOWN);\r\n datePicker.setData(DATA_VALUE_PARAM, calParam);\r\n DateTime timePicker = new DateTime(dateAndTime, SWT.TIME | SWT.LONG);\r\n timePicker.setData(DATA_VALUE_PARAM, calParam);\r\n // for the date picker the months are zero-based, the first month is 0 the last is 11\r\n // for LocalDateTime the months range 1-12\r\n datePicker.setDate(calToUse.getYear(), calToUse.getMonthValue() - 1,\r\n calToUse.getDayOfMonth());\r\n timePicker.setTime(calToUse.getHour(), calToUse.getMinute(),\r\n calToUse.getSecond());\r\n\r\n datePicker.addSelectionListener(new SelectionAdapter() {\r\n\r\n @Override\r\n public void widgetSelected(SelectionEvent se) {\r\n DateTime source = (DateTime)se.getSource();\r\n IReplaceableParam<LocalDateTime> calParam1 = (IReplaceableParam<LocalDateTime>)source.getData(DATA_VALUE_PARAM);\r\n if (calParam1 != null) {\r\n LocalDateTime currDt = calParam1.getValue();\r\n // for the date picker the months are zero-based, the first month is 0 the last is 11\r\n // for LocalDateTime the months range 1-12\r\n calParam1.setValue(currDt.withYear(source.getYear()).withMonth(source.getMonth() + 1).withDayOfMonth(source.getDay()));\r\n String resultText = dtFmt.format(calParam1.getValue());\r\n log.debug(\"Result Text \" + resultText);\r\n editor.getItem().setText(columnValueIndex, resultText);\r\n } else {\r\n log.warn(\"widgetSelected param is null\");\r\n }\r\n }\r\n\r\n });\r\n timePicker.addSelectionListener(new SelectionAdapter() {\r\n\r\n @Override\r\n public void widgetSelected(SelectionEvent se) {\r\n DateTime source = (DateTime)se.getSource();\r\n IReplaceableParam<LocalDateTime> calParam1 = (IReplaceableParam<LocalDateTime>)source.getData(DATA_VALUE_PARAM);\r\n if (calParam1 != null) {\r\n LocalDateTime currDt = calParam1.getValue();\r\n calParam1.setValue(currDt.withHour(source.getHours()).withMinute(source.getMinutes()).withSecond(source.getSeconds()));\r\n String resultText = dtFmt.format(calParam1.getValue());\r\n log.debug(\"Result Text \" + resultText);\r\n editor.getItem().setText(columnValueIndex, resultText);\r\n } else {\r\n log.warn(\"widgetSelected param is null\");\r\n }\r\n }\r\n\r\n });\r\n dateAndTime.layout();\r\n editControl = dateAndTime;\r\n break;\r\n case INTEGER:\r\n Text intEditor = new Text(tableParams, SWT.NONE);\r\n intEditor.setText(item.getText(columnValueIndex));\r\n intEditor.selectAll();\r\n intEditor.addModifyListener(new ModifyListener() {\r\n @Override\r\n public void modifyText(ModifyEvent se) {\r\n Text text = (Text) editor.getEditor();\r\n Integer resultInt = null;\r\n try {\r\n resultInt = Integer.parseInt(text.getText());\r\n } catch (NumberFormatException nfe) {\r\n log.error(\"NFE \", nfe);\r\n }\r\n if (resultInt != null) {\r\n editor.getItem().setText(columnValueIndex, resultInt.toString());\r\n }\r\n }\r\n });\r\n editControl = intEditor;\r\n break;\r\n case STRING:\r\n default:\r\n Text newEditor = new Text(tableParams, SWT.NONE);\r\n newEditor.setText(item.getText(columnValueIndex));\r\n newEditor.setFont(tableParams.getFont());\r\n newEditor.selectAll();\r\n newEditor.addModifyListener(new ModifyListener() {\r\n @Override\r\n public void modifyText(ModifyEvent se) {\r\n Text text = (Text) editor.getEditor();\r\n editor.getItem().setText(columnValueIndex, text.getText());\r\n }\r\n });\r\n editControl = newEditor;\r\n break;\r\n }\r\n\r\n editControl.setFont(tableParams.getFont());\r\n editControl.setFocus();\r\n editor.setEditor(editControl, item, columnValueIndex);\r\n }\r\n }\r\n });\r\n\r\n\r\n btnOK = new Button(shell, SWT.NONE);\r\n btnOK.setFont(SWTResourceManager.getFont(\"Segoe UI\", 11, SWT.NORMAL));\r\n FormData fd_btnOK = new FormData();\r\n fd_btnOK.bottom = new FormAttachment(100, -7);\r\n fd_btnOK.right = new FormAttachment(40, 2);\r\n fd_btnOK.top = new FormAttachment(100, -35);\r\n fd_btnOK.left = new FormAttachment(15, 2);\r\n btnOK.setLayoutData(fd_btnOK);\r\n btnOK.setText(\"OK\");\r\n btnOK.addSelectionListener(new SelectionAdapter() {\r\n @Override\r\n public void widgetSelected(SelectionEvent e) {\r\n result = new DialogResult<>(SWT.OK, getParamMap());\r\n shell.close();\r\n }\r\n\r\n });\r\n shell.setDefaultButton(btnOK);\r\n\r\n btnCancel = new Button(shell, SWT.NONE);\r\n btnCancel.setFont(SWTResourceManager.getFont(\"Segoe UI\", 11, SWT.NORMAL));\r\n FormData fd_btnCancel = new FormData();\r\n fd_btnCancel.bottom = new FormAttachment(100, -7);\r\n fd_btnCancel.left = new FormAttachment(60, -2);\r\n fd_btnCancel.top = new FormAttachment(100, -35);\r\n fd_btnCancel.right = new FormAttachment(85, -2);\r\n btnCancel.setLayoutData(fd_btnCancel);\r\n btnCancel.setText(\"Cancel\");\r\n btnCancel.addSelectionListener(new SelectionAdapter() {\r\n @Override\r\n public void widgetSelected(SelectionEvent e) {\r\n result = new DialogResult<>(SWT.CANCEL, null);\r\n shell.close();\r\n }\r\n\r\n });\r\n tableParams.redraw();\r\n }", "private void createContents() {\n\t\tshell = new Shell(getParent(), getStyle());\n\t\tshell.setSize(720, 480);\n\t\tshell.setText(\"1FN Normalization\");\n\t\tshell.setLayout(new GridLayout(2, false));\n\t\tcomposite = new Composite(shell, SWT.NONE);\n\t\tcomposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1));\n\t\tcomposite.setLayout(new GridLayout(5, false));\n\t\tlblSeparators = new Label(composite, SWT.NONE);\n\t\tlblSeparators.setText(\"Separators:\");\n\t\tcomposite_1 = new Composite(composite, SWT.NONE);\n\t\tcomposite_1.setLayout(new GridLayout(5, false));\n\t\tcomposite_1.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1));\n\t\tchk1 = new Button(composite_1, SWT.CHECK);\n\t\tchk1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tdochk1widgetSelected(e);\n\t\t\t}\n\t\t});\n\t\tchk1.setSelection(true);\n\t\tchk1.setText(\";\");\n\t\tchk2 = new Button(composite_1, SWT.CHECK);\n\t\tchk2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tdochk2widgetSelected(e);\n\t\t\t}\n\t\t});\n\t\tchk2.setSelection(true);\n\t\tchk2.setText(\"cr\");\n\t\tchk3 = new Button(composite_1, SWT.CHECK);\n\t\tchk3.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tdochk3widgetSelected(e);\n\t\t\t}\n\t\t});\n\t\tchk3.setText(\",\");\n\t\tchk4 = new Button(composite_1, SWT.CHECK);\n\t\tchk4.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tdochk4widgetSelected(e);\n\t\t\t}\n\t\t});\n\t\tchk4.setText(\"space\");\n\t\tchk5 = new Button(composite_1, SWT.CHECK);\n\t\tchk5.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tdochk5widgetSelected(e);\n\t\t\t}\n\t\t});\n\t\tchk5.setText(\".\");\n\t\tnew Label(composite, SWT.NONE);\n\t\tnew Label(composite, SWT.NONE);\n\t\tlblColumn = new Label(composite, SWT.NONE);\n\t\tlblColumn.setLayoutData(new GridData(SWT.RIGHT, SWT.TOP, false, false, 1, 1));\n\t\tlblColumn.setText(\"Column:\");\n\t\tlstColumn = new List(composite, SWT.BORDER | SWT.V_SCROLL | SWT.MULTI);\n\t\tlstColumn.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tdolstColumnwidgetSelected(e);\n\t\t\t}\n\t\t});\n\t\tGridData gd_lstColumn = new GridData(SWT.LEFT, SWT.FILL, false, true, 4, 1);\n\t\tgd_lstColumn.widthHint = 150;\n\t\tgd_lstColumn.heightHint = 80;\n\t\tlstColumn.setLayoutData(gd_lstColumn);\n\t\tlblMethod = new Label(composite, SWT.NONE);\n\t\tlblMethod.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\n\t\tlblMethod.setText(\"Method:\");\n\t\tcheckSingle = new Button(composite, SWT.RADIO);\n\t\tcheckSingle.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tdocheckSinglewidgetSelected(e);\n\t\t\t}\n\t\t});\n\t\tcheckSingle.setText(\"Single Table (Recommended)\");\n\t\tchkMulti = new Button(composite, SWT.RADIO);\n\t\tchkMulti.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tdochkMultiwidgetSelected(e);\n\t\t\t}\n\t\t});\n\t\tchkMulti.setText(\"Multi table\");\n\t\tlblNewTableName = new Label(composite, SWT.NONE);\n\t\tlblNewTableName.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));\n\t\tlblNewTableName.setText(\"New table name: \");\n\t\ttxtNewTableName = new Text(composite, SWT.BORDER);\n\t\ttxtNewTableName.addModifyListener(new ModifyListener() {\n\t\t\tpublic void modifyText(ModifyEvent arg0) {\n\t\t\t\tdotxtNewTableNamemodifyText(arg0);\n\t\t\t}\n\t\t});\n\t\ttxtNewTableName.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\t\tlblActual = new Label(shell, SWT.NONE);\n\t\tlblActual.setText(\"Actual\");\n\t\tlblRefatored = new Label(shell, SWT.NONE);\n\t\tlblRefatored.setText(\"Refator\");\n\t\tmodelEditor1 = new CompModelEditorController(shell, SWT.BORDER, SWT.V_SCROLL | SWT.H_SCROLL);\n\t\tGridData gd_modelEditor1 = new GridData(SWT.LEFT, SWT.FILL, false, false, 1, 1);\n\t\tgd_modelEditor1.widthHint = 250;\n\t\tmodelEditor1.setLayoutData(gd_modelEditor1);\n\t\tmodelEditor2 = new CompModelEditorController(shell, SWT.BORDER, SWT.V_SCROLL | SWT.H_SCROLL);\n\t\tmodelEditor2.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));\n\t\tbtnConfirm = new Button(shell, SWT.NONE);\n\t\tbtnConfirm.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tdobtnConfirmwidgetSelected(e);\n\t\t\t}\n\t\t});\n\t\tbtnConfirm.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 2, 1));\n\t\tbtnConfirm.setText(\"Confirm\");\n\t\ttxtNewTableName.setEnabled(false);\n\t}", "private void createGraphics() {\n\t\toppStatGrid = new GridPane();\n\t\toppStatGrid.setHgap(5);\n\t\tColumnConstraints columnOpp1 = new ColumnConstraints();\n\t\tcolumnOpp1.setMinWidth(gameScene.getWidth()*0.3);\n\t\t//column1.setPrefWidth(gameScene.getWidth()*0.3);\n\t\tColumnConstraints columnOpp2 = new ColumnConstraints();\n\t\tcolumnOpp2.setMinWidth(gameScene.getWidth()*0.3);\n\t\toppStatGrid.getColumnConstraints().addAll(columnOpp1,columnOpp2);\n\t\tRowConstraints rowOpp = new RowConstraints();\n\t\trowOpp.setMinHeight(gameScene.getHeight()*0.1);\n\t\toppStatGrid.getRowConstraints().add(rowOpp);\n\t\toppStatGrid.getRowConstraints().add(rowOpp);\n\n\t\tlocStatGrid = new GridPane();\n\t\tlocStatGrid.setHgap(5);\n\t\tColumnConstraints columnLoc1 = new ColumnConstraints();\n\t\tcolumnLoc1.setMinWidth(gameScene.getWidth()*0.1);\n\t\t//column1.setPrefWidth(gameScene.getWidth()*0.3);\n\t\tColumnConstraints columnLoc2 = new ColumnConstraints();\n\t\tcolumnLoc2.setMinWidth(gameScene.getWidth()*0.3);\n\t\tlocStatGrid.getColumnConstraints().addAll(columnLoc1,columnLoc2);\n\t\tRowConstraints rowLoc2 = new RowConstraints();\n\t\trowLoc2.setMinHeight(gameScene.getHeight()*0.1);\n\t\tlocStatGrid.getRowConstraints().add(rowLoc2);\n\t\tlocStatGrid.getRowConstraints().add(rowLoc2);\n\n\t\topponentName.setFont(Font.font(defaultFont, FontWeight.BOLD, 16));\n\t\tlocalName.setFont(Font.font(defaultFont, FontWeight.BOLD, 16));\n\t\topponentLevel.setFont(Font.font(defaultFont, 14));\n\t\tlocalLevel.setFont(Font.font(defaultFont, 14));\n\t\topponentHealth.setFont(Font.font(defaultFont, 14));\n\t\tlocalHealth.setFont(Font.font(defaultFont, 14));\n\n\t\topponentName.setAlignment(Pos.CENTER_LEFT);\n\t\tGridPane.setHalignment(localName, HPos.RIGHT);\n\t\topponentLevel.setAlignment(Pos.CENTER_RIGHT);\n\t\tlocalLevel.setAlignment(Pos.CENTER_LEFT);\n\t\tGridPane.setHalignment(localLevel, HPos.RIGHT);\n\t\topponentHealth.setAlignment(Pos.CENTER_RIGHT);\n\t\tlocalHealth.setAlignment(Pos.CENTER_LEFT);\n\t\tGridPane.setHalignment(localHealth, HPos.RIGHT);\n\n\t\topponentHealthBar = new Rectangle();\n\t\tlocalHealthBar = new Rectangle();\n\t\topponentHealthBar.setWidth(gameScene.getWidth()*0.3);\n\t\tlocalHealthBar.setWidth(gameScene.getWidth()*0.3);\n\t\topponentHealthBar.setHeight(gameScene.getHeight()*0.1);\n\t\tlocalHealthBar.setHeight(gameScene.getHeight()*0.1);\n\t\topponentHealthBar.setArcWidth(5);\n\t\topponentHealthBar.setArcHeight(5);\n\t\tlocalHealthBar.setArcWidth(5);\n\t\tlocalHealthBar.setArcHeight(5);\n\t\t/*NumberBinding oppHealthBind = gameScene.property\n\t\topponentHealthBar.prop*/\n\n\t\topponentHealthBar.setEffect(new Lighting());\n\t\tlocalHealthBar.setEffect(new Lighting());\n\n\t\topponentHealthBar.setFill(Color.DARKRED);\n\t\tlocalHealthBar.setFill(Color.DARKRED);\n\n\t\toppStatGrid.add(opponentName, 0, 0);\n\t\toppStatGrid.add(opponentLevel, 1, 0);\n\t\toppStatGrid.add(opponentHealthBar, 0, 1);\n\t\toppStatGrid.add(opponentHealth, 1, 1);\n\n\t\tlocStatGrid.add(localLevel, 0, 0);\n\t\tlocStatGrid.add(localName, 1, 0);\n\t\tlocStatGrid.add(localHealthBar, 1, 1);\n\t\tlocStatGrid.add(localHealth, 0, 1);\n\n\t\tAnchorPane.setTopAnchor(oppStatGrid, 10.0);\n\t\tAnchorPane.setLeftAnchor(oppStatGrid, 10.0);\n\n\t\tAnchorPane.setBottomAnchor(locStatGrid, 10.0);\n\t\tAnchorPane.setRightAnchor(locStatGrid, 10.0);\n\n\t\tthis.getChildren().addAll(oppStatGrid,locStatGrid);\n\t\t\n\t\toppPane = new Pane();\n\t\toppPane.setMinWidth(gameScene.getWidth()*0.5);\n\t\toppPane.setMinHeight(gameScene.getHeight()*0.5);\n\t\t\n\t\tlocPane = new Pane();\n\t\tlocPane.setMinWidth(gameScene.getWidth()*0.5);\n\t\tlocPane.setMinHeight(gameScene.getHeight()*0.5);\n\t\t\n\t\tAnchorPane.setBottomAnchor(locPane, 10.0);\n\t\tAnchorPane.setLeftAnchor(locPane, 10.0);\n\t\t\n\t\tAnchorPane.setTopAnchor(oppPane, 10.0);\n\t\tAnchorPane.setRightAnchor(oppPane, 10.0);\n\t\t\n\t\tthis.getChildren().addAll(locPane,oppPane);\n\t\t\n\n\t}", "protected void createLayout() {\n\t\tthis.layout = new GridLayout();\n\t\tthis.layout.numColumns = 2;\n\t\tthis.layout.marginWidth = 2;\n\t\tthis.setLayout(this.layout);\n\t}", "private void setupChessBoard() {\n add(announcementBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(currentGamesBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(chatRoomBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(friendsListBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(leaderboardBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(settingsBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n }", "protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(\"带进度条的表\");\r\n\t\tshell.setLayout(new FillLayout());\r\n\r\n\t\tTable table = new Table(shell, SWT.BORDER);\r\n\t\ttable.setHeaderVisible(true);\r\n\t\ttable.setLinesVisible(true);\r\n\r\n//\t\t两列\r\n\t\tfor (int i = 0; i < 2; i++) {\r\n\t\t\tnew TableColumn(table, SWT.NONE);\r\n\t\t}\r\n\t\ttable.getColumn(0).setText(\"Task\");\r\n\t\ttable.getColumn(1).setText(\"Progress\");\r\n\r\n//\t\t四十行\r\n\t\tfor (int i = 0; i < 40; i++) {\r\n\t\t\tTableItem item = new TableItem(table, SWT.NONE);\r\n\t\t\titem.setText(\"Task \" + i);\r\n//\t\t\t行数为5的倍数时添加进度条\r\n\t\t\tif (i % 5 == 0) {\r\n\t\t\t\tProgressBar bar = new ProgressBar(table, SWT.NONE);\r\n\t\t\t\tbar.setSelection(i); // 进度条显示的百分比\r\n\t\t\t\tTableEditor editor = new TableEditor(table);\r\n\t\t\t\teditor.grabHorizontal = editor.grabVertical = true; // 宽度高度同表格\r\n\t\t\t\teditor.setEditor(bar, item, 1); // 在表格上方显示进度条\r\n\t\t\t}\r\n\t\t}\r\n\t\ttable.getColumn(0).pack();\r\n\t\ttable.getColumn(1).setWidth(128);\r\n\r\n\t\tshell.pack();\r\n\t}", "private void $$$setupUI$$$() {\n rootPanel = new JPanel();\n rootPanel.setLayout(new BorderLayout(0, 0));\n centerPanel = new JPanel();\n centerPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n rootPanel.add(centerPanel, BorderLayout.CENTER);\n final JSplitPane splitPane1 = new JSplitPane();\n splitPane1.setDividerLocation(240);\n splitPane1.setResizeWeight(0.5);\n centerPanel.add(splitPane1, 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 leftPanel = new JPanel();\n leftPanel.setLayout(new BorderLayout(0, 0));\n splitPane1.setLeftComponent(leftPanel);\n final JPanel panel1 = new JPanel();\n panel1.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n leftPanel.add(panel1, BorderLayout.NORTH);\n userListTitle = new JLabel();\n userListTitle.setText(\"在线用户\");\n panel1.add(userListTitle, 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 JPanel panel2 = new JPanel();\n panel2.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n leftPanel.add(panel2, BorderLayout.CENTER);\n JSP_list = new JScrollPane();\n panel2.add(JSP_list, 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 rightPanel = new JPanel();\n rightPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n splitPane1.setRightComponent(rightPanel);\n southPanel = new JPanel();\n southPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n rootPanel.add(southPanel, BorderLayout.SOUTH);\n northPanel = new JPanel();\n northPanel.setLayout(new GridLayoutManager(1, 1, new Insets(0, 0, 0, 0), -1, -1));\n rootPanel.add(northPanel, BorderLayout.NORTH);\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 }", "protected void qPanel_init()\r\n\t{\r\n \tqueryPanel.removeAll();\r\n \t\r\n\t\tGroupLayout layout = new GroupLayout(queryPanel);\r\n\t\tqueryPanel.setLayout(layout);\r\n\t\tlayout.setAutoCreateGaps(true);\r\n\t\tlayout.setAutoCreateContainerGaps(true);\r\n\t\t\r\n\t\tqueryLabel = new JLabel(\"Query Tab\");\r\n\t\t\r\n\t\tDimension size = new Dimension(220,25);\r\n \tbasicTextField = new JTextField(30);\r\n \tbasicTextField.setActionCommand(basicLabelText);\r\n \tbasicTextField.addActionListener(this);\r\n \tbasicTextField.setText(\"*.*\");\r\n \tbasicTextField.setPreferredSize(size);\r\n \tbasicTextField.setMaximumSize(size);\r\n \tbasicTextField.setMinimumSize(size);\r\n\t\t\r\n\t\t\r\n\t\tsize = new Dimension(220,25);\r\n \tqueryTextField = new JTextField(30);\r\n queryTextField.setActionCommand(queryLabelText);\r\n queryTextField.addActionListener(this);\r\n queryTextField.setText(\"*:*\");\r\n queryTextField.setPreferredSize(size);\r\n queryTextField.setMaximumSize(size);\r\n queryTextField.setMinimumSize(size);\r\n \r\n size = new Dimension(100,25);\r\n rowsTextField = new JTextField(10);\r\n rowsTextField.setActionCommand(rowsLabelText);\r\n rowsTextField.addActionListener(this);\r\n rowsTextField.setText(\"10\");\r\n rowsTextField.setPreferredSize(size);\r\n rowsTextField.setMaximumSize(size);\r\n rowsTextField.setMinimumSize(size);\r\n \r\n size = new Dimension(250,150);\r\n interestedUsers=featureMap.getInstance().interestedUsers();\r\n list = new JList<String>(interestedUsers);\r\n list.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);\r\n listSelectionModel = list.getSelectionModel();\r\n listSelectionModel.addListSelectionListener(this);\r\n JScrollPane listPane = new JScrollPane(list);\r\n// list.addListSelectionListener(this);\r\n queryPanel.add(listPane);\r\n \r\n JLabel basicTextFieldLabel = new JLabel(basicLabelText + \":\\n\");\r\n basicTextFieldLabel.setLabelFor(basicTextField);\r\n queryPanel.add(basicTextFieldLabel);\r\n queryPanel.add(basicTextField); \r\n \r\n JLabel queryTextFieldLabel = new JLabel(queryLabelText + \":\\n\");\r\n queryTextFieldLabel.setLabelFor(queryTextField);\r\n queryPanel.add(queryTextFieldLabel);\r\n queryPanel.add(queryTextField);\r\n \r\n JLabel rowsTextFieldLabel = new JLabel(rowsLabelText + \":\\n\");\r\n rowsTextFieldLabel.setLabelFor(rowsTextField);\r\n queryPanel.add(rowsTextFieldLabel);\r\n queryPanel.add(rowsTextField);\r\n \r\n startDate = new JXDatePicker();\r\n endDate = new JXDatePicker();\r\n startDate.setDate(featureMap.getInstance().startDate());\r\n startDate.setFormats(new SimpleDateFormat(\"dd.MM.yyyy\"));\r\n startDate.addActionListener(this);\r\n queryStartDate = startDate.getDate();\r\n \r\n endDate.setDate(Calendar.getInstance().getTime());\r\n endDate.setFormats(new SimpleDateFormat(\"dd.MM.yyyy\"));\r\n endDate.addActionListener(this);\r\n queryEndDate = endDate.getDate();\r\n \r\n JLabel startDateLabel = new JLabel(\"startDate: \\n\");\r\n queryPanel.add(startDateLabel);\r\n queryPanel.add(startDate);\r\n JLabel endDateLabel = new JLabel(\"endDate: \\n\");\r\n queryPanel.add(endDateLabel);\r\n queryPanel.add(endDate);\t\t\r\n \r\n generalButton = new JButton();\r\n generalButton.setVerticalTextPosition(AbstractButton.CENTER);\r\n generalButton.setHorizontalTextPosition(AbstractButton.LEADING); //aka LEFT, for left-to-right locales\r\n generalButton.addActionListener(this);\r\n queryPanel.add(generalButton); \t \r\n \r\n \r\n opt1Button = new JRadioButton();\r\n opt1Button.setSelected(true);\r\n opt1Button.addActionListener(this);\r\n \t\r\n opt2Button = new JRadioButton();\r\n opt2Button.setMnemonic(KeyEvent.VK_F);\r\n opt2Button.setSelected(false);\r\n opt2Button.setActionCommand(\"Frequency\");\r\n opt2Button.addActionListener(this);\r\n \r\n ButtonGroup group = new ButtonGroup();\r\n group.add(opt1Button);\r\n group.add(opt2Button);\r\n \r\n queryPanel.add(opt1Button);\r\n queryPanel.add(opt2Button);\r\n \r\n layout.setHorizontalGroup(\r\n \t\t layout.createSequentialGroup()\r\n \t\t .addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)\r\n \t\t \t\t.addComponent(queryLabel)\r\n \t\t \t\t.addGroup(layout.createSequentialGroup()\r\n \t\t \t\t\t.addGroup(layout.createParallelGroup()\r\n \t\t \t\t\t\t\t.addComponent(basicTextFieldLabel)\r\n \t\t \t\t\t\t\t.addComponent(queryTextFieldLabel)\r\n \t\t \t\t\t\t\t.addComponent(rowsTextFieldLabel)\r\n \t\t \t\t\t\t\t)\r\n \t\t \t\t\t.addGroup(layout.createParallelGroup()\t\r\n \t\t \t\t\t\t\t.addComponent(basicTextField)\r\n \t\t \t\t\t\t\t.addComponent(queryTextField)\r\n \t\t \t\t\t\t\t.addComponent(rowsTextField)\r\n \t\t \t\t\t\t\t.addComponent(opt1Button)\r\n \t\t \t\t\t\t\t.addComponent(opt2Button)\r\n \t\t \t\t\t\t\t.addComponent(generalButton) \t\t \t\t\t\t\t\r\n \t\t \t\t\t\t\t)\r\n \t\t \t\t\t.addGroup(layout.createParallelGroup()\r\n \t\t \t\t\t\t\t.addComponent(startDateLabel)\r\n \t\t \t\t\t\t\t.addComponent(endDateLabel)\r\n \t\t \t\t\t\t\t)\t\t\t\r\n \t\t \t\t\t.addGroup(layout.createParallelGroup()\r\n \t\t \t\t\t\t\t.addComponent(startDate)\r\n \t\t \t\t\t\t\t.addComponent(endDate)\r\n \t\t \t\t\t\t\t)\r\n \t\t \t\t\t.addComponent(listPane)\r\n \t\t \t\t\t)\r\n \t\t \t\t)\r\n \t\t);\r\n \r\n layout.setVerticalGroup(\r\n \t\tlayout.createSequentialGroup()\r\n \t\t\t.addComponent(queryLabel)\r\n \t\t\t.addGroup(layout.createParallelGroup()\r\n \t\t\t\t.addGroup(layout.createSequentialGroup()\r\n \t\t\t\t\t\t.addComponent(basicTextFieldLabel)\r\n \t\t\t\t\t\t.addComponent(queryTextFieldLabel)\r\n \t\t\t\t\t\t.addComponent(rowsTextFieldLabel)\r\n \t\t\t\t\t\t)\r\n \t\t\t\t.addGroup(layout.createSequentialGroup()\r\n \t\t\t\t\t\t.addComponent(basicTextField)\r\n \t\t\t\t\t\t.addComponent(queryTextField)\r\n \t\t\t\t\t\t.addComponent(rowsTextField)\r\n \t\t\t\t\t\t.addComponent(opt1Button)\r\n \t\t\t\t\t\t.addComponent(opt2Button)\r\n \t\t\t\t\t\t.addComponent(generalButton) \t\t\t\t\t\t\r\n \t\t\t\t\t\t)\r\n \t\t\t\t.addGroup(layout.createSequentialGroup()\r\n \t\t\t\t\t\t.addComponent(startDateLabel)\r\n \t\t\t\t\t\t.addComponent(endDateLabel)\r\n \t\t\t\t\t\t)\r\n \t\t\t\t.addGroup(layout.createSequentialGroup()\r\n \t\t\t\t\t\t.addComponent(startDate)\r\n \t\t\t\t\t\t.addComponent(endDate)\r\n \t\t\t\t\t\t)\r\n \t\t\t\t.addComponent(listPane)\r\n \t\t )\r\n \t\t \t//.addComponent(listPane))\r\n \t\t);\r\n \r\n queryPanel_initialized = true;\r\n\t}", "private void setupPanel(String selectedTable)\n\t{\n\t\tthis.setLayout(baseLayout);\n\t\tthis.add(queryButton);\n\t\tint spacing = 50;\n\t\t\n\t\tString [] columns = baseController.getDataController().getDatabaseColumnNames(selectedTable);\n\t\t\n\t\tfor(int spot = 0; spot < columns.length; spot++)\n\t\t{\n\t\t\tif(!columns[spot].equalsIgnoreCase(\"id\"))\n\t\t\t{\t\n\t\t\t\tJLabel columnedLabel = new JLabel(columns[spot]);\n\t\t\t\tJTextField columnFIeld = new JTextField(20);\n\t\t\t\n\t\t\t\tthis.add(columnLabel);\n\t\t\t\tthis.add(columnField);\n\t\t\t\tcolumnField.setName(columns[spot]);\n\t\t\t\t\n\t\t\t\tbaseLayout.putConstraint(SpringLayout.NORTH, queryButton, 122, SpringLayout.NORTH, this);\n\t\t\t\tbaseLayout.putConstraint(SpringLayout.WEST, queryButton, 69, SpringLayout.WEST, columnLabel);\n\t\t\t\t\n\t\t\t\tspacing += 50;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t}", "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 $$$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 $$$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 setupAnnouncements() {\n add(currentGamesBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(chatRoomBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(friendsListBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(leaderboardBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n add(settingsBtn).expandX().width(ChessGame.MENU_WIDTH);\n row();\n }", "private void layoutComponents() {\n\n\t\tsetLayout(new GridBagLayout());\n\n\t\tGridBagConstraints c = new GridBagConstraints();\n\n\t\tc.anchor = GridBagConstraints.CENTER;\n\t\tc.fill = GridBagConstraints.HORIZONTAL;\n\t\tc.weightx = 1;\n\t\tc.weighty = 0.3;\n\t\tc.gridx = 0;\n\t\tc.gridy = 0;\n\t\tadd(titleLabel, c);\n\n\t\tc.fill = GridBagConstraints.BOTH;\n\t\tc.weightx = 1;\n\t\tc.weighty = 0.7;\n\t\tc.gridy++;\n\t\tc.insets = new Insets(0, 25, 25, 25);\n\t\tadd(tableSP, c);\n\n\t}", "void initializeView() {\n displayProjectFilter();\n displayTimeFrameFilter();\n\n setUsersIntoComboBox();\n setClientsIntoComboBox();\n setProjectsIntoComboBox();\n setDateRestrictions();\n setValidators();\n setTable();\n\n selectUser();\n selectClient();\n selectProject();\n listenDatePickerStart();\n listenDatePickerEnd();\n\n removeUserFilter();\n removeProjectFilter();\n removeTimeFrameFilter();\n clearAllFilters();\n\n // this is important for hiding user combo box and stuff\n setUpUserRules();\n\n //vBox.translateXProperty().bind((scrollPane.widthProperty().subtract(vBox.widthProperty())).divide(2));\n scrollPane.widthProperty().addListener((observable, oldValue, newValue) -> {\n if (newValue != null) {\n grid.setPrefWidth(newValue.doubleValue() - (oldValue.doubleValue() - scrollPane.getViewportBounds().getWidth()));\n }\n });\n\n //TODO: Refactor this.\n setUpBarChart();\n tbvTasks.getItems().addListener((ListChangeListener.Change<? extends TaskConcrete2> c) -> {\n setUpBarChart();\n });\n\n setToolTipsForButtons();\n changeTableSize();\n }" ]
[ "0.63404715", "0.6264389", "0.6035254", "0.58990145", "0.5898381", "0.5872382", "0.5861516", "0.5842921", "0.58288693", "0.58217806", "0.58146626", "0.58025587", "0.57508314", "0.5682693", "0.5674435", "0.5662778", "0.56549674", "0.5637848", "0.5631005", "0.55838037", "0.5574955", "0.55741596", "0.55733395", "0.55732614", "0.5567481", "0.5558636", "0.55494034", "0.5543639", "0.5543165", "0.55350924", "0.5527003", "0.5516662", "0.5510332", "0.5507646", "0.55066687", "0.5501595", "0.5501436", "0.54975736", "0.5490936", "0.54744357", "0.5471137", "0.5459468", "0.5458061", "0.545617", "0.5452624", "0.5449123", "0.544798", "0.54388463", "0.54325753", "0.54270804", "0.54175466", "0.5416277", "0.54071885", "0.5404459", "0.5404375", "0.5394992", "0.53939897", "0.5392316", "0.5387476", "0.5379645", "0.5378194", "0.53768533", "0.5371042", "0.5369247", "0.53600293", "0.53589594", "0.5358324", "0.5354276", "0.53500533", "0.53460366", "0.53407705", "0.5340337", "0.5337522", "0.5337258", "0.5334472", "0.5331985", "0.5322997", "0.53215444", "0.5321051", "0.53162086", "0.53135556", "0.5310465", "0.53096056", "0.5306411", "0.53045905", "0.5290115", "0.5285575", "0.52841246", "0.528202", "0.52756363", "0.527492", "0.5272628", "0.5270727", "0.5269304", "0.52664644", "0.5265969", "0.52637726", "0.5261724", "0.52559114", "0.5254829", "0.5248032" ]
0.0
-1
use getStatements for now, hasStatement has a bug and always returns false
protected boolean datasetExists(URI dataset) { return Db.getStatements(dataset, RDF.TYPE, Sparql.namespaced("dcat","Dataset"),true,dataset).size() == 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasStatement();", "boolean getMissingStatement();", "boolean getMissingStatement();", "boolean getMissingStatement();", "boolean getMissingStatement();", "public boolean hasStatement() {\n return statement_ != null;\n }", "boolean getOwnStatement();", "public boolean hasStatement() {\n return statementBuilder_ != null || statement_ != null;\n }", "public boolean hasMultipleStatements() {\n return (sqlStatements != null) && (!sqlStatements.isEmpty());\n }", "Statement getStmt();", "public String getStatement();", "public ReadOnlyIterator<Statement> getAllStatements();", "private boolean isStatement() throws IOException\n\t{\n\t\tboolean isValid = false;\n\t\t\n\t\tif(theCurrentToken == null)\n\t\t\treturn isValid;\n\t\t\n\t\t// Check if return_statement.\n\t\tif(isReturnStatement())\n\t\t{\n\t\t\tisValid = true;\n\t\t}\n\t\telse if(isBuiltInProcedureCall())\n\t\t{\n\t\t\tisValid = true;\n\t\t}\n\t\t// Check if either procedure_call or assignment_statement.\n\t\telse if(theCurrentToken.TokenType == TokenType.IDENTITY)\n\t\t{\n\t\t\ttheCurrentSymbol = theSymbolTable.ReturnSymbolValueForKey((theSymbolTable.SCOPE_KEY + \".\" + theCurrentToken.TokenValue).toString().trim());\n\t\t\t\n\t\t\tif(theCurrentSymbol == null)\n\t\t\t\ttheCurrentSymbol = theSymbolTable.ReturnSymbolValueForKey((theSymbolTable.GLOBAL_SCOPE_KEY + \".\" + theCurrentToken.TokenValue).toString().trim());\n\t\t\t\n\t\t\tupdateToken();\n\t\t\t\n\t\t\t// Check if assignment_statement.\n\t\t\tif(isDestination())\n\t\t\t{\n\t\t\t\tif(theCurrentToken.TokenType == TokenType.ASSIGN)\n\t\t\t\t{\n\t\t\t\t\tupdateToken();\n\t\t\t\t\tif(isExpression())\n\t\t\t\t\t{\n\t\t\t\t\t\tisValid = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Check if procedure_call.\n\t\t\telse if(theCurrentToken.TokenType == TokenType.LEFT_PARENTHESIS)\n\t\t\t{\n\t\t\t\tupdateToken();\n\t\t\t\tif(isProcedureCall())\n\t\t\t\t{\n\t\t\t\t\tisValid = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\ttheCurrentSymbol = null;\n\t\t}\n\t\t// Check if if_statement.\n\t\telse if(isIfStatement())\n\t\t{\n\t\t\tisValid = true;\n\t\t}\n\t\t// Check if for_statement.\n\t\telse if(isForStatement())\n\t\t{\n\t\t\tisValid = true;\n\t\t}\n\t\t\n\t\t// Error handling.\n\t\tif(theCurrentToken.TokenType == TokenType.ERROR)\n\t\t{\n\t\t\t//theLogger.LogScanError(theCurrentToken);\n\t\t\twhile(theNextToken.TokenType != TokenType.SEMICOLON)\n\t\t\t{\n\t\t\t\tupdateToken();\n\t\t\t}\n\t\t\tisValid = true;\n\t\t}\n\t\t\n\t\treturn isValid;\n\t}", "public boolean getMissingStatement() {\n return missingStatement_;\n }", "public boolean getMissingStatement() {\n return missingStatement_;\n }", "public boolean getMissingStatement() {\n return missingStatement_;\n }", "public boolean getMissingStatement() {\n return missingStatement_;\n }", "@Test\r\n\tpublic void testGetStatementsInMultipleContexts()\r\n\t\tthrows Exception\r\n\t{\r\n\t\tURI ur = vf.createURI(\"http://abcd\");\r\n\t\t\r\n\t\t\r\n\t\tCloseableIteration<? extends Statement, RepositoryException> iter1 = testAdminCon.getStatements(null, null, null, false, null);\r\n\r\n\t\ttry {\r\n\t\t\tint count = 0;\r\n\t\t\twhile (iter1.hasNext()) {\r\n\t\t\t\titer1.next();\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t\tassertEquals(\"there should be 0 statements\", 0 , count);\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\titer1.close();\r\n\t\t\titer1 = null;\r\n\t\t}\r\n\t\t\r\n\t\ttestAdminCon.begin();\r\n\t\ttestAdminCon.add(micah, lname, micahlname, dirgraph1);\r\n\t\ttestAdminCon.add(micah, fname, micahfname, dirgraph1);\r\n\t\ttestAdminCon.add(micah, homeTel, micahhomeTel, dirgraph1);\r\n\t\ttestAdminCon.add(dirgraph1, ur, vf.createLiteral(\"test\"));\r\n\t\ttestAdminCon.commit();\r\n\r\n\t\t// get statements with either no context or dirgraph1\r\n\t\tCloseableIteration<? extends Statement, RepositoryException> iter = testAdminCon.getStatements(null, null,\r\n\t\t\t\tnull, false, null , dirgraph1);\r\n\r\n\t\ttry {\r\n\t\t\tint count = 0;\r\n\t\t\twhile (iter.hasNext()) {\r\n\t\t\t\tcount++;\r\n\t\t\t\tStatement st = iter.next();\r\n\t\t\t\tassertThat(st.getContext(), anyOf(is(nullValue(Resource.class)), is(equalTo((Resource)dirgraph1))));\r\n\t\t\t}\r\n\r\n\t\t\tassertEquals(\"there should be four statements\", 4, count);\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\titer.close();\r\n\t\t\titer = null;\r\n\t\t}\r\n\t\t\r\n\t\titer = testAdminCon.getStatements(null, null, null, false, dirgraph1, dirgraph);\r\n\r\n\t\ttry {\r\n\t\t\tint count = 0;\r\n\t\t\twhile (iter.hasNext()) {\r\n\t\t\t\tcount++;\r\n\t\t\t\tStatement st = iter.next();\r\n\t\t\t\tassertThat(st.getContext(), is(equalTo((Resource)dirgraph1)));\r\n\t\t\t}\r\n\t\t\tassertEquals(\"there should be three statements\", 3 , count);\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\titer.close();\r\n\t\t\titer = null;\r\n\t\t}\r\n\t\t\r\n\r\n\t\t// get all statements with unknownContext or context2.\r\n\t\tURI unknownContext = testAdminCon.getValueFactory().createURI(\"http://unknownContext\");\r\n\t\titer = testAdminCon.getStatements(null, null, null, false, unknownContext, dirgraph1);\r\n\r\n\t\ttry {\r\n\t\t\tint count = 0;\r\n\t\t\twhile (iter.hasNext()) {\r\n\t\t\t\tStatement st = iter.next();\r\n\t\t\t\tcount++;\r\n\t\t\t\tassertThat(st.getContext(), is(equalTo((Resource)dirgraph1)));\r\n\t\t\t}\r\n\t\t\tassertEquals(\"there should be three statements\", 3, count);\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\titer.close();\r\n\t\t\titer = null;\r\n\t\t}\r\n\r\n\t\t// add statements to dirgraph\r\n\t\ttry{\r\n\t\t\ttestAdminCon.begin();\r\n\t\t\ttestAdminCon.add(john, fname, johnfname, dirgraph);\r\n\t\t\ttestAdminCon.add(john, lname, johnlname, dirgraph);\r\n\t\t\ttestAdminCon.add(john, homeTel, johnhomeTel, dirgraph);\r\n\t\t\ttestAdminCon.commit();\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t}\r\n\t\tfinally{\r\n\t\t\tif(testAdminCon.isActive())\r\n\t\t\t\ttestAdminCon.rollback();\r\n\t\t}\r\n\t\t\t\r\n\t\t// get statements with either no context or dirgraph\r\n\t\titer = testAdminCon.getStatements(null, null, null, false, null, dirgraph);\r\n\t\ttry {\r\n\t\t\tassertThat(iter, is(notNullValue()));\r\n\t\t\tassertThat(iter.hasNext(), is(equalTo(true)));\r\n\t\t\tint count = 0;\r\n\t\t\twhile (iter.hasNext()) {\r\n\t\t\t\tcount++;\r\n\t\t\t\tStatement st = iter.next();\r\n\t\t\t\tassertThat(st.getContext(), anyOf(is(nullValue(Resource.class)), is(equalTo((Resource)dirgraph)) ));\r\n\t\t\t}\r\n\t\t\tassertEquals(\"there should be four statements\", 4, count);\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\titer.close();\r\n\t\t\titer = null;\r\n\t\t}\r\n\t\t\r\n\t\t// get all statements with dirgraph or dirgraph1\r\n\t\titer = testAdminCon.getStatements(null, null, null, false, null, dirgraph, dirgraph1);\r\n\r\n\t\ttry {\r\n\t\t\tint count = 0;\r\n\t\t\twhile (iter.hasNext()) {\r\n\t\t\t\tcount++;\r\n\t\t\t\tStatement st = iter.next();\r\n\t\t\t\tassertThat(st.getContext(),\r\n\t\t\t\t\t\tanyOf(is(nullValue(Resource.class)),is(equalTo((Resource)dirgraph)), is(equalTo((Resource)dirgraph1))));\r\n\t\t\t}\r\n\t\t\tassertEquals(\"there should be 7 statements\", 7, count);\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\titer.close();\r\n\t\t\titer = null;\r\n\t\t}\r\n\r\n\t\t// get all statements with dirgraph or dirgraph1\r\n\t\titer = testAdminCon.getStatements(null, null, null, false, dirgraph, dirgraph1);\r\n\r\n\t\ttry {\r\n\t\t\tint count = 0;\r\n\t\t\twhile (iter.hasNext()) {\r\n\t\t\t\tcount++;\r\n\t\t\t\tStatement st = iter.next();\r\n\t\t\t\tassertThat(st.getContext(),\r\n\t\t\t\t\t\tanyOf(is(equalTo((Resource)dirgraph)), is(equalTo((Resource)dirgraph1))));\r\n\t\t\t}\r\n\t\t\tassertEquals(\"there should be 6 statements\", 6, count);\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\titer.close();\r\n\t\t\titer = null;\r\n\t\t}\r\n\t\t\r\n}", "public boolean getMissingStatement() {\n return missingStatement_;\n }", "public boolean getMissingStatement() {\n return missingStatement_;\n }", "public boolean getMissingStatement() {\n return missingStatement_;\n }", "public boolean getMissingStatement() {\n return missingStatement_;\n }", "private boolean compareStatements(com.hp.hpl.jena.rdf.model.Statement stmt1,com.hp.hpl.jena.rdf.model.Statement stmt2) {\n if (!stmt1.getSubject().toString().equals(stmt2.getSubject().toString()))\n return false;\n else if (!stmt1.getObject().toString().equals(stmt2.getObject().toString()))\n return false;\n else if (!stmt1.getPredicate().toString().equals(stmt2.getPredicate().toString()))\n return false;\n else\n return true;\n }", "StatementsPackage getStatementsPackage();", "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 ParametricStatement[] getStatements() {\n try {\n return (ParametricStatement[])_type.getDeclaredField(STATEMENT_FIELD_NAME).get(null);\n } catch (Exception x) {\n throw new RuntimeException(\"Unexpected CRUD class error\", x);\n }\n }", "@Override\n\tprotected String findStatement() {\n\t\treturn null;\n\t}", "public List<Statement> getStatements() {\n\t\treturn new ArrayList<Statement>(statements);\n\t}", "final public SqlStatement ScriptStatement() throws ParseException {SqlStatement st = null;\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case USE:\n case CREATE:\n case DROP:\n case SET:\n case INSERT:\n case ALTER:\n case LOCK:\n case UNLOCK:\n case START:\n case COMMIT:\n case 117:{\n st = Statement();\n jj_consume_token(117);\n break;\n }\n case 0:{\n jj_consume_token(0);\n break;\n }\n default:\n jj_la1[1] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\nreturn st;\n}", "public List<String> parse() {\n String line = null;\n int lineCounter = 0;\n StringBuilder statement = new StringBuilder();\n List<String> statements = new LinkedList<String>();\n Pattern commentPattern = Pattern.compile(\"(//|#|--)+.*$\");\n try {\n while ((line = reader.readLine()) != null) {\n lineCounter++;\n //strip comment up to the first non-comment\n Matcher m = commentPattern.matcher(line);\n if (m.find()) {\n line = line.substring(0, m.start());\n }\n\n //remove leading and trailing whitespace\n\n statement.append(\" \");\n line = statement.append(line).toString();\n line = line.replaceAll(\"\\\\s+\", \" \");\n line = line.trim();\n\n //split by ;\n //Note: possible problems with ; in ''\n String[] tokens = line.split(\";\");\n\n //trim the tokens (no leading or trailing whitespace\n for (int i = 0; i < tokens.length; i++) {\n tokens[i] = tokens[i].trim();\n }\n\n boolean containsSemicolon = line.contains(\";\");\n boolean endsWithSemicolon = line.endsWith(\";\");\n if (!containsSemicolon) {\n //statement is still open, do nothing\n continue;\n }\n if (tokens.length == 1 && endsWithSemicolon) {\n //statement is complete, semicolon at the end.\n statements.add(tokens[0]);\n statement = new StringBuilder();\n continue;\n\n }\n // other cases must have more than 1 token \n //iterate over tokens (but the last one)\n for (int i = 0; i < tokens.length - 1; i++) {\n statements.add(tokens[0]);\n statement = new StringBuilder();\n }\n //last statement may remain open:\n if (endsWithSemicolon) {\n statements.add(tokens[0]);\n statement = new StringBuilder();\n } else {\n statement = new StringBuilder();\n statement.append(tokens[tokens.length - 1]);\n }\n }\n if (statement != null && statement.toString().trim().length() > 0)\n throw new UnclosedStatementException(\"Statement is not closed until the end of the file.\");\n } catch (IOException e) {\n logger.warn(\"An error occurred!\", e);\n } finally {\n try {\n reader.close();\n } catch (IOException e) {\n logger.warn(\"An error occurred!\", e);\n }\n }\n return statements;\n }", "public String getStatement()\n {\n return _statement;\n }", "public boolean isSetVerStmt()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(VERSTMT$22) != 0;\n }\n }", "private boolean peekStatement() {\n return peekSourceElement();\n }", "public ContextNodeStatement getStatement();", "private boolean checkExclusiveStatements(Statement... statements) throws ASTVisitorException{\n for(Statement st : statements){\n HasReturnASTVisitor visitor = new HasReturnASTVisitor();\n st.accept(visitor);\n\n if(!visitor.containsReturn())\n return false;\n }\n return true;\n }", "@Test\r\n\tpublic void testGetStatementsInSingleContext()\r\n\t\tthrows Exception\r\n\t{\r\n\t\ttry{\r\n\t\t\ttestAdminCon.begin();\r\n\t\t\ttestAdminCon.add(micah, lname, micahlname, dirgraph1);\r\n\t\t\ttestAdminCon.add(micah, fname, micahfname, dirgraph1);\r\n\t\t\ttestAdminCon.add(micah, homeTel, micahhomeTel, dirgraph1);\r\n\t\t\t\r\n\t\t\ttestAdminCon.add(john, fname, johnfname,dirgraph);\r\n\t\t\ttestAdminCon.add(john, lname, johnlname,dirgraph);\r\n\t\t\ttestAdminCon.add(john, homeTel, johnhomeTel,dirgraph);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tAssert.assertEquals(\"Size of dirgraph1 must be 3\",3, testAdminCon.size(dirgraph1));\r\n\t\t\tAssert.assertEquals(\"Size of unknown context must be 0\",0L, testAdminCon.size(vf.createURI(\":asd\")));\r\n\t\t\tAssert.assertEquals(\"Size of dirgraph must be 3\",3, testAdminCon.size(dirgraph));\t\r\n\t\t\tAssert.assertEquals(\"Size of repository must be 6\",6, testAdminCon.size());\r\n\t\t\tAssert.assertEquals(\"Size of repository must be 6\",6, testAdminCon.size(dirgraph,dirgraph1,null));\r\n\t\t\tAssert.assertEquals(\"Size of repository must be 6\",6, testAdminCon.size(dirgraph,dirgraph1));\r\n\t\t\tAssert.assertEquals(\"Size of repository must be 3\",3, testAdminCon.size(dirgraph,null));\r\n\t\t\tAssert.assertEquals(\"Size of repository must be 3\",3, testAdminCon.size(dirgraph1,null));\r\n\t\t\tAssert.assertEquals(\"Size of default graph must be 0\",0, testAdminCon.size(null));\r\n\t\t\t\r\n\t\t\t\r\n\t\t\ttestAdminCon.add(dirgraph, vf.createURI(\"http://TYPE\"), vf.createLiteral(\"Directory Graph\"));\r\n\t\t\tAssert.assertEquals(\"Size of default graph must be 1\",1, testAdminCon.size((Resource)null));\r\n\t\t\tAssert.assertEquals(\"Size of repository must be 4\",4, testAdminCon.size(dirgraph,null));\r\n\t\t\ttestAdminCon.commit();\t\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\t\r\n\t\t}\r\n\t\tfinally{\r\n\t\t\tif (testAdminCon.isActive())\r\n\t\t\t\ttestAdminCon.rollback();\r\n\t\t}\r\n\t\tAssert.assertEquals(\"Size of repository must be 4\",4, testAdminCon.size(dirgraph1,null));\r\n\t\tAssert.assertEquals(1, testAdminCon.size(null));\r\n\t\tAssert.assertEquals(1, testAdminCon.size(null, null));\r\n\t\tAssert.assertEquals(3, testAdminCon.size(dirgraph, dirgraph));\r\n\t\t\r\n\t\r\n\t\tassertTrue(\"Repository should contain statement\", testAdminCon.hasStatement(john, homeTel, johnhomeTel, false));\r\n\t\tassertTrue(\"Repository should contain statement in dirgraph1\",\r\n\t\t\t\ttestAdminCon.hasStatement(micah, lname, micahlname, false, dirgraph1));\r\n\t\tassertFalse(\"Repository should not contain statement in context2\",\r\n\t\t\t\ttestAdminCon.hasStatement(micah, lname, micahlname, false, dirgraph));\r\n\r\n\t\t// Check handling of getStatements without context IDs\r\n\t\tRepositoryResult<Statement> result = testAdminCon.getStatements(micah, lname, null, false);\r\n\t\ttry {\r\n\t\t\twhile (result.hasNext()) {\r\n\t\t\t\tStatement st = result.next();\r\n\t\t\t\tassertThat(st.getSubject(), is(equalTo((Resource)micah)));\r\n\t\t\t\tassertThat(st.getPredicate(), is(equalTo(lname)));\r\n\t\t\t\tassertThat(st.getObject(), is(equalTo((Value)micahlname)));\r\n\t\t\t\tassertThat(st.getContext(), is(equalTo((Resource)dirgraph1)));\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\r\n\t\t// Check handling of getStatements with a known context ID\r\n\t\tresult = testAdminCon.getStatements(null, null, null, false, dirgraph);\r\n\t\ttry {\r\n\t\t\twhile (result.hasNext()) {\r\n\t\t\t\tStatement st = result.next();\r\n\t\t\t\tassertThat(st.getContext(), is(equalTo((Resource)dirgraph)));\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\t\r\n\t\t// Check handling of getStatements with null context\r\n\t\tresult = testAdminCon.getStatements(null, null, null, false, null);\r\n\t\tassertThat(result, is(notNullValue()));\r\n\t\ttry {\r\n\t\t\twhile (result.hasNext()) {\r\n\t\t\t\tStatement st = result.next();\r\n\t\t\t\tassertThat(st.getContext(), is(equalTo((Resource)null)));\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\t\r\n\t\t// Check handling of getStatements with an unknown context ID\r\n\t\tresult = testAdminCon.getStatements(null, null, null, false, vf.createURI(\":unknownContext\"));\r\n\t\ttry {\r\n\t\t\tassertThat(result, is(notNullValue()));\r\n\t\t\tassertThat(result.hasNext(), is(equalTo(false)));\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tresult.close();\r\n\t\t}\r\n\r\n\t\tList<Statement> list = Iterations.addAll(testAdminCon.getStatements(null, lname, null, false, dirgraph1),\r\n\t\t\t\tnew ArrayList<Statement>());\r\n\t\tassertNotNull(\"List should not be null\", list);\r\n\t\tassertFalse(\"List should not be empty\", list.isEmpty());\r\n\t\t\r\n\t\tList<Statement> list1 = Iterations.addAll(testAdminCon.getStatements(dirgraph, null, null, false, null),\r\n\t\t\t\tnew ArrayList<Statement>());\r\n\t\tassertNotNull(\"List should not be null\", list1);\r\n\t\tassertFalse(\"List should not be empty\", list1.isEmpty());\r\n\t\t\r\n\t}", "final public SqlStatement Statement() throws ParseException {SqlStatement st = null;\n switch ((jj_ntk==-1)?jj_ntk_f():jj_ntk) {\n case USE:{\n st = UseStatement();\n break;\n }\n case SET:{\n st = SetVariableStatement();\n break;\n }\n case CREATE:{\n st = CreateStatement();\n break;\n }\n case ALTER:{\n st = AlterStatement();\n break;\n }\n case DROP:{\n st = DropStatement();\n break;\n }\n case INSERT:{\n st = InsertStatement();\n break;\n }\n case LOCK:{\n st = LockTablesStatement();\n break;\n }\n case UNLOCK:{\n st = UnlockTablesStatement();\n break;\n }\n case START:{\n st = StartTransactionStatement();\n break;\n }\n case COMMIT:{\n st = CommitTransactionStatement();\n break;\n }\n default:\n jj_la1[2] = jj_gen;\nst = new EmptyStatement();\n }\nreturn st;\n}", "public boolean getOwnStatement() {\n return ownStatement_;\n }", "static boolean checkStatement() {\r\n\r\n // ID\r\n if (token.equals(\"IDENTIFIER\")) {\r\n lex();\r\n\r\n // ID EQUALS\r\n if (token.equals(\"EQUALS\")) {\r\n lex();\r\n\r\n // ID EQUALS term\r\n if (checkTerm()) {\r\n\r\n if (token.equals(\"END\")) {\r\n return true;\r\n }\r\n\r\n // ID EQUALS term statement\r\n else if (checkStatement()) {\r\n\r\n if (token.equals(\"END\")) {\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n // if\r\n if (token.equals(\"IF\")) {\r\n lex();\r\n\r\n // if (\r\n if (token.equals(\"LEFT_PAREN\")) {\r\n lex();\r\n\r\n // if ( expr\r\n if(checkExpression()) {\r\n\r\n // if ( expr )\r\n if(token.equals(\"RIGHT_PAREN\")) {\r\n lex();\r\n\r\n // if ( expr ) statement\r\n if (checkStatement() && token.equals(\"END\")) {\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return false;\r\n }", "public Table getStatementsTable(){\n\t\treturn m_statements;\n\t}", "protected void scanStatements() {\n\t\tmakToStatementMap = scanStructuredBlocks(\r\n\t\t\t\tbldInfView.makToStatementMap, statementToMakMap, \r\n\t\t\t\tbldInfView.getMakMakeReferences(), IASTBldInfPrjMmpfilesBlockStatement.class,\r\n\t\t\t\tnew MakListConverter(bldInfView, BldInfView.PRJ_MMPFILES_KEYWORD));\r\n\t\ttestMakToStatementMap = scanStructuredBlocks(\r\n\t\t\t\tbldInfView.testMakToStatementMap, statementToTestMakMap, \r\n\t\t\t\tbldInfView.getTestMakMakeReferences(), IASTBldInfPrjMmpfilesBlockStatement.class,\r\n\t\t\t\tnew MakListConverter(bldInfView, BldInfView.PRJ_TESTMMPFILES_KEYWORD));\r\n\t\texportToStatementMap = scanStructuredBlocks(\r\n\t\t\t\tbldInfView.exportToStatementMap, statementToExportMap, \r\n\t\t\t\tbldInfView.getExports(), IASTBldInfPrjExportsBlockStatement.class,\r\n\t\t\t\tnew ExportListConverter(bldInfView, BldInfView.PRJ_EXPORTS_KEYWORD));\r\n\t\ttestExportToStatementMap = scanStructuredBlocks(\r\n\t\t\t\tbldInfView.testExportToStatementMap, statementToTestExportMap, \r\n\t\t\t\tbldInfView.getTestExports(), IASTBldInfPrjExportsBlockStatement.class,\r\n\t\t\t\tnew ExportListConverter(bldInfView, BldInfView.PRJ_TESTEXPORTS_KEYWORD));\r\n\t\textensionToStatementMap = scanStructuredBlocks(\r\n\t\t\t\tbldInfView.extensionToStatementMap, statementToExtensionsMap, \r\n\t\t\t\tbldInfView.getExtensions(), IASTBldInfPrjExtensionsBlockStatement.class,\r\n\t\t\t\tnew ExtensionListConverter(bldInfView, BldInfView.PRJ_EXTENSIONS_KEYWORD));\r\n\t\ttestExtensionToStatementMap = scanStructuredBlocks(\r\n\t\t\t\tbldInfView.testExtensionToStatementMap, statementToTestExtensionsMap, \r\n\t\t\t\tbldInfView.getTestExtensions(), IASTBldInfPrjExtensionsBlockStatement.class,\r\n\t\t\t\tnew ExtensionListConverter(bldInfView, BldInfView.PRJ_TESTEXTENSIONS_KEYWORD));\r\n\t}", "public String getStatement(){\n return this.statement;\n }", "private boolean isValidStatement(WikibaseStatement statement) {\n return statement.getTypes().contains(Wikidata.STATEMENT) ||\n statement.isSomeValue();\n }", "@Override\n\tprotected String findAllStatement() {\n\t\treturn null;\n\t}", "public static boolean statement(FileInputStream f) {\n if(observer != null){\n observer.parser.setCurrentRule(\"statement\",true);\n }\n \n CToken t = new CToken();\n \n if (assignment(f) || whileLoop(f) || ifStatement(f) || returnStatement(f)) {\n if(observer != null){\n observer.parser.setCurrentRule(\"statement\", false);\n }\n return true;\n }\n else if (expression(f)) {\n if(observer != null){\n observer.parser.setCurrentRule(\"statement\",true);\n }\n t = getUsePeek(f);\n\n if (!t.token.equals(\";\")) {\n System.err.format(\"Syntax Error: In rule Statement unexpected token \\\"%s\\\" of type %s on line %d.\\n\", t.token, t.type, t.lineNum);\n System.exit(0);\n }\n if(observer != null){\n observer.parser.setCurrentRule(\"statement\", false);\n }\n return true;\n } //(Expression ;)\n if(observer != null){\n observer.parser.setCurrentRule(\"statement\", false);\n }\n return false;\n }", "long getExecutedStatementsCount();", "public boolean getOwnStatement() {\n return ownStatement_;\n }", "org.apache.calcite.avatica.proto.Common.StatementHandle getStatement();", "public long getAllStatementCount();", "private Stmt stmt(){\n \n switch(lexer.token){\n case IDENT:\n \n if (symbolTable.get(lexer.getStringValue()) instanceof Procedure) \n return procedureCall();\n \n //can´t be a function\n else if (symbolTable.get(lexer.getStringValue()) instanceof Function)\n lexer.error(\"Function was expected \\n\");\n \n //assignstmt\n else \n return assignstmt();\n \n case BEGIN:\n return cmpstmt();\n case IF:\n return ifstmt();\n case WHILE:\n return whilestmt();\n case WRITE:\n return writestmt();\n case WRITELN:\n return writelnstmt();\n case READ:\n return readstmt();\n case RETURN:\n return returnStmt();\n default:\n lexer.error(\"missing statment\\n\");\n }\n \n return null;\n }", "@Override\n public boolean hasPreparedStatement() {\n return true;\n }", "public String getStatement() {\r\n\t\treturn statement;\r\n\t}", "public boolean ifPeekIsStmt() {\n\t\tif (ifPeek(\"IF_\")) {\n\t\t\treturn true;\n\t\t}\n\t\tif (ifPeek(\"WHILE_\")) {\n\t\t\treturn true;\n\t\t}\n\t\tif (ifPeek(\"FOR_\")) {\n\t\t\treturn true;\n\t\t}\n\t\t// **************\n\t\t// TODO\n\t\tif (ifPeek(\"ID_\")) {\n\t\t\treturn true;\n\t\t}\n\t\t// ***************\n\t\tif (ifPeek(\"RETURN_\")) {\n\t\t\treturn true;\n\t\t}\n\t\tif (ifPeek(\"BREAK_\")) {\n\t\t\treturn true;\n\t\t}\n\t\tif (ifPeek(\"CONT_\")) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "Statement createStatement();", "Statement createStatement();", "Statement createStatement();", "public ArrayList<ESqlStatementType> getEnabledStatements() {\r\n return enabledStatements;\r\n }", "protected CloseableIteration<BindingSet, QueryEvaluationException> handleStatementSourcePatternCheck(\n\t\t\tBindingSet bindings) throws RepositoryException, MalformedQueryException, QueryEvaluationException {\n\t\tfor (StatementSource source : statementSources) {\n\t\t\tEndpoint ownedEndpoint = queryInfo.getFederationContext()\n\t\t\t\t\t.getEndpointManager()\n\t\t\t\t\t.getEndpoint(source.getEndpointID());\n\t\t\tTripleSource t = ownedEndpoint.getTripleSource();\n\t\t\tif (t.hasStatements(this, bindings, queryInfo, queryInfo.getDataset())) {\n\t\t\t\treturn new SingleBindingSetIteration(bindings);\n\t\t\t}\n\t\t}\n\n\t\treturn new EmptyIteration<>();\n\t}", "public boolean dmlStatement(String statement) {\n\n DBConnection dbc = new DBConnection();\n if (!dbc.isConnected()) {\n // connection to DB failed\n this.status = \"connection failed\";\n return false;\n }\n // connection to DB\n Connection conn = dbc.getDbConnect();\n // select statement\n Statement stmt = null;\n try {\n //run DML (update/insert/delete)\n stmt = conn.createStatement();\n stmt.executeUpdate(statement);\n stmt.close();\n conn.close();\n dbc = null;\n this.status = \"\";\n } catch (SQLException e) {\n //e.printStackTrace();\n // sql error\n dbc = null;\n return false;\n }\n\n return true;\n }", "private ParseTree parseStatement() {\n return parseSourceElement();\n }", "public boolean isStatementQueryMechanism() {\n return true;\n }", "private int getStatementCount(OntModel ontModel) {\n int count = 0;\n for (Iterator it = ontModel.listStatements(); it.hasNext(); it.next()) {\n count++;\n }\n return count;\n }", "boolean hasInsert();", "public boolean calcMatchingSourceStmts (JBLine blineref)\n\t{\n\t\treturn this.stmtIndex.size() == blineref.stmtIndex.size();\n\t}", "private boolean peekStatementStandard() {\n switch (peekType()) {\n case OPEN_CURLY:\n case VAR:\n case CONST:\n case SEMI_COLON:\n case IF:\n case DO:\n case WHILE:\n case FOR:\n case CONTINUE:\n case BREAK:\n case RETURN:\n case WITH:\n case SWITCH:\n case THROW:\n case TRY:\n case DEBUGGER:\n case YIELD:\n case IDENTIFIER:\n case TYPE:\n case DECLARE:\n case MODULE:\n case NAMESPACE:\n case THIS:\n case CLASS:\n case SUPER:\n case NUMBER:\n case BIGINT:\n case STRING:\n case NO_SUBSTITUTION_TEMPLATE:\n case TEMPLATE_HEAD:\n case NULL:\n case TRUE:\n case SLASH: // regular expression literal\n case SLASH_EQUAL: // regular expression literal\n case FALSE:\n case OPEN_SQUARE:\n case OPEN_PAREN:\n case NEW:\n case DELETE:\n case VOID:\n case TYPEOF:\n case PLUS_PLUS:\n case MINUS_MINUS:\n case PLUS:\n case MINUS:\n case TILDE:\n case BANG:\n case IMPORT:\n return true;\n default:\n return false;\n }\n }", "public Vector getSQLStatements() {\n if (sqlStatements == null) {\n sqlStatements = oracle.toplink.essentials.internal.helper.NonSynchronizedVector.newInstance(3);\n }\n return sqlStatements;\n }", "public LinkedList<Tuple> getStatementList(){\n\t\tsynchronized(statementList){\n\t\t\tLinkedList<Tuple> statementsListCopy = new LinkedList<Tuple>();\n\t\t\tstatementsListCopy.addAll(statementList);\n\t\t\treturn statementsListCopy;\n\t\t}\n\t}", "public abstract Statement queryToRetrieveData();", "boolean isSQL();", "public Statement getStatement(){\n \n try{\n \n return this.connection.createStatement();\n \n }catch(SQLException e){\n \n System.out.println(e.getMessage());\n return null;\n \n }\n \n }", "public boolean parse()\n\t{\n\t\tif (m_sqlOriginal == null || m_sqlOriginal.length() == 0)\n\t\t\tthrow new IllegalArgumentException(\"No SQL\");\n\t\t//\n\t//\tif (CLogMgt.isLevelFinest())\n\t//\t\tlog.fine(m_sqlOriginal);\n\t\tgetSelectStatements();\n\t\t//\tanalyse each select\t\n\t\tfor (int i = 0; i < m_sql.length; i++)\n\t\t{\t\n\t\t\tTableInfo[] info = getTableInfo(m_sql[i].trim());\n\t\t\tm_tableInfo.add(info);\n\t\t}\n\t\t//\n\t\tif (CLogMgt.isLevelFinest())\n\t\t\tlog.fine(toString());\n\t\treturn m_tableInfo.size() > 0;\n\t}", "boolean execute();", "@Test(timeout = 4000)\n public void test006() throws Throwable {\n SimpleResultSet simpleResultSet0 = new SimpleResultSet();\n Statement statement0 = DBUtil.getStatement(simpleResultSet0);\n assertNull(statement0);\n }", "@Test\r\n\tpublic void testPrepareGraphQuery3() throws Exception\r\n\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\r\n\t\ttestWriterCon.add(st1);\r\n\t\ttestWriterCon.add(st2);\r\n\t\ttestWriterCon.add(st3);\r\n\t\ttestWriterCon.add(st4);\r\n\t\ttestWriterCon.add(st5);\r\n\t\ttestWriterCon.add(st6);\r\n\t\ttestWriterCon.add(st7);\r\n\t\ttestWriterCon.add(st8);\r\n\t\ttestWriterCon.add(st9);\r\n\t\ttestWriterCon.add(st10);\r\n\t\t\r\n\t\tAssert.assertTrue(testWriterCon.hasStatement(st1, false));\r\n\t\tAssert.assertFalse(testWriterCon.hasStatement(st1, false, (Resource)null));\r\n\t\tAssert.assertFalse(testWriterCon.hasStatement(st1, false, null));\r\n\t\tAssert.assertTrue(testWriterCon.hasStatement(st1, false, dirgraph));\r\n\t\t\r\n\t\t\r\n\t\tAssert.assertEquals(10, testAdminCon.size(dirgraph));\t\t\r\n\t\t\t\r\n\t\tString query = \" DESCRIBE <http://marklogicsparql.com/addressbook#firstName> \";\r\n\t\tGraphQuery queryObj = testReaderCon.prepareGraphQuery(query);\r\n\t\t\t\r\n\t\tGraphQueryResult result = queryObj.evaluate();\r\n\t\tresult.hasNext();\r\n\t\ttry {\r\n\t\t\tassertThat(result, is(notNullValue()));\r\n\t\t\tassertThat(result.hasNext(), is(equalTo(false)));\r\n\t\t}\r\n\t\tfinally {\r\n\t\t\tresult.close();\r\n\t\t}\r\n\t}", "public StmtIterator listStatements() {\n \t\treturn new NamedGraphStatementIterator(super.listStatements(), this);\n \t}", "public Stmt getStmt() {\n return this.stmt;\n }", "public StatementElements getStatementAccess() {\n\t\treturn (pStatement != null) ? pStatement : (pStatement = new StatementElements());\n\t}", "boolean hasExecution();", "@Nonnull\n @JsonProperty(PROP_STATEMENTS)\n public List<Statement> getStatements() {\n return _statements;\n }", "public static void checkSingleLineStatements(File file){\n Scanner scanner = getScanner(file);\n String currentLine = scanner.nextLine();\n int lineCounter = 1;\n\n if(currentLine.startsWith(\"/*\")) {\n while (!currentLine.trim().startsWith(\"*/\")) {\n currentLine = scanner.nextLine();\n lineCounter++;\n }\n }\n\n while (scanner.hasNext()) {\n currentLine = scanner.nextLine();\n lineCounter++;\n if(currentLine.contains(\";\")) {\n int i = currentLine.indexOf(\";\");\n if (currentLine.substring(i + 1).contains(\";\") && !currentLine.trim().startsWith(\"for\")) {\n singleLineStatementErrors.add(lineCounter);\n }\n }\n }\n scanner.close();\n }", "private void parseStatement() {\n switch (nextToken.kind) {\n case Token.IDENT:\n parseSimpleStatement();\n break;\n case Token.IF:\n parseIfStatement();\n break;\n case Token.WHILE:\n parseWhileStatement();\n break;\n case Token.RETURN:\n parseReturnStatement();\n break;\n case Token.READ:\n parseReadStatement();\n break;\n case Token.PRINT:\n parsePrintStatement();\n break;\n case Token.LBRACE:\n parseBlock();\n break;\n case Token.SEMICOLON:\n check(Token.SEMICOLON);\n break;\n default:\n error(\"Illegal start of statement: \" + nextToken.kind);\n }\n }", "public Collection<Stmt> getLoopExits() {\r\n\t\tif (loopExists == null) {\r\n\t\t\tloopExists = new HashSet<Stmt>();\r\n\t\t\tfor (Stmt s : loopStatements) {\r\n\t\t\t\tfor (Unit succ : g.getSuccsOf(s)) {\r\n\t\t\t\t\tif (!loopStatements.contains(succ)) {\r\n\t\t\t\t\t\tloopExists.add(s);\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 loopExists;\r\n\t}", "public Statement getStatement() throws SQLException {\n\n try {\n debugCodeCall(\"getStatement\");\n checkClosed();\n if (closeStatement) {\n // if the result set was opened by a DatabaseMetaData call\n return null;\n }\n return stat;\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "public final SQLStatement getStatement(String statementName) {\n\t\tSQLStatement statement = (SQLStatement) this.statements\n\t\t\t\t.get(statementName);\n\t\tif (statement == null) {\n\t\t\tstatement = (SQLStatement) globalStatements.get(statementName);\n\t\t\tif (statement == null) {\n\t\t\t\tthrow new IllegalArgumentException(i18n.getString(\n\t\t\t\t\t\t\"couldntFindStat\", statementName));\n\t\t\t}\n\t\t}\n\t\treturn statement;\n\t}", "public int getStatementCount() {\n return this.statementCount;\n }", "PreparedStatement getQueryStatement(String statement) throws SQLException {\n // This will prepare the statement *every time* because queryString never equals the statement.\n // Can we just rely on the fact that the JDBC driver will optimize that out of the way?\n if (queryStatement == null || !queryString.equals(statement)) {\n JdbcUtil.closeQuietly(queryStatement);\n queryStatement = prepareStatement(sqlConnection, prepareStringStatement(statement));\n }\n return queryStatement;\n }", "@Transactional(readOnly=true)\n\tpublic List<StatementInfo> getStatementsUsingStatement(final String statementId)\n\t\t\tthrows DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {\n checkForNullOrEmptyParameter(statementId, \"statementId\");\n\n\t\tStatement statement = statementDao.fetch(Statement.class, statementId);\n\t\tList<StatementInfo> list = StatementAssembler.toStatementInfos(statement.getChildren());\n\t\treturn list;\n\t}", "public Statement getStatement() {\n try {\n stmt = conn.createStatement();\n } catch (SQLException sqle) {\n System.out.println(sqle.getMessage());\n }\n return stmt;\n }", "protected void addStatement(Statement statement, boolean isNew) {\n\t\tPropertyIdValue pid = statement.getMainSnak().getPropertyId();\n\n\t\t// This code maintains the following properties:\n\t\t// (1) the toKeep structure does not contain two statements with the\n\t\t// same statement id\n\t\t// (2) the toKeep structure does not contain two statements that can\n\t\t// be merged\n\t\tif (this.toKeep.containsKey(pid)) {\n\t\t\tList<StatementWithUpdate> statements = this.toKeep.get(pid);\n\t\t\tfor (int i = 0; i < statements.size(); i++) {\n\t\t\t\tStatement currentStatement = statements.get(i).statement;\n\t\t\t\tboolean currentIsNew = statements.get(i).write;\n\n\t\t\t\tif (!\"\".equals(currentStatement.getStatementId())\n\t\t\t\t\t\t&& currentStatement.getStatementId().equals(\n\t\t\t\t\t\t\t\tstatement.getStatementId())) {\n\t\t\t\t\t// Same, non-empty id: ignore existing statement as if\n\t\t\t\t\t// deleted\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tStatement newStatement = mergeStatements(statement,\n\t\t\t\t\t\tcurrentStatement);\n\t\t\t\tif (newStatement != null) {\n\t\t\t\t\tboolean writeNewStatement = (isNew || !newStatement\n\t\t\t\t\t\t\t.equals(statement))\n\t\t\t\t\t\t\t&& (currentIsNew || !newStatement\n\t\t\t\t\t\t\t\t\t.equals(currentStatement));\n\t\t\t\t\t// noWrite: (newS == statement && !isNew)\n\t\t\t\t\t// || (newS == cur && !curIsNew)\n\t\t\t\t\t// Write: (newS != statement || isNew )\n\t\t\t\t\t// && (newS != cur || curIsNew)\n\n\t\t\t\t\tstatements.set(i, new StatementWithUpdate(newStatement,\n\t\t\t\t\t\t\twriteNewStatement));\n\n\t\t\t\t\t// Impossible with default merge code:\n\t\t\t\t\t// Kept here for future extensions that may choose to not\n\t\t\t\t\t// reuse this id.\n\t\t\t\t\tif (!\"\".equals(statement.getStatementId())\n\t\t\t\t\t\t\t&& !newStatement.getStatementId().equals(\n\t\t\t\t\t\t\t\t\tstatement.getStatementId())) {\n\t\t\t\t\t\tthis.toDelete.add(statement.getStatementId());\n\t\t\t\t\t}\n\t\t\t\t\tif (!\"\".equals(currentStatement.getStatementId())\n\t\t\t\t\t\t\t&& !newStatement.getStatementId().equals(\n\t\t\t\t\t\t\t\t\tcurrentStatement.getStatementId())) {\n\t\t\t\t\t\tthis.toDelete.add(currentStatement.getStatementId());\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tstatements.add(new StatementWithUpdate(statement, isNew));\n\t\t} else {\n\t\t\tList<StatementWithUpdate> statements = new ArrayList<>();\n\t\t\tstatements.add(new StatementWithUpdate(statement, isNew));\n\t\t\tthis.toKeep.put(pid, statements);\n\t\t}\n\t}", "public void runStatement(final QueriesConfig qryConfig, final String statement) throws DBMissingValueException {\n final var dataSource = getDataSource(qryConfig);\n Connection conn = null;\n PreparedStatement stmt = null;\n try {\n conn = dataSource.getConnection();\n stmt = conn.prepareStatement(statement);\n\n switch (new QueryModeWrapper(qryConfig.getMode()).getMode()) {\n case QUERY:\n case SINGLE_QUERY_SCRIPT:\n final ResultSet rs = stmt.executeQuery();\n final var metaData = rs.getMetaData();\n long rsCount = 0;\n try {\n var firstLoad = true;\n final var listeners = qryConfig.getListeners();\n\n while (rs.next()) {\n rsCount++;\n StringBuilder sbHdr = new StringBuilder();\n StringBuilder sbRec = new StringBuilder();\n\n for (int idx = 1; idx <= metaData.getColumnCount(); idx++) {\n sbHdr.append(sbHdr.length()>0?\",\":\"\").append(metaData.getColumnName(idx));\n sbRec.append(sbRec.length()>0?\",\":\"\").append(rs.getString(idx));\n }\n\n if (firstLoad) {\n final var rawHdr = sbHdr.toString();\n LOG.info(String.format(\"[%s] [HDR]: %s\", qryConfig.getDescription(), rawHdr));\n\n if (listeners.getOnHeader()!=null) {\n runCmd(qryConfig, listeners.getOnHeader(), qryConfig.getDescription(), statement, rawHdr);\n }\n }\n final var rawData = sbRec.toString();\n LOG.info(String.format(\"[%s] [REC]: %s\", qryConfig.getDescription(), rawData));\n\n if (listeners.getOnData()!=null) {\n runCmd(qryConfig, listeners.getOnData(), qryConfig.getDescription(), statement, rawData);\n }\n firstLoad = false;\n }\n }\n finally {\n LOG.info(String.format(\"[%s] %s rows\", qryConfig.getDescription(), rsCount));\n try {rs.close();} catch (Exception e) {}\n }\n break;\n default:\n stmt.execute();\n try {LOG.info(String.format(\"[%s] %s rows affected\", qryConfig.getDescription(), stmt.getUpdateCount()));}\n catch(Exception e) {}\n break;\n }\n } catch (SQLException | QueryModeException e) {\n throw new RuntimeException(e);\n } finally {\n try {stmt.close();} catch (Exception e) {}\n try {conn.close();} catch (Exception e) {}\n }\n }", "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 }", "final public IASTListNode<IASTPKGStatement> ConditionalStatements() throws ParseException {\r\n IASTPKGStatement stmt = null;\r\n IASTListNode<IASTPKGStatement> stmts = null;\r\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\r\n case OPEN_CURLY_BRACE:\r\n case AMPERSAND:\r\n case STRING:\r\n case IF:\r\n case COMMENT_START:\r\n case OPTIONSLIST_START:\r\n case PLUS:\r\n stmt = ConditionalStatement();\r\n stmts = ConditionalStatements();\r\n if (stmts == null) {\r\n stmts = ASTFactory.createListNode(\"\\n\");\r\n }\r\n if (stmt != null)\r\n stmts.add(0, stmt);\r\n {if (true) return stmts;}\r\n break;\r\n default:\r\n jj_la1[2] = jj_gen;\r\n if (stmts == null) {\r\n stmts = ASTFactory.createListNode(\"\\n\");\r\n }\r\n {if (true) return stmts;}\r\n }\r\n throw new Error(\"Missing return statement in function\");\r\n }", "protected abstract NativeSQLStatement createNativeIsNotEmptyStatement();", "@Test\r\n\tpublic void testRemoveStatements()\r\n\t\tthrows Exception\r\n\t{\r\n\t\ttestAdminCon.begin();\r\n\t\ttestAdminCon.add(john, lname, johnlname, dirgraph);\r\n\t\ttestAdminCon.add(john, fname, johnfname, dirgraph);\r\n\t\ttestAdminCon.add(john, email, johnemail, dirgraph);\r\n\t\ttestAdminCon.add(john, homeTel, johnhomeTel, dirgraph);\r\n\t\ttestAdminCon.add(micah, lname, micahlname);\r\n\t\ttestAdminCon.add(micah, fname, micahfname);\r\n\t\ttestAdminCon.add(micah, homeTel, micahhomeTel);\r\n\t\ttestAdminCon.commit();\r\n\t\t\r\n\t\ttestAdminCon.setDefaultRulesets(null);\r\n\t\tStatement st1 = vf.createStatement(john, fname, johnlname);\r\n\t\r\n\t\ttestAdminCon.remove(st1);\r\n\t\t\r\n\t\tAssert.assertEquals(\"There is no triple st1 in the repository, so it shouldn't be deleted\",7L, testAdminCon.size());\r\n\t\t\r\n\t\tStatement st2 = vf.createStatement(john, lname, johnlname);\r\n\t\tassertThat(testAdminCon.hasStatement(st2, false, dirgraph), is(equalTo(true)));\r\n\t\tassertThat(testAdminCon.hasStatement(st2, true, null, dirgraph), is(equalTo(true)));\r\n\t\tassertThat(testAdminCon.hasStatement(st2, true, null), is(equalTo(false)));\r\n\t\tassertThat(testAdminCon.hasStatement(john, lname, johnlname, true, null), is(equalTo(false)));\r\n\t\tassertThat(testAdminCon.hasStatement(john, lname, johnlname, true, (Resource)null, dirgraph, dirgraph1), is(equalTo(true)));\r\n\t\tassertThat(testAdminCon.hasStatement(st2, true), is(equalTo(true)));\r\n\t\ttestAdminCon.remove(st2, dirgraph);\r\n\t\tassertThat(testAdminCon.hasStatement(st2, true, null, dirgraph), is(equalTo(false)));\r\n\t\t\r\n\t\tAssert.assertEquals(6L, testAdminCon.size());\r\n\t\t\r\n\t\ttestAdminCon.remove(john,email, null);\r\n\t\tassertThat(testAdminCon.hasStatement(john, fname, johnfname, false, dirgraph), is(equalTo(true)));\r\n\t\tassertThat(testAdminCon.hasStatement(john, fname, johnfname, false), is(equalTo(true)));\r\n\t\tassertThat(testAdminCon.hasStatement(john, fname, johnfname, false, null), is(equalTo(false)));\r\n\t\tassertThat(testAdminCon.hasStatement(john, fname, johnfname, false, null, dirgraph), is(equalTo(true)));\r\n\t\tassertThat(testAdminCon.hasStatement(john, lname, johnlname, false, dirgraph), is(equalTo(false)));\r\n\t\ttestAdminCon.remove(john,null,null);\r\n\t\t\r\n\t\tassertThat(testAdminCon.hasStatement(john, lname, johnlname, false, dirgraph), is(equalTo(false)));\r\n\t\tassertThat(testAdminCon.hasStatement(john, fname, johnfname, false, dirgraph), is(equalTo(false)));\r\n\t\tassertThat(testAdminCon.hasStatement(john, fname, johnfname, false, null, dirgraph), is(equalTo(false)));\r\n\t\tassertThat(testAdminCon.hasStatement(john, lname, johnlname, false, (Resource)null, dirgraph), is(equalTo(false)));\r\n\t\tassertThat(testAdminCon.hasStatement(micah, homeTel, johnhomeTel, false, null), is(equalTo(false)));\r\n\t\tassertThat(testAdminCon.hasStatement(micah, homeTel, micahhomeTel, false, (Resource)null), is(equalTo(true)));\r\n\t\tassertThat(testAdminCon.hasStatement(micah, homeTel, micahhomeTel, false, null), is(equalTo(true)));\r\n\t\t\r\n\t\ttestAdminCon.remove((Resource)null, homeTel,(Value) null);\r\n\t\ttestAdminCon.remove((Resource)null, homeTel, (Value)null);\r\n\t\t\r\n\t\ttestAdminCon.remove(vf.createStatement(john, lname, johnlname), dirgraph);\r\n\t\tassertThat(testAdminCon.hasStatement(john, lname, johnlname, false), is(equalTo(false)));\r\n\t\tassertThat(testAdminCon.hasStatement(john, lname, johnlname, false, dirgraph), is(equalTo(false)));\r\n\t\ttestAdminCon.add(john, fname, johnfname, dirgraph);\r\n\r\n\t\tassertThat(testAdminCon.hasStatement(john, homeTel, johnhomeTel, false, dirgraph), is(equalTo(false)));\r\n\t\tassertThat(testAdminCon.hasStatement(micah, homeTel, micahhomeTel, false), is(equalTo(false)));\r\n\t\t\r\n\t\t\r\n\t\tassertThat(testAdminCon.hasStatement(john, fname, johnfname, false, dirgraph), is(equalTo(true)));\r\n\r\n\t\ttestAdminCon.remove(john, (URI)null, (Value)null);\r\n\t\tassertThat(testAdminCon.hasStatement(john, fname, johnfname, false, dirgraph), is(equalTo(false)));\r\n\t\tassertThat(testAdminCon.isEmpty(), is(equalTo(false)));\r\n\t\t\r\n\t\ttestAdminCon.remove(null, null, micahlname);\r\n\t\tassertThat(testAdminCon.hasStatement(micah, fname, micahfname, false), is(equalTo(true)));\r\n\t\tassertThat(testAdminCon.hasStatement(micah, fname, micahfname, false, null, dirgraph), is(equalTo(true)));\r\n\t\tassertThat(testAdminCon.hasStatement(null, null, null, false, null), is(equalTo(true)));\r\n\t\tassertThat(testAdminCon.hasStatement(null, null, null, false), is(equalTo(true)));\r\n\t\tassertThat(testAdminCon.hasStatement(null, null, null, false, dirgraph), is(equalTo(false)));\r\n\t\tassertThat(testAdminCon.hasStatement(micah, fname, micahfname, false, dirgraph1, dirgraph), is(equalTo(false)));\r\n\t\ttestAdminCon.remove((URI)null, null, null);\r\n\t\tassertThat(testAdminCon.isEmpty(), is(equalTo(true)));\r\n\t\tassertThat(testAdminCon.hasStatement((URI)null, (URI)null, (Literal)null, false,(Resource) null), is(equalTo(false)));\r\n\t}", "org.apache.calcite.avatica.proto.Common.StatementHandleOrBuilder getStatementOrBuilder();", "@Override\n public boolean execute(String sql) throws SQLException {\n if (isClosed) {\n throw new SQLException(\"Can't execute after statement has been closed\");\n }\n stmtCompleted = false;\n if (resultSet != null) {\n // As requested by the Statement interface javadoc, \"All execution methods in the Statement interface\n // implicitly close a statement's current ResultSet object if an open one exists\"\n resultSet.close();\n resultSet = null;\n }\n\n // TODO in future, the polling logic should be in another SyncExploreClient\n try {\n stmtHandle = exploreClient.execute(sql);\n Status status = ExploreClientUtil.waitForCompletionStatus(exploreClient, stmtHandle, 200,\n TimeUnit.MILLISECONDS, MAX_POLL_TRIES);\n stmtCompleted = true;\n switch (status.getStatus()) {\n case FINISHED:\n resultSet = new ExploreQueryResultSet(exploreClient, this, stmtHandle);\n // NOTE: Javadoc states: \"returns false if the first result is an update count or there is no result\"\n // Here we have a result, it may contain rows or may be empty, but it exists.\n return true;\n case CANCELED:\n return false;\n default:\n // Any other state can be considered as a \"database\" access error\n throw new SQLException(String.format(\"Statement '%s' execution did not finish successfully. \" +\n \"Got final state - %s\", sql, status.getStatus().toString()));\n }\n } catch (HandleNotFoundException e) {\n // Cannot happen unless explore server restarted.\n LOG.error(\"Error executing query\", e);\n throw new SQLException(\"Unknown state\");\n } catch (InterruptedException e) {\n LOG.error(\"Caught exception\", e);\n Thread.currentThread().interrupt();\n return false;\n } catch (ExploreException e) {\n LOG.error(\"Caught exception\", e);\n throw new SQLException(e);\n }\n }", "@Test\n public void selectStatementSuccessful() throws SQLException {\n assertNotNull(testConnection.selectStatement(con, \"SELECT * FROM Employees;\"));\n assertNull(testConnection.selectStatement(con, \"SELECT * FROM Emp;\"));\n\n //Test if RS is empty\n assertTrue(testConnection.selectStatement(con, \"SELECT * FROM Employees\").next());\n assertFalse(testConnection.selectStatement(con, \"SELECT * FROM Employees WHERE email='x'\").next());\n }", "boolean isExecuteAccess();", "public boolean isInjected(String sql){\r\n boolean ret = false;\r\n this.sqlText = sql;\r\n this.sqlParser.sqltext = this.sqlText;\r\n this.getSqlInjections().clear();\r\n int i = this.sqlParser.parse();\r\n if (i == 0){\r\n ret = ret | isInjected_always_false_condition();\r\n ret = ret | isInjected_always_true_condition();\r\n ret = ret | isInjected_comment_at_the_end_statement();\r\n ret = ret | isInjected_stacking_queries();\r\n ret = ret | isInjected_allowed_statement();\r\n ret = ret | isInjected_union_set();\r\n }else{\r\n TSQLInjection s = new TSQLInjection(ESQLInjectionType.syntax_error);\r\n s.setDescription(this.sqlParser.getErrormessage());\r\n this.getSqlInjections().add(s);\r\n ret = true;\r\n }\r\n\r\n return ret;\r\n }", "private boolean inDatabase() {\r\n \t\treturn inDatabase(0, null);\r\n \t}", "public Statement getElseStm();" ]
[ "0.79508233", "0.7339252", "0.7339252", "0.7339252", "0.7339252", "0.71041876", "0.6944442", "0.68240654", "0.6622105", "0.64683765", "0.64570326", "0.62541735", "0.6243669", "0.6104028", "0.6104028", "0.6104028", "0.6104028", "0.6093687", "0.6008787", "0.6008787", "0.6008787", "0.6008787", "0.59988606", "0.59957385", "0.5983251", "0.5951798", "0.5949895", "0.5945261", "0.5868235", "0.58592075", "0.58497095", "0.57996696", "0.57883024", "0.5769176", "0.5765854", "0.57571816", "0.56911427", "0.56829", "0.56649554", "0.5661918", "0.5657148", "0.56551963", "0.5655117", "0.5633063", "0.5612939", "0.56015337", "0.5600937", "0.5598481", "0.55804724", "0.55638444", "0.5541695", "0.550215", "0.5501042", "0.54911166", "0.54911166", "0.54911166", "0.54813045", "0.54632384", "0.54531664", "0.5451341", "0.5445941", "0.5430105", "0.5420982", "0.5414092", "0.5402156", "0.5368372", "0.53648096", "0.53563386", "0.535132", "0.5331837", "0.53305936", "0.5323893", "0.53127086", "0.5283669", "0.52688134", "0.52637994", "0.52555317", "0.52536607", "0.5251641", "0.5250183", "0.523368", "0.52335304", "0.5226269", "0.5222564", "0.5218755", "0.51974016", "0.5196427", "0.51904964", "0.5184472", "0.5167408", "0.51564175", "0.51476914", "0.5138877", "0.51321167", "0.5127135", "0.5121855", "0.5120446", "0.51146746", "0.5111387", "0.51090837", "0.51036745" ]
0.0
-1
/public static final String SELECT_REF_LOGS = "SELECT DISTINCT U.Name, COUNT() as VisitorCount FROM pavankon_marrker_reg.users U " + "INNER JOIN pavankon_marrker_reg.reflog REF on U.refCode = REF.refCode " + "GROUP BY U.phno, U.refCode, U.Name ORDER BY VisitorCount DESC LIMIT 5";
public boolean isRefCodeExists(String refCode) { // TODO Auto-generated method stub // doGet(request, response); PreparedStatement pst; ResultSet rs; boolean exists = false; try { pst = RegDataBaseManager.startDatabaseOperation(SELECT_USER); pst.setString(1, refCode); rs = RegDataBaseManager.getDatabaseOprationResult(pst, SELECT_USER); if(rs.next()){ exists = true; } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return exists; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void executeQueries5()\n\t{\n\t\tString hql = \"Select s.name from School as s INNER JOIN SchoolClass as sc on s.id = sc.school_id GROUP by s.name HAVING count(sc.school_id) >1 \";\n\t\tQuery query = session.createQuery(hql);\n\t\tList results = query.list();\n\n\t\tSystem.out.println(results);\n\t}", "ArrayList<String> showHashtag() throws SQLException {\r\n String query = \"SELECT DISTINCT COUNT(id),hashtag,corpo FROM tweet GROUP BY id,hashtag,corpo\";\r\n //Oggetti per interrogare il db\r\n Statement statement=null;\r\n connection=DBConnection.connect();\r\n ResultSet resultSet=null;\r\n //Lista messaggi\r\n ArrayList<String> hashtagList = new ArrayList<>();\r\n\r\n try {\r\n statement=connection.createStatement();\r\n resultSet = statement.executeQuery(query);\r\n while(resultSet.next()){\r\n String corpo = resultSet.getString(\"corpo\");\r\n hashtagList.add(corpo);\r\n }\r\n\r\n return hashtagList;\r\n }catch (SQLException e){\r\n e.printStackTrace();\r\n }finally {\r\n if (connection!=null) connection.close();\r\n if (statement!=null) statement.close();\r\n if(resultSet!=null) resultSet.close();\r\n }\r\n return null;\r\n }", "ArrayList<String> showUsersRecive() throws SQLException {\r\n String queryMittente = \"SELECT DISTINCT username FROM users JOIN tweet on users.username = tweet.destinatario GROUP BY (username)\";\r\n //Oggetti per interrogare il db\r\n Statement statement=null;\r\n connection=DBConnection.connect();\r\n ResultSet resultSet=null;\r\n //Lista messaggi\r\n ArrayList<String> usersList = new ArrayList<>();\r\n\r\n try {\r\n statement=connection.createStatement();\r\n resultSet = statement.executeQuery(queryMittente);\r\n while(resultSet.next()){\r\n String username = resultSet.getString(\"username\");\r\n usersList.add(username);\r\n }\r\n\r\n return usersList;\r\n }catch (SQLException e){\r\n e.printStackTrace();\r\n }finally {\r\n if (connection!=null) connection.close();\r\n if (statement!=null) statement.close();\r\n if(resultSet!=null) resultSet.close();\r\n }\r\n return null;\r\n }", "@Query(\"select count(a) from Rendezvous a right join a.user r group by r.id\")\n\tCollection<Double> dashboardRendezvousesByUser();", "private void executeQueries6()\n\t{\n\n\t\tString hql = \"SELECT s FROM School s INNER JOIN s.classes classes WHERE classes.profile = 'mat-fiz' AND classes.currentYear>=2\";\n\t\tQuery query = session.createQuery(hql);\n\t\tList results = query.list();\n\t\tSystem.out.println(results);\n\n\t}", "public static void main(String[] args) {\r\n\r\n try {\r\n Class.forName(\"org.postgresql.Driver\");\r\n Connection conn1 = DriverManager.getConnection(\"jdbc:postgresql://173.247.255.40:5432/assesment\",\"postgres\",\"pr0v1s0r1A\");\r\n Statement st = conn1.createStatement();\r\n Statement st2 = conn1.createStatement();\r\n \r\n ResultSet set = st.executeQuery(\r\n \t\t\" select u.extradata2, u.extradata3, u.email, u.firstname, u.lastname, u.language, u.loginname \"+ \t\t\r\n \t\t\" from users u join userassesments ua on ua.loginname = u.loginname \" +\r\n \t\t\" where ua.assesment = 115 \" +\r\n \t\t//\" AND enddate is null \"+\r\n \t\t\" and u.vehicle not in ('FERNANDO BUENO','GONZALO REDONDO','PEDRO PITELLA') \" +\r\n \t\t\" order by vehicle\");\r\n \t\t\r\n// \t\t\" and u.email in ('[email protected]','[email protected]') order by vehicle\");\r\n// ResultSet set = st.executeQuery(\"select u.email, u.firstname, u.lastname, u.language from users u join userassesments ua on ua.loginname = u.loginname where u.email in ('[email protected]','[email protected]')\");\r\n// ResultSet set = st.executeQuery(\"SELECT u.email, u.firstname, u.lastname, u.language FROM users u join userassesments ua on ua.loginname = u.loginname WHERE ua.assesment = 57 AND email IN ('[email protected]')\"); \r\n// ResultSet set = st.executeQuery(\"SELECT u.email, u.firstname, u.lastname, u.language FROM users u JOIN userassesments uas ON u.loginname = uas.loginname WHERE uas.assesment = 57 AND enddate IS NULL AND u.email IN ('[email protected]')\");\r\n\r\n MD5 md5 = new MD5();\r\n // int i = 1;\r\n\r\n while(set.next()){\r\n\t \t\tString emailSend = set.getString(1);\r\n\t \t\tString emailCopy = set.getString(2);\r\n\t \t\tString email = set.getString(3);\r\n\t \t\tString firstName = set.getString(4);\r\n\t \t\tString lastName = set.getString(5);\r\n\t \t\tString language = set.getString(6);\r\n\t \t\t\r\n\t \t\tString loginname = set.getString(7);\r\n\r\n\t \t\tString subject;\r\n\t \t\tMailSender sender;\r\n\t \t\tif(email != null && email.length() > 0) {\r\n\t try {\r\n\t\t \t\tString href = md5.encriptar(email);\r\n\t\t \t\t //emailSend = \"[email protected]\";\r\n\t\t \t\t //emailSend = \"[email protected]\";\r\n\t\t \t\t\r\n\t\t \t\t// email = \"[email protected]\";\r\n\t\t \t\t\r\n\t \t\t\tsubject = \"\";\r\n\t \t\t\tif(language.equals(\"es\")) {\r\n\t \t\t\t\tsubject = \"Invitación a participar en el 'Driver Assessment' online\";\r\n\t \t\t\t} else if(language.equals(\"en\")) {\r\n\t \t\t\t\tsubject = \"Invitation to participate in the Online Driver Assessment\";\r\n\t \t\t\t}else {\r\n\t \t\t\t\tsubject = \"Convite para participar do 'Driver Assessment' on-line\";\r\n\t \t\t\t}\r\n\t \t\t\tSystem.out.println(firstName+\",\"+lastName+\",http://da.cepasafedrive.com/assesment/index.jsp?login=\"+href);\r\n/*\r\n\t \t\t\tString body = getMail(\"http://da.cepasafedrive.com/assesment/index.jsp?login=\"+href,language);\r\n\r\n\t \t\t\tsender = new MailSender();\r\n\t \t\t\tint i = 0;\r\n\t \t\t\tboolean send = false;\r\n\t \t\t\twhile (!send && i < 10) {\r\n\t\t \t\t\tString[] address = sender.getAvailableMailAddress();\r\n\t\t \t\t\tif(address[0] != null) {\r\n\t\t \t\t\t\tString[] ccAddress = new String[0];\r\n\t\t \t\t\t\t/*if(emailCopy != null && emailCopy.length() > 0 && !emailCopy.equals(\"---\")) {\r\n\t\t \t\t\t\t\tccAddress = new String[1];\r\n\t\t \t\t\t\t\tccAddress[0] = emailCopy;\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// System.out.println(\"Aca mandaria el email...\");\r\n\t\t \t\t\t\t\r\n\t\t \t\t\t\ttry {\r\n\t\t \t\t\t\t\tsender.sendImage(emailSend, \"CEPA Driver Assessment\", address[0], address[1], \r\n\t\t \t\t\t\t\t\t\tsubject, new LinkedList(), body, AssesmentData.FLASH_PATH+\"/images/cabezal_jj_latyc.jpg\",ccAddress);\r\n\t\t \t\t\t\t\tsend = true;\r\n\t\t \t\t\t\t\tSystem.out.println(\"'\"+loginname+\"', \");\r\n\t\t \t\t\t\t\t\r\n\t\t \t\t\t\t\t//st2.executeUpdate(\"UPDATE users SET emailsended = CURRENT_DATE where loginname='\"+loginname+\"'\");\r\n\t\t \t\t\t\t\t\r\n\t\t \t\t\t\t}catch (Exception e) {\r\n\t\t \t \t\t\tSystem.out.println(\"ERROR '\"+email+\"',\");\r\n\t\t \t\t\t\t\te.printStackTrace();\r\n\t\t \t\t }\r\n\t\t\t\t \t\t//Thread.sleep(50000);\t \t\t\t\r\n\t\t \t\t\t}\r\n\t\t \t\t\ti++;\r\n\t \t\t\t}*/\r\n\t\t }catch (Exception e) {\r\n\t \t\t\tSystem.out.println(\"ERROR '\"+email+\"',\");\r\n\t \t\t\te.printStackTrace();\t\r\n\t \t\t\t\r\n\t \t\t\t\r\n\t\t }\r\n\t \t\t}\r\n\t \t}\r\n\r\n \t}catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public Cursor showData2(){\n SQLiteDatabase db=this.getWritableDatabase();\n Cursor data =db.rawQuery(\"SELECT NAME,COUNT(NAME) AS value FROM \"+ TABLE_NAME3+\" GROUP BY NAME ORDER BY value DESC LIMIT 3\",null);\n //Cursor data=db.rawQuery(\"delete from \"+ TABLE_NAME,null);// In case of mistake in database\n return data;\n }", "public ArrayList<CustomerCountry> getCountryByCustomerCount(){\n ArrayList<CustomerCountry> customerCountry = new ArrayList<>();\n try{\n // try and connect\n conn = DriverManager.getConnection(URL);\n\n // make sql query\n // (https://stackoverflow.com/questions/39565394/how-to-rename-result-set-of-count-in-sql)\n PreparedStatement preparedStatement =\n conn.prepareStatement(\"SELECT Country, COUNT(*) as numcustomers FROM Customer GROUP BY Country ORDER BY numcustomers DESC\");\n\n // execute query\n ResultSet set = preparedStatement.executeQuery();\n\n while(set.next()){\n customerCountry.add(new CustomerCountry(set.getString(\"Country\"), set.getString(\"numcustomers\")));\n }\n }\n catch(Exception exception){\n System.out.println(exception.toString());\n }\n finally{\n try{\n conn.close();\n }\n catch (Exception exception){\n System.out.println(exception.toString());\n }\n }\n return customerCountry;\n\n }", "private int getGenreDownloadedMostByAllUsers(){\n \n SessionFactory sessionFactory = (SessionFactory)servletContext.getAttribute(OpusApplication.HIBERNATE_SESSION_FACTORY) ;\n Session session = sessionFactory.openSession() ;\n Query query = session.createQuery(\"SELECT mvd, mvd.musicVideo.genre.id, count(*) FROM MusicVideoDownload mvd JOIN FETCH mvd.musicVideo GROUP BY mvd.musicVideo.genre.id ORDER BY count(*) DESC\") ;\n query.setMaxResults(1) ;\n List resultSet = query.list() ;\n session.close() ;\n //if there is no result set, it means there are no downloads so return -1\n if(resultSet.isEmpty())\n return -1 ;\n //else return the genre id field of the first tuple since the result set has been sorted in desc order\n Object[] tupleFields = (Object[])resultSet.get(0) ;\n return (int)tupleFields[1] ;\n }", "public List<Sale> saleListGenreCount() {\n List<Sale> saleList = new ArrayList<Sale>();\n\n try {\n conn = DBConnection.getConnection();\n stm = conn.createStatement();\n result = stm.executeQuery(\"SELECT musical_genre, COUNT (*) FROM disquera.genre \\n\"\n + \"JOIN disquera.sale ON genre.id_genre = sale.id_genre \\n\"\n + \"GROUP BY genre.musical_genre ORDER BY genre.musical_genre\");\n //result_album = stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.album on sale.id_album=album.id_album\");\n //result_artist=stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.artist on sale.id_artist=artist.id_artist\");\n while (result.next()) {\n Sale newSale = new Sale();\n\n newSale.setGenre(result.getString(1));\n newSale.setCount(result.getInt(2));\n //System.out.println(\"\\n\\n Received data: \\n Id: \" + newSale.getId_sale() + \"\\nPrecio: \" + newSale.getPrice());\n saleList.add(newSale);\n /*\n System.out.println(\"No existe un usuario con esa contraseña\");\n conn.close();\n return null;\n */\n }\n result.close();\n stm.close();\n conn.close();\n } catch (SQLException ex) {\n ex.getStackTrace();\n return null;\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(DAOGenre.class.getName()).log(Level.SEVERE, null, ex);\n }\n return saleList;\n }", "@Query(\"select r, count(l) from Link l right join l.rendezvous r group by r having count(l) > (count(l)/count(r))*1.1\")\n\tCollection<Object> dashboardRendezvousesLinked();", "ArrayList<String> showUsersSent() throws SQLException {\r\n String queryMittente = \"SELECT DISTINCT username \" +\r\n \"FROM users JOIN tweet on users.username = tweet.mittente\" +\r\n \" GROUP BY (username)\";\r\n //Oggetti per interrogare il db\r\n Statement statement=null;\r\n connection=DBConnection.connect();\r\n ResultSet resultSet=null;\r\n //Lista messaggi\r\n ArrayList<String> usersList = new ArrayList<>();\r\n\r\n try {\r\n statement=connection.createStatement();\r\n resultSet = statement.executeQuery(queryMittente);\r\n while(resultSet.next()){\r\n String username = resultSet.getString(\"username\");\r\n usersList.add(username);\r\n }\r\n\r\n return usersList;\r\n }catch (SQLException e){\r\n e.printStackTrace();\r\n }finally {\r\n if (connection!=null) connection.close();\r\n if (statement!=null) statement.close();\r\n if(resultSet!=null) resultSet.close();\r\n }\r\n return null;\r\n }", "@Override\n public List getPagesWithActiveUsers(Long count, String orderBy) {\n log.debug(\"This method fetches most active users\");\n SimpleDateFormat datetimeFormatter = new SimpleDateFormat(\n \"yyyy-MM-dd HH:mm:ss\");\n LocalDateTime currentDateTime = LocalDateTime.now();\n List<CsvModel> csvModelList = csvRepository.findAll();\n List<String> responseList = new ArrayList<>();\n if (csvModelList == null) {\n throw new CsvException(String.format(\"records not found , please insert some records\"));\n }\n if (csvModelList != null && csvModelList.size() > 0) {\n for (CsvModel e : csvModelList) {\n Duration diff = Duration.between(currentDateTime, e.getLast_updated_at().toLocalDateTime());\n if (diff.toDays() < 60) {\n responseList.add(e.getUuid());\n }\n }\n }\n log.debug(\"Most active users fetched successfully\");\n return responseList;\n }", "public Iterable<DBObject> topLinker(DBCollection collection) {\n Iterable<DBObject> ai = collection.aggregate(Arrays.asList(\n new BasicDBObject(\"$match\", new BasicDBObject(\"text\", new BasicDBObject(\"$regex\", rege))),\n new BasicDBObject(\"$group\", new BasicDBObject(\"_id\", \"$user\").append(\"count\", new BasicDBObject(\"$sum\", 1))),\n new BasicDBObject(\"$sort\", new BasicDBObject(\"count\", -1)),\n new BasicDBObject(\"$limit\", 10)\n )).results();\n return ai;\n }", "@Query(\"select r.rendezvous, count(r.user) as cnt from Reservation r group by r.rendezvous order by cnt desc\")\n\tCollection<Object> findTop10dashboardRendezvousesTop10();", "@Query(\"select count(r) from Reservation r group by r.user\")\n\tCollection<Double> dashboardRendezvousesRsvp();", "public List<UserHistory> getFirefoxHistory(){\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tList<UserHistory> userHistoryList = new ArrayList<UserHistory>();\n\t\tConnection connection = null;\n\t try\n\t {\n\t String profileName = HackathonUtil.getProfileName(Tracking.FILES_LOCATION);\n\t System.out.println(\"Profile name:-\"+profileName);\n\t String accNum = profileName.replace(\".default\", \"\");\n\t System.out.println(\"Account number:-\"+accNum);\n\t\t String connectionString = \"jdbc:sqlite:\" + Tracking.FILES_LOCATION + profileName+ \"/places.sqlite\";\n\t\t connection = DriverManager.getConnection(connectionString);\n\t Statement statement = connection.createStatement();\n\t statement.setQueryTimeout(30); // set timeout to 30 sec.\n\n\t ResultSet rs = statement.executeQuery(\"select url as HOST_NAME, rev_host as FULL_URL, visit_date as VISIT_DATE from moz_places , moz_historyvisits where moz_places.id = moz_historyvisits.id and moz_places.url like '%verizon%'\");\n\t while(rs.next())\n\t {\n\t // read the result set\n\t \t \n\t \tString actualText = \"\"; \n\t UserHistory userHistory = new UserHistory();\n\t String dateandtime = rs.getString(\"VISIT_DATE\");\n\t long dt = Long.parseLong(dateandtime);\n\t //\n\t Calendar cal = Calendar.getInstance();\n\t\t\tcal.setTimeInMillis(dt);\n\t\t\tSimpleDateFormat format1 = new SimpleDateFormat(\"MMM-dd\");\n\t\t\tString formatted = format1.format(cal.getTime());\n\t\t\tuserHistory.setDateVisitied(formatted);\n\t String txt = rs.getString(\"HOST_NAME\");\n\t System.out.println(txt);\n\t String contents[] = txt.split(\"=\");\n\t if(contents.length > 2){\n\t \t actualText = contents[2].replace(\"+\", \" \");\n\t }else{\n\t \t actualText = txt; \n\t }\n\t userHistory.setId(accNum);\n\t userHistory.setHostname(actualText);\n\t userHistory.setTextSearched(HackathonUtil.reverseString(rs.getString(\"FULL_URL\")));\n\t userHistoryList.add(userHistory);\n\t }\n\t }\n\t catch(SQLException e)\n\t {\n\t // if the error message is \"out of memory\", \n\t // it probably means no database file is found\n\t System.err.println(e.getMessage());\n\t }catch(Exception ex){\n\t \tex.printStackTrace();\n\t }\n\t finally\n\t {\n\t try\n\t {\n\t if(connection != null)\n\t connection.close();\n\t }\n\t catch(SQLException e)\n\t {\n\t // connection close failed.\n\t System.err.println(e);\n\t }\n\t }\n\t return userHistoryList;\n\t}", "public String fetchCountMyData(User loginUser);", "public ArrayList<StatisticsVo> showCount(String sDate,String eDate) {\r\n\t\tConnection conn=null;\r\n\t\tPreparedStatement pstmt=null;\r\n\t\tResultSet rs=null;\r\n\t\tString sql=\"select rc.rcarname,count(*) cnt from(select * from rentlist where rstartdate between to_date(?, 'YYYY/MM/DD HH24:MI') and to_date(?, 'YYYY/MM/DD HH24:MI'))rl,rentcar rc where rl.rennum=rc.rennum group by rc.rcarname\";\r\n\t\ttry {\r\n\t\t\tconn=DbcpBean.getConn();\r\n\t\t\tpstmt=conn.prepareStatement(sql);\r\n\t\t\tpstmt.setString(1, sDate+\" 00:00\");\r\n\t\t\tpstmt.setString(2, eDate+\" 23:59\");\r\n\t\t\trs=pstmt.executeQuery();\r\n\t\t\tArrayList<StatisticsVo> list=new ArrayList<>();\r\n\t\t\twhile(rs.next()) {\r\n\t\t\t\tint cnt=rs.getInt(\"cnt\");\r\n\t\t\t\t\r\n\t\t\t\tString rcarName=rs.getString(\"rcarName\");\r\n\t\t\t\r\n\t\t\t\tStatisticsVo vo=new StatisticsVo(null, rcarName, 0, null, cnt);\r\n\t\t\t\tlist.add(vo);\r\n\t\t\t}\r\n\t\t\treturn list;\r\n\t\t}catch(SQLException se) {\r\n\t\t\tSystem.out.println(se.getMessage());\r\n\t\t\treturn null;\r\n\t\t}finally {\r\n\t\t\tDbcpBean.close(conn, pstmt, rs);\r\n\t\t}\r\n\t}", "public List<Sale> saleLisAlbumCount() {\n List<Sale> saleList = new ArrayList<Sale>();\n\n try {\n conn = DBConnection.getConnection();\n stm = conn.createStatement();\n result = stm.executeQuery(\"SELECT name,\\n\"\n + \"COUNT (*) \\n\"\n + \"FROM disquera.album JOIN disquera.sale ON album.id_album = sale.id_album\\n\"\n + \"GROUP BY album.name ORDER BY album.name\");\n //result_album = stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.album on sale.id_album=album.id_album\");\n //result_artist=stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.artist on sale.id_artist=artist.id_artist\");\n while (result.next()) {\n Sale newSale = new Sale();\n\n newSale.setAlbumName(result.getString(1));\n newSale.setCount(result.getInt(2));\n //System.out.println(\"\\n\\n Received data: \\n Id: \" + newSale.getId_sale() + \"\\nPrecio: \" + newSale.getPrice());\n saleList.add(newSale);\n /*\n System.out.println(\"No existe un usuario con esa contraseña\");\n conn.close();\n return null;\n */\n }\n result.close();\n stm.close();\n conn.close();\n } catch (SQLException ex) {\n ex.getStackTrace();\n return null;\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(DAOGenre.class.getName()).log(Level.SEVERE, null, ex);\n }\n return saleList;\n }", "public void userWithMostLikes(){\n Map<Integer,Integer> userLikesCount = new HashMap<>();\n Map<Integer,User> users = DataStore.getInstance().getUsers();\n \n for(User user : users.values()){\n for(Comment c : user.getComments()){\n int likes=0;\n if(userLikesCount.containsKey(user.getId())){\n\n likes = userLikesCount.get(user.getId());\n }\n likes += c.getLikes();\n userLikesCount.put(user.getId(), likes);\n }\n }\n System.out.println(userLikesCount);\n int max=0;\n int maxId=0;\n for(int id: userLikesCount.keySet()){\n if(userLikesCount.get(id)>max){\n max= userLikesCount.get(id);\n maxId=id;\n }\n }\n System.out.println(\"\\nUser with most likes : \"+ max+ \"\\n\"+ users.get(maxId));\n }", "@Query(nativeQuery = true, value = \"SELECT u.*, pv_sum.total AS postTotal, cv_sum.total AS commentTotal, IFNULL(pv_sum.total, 0) + IFNULL(cv_sum.total, 0) as totalVotes FROM users u \" +\n \"LEFT JOIN (SELECT p.user_id, IFNULL(SUM(pv.type), 0) AS total FROM posts p JOIN posts_votes pv ON pv.post_id = p.id GROUP BY p.user_id) pv_sum ON pv_sum.user_id = u.id \" +\n \"LEFT JOIN (SELECT c.user_id, IFNULL(SUM(cv.type), 0) AS total FROM comments c JOIN comments_votes cv ON cv.comment_id = c.id GROUP BY c.user_id) cv_sum ON cv_sum.user_id = u.id \" +\n \"GROUP BY u.id, u.username, postTotal, commentTotal ORDER BY totalVotes DESC LIMIT 3\")\n List<User> popularUsersByKarma();", "public void getRecentUsers(View view){\n SharedPreferences sharedPref = getContext().getSharedPreferences(\"recentVisited\", Context.MODE_PRIVATE);\n int size = sharedPref.getInt(\"size\", 0);\n\n // clears the variables.\n userName.clear();\n uid.clear();\n for (int i = size+1; i >0 ; i--) {\n String name= sharedPref.getString(\"name_\"+i,\"deleted\");\n String userId= sharedPref.getString(\"uid_\"+i,\"deleted\");\n if (!Objects.equals(name, \"deleted\")){\n userName.add(name);\n uid.add(userId);\n }\n\n }\n\n setList(view);\n }", "private String searchAllViewerAccountSQL(){\n\t\tString sql = (\"SELECT username, type From viewer\");\n\t\tString addsql;\n\t\tif(!accountNameViewTextField.getText().equals(\"\")){\n\t\t\taddsql = \" WHERE username = \\'\" + accountNameViewTextField.getText() + \"\\'\";\n\t\t\tsql = sql + addsql;\n\t\t}\n\t\tSystem.out.println(sql);\n\t\treturn sql;\n\t}", "public ResultSet view(Long userid) throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.compname,f.no_share from company c,finalallocation f,login l,customer cu where l.login_id=cu.login_id and c.comp_id=f.comp_id and cu.user_id=f.user_id and cu.login_id=\"+userid+\"\");\r\n\treturn rs;\r\n}", "@Query(\"select r, count(a) from Announcement a right join a.rendezvous r group by r having count(a) > (count(a)/count(r))*1.75\")\n\tCollection<Object> dashboardAnnouncementsAbove75();", "@Override \n protected void doGet(HttpServletRequest request, \n HttpServletResponse response) throws ServletException, IOException {\n \t \n PrintWriter out = response.getWriter();\n Connection con = null;\n PreparedStatement result = null;\n JSONObject obj = null;\n JSONArray json = new JSONArray();\n String domain_part = \"@\" + domain;\n \n String user1 = request.getParameter(\"user1\");\n user1 = user1.substring(0, user1.lastIndexOf(domain_part));\n \n user1 = JID.escapeNode(user1);\n user1 = user1 + domain_part;\n user1 = user1.replace(\"\\\\\", \"\\\\\\\\\");\n \n String user2 = request.getParameter(\"user2\");\n user2 = user2.substring(0, user2.lastIndexOf(domain_part));\n \n user2 = JID.escapeNode(user2);\n user2 = user2 + domain_part;\n user2 = user2.replace(\"\\\\\", \"\\\\\\\\\");\n \n int total_count = 0;\n int pageSize = 5;\n // int page = Integer.parseInt(request.getParameter(\"page\"));\n \n \n System.out.println(\"user1 is: \" + user1);\n System.out.println(\"user2 is: \" + user2);\n \n StringBuilder query_count = new StringBuilder();\n query_count.append(\"SELECT count(*) as sum from ofMessageArchive\");\n query_count.append(\" where (fromJID = '\");\n query_count.append(user1);\n query_count.append(\"' and toJID = '\");\n query_count.append(user2);\n query_count.append(\"') or (fromJID = '\");\n query_count.append(user2);\n query_count.append(\"' and toJID = '\");\n query_count.append(user1);\n query_count.append(\"') \");\n \n System.out.println(\"sql query_count output is : \" + query_count.toString());\n \n // Get total count\n try {\n\t\t\tcon = DbConnectionManager.getConnection();\n\t\t\tPreparedStatement result_count = DbConnectionManager.createScrollablePreparedStatement(con, query_count.toString());\n\t\t\tResultSet rs_count = result_count.executeQuery();\n\t\t\trs_count.next();\n\t\t\t\n\t\t\tSystem.out.println(\"total count: \" + rs_count.getString(\"sum\"));\n\t\t\ttotal_count = Integer.parseInt(rs_count.getString(\"sum\"));\n } catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"sql + whatsup -\" + e.getMessage());\n\t\t\t// e.printStackTrace();\n\t\t\treplyError(e.toString(), response, out);\n \t\n }\n \n int startIndex = ((total_count - pageSize) < 0)? 0:(total_count - pageSize);\n System.out.println(\"start index: \" + startIndex);\n \n int numResults = pageSize;\n \n \n \n StringBuilder query = new StringBuilder();\n query.append(\"SELECT * from ofMessageArchive\");\n query.append(\" where (fromJID = '\");\n query.append(user1);\n query.append(\"' and toJID = '\");\n query.append(user2);\n query.append(\"') or (fromJID = '\");\n query.append(user2);\n query.append(\"' and toJID = '\");\n query.append(user1);\n query.append(\"') ORDER BY ofMessageArchive.sentDate\");\n query.append(\" ASC\");\n query.append(\" LIMIT \").append(startIndex).append(\",\").append(numResults);\n \n System.out.println(\"sql output is : \" + query.toString());\n \n \n try {\n\t\t\tcon = DbConnectionManager.getConnection();\n\t\t\tresult = DbConnectionManager.createScrollablePreparedStatement(con, query.toString());\n\t\t\tResultSet rs = result.executeQuery();\n\t\t\tResultSetMetaData rsmd = rs.getMetaData();\n\t\t\t\n while (rs.next()) {\n \tint numColumns = rsmd.getColumnCount();\n \t obj = new JSONObject();\n\n \t for( int i=1; i<numColumns+1; i++) {\n \t String column_name = rsmd.getColumnName(i);\n\n \t switch( rsmd.getColumnType( i ) ) {\n \t case java.sql.Types.VARCHAR:\n \t obj.put(column_name, rs.getString(column_name));\n \t break;\n \t case java.sql.Types.DATE:\n \t obj.put(column_name, rs.getDate(column_name)); \n \t break;\n \t case java.sql.Types.TIMESTAMP:\n \t obj.put(column_name, rs.getTimestamp(column_name)); \n \t break;\n \t default:\n \t obj.put(column_name, rs.getObject(column_name)); \n \t break;\n \t }\n \t }\n \t json.put(obj);\n }\n \n rs.close();\n \n System.out.println(\"final json -- \" + json);\n \n replyMessage(json, response, out);\n \n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"sql + whatsup -\" + e.getMessage());\n\t\t\t// e.printStackTrace();\n\t\t\treplyError(e.toString(), response, out);\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"json + whatsup -\" + e.getMessage());\n\t\t\treplyError(e.toString(), response, out);\n\t\t\t// e.printStackTrace();\n\t\t} finally {\n DbConnectionManager.closeConnection(result, con);\n }\n }", "public int qureyNumOfInspectors() {\r\n\t\tif (DBConnection.conn == null) {\r\n\t\t\tDBConnection.openConn();\r\n\t\t}\r\n\t\tint sum = 0;\r\n\t\ttry {\r\n\t\t\tString sql = \"select count(*) from InspectionPersonnel\";\r\n\t\t\tps = DBConnection.conn.prepareStatement(sql);\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tsum = rs.getInt(1);\r\n\t\t\t}\r\n\t\t\tDBConnection.closeResultSet(rs);\r\n\t\t\tDBConnection.closeStatement(ps);\r\n\t\t\tDBConnection.closeConn();\r\n\t\t\treturn sum;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "public List<ReporteRetencionesResumido> getRetencionSRIResumido(int mes, int anio, int idOrganizacion)\r\n/* 27: */ {\r\n/* 28: 58 */ String sql = \"SELECT new ReporteRetencionesResumido(f.fechaEmisionRetencion,f.fechaRegistro,f.fechaEmision, CONCAT(f.establecimiento,'-',f.puntoEmision,'-',f.numero),\\tf.identificacionProveedor,c.descripcion,CASE WHEN c.tipoConceptoRetencion = :tipoConceptoFUENTE then (SUM(COALESCE(dfp.baseImponibleRetencion, 0)+COALESCE(dfp.baseImponibleTarifaCero, 0) +COALESCE(dfp.baseImponibleDiferenteCero, 0)+COALESCE(dfp.baseImponibleNoObjetoIva, 0))) else COALESCE(dfp.baseImponibleRetencion, 0) end,dfp.porcentajeRetencion,dfp.valorRetencion,\\tc.codigo,CASE WHEN c.tipoConceptoRetencion = :tipoConceptoIVA then 'IVA' WHEN c.tipoConceptoRetencion = :tipoConceptoFUENTE then 'FUENTE' WHEN c.tipoConceptoRetencion = :tipoConceptoISD then 'ISD' else '' end,f.numeroRetencion) FROM DetalleFacturaProveedorSRI dfp INNER JOIN dfp.facturaProveedorSRI f INNER JOIN dfp.conceptoRetencionSRI c WHERE MONTH(f.fechaRegistro) =:mes\\tAND YEAR(f.fechaRegistro) =:anio AND f.estado!=:estadoAnulado AND f.indicadorSaldoInicial!=true AND f.idOrganizacion = :idOrganizacion\\tGROUP BY c.codigo,f.numero,f.puntoEmision,\\tf.establecimiento, f.identificacionProveedor,\\tc.descripcion,dfp.baseImponibleRetencion,dfp.porcentajeRetencion,dfp.valorRetencion,f.fechaEmisionRetencion,f.fechaRegistro,f.fechaEmision,f.numeroRetencion, c.tipoConceptoRetencion ORDER BY c.tipoConceptoRetencion, c.codigo \";\r\n/* 29: */ \r\n/* 30: */ \r\n/* 31: */ \r\n/* 32: */ \r\n/* 33: */ \r\n/* 34: */ \r\n/* 35: */ \r\n/* 36: */ \r\n/* 37: */ \r\n/* 38: */ \r\n/* 39: */ \r\n/* 40: */ \r\n/* 41: */ \r\n/* 42: */ \r\n/* 43: */ \r\n/* 44: */ \r\n/* 45: 75 */ Query query = this.em.createQuery(sql);\r\n/* 46: 76 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 47: 77 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 48: 78 */ query.setParameter(\"estadoAnulado\", Estado.ANULADO);\r\n/* 49: 79 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 50: 80 */ query.setParameter(\"tipoConceptoIVA\", TipoConceptoRetencion.IVA);\r\n/* 51: 81 */ query.setParameter(\"tipoConceptoFUENTE\", TipoConceptoRetencion.FUENTE);\r\n/* 52: 82 */ query.setParameter(\"tipoConceptoISD\", TipoConceptoRetencion.ISD);\r\n/* 53: 83 */ List<ReporteRetencionesResumido> lista = query.getResultList();\r\n/* 54: */ \r\n/* 55: 85 */ return lista;\r\n/* 56: */ }", "public void getFiveMostLikedComment() {\n Map<Integer, Comment> comments = DataStore.getInstance().getComments();\n List<Comment> commentList = new ArrayList<>(comments.values());\n \n Collections.sort(commentList, new Comparator<Comment>() {\n @Override \n public int compare(Comment o1, Comment o2) {\n return o2.getLikes() - o1.getLikes();\n }\n });\n \n System.out.println(\"5 most likes comments: \");\n for (int i = 0; i < commentList.size() && i < 5; i++) {\n System.out.println(commentList.get(i));\n }\n }", "public void getFiveMostLikedComment() {\n Map<Integer, Comment> comments = DataStore.getInstance().getComments();\n List<Comment> commentList = new ArrayList<>(comments.values());\n \n Collections.sort(commentList, new Comparator<Comment>() {\n @Override \n public int compare(Comment o1, Comment o2) {\n return o2.getLikes() - o1.getLikes();\n }\n });\n \n System.out.println(\"5 most likes comments: \");\n for (int i = 0; i < commentList.size() && i < 5; i++) {\n System.out.println(commentList.get(i));\n }\n }", "public void getFiveMostLikedComment() {\n Map<Integer, Comment> comments = DataStore.getInstance().getComments();\n List<Comment> commentList = new ArrayList<>(comments.values());\n \n Collections.sort(commentList, new Comparator<Comment>() {\n @Override \n public int compare(Comment o1, Comment o2) {\n return o2.getLikes() - o1.getLikes();\n }\n });\n \n System.out.println(\"5 most likes comments: \");\n for (int i = 0; i < commentList.size() && i < 5; i++) {\n System.out.println(commentList.get(i));\n }\n }", "protected int countUsers() \n\t{\n\t\tint result = -1;\n\t\ttry {\n\t\t\tStatement stat = conn.createStatement();\n\t\t\tResultSet rs = stat.executeQuery(\"SELECT COUNT(lfm_username) FROM Persons;\");\n\t\t\tSystem.out.println(rs.toString());\n\t\t\tresult = rs.getInt(1);\n\t\t} \n\t\tcatch (SQLException e) \n\t\t{\n\t\t\tSystem.out.println(\"Something went wrong counting users from Persons\");\n\t\t}\n\t\treturn result;\n\t}", "@Override\r\n\tpublic PageDataList<CustomerBaseinfoModel> customerBaseinfoList(int pageNumber,int pageSize,CustomerBaseinfoModel model) {\n\t\tStringBuffer sb = new StringBuffer();\r\n\t\tsb.append(\" select distinct w.id,w.name,u.real_name,c.sex,u.mobile_phone, \")\r\n\t\t .append(\" (DATE_FORMAT(CURDATE(),'%Y') - SUBSTR(u.card_id,7,4)) age, \")\r\n\t\t .append(\" u.card_id, ab.bank_no,ab.bank,u.add_time,i.real_name_verify_time as real_name_time,i.real_name_verify_time as bind_card_time, \")\r\n\t\t .append(\" c.status,p.coupon_code,a.use_money,u.user_id from rd_user u \")\r\n\t\t .append(\" LEFT JOIN ehb_wealth_user wu ON u.user_id = wu.user_id \")\r\n\t\t .append(\" LEFT JOIN ehb_zc_wealth_manager_user m ON wu.id = m.wealth_user_id \")\t\t\r\n\t\t .append(\" left join ehb_zc_wealth_manager w on m.wealth_manager_id = w.id \" )\r\n\t\t .append(\" left join rd_user_identify i on u.user_id = i.user_id \")\r\n\t\t .append(\" left join rd_user_base_info b on u.user_id = b.user_id \" )\r\n\t\t .append(\" left join rd_user_cache c on u.user_id = c.user_id \" )\r\n\t\t .append(\" left join rd_account_bank ab on u.user_id = ab.user_id \")\r\n\t\t .append(\" left join rd_user_invite ui on u.user_id = ui.user_id \")\r\n\t\t .append(\" left join rd_user_promot p on ui.invite_user = p.user_id \")\r\n\t\t .append(\" left join rd_account a on u.user_id = a.user_id where ab.status = 1 \");\r\n\t\tString strSql = sb.toString();\r\n\t if (!StringUtil.isBlank(model.getSearchName())) {\r\n\t \tstrSql += \" and (u.mobile_phone like '%\" + model.getSearchName() + \"%' \" + \r\n \t \" or u.real_name like '%\" + model.getSearchName() + \"%') \";\r\n\t\t} \r\n\t\tQuery query = em.createNativeQuery(strSql);\r\n\t\tPage page = new Page(query.getResultList().size(), pageNumber,pageSize);\r\n\t\tquery.setFirstResult((pageNumber - 1) * pageSize);\r\n\t\tquery.setMaxResults(pageSize);\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Object[]> list = query.getResultList();\r\n\t\tPageDataList<CustomerBaseinfoModel> pageDataList_ = new PageDataList<CustomerBaseinfoModel>();\r\n List<CustomerBaseinfoModel> cpmList = new ArrayList<CustomerBaseinfoModel>();\r\n pageDataList_.setPage(page);\r\n int i = 1;\r\n \tfor (Object[] o : list) {\r\n \t\tCustomerBaseinfoModel customer = new CustomerBaseinfoModel();\r\n\t\t\tcustomer.setId(i);\r\n\t\t\tcustomer.setSaleCode(o[0]==null?\"\":o[0].toString());\r\n\t\t\tcustomer.setSaleName(o[1]==null?\"\":o[1].toString());\r\n\t\t\tcustomer.setRealName(o[2]==null?\"\":o[2].toString());\r\n\t\t\tcustomer.setSex(o[3]==null?0:((Boolean)o[3]?1:0));\r\n\t\t\tcustomer.setPhone(o[4]==null?\"\":o[4].toString());\r\n\t\t\tcustomer.setAge(o[5]==null?0:((Double)o[5]).intValue());\r\n\t\t\tcustomer.setCertificate(o[6]==null?\"\":o[6].toString());\r\n\t\t\tcustomer.setBankNo(o[7]==null?\"\":o[7].toString());\r\n\t\t\tcustomer.setBank(o[8]==null?\"\":o[8].toString());\r\n\t\t\tcustomer.setRegisterTime(o[9]==null?new Date():(Date)o[9]);\r\n\t\t\tcustomer.setRealNameTime(o[10]==null?new Date():(Date)o[10]);\r\n\t\t\tcustomer.setBindCardTime(o[11]==null?new Date():(Date)o[11]);\r\n\t\t\tcustomer.setAccountState(o[12]==null?0:((Boolean)o[12]?1:0));\r\n\t\t\tcustomer.setRecommendCode(o[13]==null?\"\":o[13].toString());\r\n\t\t\tcustomer.setUseMoney(o[14]==null?0:Double.parseDouble(o[14].toString()));\r\n\t\t\tstrSql = \" select sum(account) from rd_borrow_tender where user_id = \" + (o[15]==null?0:Integer.parseInt(o[15].toString()));\r\n\t\t\tquery = em.createNativeQuery(strSql);\r\n\t\t\tif(query.getResultList()!=null&&query.getResultList().size()>0&&query.getResultList().get(0)!=null)\r\n\t\t\t{\r\n\t\t\t\tString money = query.getResultList().get(0).toString();\r\n\t\t\t\tcustomer.setInvestMoney(Double.parseDouble(money));\r\n\t\t\t}else\r\n\t\t\t{\r\n\t\t\t\tcustomer.setInvestMoney(0.0);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcpmList.add(customer);\r\n\t\t\ti++;\r\n \t}\r\n\t\tpageDataList_.setList(cpmList);\r\n\t\treturn pageDataList_;\r\n\t}", "public int getDonors()\n\t{\n\t\tint donors=0;\n\t\tString query=\"select count(distinct username) from donations\";\n\t\ttry\n\t\t{\n\t\t\tConnection con=DBInfo.getConn();\t\n\t\t\tPreparedStatement ps=con.prepareStatement(query);\n\t\t\tResultSet res=ps.executeQuery();\n\t\t\twhile(res.next())\n\t\t\t{\n\t\t\t\tdonors=res.getInt(1);\n\t\t\t}\n\t\t\tcon.close();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn donors;\n\t}", "public void getInactiveUsersBasedOnComments(){\n Map<Integer,User> users = DataStore.getInstance().getUsers();\n List<User> usersCommentList = new ArrayList<>(users.values());\n \n Comparator<User> test3 = new Comparator<User>() {\n @Override\n public int compare(User u1, User u2) {\n return u1.getComments().size() - u2.getComments().size();\n }\n };\n Collections.sort(usersCommentList, test3);\n \n System.out.println(\"\\nTop five inactive users based on comments:\");\n for(int i = 0; i<usersCommentList.size() && i <5; i++){\n System.out.println(\"User ID :\" + usersCommentList.get(i).getId() +\" \"+ \"No. of Comments:\" + usersCommentList.get(i).getComments().size());\n }\n }", "@Query(\"select count(a) from Reservation a right join a.rendezvous r group by r.id\")\n\tCollection<Double> dashboardUsersPerRendezvous();", "public ArrayList<Cuenta> verClientesConMasDinero() {\n ArrayList<Cuenta> lista = new ArrayList<>();\n try {\n PreparedStatement PrSt;\n ResultSet rs = null;\n String Query = \"SELECT sum(Credito) as Dinero, c.Codigo_Cliente as Codigo, l.Nombre as Nombre FROM Cuenta c join Cliente l on c.Codigo_Cliente = l.Codigo group by Codigo_Cliente order by sum(Credito) desc limit 10\";\n PrSt = conexion.prepareStatement(Query);\n rs = PrSt.executeQuery();\n while (rs.next()) {\n Cuenta cuenta = new Cuenta();\n cuenta.setCredito(rs.getDouble(\"Dinero\"));\n cuenta.setCodigo_cliente(rs.getString(\"Codigo\"));\n cuenta.setCodigo(rs.getString(\"Nombre\"));\n lista.add(cuenta);\n }\n PrSt.close();\n rs.close();\n } catch (SQLException e) {\n System.out.println(e.toString());\n }\n return lista;\n }", "public String report() {\r\n\t\tsession2 = ServletActionContext.getRequest().getSession();\r\n\t\tlogger.info(session2);\r\n\t\tif (session2 == null || session2.getAttribute(\"login\") == null) {\r\n\t\t\tlogger.error(\"if=====session error reporting===='\");\r\n\t\t\treturn LOGIN;\r\n\t\t} else {\r\n\t\t\tfactory = LoginAndSession.getFactory();\r\n\t\t\tdao_userWise = (Productivity_user_wiseDao) factory.getBean(\"d27\");\r\n\t\t\tdao_propwise = (Productivity_property_wiseDao) factory.getBean(\"d29\");\r\n\t\t\tpcw = (Productivity_client_wiseDao) factory.getBean(\"d30\");\r\n\t\t\tif (colorRadio.equalsIgnoreCase(\"red\")) {\r\n\r\n\t\t\t\t// for all user\r\n\t\t\t\ttry {\r\n\t\t\t\t\tlst = dao_userWise\r\n\t\t\t\t\t\t\t.viewRecord(\"select puw.curr_date, puw.source_link, puw.infringing_link, puw.youtube,\"\r\n\t\t\t\t\t\t\t\t\t+ \" puw.social_media, puw.white_list, puw.grey_list, puw.duplicate , mu.name\"\r\n\t\t\t\t\t\t\t\t\t+ \" , puw.facebook, puw.instagram, puw.twitter, puw.vk, puw.periscope, puw.source_domain,\"\r\n\t\t\t\t\t\t\t\t\t+ \" puw.infringing_domain , puw.user_id \"\r\n\t\t\t\t\t\t\t\t\t+ \" from Productivity_user_wise puw, Markscan_users mu where puw.curr_date \"\r\n\t\t\t\t\t\t\t\t\t+ \" between '\" + date + \"' and '\" + date1 + \"' and mu.id= puw.user_id\");\r\n\t\t\t\t\tmonthlyGraph = new ArrayList<>();\r\n\r\n\t\t\t\t\tcud = (Crawle_url2Dao) factory.getBean(\"dash\");\r\n\r\n\t\t\t\t\t// lst1= cud.viewRecord(\"select DISTINCT count(domain_name)\r\n\t\t\t\t\t// ,date(created_on), link_logger from crawle_url3 where\r\n\t\t\t\t\t// user_id= 75 and created_on >'2017-06-01' and\r\n\t\t\t\t\t// link_logger=1 group by date(created_on)\")\r\n\r\n\t\t\t\t\tfor (int i = 0; i < lst.size(); i++) {\r\n\t\t\t\t\t\t obj = (Object[]) lst.get(i);\r\n\r\n\t\t\t\t\t\t data = new DashBoardData();\r\n\r\n\t\t\t\t\t\tdata.setDate(obj[0].toString());\r\n\t\t\t\t\t\tdata.setSource((Integer) obj[1]);\r\n\t\t\t\t\t\tdata.setInfringing((Integer) obj[2]);\r\n\r\n\t\t\t\t\t\tdata.setYoutube((Integer) obj[3]);\r\n\t\t\t\t\t\tdata.setSocial_media((Integer) obj[4]);\r\n\r\n\t\t\t\t\t\tdata.setWhite_list((Integer) obj[5]);\r\n\t\t\t\t\t\tdata.setGrey_list((Integer) obj[6]);\r\n\t\t\t\t\t\tdata.setDuplicate((Integer) obj[7]);\r\n\t\t\t\t\t\tdata.setProj_name(obj[8].toString()); // user_name\r\n\r\n\t\t\t\t\t\tdata.setFacebook((Integer) obj[9]);\r\n\t\t\t\t\t\tdata.setInstagram((Integer) obj[10]);\r\n\t\t\t\t\t\tdata.setTwitter((Integer) obj[11]);\r\n\t\t\t\t\t\tdata.setVk((Integer) obj[12]);\r\n\t\t\t\t\t\tdata.setPeriscope((Integer) obj[13]);\r\n\t\t\t\t\t\tdata.setSource_domain((Integer) obj[14]);\r\n\t\t\t\t\t\tdata.setInfringing_domain((Integer) obj[15]);\r\n\t\t\t\t\t\tdata.setUser_id((Integer) obj[16]);\r\n\t\t\t\t\t\tlst1 = dao_propwise.viewRecord(\r\n\t\t\t\t\t\t\t\t\"select DISTINCT cm.client_name , mp.name , cm.id from Productivity_property_wise ppw, \"\r\n\t\t\t\t\t\t\t\t\t\t+ \" Project_info pi, Client_master cm, Markscan_projecttype mp where \"\r\n\t\t\t\t\t\t\t\t\t\t+ \" ppw.project_id= pi.id and \"\r\n\t\t\t\t\t\t\t\t\t\t+ \" pi.client_type= cm.id and pi.project_type = mp.id and ppw.user_id =\"\r\n\t\t\t\t\t\t\t\t\t\t+ (Integer) obj[16] + \" and \" + \" ppw.created_on = '\" + obj[0].toString()\r\n\t\t\t\t\t\t\t\t\t\t+ \"'\");\r\n\t\t\t\t\t\tin_side = new ArrayList<>();\r\n\t\t\t\t\t\tfor (int i1 = 0; i1 < lst1.size(); i1++) {\r\n\t\t\t\t\t\t\t obj1 = (Object[]) lst1.get(i1);\r\n\r\n\t\t\t\t\t\t\tlst0 = dao_propwise.viewRecord(\"select sum( productivi0_.source_count), \"\r\n\t\t\t\t\t\t\t\t\t+ \" sum( productivi0_.infringing_count),sum( productivi0_.youtube), \"\r\n\t\t\t\t\t\t\t\t\t+ \" sum( productivi0_.facebook), sum(productivi0_.instagram), \"\r\n\t\t\t\t\t\t\t\t\t+ \" sum(productivi0_.twitter),sum(productivi0_.vk), sum(productivi0_.periscope) \"\r\n\t\t\t\t\t\t\t\t\t+ \" from Productivity_property_wise productivi0_, Project_info project_in1_ \"\r\n\t\t\t\t\t\t\t\t\t+ \" where project_in1_.id=productivi0_.project_id and \" + \" productivi0_.user_id=\"\r\n\t\t\t\t\t\t\t\t\t+ (Integer) obj[16] + \" and \" + \" productivi0_.created_on='\" + obj[0].toString()\r\n\t\t\t\t\t\t\t\t\t+ \"' and \" + \"project_in1_.client_type=\" + (Integer) obj1[2]);\r\n\r\n\t\t\t\t\t\t\tfor (int i0 = 0; i0 < lst0.size(); i0++) {\r\n\t\t\t\t\t\t\t\t obj0 = (Object[]) lst0.get(i0);\r\n\r\n\t\t\t\t\t\t\t\t craw = new Crawle_url2();\r\n\t\t\t\t\t\t\t\tcraw.setWid(obj1[0].toString()); // client_name\r\n\t\t\t\t\t\t\t\tcraw.setIs_valid(((Long) obj0[0]).intValue());// source\r\n\t\t\t\t\t\t\t\tcraw.setStatus(((Long) obj0[1]).intValue());// infringing\r\n\t\t\t\t\t\t\t\tcraw.setUser_id(((Long) obj0[2]).intValue());// youtube\r\n\t\t\t\t\t\t\t\tcraw.setProject_id(((Long) obj0[3]).intValue());// FB\r\n\t\t\t\t\t\t\t\tcraw.setType(((Long) obj0[4]).intValue());// instagram\r\n\t\t\t\t\t\t\t\tcraw.setVerified(((Long) obj0[5]).intValue());// twitter\r\n\t\t\t\t\t\t\t\tcraw.setSite_down(((Long) obj0[6]).intValue());// vk\r\n\t\t\t\t\t\t\t\tcraw.setIs_new(((Long) obj0[7]).intValue());// pscp\r\n\r\n\t\t\t\t\t\t\t\tin_side.add(craw);\r\n\t\t\t\t\t\t\t\tobj0=null;\r\n\t\t\t\t\t\t\t\tcraw=null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tobj1=null;\r\n\t\t\t\t\t\t\tlst0 = null;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// System.out.println(client_names);\r\n\t\t\t\t\t\tdata.setInside(in_side);\r\n\r\n\t\t\t\t\t\tmonthlyGraph.add(data);\r\n\t\t\t\t\t\tlst1 = null;\r\n\t\t\t\t\t\tdata=null;\r\n\t\t\t\t\t\t\t\tobj=null;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlst = null;\r\n\t\t\t\t\tlst1 = null;\r\n\t\t\t\t\tlst0 = null;\r\n\t\t\t\t\tdao_userWise = null;\r\n\t\t\t\t\tdao_propwise = null;\r\n\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\treturn ERROR;\r\n\t\t\t\t}\r\n\t\t\t\tfinally{\r\n\t\t\t\t\tobj0=null;\r\n\t\t\t\t\tcraw=null;\r\n\t\t\t\t\tobj1=null;\r\n\t\t\t\t\tlst0 = null;\r\n\t\t\t\t\tlst1 = null;\r\n\t\t\t\t\tdata=null;\r\n\t\t\t\t\t\t\tobj=null;\r\n\t\t\t\t\t\t\tdao_userWise = null;\r\n\t\t\t\t\t\t\tdao_propwise = null;\r\n\t\t\t\t\t\t\tlst = null;\r\n\t\t\t\t\t\t\tfactory=null;\r\n\t\t\t\t\t\t\tdao_userWise=null;\r\n\t\t\t\t\t\t\tdao_propwise=null;\r\n\t\t\t\t\t\t\tsession2=null;\r\n\t\t\t\t}\r\n\t\t\t\tSystem.gc();\r\n\t\t\t\treturn \"allEmpReport\";\r\n\t\t\t} else if (colorRadio.equalsIgnoreCase(\"green\")) {\r\n\t\t\t\t// for single user\r\n\t\t\t\ttry {\r\n\t\t\t\t\tlst = dao_userWise\r\n\t\t\t\t\t\t\t.viewRecord(\"select puw.curr_date, puw.source_link, puw.infringing_link, puw.youtube, \"\r\n\t\t\t\t\t\t\t\t\t+ \" puw.social_media, puw.white_list, puw.grey_list, puw.duplicate , puw.facebook,\"\r\n\t\t\t\t\t\t\t\t\t+ \" puw.instagram, puw.twitter, puw.vk, puw.periscope, puw.source_domain, \"\r\n\t\t\t\t\t\t\t\t\t+ \" puw.infringing_domain from \" + \" Productivity_user_wise puw where puw.user_id=\"\r\n\t\t\t\t\t\t\t\t\t+ usertype + \" and puw.curr_date between\" + \" '\" + date + \"' and '\" + date1 + \"'\");\r\n\t\t\t\t\tmonthlyGraph = new ArrayList<>();\r\n\r\n\t\t\t\t\tfor (int i = 0; i < lst.size(); i++) {\r\n\t\t\t\t\t\t obj = (Object[]) lst.get(i);\r\n\r\n\t\t\t\t\t\t data = new DashBoardData();\r\n\t\t\t\t\t\tdata.setDate(obj[0].toString());\r\n\t\t\t\t\t\tdata.setSource((Integer) obj[1]);\r\n\t\t\t\t\t\tdata.setInfringing((Integer) obj[2]);\r\n\r\n\t\t\t\t\t\tdata.setYoutube((Integer) obj[3]);\r\n\t\t\t\t\t\tdata.setSocial_media((Integer) obj[4]);\r\n\r\n\t\t\t\t\t\tdata.setWhite_list((Integer) obj[5]);\r\n\t\t\t\t\t\tdata.setGrey_list((Integer) obj[6]);\r\n\t\t\t\t\t\tdata.setDuplicate((Integer) obj[7]);\r\n\r\n\t\t\t\t\t\tdata.setFacebook((Integer) obj[8]);\r\n\t\t\t\t\t\tdata.setInstagram((Integer) obj[9]);\r\n\t\t\t\t\t\tdata.setTwitter((Integer) obj[10]);\r\n\t\t\t\t\t\tdata.setVk((Integer) obj[11]);\r\n\t\t\t\t\t\tdata.setPeriscope((Integer) obj[12]);\r\n\t\t\t\t\t\tdata.setSource_domain((Integer) obj[13]);\r\n\t\t\t\t\t\tdata.setInfringing_domain((Integer) obj[14]);\r\n\r\n\t\t\t\t\t\tlst1 = dao_propwise.viewRecord(\r\n\t\t\t\t\t\t\t\t\"select DISTINCT cm.client_name , mp.name , cm.id from Productivity_property_wise ppw, \"\r\n\t\t\t\t\t\t\t\t\t\t+ \" Project_info pi, Client_master cm, Markscan_projecttype mp where \"\r\n\t\t\t\t\t\t\t\t\t\t+ \" ppw.project_id= pi.id and \"\r\n\t\t\t\t\t\t\t\t\t\t+ \" pi.client_type= cm.id and pi.project_type = mp.id and ppw.user_id =\"\r\n\t\t\t\t\t\t\t\t\t\t+ usertype + \" and \" + \" ppw.created_on = '\" + obj[0].toString() + \"'\");\r\n\t\t\t\t\t\tin_side = new ArrayList<>();\r\n\t\t\t\t\t\tfor (int i1 = 0; i1 < lst1.size(); i1++) {\r\n\t\t\t\t\t\t\t obj1 = (Object[]) lst1.get(i1);\r\n\r\n\t\t\t\t\t\t\tlst0 = dao_propwise.viewRecord(\"select sum( productivi0_.source_count), \"\r\n\t\t\t\t\t\t\t\t\t+ \" sum( productivi0_.infringing_count),sum( productivi0_.youtube), \"\r\n\t\t\t\t\t\t\t\t\t+ \" sum( productivi0_.facebook), sum(productivi0_.instagram), \"\r\n\t\t\t\t\t\t\t\t\t+ \" sum(productivi0_.twitter),sum(productivi0_.vk), sum(productivi0_.periscope) \"\r\n\t\t\t\t\t\t\t\t\t+ \" from Productivity_property_wise productivi0_, Project_info project_in1_ \"\r\n\t\t\t\t\t\t\t\t\t+ \" where project_in1_.id=productivi0_.project_id and \" + \" productivi0_.user_id=\"\r\n\t\t\t\t\t\t\t\t\t+ usertype + \" and \" + \" productivi0_.created_on='\" + obj[0].toString() + \"' and \"\r\n\t\t\t\t\t\t\t\t\t+ \"project_in1_.client_type=\" + (Integer) obj1[2]);\r\n\r\n\t\t\t\t\t\t\tfor (int i0 = 0; i0 < lst0.size(); i0++) {\r\n\t\t\t\t\t\t\t\t obj0 = (Object[]) lst0.get(i0);\r\n\r\n\t\t\t\t\t\t\t\t craw = new Crawle_url2();\r\n\t\t\t\t\t\t\t\tcraw.setWid(obj1[0].toString()); // client_name\r\n\t\t\t\t\t\t\t\tcraw.setIs_valid(((Long) obj0[0]).intValue());// source\r\n\t\t\t\t\t\t\t\tcraw.setStatus(((Long) obj0[1]).intValue());// infringing\r\n\t\t\t\t\t\t\t\tcraw.setUser_id(((Long) obj0[2]).intValue());// youtube\r\n\t\t\t\t\t\t\t\tcraw.setProject_id(((Long) obj0[3]).intValue());// FB\r\n\t\t\t\t\t\t\t\tcraw.setType(((Long) obj0[4]).intValue());// instagram\r\n\t\t\t\t\t\t\t\tcraw.setVerified(((Long) obj0[5]).intValue());// twitter\r\n\t\t\t\t\t\t\t\tcraw.setSite_down(((Long) obj0[6]).intValue());// vk\r\n\t\t\t\t\t\t\t\tcraw.setIs_new(((Long) obj0[7]).intValue());// pscp\r\n\r\n\t\t\t\t\t\t\t\tin_side.add(craw);\r\n\t\t\t\t\t\t\t\tobj0=null;\r\n\t\t\t\t\t\t\t\tcraw=null;\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\tobj1=null;\r\n\t\t\t\t\t\t\tlst0=null;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tdata.setInside(in_side);\r\n\t\t\t\t\t\tmonthlyGraph.add(data);\r\n\t\t\t\t\t\tobj=null;\r\n\t\t\t\t\t\tdata= null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlst = null;\r\n\t\t\t\t\tlst1 = null;\r\n\t\t\t\t\tlst0 = null;\r\n\t\t\t\t\tdao_userWise = null;\r\n\t\t\t\t\tdao_propwise = null;\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\treturn ERROR;\r\n\t\t\t\t}\r\n\t\t\t\tfinally\r\n\t\t\t\t{\r\n\t\t\t\t\tlst = null;\r\n\t\t\t\t\tlst1 = null;\r\n\t\t\t\t\tlst0 = null;\r\n\t\t\t\t\tdao_userWise = null;\r\n\t\t\t\t\tdao_propwise = null;\r\n\t\t\t\t\tdata=null;\r\n\t\t\t\t\tcraw= null;\r\n\t\t\t\t\tfactory=null;\r\n\t\t\t\t\tdao_userWise=null;\r\n\t\t\t\t\tdao_propwise=null;\r\n\t\t\t\t\tsession2=null;\r\n\t\t\t\t}\r\n\t\t\t\tSystem.gc();\r\n\t\t\t\treturn \"empReport\";\r\n\t\t\t} else if (colorRadio.equalsIgnoreCase(\"blue\")) {\r\n\t\t\t\t// for client wise\r\n\t\t\t\ttry {\r\n\r\n\t\t\t\t\tlst = pcw.viewRecord(\"select pcw.curr_date, pcw.source_link, pcw.infringing_link, pcw.youtube,\"\r\n\t\t\t\t\t\t\t+ \" pcw.social_media, pcw.white_list, pcw.grey_list , pcw.facebook, pcw.instagram, pcw.twitter,\"\r\n\t\t\t\t\t\t\t+ \" pcw.vk, pcw.periscope, pcw.source_domain, pcw.infringing_domain from Productivity_client_wise \"\r\n\t\t\t\t\t\t\t+ \" pcw where pcw.curr_date between '\" + date + \"' and '\" + date1 + \"' and pcw.client_id=\"\r\n\t\t\t\t\t\t\t+ clientname);\r\n\t\t\t\t\tmonthlyGraph = new ArrayList<>();\r\n\r\n\t\t\t\t\tfor (int i = 0; i < lst.size(); i++) {\r\n\t\t\t\t\t\t obj = (Object[]) lst.get(i);\r\n\r\n\t\t\t\t\t\t data = new DashBoardData();\r\n\t\t\t\t\t\tdata.setDate(obj[0].toString());\r\n\t\t\t\t\t\tdata.setSource((Integer) obj[1]);\r\n\t\t\t\t\t\tdata.setInfringing((Integer) obj[2]);\r\n\r\n\t\t\t\t\t\tdata.setYoutube((Integer) obj[3]);\r\n\t\t\t\t\t\tdata.setSocial_media((Integer) obj[4]);\r\n\r\n\t\t\t\t\t\tdata.setWhite_list((Integer) obj[5]);\r\n\t\t\t\t\t\tdata.setGrey_list((Integer) obj[6]);\r\n\r\n\t\t\t\t\t\tdata.setFacebook((Integer) obj[7]);\r\n\t\t\t\t\t\tdata.setInstagram((Integer) obj[8]);\r\n\t\t\t\t\t\tdata.setTwitter((Integer) obj[9]);\r\n\t\t\t\t\t\tdata.setVk((Integer) obj[10]);\r\n\t\t\t\t\t\tdata.setPeriscope((Integer) obj[11]);\r\n\r\n\t\t\t\t\t\tdata.setSocial_media((Integer) obj[7] + (Integer) obj[8] + (Integer) obj[9] + (Integer) obj[10]\r\n\t\t\t\t\t\t\t\t+ (Integer) obj[11]);\r\n\r\n\t\t\t\t\t\tdata.setSource_domain((Integer) obj[12]);\r\n\t\t\t\t\t\tdata.setInfringing_domain((Integer) obj[13]);\r\n\r\n\t\t\t\t\t\tlst1 = dao_propwise.viewRecord(\r\n\t\t\t\t\t\t\t\t\"select DISTINCT mu.name, ppw.created_on ,ppw.user_id from Productivity_property_wise ppw ,\"\r\n\t\t\t\t\t\t\t\t\t\t+ \" Markscan_users mu where mu.id= ppw.user_id and ppw.client_id = \"\r\n\t\t\t\t\t\t\t\t\t\t+ clientname + \" and ppw.created_on='\" + obj[0].toString() + \"' \");\r\n\t\t\t\t\t\tin_side = new ArrayList<>();\r\n\t\t\t\t\t\tfor (int i1 = 0; i1 < lst1.size(); i1++) {\r\n\t\t\t\t\t\t\t obj1 = (Object[]) lst1.get(i1);\r\n\r\n\t\t\t\t\t\t\tlst0 = dao_propwise.viewRecord(\" select sum( productivi0_.source_count),\"\r\n\t\t\t\t\t\t\t\t\t+ \" sum(productivi0_.infringing_count),sum( productivi0_.youtube), \"\r\n\t\t\t\t\t\t\t\t\t+ \" sum(productivi0_.facebook),sum(productivi0_.instagram),sum(productivi0_.twitter) \"\r\n\t\t\t\t\t\t\t\t\t+ \" ,sum(productivi0_.vk),sum( productivi0_.periscope) from \"\r\n\t\t\t\t\t\t\t\t\t+ \" Productivity_property_wise productivi0_, Markscan_users markscan_u1_ where \"\r\n\t\t\t\t\t\t\t\t\t+ \" markscan_u1_.id=productivi0_.user_id and productivi0_.client_id= \" + clientname\r\n\t\t\t\t\t\t\t\t\t+ \" and productivi0_.created_on='\" + obj[0].toString() + \"' and \"\r\n\t\t\t\t\t\t\t\t\t+ \" productivi0_.user_id=\" + (Integer) obj1[2]);\r\n\r\n\t\t\t\t\t\t\tfor (int i0 = 0; i0 < lst0.size(); i0++) {\r\n\t\t\t\t\t\t\t\t obj0 = (Object[]) lst0.get(i0);\r\n\r\n\t\t\t\t\t\t\t\t craw = new Crawle_url2();\r\n\t\t\t\t\t\t\t\tcraw.setWid(obj1[0].toString()); // client_name\r\n\t\t\t\t\t\t\t\tcraw.setIs_valid(((Long) obj0[0]).intValue());// source\r\n\t\t\t\t\t\t\t\tcraw.setStatus(((Long) obj0[1]).intValue());// infringing\r\n\t\t\t\t\t\t\t\tcraw.setUser_id(((Long) obj0[2]).intValue());// youtube\r\n\t\t\t\t\t\t\t\tcraw.setProject_id(((Long) obj0[3]).intValue());// FB\r\n\t\t\t\t\t\t\t\tcraw.setType(((Long) obj0[4]).intValue());// instagram\r\n\t\t\t\t\t\t\t\tcraw.setVerified(((Long) obj0[5]).intValue());// twitter\r\n\t\t\t\t\t\t\t\tcraw.setSite_down(((Long) obj0[6]).intValue());// vk\r\n\t\t\t\t\t\t\t\tcraw.setIs_new(((Long) obj0[7]).intValue());// pscp\r\n\r\n\t\t\t\t\t\t\t\tin_side.add(craw);\r\n\t\t\t\t\t\t\t\tobj0=null;\r\n\t\t\t\t\t\t\t\tcraw=null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tobj1=null;\r\n\t\t\t\t\t\t\tlst0=null;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tdata.setInside(in_side);\r\n\r\n\t\t\t\t\t\tmonthlyGraph.add(data);\r\n\t\t\t\t\t\tobj= null;\r\n\t\t\t\t\t\tdata= null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tpcw = null;\r\n\t\t\t\t\tlst = null;\r\n\t\t\t\t\tlst1 = null;\r\n\t\t\t\t\tlst0 = null;\r\n\t\t\t\t\tdao_userWise = null;\r\n\t\t\t\t\tdao_propwise = null;\r\n\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\treturn ERROR;\r\n\t\t\t\t}\r\n\t\t\t\tfinally{\r\n\t\t\t\t\tpcw = null;\r\n\t\t\t\t\tlst = null;\r\n\t\t\t\t\tlst1 = null;\r\n\t\t\t\t\tlst0 = null;\r\n\t\t\t\t\tdao_userWise = null;\r\n\t\t\t\t\tdao_propwise = null;\r\n\t\t\t\t\tobj=null;\r\n\t\t\t\t\tdata=null;\r\n\t\t\t\t\tcraw=null;\r\n\t\t\t\t\tfactory=null;\r\n\t\t\t\t\tdao_userWise=null;\r\n\t\t\t\t\tdao_propwise=null;\r\n\t\t\t\t\tsession2=null;\r\n\t\t\t\t}\r\n\t\t\t\tSystem.gc();\r\n\t\t\t\treturn \"clientReport\";\r\n\t\t\t}\r\n\r\n\t\t\tfactory=null;\r\n\t\t\tdao_userWise=null;\r\n\t\t\tdao_propwise=null;\r\n\t\t\tsession2=null;\r\n\t\t\tSystem.gc();\r\n\t\t\treturn SUCCESS;\r\n\t\t}\r\n\t}", "public ResultSet Reuser1()throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select c.user_id,c.first_name,c.last_name from customer c,login l where l.login_id=c.login_id and l.usertype='user' and l.status='approved'\");\r\n\treturn rs;\r\n}", "public static String todosLosEmpleados(){\n String query=\"SELECT empleado.idEmpleado, persona.nombre, persona.apePaterno, persona.apeMaterno, empleado.codigo, empleado.fechaIngreso,persona.codigoPostal,persona.domicilio,\" +\n\"empleado.puesto, empleado.salario from persona inner join empleado on persona.idPersona=empleado.idPersona where activo=1;\";\n return query;\n }", "public List<ReporteComprasVentasRetenciones> getReporteCompras(int mes, int anio, int idOrganizacion)\r\n/* 167: */ {\r\n/* 168:227 */ StringBuffer sql = new StringBuffer();\r\n/* 169: */ \r\n/* 170:229 */ sql.append(\" SELECT new ReporteComprasVentasRetenciones(tc.codigo, tc.nombre, COUNT(tc.codigo), \");\r\n/* 171:230 */ sql.append(\" (CASE WHEN tc.codigo = '04' THEN -SUM(fps.baseImponibleTarifaCero) ELSE SUM(fps.baseImponibleTarifaCero) END), \");\r\n/* 172:231 */ sql.append(\" (CASE WHEN tc.codigo = '04' THEN -SUM(fps.baseImponibleDiferenteCero) ELSE SUM(fps.baseImponibleDiferenteCero) END), \");\r\n/* 173:232 */ sql.append(\" (CASE WHEN tc.codigo = '04' THEN -SUM(fps.baseImponibleNoObjetoIva) ELSE SUM(fps.baseImponibleNoObjetoIva) END), \");\r\n/* 174:233 */ sql.append(\" (CASE WHEN tc.codigo = '04' THEN -SUM(fps.montoIva) ELSE SUM(fps.montoIva) END), 'Compras',ct.codigo,ct.nombre) \");\r\n/* 175:234 */ sql.append(\" FROM FacturaProveedorSRI fps \");\r\n/* 176:235 */ sql.append(\" LEFT OUTER JOIN fps.tipoComprobanteSRI tc \");\r\n/* 177:236 */ sql.append(\" LEFT OUTER JOIN fps.creditoTributarioSRI ct\");\r\n/* 178:237 */ sql.append(\" WHERE MONTH(fps.fechaRegistro) =:mes \");\r\n/* 179:238 */ sql.append(\" AND YEAR(fps.fechaRegistro) =:anio \");\r\n/* 180:239 */ sql.append(\" AND fps.estado!=:estadoAnulado \");\r\n/* 181:240 */ sql.append(\" AND fps.indicadorSaldoInicial!=true \");\r\n/* 182:241 */ sql.append(\" AND fps.idOrganizacion = :idOrganizacion \");\r\n/* 183:242 */ sql.append(\" GROUP BY tc.codigo, tc.nombre,ct.codigo,ct.nombre\");\r\n/* 184:243 */ sql.append(\" ORDER BY tc.codigo, tc.nombre \");\r\n/* 185: */ \r\n/* 186:245 */ Query query = this.em.createQuery(sql.toString());\r\n/* 187:246 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 188:247 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 189:248 */ query.setParameter(\"estadoAnulado\", Estado.ANULADO);\r\n/* 190:249 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 191: */ \r\n/* 192:251 */ return query.getResultList();\r\n/* 193: */ }", "public String displayNameTickets(){\n String p = \" \";\n try {\n \n rs = stmt.executeQuery \n (\"select * from JEREMY.TICKET ORDER BY NAME\");\n p = loopDBInfo(rs);\n \n } catch (Exception e) {\n System.out.println(\"SQL problem \" + e);\n } \n return p;\n \n }", "public List<Sale> saleListArtistCount() {\n List<Sale> saleList = new ArrayList<Sale>();\n\n try {\n conn = DBConnection.getConnection();\n stm = conn.createStatement();\n result = stm.executeQuery(\"SELECT name,\\n\"\n + \"COUNT (*) \\n\"\n + \"FROM disquera.artist JOIN disquera.sale ON artist.id_artist = sale.id_artist\\n\"\n + \"GROUP BY artist.name ORDER BY artist.name\");\n //result_album = stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.album on sale.id_album=album.id_album\");\n //result_artist=stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.artist on sale.id_artist=artist.id_artist\");\n while (result.next()) {\n Sale newSale = new Sale();\n\n newSale.setArtistName(result.getString(1));\n newSale.setCount(result.getInt(2));\n //System.out.println(\"\\n\\n Received data: \\n Id: \" + newSale.getId_sale() + \"\\nPrecio: \" + newSale.getPrice());\n saleList.add(newSale);\n /*\n System.out.println(\"No existe un usuario con esa contraseña\");\n conn.close();\n return null;\n */\n }\n result.close();\n stm.close();\n conn.close();\n } catch (SQLException ex) {\n ex.getStackTrace();\n return null;\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(DAOGenre.class.getName()).log(Level.SEVERE, null, ex);\n }\n return saleList;\n }", "void fetchNudges() {\n Log.d(LOG_TAG, \"Fetch nudges started\");\n mExecutors.networkIO().execute(() -> {\n try {\n\n if (mNudgeAdapter != null) {\n\n if (mUserRef != null) {\n //Fetch more data\n if (mNudgeAdapter.getItemCount() != 0) {\n DocumentSnapshot snapshot = mFirestoreAdapter.getSnapshot(mFirestoreAdapter.getItemCount() - 1);\n\n mNudgesQuery = mUserRef\n .collection(ReferenceNames.NUDGES)\n .orderBy(ReferenceNames.TIMESTAMP, Query.Direction.DESCENDING)\n .limit(fetchLimit)\n .startAfter(snapshot);\n\n } else {\n\n mNudgesQuery = mUserRef\n .collection(ReferenceNames.NUDGES)\n .orderBy(ReferenceNames.TIMESTAMP, Query.Direction.DESCENDING)\n .limit(fetchLimit);\n\n }\n } else Log.d(LOG_TAG, \"fetchNudges, user reference is null \");\n\n Log.d(LOG_TAG, \"Fetch Nudges, setting query\");\n mNudgeAdapter.setQuery(mNudgesQuery);\n }\n } catch (Exception e) {\n // Server probably invalid\n e.printStackTrace();\n }\n });\n }", "public List<ReporteComprasVentasRetenciones> getReporteRetencionClientes(int mes, int anio, int idOrganizacion)\r\n/* 231: */ {\r\n/* 232:307 */ StringBuffer sql = new StringBuffer();\r\n/* 233:308 */ sql.append(\"SELECT new ReporteComprasVentasRetenciones(fp.codigo, fp.nombre, COUNT(fp.codigo),\");\r\n/* 234:309 */ sql.append(\" (CASE WHEN fp.indicadorRetencionIva = true OR fp.indicadorRetencionFuente = true THEN SUM(dcfc.valor) END),\");\r\n/* 235:310 */ sql.append(\" 'Ventas', '' )\");\r\n/* 236:311 */ sql.append(\" FROM DetalleCobroFormaCobro dcfc\");\r\n/* 237:312 */ sql.append(\" JOIN dcfc.detalleFormaCobro dfc\");\r\n/* 238:313 */ sql.append(\" LEFT JOIN dfc.cobro c\");\r\n/* 239:314 */ sql.append(\" LEFT OUTER JOIN dfc.formaPago fp\");\r\n/* 240:315 */ sql.append(\" LEFT OUTER JOIN dcfc.detalleCobro dc\");\r\n/* 241:316 */ sql.append(\" LEFT OUTER JOIN dc.cuentaPorCobrar cpc\");\r\n/* 242:317 */ sql.append(\" LEFT OUTER JOIN cpc.facturaCliente fc\");\r\n/* 243:318 */ sql.append(\" WHERE MONTH(c.fecha) =:mes\");\r\n/* 244:319 */ sql.append(\" AND YEAR(c.fecha) =:anio\");\r\n/* 245:320 */ sql.append(\" AND fc.estado!=:estadoAnulado\");\r\n/* 246:321 */ sql.append(\" AND c.estado!=:estadoAnulado\");\r\n/* 247:322 */ sql.append(\" AND (fp.indicadorRetencionIva=true OR fp.indicadorRetencionFuente=true)\");\r\n/* 248:323 */ sql.append(\" AND fc.idOrganizacion = :idOrganizacion\");\r\n/* 249:324 */ sql.append(\" GROUP BY fp.codigo, fp.nombre, fp.indicadorRetencionIva, fp.indicadorRetencionFuente\");\r\n/* 250:325 */ sql.append(\" ORDER BY fp.codigo, fp.nombre\");\r\n/* 251:326 */ Query query = this.em.createQuery(sql.toString());\r\n/* 252:327 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 253:328 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 254:329 */ query.setParameter(\"estadoAnulado\", Estado.ANULADO);\r\n/* 255:330 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 256:331 */ return query.getResultList();\r\n/* 257: */ }", "@Override\n public Long countByCriteria(String[] layerList, String[] taxonList, String[] indicList,String colum) {\n //Build the query string base on parameters\n StringBuilder query = new StringBuilder();\n query.append(\"Select count(distinct \"+colum+\") from ait.taxon_info_index where \");\n \n //If there is geografical criteria\n if(layerList.length>0 && !layerList[0].equals(\"\")){\n query.append(\"(\");\n for(int i = 0;i<layerList.length;i++){\n String[] aux = layerList[i].split(\"~\");\n String layer = aux[0];\n String polygon = aux[1];\n if(i==layerList.length-1){ //last element\n query.append(\"(layer_table = '\"+layer+\"' and polygom_id = \"+polygon+\")\");\n }\n else{\n query.append(\"(layer_table = '\"+layer+\"' and polygom_id = \"+polygon+\") or \");\n }\n }\n query.append(\")\");\n }\n \n //If there is taxonomy criteria\n if(taxonList.length>0 && !taxonList[0].equals(\"\")){\n if(layerList.length>0 && !layerList[0].equals(\"\")){\n query.append(\" and (\");\n }\n else{\n query.append(\"(\");\n }\n for(int i = 0;i<taxonList.length;i++){\n //Get the name and taxonomical level of the specified taxon\n TaxonIndex ti = taxonIndexDAO.getTaxonIndexByName(taxonList[i]);\n if(ti.getTaxon_id()!=null){\n //To search in the specified taxonomyField\n String levelColum;\n switch (ti.getTaxon_range().intValue()) {\n case 1:\n levelColum = TaxonomicalRange.KINGDOM.getFieldName();\n break;\n case 2:\n levelColum = TaxonomicalRange.PHYLUM.getFieldName();\n break;\n case 3:\n levelColum = TaxonomicalRange.CLASS.getFieldName();\n break;\n case 4:\n levelColum = TaxonomicalRange.ORDER.getFieldName();\n break;\n case 5:\n levelColum = TaxonomicalRange.FAMILY.getFieldName();\n break;\n case 6:\n levelColum = TaxonomicalRange.GENUS.getFieldName();\n break;\n case 7:\n levelColum = TaxonomicalRange.SPECIFICEPITHET.getFieldName();\n break;\n default:\n levelColum = TaxonomicalRange.SCIENTIFICNAME.getFieldName();\n break;\n }\n if(i==taxonList.length-1){ //last element\n query.append(\"(\"+levelColum+\" = \"+ti.getTaxon_id()+\")\");\n }\n else{\n query.append(\"(\"+levelColum+\" = \"+ti.getTaxon_id()+\") or \");\n }\n }\n else{ //If the taxon doesn't exist on data base\n String levelColum = TaxonomicalRange.KINGDOM.getFieldName();\n if(i==taxonList.length-1){ //last element\n query.append(\"(\"+levelColum+\" = \"+-1+\")\");\n }\n else{\n query.append(\"(\"+levelColum+\" = \"+-1+\") or \");\n }\n }\n }\n query.append(\")\");\n }\n \n //If there is indicators criteria\n if(indicList.length>0 && !indicList[0].equals(\"\")){\n if((taxonList.length>0 && !taxonList[0].equals(\"\"))||(layerList.length>0 && !layerList[0].equals(\"\"))){\n query.append(\" and (\");\n }\n else{\n query.append(\"(\");\n }\n for(int i = 0;i<indicList.length;i++){\n if(i==indicList.length-1){ //last element\n query.append(\"(indicator_id = \"+indicList[i]+\")\");\n }\n else{\n query.append(\"(indicator_id = \"+indicList[i]+\") or \");\n }\n }\n query.append(\")\");\n }\n \n //Execute query\n return taxonInfoIndexDAO.countTaxonsByQuery(query.toString());\n }", "public static String selectDef5763_1(ConnectionProvider connectionProvider, String CreatedByR) throws ServletException {\n String strSql = \"\";\n strSql = strSql + \n \" SELECT ( COALESCE(TO_CHAR(table1.Name), '') ) as CreatedBy FROM AD_User table1 WHERE table1.isActive='Y' AND table1.AD_User_ID = ? \";\n\n ResultSet result;\n String strReturn = \"\";\n PreparedStatement st = null;\n\n int iParameter = 0;\n try {\n st = connectionProvider.getPreparedStatement(strSql);\n iParameter++; UtilSql.setValue(st, iParameter, 12, null, CreatedByR);\n\n result = st.executeQuery();\n if(result.next()) {\n strReturn = UtilSql.getValue(result, \"createdby\");\n }\n result.close();\n } catch(SQLException e){\n log4j.error(\"SQL error in query: \" + strSql + \"Exception:\"+ e);\n throw new ServletException(\"@CODE=\" + e.getSQLState() + \"@\" + e.getMessage());\n } catch(Exception ex){\n log4j.error(\"Exception in query: \" + strSql + \"Exception:\"+ ex);\n throw new ServletException(\"@CODE=@\" + ex.getMessage());\n } finally {\n try {\n connectionProvider.releasePreparedStatement(st);\n } catch(Exception ignore){\n ignore.printStackTrace();\n }\n }\n return(strReturn);\n }", "@Query (\"SELECT c.client, COUNT(c.client) from Reserva AS c group by c.client order by COUNT(c.client)DESC\")\r\n public List<Object[]> countTotalReservationsByClient();", "@Override\n public List getMostViewedPages(Long count, String orderBy) {\n log.debug(\"This fetches most viewed pages with count : {}\", count);\n TreeMap<String, Integer> responseMap = new TreeMap<>();\n HashMap<String, Integer> checkPagesMap = new HashMap<>();\n List<String> eventLabelList = csvRepository.findAllEventLabel();\n if (eventLabelList == null) {\n throw new CsvException(String.format(\"Event_label column is empty, please insert some records\"));\n }\n for (String cc : eventLabelList) {\n if (checkPagesMap.containsKey(cc)) {\n checkPagesMap.put(cc, checkPagesMap.get(cc)+1);\n } else {\n checkPagesMap.put(cc,1);\n }\n }\n List<String> listOfPages = new ArrayList<>();\n responseMap.putAll(checkPagesMap);\n for (int i = 1; i <= count; i++) {\n for (Map.Entry<String, Integer> entry : responseMap.entrySet()) {\n listOfPages.add(entry.getKey());\n }\n }\n log.debug(\"List of pages fetched successfully\");\n return listOfPages;\n }", "@Query(value = \"SELECT coupons_id FROM customers_coupons ORDER BY coupons_id ASC\", nativeQuery = true)\n List<Integer> findByPopularity();", "int getUsersCount();", "int getUsersCount();", "int getUsersCount();", "private int getArtisteDownloadedMostByAllUsers(){\n \n SessionFactory sessionFactory = (SessionFactory)servletContext.getAttribute(OpusApplication.HIBERNATE_SESSION_FACTORY) ;\n Session session = sessionFactory.openSession() ;\n Query query = session.createQuery(\"SELECT mvd, mvd.musicVideo.artiste.id, count(*) FROM MusicVideoDownload mvd JOIN FETCH mvd.musicVideo GROUP BY mvd.musicVideo.artiste.id ORDER BY count(*) DESC\") ;\n query.setMaxResults(1) ;\n List resultSet = query.list() ;\n session.close() ;\n //if there is no result set, it means there are no downloads so return -1\n if(resultSet.isEmpty())\n return -1 ;\n //else return the artiste id field of the first tuple since the result set has been sorted in desc order\n Object[] tupleFields = (Object[])resultSet.get(0) ;\n return (int)tupleFields[1] ;\n }", "public void getAllCursosAvanzado() {\n String query = \"\";\n Conexion db = new Conexion();\n\n try {\n query = \"SELECT id_curso, nombre_curso, familia.nombre_familia as familia, id_profesor FROM curso \"\n + \"INNER JOIN familia ON curso.id_familia = familia.id_familia;\";\n Statement stm = db.conectar().createStatement();\n ResultSet rs = stm.executeQuery(query);\n \n\n while (rs.next()) {\n \n int id = rs.getInt(\"id_curso\");\n String nombre = rs.getString(\"nombre_curso\");\n String familia = rs.getString(\"familia\");\n String profesor = rs.getString(\"id_profesor\");\n\n // Imprimir los resultados.\n \n System.out.format(\"%d,%s,%s,%s\\n\", id, nombre, familia, profesor);\n\n }\n\n stm.close();\n db.conexion.close();\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\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}", "@SuppressWarnings(\"unused\")\n public static String queryTaskSummariesOracle() {\n return OPENING_SCRIPT_TAG\n + \"SELECT \"\n + commonSelectFieldsOracle()\n + \"<if test=\\\"addAttachmentColumnsToSelectClauseForOrdering\\\">\"\n + \", a2.CLASSIFICATION_ID, a2.CLASSIFICATION_KEY, a2.CHANNEL, a2.REF_VALUE, a2.RECEIVED\"\n + \"</if>\"\n + \"<if test=\\\"addClassificationNameToSelectClauseForOrdering\\\">, c2.NAME </if>\"\n + \"<if test=\\\"addAttachmentClassificationNameToSelectClauseForOrdering\\\">, ac2.NAME </if>\"\n + \"<if test=\\\"addWorkbasketNameToSelectClauseForOrdering\\\">, w2.NAME </if>\"\n + \"<if test=\\\"joinWithUserInfo\\\">, u2.LONG_NAME </if>\"\n + \"FROM TASK t2 \"\n + \"<if test=\\\"joinWithAttachments\\\">LEFT JOIN ATTACHMENT a2 ON t2.ID = a2.TASK_ID </if>\"\n + \"<if test=\\\"joinWithSecondaryObjectReferences\\\">LEFT JOIN OBJECT_REFERENCE o2 \"\n + \"ON t2.ID = o2.TASK_ID </if>\"\n + \"<if test=\\\"joinWithClassifications\\\">LEFT JOIN CLASSIFICATION c2 \"\n + \"ON t2.CLASSIFICATION_ID = c2.ID </if>\"\n + \"<if test=\\\"joinWithAttachmentClassifications\\\">LEFT JOIN CLASSIFICATION ac2 \"\n + \"ON a2.CLASSIFICATION_ID = ac2.ID </if>\"\n + \"<if test=\\\"joinWithWorkbaskets\\\">LEFT JOIN WORKBASKET w2 \"\n + \"ON t2.WORKBASKET_ID = w2.ID </if>\"\n + \"<if test=\\\"joinWithUserInfo\\\">LEFT JOIN USER_INFO u2 ON t2.owner = u2.USER_ID </if>\"\n + \"WHERE t2.rowid = (SELECT <if test=\\\"useDistinctKeyword\\\">DISTINCT</if> t.rowid \"\n + \"FROM TASK t \"\n + \"<if test=\\\"joinWithAttachments\\\">LEFT JOIN ATTACHMENT a ON t.ID = a.TASK_ID </if>\"\n + \"<if test=\\\"joinWithSecondaryObjectReferences\\\">LEFT JOIN OBJECT_REFERENCE o \"\n + \"ON t.ID = o.TASK_ID </if>\"\n + \"<if test=\\\"joinWithClassifications\\\">LEFT JOIN CLASSIFICATION c \"\n + \"ON t.CLASSIFICATION_ID = c.ID </if>\"\n + \"<if test=\\\"joinWithAttachmentClassifications\\\">LEFT JOIN CLASSIFICATION ac \"\n + \"ON a.CLASSIFICATION_ID = ac.ID </if>\"\n + \"<if test=\\\"joinWithWorkbaskets\\\">LEFT JOIN WORKBASKET w \"\n + \"ON t.WORKBASKET_ID = w.ID </if>\"\n + \"<if test=\\\"joinWithUserInfo\\\">LEFT JOIN USER_INFO u ON t.owner = u.USER_ID </if>\"\n + OPENING_WHERE_TAG\n + commonTaskWhereStatement()\n + \"<if test='selectAndClaim == true'> AND t.STATE = 'READY' </if>\"\n + CLOSING_WHERE_TAG\n + \"<if test='!orderByOuter.isEmpty()'>\"\n + \"ORDER BY <foreach item='item' collection='orderByOuter' separator=',' >${item}</foreach>\"\n + \"</if> \"\n + \"fetch first 1 rows only \"\n + \") FOR UPDATE\"\n + CLOSING_SCRIPT_TAG;\n }", "public ArrayList<Message> getTop10Messages(String logUser, String friendUser, String date){\n ArrayList<Message> myMessageList = new ArrayList<>();\r\n //System.out.println(\"getTop10Date: \" + date);\r\n this.query = \"SELECT * FROM cristomessenger.message\\n\" +\r\n \"WHERE ((id_user_orig = \\\"\" + logUser + \"\\\" and id_user_dest = \\\"\" + friendUser + \"\\\") or (\"\r\n + \"id_user_orig = \\\"\" + friendUser + \"\\\" and id_user_dest = \\\"\" + logUser + \"\\\")) and \"\r\n + \"datetime < \\\"\" + date + \"\\\" \" +\r\n \"order by datetime asc LIMIT 10;\";\r\n try {\r\n this.ConnectDatabase();\r\n this.QuerySQLExecute();\r\n while (this.rs.next()) {\r\n Message MessageAux = new Message();\r\n MessageAux.setTransmitter(this.rs.getString(\"id_user_orig\"));\r\n MessageAux.setReceiver(this.rs.getString(\"id_user_dest\"));\r\n MessageAux.setText(this.rs.getString(\"text\"));\r\n MessageAux.setDate(this.rs.getString(\"datetime\"));\r\n myMessageList.add(MessageAux);\r\n }\r\n //System.out.println(\"getTop10MSG: \" + myMessageList.size());\r\n } catch (SQLException e ) {\r\n System.out.println(e.getMessage());\r\n } finally {\r\n if (this.stmt != null) { \r\n try {\r\n this.stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(UsersModel.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n \r\n return myMessageList;\r\n }", "public List<Integer> findTopGenesByPaperCnt( Integer n ) throws DAOException;", "@Override\n public void executeOperation( LdbcQuery5 ldbcQuery5, DbConnectionState dbConnectionState, ResultReporter resultReporter ) throws DbException\n {\n\n Client client = ((GremlinDbConnectionState) dbConnectionState).getClient();\n Map<String, Object> params = new HashMap<>();\n params.put( \"person_id\", GremlinUtils.makeIid( Entity.PERSON, ldbcQuery5.personId() ) );\n params.put( \"person_label\", Entity.PERSON.getName() );\n params.put( \"min_date\", ldbcQuery5.minDate().getTime() );\n params.put( \"result_limit\", ldbcQuery5.limit() );\n\n String statement = \"g.V().has(person_label, 'iid', person_id).aggregate('0').\" +\n \"repeat(out('knows').aggregate('fof')).times(2).\" +\n \"cap('fof').unfold().where(without('0')).dedup().aggregate('member').\" +\n \"inE('hasMember').has('joinDate',gte(min_date)).outV().dedup().\" +\n \"match(\" +\n \" __.as('forum_name').outE('hasMember').has('joinDate',gte(min_date)).inV().where(within('member')).aggregate('forummembers'),\" +\n \" __.as('forum_name').out('containerOf').as('post').out('hasCreator').where(within('forummembers')).select('post').count().as('postcount')\" +\n \").select('forum_name').dedup().\" +\n \"order().by(select('postcount'), decr).by('iid_long').\" +\n \"limit(result_limit).select('forum_name', 'postcount').by('title').by()\";\n\n List<Result> results;\n try\n {\n results = client.submit( statement, params ).all().get();\n }\n catch ( InterruptedException | ExecutionException e )\n {\n throw new DbException( \"Remote execution failed\", e );\n }\n\n List<LdbcQuery5Result> resultList = new ArrayList<>();\n\n for ( Result r : results )\n {\n HashMap map = r.get( HashMap.class );\n String forum_name = (String) map.get( \"forum_name\" );\n Long count = (Long) map.get( \"postcount\" );\n\n LdbcQuery5Result ldbcQuery5Result = new LdbcQuery5Result(\n forum_name,\n count.intValue()\n );\n\n resultList.add( ldbcQuery5Result );\n }\n\n resultReporter.report( resultList.size(), resultList, ldbcQuery5 );\n }", "public int liked(int i,String j) {\n \r\n List<Integer> list =new ArrayList();\r\n try{\r\n pst = con.prepareStatement(\"select * from likes where blog=\"+i+\"&& user=\"+j+\" \");\r\n ResultSet rs = pst.executeQuery();\r\n \r\n while(rs.next()){\r\n //créer une instance vide de personne()\r\n \r\n list.add(rs.getInt(1));\r\n //afficher l'instane \r\n //System.out.println(l);\r\n \r\n }\r\n \r\n } catch (SQLException ex) {\r\n Logger.getLogger(CommentaireService.class.getName()).log(Level.SEVERE, null, ex);\r\n } \r\n System.out.println(list);\r\n return list.size();\r\n \r\n\r\n }", "public ArrayList<String> queryPrecinct() {\r\n\t\tArrayList<String> list = new ArrayList<String>();\r\n\t\tif (DBConnection.conn == null) {\r\n\t\t\tDBConnection.openConn();\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tString sql = \"select distinct precinct from InspectionPersonnel\";\r\n\t\t\tps = DBConnection.conn.prepareStatement(sql);\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tlist.add(rs.getString(1));\r\n\t\t\t}\r\n\t\t\tDBConnection.closeResultSet(rs);\r\n\t\t\tDBConnection.closeStatement(ps);\r\n\t\t\tDBConnection.closeConn();\r\n\t\t\treturn list;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public static String selectDef1002100040_0(ConnectionProvider connectionProvider, String CreatedbyR) throws ServletException {\n String strSql = \"\";\n strSql = strSql + \n \" SELECT ( COALESCE(TO_CHAR(TO_CHAR(COALESCE(TO_CHAR(table2.Name), ''))), '') ) as Createdby FROM AD_User left join (select AD_User_ID, Name from AD_User) table2 on (AD_User.AD_User_ID = table2.AD_User_ID) WHERE AD_User.isActive='Y' AND AD_User.AD_User_ID = ? \";\n\n ResultSet result;\n String strReturn = \"\";\n PreparedStatement st = null;\n\n int iParameter = 0;\n try {\n st = connectionProvider.getPreparedStatement(strSql);\n QueryTimeOutUtil.getInstance().setQueryTimeOut(st, SessionInfo.getQueryProfile());\n iParameter++; UtilSql.setValue(st, iParameter, 12, null, CreatedbyR);\n\n result = st.executeQuery();\n if(result.next()) {\n strReturn = UtilSql.getValue(result, \"createdby\");\n }\n result.close();\n } catch(SQLException e){\n log4j.error(\"SQL error in query: \" + strSql + \"Exception:\"+ e);\n throw new ServletException(\"@CODE=\" + Integer.toString(e.getErrorCode()) + \"@\" + e.getMessage());\n } catch(Exception ex){\n log4j.error(\"Exception in query: \" + strSql + \"Exception:\"+ ex);\n throw new ServletException(\"@CODE=@\" + ex.getMessage());\n } finally {\n try {\n connectionProvider.releasePreparedStatement(st);\n } catch(Exception ignore){\n ignore.printStackTrace();\n }\n }\n return(strReturn);\n }", "public Vector listICPUserRegBasedOnReleaseId(String releaseId) throws SQLException {\n Debug.print(\"Inside the getUserAndMemberId\");\n Vector vObj = new Vector();\n try {\n makeConnection();\n String slelctStr = \"select A.assesment_level, A.assesment_date, A.no_of_days, B.area_name, \"+\n \" A.location, C.first_name, C.last_name, D.address1, D.country, D.state, \"+\n \"D.zip, D.phone_no, D.fax_no, E.membership_status, E.member_id, E.add_date, E.request_status,C.email_id, D.city,E.release_id,E.comments FROM \"+\n DBHelper.USEA_INSTRUCTOR_DETAILS+\" A, \"+DBHelper.USEA_AREA_MASTER+\" B, \"+DBHelper.USEA_MMS_USERMASTER+\" C, \"+\n DBHelper.USEA_CONTACT_DETAILS+\" D, \"+DBHelper.USEA_ICP_USER_DETAIL+\" E \"+\n \" where E.icp_meeting_id = A.icp_meeting_id and E.user_id = C.user_id and \"+\n \" A.usea_area_id = B.area_id and C.user_id = D.user_id and C.contact_type_id = D.contact_type_id and \"+\n \" E.release_id = ? \";\n PreparedStatement prepStmt = con.prepareStatement(slelctStr);\n prepStmt.setString(1, releaseId);\n rs = prepStmt.executeQuery();\n System.out.println(\"Inside the listICPUserReg status : \"+userId);\n if(rs.next()) {\n this.assesmentLevel = rs.getString(1);\n Date assesmentDate1 = rs.getDate(2);\n this.noOfDays = rs.getString(3);\n this.areaName = rs.getString(4);\n this.location = rs.getString(5);\n this.firstName = rs.getString(6);\n this.lastName = rs.getString(7);\n this.address1 = rs.getString(8);\n this.country = rs.getString(9);\n this.state = rs.getString(10);\n this.zip = rs.getString(11);\n this.phoneNo = rs.getString(12);\n this.faxNo = rs.getString(13);\n this.membershipStatus = rs.getString(14);\n this.memberId = rs.getString(15);\n Date addDate1 = rs.getDate(16);\n this.requestStatus = rs.getString(17);\n this.emailId = rs.getString(18);\n this.city = rs.getString(19);\n this.releaseId = rs.getString(20);\n this.comments = rs.getString(21);\n \n this.addDate = DBHelper.dateToString(addDate1);\n this.assesmentDate = DBHelper.dateToString(assesmentDate1);\n \n String [] userList = {assesmentLevel,assesmentDate,noOfDays,areaName,location,firstName,lastName,address1,\n country,state,zip,phoneNo,faxNo,membershipStatus,memberId,addDate,requestStatus,emailId,city,releaseId,comments};\n vObj.add(userList);\n }\n releaseConnection();\n }catch (SQLException e){\n e.printStackTrace();\n }finally {\n releaseConnection();\n }\n return vObj;\n }", "public static void NewConnectionList(){\n\t\tAccount a = (Account) Cache.get(\"authUser\");\r\n\t\tSystem.out.println(\"Current User\"+a);\r\n\t\t\r\n\t\tDealer d = Dealer.find(\"byDealershipId\", a.uniquenumber).first();\r\n\t\tSystem.out.println(\"Current User's Dealer Account\"+d);\r\n\t\t// Get all the requests for new Connection and display it as links in this page\r\n\t\t\r\n\t\t// As the below Query, i'm going to create a Criteria\r\n\t// SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();\r\n\t\t// session = (Session) sessionFactory.openSession();\r\n\t\t // Property age = Property.forName(\"isConnectionApproved\");\r\n\t\t//List n = (List) ((org.hibernate.Session) session).createCriteria(NewConnectionRequest.class).addOrder(Order.desc(\"timestamp\")).add(Restrictions.eq(\"dealerId\", d)).add(Restrictions.eq(\"isConnectionApproved\",false));\r\n\t\t\r\n\t\t//System.out.println(\"Criteria query Result\"+n);\r\n\t\t\r\n\t\t\r\n\t\r\n\t\t\r\n\t\t\r\n\t\tList<NewConnectionRequest> n = NewConnectionRequest.find(\"isConnectionApproved is false order by timestamp desc\").fetch();\r\n\t\t\r\n\t\t \r\n\t\t//System.out.println(\"Connection Request Applications for Dealer\"+n);\r\n\t\tif(a != null)\r\n\t\t\trender(n);\r\n\t\telse \r\n\t\t\tDealerControllerMap.pleaselogin();\r\n\t\t\t\r\n\t}", "@Override\n\tpublic JSONObject getUserByPage(String param) {\n\t\tJSONObject data = new JSONObject();\n\t\tJSONObject result = new JSONObject();\n\t\tMainUtility mainUtil = new MainUtility();\n\t\tJSONObject jsonParams = mainUtil.stringToJson(param);\n\t\tStringBuilder builder = new StringBuilder();\n\t\tStringBuilder builderGetTotal = new StringBuilder();\n\n\t\tbuilder.append(\"SELECT user_id, user_login, full_name, email, group_id \"\n\t\t\t\t+ \"FROM crm_user \"\n\t\t\t\t+ \"WHERE group_id IN (2,3) \");\n\t\tbuilderGetTotal.append(\"SELECT COUNT(1) FROM crm_user \"\n\t\t\t\t+ \"WHERE group_id IN (2,3) \");\n\t\tif (jsonParams.get(\"user_login\") != null && !\"\".equals(jsonParams.get(\"user_login\").toString())) {\n\t\t\tbuilder.append(\" AND user_login LIKE N'%\" + jsonParams.get(\"user_login\").toString() + \"%'\");\n\t\t\tbuilderGetTotal\n\t\t\t\t\t.append(\" AND user_login LIKE N'%\" + jsonParams.get(\"user_login\").toString() + \"%'\");\n\t\t}\n\t\tif (jsonParams.get(\"full_name\") != null && !\"\".equals(jsonParams.get(\"full_name\").toString())) {\n\t\t\tbuilder.append(\" AND full_name LIKE N'%\" + jsonParams.get(\"full_name\").toString() + \"%'\");\n\t\t\tbuilderGetTotal\n\t\t\t.append(\" AND full_name LIKE N'%\" + jsonParams.get(\"full_name\").toString() + \"%'\");\n\t\t}\n\t\tif (jsonParams.get(\"email\") != null && !\"\".equals(jsonParams.get(\"email\").toString())) {\n\t\t\tbuilder.append(\" AND email LIKE N'%\" + jsonParams.get(\"email\").toString() + \"%'\");\n\t\t\tbuilderGetTotal\n\t\t\t.append(\" AND email LIKE N'%\" + jsonParams.get(\"email\").toString() + \"%'\");\n\t\t}\n\t\t// sortby\n\t\tif (jsonParams.get(\"sortField\") != null && !\"\".equals(jsonParams.get(\"sortField\").toString())) {\n\t\t\tswitch (jsonParams.get(\"sortField\").toString()) {\n\t\t\tdefault:\n\t\t\t\tbuilder.append(\" ORDER BY crm_user.created_date DESC\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// sortOrder chỉ là descend và ascend hoặc rỗng\n\t\t\tif (jsonParams.get(\"sortOrder\") != null && \"descend\".equals(jsonParams.get(\"sortOrder\").toString())) {\n\t\t\t\tbuilder.append(\" DESC\");\n\t\t\t}\n\t\t\tif (jsonParams.get(\"sortOrder\") != null && \"ascend\".equals(jsonParams.get(\"sortOrder\").toString())) {\n\t\t\t\tbuilder.append(\" ASC\");\n\t\t\t}\n\t\t}\n\t\t// lấy các biến từ table (limit, offset)\n\t\tmainUtil.getLimitOffset(builder, jsonParams);\n\t\ttry {\n\t\t\tint totalRow = this.jdbcTemplate.queryForObject(builderGetTotal.toString(), Integer.class);\n\t\t\tList<Map<String, Object>> listUser = this.jdbcTemplate.queryForList(builder.toString());\n\t\t\tJSONObject results = new JSONObject();\n\t\t\tresults.put(\"results\", listUser);\n\t\t\tresults.put(\"total\", totalRow);\n\t\t\tdata.put(\"data\", results);\n\t\t\tdata.put(\"success\", true);\n\t\t} catch (Exception e) {\n\t\t\tdata.put(\"success\", false);\n\t\t\tdata.put(\"err\", e.getMessage());\n\t\t\tdata.put(\"msg\", \"Lấy danh sách người dùng thất bại\");\n\t\t}\n\t\treturn data;\n\t}", "@Override\n public List<Object[]> getStatistics(String owner, StatisticsGroup group) {\n String groupHQL = this.groupToHQL(group);\n List<Object[]> list = (List<Object[]>) getHibernateTemplate().findByNamedParam(\"select count(*), \"\n + \"count(distinct ipAddress), \" + groupHQL + \" \"\n + \"from SearchEvent \"\n + \"where owner like :owner \"\n + \"group by col_2_0_\", \"owner\", owner);\n return list;\n }", "public static void scrape(String url, String pat, String outfolder, String host, String user, String passwd, String dbname, String logfile) throws IOException {\n\t\tDate current = new Date();\n\t\tDateFormat dateFormatCurrent = new SimpleDateFormat(\"yyyyMMdd\");\n\t\tString currentStamp = dateFormatCurrent.format(current);\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\tString currentDateLog = dateFormat.format(current);\n\t\t\n\t\tCSVWriter csvout = new CSVWriter(new FileWriter(outfolder+\"EFSA_\"+currentStamp+\".csv\"),'\\t');\n\t\tString[] header = {\"project__PROJECT_NUMBER\",\"project__PROJECT_TITLE\",\n\t\t\t\t\"project__source_url\",\n\t\t\t\t\"project__PROJECT_START_DATE\",\"project__PROJECT_END_DATE\",\n\t\t\t\t\"project__PROJECT_MORE_INFO\",\"project__PROJECT_OBJECTIVE\",\n\t\t\t\t\"project__PROJECT_ABSTRACT\",\"project__LAST_UPDATE\",\n\t\t\t\t\"project__DATE_ENTERED\", \"project__PROJECT_FUNDING\",\n\t\t\t\t\"institution_data__INSTITUTION_NAME\",\n\t\t\t\t\"institution_data__INSTITUTION_ADDRESS1\",\"institution_data__INSTITUTION_CITY\",\n\t\t\t\t\"institution_data__INSTITUTION_STATE\",\"institution_data__INSTITUTION_COUNTRY\",\n\t\t\t\t\"institution_data__INSTITUTION_ZIP\",\n\t\t\t\t\"institution_index__inst_id\",\n\t\t\t\t\"agency_index__aid\",\"comment\"};\n\t\tcsvout.writeNext(header);\n\t\t\n\t\tDocument doc = Jsoup.connect(url)\n\t\t\t\t.userAgent(\"Mozilla/5.0 (Windows; U; WindowsNT 5.1; en-US; rv1.8.1.6) Gecko/20070725 Firefox/2.0.0.6\")\n\t\t\t .referrer(\"http://www.google.com\").timeout(1000).get();\n\t\tString sizeLinks = doc.select(\"div:containsOwn(Results 1)\").text(); \n\t\tPattern searchSize = Pattern.compile(\"(\\\\d+)$\");\n\t\tMatcher matchSize = searchSize.matcher(sizeLinks);\n\t\tint numPages = 0;\n\t\twhile (matchSize.find()) {\n\t\t\tnumPages = Integer.valueOf(matchSize.group(1))/20;\n\t\t}\n\t\t\n\t\tif (numPages == 0) {\n\t\t\t//Log an error that it didn't work\n\t\t} else {\n\t\t\n\t\t\tfor (int i=0;i<=numPages;i++) {\n\t\t\t\tDocument listTenders = Jsoup.connect(url+\"&page=\"+String.valueOf(i))\n\t\t\t\t\t\t.userAgent(\"Mozilla/5.0 (Windows; U; WindowsNT 5.1; en-US; rv1.8.1.6) Gecko/20070725 Firefox/2.0.0.6\")\n \t\t\t\t .referrer(\"http://www.google.com\").timeout(1000).get();\n\t\t\t\tElements links = listTenders.select(\"a[href]\");\n\t\t\t\tPattern pattern = \n\t\t\t Pattern.compile(pat);\n\t\t\t\t//Check whether all links are being captured given pattern - should be 20 per page except for very last\n\t\t\t\tint checkNums = 0;\n\t\t\t\t\n\t\t\t\tfor (Element link : links) {\n\t\t\t\t\tMatcher matcher = \n\t\t\t\t pattern.matcher(link.attr(\"href\"));\n\t\t\t\t\tif (matcher.find()) {\n\t\t\t\t\t\tcheckNums++;\n\t\t\t\t\t\tDocument linkdoc = Jsoup.connect(link.attr(\"abs:href\"))\n\t\t\t\t\t\t\t\t.userAgent(\"Mozilla/5.0 (Windows; U; WindowsNT 5.1; en-US; rv1.8.1.6) Gecko/20070725 Firefox/2.0.0.6\")\n\t \t\t\t\t .referrer(\"http://www.google.com\").timeout(1000).get();\n\t\t\t\t\t\tElements furtherLink = linkdoc.select(\"a:containsOwn(award notice)\");\n\t\t\t\t\t\tElement infoLink = null;\n\t\t\t\t\t\tif (furtherLink.size()!=0) {\n\t\t\t\t\t\t\tinfoLink = furtherLink.last();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tfurtherLink = linkdoc.select(\"a:containsOwn(Bekanntmachung)\");\n\t\t\t\t\t\t\t\tinfoLink = furtherLink.last();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcatch (Exception ex) {\n\t\t\t\t\t\t\t\t//Log that there is simply no link there\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (infoLink != null) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t//Get to next phase\n\t\t\t\t\t\t\t\tDocument finaldoc = Jsoup.connect(infoLink.attr(\"abs:href\"))\n\t\t\t\t\t\t\t\t\t\t.userAgent(\"Mozilla/5.0 (Windows; U; WindowsNT 5.1; en-US; rv1.8.1.6) Gecko/20070725 Firefox/2.0.0.6\")\n\t\t\t \t\t\t\t .referrer(\"http://www.google.com\").timeout(1000).get();\n\t\t\t\t\t\t\t\tElement content = finaldoc.getElementById(\"fullDocument\");\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//Declare needed strings\n\t\t\t\t\t\t\t\tString project__PROJECT_NUMBER = null;\n\t\t\t\t\t\t\t\tString project__PROJECT_TITLE = null;\n\t\t\t\t\t\t\t\tString project__source_url = null;\n\t\t\t\t\t\t\t\tString project__PROJECT_START_DATE = null;\n\t\t\t\t\t\t\t\tString project__PROJECT_END_DATE = null;\n\t\t\t\t\t\t\t\tString project__PROJECT_MORE_INFO = null;\n\t\t\t\t\t\t\t\tString project__PROJECT_OBJECTIVE = null;\n\t\t\t\t\t\t\t\tString project__PROJECT_ABSTRACT = null;\n\t\t\t\t\t\t\t\tString project__LAST_UPDATE = null;\n\t\t\t\t\t\t\t\tString project__DATE_ENTERED = null;\n\t\t\t\t\t\t\t\tString project__PROJECT_FUNDING = null;\n\t\t\t\t\t\t\t\tString agency_index__aid = \"122\";\n\t\t\t\t\t\t\t\tint institution_index__inst_id = -1;\n\t\t\t\t\t\t\t\tString comment = \"\";\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//Institution variables\n\t\t\t\t\t\t\t\tString institution_data__INSTITUTION_NAME = null;\n\t\t\t\t\t\t\t\tString institution_data__INSTITUTION_ADDRESS1 = null;\n\t\t\t\t\t\t\t\tString institution_data__INSTITUTION_CITY = null;\n\t\t\t\t\t\t\t\tString institution_data__INSTITUTION_COUNTRY = null;\n\t\t\t\t\t\t\t\tString institution_data__INSTITUTION_ZIP = null;\n\t\t\t\t\t\t\t\tString institution_data__INSTITUTION_STATE = null;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//Processing variables\n\t\t\t\t\t\t\t\tString instInfo = null;\n\t\t\t\t\t\t\t\tString query = null;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//Project source URL\n\t\t\t\t\t\t\t\tproject__source_url = infoLink.attr(\"abs:href\");\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//Project number\n\t\t\t\t\t\t\t\tElement numElem = content.select(\"span:containsOwn(File reference number attributed)\").first();\n\t\t\t\t\t\t\t\tPattern badSymb = Pattern.compile(\"^[\\\\W_]+\");\n\t\t\t\t\t\t\t\tproject__PROJECT_NUMBER = numElem.nextElementSibling().text();\n\t\t\t\t\t\t\t\tMatcher matchSymb = badSymb.matcher(project__PROJECT_NUMBER);\n\t\t\t\t\t\t\t\tproject__PROJECT_NUMBER = matchSymb.replaceAll(\"\");\n\t\t\t\t\t\t\t\tPattern patNum = Pattern.compile(\"^(.*?)\\\\s\");\n\t\t\t\t\t\t\t\tMatcher matchNum = patNum.matcher(project__PROJECT_NUMBER);\n\t\t\t\t\t\t\t\tif (matchNum.find()) {\n\t\t\t\t\t\t\t\t\tproject__PROJECT_NUMBER = matchNum.group(1);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tPattern badSymbEnd = Pattern.compile(\"\\\\.$\");\n\t\t\t\t\t\t\t\t\tMatcher matchSymbEnd = badSymbEnd.matcher(project__PROJECT_NUMBER);\n\t\t\t\t\t\t\t\t\tproject__PROJECT_NUMBER = matchSymbEnd.replaceAll(\"\");\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\tquery = \"SELECT PROJECT_NUMBER FROM \"+dbname+\".project where PROJECT_NUMBER = \\\"\"+project__PROJECT_NUMBER+\"\\\"\";\n\t\t\t\t\t\t\t\tResultSet result = MysqlConnect.sqlQuery(query,host,user,passwd);\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tresult.next();\n\t\t\t\t\t\t\t\t\tString number = result.getString(1);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcatch (Exception ex) {\n\t\t\t\t\t\t\t\t\t//Title\n\t\t\t\t\t\t\t\t\tElement titleElem = content.select(\"span:containsOwn(Title attributed to)\").first();\n\t\t\t\t\t\t\t\t\tproject__PROJECT_TITLE = titleElem.nextElementSibling().text();\n\t\t\t\t\t\t\t\t\tproject__PROJECT_TITLE = project__PROJECT_TITLE.replace(project__PROJECT_NUMBER,\"\");\n\t\t\t\t\t\t\t\t\tmatchSymb = badSymb.matcher(project__PROJECT_TITLE);\n\t\t\t\t\t\t\t\t\tproject__PROJECT_TITLE = matchSymb.replaceAll(\"\");\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//Project abstract\n\t\t\t\t\t\t\t\t\tElement abstElem = content.select(\"span:containsOwn(Short description of)\").first();\n\t\t\t\t\t\t\t\t\tproject__PROJECT_OBJECTIVE = abstElem.nextElementSibling().text();\n\t\t\t\t\t\t\t\t\tmatchSymb = badSymb.matcher(project__PROJECT_OBJECTIVE);\n\t\t\t\t\t\t\t\t\tproject__PROJECT_OBJECTIVE = matchSymb.replaceAll(\"\");\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//Project funding\n\t\t\t\t\t\t\t\t\tElement fundElem = content.select(\"span:containsOwn(Total final value)\").last().nextElementSibling();\n\t\t\t\t\t\t\t\t\tString funding = fundElem.text();\n\t\t\t\t\t\t\t\t\tPattern patFund = Pattern.compile(\"Value: (.*?) EUR\");\n\t\t\t\t\t\t\t\t\tMatcher matchFund = patFund.matcher(funding);\n\t\t\t\t\t\t\t\t\twhile (matchFund.find()) {\n\t\t\t\t\t\t\t\t\t\tproject__PROJECT_FUNDING = matchFund.group(1).replace(\" \",\"\");\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\t//Date stamp\n\t\t\t\t\t\t\t\t\tproject__LAST_UPDATE = dateFormat.format(current);\n\t\t\t\t\t\t\t\t\tDateFormat dateFormatEnter = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\t\t\t\t\t\t\tproject__DATE_ENTERED = dateFormatEnter.format(current);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//Project start date\n\t\t\t\t\t\t\t\t\tElement dateElem = content.select(\"span:containsOwn(Date of contract award)\").first().nextElementSibling();\n\t\t\t\t\t\t\t\t\tString startDate = dateElem.text();\n\t\t\t\t\t\t\t\t\tPattern patDate = Pattern.compile(\"(\\\\d+)$\");\n\t\t\t\t\t\t\t\t\tMatcher matchDate = patDate.matcher(startDate);\n\t\t\t\t\t\t\t\t\twhile (matchDate.find()) {\n\t\t\t\t\t\t\t\t\t\tproject__PROJECT_START_DATE = matchDate.group(1);\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\t//Institution info - can be several if multiple contracts awarded under one tender\n\t\t\t\t\t\t\t\t\tElements instElems = content.select(\"span:containsOwn(Name and address of economic operator)\");\n\t\t\t\t\t\t\t\t\tfor (Element instElem : instElems) {\n\t\t\t\t\t\t\t\t\t\tinstitution_data__INSTITUTION_NAME = null;\n\t\t\t\t\t\t\t\t\t\tinstitution_data__INSTITUTION_ADDRESS1 = null;\n\t\t\t\t\t\t\t\t\t\tinstitution_data__INSTITUTION_CITY = null;\n\t\t\t\t\t\t\t\t\t\tinstitution_data__INSTITUTION_COUNTRY = null;\n\t\t\t\t\t\t\t\t\t\tinstitution_data__INSTITUTION_ZIP = null;\n\t\t\t\t\t\t\t\t\t\tinstitution_data__INSTITUTION_STATE = null;\n\t\t\t\t\t\t\t\t\t\tinstitution_index__inst_id = -1;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tElement instContainer = instElem.nextElementSibling();\n\t\t\t\t\t\t\t\t\t\tinstInfo = StringEscapeUtils.unescapeHtml4(instContainer.children().select(\"p\").html().toString());\n\t\t\t\t\t\t\t\t\t\tList<String> matches = new ArrayList<String>();\n\t\t\t\t\t\t\t\t\t\tfor (String instInfoElem : instInfo.split(\"<br>\")) {\n\t\t\t\t\t\t\t\t\t\t\tmatches.add(instInfoElem);\n\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\tString[] allMatches = new String[matches.size()];\n\t\t\t\t\t\t\t\t\t\tallMatches = matches.toArray(allMatches);\n\t\t\t\t\t\t\t\t\t\tinstitution_data__INSTITUTION_NAME = allMatches[0];\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t//Check institution in MySQL DB\n\t\t\t\t\t\t\t\t\t\tquery = \"SELECT * from \"+dbname+\".institution_data where institution_name like \\\"\"+institution_data__INSTITUTION_NAME+\"\\\"\";\n\t\t\t\t\t\t\t\t\t\tresult = MysqlConnect.sqlQuery(query,host,user,passwd);\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tresult.next();\n\t\t\t\t\t\t\t\t\t\t\tinstitution_index__inst_id = result.getInt(1);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tcatch (Exception e) {\n\t\t\t\t\t\t\t\t\t\t\tinstitution_data__INSTITUTION_ADDRESS1 = allMatches[1];\n\t\t\t\t\t\t\t\t\t\t\tint instCountryIndex = 3;\n\t\t\t\t\t\t\t\t\t\t\tif (matches.size() == 3) {\n\t\t\t\t\t\t\t\t\t\t\t\tinstCountryIndex = 2;\n\t\t\t\t\t\t\t\t\t\t\t\tPattern patAddr = Pattern.compile(\"^(.*?)[A-Z][a-z][a-z\\\\-]+.*?,\\\\s([A-Z][a-z][a-z\\\\-]+)\");\n\t\t\t\t\t\t\t\t\t\t\t\tMatcher matchAddr = patAddr.matcher(allMatches[2]);\n\t\t\t\t\t\t\t\t\t\t\t\tPattern trailSpace = Pattern.compile(\"\\\\s+$\");\n\t\t\t\t\t\t\t\t\t\t\t\tif (matchAddr.find()) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tinstitution_data__INSTITUTION_ZIP = matchAddr.group(1);\n\t\t\t\t\t\t\t\t\t\t\t\t\tMatcher matchSpace = trailSpace.matcher(institution_data__INSTITUTION_ZIP);\n\t\t\t\t\t\t\t\t\t\t\t\t\tinstitution_data__INSTITUTION_ZIP = matchSpace.replaceAll(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tinstitution_data__INSTITUTION_CITY = matchAddr.group(2);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t\tPattern patAddr = Pattern.compile(\"^(.*?)([A-Z][a-z][A-Za-z\\\\-]+)\");\n\t\t\t\t\t\t\t\t\t\t\t\tMatcher matchAddr = patAddr.matcher(allMatches[2]);\n\t\t\t\t\t\t\t\t\t\t\t\tPattern trailSpace = Pattern.compile(\"\\\\s+$\");\n\t\t\t\t\t\t\t\t\t\t\t\tif (matchAddr.find()) {\n\t\t\t\t\t\t\t\t\t\t\t\t\tinstitution_data__INSTITUTION_ZIP = matchAddr.group(1);\n\t\t\t\t\t\t\t\t\t\t\t\t\tMatcher matchSpace = trailSpace.matcher(institution_data__INSTITUTION_ZIP);\n\t\t\t\t\t\t\t\t\t\t\t\t\tinstitution_data__INSTITUTION_ZIP = matchSpace.replaceAll(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\t\tinstitution_data__INSTITUTION_CITY = matchAddr.group(2);\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tinstitution_data__INSTITUTION_COUNTRY = WordUtils.capitalizeFully(allMatches[instCountryIndex]);\n\t\t\t\t\t\t\t\t\t\t\tquery = \"SELECT * FROM \"+dbname+\".countries WHERE COUNTRY_NAME = \\\"\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t+institution_data__INSTITUTION_COUNTRY+\"\\\"\";\n\t\t\t\t\t\t\t\t\t\t\tresult = MysqlConnect.sqlQuery(query,host,user,passwd);\n\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\tresult.next();\n\t\t\t\t\t\t\t\t\t\t\t\tinstitution_data__INSTITUTION_COUNTRY = result.getString(1);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tcatch (Exception exc) {\n\t\t\t\t\t\t\t\t\t\t\t\t// Country does not exist in DB --> comment: \"Check country field\"\n\t\t\t\t\t\t\t\t\t\t\t\tcomment = \"Please check the country name and respective index in the DB - might be a spelling mistake or new country.\";\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tif (Integer.valueOf(institution_data__INSTITUTION_COUNTRY) == 1) {\n\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\tquery = \"SELECT abbrv FROM \"+dbname+\".states\";\n\t\t\t\t\t\t\t\t\t\t\t\t\tresult = MysqlConnect.sqlQuery(query,host,user,passwd);\n\t\t\t\t\t\t\t\t\t\t\t\t\twhile (result.next()) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tString state = result.getString(1);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tPattern patState = Pattern.compile(\"(\"+state+\")\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tMatcher matchState = patState.matcher(allMatches[2]);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tif (matchState.find()) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tinstitution_data__INSTITUTION_STATE = state;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tinstitution_data__INSTITUTION_ZIP = institution_data__INSTITUTION_ZIP.replace(state,\"\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (institution_data__INSTITUTION_STATE == null) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Add to comment field rather than just have it there re-write other comments\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcomment = \"Please check the address information on project_source_url to see whether state field is present.\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\tcatch (Exception exc) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t//Write resultant values into CSV\n\t\t\t\t\t\t\t\t\t\tString[] output = {project__PROJECT_NUMBER,project__PROJECT_TITLE,project__source_url,\n\t\t\t\t\t\t\t\t\t\t\t\tproject__PROJECT_START_DATE,project__PROJECT_END_DATE,\n\t\t\t\t\t\t\t\t\t\t\t\tproject__PROJECT_MORE_INFO,project__PROJECT_OBJECTIVE,\n\t\t\t\t\t\t\t\t\t\t\t\tproject__PROJECT_ABSTRACT,project__LAST_UPDATE,\n\t\t\t\t\t\t\t\t\t\t\t\tproject__DATE_ENTERED,project__PROJECT_FUNDING,\n\t\t\t\t\t\t\t\t\t\t\t\tinstitution_data__INSTITUTION_NAME,\n\t\t\t\t\t\t\t\t\t\t\t\tinstitution_data__INSTITUTION_ADDRESS1, institution_data__INSTITUTION_CITY,\n\t\t\t\t\t\t\t\t\t\t\t\tinstitution_data__INSTITUTION_STATE, institution_data__INSTITUTION_COUNTRY,\n\t\t\t\t\t\t\t\t\t\t\t\tinstitution_data__INSTITUTION_ZIP,\n\t\t\t\t\t\t\t\t\t\t\t\tString.valueOf(institution_index__inst_id),\n\t\t\t\t\t\t\t\t\t\t\t\tagency_index__aid,comment};\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tcsvout.writeNext(output);\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\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\t\t\t\t\t\t\tcatch (Exception ee) {\n\t\t\t\t\t\t\t\t//Log exception that page does not exist and link is broken\n\t\t\t\t\t\t\t\ttry(PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(logfile, true)))) {\n\t\t\t\t\t\t\t\t\tStringWriter errors = new StringWriter();\n\t\t\t\t\t\t\t\t\tee.printStackTrace(new PrintWriter(errors));\n\t\t\t\t\t\t\t\t\tout.println(currentDateLog\n\t\t\t\t\t\t\t\t \t\t\t+\" \"\n\t\t\t\t\t\t\t\t \t\t\t+\"Perhaps the link is broken or does not exist - \"+infoLink.attr(\"abs:href\")+\" .\"\n\t\t\t\t\t\t\t\t \t\t\t+\" Here is some help with traceback:\"\n\t\t\t\t\t\t\t\t \t\t\t+errors.toString());\n\t\t\t\t\t\t\t\t}catch (IOException e) {\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\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//Handle if there is no contract award notice yet; perhaps just pass\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif (i!=numPages && checkNums != 20) {\n\t\t\t\t\t//Log error that some links were missed and they have to double check somehow\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tcsvout.close();\n\t\t\n\t}", "private int getGenreDownloadedMostByUser(int profileAccountId){\n \n SessionFactory sessionFactory = (SessionFactory)servletContext.getAttribute(OpusApplication.HIBERNATE_SESSION_FACTORY) ;\n Session session = sessionFactory.openSession() ;\n Query query = session.createQuery(\"SELECT mvd, mvd.musicVideo.genre.id, count(*) FROM MusicVideoDownload mvd JOIN FETCH mvd.musicVideo WHERE mvd.profileAccount.id = :profileAccountId GROUP BY mvd.musicVideo.genre.id ORDER BY count(*) DESC\") ;\n query.setParameter(\"profileAccountId\", profileAccountId) ;\n query.setMaxResults(1) ;\n List resultSet = query.list() ;\n session.close() ;\n //if there is no result set, it means the user hasn't made any downloads so return -1\n if(resultSet.isEmpty())\n return -1 ;\n //else return the genre id field of the first tuple since the result set has been sorted in desc order\n Object[] tupleFields = (Object[])resultSet.get(0) ;\n return (int)tupleFields[1] ;\n }", "public void crossref(){\r\n reftable = new ArrayList();\r\n if(!log.isEmpty() && ses.isEmpty()){\r\n for(int i=0 ; i<log.size() ; i++){\r\n all_log alg = new all_log(log.get(i).getuserid(), log.get(i).getuserip(), log.get(i).geturl(), log.get(i).gettime(), \"\", \"\");\r\n reftable.add(alg);\r\n }\r\n }else if(!ses.isEmpty() && log.isEmpty()) {\r\n for(int i=0 ; i<ses.size() ; i++){\r\n ArrayList<AndroidRec> ad = ses.get(i).getrec();\r\n for(int j=0 ; j<ad.size() ; j++) {\r\n all_log alg = new all_log(\"unknow\", \"unknow\", ad.get(j).geturl(), ad.get(j).gettime(), ad.get(j).getsystem(), ad.get(j).getsoft());\r\n reftable.add(alg);\r\n }\r\n }\r\n }else if(!ses.isEmpty() && !log.isEmpty()){\r\n for(int i=0 ; i<log.size() ; i++){\r\n all_log alg = new all_log(log.get(i).getuserid(), log.get(i).getuserip(), log.get(i).geturl(), log.get(i).gettime(), \"\", \"\");\r\n reftable.add(alg);\r\n }\r\n\r\n \r\n \r\n for(int k=0 ; k<ses.size() ; k++) {\r\n ArrayList<usersort> sort = new ArrayList<usersort>();\r\n ArrayList userid = new ArrayList(); \r\n ArrayList<Integer> poss = new ArrayList(); \r\n ArrayList<AndroidRec> ad = new ArrayList();\r\n ad.addAll(ses.get(k).getrec());\r\n \r\n for(int n=0 ; n<ad.size() ; n++){\r\n long andtime = Long.parseLong(ad.get(n).gettime());\r\n for(int t=0 ; t<reftable.size() ; t++){\r\n long logtime = (Long.parseLong(reftable.get(t).gettime()))*1000;\r\n if((logtime-andtime)>60000)\r\n break;\r\n if(Math.abs(andtime - logtime) <= 60000){\r\n String andurl = ad.get(n).geturl();\r\n String logurl = reftable.get(t).geturl();\r\n if(andurl.equals(logurl)){\r\n userid.add(reftable.get(t).getid());\r\n poss.add(n);\r\n poss.add(t);\r\n }\r\n }\r\n }\r\n }\r\n //find correct in matches\r\n \r\n for(int i=0 ; i<userid.size() ; i++){\r\n if(sort.isEmpty()){\r\n usersort so = new usersort(userid.get(i).toString());\r\n sort.add(so);\r\n }\r\n for(int j=0 ; j<sort.size() ; j++){ \r\n if(userid.get(i).toString().equals(sort.get(j).getid())){\r\n sort.get(j).accnum();\r\n }else if(j==(sort.size()-1) && !userid.get(i).toString().equals(sort.get(j).getid())){\r\n usersort so = new usersort(userid.get(i).toString());\r\n sort.add(so);\r\n }\r\n }\r\n }\r\n String correctuser = \"\";\r\n int usernum = 0;\r\n for(int s=0 ; s<sort.size() ; s++){\r\n if((sort.get(s).getnum())>usernum){\r\n usernum = sort.get(s).getnum();\r\n correctuser = sort.get(s).getid();\r\n }\r\n }\r\n //\r\n \r\n //\r\n if(!ad.isEmpty()){\r\n int del = 0;\r\n for(int i=0 ; i<poss.size() ; i+=2){\r\n if((reftable.get(poss.get(i+1))).getid().equals(correctuser)){\r\n if(!ad.isEmpty()){\r\n reftable.get(poss.get(i+1)).setsys(ad.get(poss.get(i)-del).getsystem());\r\n reftable.get(poss.get(i+1)).setsoft(ad.get(poss.get(i)-del).getsoft());\r\n int index = poss.get(i) - del;\r\n ad.remove(index);\r\n del = del + 1;\r\n }\r\n }\r\n }\r\n }\r\n for(int i=0 ; i<ad.size() ; i++){\r\n all_log alg = new all_log(\"unknow\", \"unknow\", ad.get(i).geturl(), ad.get(i).gettime(), ad.get(i).getsystem(), ad.get(i).getsoft());\r\n reftable.add(alg);\r\n }\r\n sort.clear();\r\n }\r\n }\r\n\r\n for(int i=0 ; i<reftable.size() ; i++){\r\n long sort = 0;\r\n if(reftable.get(i).gettime().length() == 13){\r\n sort = Long.parseLong(reftable.get(i).gettime());\r\n }else if (reftable.get(i).gettime().length() == 10){\r\n sort = Long.parseLong(reftable.get(i).gettime())*1000;\r\n }\r\n reftable.get(i).settime((new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(new Date(sort))).toString());\r\n //System.out.println(reftable.get(i).toString());\r\n //System.out.println(reftable.size());\r\n }\r\n }", "public int logCount() {\n\n int count = 0;\n LogDAO ldao = new LogDAO();\n ldao.connect();\n try {\n String query = \"SELECT COUNT(*) FROM log;\";\n Statement st = connection.createStatement();\n ResultSet rs = st.executeQuery(query);\n rs.next();\n count = rs.getInt(1);\n ldao.closeConnection();\n return count;\n } catch (SQLException ex) {\n ldao.closeConnection();\n System.out.println(\"SQLException in logCount()\");\n }\n return count;\n }", "public void userWithMostLikes() {\n Map<Integer, Integer> userLikesCount = new HashMap<>();\n Map<Integer, User> users = DataStore.getInstance().getUsers();\n \n for (User user : users.values()) {\n for (Comment c : user.getComments()) {\n int likes = 0;\n if (userLikesCount.containsKey(user.getId())) {\n likes = userLikesCount.get(user.getId());\n }\n likes += c.getLikes();\n userLikesCount.put(user.getId(), likes);\n }\n }\n int max = 0;\n int maxId = 0;\n for (int id : userLikesCount.keySet()) {\n if (userLikesCount.get(id) > max) {\n max = userLikesCount.get(id);\n maxId = id;\n }\n }\n System.out.println(\"User with most likes: \" + max + \"\\n\" \n + users.get(maxId));\n }", "public void userWithMostLikes() {\n Map<Integer, Integer> userLikesCount = new HashMap<>();\n Map<Integer, User> users = DataStore.getInstance().getUsers();\n \n for (User user : users.values()) {\n for (Comment c : user.getComments()) {\n int likes = 0;\n if (userLikesCount.containsKey(user.getId())) {\n likes = userLikesCount.get(user.getId());\n }\n likes += c.getLikes();\n userLikesCount.put(user.getId(), likes);\n }\n }\n int max = 0;\n int maxId = 0;\n for (int id : userLikesCount.keySet()) {\n if (userLikesCount.get(id) > max) {\n max = userLikesCount.get(id);\n maxId = id;\n }\n }\n System.out.println(\"User with most likes: \" + max + \"\\n\" \n + users.get(maxId));\n }", "public List<Sale> saleListSongCount() {\n List<Sale> saleList = new ArrayList<Sale>();\n\n try {\n conn = DBConnection.getConnection();\n stm = conn.createStatement();\n result = stm.executeQuery(\"SELECT name,\\n\"\n + \"COUNT (*) \\n\"\n + \"FROM disquera.song JOIN disquera.sale ON song.id_song = sale.id_song\\n\"\n + \"GROUP BY song.name ORDER BY song.name\");\n //result_album = stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.album on sale.id_album=album.id_album\");\n //result_artist=stm.executeQuery(\"SELECT * FROM disquera.sale join disquera.artist on sale.id_artist=artist.id_artist\");\n while (result.next()) {\n Sale newSale = new Sale();\n\n newSale.setSongName(result.getString(1));\n newSale.setCount(result.getInt(2));\n //System.out.println(\"\\n\\n Received data: \\n Id: \" + newSale.getId_sale() + \"\\nPrecio: \" + newSale.getPrice());\n saleList.add(newSale);\n /*\n System.out.println(\"No existe un usuario con esa contraseña\");\n conn.close();\n return null;\n */\n }\n result.close();\n stm.close();\n conn.close();\n } catch (SQLException ex) {\n ex.getStackTrace();\n return null;\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(DAOGenre.class.getName()).log(Level.SEVERE, null, ex);\n }\n return saleList;\n }", "@Override\n\tpublic int queryaddtoday(Employee bi) throws Exception {\n\t\tString sql =\"select count(u.id) from userinfo u where date(u.createtime) = curdate() and u.state=0 and u.role=1 and u.fbusinessid =\"+bi.getId();\n\t\tint newadd = databaseHelper.getSqlCount(sql);\n return newadd;\n\t}", "public List<Integer> findTopGenesByEventCnt( Integer n ) throws DAOException;", "Long getAllCount();", "public List<ReporteComprasVentasRetenciones> getReporteVentas(int mes, int anio, int idOrganizacion, boolean electronicas)\r\n/* 196: */ {\r\n/* 197:264 */ StringBuffer sql = new StringBuffer();\r\n/* 198: */ \r\n/* 199:266 */ sql.append(\" SELECT new ReporteComprasVentasRetenciones(tc.codigo, tc.nombre, COUNT(tc.codigo), \");\r\n/* 200:267 */ sql.append(\" (CASE WHEN tc.codigo = '04' THEN -SUM(fcs.baseImponibleTarifaCero) ELSE SUM(fcs.baseImponibleTarifaCero) END), \");\r\n/* 201:268 */ sql.append(\" (CASE WHEN tc.codigo = '04' THEN -SUM(fcs.baseImponibleDiferenteCero) ELSE SUM(fcs.baseImponibleDiferenteCero) END), \");\r\n/* 202:269 */ sql.append(\" (CASE WHEN tc.codigo = '04' THEN -SUM(fcs.baseImponibleNoObjetoIva) ELSE SUM(fcs.baseImponibleNoObjetoIva) END), \");\r\n/* 203:270 */ sql.append(\" (CASE WHEN tc.codigo = '04' THEN -SUM(fcs.montoIva) ELSE SUM(fcs.montoIva) END), 'Ventas', (CASE WHEN tc.codigo = '41' THEN '02' ELSE '01' END),\");\r\n/* 204:271 */ sql.append(\" (CASE WHEN tc.codigo = '04' THEN -SUM(fc.descuentoImpuesto) ELSE SUM(fc.descuentoImpuesto) END))\");\r\n/* 205:272 */ sql.append(\" FROM FacturaClienteSRI fcs \");\r\n/* 206:273 */ sql.append(\" JOIN fcs.facturaCliente fc \");\r\n/* 207:274 */ sql.append(\" LEFT OUTER JOIN fcs.tipoComprobanteSRI tc \");\r\n/* 208:275 */ sql.append(\" LEFT OUTER JOIN fc.documento d \");\r\n/* 209:276 */ sql.append(\" LEFT OUTER JOIN fc.facturaClientePadre fcpadre \");\r\n/* 210:277 */ sql.append(\" LEFT OUTER JOIN fcpadre.documento dpadre \");\r\n/* 211:278 */ sql.append(\" WHERE MONTH(fcs.fechaEmision) =:mes \");\r\n/* 212:279 */ sql.append(\" AND YEAR(fcs.fechaEmision) =:anio \");\r\n/* 213:280 */ sql.append(\" AND fc.estado!=:estadoAnulado \");\r\n/* 214:281 */ sql.append(\" AND fcs.indicadorSaldoInicial!=true \");\r\n/* 215:282 */ sql.append(\" AND fcs.idOrganizacion = :idOrganizacion \");\r\n/* 216:283 */ sql.append(\" AND COALESCE(dpadre.indicadorDocumentoExterior, d.indicadorDocumentoExterior) = false \");\r\n/* 217:284 */ sql.append(\" AND fcs.indicadorDocumentoElectronico = :fisicas \");\r\n/* 218:285 */ sql.append(\" GROUP BY tc.codigo, tc.nombre \");\r\n/* 219:286 */ sql.append(\" ORDER BY tc.codigo, tc.nombre \");\r\n/* 220: */ \r\n/* 221:288 */ Query query = this.em.createQuery(sql.toString());\r\n/* 222:289 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 223:290 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 224:291 */ query.setParameter(\"estadoAnulado\", Estado.ANULADO);\r\n/* 225:292 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 226:293 */ query.setParameter(\"fisicas\", Boolean.valueOf(electronicas));\r\n/* 227:294 */ return query.getResultList();\r\n/* 228: */ }", "public static String selectDef802110_0(ConnectionProvider connectionProvider, String CreatedbyR) throws ServletException {\n String strSql = \"\";\n strSql = strSql + \n \" SELECT ( COALESCE(TO_CHAR(TO_CHAR(COALESCE(TO_CHAR(table2.Name), ''))), '') ) as Createdby FROM AD_User left join (select AD_User_ID, Name from AD_User) table2 on (AD_User.AD_User_ID = table2.AD_User_ID) WHERE AD_User.isActive='Y' AND AD_User.AD_User_ID = ? \";\n\n ResultSet result;\n String strReturn = \"\";\n PreparedStatement st = null;\n\n int iParameter = 0;\n try {\n st = connectionProvider.getPreparedStatement(strSql);\n QueryTimeOutUtil.getInstance().setQueryTimeOut(st, SessionInfo.getQueryProfile());\n iParameter++; UtilSql.setValue(st, iParameter, 12, null, CreatedbyR);\n\n result = st.executeQuery();\n if(result.next()) {\n strReturn = UtilSql.getValue(result, \"createdby\");\n }\n result.close();\n } catch(SQLException e){\n log4j.error(\"SQL error in query: \" + strSql + \"Exception:\"+ e);\n throw new ServletException(\"@CODE=\" + Integer.toString(e.getErrorCode()) + \"@\" + e.getMessage());\n } catch(Exception ex){\n log4j.error(\"Exception in query: \" + strSql + \"Exception:\"+ ex);\n throw new ServletException(\"@CODE=@\" + ex.getMessage());\n } finally {\n try {\n connectionProvider.releasePreparedStatement(st);\n } catch(Exception ignore){\n ignore.printStackTrace();\n }\n }\n return(strReturn);\n }", "public ArrayList<CustomerGenre> getCustomerMostPopularGenre(String customerId){\n ArrayList<CustomerGenre> customerGenres = new ArrayList<>();\n try{\n // try and connect\n conn = DriverManager.getConnection(URL);\n\n // make sql query\n // https://www.geeksforgeeks.org/sql-with-clause/\n PreparedStatement preparedStatement =\n conn.prepareStatement(\"WITH mostPopularGenres AS\" +\n \" (SELECT Customer.FirstName, Genre.Name, COUNT(Track.GenreId) as mostTracks\" +\n \" FROM Customer\" +\n \" INNER JOIN Invoice ON Customer.CustomerId = Invoice.CustomerId\" +\n \" INNER JOIN InvoiceLine ON Invoice.InvoiceId = InvoiceLine.InvoiceId\" +\n \" INNER JOIN Track ON InvoiceLine.TrackId = Track.TrackId\" +\n \" INNER JOIN GENRE ON Track.GenreId = Genre.GenreId\" +\n \" WHERE Customer.CustomerId=?\" +\n \" GROUP BY Genre.GenreId)\" +\n \" SELECT FirstName, Name, mostTracks FROM mostPopularGenres\" +\n \" WHERE (SELECT MAX(mostTracks) FROM mostPopularGenres) = mostTracks\");\n\n // execute query\n preparedStatement.setString(1, customerId);\n ResultSet set = preparedStatement.executeQuery();\n while(set.next()){\n customerGenres.add(new CustomerGenre(\n set.getString(\"FirstName\"),\n set.getString(\"Name\"),\n set.getString(\"mostTracks\")\n ));\n }\n }\n catch(Exception exception){\n System.out.println(exception.toString());\n }\n finally{\n try{\n conn.close();\n }\n catch (Exception exception){\n System.out.println(exception.toString());\n }\n }\n return customerGenres;\n }", "int getUserCount();", "int getUserCount();", "public static void main(String[] args) {\n TypedQuery<Object[]> query = em.createQuery(\n \"SELECT COUNT(p), p.location.city FROM RegularCustomer p WHERE p.location.province = :province GROUP BY p.location.city\", Object[].class);\n List<Object[]> res1 = query.setParameter(\"province\", \"Jawa Barat\").getResultList();\n for (Object[] r : res1) {\n System.out.println(\"Count: \" + r[0] + \", City: \" + r[1]);\n }\n em.close();\n emf.close();\n }", "public void counter(Object filterValue ) throws SQLException, NamingException, IOException {\n\t try {\t\n\t \tContext initContext = new InitialContext(); \n\t \t\tDataSource ds = (DataSource) initContext.lookup(JNDI);\n\t\n\t \t\tcon = ds.getConnection();\n\t \t\t\n\t \t\t//Reconoce la base de datos de conección para ejecutar el query correspondiente a cada uno\n\t \t\tDatabaseMetaData databaseMetaData = con.getMetaData();\n\t \t\tproductName = databaseMetaData.getDatabaseProductName();//Identifica la base de datos de conección\n\t \t\t\n\t \t\tString[] veccodcia = pcodcia.split(\"\\\\ - \", -1);\n\t\n\t \t\tString query = null;\n\t \t\t\n\t \t\tswitch ( productName ) {\n\t case \"Oracle\":\n\t \tquery = \"SELECT count_autos01('\" + ((String) filterValue).toUpperCase() + \"','\" + veccodcia[0] + \"','\" + grupo + \"') from dual\";\n\t break;\n\t case \"PostgreSQL\":\n\t \tquery = \"SELECT count_autos01('\" + ((String) filterValue).toUpperCase() + \"','\" + veccodcia[0] + \"','\" + grupo + \"')\";\n\t break;\n\t \t\t}\n\n\t \t\t \n\t\n\t \n\t pstmt = con.prepareStatement(query);\n\t //System.out.println(query);\n\t\n\t r = pstmt.executeQuery();\n\t \n\t \n\t while (r.next()){\n\t \trows = r.getInt(1);\n\t }\n\t } catch (SQLException e){\n\t e.printStackTrace(); \n\t }\n\t //Cierra las conecciones\n\t pstmt.close();\n\t con.close();\n\t r.close();\n\t\n\t \t}", "@Override\n public int findTotal(){\n try {\n return runner.query(con.getThreadConnection(),\"select count(*) from user\",new BeanHandler<Integer>(Integer.class));\n } catch (SQLException e) {\n System.out.println(\"执行失败\");\n throw new RuntimeException(e);\n }\n }", "public java.sql.ResultSet consultapormedicofecha2(String CodigoMedico,String fecha){\r\n java.sql.ResultSet rs=null;\r\n Statement st = null;\r\n try{\r\n \tConexion con=new Conexion();\r\n \tst = con.conn.createStatement();\r\n \trs=st.executeQuery(\"SELECT phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo,su.usu_codigo,SUBSTRING(phm.horas,7,3) AS jornada FROM pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes,seg_datos_personales sdp,seg_usuario su WHERE pmd.codigo=\"+CodigoMedico+\" AND phm.fechas='\"+fecha+\"' AND phm.codMedico_fk = pmd.codigo AND pmd.codEspe_fk = pes.codigo AND sdp.numeroDocumento=pmd.numeroDocumento AND su.dat_codigo_fk=sdp.dat_codigo AND phm.fechas >= CURDATE() ORDER BY jornada,phm.horas \");\r\n \tSystem.out.println(\"SELECT phm.codigo,phm.horas,phm.fechas,phm.NombrePaciente,pes.nombre_especialidad,pmd.nombre,pmd.apellidos,phm.estado,pes.codigo,pmd.codigo,su.usu_codigo,SUBSTRING(phm.horas,7,3) AS jornada FROM pyp_horariomedico phm,pyp_medico pmd,pyp_especialidad pes,seg_datos_personales sdp,seg_usuario su WHERE pmd.codigo=\"+CodigoMedico+\" AND phm.fechas='\"+fecha+\"' AND phm.codMedico_fk = pmd.codigo AND pmd.codEspe_fk = pes.codigo AND sdp.numeroDocumento=pmd.numeroDocumento AND su.dat_codigo_fk=sdp.dat_codigo AND phm.fechas >= CURDATE() ORDER BY jornada,phm.horas \");\r\n \t\r\n }\r\n catch(Exception ex){\r\n \tSystem.out.println(\"Error en PYP_MetodoConsultasAsignacion>>consultapormedicofecha \"+ex);\r\n }\t\r\n return rs;\r\n }", "public java.util.List<String> dinoConflictivo(){\n java.util.List<String> resultado = new java.util.ArrayList<String>();\n Connection con;\n PreparedStatement stmDinos=null;\n ResultSet rsDinos;\n con=this.getConexion();\n try {\n stmDinos = con.prepareStatement(\"select d.nombre \" +\n \"from incidencias i, dinosaurios d where responsable = d.id \" +\n \"group by responsable, d.nombre \" +\n \"having count(*) >= \" +\n \"(select count(*) as c \" +\n \" from incidencias group by responsable order by c desc limit 1)\");\n rsDinos = stmDinos.executeQuery();\n while (rsDinos.next()){resultado.add(rsDinos.getString(\"nombre\"));}\n } catch (SQLException e){\n System.out.println(e.getMessage());\n this.getFachadaAplicacion().muestraExcepcion(e.getMessage());\n }finally{\n try {stmDinos.close();} catch (SQLException e){System.out.println(\"Imposible cerrar cursores\");}\n }\n return resultado;\n }", "public void iniciarProduccion(){\n try {\n Connection conn = Conectar.conectar();\n Statement st = conn.createStatement();\n ResultSet rs = st.executeQuery(\"select nick from usuarios where nick in(select usuario from construcciones) or nick \"\n +\"in(select usuario from investigaciones) or nick in(select usuario from movimientos)\");\n\n while(rs.next()){\n produccion.add(new Construcciones(rs.getString(1)));\n System.out.println(rs.getString(1));\n }\n\n st.close();\n rs.close();\n conn.close();\n\n }catch(SQLException e){\n System.out.println(\"Fallo actualizacion de produccion.\");\n }\n}", "private String searchAllUserAccountSQL(){\n\t\tString sql = (\"SELECT username, type From user\");\n\t\tString addsql;\n\t\tif(!accountNameViewTextField.getText().equals(\"\")){\n\t\t\taddsql = \" WHERE username = \\'\" + accountNameViewTextField.getText() + \"\\'\";\n\t\t\tsql = sql + addsql;\n\t\t}\n\t\tSystem.out.println(sql);\n\t\treturn sql;\n\t}", "public List<ReporteComprasVentasRetenciones> getReporteExportaciones(int mes, int anio, int idOrganizacion)\r\n/* 260: */ {\r\n/* 261:344 */ StringBuffer sql = new StringBuffer();\r\n/* 262:345 */ sql.append(\"SELECT new ReporteComprasVentasRetenciones(tc.codigo, tc.nombre, COUNT(tc.codigo), \");\r\n/* 263:346 */ sql.append(\" (CASE WHEN tc.codigo = '04' and COALESCE(dpadre.indicadorDocumentoExterior, false) = true THEN -SUM(fcs.baseImponibleTarifaCero) ELSE SUM(fcs.valorFobRefrendo) END), \");\r\n/* 264:347 */ sql.append(\" 'Exportaciones')\");\r\n/* 265:348 */ sql.append(\" FROM FacturaClienteSRI fcs \");\r\n/* 266:349 */ sql.append(\" LEFT OUTER JOIN fcs.tipoComprobanteSRI tc \");\r\n/* 267:350 */ sql.append(\" LEFT OUTER JOIN fcs.facturaCliente fc \");\r\n/* 268:351 */ sql.append(\" LEFT OUTER JOIN fc.documento d \");\r\n/* 269:352 */ sql.append(\" LEFT OUTER JOIN fc.facturaClientePadre fcpadre \");\r\n/* 270:353 */ sql.append(\" LEFT OUTER JOIN fcpadre.documento dpadre \");\r\n/* 271:354 */ sql.append(\" WHERE MONTH(fcs.fechaEmision) =:mes \");\r\n/* 272:355 */ sql.append(\" AND YEAR(fcs.fechaEmision) =:anio \");\r\n/* 273:356 */ sql.append(\" AND fc.estado!=:estadoAnulado \");\r\n/* 274:357 */ sql.append(\" AND fc.indicadorSaldoInicial!=true \");\r\n/* 275:358 */ sql.append(\" AND COALESCE(dpadre.indicadorDocumentoExterior, d.indicadorDocumentoExterior) = true \");\r\n/* 276:359 */ sql.append(\" AND fc.idOrganizacion = :idOrganizacion\");\r\n/* 277:360 */ sql.append(\" GROUP BY tc.codigo, tc.nombre, dpadre.indicadorDocumentoExterior \");\r\n/* 278:361 */ sql.append(\" ORDER BY tc.codigo, tc.nombre \");\r\n/* 279: */ \r\n/* 280:363 */ Query query = this.em.createQuery(sql.toString());\r\n/* 281:364 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 282:365 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 283:366 */ query.setParameter(\"estadoAnulado\", Estado.ANULADO);\r\n/* 284:367 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 285:368 */ return query.getResultList();\r\n/* 286: */ }", "public String aggregations(String query, String since, String until, String fields, String limit, String count)\n \t throws Exception {\n \t\tString apiUrl = \"api/search.json?\";\n\n \t\tthis.query = query;\n \t\tthis.since = since;\n \t\tthis.until = until;\n \t\tthis.fields = fields;\n \t\tthis.limit = limit == \"\" ? \"6\" : limit;\n \t\tthis.count = count == \"\" ? \"0\" : count;\n\n \t\tif (query != \"\") {\n \t\t\tapiUrl = apiUrl + \"query=\" + this.query;\n if (since != \"\") {\n \tapiUrl = apiUrl + \" since:\" + this.since;\n }\n if (until != \"\") {\n \tapiUrl = apiUrl + \" until:\" + this.until;\n }\n apiUrl = apiUrl + \"&source=cache\";\n apiUrl = apiUrl + \"&count=\" + this.count;\n if (fields != \"\") {\n \tapiUrl = apiUrl + \"&fields=\" + this.fields;\n }\n apiUrl = apiUrl + \"&limit=\" + this.limit;\n\n String url = this.baseUrl + apiUrl;\n\n URL urlObj = new URL(url);\n HttpURLConnection con = (HttpURLConnection) urlObj.openConnection();\n\n con.setRequestMethod(\"GET\");\n\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\n\n int responseCode = con.getResponseCode();\n String response = \"\";\n\t\t\tif (responseCode == 200) {\n response = buildReponse(con);\n\t\t\t} else {\n\t\t response = \"{'error': 'Something went wrong, looks like the server is down.'}\";\n\t\t\t}\n\n\t\t\treturn response;\n \t\t} else {\n\t\t\treturn \"{'error': 'No Query string has been sent to query for an account'}\";\n\t\t}\n \t}", "public Iterable<DBObject> mostGrumpy(DBCollection collection) {\n Iterable<DBObject> ai = collection.aggregate(Arrays.asList(\n new BasicDBObject(\"$match\", new BasicDBObject(\"polarity\", new BasicDBObject(\"$eq\", 0))),\n new BasicDBObject(\"$group\", new BasicDBObject(\"_id\", \"$user\").append(\"count\", new BasicDBObject(\"$sum\", 1))),\n new BasicDBObject(\"$sort\", new BasicDBObject(\"count\", -1)),\n new BasicDBObject(\"$limit\", 5)\n )).results();\n return ai;\n }", "@Override\r\n\tpublic String count(String sql) {\n\t\treturn null;\r\n\t}", "public Map<Integer, Long> executeSQL10() {\n Map<Integer, Long> result = records.stream().filter(x -> x.getCustoms().equals(\"y\") && x.getExtendedSecurityCheck().equals(\"y\"))\n .collect(Collectors.groupingBy(Record::getSorter, Collectors.counting()));\n System.out.println(\"SQL 10: \" + result.toString());\n return result;\n\n }", "public ArrayList<City> getPopCityCount() {\n try {\n // Create an SQL statement\n Statement stmt = con.createStatement();\n // Create string for SQL statement\n String strSelect =\n \"SELECT country.Name, (city.Name) AS cName, city.Population, city.District, city.CountryCode\"\n +\" FROM city\"\n +\" INNER JOIN country ON city.CountryCode = country.Code\"\n +\" ORDER BY country.Name, city.Population DESC\";\n // Execute SQL statement\n ResultSet rset = stmt.executeQuery(strSelect);\n // Return new city if valid.\n // Check one is returned\n ArrayList<City> PopCityCount = new ArrayList<>();\n System.out.println(\"10. All the cities in a COUNTRY organised by largest population to smallest.\");\n System.out.println(\"Name | Country | District | Population\");\n while (rset.next()) {\n // Create new Country/City (to store in database)\n City cty = new City();\n cty.Name = rset.getString(\"cName\");\n cty.Population = rset.getInt(\"Population\");\n cty.District = rset.getString(\"District\");\n cty.CountryCode = rset.getString(\"CountryCode\");\n\n Country cnt = new Country();\n cnt.Name = rset.getString(\"Name\");\n System.out.println(cnt.Name + \" | \" + cty.Name + \" | \" + cty.CountryCode + \" | \" + cty.District + \" | \" + cty.Population);\n PopCityCount.add(cty);\n }\n return PopCityCount;\n } catch (Exception e) {\n // City not found.\n System.out.println(e.getMessage());\n System.out.println(\"Failed to get city details\");\n return null;\n }\n }", "@Query(\"select count(a) from Announcement a right join a.rendezvous r group by r.id\")\n\tCollection<Double> dashboardAnnouncementsRatio();", "public String getUserActivePurchaseLog(int conversationId){\n\t String UserActivePurchaseLogId=null;\n\t try{\n\t\t //STEP 2: Register JDBC driver\n\t\t Class.forName(\"com.mysql.jdbc.Driver\");\n\n\t\t //STEP 3: Open a connection\n\t\t ////System.out.println(\"Connecting to database...\");\n\t\t conn = DriverManager.getConnection(DB_URL,USER,PASS);\n\n\t\t //STEP 4: Execute a query\n\t\t ////System.out.println(\"Creating statement...\");\n\t\t stmt = conn.createStatement();\n\t\t \n\t\t //Dapetin jarak setiap narik data\n\t\t String statement = \"SELECT * FROM `purchase_logs` INNER JOIN `conversations` ON `purchase_logs`.`user_id` = `conversations`.`user_id` WHERE `conversations`.`id` = \"+conversationId+\" AND `purchase_logs`.`status` = 0\";\n\t\t \n\t\t ////System.out.println(statement);\n\t\t ResultSet rs = stmt.executeQuery(statement);\n\t\t while(rs.next()){\n\t \t\t\t//////System.out.println(\"test III\");\n\t\t //Retrieve by column name\n\t\t String id = rs.getString(\"id\");\n\t\t //Display values\n\t\t ////System.out.println(\", Purchase Log Id : \" + id);\n\t\t UserActivePurchaseLogId = id;\n\t\t }\n\t\t //STEP 6: Clean-up environment\n\t\t rs.close();\n\t\t stmt.close();\n\t\t conn.close();\n\t\t }catch(SQLException se){\n\t\t //Handle errors for JDBC\n\t\t se.printStackTrace();\n\t\t }catch(Exception e){\n\t\t //Handle errors for Class.forName\n\t\t e.printStackTrace();\n\t\t }finally{\n\t\t //finally block used to close resources\n\t\t try{\n\t\t if(stmt!=null)\n\t\t stmt.close();\n\t\t }catch(SQLException se2){\n\t\t }// nothing we can do\n\t\t try{\n\t\t if(conn!=null)\n\t\t conn.close();\n\t\t }catch(SQLException se){\n\t\t se.printStackTrace();\n\t\t }//end finally try\n\t\t }//end try\n\t \t ////System.out.println(\"Goodbye!\");\t \n\t return UserActivePurchaseLogId;\n }", "public static String todosLosEmpleados_baja(){\n String query=\"SELECT empleado.idEmpleado, persona.nombre, persona.apePaterno, persona.apeMaterno, empleado.codigo, empleado.fechaIngreso,persona.codigoPostal,persona.domicilio,\" +\n\"empleado.puesto, empleado.salario from persona inner join empleado on persona.idPersona=empleado.idPersona where activo=0;\";\n return query;\n }", "private static List<String> findInforUser(String user_id, String nick) {\n\n\t//\tString[] result = new String[2];\n\t\tList<String> lstInfor = new ArrayList<String>();\n\t\tConnection connection = null;\n\t\tPreparedStatement statement = null;\n\t\tResultSet rs = null;\n\n\t\tDBPool dbpool = new DBPool();\n\n\t\ttry {\n\t\t\tconnection = dbpool.getConnection(\"VOVTV\");\n\t\t\tif (connection == null) {\n\t\t\t\tUtil.logger.error(\"Impossible to connect to DB\");\n\t\t\t\treturn lstInfor;\n\t\t\t}\n\n\t\t\t/*String sqlSelect = \"SELECT MSISDN,SexID,Brithday, Address,Favorites FROM [VOVTV].[dbo].NickName WHERE MSISDN LIKE '\"\n\t\t\t\t\t+ user_id + \"' and NickName LIKE '\"+nick+\"'\";*/\n\t\t\tString sqlSelect = \"SELECT MSISDN,SexID,Brithday, Address,Favorites FROM [dbo].NickName WHERE NickName LIKE '\"+nick+\"'\";\n\n\t\t\tUtil.logger.info(\"SEARCH INFOR : \" + sqlSelect);\n\t\t\t/*statement = connection.prepareStatement(sqlSelect);\n\t\t\tUtil.logger.info(\"SEARCH THEO BIRTHDAY AND ADDRESS\");\n\t\t\tif (statement.execute()) {\n\t\t\t\trs = statement.getResultSet();\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tresult = Integer.valueOf(rs.getString(1));\n\t\t\t\t\t//result[1] = rs.getString(2);\n\t\t\t\t}\n\t\t\t}*/\n\t\t\t\n\t\t\tVector result = DBUtil.getVectorTable(connection, sqlSelect);\n\n\t\t\tUtil.logger.info(\"DBUtil.getCode: queryStatement:\" + sqlSelect);\n\n\t\t\tif (result.size() > 0) {\n\t\t\t\tVector item = (Vector) result.elementAt(0);\n\t\t\t\tString msisdn = item.elementAt(0).toString();\n\t\t\t\tString sexid = item.elementAt(1).toString();\n\t\t\t\tString birthday = item.elementAt(2).toString();\n\t\t\t\tString address = item.elementAt(3).toString();\n\t\t\t\tString favorites = item.elementAt(4).toString();\n\t\t\t\tlstInfor.add(msisdn);\n\t\t\t\tString gt = \"\";\n\t\t\t\tif(sexid.equalsIgnoreCase(\"1\")) {\n\t\t\t\t\tgt = \"NAM\";\n\t\t\t\t} else {\n\t\t\t\t\tgt = \"NU\";\n\t\t\t\t}\n\t\t\t\tlstInfor.add(gt);\n\t\t\t\tlstInfor.add(birthday);\n\t\t\t\tlstInfor.add(address);\n\t\t\t\tlstInfor.add(favorites);\n\t\t\t\treturn lstInfor;\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tUtil.logger.error(\": Error:\" + e.toString());\n\t\t\treturn lstInfor;\n\t\t} catch (Exception e) {\n\t\t\tUtil.logger.error(\": Error:\" + e.toString());\n\t\t\treturn lstInfor;\n\t\t} finally {\n\t\t\tdbpool.cleanup(rs);\n\t\t\tdbpool.cleanup(statement);\n\t\t\tdbpool.cleanup(connection);\n\t\t}\n\t\treturn lstInfor;\n\t}", "int getStreamCouponHistoryListCount();" ]
[ "0.5664905", "0.5375259", "0.52676725", "0.51992047", "0.51747566", "0.51549625", "0.513696", "0.5126509", "0.5105845", "0.5038713", "0.5024835", "0.5020769", "0.49804518", "0.4969226", "0.49491066", "0.49467558", "0.4945214", "0.49265632", "0.49219507", "0.4915816", "0.4910276", "0.48821592", "0.48720667", "0.48700166", "0.48301032", "0.4825905", "0.48083305", "0.47989497", "0.47741744", "0.47726262", "0.47726262", "0.47726262", "0.47663328", "0.4765271", "0.47626534", "0.4762244", "0.47598377", "0.4754064", "0.47458148", "0.4744454", "0.474267", "0.47394016", "0.4738943", "0.47388813", "0.47266218", "0.4715508", "0.47010908", "0.46997368", "0.46982592", "0.46977434", "0.4692808", "0.46821192", "0.46821192", "0.46821192", "0.46814418", "0.4678509", "0.4667071", "0.4664951", "0.46539217", "0.46515694", "0.46421355", "0.46340406", "0.46319994", "0.46298695", "0.46217442", "0.46107095", "0.4606312", "0.45990622", "0.4594458", "0.45902163", "0.4588035", "0.4587969", "0.458693", "0.458693", "0.45809817", "0.45635077", "0.45610628", "0.45591092", "0.45579433", "0.45524865", "0.4546633", "0.45454085", "0.45454085", "0.4544506", "0.45442405", "0.45431614", "0.45377418", "0.4536909", "0.4536899", "0.45242026", "0.45221257", "0.45184997", "0.45161238", "0.45108706", "0.45067725", "0.45048407", "0.45027995", "0.45023808", "0.44911045", "0.44885305", "0.44883776" ]
0.0
-1
TODO Autogenerated method stub doGet(request, response);
public String putNewRefCodeAndSendInvitations(ArrayList<String> validEmails, User user) throws MessagingException { String randomId = SessionIdentifierGenerator.nextSessionId(); PreparedStatement pst; EmailHelper emailHelper = new EmailHelper(); try { for(int index = 0;index < validEmails.size(); index++){ pst = RegDataBaseManager.startDatabaseOperation(INSERT_USER); pst.setString(1, randomId+"-"+validEmails.get(index)); pst.setString(2, randomId); pst.setString(3, validEmails.get(index)); RegDataBaseManager.getDatabaseOprationResult(pst); emailHelper.sendInvitationEmail(validEmails.get(index), randomId, user); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } return randomId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n metGet(request, response);\n }", "public void doGet( )\n {\n \n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n \r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t\r\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t}", "public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n }", "public void doGet(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\t}", "public void doGet(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {}", "void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException;", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "public void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\t\t}", "public void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\t}", "public void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows IOException, ServletException {\n\t\tsuper.doGet(request, response);\t\t\t\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \tSystem.out.println(\"---here--get--\");\n processRequest(request, response);\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t}", "@Override\n\tprotected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response) throws ServletException,\n\t IOException {\n\t\twriteResponse(request, response);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n System.out.println(\"teste doget\");\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n //processRequest(request, response);\r\n }", "@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tservice(request,response);\r\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest request, \n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\t\tSystem.out.println(\"Routed to doGet\");\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n //processRequest(request, response);\n }", "@RequestMapping(method=RequestMethod.GET)\n public @ResponseBody void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, JSONException, ParserConfigurationException {\n LOG.debug(\"doGet wgetproxy\");\n createWGET(request, response);\n }", "@Override\r\n public void doGet(String path, HttpServletRequest request, HttpServletResponse response)\r\n throws Exception {\r\n // throw new UnsupportedOperationException();\r\n System.out.println(\"Inside the get\");\r\n response.setContentType(\"text/xml\");\r\n response.setCharacterEncoding(\"utf-8\");\r\n final Writer w = response.getWriter();\r\n w.write(\"inside the get\");\r\n w.close();\r\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t\t\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\r\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\r\n\t}", "@Override\r\n\t\tprotected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t this.doGet(request, response);\r\n\t }", "public void doGet(HttpServletRequest request, HttpServletResponse response) \r\n\tthrows ServletException,IOException{\r\n\t\tdoAction(request, response);\r\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n\t throws ServletException, IOException {\n\tprocessRequest(request, response);\n }", "public void doGet(HttpServletRequest request,\n HttpServletResponse response)\n throws IOException, ServletException {\n \n doPost(request, response);\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "@Override\r\n\tprotected void doPost(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\r\n\t\tdoGet(request, response);\r\n\t}", "@Override\r\n\tprotected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\r\n\t}", "@Override\n\tprotected void executeGet(GetRequest request, OperationResponse response) {\n\t}", "@Override\n\tpublic void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "public void doGet( HttpServletRequest request, HttpServletResponse response )\n throws ServletException, IOException\n {\n handleRequest( request, response, false );\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tdoGet(request, response);\n\t}", "@Override\r\n\tprotected void doPost( final HttpServletRequest request, final HttpServletResponse response ) throws ServletException, IOException {\r\n\t\tdoGet( request, response );\r\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n\n doGet(request, response);\n\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\t// TODO Auto-generated method stub\n\t\t doPost(request, response);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tPrintWriter out = resp.getWriter();\n\t\tout.print(\"<h1>Hello from your doGet method!</h1>\");\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tthis.service(req, resp);\r\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n doGet(request, response);\r\n }", "@Override\n protected void doGet\n (HttpServletRequest request, HttpServletResponse response\n )\n throws ServletException\n , IOException {\n processRequest(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tresponse.getWriter().append(\"Served at: \").append(request.getContextPath());\r\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tresponse.getWriter().append(\"Served at: \").append(request.getContextPath());\r\n\t}", "@Override\n protected void doGet\n (HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "public void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\ndoPost(request, response);\n\t\t\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response)\n\tthrows ServletException, IOException {\nthis.doPost(request, response);\n}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException\r\n {\r\n processRequest(request, response);\r\n }", "public final void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException\n {\n try {\n cleanUpSessionConnection(request.getSession(true));\n setHttpHeaders(request, response);\n// checkAuthentication(request, response);\n generateGetHeader(request, response);\n processGet(request, response);\n generateGetFooter(request, response);\n } catch (IOException e)\n {\n e.printStackTrace();\n throw e;\n }\n catch (ServletException e)\n {\n e.printStackTrace();\n throw e;\n }\n// catch (FGIPermissionException e)\n// {\n// System.err.println(\"Access control violation: \"+e.getMessage());\n// e.printStackTrace(System.err);\n// }\n }", "public void doGet(HttpServletRequest request, HttpServletResponse response)\n throws IOException, ServletException {\n log.trace(\">doGet()\");\n check(request, response);\n log.trace(\"<doGet()\");\n }", "public void doGet(\r\n HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n doPost(request, response);\r\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n processRequest(request,response);\n }", "@Override\n\tprotected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tthis.doGet(request, response);\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request,\r\n HttpServletResponse response)\r\n throws ServletException,\r\n IOException {\r\n processRequest(request,\r\n response);\r\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response);\n\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n doGet(request, response);\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n doGet(request, response);\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n doGet(request, response);\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n doGet(request, response);\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tdoPost(request, response);\r\n\t\t//response.getWriter().append(\"Served at: \").append(request.getContextPath());\r\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tcommandAction(request,response);\r\n\t}" ]
[ "0.77921194", "0.7785038", "0.77386624", "0.7688511", "0.7688511", "0.7677467", "0.76748466", "0.76568663", "0.76506066", "0.7636746", "0.7602038", "0.7601963", "0.7601963", "0.7601963", "0.75951284", "0.75951284", "0.75728214", "0.7562868", "0.7562868", "0.75579035", "0.75420564", "0.74846494", "0.7480689", "0.7480689", "0.7480689", "0.7480689", "0.7480689", "0.7480689", "0.7480689", "0.7480689", "0.7480689", "0.7480689", "0.7480689", "0.7480689", "0.7477989", "0.7470585", "0.7470585", "0.7462343", "0.7438562", "0.7420695", "0.7411974", "0.7395673", "0.7374972", "0.73650414", "0.7351153", "0.73391926", "0.73333514", "0.73190856", "0.7302458", "0.72918266", "0.7289294", "0.7239743", "0.722618", "0.71873975", "0.71873975", "0.7136885", "0.7125714", "0.71230984", "0.711235", "0.71084183", "0.71084183", "0.710833", "0.7105722", "0.71003103", "0.70961285", "0.709137", "0.709137", "0.7078479", "0.7069464", "0.7068651", "0.7059586", "0.7047777", "0.70435786", "0.7035059", "0.702793", "0.70259595", "0.7025346", "0.7025333", "0.7025333", "0.70073", "0.6991946", "0.69701797", "0.69695187", "0.69666004", "0.6961361", "0.6955874", "0.6953209", "0.69482505", "0.6937933", "0.69351935", "0.6932902", "0.6932902", "0.6932902", "0.6932902", "0.6925569", "0.69088787", "0.69088787", "0.69088787", "0.69088787", "0.6907696", "0.69066316" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine(), " "); int tc = Integer.parseInt(st.nextToken()); int n, half, remainder; int[] answer = new int[2]; boolean[] primes = filterPrime(); Collections.sort(primeList); for (int t = 0; t < tc; t++) { st = new StringTokenizer(br.readLine(), " "); n = Integer.parseInt(st.nextToken()); half = n / 2; for (int num : primeList) { if (num > half) break; remainder = n - num; if (primes[remainder]) continue; answer[0] = num; answer[1] = remainder; } for (int ans : answer) { System.out.print(ans + " "); } System.out.println(); } }
{ "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}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\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\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\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.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
Listener that notifies when different radio lists was updated or when there was an error retrieving the radio list
public interface RadioListRetrievedListener { public void onRadioListRetrieved(final List<Radio> radios); public void onError(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface LastPlayedRetrievedListener {\n\n public void onLastPlayedRetrieved(final List<Radio> radios);\n }", "public void onLoadMenuRadioSelected();", "private void setRadioOnCheckedChangedEvent() {\n ((RadioButton) findViewById(R.id.radio_akb48)).setOnCheckedChangeListener(this);\n ((RadioButton) findViewById(R.id.radio_ske48)).setOnCheckedChangeListener(this);\n ((RadioButton) findViewById(R.id.radio_nmb48)).setOnCheckedChangeListener(this);\n ((RadioButton) findViewById(R.id.radio_hkt48)).setOnCheckedChangeListener(this);\n }", "public interface FavoritesRetrievedListener {\n\n public void onFavoritesRetrieved(final List<Radio> radios);\n }", "public void addListenerOnRadioGroupButton() {\n\n priorityRadioGroup = (RadioGroup) findViewById(R.id.priorityRadioGroup);\n medium = (RadioButton) findViewById(R.id.medium);\n high = (RadioButton) findViewById(R.id.high);\n low = (RadioButton) findViewById(R.id.low);\n\n //default value if no value change\n priorityLevel = \"low\";\n low.setChecked(true);\n\n priorityRadioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener()\n {\n public void onCheckedChanged(RadioGroup group, int checkedId) {\n switch(checkedId){\n case R.id.low:\n Log.d(\"TAG\", \"low checked\");\n priorityLevel = \"low\";\n break;\n case R.id.medium:\n Log.d(\"TAG\", \"medium checked\");\n priorityLevel = \"medium\";\n break;\n case R.id.high:\n Log.d(\"TAG\", \"high checked\");\n priorityLevel = \"high\";\n break;\n }\n }\n });\n\n }", "public interface ListListener {\n\t/*\n\t * Called by soundfun.ui when a different element\n\t * has been selected. This also is called if no\n\t * element was previously selected and is now selected.\n\t */\n\tpublic void selected(String action);\n}", "private void setupRadioList() {\r\n // setup the \r\n final ExpandableListView listViewRadioList = (ExpandableListView) findViewById(android.R.id.list);\r\n listViewRadioList.setAdapter(mRadioCategoryAdapter);\r\n listViewRadioList.setOnChildClickListener(new OnChildClickListener() {\r\n\r\n @Override\r\n public boolean onChildClick(final ExpandableListView parent, final View v,\r\n final int groupPosition,\r\n final int childPosition, final long id) {\r\n Radio radio = mRadioCategoryAdapter.getChild(groupPosition, childPosition);\r\n\r\n mRadioPlayer.playRadio(RadioType.RADIO, radio.getId());\r\n setPlayerVisible(true);\r\n return true;\r\n }\r\n });\r\n }", "public void erisRadioButtonListener()\r\n {\r\n \r\n if (erisRadioButton.isSelected())\r\n dwarfPlanetsImageView.setImage(erisImage);\r\n discoveredByLabel.setText(\"Discovered By: Brown, Trujillo, and Rabinowitz\");\r\n dateOfDiscoveryLabel.setText(\"Date of Discovery: October 21, 2003\");\r\n orbitPeriodLabel.setText(\"Orbit Period: 561.37 Earth Years\");\r\n lengthOfDayLabel.setText(\"Length of Day: 25.90 Hours\");\r\n namedAfterLabel.setText(\"Named After: The ancient Greek goddess of discord and strife\");\r\n }", "public ArrayList<Radio> getRadioList(){\n return this.radioList;\n }", "@Override\n public void onPlaylistChanged() {\n for (final MusicStateListener listener : mMusicStateListener) {\n if (listener != null) {\n listener.onPlaylistChanged();\n }\n }\n }", "private void notifyListSelectionListener()\r\n {\r\n \tif (listSelectionListeners != null && listSelectionListeners.size() > 0) \r\n \t{\r\n ListSelectionEvent event = new ListSelectionEvent(this, avatarIndex, avatarIndex, false);\r\n\r\n for (ListSelectionListener listener : listSelectionListeners)\r\n {\r\n listener.valueChanged(event);\r\n }\r\n \t}\r\n }", "@Override\n\n // The flow will come here when\n // any of the radio buttons in the radioGroup\n // has been clicked\n\n // Check which radio button has been clicked\n public void onCheckedChanged(RadioGroup group,\n int checkedId) {\n RadioButton\n radioButton\n = (RadioButton) group\n .findViewById(checkedId);\n }", "private void handleSimSubscriptionInfoChanged() {\n if (!this.mIsSimBindEnable) {\n Assert.isMainThread();\n Log.v(\"KeyguardUpdateMonitor\", \"onSubscriptionInfoChanged()\");\n List completeActiveSubscriptionInfoList = this.mSubscriptionManager.getCompleteActiveSubscriptionInfoList();\n if (completeActiveSubscriptionInfoList != null) {\n Iterator it = completeActiveSubscriptionInfoList.iterator();\n while (it.hasNext()) {\n Log.v(\"KeyguardUpdateMonitor\", \"SubInfo:\" + ((SubscriptionInfo) it.next()));\n }\n } else {\n Log.v(\"KeyguardUpdateMonitor\", \"onSubscriptionInfoChanged: list is null\");\n }\n List<SubscriptionInfo> subscriptionInfo = getSubscriptionInfo(true);\n ArrayList arrayList = new ArrayList();\n for (int i = 0; i < subscriptionInfo.size(); i++) {\n SubscriptionInfo subscriptionInfo2 = subscriptionInfo.get(i);\n if (refreshSimState(subscriptionInfo2.getSubscriptionId(), subscriptionInfo2.getSimSlotIndex())) {\n arrayList.add(subscriptionInfo2);\n }\n }\n for (int i2 = 0; i2 < arrayList.size(); i2++) {\n SimData simData = this.mSimDatas.get(Integer.valueOf(((SubscriptionInfo) arrayList.get(i2)).getSubscriptionId()));\n for (int i3 = 0; i3 < this.mCallbacks.size(); i3++) {\n KeyguardUpdateMonitorCallback keyguardUpdateMonitorCallback = this.mCallbacks.get(i3).get();\n if (keyguardUpdateMonitorCallback != null) {\n keyguardUpdateMonitorCallback.onSimStateChanged(simData.subId, simData.slotId, simData.simState);\n }\n }\n }\n callbacksRefreshCarrierInfo();\n }\n }", "@Override\n public void widgetSelected(SelectionEvent e) {\n if (e.getSource() instanceof Button) {\n onRadioTypeUpdated((Button) e.getSource());\n }\n }", "@Override\n public void onCheckedChanged(RadioGroup group, int checkedId) {\n pos = radioGroup.indexOfChild(findViewById(checkedId));\n switch (pos) {\n case 1:\n\n Status_id = 0;\n new getStudentList().execute();\n // Toast.makeText(getApplicationContext(), \"1\"+Status_id,Toast.LENGTH_SHORT).show();\n break;\n case 2:\n\n Status_id = 1;\n // Toast.makeText(getApplicationContext(), \"2\"+Status_id, Toast.LENGTH_SHORT).show();\n break;\n\n default:\n //The default selection is RadioButton 1\n Status_id = 1;\n new getStudentList().execute();\n // Toast.makeText(getApplicationContext(), \"3\"+Status_id,Toast.LENGTH_SHORT).show();\n break;\n }\n }", "@Override\n\t\t\tpublic void changed(ObservableValue<? extends Toggle> observable, Toggle oldValue, Toggle newValue) {\n\t\t\t\tif (group.getSelectedToggle() != null) {\n\t\t\t\t\tRadioButton button = (RadioButton) group.getSelectedToggle();\n\t\t\t\t\tSystem.out.println(\"Button: \" + button.getText());\n switch (button.getText()) {\n case \"False\":\n ReportResult.updateLastResult(Boolean.FALSE);\n break;\n case \"True\":\n default:\n ReportResult.updateLastResult(Boolean.TRUE);\n break;\n }\n\t\t\t\t\tinfoArea.appendText(\"You choosed the result of the report text : \" + button.getText() + \"\\n\");\n\t\t\t\t}\n\t\t\t}", "public void provide(@NonNull final RadioListRetrievedListener listener) {\n final Long timeBefore = System.currentTimeMillis();\n ServerDataProvider dataProvider = new ServerDataProvider();\n dataProvider.provideRadioList(\n new RadioListRetrievedListener() {\n @Override\n public void onError() {\n listener.onError();\n }\n\n @Override\n public void onRadioListRetrieved(List<Radio> radios) {\n final Long timeElapsedForAddDevice = System.currentTimeMillis() - timeBefore;\n final String timeAddDevice = String.format(\"%1$,.5f\", (double) timeElapsedForAddDevice / 1000);\n Log.d(LOG_TAG, \"time for retrieving \" + timeAddDevice);\n\n Observable<List<Radio>> radiosObservable = requestFromServerAndSync(radios);\n radiosObservable.subscribeOn(Schedulers.newThread()).observeOn(\n AndroidSchedulers.mainThread()).subscribe(\n new Subscriber<List<Radio>>() {\n @Override\n public void onCompleted() {\n // nothing\n }\n\n @Override\n public void onError(Throwable e) {\n listener.onError();\n }\n\n @Override\n public void onNext(List<Radio> radios) {\n\n final Long timeElapsedForAddDevice = System.currentTimeMillis() - timeBefore;\n final String timeAddDevice = String.format(\"%1$,.5f\", (double) timeElapsedForAddDevice / 1000);\n Log.d(LOG_TAG, \"time for all \" + timeAddDevice);\n listener.onRadioListRetrieved(radios);\n }\n });\n\n }\n });\n\n }", "private void onRadioTypeUpdated(Button typeWidget) {\n // Do nothing if this is an internal modification or if the widget has been\n // de-selected.\n if (mInternalTypeUpdate || !typeWidget.getSelection()) {\n return;\n }\n\n // Find type info that has just been enabled.\n TypeInfo type = null;\n for (TypeInfo ti : sTypes) {\n if (ti.getWidget() == typeWidget) {\n type = ti;\n break;\n }\n }\n\n if (type == null) {\n return;\n }\n\n // update the combo\n\n updateRootCombo(type);\n\n // update the folder path\n\n String wsFolderPath = mWsFolderPathTextField.getText();\n String newPath = null;\n\n mConfigSelector.getConfiguration(mTempConfig);\n ResourceQualifier qual = mTempConfig.getInvalidQualifier();\n if (qual == null) {\n // The configuration is valid. Reformat the folder path using the canonical\n // value from the configuration.\n\n newPath = RES_FOLDER_ABS + mTempConfig.getFolderName(type.getResFolderType());\n } else {\n // The configuration is invalid. We still update the path but this time\n // do it manually on the string.\n if (wsFolderPath.startsWith(RES_FOLDER_ABS)) {\n wsFolderPath.replaceFirst(\n \"^(\" + RES_FOLDER_ABS +\")[^-]*(.*)\", //$NON-NLS-1$ //$NON-NLS-2$\n \"\\\\1\" + type.getResFolderName() + \"\\\\2\"); //$NON-NLS-1$ //$NON-NLS-2$\n } else {\n newPath = RES_FOLDER_ABS + mTempConfig.getFolderName(type.getResFolderType());\n }\n }\n\n if (newPath != null && !newPath.equals(wsFolderPath)) {\n mInternalWsFolderPathUpdate = true;\n mWsFolderPathTextField.setText(newPath);\n mInternalWsFolderPathUpdate = false;\n }\n\n validatePage();\n }", "private void addListenerRadioGroup() {\n int selectedID = radioGroupJenisKel.getCheckedRadioButtonId();\n\n //Mencari radio Button\n radioButtonJenisKel = (RadioButton) findViewById(selectedID);\n }", "@Override\n public void valueChanged(ListSelectionEvent le) {\n JMusicList list = (JMusicList) le.getSource();\n\n /* Si la lista existe y no ha sido seleccionada aun */\n if (list != null && JSoundsMainWindowViewController.isSelected)\n {\n /* Se obtiene el indice seleccionado. Si es distinto de -1 algo se selecciono */\n int idx = list.getSelectedIndex();\n if (idx != -1)\n {\n /* Si se selecciono la lista de otro album, se borra la seleccion de la lista anterior */\n if (JSoundsMainWindowViewController.jlActualListSongs != null &&\n !JSoundsMainWindowViewController.jlActualListSongs.equals(list))\n JSoundsMainWindowViewController.jlActualListSongs.clearSelection();\n\n /* La lista actual es la seleccionada */\n JSoundsMainWindowViewController.jlActualListSongs = list; \n }\n\n JSoundsMainWindowViewController.isSelected = false;\n }\n else\n {\n if (!JSoundsMainWindowViewController.isSelected)\n JSoundsMainWindowViewController.isSelected = true;\n }\n }", "@Override\n public void valueChanged(ListSelectionEvent le) {\n JMusicList list = (JMusicList) le.getSource();\n\n /* Si la lista existe y no ha sido seleccionada aun */\n if (list != null && JSoundsMainWindowViewController.isSelected)\n {\n /* Se obtiene el indice seleccionado. Si es distinto de -1 algo se selecciono */\n int idx = list.getSelectedIndex();\n if (idx != -1)\n {\n /* Si se selecciono la lista de otro album, se borra la seleccion de la lista anterior */\n if (JSoundsMainWindowViewController.jlActualListSongs != null &&\n !JSoundsMainWindowViewController.jlActualListSongs.equals(list))\n JSoundsMainWindowViewController.jlActualListSongs.clearSelection();\n\n /* La lista actual es la seleccionada */\n JSoundsMainWindowViewController.jlActualListSongs = list; \n }\n\n JSoundsMainWindowViewController.isSelected = false;\n }\n else\n {\n if (!JSoundsMainWindowViewController.isSelected)\n JSoundsMainWindowViewController.isSelected = true;\n }\n }", "@Override\n public void valueChanged(ListSelectionEvent le) {\n JMusicList list = (JMusicList) le.getSource();\n\n /* Si la lista existe y no ha sido seleccionada aun */\n if (list != null && JSoundsMainWindowViewController.isSelected)\n {\n /* Se obtiene el indice seleccionado. Si es distinto de -1 algo se selecciono */\n int idx = list.getSelectedIndex();\n if (idx != -1)\n {\n /* Si se selecciono la lista de otro album, se borra la seleccion de la lista anterior */\n if (JSoundsMainWindowViewController.jlActualListSongs != null &&\n !JSoundsMainWindowViewController.jlActualListSongs.equals(list))\n JSoundsMainWindowViewController.jlActualListSongs.clearSelection();\n\n /* La lista actual es la seleccionada */\n JSoundsMainWindowViewController.jlActualListSongs = list; \n }\n\n JSoundsMainWindowViewController.isSelected = false;\n }\n else\n {\n if (!JSoundsMainWindowViewController.isSelected)\n JSoundsMainWindowViewController.isSelected = true;\n }\n }", "@Override\n public void valueChanged(ListSelectionEvent le) {\n JMusicList list = (JMusicList) le.getSource();\n\n /* Si la lista existe y no ha sido seleccionada aun */\n if (list != null && JSoundsMainWindowViewController.isSelected)\n {\n /* Se obtiene el indice seleccionado. Si es distinto de -1 algo se selecciono */\n int idx = list.getSelectedIndex();\n if (idx != -1)\n {\n /* Si se selecciono la lista de otro album, se borra la seleccion de la lista anterior */\n if (JSoundsMainWindowViewController.jlActualListSongs != null &&\n !JSoundsMainWindowViewController.jlActualListSongs.equals(list))\n JSoundsMainWindowViewController.jlActualListSongs.clearSelection();\n\n /* La lista actual es la seleccionada */\n JSoundsMainWindowViewController.jlActualListSongs = list; \n }\n\n JSoundsMainWindowViewController.isSelected = false;\n }\n else\n {\n if (!JSoundsMainWindowViewController.isSelected)\n JSoundsMainWindowViewController.isSelected = true;\n }\n }", "private void onClickRadioButton() {\n radioGroupChoice.setOnCheckedChangeListener(this);\n }", "public void valueChanged(ListSelectionEvent event) {\n\t\t\t\tdata = (ConnectionData)((JList)event.getSource()).getSelectedValue();\r\n\t\t\t\t//Enables the Connect button\r\n\t\t\t\tbtnConnect.setEnabled(true);\r\n\t\t\t\t//Enables the Leap Motion and Gamepad radio buttons\r\n\t\t\t\trdbtnLeapMotion.setEnabled(true);\r\n\t\t\t\trdbtnGamepad.setEnabled(true);\r\n\t\t\t}", "private void addListenerOnButton() {\n\t\tradioSex = (RadioGroup) findViewById(R.id.radioSex);\n\t\tbtnDisplay = (Button) findViewById(R.id.btnDisplay);\n\t\n\t\tbtnDisplay.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tint seledtedId = radioSex.getCheckedRadioButtonId();\n\t\t\t\tRadioButton radioMale = (RadioButton) findViewById(seledtedId);\n\t\t\t\tToast.makeText(ExampleRadio.this, radioMale.getText(), Toast.LENGTH_LONG).show();\n\t\t\t}\n\t\t});\n\t}", "public void onRadioButtonClicked2(View view) {\n boolean checked = ((RadioButton) view).isChecked();\n\n // Check which radio button was clicked\n switch(view.getId()) {\n case R.id.R_button3:\n if (checked)\n\n weeklyInformation.radiobutton3(radioButton3.getText().toString());\n\n break;\n case R.id.R_button4:\n if (checked)\n\n weeklyInformation.radiobutton4(radioButton4.getText().toString());\n\n break;\n }\n }", "@Override\n public void onCheckedChanged(RadioGroup radioGroup, @IdRes int checked) {\n }", "void regListValueChanged(){\r\n\t\tseries = dealer.getSeriesQueue();\r\n\t\tIterator<BuzzardSeriesInfo> it = series.iterator();\r\n\t\tint i=0;\r\n\t\tint selInd = reList.getSelectedIndex();\r\n\t\twhile(i<=selInd&&it.hasNext()){\r\n\t\t\tinfo = it.next();\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tnrLabel.setText(nrLabelText + String.valueOf(info.getNoOfMatches()));\r\n\t\t// Welch Freude... wir sehen den Fragezeichenoperator in action ;)\r\n\t\tviLabel.setText(viLabelText + (info.isSimulated()?\"Ja\":\"Nein\"));\r\n\t\tgeList.clear();\r\n\t\tgeList.displayPlayers(info.getPlayers());\r\n\t}", "private void reloadAccountTypeRadioButtons() {\n accountTypeStandardJRadioButton.setSelected(true);\n }", "@Override\n public void onClick(View arg0) {\n\n // get selected radio button from radioGroup\n int selectedId = RadioType.getCheckedRadioButtonId();\n\n // find the radiobutton by returned id\n RadioButton radioButton = (RadioButton) findViewById(selectedId);\n rdButtonSelectedText = radioButton.getText().toString();\n //Call method to get Adjustment List\n if (common.isConnected()) {\n AsyncStockReturnListWSCall task = new AsyncStockReturnListWSCall();\n task.execute();\n }\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n AbstractButton selectedButton = null;\n for (Enumeration<AbstractButton> buttons = buttonGroup.getElements(); buttons.hasMoreElements(); ) {\n AbstractButton button = buttons.nextElement();\n if (button.isSelected()) {\n selectedButton = button;\n }\n }\n\n //Model um das hinzufügen von Zeilen zu ermöglichen\n DefaultListModel<String> list = ((DefaultListModel<String>) listResults.getModel());\n //Jedes mal zuerst die Liste Leeren\n list.clear();\n if (selectedButton == radioButtonAllStyles) {\n /*\n * Erzeugt Guiausgabe der Bierarten.\n * Die id wird mit \"::\" vor dem Bierart Namen ausgeben.\n * */\n beerService.getBeerStyles()\n .forEach((k, v) -> list.addElement(k + \"::\" + v));\n } else if (selectedButton == radioButtonStyle) {\n /*\n * Erzeugt Guiausgabe der Bierarten, welche die Zeichenfolge ″search″ im Namen enthalten.\n * Die id wird mit \"::\" vor dem Bierart Namen ausgeben.\n *\n * @param searchString Zeichenfolge die enthalten sein soll\n * */\n beerService.getBeerStylesBySearchStr(textFieldArgs.getText())\n .forEach((k, v) -> list.addElement(k + \"::\" + v));\n } else if (selectedButton == radioButtonAllBeers) {\n /*\n * Gibt zeilenweise ID und Name mit \"::\" getrennt der Biere aus.\n * */\n beerService.getBeers()\n .forEach(x -> list.addElement((x.getId() + \"::\" + x.getName())));\n } else if (selectedButton == radioButtonBeerWithId) {\n /*\n * Gibt in einer Zeile ID und Namen und in einer zweiten Zeile die Beschreibung\n * des entsprechenden Bieres aus.\n *\n * @param id id nach der gesucht werden soll\n * */\n Beer beer = beerService.getBeerById(textFieldArgs.getText());\n if (beer != null) {\n list.addElement(beer.getId() + \"::\" + beer.getName());\n }\n }\n }", "public void haumeaRadioButtonListener()\r\n {\r\n \r\n if (haumeaRadioButton.isSelected())\r\n dwarfPlanetsImageView.setImage(haumeaImage);\r\n discoveredByLabel.setText(\"Discovered By: Sierra Nevada Observatory\");\r\n dateOfDiscoveryLabel.setText(\"Date of Discovery: March 7, 2003\");\r\n orbitPeriodLabel.setText(\"Orbit Period: 281.93 Earth Years\");\r\n lengthOfDayLabel.setText(\"Length of Day: 3.91 Hours\");\r\n namedAfterLabel.setText(\"Named After: The Hawaiian goddess of childbirth and fertility\");\r\n \r\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}", "private void refreshLights(){\n\n if (this.selectedTrain.getLights() == 1){ this.lightsOnRadioButton.setSelected(true); }\n else if (this.selectedTrain.getLights() == 0){ this.lightsOffRadioButton.setSelected(true); }\n else if (this.selectedTrain.getLights() == -1){ this.lightsFailureRadioButton.setSelected(true); }\n }", "private void onApnChanged() {\n boolean isConnected;\n\n isConnected = (state != State.IDLE && state != State.FAILED);\n\n // TODO: It'd be nice to only do this if the changed entrie(s)\n // match the current operator.\n createAllApnList();\n if (state != State.DISCONNECTING) {\n cleanUpConnection(isConnected, Phone.REASON_APN_CHANGED);\n if (!isConnected) {\n trySetupData(Phone.REASON_APN_CHANGED);\n }\n }\n }", "@Override\n\t\tpublic void onCheckedChanged(RadioGroup group, int checkedId) {\n\t\t\tswitch (checkedId) {\n\t\t\tcase R.id.btn_Interested:\n\t\t\t\tLoadListFriend(Const.TYPE_FRIEND_IDOL_LISTING, 0, false);\n\t\t\t\tbreak;\n\t\t\tcase R.id.btn_Fan:\n\t\t\t\tLoadListFriend(Const.TYPE_FRIEND_FAN_LISTING, 0, false);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "private void updateOntChanges() {\r\n\t\ttry {\r\n\t\t\tString status = \"Status: [ACTION - Update Local Ontology]...\";\r\n\t\t\tstatusBar.setText(status);\r\n\t\t\tif (existingOntRadio.isSelected()) {\r\n\t\t\t\tOWLOntology ont = (OWLOntology) ontBox.getSelectedItem();\r\n\t\t\t\tList changes = swoopModel.getChangesCache().getChangeList(ont.getURI());\r\n\t\t\t\tfor (int i=0; i<changes.size(); i++) {\r\n\t\t\t\t\tSwoopChange swc = (SwoopChange) changes.get(i);\r\n\t\t\t\t\tif (!isPresent(ontChanges, swc)) ontChanges.add(swc.clone());\r\n\t\t\t\t}\r\n\t\t\t\tthis.sortChanges(ontChanges);\r\n\t\t\t\tthis.refreshOntTreeTable(); \r\n\t\t\t}\r\n\t\t\tstatusBar.setText(status+\"DONE\");\r\n\t\t}\r\n\t\tcatch (OWLException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n\t\t\tpublic void onCheckedChanged(RadioGroup group, int checkedId) {\n\t\t\t\tif(checkedId == alreadyRead.getId()){\n\t\t\t\t\treadSatuts = Sms.MESSAGE_READ;\n\t\t\t\t}else if(checkedId == unRead.getId()){\n\t\t\t\t\treadSatuts = Sms.MESSAGE_UNREAD;\n\t\t\t\t}\n\t\t\t}", "public void onPersonListChanged();", "public void handleRadioToggle(){\n\n if(radioBrown.isArmed()){\n radio3.setDisable(false);\n radio3.setSelected(true);\n radio2.setDisable(true);\n radio1.setDisable(true);\n colourValue = 3;\n vegColour = \"brown\";\n }else if(radioGreen.isArmed()){\n radio1.setSelected(true);\n radio1.setDisable(false);\n radio2.setDisable(true);\n radio3.setDisable(true);\n colourValue = 1;\n vegColour = \"green\";\n }else if(radioYellow.isArmed()){\n radio2.setDisable(false);\n radio2.setSelected(true);\n radio1.setDisable(true);\n radio3.setDisable(true);\n colourValue = 2;\n vegColour = \"yellow\";\n }\n }", "public void valueChanged(ListSelectionEvent event) {\n String contratoId = jTableContratos.getValueAt(jTableContratos.getSelectedRow(), 0).toString(); \n String clienteId = jTableContratos.getValueAt(jTableContratos.getSelectedRow(), 6).toString(); \n String activo = jTableContratos.getValueAt(jTableContratos.getSelectedRow(), 8).toString(); \n \n \n if(activo.equalsIgnoreCase(\"1\")){\n radioActivoEdit.setSelected(true);\n }else if(activo.equalsIgnoreCase(\"0\")){\n radioInactivoEdit.setSelected(true);\n }\n \n lblClienteid.setText(clienteId);\n lblContratoId.setText(contratoId);\n \n }", "public int getDataSource(){\n radioList = new ArrayList<Radio>();\n\n new OnlineRadioRetriever().execute(owner.getString(R.string.radio_list));\n\n\n Document doc = null;\n // Try to open an internal source file first\n try {\n String filePath = owner.getBaseContext().getFilesDir() + \"/\" + \"radios.xml\";\n //Log.i(LOG_TAG,\"FILE LOCATION: \" + filePath);\n File fXmlFile = new File(filePath);\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n doc = dBuilder.parse(fXmlFile);\n\n }\n // There is no internal source file, open the default file in Res\n catch (Exception e1) {\n try {\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n doc = dBuilder.parse(owner.getResources().openRawResource(R.raw.radios));\n } catch (Exception e2) {\n //TODO: FireBase Crash report\n e2.printStackTrace();\n }\n }\n // Start reading data file, save into the list of radios\n finally {\n doc.getDocumentElement().normalize();\n\n //Log.i(LOG_TAG, \"Read radios.xml file :\" + doc.getDocumentElement().getNodeName());\n NodeList nList = doc.getElementsByTagName(\"track\");\n //Log.i(LOG_TAG,\"Found \" + nList.getLength() + \" items\");\n\n for (int temp = 0; temp < nList.getLength(); temp++) {\n Node nNode = nList.item(temp);\n if (nNode.getNodeType() == Node.ELEMENT_NODE) {\n Element eElement = (Element) nNode;\n String title = eElement.getElementsByTagName(\"title\").item(0).getTextContent();\n String url = eElement.getElementsByTagName(\"location\").item(0).getTextContent();\n //Log.i(LOG_TAG,\"\\t\" + nNode.getNodeName() + \" #\" + temp + \": Title :\" + title + \" | Url :\" + url);\n radioList.add(new Radio(url, title));\n }\n }\n }\n\n\n if (radioList.size()>0){\n currentStation = 0;\n }\n return radioList.size();\n }", "private void setListeners() {\n\t\trefreshButton.addActionListener(new refreshButtonListener());\n\n\t\tthis.list.addMouseListener(new MouseAdapter() {\n\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent event) {\n\t\t\t\tif (event.getClickCount() == 2 && list.getSelectedValue() != null && !list.getSelectedValue().equals(\"\") && tabs.getSelectedIndex() != -1) {\n\t\t\t\t\tlaunchDocument(tabs.getTitleAt(tabs.getSelectedIndex()), list.getSelectedValue());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\ttabs.addChangeListener(new ChangeListener() {\n\n\t\t\t@Override\n\t\t\tpublic void stateChanged(ChangeEvent arg0) {\n\t\t\t\tif (!tabs.getTitleAt(tabs.getSelectedIndex()).equals(\"Chat\")) {\n\t\t\t\t\tlistmodel.clear();\n\t\t\t\t\tmakeRequest();\n\t\t\t\t}\n\t\t\t}\n\n\t\t});\n\t}", "public interface MediaSelectedListener {\n public void onHasNoSelected();\n\n public void onHasSelected(List<MediaItem> mediaSelectedList);\n}", "private void actionSampleDetectionModeChanged ()\r\n\t{\r\n\t\tif (mainFormLink.getComponentPanelLeft().getComponentRadioModeAuto().isSelected())\r\n\t\t{\r\n\t\t\tmainFormLink.getComponentPanelLeft().getComponentSampleAdd().setEnabled(false);\r\n\t\t\tmainFormLink.getComponentPanelLeft().getComponentSampleAddControl().setEnabled(false);\r\n\t\t\tmainFormLink.getComponentPanelLeft().getComponentSampleDelete().setEnabled(false);\r\n\t\t}\r\n\r\n\t\tif (mainFormLink.getComponentPanelLeft().getComponentRadioModeManual().isSelected())\r\n\t\t{\r\n\t\t\tmainFormLink.getComponentPanelLeft().getComponentSampleAdd().setEnabled(true);\r\n\t\t\tmainFormLink.getComponentPanelLeft().getComponentSampleAddControl().setEnabled(true);\r\n\t\t\tmainFormLink.getComponentPanelLeft().getComponentSampleDelete().setEnabled(true);\r\n\t\t}\r\n\t}", "@Override\n\tpublic abstract void valueChanged(ListSelectionEvent arg0);", "public void showRadioSongs() {\n showSharedSongs(radioSongs);\n }", "@Override\n\t\tpublic void valueChanged(ListSelectionEvent e) {\n\t\t\tif (e.getValueIsAdjusting()) {\n\t\t\t\tJList list = (JList) e.getSource();\n\t\t\t\tint index = list.getSelectedIndex();\n\t\t\t\tSystem.out.println(\"selected: \" + list.getSelectedValue());\n\t\t\t\tint userSelect = list.getSelectedIndex();\n\t\t\t\tplayingDBThread = null;\n\t\t\t\taudioDBThread = null;\n\t\t\t\tload_DB_video(resultListRankedNames.get(userSelect));\n\t\t\t\tupdateSimilarFrame();\n\t\t\t\tslider.setValue(0);\n\t\t\t}\n\t\t}", "protected void onChange(FlxRadioButton RadioButton)\n\t{\n\t\t// Break if it's already selected.\n\t\tif(_current == RadioButton)\n\t\t{\n\t\t\tRadioButton.setActive(true);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tFlxRadioButton object;\n\t\tfor(int i = 0; i < members.size; i++)\n\t\t{\n\t\t\tobject = members.get(i);\n\t\t\tobject.setActive(false);\n\t\t}\n\t\tRadioButton.setActive(true);\n\t\t_current = RadioButton;\n\t\tif(onChange != null)\n\t\t\tonChange.callback();\n\t}", "public interface ChangedListener {\n\n\n public void onMenuChanged(List<Menu> menus);\n\n}", "public void radioButtonChenged() {\n if (this.radioButtons.getSelectedToggle().equals(this.btn1))\r\n radioButtonlabel.setText(\"You selected table 1\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn2))\r\n radioButtonlabel.setText(\"You selected table 2\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn3))\r\n radioButtonlabel.setText(\"You selected table 3\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn4))\r\n radioButtonlabel.setText(\"You selected table 4\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn5))\r\n radioButtonlabel.setText(\"You selected table 5\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn6))\r\n radioButtonlabel.setText(\"You selected table 6\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn7))\r\n radioButtonlabel.setText(\"You selected table 7\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn8))\r\n radioButtonlabel.setText(\"You selected table 8\");\r\n\r\n }", "@Override\r\n\tpublic void onCheckedChanged(RadioGroup group, int checkedId) {\n\t\t\r\n\t}", "public void classListChanged();", "public void alert(){\n\t\tfor (ChangeListener l : listeners) {\n\t\t\tl.stateChanged(new ChangeEvent(this));\n\t\t}\n\t}", "public void ceresRadioButtonListener()\r\n {\r\n \r\n if (ceresRadioButton.isSelected())\r\n dwarfPlanetsImageView.setImage(ceresImage);\r\n discoveredByLabel.setText(\"Discovered By: Giuseppe Piazzi\");\r\n dateOfDiscoveryLabel.setText(\"Date of Discovery: January 1, 1801\");\r\n orbitPeriodLabel.setText(\"Orbit Period: 4.60 Earth Years\");\r\n lengthOfDayLabel.setText(\"Length of Day: 9.07 Hours\");\r\n namedAfterLabel.setText(\"Named After: The Roman Goddess of corn and harvests\");\r\n }", "public void onUpdatedPlaylist() {\n setCurrentTrack();\n //this was implemented so this device could have a view of the playlist\n }", "public void refresh() {\n clearList();\n for(int i =0;i<toDoList.toDoListLength();i++){\n JRadioButton task = toDoButtonList.get(i);\n task.setText(toDoList.getTask(i).toString());\n }\n }", "private void populateSprinklerStatus()\n\t{\n\t\t//get data\n\t\tSprinkler newSprinkler=sprinklerService.getSprinklerByName(selectedId);\n\t\t\n\t\tchkFunctional.setVisible(true);\n\t\tbtnSave.setVisible(true);\n\t\t//btnCancel.setVisible(true);\n\t\t\n\t\tif(newSprinkler.isFunctional())\n\t\t{\n\t\t\tchkFunctional.setSelected(true);//checks functional checkbox.\n\t\t\taddSetting=new AddSetting(selectedId, isSprinklerSelected);\n\t\t\taddSetting.setScheduleListener(new ScheduleListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void scheduleAdded() {\n\t\t\t\t\t// refresh Schedule panel\n\t\t\t\t\tSystem.out.println(\"1.\"+selectedId);\n\t\t\t\t\tschedulePane.removeAll();\n\t\t\t\t\tschedulePane.add(new Schedule(selectedId, isSprinklerSelected));\n\t\t\t\t\tschedulePane.validate();\n\t\t\t\t\tschedulePane.repaint();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t\t\t//settingPane.removeAll();\n\t\t\tsettingPane.remove(1);\n\t\t\tsettingPane.add(addSetting, 1);\n\t\t\taddSetting.setVisible(true);\n\t\t\t//newWeek.setVisible(true);\n\t\t\tschedule.setVisible(true);\n\t\t\t\n\t\t\tif(newSprinkler.getSprinklerStatus().equals(\"OFF\"))\n\t\t\t{\n\t\t\t\t//if sprinkler is off, show ON option \n\t\t\t\t////chkOff.setSelected(true);\n\t\t\t\tbtnOff.setVisible(false);//chkOff.setVisible(false);\n\t\t\t\tbtnOn.setVisible(true);//chkOn.setSelected(false);\n\t\t\t\t//chkOn.setVisible(true);\n\t\t\t\t\n\t\t\t\t//show status as text\n\t\t\t\tlblStatus.setText(\"Status:OFF\");\n\t\t\t\t//show 'off' icon \n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\telse if(newSprinkler.getSprinklerStatus().equals(\"ON\"))\n\t\t\t{\n\t\t\t\t//if sprinkler is on, show OFF option \n\t\t\t\tbtnOff.setVisible(true);//chkOff.setSelected(false);\n\t\t\t\tbtnOn.setVisible(false);//chkOff.setVisible(true);\n\t\t\t\t////chkOn.setSelected(true);\n\t\t\t\t//chkOn.setVisible(false);\n\t\t\t\t//show status as text\n\t\t\t\tlblStatus.setText(\"Status:ON\");\n\t\t\t\t//show 'on' icon \n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse//sprinkler is not functional\n\t\t{\n\t\t\t//uncheck functional checkbox\n\t\t\tchkFunctional.setSelected(false);\n\t\t\t//lblstatus=off and not functional\n\t\t\tlblStatus.setText(\"Status:OFF, Not Functional\");\n\t\t\t//icon=not functional image\n\t\t\t\n\t\t\t//disable add settings/weekly schedule panel\n\t\t\taddSetting.setVisible(false);\n\t\t\t//newWeek.setVisible(false);\n\t\t\tschedule.setVisible(false);\n\t\t\t//only the functional checkbox and save button will be accessible\n\t\t\tbtnOff.setVisible(false);//chkOn.setVisible(false);\n\t\t\tbtnOn.setVisible(false);//chkOff.setVisible(false);\n\n\t\t}\n\t}", "public void onRadioButtonClicked1(View view) {\n boolean checked = ((RadioButton) view).isChecked();\n\n // Check which radio button was clicked\n switch(view.getId()) {\n case R.id.R_button1:\n if (checked)\n\n weeklyInformation.radiobutton1(radioButton1.getText().toString());\n\n break;\n case R.id.R_button2:\n if (checked)\n\n weeklyInformation.radiobutton2(radioButton2.getText().toString());\n\n break;\n }\n }", "public void onRadioButtonClicked4(View view) {\n boolean checked = ((RadioButton) view).isChecked();\n\n // Check which radio button was clicked\n switch(view.getId()) {\n case R.id.R_button7:\n if (checked)\n\n weeklyInformation.radiobutton7(radioButton7.getText().toString());\n\n break;\n case R.id.R_button8:\n if (checked)\n\n weeklyInformation.radiobutton8(radioButton8.getText().toString());\n\n break;\n }\n }", "public void onRadioButtonClicked3(View view) {\n boolean checked = ((RadioButton) view).isChecked();\n\n // Check which radio button was clicked\n switch(view.getId()) {\n case R.id.R_button5:\n if (checked)\n\n weeklyInformation.radiobutton5(radioButton5.getText().toString());\n\n break;\n case R.id.R_button6:\n if (checked)\n\n weeklyInformation.radiobutton6(radioButton6.getText().toString());\n\n break;\n }\n }", "void onChange_placeholder_xjal(ShapeRadioButtonGroup oldValue) {}", "public void contentsChanged(ListDataEvent e) {\n\t\tint size=store.size();\n\t\tif (size<2) return;\n\n\t\t// Remove existing list\n\t\tfor (int index=0; index<size; index++) {\n\t\t // Keep removing the first entry until the list is empty\n\t\t JMenuItem item = identityMenu.getItem(identityIndex);\n\t\t identityButtonGroup.remove(item);\n\t\t identityMenu.remove(item);\n\t\t}\n\n\t\t// Create new list\n\t\tfor (int index=0; index<size; index++)\t{\n\t\t CertificatePair cert = store.get(index);\n\t\t Action action = new ActionSelectCertificate(JGSFrame.this, cert, selection);\n\t\t if (index<9)\n\t\t\taction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"control \"+(index+1)));\n\t\t JRadioButtonMenuItem jrb = new JRadioButtonMenuItem(action);\n\t\t identityButtonGroup.add(jrb);\n\t\t identityMenu.insert(jrb, identityIndex + index);\n\t\t}\n\t }", "protected void notifyWorkflowStatusListeners() {\n\t\tfor (WorkflowStatusListener listener : workflowStatusListeners) {\n\t\t\tlistener.workflowStatusChanged(this);\n\t\t}\n\t}", "@Override\n\t\t\tpublic void onCheckedChanged(RadioGroup group, int checkedId) {\n\t\t\t\tif(checkedId == cpu.getId()){\n\t\t\t\t\tLog.v(TAG,\"cpu\");\n\t\t\t\t\tvibrator.vibrate(pattern, -1);\n\t\t\t\t}else if(checkedId == memory.getId()) {\t\n\t\t\t\t\tvibrator.vibrate(pattern, -1);\n\t\t\t\t\tshowMemoryList();\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}else if(checkedId == useRate.getId()) {\n\t\t\t\t\tLog.v(TAG, \"useRate\");\n\t\t\t\t\tvibrator.vibrate(pattern, -1);\n\t\t\t\t}else if(checkedId == other.getId()) {\n\t\t\t\t\tLog.v(TAG, \"other\");\n\t\t\t\t\tvibrator.vibrate(pattern, -1);\n\t\t\t\t}else{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}", "void onListenerChanged(ListenerUpdate update);", "public void statusChanged() {\n\t\tif(!net.getArray().isEmpty()) {\n\t\t\tigraj.setEnabled(true);\n\t\t}else\n\t\t\tigraj.setEnabled(false);\n\t\t\n\t\tupdateKvota();\n\t\tupdateDobitak();\n\t}", "@Override\n public void valueChanged(ListSelectionEvent arg0) {\n\n }", "private static void fireListChanged(Object tag)\n {\n // if (DEBUG.Enabled) Log.info(\"fireListChanged: \" + Util.tags(tag));\n \n // if (disableEvents)\n // return;\n // for (MetadataListListener mdl : listeners) {\n // try {\n // mdl.listChanged();\n // } catch (Throwable t) {\n // Log.warn(\"listener update: \" + Util.tags(mdl), t);\n // }\n // }\n }", "void onRecommendationChanged();", "private void notifyEventListListeners() {\n this.eventListListeners.forEach(listener -> listener.onEventListChange(this.getEventList()));\n }", "@Override\n\t\t\t\t\tpublic void valueChanged(ListSelectionEvent event) {\n\t\t\t\t\t\tif (event.getValueIsAdjusting()) {\n\t\t\t\t\t\t return; // wait for end of multiple events\n\t\t\t\t\t\t}\n\t\t\t\t\t\tint row = tableErrorList.getSelectedRow();\n\t\t\t\t\t\tif (row > -1) {\n\n\t\t\t\t\t\t\tif (results.getCurrentTest() == null) {\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlogger.debug(\"Loading details for query\" + tableErrorList.getValueAt(row, 0));\n\t\t\t\t\t\t\t// QueryFailure f = results.getResults().get(results.getCurrentTest()).getFailures().get(tableErrorList.getValueAt(row, 0));\n\t\t\t\t\t\t\tQueryFailure f = null;\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t // TODO swing worker? dialog?\n\t\t\t\t\t\t\t\tf = results.loadFailureDetails((String) tableErrorList.getValueAt(row, 0));\n\t\t\t\t\t\t\t} catch (ResultParsingException e) {\n\t\t\t\t\t\t\t\tUtils.showMessageDialog(rootFrame, Level.ERROR, e.getMessage(), e);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t} catch (GUIException e) {\n\t\t\t\t\t\t\t\tUtils.showMessageDialog(rootFrame, Level.ERROR, e.getMessage(), e);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (f == null) {\n\t\t\t\t\t\t\t\tthrow new RuntimeException(\"Internal error: Unable to find failure in the hashtable\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttextAreaActualRes.setText(f.getActualResult());\n\t\t\t\t\t\t\ttextAreaExpectedRest.setText(f.getExpectedResult());\n\t\t\t\t\t\t\ttxtQueryName.setText(f.getQuery());\n\t\t\t\t\t\t\ttxtErrorErrorError.setText(f.getCompareErrors().get(0));\n\t\t\t\t\t\t\t// tables\n\t\t\t\t\t\t\ttableActualResult.parseXML(f.getActualResult());\n\t\t\t\t\t\t\ttableExpectedResult.parseXML(f.getExpectedResult());\n\t\t\t\t\t\t\ttableActualResult.bindCells(tableExpectedResult);\n\t\t\t\t\t\t\tlogger.debug(\"Details loaded for query \" + tableErrorList.getValueAt(row, 0));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttextAreaActualRes.setText(null);\n\t\t\t\t\t\t\ttextAreaExpectedRest.setText(null);\n\t\t\t\t\t\t\ttxtQueryName.setText(null);\n\t\t\t\t\t\t\ttxtErrorErrorError.setText(null);\n\t\t\t\t\t\t\t// tables\n\t\t\t\t\t\t\ttableActualResult.clearTable();\n\t\t\t\t\t\t\ttableExpectedResult.clearTable();\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "private void setListClickedEvent() {\n raceCarList.setOnMouseClicked(new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent event) {\n String raceCarName = raceCarList.getSelectionModel().getSelectedItem();\n RaceCar raceCar = Storage.findRaceCar(raceCarName);\n Storage.setSelectedRaceCar(raceCar);\n clearInputFieldStyle();\n setFields(raceCar);\n setAllFieldsAndSliderDisabled(true);\n setButtonsDisabled(true, false, false);\n ViewHelper.updateCarData();\n }\n });\n }", "@Override\n public void eventsChanged() {\n }", "private void completeListener() {\n buttonPanel.getCompleteTask().addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n for (int i = 0;i<toDoList.toDoListLength();i++) {\n JRadioButton task = toDoButtonList.get(i);\n if (task.isSelected()&& !task.getText().equals(\"\")){\n toDoList.getTask(i).setComplete();\n }\n }\n refresh();\n }\n });\n }", "@Override\n public void onTrackChange(final RadioStream.TrackInfo trackInfo) {\n }", "public interface SettingsSelectedListener\t{\n\t}", "public void bindPlotListChangedEvent(final OIFitsCollectionManagerEventListener listener) {\n getPlotListChangedEventNotifier().register(listener);\n\n // force fire PLOT_LIST_CHANGED event to initialize the listener with current OIFitsCollection ASAP:\n firePlotListChanged(null, listener);\n }", "public interface ListChanged {\n void calculateTotal();\n void showDelete(String data);\n}", "@Override\n\tpublic void playlistChanged(MPDStatus mpdStatus, int oldPlaylistVersion) {\n\t\t\n\t}", "public final void updateListener() {\n\t\tswitch (state) {\n\t\tcase 0:\n\t\t\taddMouseListenerToResultList();\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\taddMouseListenerToMovieDisplay();\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\taddMouseListenerToPersonDisplay();\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\taddMouseListenerToCompanyDisplay();\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\taddMouseListenerToRandomMoviePanel();\n\t\t\tbreak;\n\t\t}\n\t}", "public interface ResourceListener {\n\n\tpublic void update(ResourceList resource);\n}", "public void valueChanged(ListSelectionEvent event) {\n try{\n System.out.println(jTable1.getValueAt(jTable1.getSelectedRow(), 1).toString());\n formArtist = (Artist) jTable1.getValueAt(jTable1.getSelectedRow(), 1);\n \n updateData();\n }\n catch(Exception e){\n \n }\n }", "private void infereProteinsChanged() {\n boolean enabled = checkInferProteins.isSelected();\n\n filtersProteinInference.setEnabled(enabled);\n comboAvailableBaseScores.setEnabled(enabled);\n filtersProteinLevel.setEnabled(enabled);\n\n Enumeration<AbstractButton> btns = radioGrpInferenceMethod.getElements();\n while (btns.hasMoreElements()) {\n btns.nextElement().setEnabled(enabled);\n }\n\n btns = radioGrpProteinScoring.getElements();\n while (btns.hasMoreElements()) {\n btns.nextElement().setEnabled(enabled);\n }\n\n btns = radioGrpPSMsForScoring.getElements();\n while (btns.hasMoreElements()) {\n btns.nextElement().setEnabled(enabled);\n }\n }", "public void addRadioActionListener(ActionListener listener) {\n m_nowNoEndBut.addActionListener(listener);\n m_dateBut.addActionListener(listener);\n }", "public void handleNetworkChoice(View view) {\n boolean checked = ((RadioButton) view).isChecked();\n \n // Check which radio button was clicked\n switch(view.getId()) {\n case R.id.gps:\n if (checked)\n \tlocationProvider = LocationManager.GPS_PROVIDER;\n typeView.setText(\"GPS\"); \n break;\n case R.id.network:\n if (checked)\n \tlocationProvider = LocationManager.NETWORK_PROVIDER;\n \ttypeView.setText(\"NETWORK\");\n break;\n }\n \n locationManager.removeUpdates(listener);\n locationManager.requestLocationUpdates(locationProvider, 0, 0, listener);\n Location last = locationManager.getLastKnownLocation(locationProvider);\n if (last != null) {\n \tnew Checker(typeView, deviceId).execute(last);\n }\n }", "private void addListener() {\n\t\tOperatorPair operators = chooseOperators(name);\n\t\t\n\t\taddActionListener(e -> {\n\t\t\ttry {\n\t\t\t\tif (inversion.isSelected()) {\n\t\t\t\t\tmodel.setValue(operators.inversed.applyAsDouble(model.getValue()));\n\t\t\t\t} else {\n\t\t\t\t\tmodel.setValue(operators.original.applyAsDouble(model.getValue()));\n\t\t\t\t}\n\t\t\t} catch(IllegalArgumentException ex) {\n\t\t\t\tmodel.clearAll();\n\t\t\t\tpopupMessage(\"Cannot perform that operation.\");\n\t\t\t}\n\t\t});\n\t}", "private void setupRadioGroup(){\n //region Used to set up the RadioGroup\n\n selectUserTypeRadioGroup.clearCheck();\n selectUserTypeRadioGroup.setOnCheckedChangeListener(\n new RadioGroup.OnCheckedChangeListener() {\n @Override\n public void onCheckedChanged(RadioGroup group, int checkedId) {\n RadioButton clickedButton = group.findViewById(checkedId);\n if(checkedId == R.id.createAccountStudentRadio){\n isStudent = true;\n isTeacher = false;}\n else if(checkedId == R.id.createAccountTeacherRadio){\n isTeacher = true;\n isStudent = false;}\n else\n Log.d(\"Create Account\", \"Something has gone wrong picking user type\");\n }\n }\n );\n\n //endregion\n }", "public void radioSelect(ActionEvent e)\n\t{\n\t\tString rep=\"\";\n\t\tif(rdoOui.isSelected())\n\t\t\trep=\"Oui\";\n\t\telse if(rdoNon.isSelected())\n\t\t\trep=\"Non\";\n\t\telse\n\t\t\trep=\"Peut être\";\n\t\tlblRadio.setText(rep);\n\t}", "public void mostrarPregunta(int indicePregunta){\n etiquetaTituloPregunta.setText(preguntas.get(indicePregunta).getTitulo());\n\n //Llenamos con el modelo los radio buttons\n for (int i = 0; i < radios.size(); i++) {\n radios.get(i).setText(preguntas.get(indicePregunta).getOpciones()[i].getTitulo());\n }\n\n}", "public void playCurrent() {\n owner.setMode(MyFlag.RADIO_MODE);\n\n // Case PAUSE\n if(radioPlayer.isPlaying()){\n radioPlayer.pause();\n this.isPaused = true;\n currentStationStatus = \"stop\";\n notifyUser(MyFlag.PLAY, currentStationName, currentStationGenre);\n return;\n }\n\n // Otherwise, case PLAY\n // Check for internet connection and update UI before streaming\n resetAllInfo();\n if(isOnline()) {\n currentStationStatus = \"Loading Stream...\";\n notifyUser(MyFlag.PAUSE, currentStationName, currentStationStatus);\n } else {\n currentStationStatus = \"No Internet Connection\";\n notifyUser(MyFlag.PAUSE, currentStationName, currentStationStatus);\n return;\n }\n\n radioPlayer.reset();\n isPaused = false;\n\n try {\n radioPlayer.setDataSource(radioList.get(currentStation).getUrl());\n radioPlayer.prepareAsync();\n radioPlayer.setOnPreparedListener(new MediaPlayer.OnPreparedListener() {\n public void onPrepared(MediaPlayer mp) {\n radioPlayer.start(); //start streaming\n }\n });\n // fetch data from server to update notification bar\n fetch(radioList.get(currentStation).getUrl());\n } catch (Exception e) {\n // IllegalArgumentException , IOException, IllegalStateException\n // Are all because of Error setting data source (bad url)\n //e.printStackTrace();\n resetAllInfoExceptBitrate();\n currentStationStatus = \"Url not accessible\";\n notifyUser(MyFlag.PAUSE, currentStationName, currentStationStatus);\n }\n }", "void changed(DiscoveryEvent e);", "private void firePlotListChanged() {\n firePlotListChanged(this, null);\n }", "@Override\r\n\t\tpublic void valueChanged(ListSelectionEvent e) {\r\n\t\t\t\r\n\t\t}", "public void updateList(List<?> listOfObjects){\n this.radioObjects = listOfObjects;\n }", "public void plutoRadioButtonListener()\r\n {\r\n \r\n if (plutoRadioButton.isSelected())\r\n dwarfPlanetsImageView.setImage(plutoImage);\r\n discoveredByLabel.setText(\"Discovered By: Clyde Tombaugh\");\r\n dateOfDiscoveryLabel.setText(\"Date of Discovery: February 18 1930\");\r\n orbitPeriodLabel.setText(\"Orbit Period: 247.92 Earth Years\");\r\n lengthOfDayLabel.setText(\"Length of Day: 153.29 Hours\");\r\n namedAfterLabel.setText(\"Named After: The ancient Greek god of the underworld\");\r\n }", "public interface ListSurveyCallback {\n\n void onGetListSurveySuccess(List<ProspekListItemModel> listItemModels);\n\n void onGetListSurveyFailed(Throwable t);\n}", "public void onRadioButtonClicked(View view) {\n boolean checked = ((RadioButton) view).isChecked();\n\n // Check which radio button was clicked\n switch(view.getId()) {\n case R.id.radio_sat:\n if (checked) {\n LinearLayout time_options;\n time_options = (LinearLayout) findViewById(R.id.choose_time);\n time_options.setVisibility(View.VISIBLE);\n }\n\n break;\n case R.id.radio_fri:\n if (checked)\n // Ninjas rule\n break;\n case R.id.radio_eleven:\n if (checked) {\n Button offerHelp;\n offerHelp = (Button) findViewById(R.id.offer_help);\n offerHelp.setEnabled(true);\n offerHelp.setBackgroundResource(R.drawable.primary_button);\n }\n break;\n case R.id.radio_five:\n if (checked)\n // Ninjas rule\n break;\n }\n }", "private void setRadioButtonState() {\n if (selectedAnswerOne.equals(\"ONE\")) {\n questionOneAnswerOne.setChecked(true);\n }\n if (selectedAnswerOne.equals(\"TWO\")) {\n questionOneAnswerTwo.setChecked(true);\n }\n if (selectedAnswerOne.equals(\"THREE\")) {\n questionOneAnswerThree.setChecked(true);\n }\n if (selectedAnswerOne.equals(\"FOUR\")) {\n questionOneAnswerFour.setChecked(true);\n }\n\n if (selectedAnswerTwo.equals(\"ONE\")) {\n questionTwoAnswerOne.setChecked(true);\n }\n if (selectedAnswerTwo.equals(\"TWO\")) {\n questionTwoAnswerTwo.setChecked(true);\n }\n if (selectedAnswerTwo.equals(\"THREE\")) {\n questionTwoAnswerThree.setChecked(true);\n }\n if (selectedAnswerTwo.equals(\"FOUR\")) {\n questionTwoAnswerFour.setChecked(true);\n }\n\n if (selectedAnswerThree.equals(\"ONE\")) {\n questionThreeAnswerOne.setChecked(true);\n }\n if (selectedAnswerThree.equals(\"TWO\")) {\n questionThreeAnswerTwo.setChecked(true);\n }\n if (selectedAnswerThree.equals(\"THREE\")) {\n questionThreeAnswerThree.setChecked(true);\n }\n if (selectedAnswerThree.equals(\"FOUR\")) {\n questionThreeAnswerFour.setChecked(true);\n }\n\n if (selectedAnswerFour.equals(\"ONE\")) {\n questionFourAnswerOne.setChecked(true);\n }\n if (selectedAnswerFour.equals(\"TWO\")) {\n questionFourAnswerTwo.setChecked(true);\n }\n if (selectedAnswerFour.equals(\"THREE\")) {\n questionFourAnswerThree.setChecked(true);\n }\n if (selectedAnswerFour.equals(\"FOUR\")) {\n questionFourAnswerFour.setChecked(true);\n }\n\n if (selectedAnswerFive.equals(\"ONE\")) {\n questionFiveAnswerOne.setChecked(true);\n }\n if (selectedAnswerFive.equals(\"TWO\")) {\n questionFiveAnswerTwo.setChecked(true);\n }\n if (selectedAnswerFive.equals(\"THREE\")) {\n questionFiveAnswerThree.setChecked(true);\n }\n if (selectedAnswerFive.equals(\"FOUR\")) {\n questionFiveAnswerFour.setChecked(true);\n }\n\n if (selectedAnswerSix.equals(\"ONE\")) {\n questionSixAnswerOne.setChecked(true);\n }\n if (selectedAnswerSix.equals(\"TWO\")) {\n questionSixAnswerTwo.setChecked(true);\n }\n if (selectedAnswerSix.equals(\"THREE\")) {\n questionSixAnswerThree.setChecked(true);\n }\n if (selectedAnswerSix.equals(\"FOUR\")) {\n questionSixAnswerFour.setChecked(true);\n }\n\n if (selectedAnswerSeven.equals(\"ONE\")) {\n questionSevenAnswerOne.setChecked(true);\n }\n if (selectedAnswerSeven.equals(\"TWO\")) {\n questionSevenAnswerTwo.setChecked(true);\n }\n if (selectedAnswerSeven.equals(\"THREE\")) {\n questionSevenAnswerThree.setChecked(true);\n }\n if (selectedAnswerSeven.equals(\"FOUR\")) {\n questionSevenAnswerFour.setChecked(true);\n }\n }" ]
[ "0.67605525", "0.6233974", "0.6195641", "0.6095475", "0.5831984", "0.5794867", "0.5763938", "0.5704236", "0.5635665", "0.5623923", "0.56214726", "0.55701107", "0.55685204", "0.5557654", "0.5555343", "0.5549107", "0.5527899", "0.5527885", "0.55271274", "0.5520233", "0.5520233", "0.5520233", "0.5520233", "0.54988754", "0.5478107", "0.5456513", "0.54269874", "0.54020965", "0.5395228", "0.53889066", "0.536663", "0.53640306", "0.53519994", "0.53512895", "0.53488845", "0.5334192", "0.5306733", "0.53037333", "0.52951616", "0.5276925", "0.5270626", "0.5270567", "0.5258099", "0.5250147", "0.5242899", "0.5235952", "0.52356553", "0.52180624", "0.52042514", "0.5197777", "0.5195763", "0.519164", "0.5184743", "0.5184688", "0.5184426", "0.51788676", "0.5167766", "0.51672184", "0.5164312", "0.5162941", "0.5161946", "0.5160373", "0.5152535", "0.51409644", "0.51399004", "0.5133129", "0.51270956", "0.5126675", "0.5125725", "0.51255465", "0.5119923", "0.5108542", "0.51066333", "0.5103493", "0.50961757", "0.5089752", "0.5085125", "0.5081841", "0.5070896", "0.5069483", "0.50693965", "0.5068819", "0.5067355", "0.50597113", "0.5055461", "0.5050205", "0.50447464", "0.504158", "0.503827", "0.50382644", "0.50380504", "0.50318426", "0.50281245", "0.50230545", "0.5022992", "0.501912", "0.50091696", "0.49940467", "0.49888495", "0.49885" ]
0.74377465
0
Listener that notifies when different radio lists was updated
public interface FavoritesRetrievedListener { public void onFavoritesRetrieved(final List<Radio> radios); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface RadioListRetrievedListener {\n\n public void onRadioListRetrieved(final List<Radio> radios);\n\n public void onError();\n }", "public interface LastPlayedRetrievedListener {\n\n public void onLastPlayedRetrieved(final List<Radio> radios);\n }", "private void setRadioOnCheckedChangedEvent() {\n ((RadioButton) findViewById(R.id.radio_akb48)).setOnCheckedChangeListener(this);\n ((RadioButton) findViewById(R.id.radio_ske48)).setOnCheckedChangeListener(this);\n ((RadioButton) findViewById(R.id.radio_nmb48)).setOnCheckedChangeListener(this);\n ((RadioButton) findViewById(R.id.radio_hkt48)).setOnCheckedChangeListener(this);\n }", "@Override\n public void widgetSelected(SelectionEvent e) {\n if (e.getSource() instanceof Button) {\n onRadioTypeUpdated((Button) e.getSource());\n }\n }", "public void onLoadMenuRadioSelected();", "public interface ListListener {\n\t/*\n\t * Called by soundfun.ui when a different element\n\t * has been selected. This also is called if no\n\t * element was previously selected and is now selected.\n\t */\n\tpublic void selected(String action);\n}", "@Override\n\t\t\tpublic void changed(ObservableValue<? extends Toggle> observable, Toggle oldValue, Toggle newValue) {\n\t\t\t\tif (group.getSelectedToggle() != null) {\n\t\t\t\t\tRadioButton button = (RadioButton) group.getSelectedToggle();\n\t\t\t\t\tSystem.out.println(\"Button: \" + button.getText());\n switch (button.getText()) {\n case \"False\":\n ReportResult.updateLastResult(Boolean.FALSE);\n break;\n case \"True\":\n default:\n ReportResult.updateLastResult(Boolean.TRUE);\n break;\n }\n\t\t\t\t\tinfoArea.appendText(\"You choosed the result of the report text : \" + button.getText() + \"\\n\");\n\t\t\t\t}\n\t\t\t}", "@Override\n public void onPlaylistChanged() {\n for (final MusicStateListener listener : mMusicStateListener) {\n if (listener != null) {\n listener.onPlaylistChanged();\n }\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}", "private void notifyListSelectionListener()\r\n {\r\n \tif (listSelectionListeners != null && listSelectionListeners.size() > 0) \r\n \t{\r\n ListSelectionEvent event = new ListSelectionEvent(this, avatarIndex, avatarIndex, false);\r\n\r\n for (ListSelectionListener listener : listSelectionListeners)\r\n {\r\n listener.valueChanged(event);\r\n }\r\n \t}\r\n }", "void regListValueChanged(){\r\n\t\tseries = dealer.getSeriesQueue();\r\n\t\tIterator<BuzzardSeriesInfo> it = series.iterator();\r\n\t\tint i=0;\r\n\t\tint selInd = reList.getSelectedIndex();\r\n\t\twhile(i<=selInd&&it.hasNext()){\r\n\t\t\tinfo = it.next();\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tnrLabel.setText(nrLabelText + String.valueOf(info.getNoOfMatches()));\r\n\t\t// Welch Freude... wir sehen den Fragezeichenoperator in action ;)\r\n\t\tviLabel.setText(viLabelText + (info.isSimulated()?\"Ja\":\"Nein\"));\r\n\t\tgeList.clear();\r\n\t\tgeList.displayPlayers(info.getPlayers());\r\n\t}", "public void addListenerOnRadioGroupButton() {\n\n priorityRadioGroup = (RadioGroup) findViewById(R.id.priorityRadioGroup);\n medium = (RadioButton) findViewById(R.id.medium);\n high = (RadioButton) findViewById(R.id.high);\n low = (RadioButton) findViewById(R.id.low);\n\n //default value if no value change\n priorityLevel = \"low\";\n low.setChecked(true);\n\n priorityRadioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener()\n {\n public void onCheckedChanged(RadioGroup group, int checkedId) {\n switch(checkedId){\n case R.id.low:\n Log.d(\"TAG\", \"low checked\");\n priorityLevel = \"low\";\n break;\n case R.id.medium:\n Log.d(\"TAG\", \"medium checked\");\n priorityLevel = \"medium\";\n break;\n case R.id.high:\n Log.d(\"TAG\", \"high checked\");\n priorityLevel = \"high\";\n break;\n }\n }\n });\n\n }", "@Override\n public void valueChanged(ListSelectionEvent le) {\n JMusicList list = (JMusicList) le.getSource();\n\n /* Si la lista existe y no ha sido seleccionada aun */\n if (list != null && JSoundsMainWindowViewController.isSelected)\n {\n /* Se obtiene el indice seleccionado. Si es distinto de -1 algo se selecciono */\n int idx = list.getSelectedIndex();\n if (idx != -1)\n {\n /* Si se selecciono la lista de otro album, se borra la seleccion de la lista anterior */\n if (JSoundsMainWindowViewController.jlActualListSongs != null &&\n !JSoundsMainWindowViewController.jlActualListSongs.equals(list))\n JSoundsMainWindowViewController.jlActualListSongs.clearSelection();\n\n /* La lista actual es la seleccionada */\n JSoundsMainWindowViewController.jlActualListSongs = list; \n }\n\n JSoundsMainWindowViewController.isSelected = false;\n }\n else\n {\n if (!JSoundsMainWindowViewController.isSelected)\n JSoundsMainWindowViewController.isSelected = true;\n }\n }", "@Override\n public void valueChanged(ListSelectionEvent le) {\n JMusicList list = (JMusicList) le.getSource();\n\n /* Si la lista existe y no ha sido seleccionada aun */\n if (list != null && JSoundsMainWindowViewController.isSelected)\n {\n /* Se obtiene el indice seleccionado. Si es distinto de -1 algo se selecciono */\n int idx = list.getSelectedIndex();\n if (idx != -1)\n {\n /* Si se selecciono la lista de otro album, se borra la seleccion de la lista anterior */\n if (JSoundsMainWindowViewController.jlActualListSongs != null &&\n !JSoundsMainWindowViewController.jlActualListSongs.equals(list))\n JSoundsMainWindowViewController.jlActualListSongs.clearSelection();\n\n /* La lista actual es la seleccionada */\n JSoundsMainWindowViewController.jlActualListSongs = list; \n }\n\n JSoundsMainWindowViewController.isSelected = false;\n }\n else\n {\n if (!JSoundsMainWindowViewController.isSelected)\n JSoundsMainWindowViewController.isSelected = true;\n }\n }", "@Override\n public void valueChanged(ListSelectionEvent le) {\n JMusicList list = (JMusicList) le.getSource();\n\n /* Si la lista existe y no ha sido seleccionada aun */\n if (list != null && JSoundsMainWindowViewController.isSelected)\n {\n /* Se obtiene el indice seleccionado. Si es distinto de -1 algo se selecciono */\n int idx = list.getSelectedIndex();\n if (idx != -1)\n {\n /* Si se selecciono la lista de otro album, se borra la seleccion de la lista anterior */\n if (JSoundsMainWindowViewController.jlActualListSongs != null &&\n !JSoundsMainWindowViewController.jlActualListSongs.equals(list))\n JSoundsMainWindowViewController.jlActualListSongs.clearSelection();\n\n /* La lista actual es la seleccionada */\n JSoundsMainWindowViewController.jlActualListSongs = list; \n }\n\n JSoundsMainWindowViewController.isSelected = false;\n }\n else\n {\n if (!JSoundsMainWindowViewController.isSelected)\n JSoundsMainWindowViewController.isSelected = true;\n }\n }", "@Override\n public void valueChanged(ListSelectionEvent le) {\n JMusicList list = (JMusicList) le.getSource();\n\n /* Si la lista existe y no ha sido seleccionada aun */\n if (list != null && JSoundsMainWindowViewController.isSelected)\n {\n /* Se obtiene el indice seleccionado. Si es distinto de -1 algo se selecciono */\n int idx = list.getSelectedIndex();\n if (idx != -1)\n {\n /* Si se selecciono la lista de otro album, se borra la seleccion de la lista anterior */\n if (JSoundsMainWindowViewController.jlActualListSongs != null &&\n !JSoundsMainWindowViewController.jlActualListSongs.equals(list))\n JSoundsMainWindowViewController.jlActualListSongs.clearSelection();\n\n /* La lista actual es la seleccionada */\n JSoundsMainWindowViewController.jlActualListSongs = list; \n }\n\n JSoundsMainWindowViewController.isSelected = false;\n }\n else\n {\n if (!JSoundsMainWindowViewController.isSelected)\n JSoundsMainWindowViewController.isSelected = true;\n }\n }", "public void valueChanged(ListSelectionEvent event) {\n\t\t\t\tdata = (ConnectionData)((JList)event.getSource()).getSelectedValue();\r\n\t\t\t\t//Enables the Connect button\r\n\t\t\t\tbtnConnect.setEnabled(true);\r\n\t\t\t\t//Enables the Leap Motion and Gamepad radio buttons\r\n\t\t\t\trdbtnLeapMotion.setEnabled(true);\r\n\t\t\t\trdbtnGamepad.setEnabled(true);\r\n\t\t\t}", "public void classListChanged();", "void onListenerChanged(ListenerUpdate update);", "public interface ChangedListener {\n\n\n public void onMenuChanged(List<Menu> menus);\n\n}", "@Override\n\tpublic abstract void valueChanged(ListSelectionEvent arg0);", "public final void updateListener() {\n\t\tswitch (state) {\n\t\tcase 0:\n\t\t\taddMouseListenerToResultList();\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\taddMouseListenerToMovieDisplay();\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\taddMouseListenerToPersonDisplay();\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\taddMouseListenerToCompanyDisplay();\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\taddMouseListenerToRandomMoviePanel();\n\t\t\tbreak;\n\t\t}\n\t}", "private void onRadioTypeUpdated(Button typeWidget) {\n // Do nothing if this is an internal modification or if the widget has been\n // de-selected.\n if (mInternalTypeUpdate || !typeWidget.getSelection()) {\n return;\n }\n\n // Find type info that has just been enabled.\n TypeInfo type = null;\n for (TypeInfo ti : sTypes) {\n if (ti.getWidget() == typeWidget) {\n type = ti;\n break;\n }\n }\n\n if (type == null) {\n return;\n }\n\n // update the combo\n\n updateRootCombo(type);\n\n // update the folder path\n\n String wsFolderPath = mWsFolderPathTextField.getText();\n String newPath = null;\n\n mConfigSelector.getConfiguration(mTempConfig);\n ResourceQualifier qual = mTempConfig.getInvalidQualifier();\n if (qual == null) {\n // The configuration is valid. Reformat the folder path using the canonical\n // value from the configuration.\n\n newPath = RES_FOLDER_ABS + mTempConfig.getFolderName(type.getResFolderType());\n } else {\n // The configuration is invalid. We still update the path but this time\n // do it manually on the string.\n if (wsFolderPath.startsWith(RES_FOLDER_ABS)) {\n wsFolderPath.replaceFirst(\n \"^(\" + RES_FOLDER_ABS +\")[^-]*(.*)\", //$NON-NLS-1$ //$NON-NLS-2$\n \"\\\\1\" + type.getResFolderName() + \"\\\\2\"); //$NON-NLS-1$ //$NON-NLS-2$\n } else {\n newPath = RES_FOLDER_ABS + mTempConfig.getFolderName(type.getResFolderType());\n }\n }\n\n if (newPath != null && !newPath.equals(wsFolderPath)) {\n mInternalWsFolderPathUpdate = true;\n mWsFolderPathTextField.setText(newPath);\n mInternalWsFolderPathUpdate = false;\n }\n\n validatePage();\n }", "private void setupRadioList() {\r\n // setup the \r\n final ExpandableListView listViewRadioList = (ExpandableListView) findViewById(android.R.id.list);\r\n listViewRadioList.setAdapter(mRadioCategoryAdapter);\r\n listViewRadioList.setOnChildClickListener(new OnChildClickListener() {\r\n\r\n @Override\r\n public boolean onChildClick(final ExpandableListView parent, final View v,\r\n final int groupPosition,\r\n final int childPosition, final long id) {\r\n Radio radio = mRadioCategoryAdapter.getChild(groupPosition, childPosition);\r\n\r\n mRadioPlayer.playRadio(RadioType.RADIO, radio.getId());\r\n setPlayerVisible(true);\r\n return true;\r\n }\r\n });\r\n }", "@Override\n\t\tpublic void valueChanged(ListSelectionEvent e) {\n\t\t\tif (e.getValueIsAdjusting()) {\n\t\t\t\tJList list = (JList) e.getSource();\n\t\t\t\tint index = list.getSelectedIndex();\n\t\t\t\tSystem.out.println(\"selected: \" + list.getSelectedValue());\n\t\t\t\tint userSelect = list.getSelectedIndex();\n\t\t\t\tplayingDBThread = null;\n\t\t\t\taudioDBThread = null;\n\t\t\t\tload_DB_video(resultListRankedNames.get(userSelect));\n\t\t\t\tupdateSimilarFrame();\n\t\t\t\tslider.setValue(0);\n\t\t\t}\n\t\t}", "private void refreshLights(){\n\n if (this.selectedTrain.getLights() == 1){ this.lightsOnRadioButton.setSelected(true); }\n else if (this.selectedTrain.getLights() == 0){ this.lightsOffRadioButton.setSelected(true); }\n else if (this.selectedTrain.getLights() == -1){ this.lightsFailureRadioButton.setSelected(true); }\n }", "public void updateList(List<?> listOfObjects){\n this.radioObjects = listOfObjects;\n }", "@Override\n public void onCheckedChanged(RadioGroup radioGroup, @IdRes int checked) {\n }", "private void handleSimSubscriptionInfoChanged() {\n if (!this.mIsSimBindEnable) {\n Assert.isMainThread();\n Log.v(\"KeyguardUpdateMonitor\", \"onSubscriptionInfoChanged()\");\n List completeActiveSubscriptionInfoList = this.mSubscriptionManager.getCompleteActiveSubscriptionInfoList();\n if (completeActiveSubscriptionInfoList != null) {\n Iterator it = completeActiveSubscriptionInfoList.iterator();\n while (it.hasNext()) {\n Log.v(\"KeyguardUpdateMonitor\", \"SubInfo:\" + ((SubscriptionInfo) it.next()));\n }\n } else {\n Log.v(\"KeyguardUpdateMonitor\", \"onSubscriptionInfoChanged: list is null\");\n }\n List<SubscriptionInfo> subscriptionInfo = getSubscriptionInfo(true);\n ArrayList arrayList = new ArrayList();\n for (int i = 0; i < subscriptionInfo.size(); i++) {\n SubscriptionInfo subscriptionInfo2 = subscriptionInfo.get(i);\n if (refreshSimState(subscriptionInfo2.getSubscriptionId(), subscriptionInfo2.getSimSlotIndex())) {\n arrayList.add(subscriptionInfo2);\n }\n }\n for (int i2 = 0; i2 < arrayList.size(); i2++) {\n SimData simData = this.mSimDatas.get(Integer.valueOf(((SubscriptionInfo) arrayList.get(i2)).getSubscriptionId()));\n for (int i3 = 0; i3 < this.mCallbacks.size(); i3++) {\n KeyguardUpdateMonitorCallback keyguardUpdateMonitorCallback = this.mCallbacks.get(i3).get();\n if (keyguardUpdateMonitorCallback != null) {\n keyguardUpdateMonitorCallback.onSimStateChanged(simData.subId, simData.slotId, simData.simState);\n }\n }\n }\n callbacksRefreshCarrierInfo();\n }\n }", "private void infereProteinsChanged() {\n boolean enabled = checkInferProteins.isSelected();\n\n filtersProteinInference.setEnabled(enabled);\n comboAvailableBaseScores.setEnabled(enabled);\n filtersProteinLevel.setEnabled(enabled);\n\n Enumeration<AbstractButton> btns = radioGrpInferenceMethod.getElements();\n while (btns.hasMoreElements()) {\n btns.nextElement().setEnabled(enabled);\n }\n\n btns = radioGrpProteinScoring.getElements();\n while (btns.hasMoreElements()) {\n btns.nextElement().setEnabled(enabled);\n }\n\n btns = radioGrpPSMsForScoring.getElements();\n while (btns.hasMoreElements()) {\n btns.nextElement().setEnabled(enabled);\n }\n }", "void onChange_placeholder_xjal(ShapeRadioButtonGroup oldValue) {}", "@Override\n\n // The flow will come here when\n // any of the radio buttons in the radioGroup\n // has been clicked\n\n // Check which radio button has been clicked\n public void onCheckedChanged(RadioGroup group,\n int checkedId) {\n RadioButton\n radioButton\n = (RadioButton) group\n .findViewById(checkedId);\n }", "protected void onChange(FlxRadioButton RadioButton)\n\t{\n\t\t// Break if it's already selected.\n\t\tif(_current == RadioButton)\n\t\t{\n\t\t\tRadioButton.setActive(true);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tFlxRadioButton object;\n\t\tfor(int i = 0; i < members.size; i++)\n\t\t{\n\t\t\tobject = members.get(i);\n\t\t\tobject.setActive(false);\n\t\t}\n\t\tRadioButton.setActive(true);\n\t\t_current = RadioButton;\n\t\tif(onChange != null)\n\t\t\tonChange.callback();\n\t}", "public void onPersonListChanged();", "@Override\n public void eventsChanged() {\n }", "public void valueChanged(ListSelectionEvent event) {\n String contratoId = jTableContratos.getValueAt(jTableContratos.getSelectedRow(), 0).toString(); \n String clienteId = jTableContratos.getValueAt(jTableContratos.getSelectedRow(), 6).toString(); \n String activo = jTableContratos.getValueAt(jTableContratos.getSelectedRow(), 8).toString(); \n \n \n if(activo.equalsIgnoreCase(\"1\")){\n radioActivoEdit.setSelected(true);\n }else if(activo.equalsIgnoreCase(\"0\")){\n radioInactivoEdit.setSelected(true);\n }\n \n lblClienteid.setText(clienteId);\n lblContratoId.setText(contratoId);\n \n }", "private void updateOntChanges() {\r\n\t\ttry {\r\n\t\t\tString status = \"Status: [ACTION - Update Local Ontology]...\";\r\n\t\t\tstatusBar.setText(status);\r\n\t\t\tif (existingOntRadio.isSelected()) {\r\n\t\t\t\tOWLOntology ont = (OWLOntology) ontBox.getSelectedItem();\r\n\t\t\t\tList changes = swoopModel.getChangesCache().getChangeList(ont.getURI());\r\n\t\t\t\tfor (int i=0; i<changes.size(); i++) {\r\n\t\t\t\t\tSwoopChange swc = (SwoopChange) changes.get(i);\r\n\t\t\t\t\tif (!isPresent(ontChanges, swc)) ontChanges.add(swc.clone());\r\n\t\t\t\t}\r\n\t\t\t\tthis.sortChanges(ontChanges);\r\n\t\t\t\tthis.refreshOntTreeTable(); \r\n\t\t\t}\r\n\t\t\tstatusBar.setText(status+\"DONE\");\r\n\t\t}\r\n\t\tcatch (OWLException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}", "private void onClickRadioButton() {\n radioGroupChoice.setOnCheckedChangeListener(this);\n }", "public void handleRadioToggle(){\n\n if(radioBrown.isArmed()){\n radio3.setDisable(false);\n radio3.setSelected(true);\n radio2.setDisable(true);\n radio1.setDisable(true);\n colourValue = 3;\n vegColour = \"brown\";\n }else if(radioGreen.isArmed()){\n radio1.setSelected(true);\n radio1.setDisable(false);\n radio2.setDisable(true);\n radio3.setDisable(true);\n colourValue = 1;\n vegColour = \"green\";\n }else if(radioYellow.isArmed()){\n radio2.setDisable(false);\n radio2.setSelected(true);\n radio1.setDisable(true);\n radio3.setDisable(true);\n colourValue = 2;\n vegColour = \"yellow\";\n }\n }", "@Override\n public void valueChanged(ListSelectionEvent arg0) {\n\n }", "private void actionSampleDetectionModeChanged ()\r\n\t{\r\n\t\tif (mainFormLink.getComponentPanelLeft().getComponentRadioModeAuto().isSelected())\r\n\t\t{\r\n\t\t\tmainFormLink.getComponentPanelLeft().getComponentSampleAdd().setEnabled(false);\r\n\t\t\tmainFormLink.getComponentPanelLeft().getComponentSampleAddControl().setEnabled(false);\r\n\t\t\tmainFormLink.getComponentPanelLeft().getComponentSampleDelete().setEnabled(false);\r\n\t\t}\r\n\r\n\t\tif (mainFormLink.getComponentPanelLeft().getComponentRadioModeManual().isSelected())\r\n\t\t{\r\n\t\t\tmainFormLink.getComponentPanelLeft().getComponentSampleAdd().setEnabled(true);\r\n\t\t\tmainFormLink.getComponentPanelLeft().getComponentSampleAddControl().setEnabled(true);\r\n\t\t\tmainFormLink.getComponentPanelLeft().getComponentSampleDelete().setEnabled(true);\r\n\t\t}\r\n\t}", "public void onUpdatedPlaylist() {\n setCurrentTrack();\n //this was implemented so this device could have a view of the playlist\n }", "@Override\n\tpublic void valueChanged(ListSelectionEvent e) {\n\t\t// TODO Auto-generated method stub\n\t\tString name = ((JList) e.getSource()).getName();\n\t\tif (name.equals(\"pred\")){\n\t\t\tint selected = displayPred.getSelectedIndex();\n\t\t\tif (selected == -1)\n\t\t\t\tselected = 0;\n\t\t\tString loc = predParticles.get(selected).getPath();\n\t\t\tvm.updateParticleGame(loc);\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tint selected = displayPrey.getSelectedIndex();\n\t\t\tString loc = preyParticles.get(selected).getPath();\n\t\t\tvm.updateParticleGame(loc);\n\t\t}\n\t}", "public interface onChangeListener {\n void Change(List<Item> list, boolean isChange);\n }", "private void addListener() {\n\t\tOperatorPair operators = chooseOperators(name);\n\t\t\n\t\taddActionListener(e -> {\n\t\t\ttry {\n\t\t\t\tif (inversion.isSelected()) {\n\t\t\t\t\tmodel.setValue(operators.inversed.applyAsDouble(model.getValue()));\n\t\t\t\t} else {\n\t\t\t\t\tmodel.setValue(operators.original.applyAsDouble(model.getValue()));\n\t\t\t\t}\n\t\t\t} catch(IllegalArgumentException ex) {\n\t\t\t\tmodel.clearAll();\n\t\t\t\tpopupMessage(\"Cannot perform that operation.\");\n\t\t\t}\n\t\t});\n\t}", "public void radioButtonChenged() {\n if (this.radioButtons.getSelectedToggle().equals(this.btn1))\r\n radioButtonlabel.setText(\"You selected table 1\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn2))\r\n radioButtonlabel.setText(\"You selected table 2\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn3))\r\n radioButtonlabel.setText(\"You selected table 3\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn4))\r\n radioButtonlabel.setText(\"You selected table 4\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn5))\r\n radioButtonlabel.setText(\"You selected table 5\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn6))\r\n radioButtonlabel.setText(\"You selected table 6\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn7))\r\n radioButtonlabel.setText(\"You selected table 7\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn8))\r\n radioButtonlabel.setText(\"You selected table 8\");\r\n\r\n }", "public void onRadioButtonClicked2(View view) {\n boolean checked = ((RadioButton) view).isChecked();\n\n // Check which radio button was clicked\n switch(view.getId()) {\n case R.id.R_button3:\n if (checked)\n\n weeklyInformation.radiobutton3(radioButton3.getText().toString());\n\n break;\n case R.id.R_button4:\n if (checked)\n\n weeklyInformation.radiobutton4(radioButton4.getText().toString());\n\n break;\n }\n }", "private void addListenerRadioGroup() {\n int selectedID = radioGroupJenisKel.getCheckedRadioButtonId();\n\n //Mencari radio Button\n radioButtonJenisKel = (RadioButton) findViewById(selectedID);\n }", "@Override\r\n\tpublic void onCheckedChanged(RadioGroup group, int checkedId) {\n\t\t\r\n\t}", "private void notifyEventListListeners() {\n this.eventListListeners.forEach(listener -> listener.onEventListChange(this.getEventList()));\n }", "private void firePlotListChanged() {\n firePlotListChanged(this, null);\n }", "protected void notifyChangeListeners() { \n Utilities.invokeLater(new Runnable() {\n public void run() { for(ChangeListener l: _changeListeners) l.apply(this); }\n });\n }", "@Override\n public void onTrackChange(final RadioStream.TrackInfo trackInfo) {\n }", "private void addListeners() {\n\t\t\n\t\tresetButton.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\t \n\t\t public void handle(ActionEvent e) {\n\t\t \n\t\t \treset();\n\t\t \t\n\t\t }\n\t\t \n\t\t});\n\t\t\n\t\ttoggleGroup.selectedToggleProperty().addListener(\n\t\t\t (ObservableValue<? extends Toggle> ov, Toggle old_toggle, \n\t\t\t Toggle new_toggle) -> {\n\t\t\t \t\n\t\t\t \tif(rbCourse.isSelected()) {\n\t\t \t\t\n\t\t \t\thbox3.getChildren().set(0, CourseSelectionBox.instance());\n\t\t \t\thbox3.setDisable(false);\n\t\t \t\t\n\t\t \t}else if(rbAuthor.isSelected()) {\n\t\t \t\t\n\t\t \t\thbox3.getChildren().set(0, AuthorSelectionBox.instance());\n\t\t \t\thbox3.setDisable(false);\n\t\t \t\t\n\t\t \t}else if(rbNone.isSelected()) {\n\t\t \t\t\n\t\t \t\thbox3.setDisable(true);\n\t\t \t\t\n\t\t \t}\n\t\t\t \t\n\t\t\t});\n\t\t\n\t\tapplyButton.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\t \n\t\t public void handle(ActionEvent e) {\n\t\t \n\t\t \tfilter();\n\t\t \t\n\t\t }\n\t\t \n\t\t});\n\t\t\n\t\tsearchButton.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\t \n\t\t public void handle(ActionEvent e) {\n\t\t \n\t\t \tResult.instance().search(quizIDField.getText());\n\t\t \t\n\t\t }\n\t\t \n\t\t});\n\t\t\n\t}", "public void valueChanged(ListSelectionEvent e) {\r\n\t\tObject source = e.getSource();\r\n\t\tif (source == this.gragraNames) {\r\n\t\t\tswitch (this.stepPanel.getStep()) {\r\n\t\t\tcase StepPanel.STEP_HOST_GRAPH:\r\n\t\t\t\tsetGraph(StepPanel.STEP_HOST_GRAPH);\r\n\t\t\t\tbreak;\r\n\t\t\tcase StepPanel.STEP_STOP_GRAPH:\r\n\t\t\t\tsetGraph(StepPanel.STEP_STOP_GRAPH);\r\n\t\t\t\tbreak;\r\n\t\t\tcase StepPanel.STEP_CRITICAL_PAIRS:\r\n\t\t\t\tsetPairs();\r\n\t\t\t\tbreak;\r\n\t\t\tcase StepPanel.STEP_FINISH:\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}\r\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n AbstractButton selectedButton = null;\n for (Enumeration<AbstractButton> buttons = buttonGroup.getElements(); buttons.hasMoreElements(); ) {\n AbstractButton button = buttons.nextElement();\n if (button.isSelected()) {\n selectedButton = button;\n }\n }\n\n //Model um das hinzufügen von Zeilen zu ermöglichen\n DefaultListModel<String> list = ((DefaultListModel<String>) listResults.getModel());\n //Jedes mal zuerst die Liste Leeren\n list.clear();\n if (selectedButton == radioButtonAllStyles) {\n /*\n * Erzeugt Guiausgabe der Bierarten.\n * Die id wird mit \"::\" vor dem Bierart Namen ausgeben.\n * */\n beerService.getBeerStyles()\n .forEach((k, v) -> list.addElement(k + \"::\" + v));\n } else if (selectedButton == radioButtonStyle) {\n /*\n * Erzeugt Guiausgabe der Bierarten, welche die Zeichenfolge ″search″ im Namen enthalten.\n * Die id wird mit \"::\" vor dem Bierart Namen ausgeben.\n *\n * @param searchString Zeichenfolge die enthalten sein soll\n * */\n beerService.getBeerStylesBySearchStr(textFieldArgs.getText())\n .forEach((k, v) -> list.addElement(k + \"::\" + v));\n } else if (selectedButton == radioButtonAllBeers) {\n /*\n * Gibt zeilenweise ID und Name mit \"::\" getrennt der Biere aus.\n * */\n beerService.getBeers()\n .forEach(x -> list.addElement((x.getId() + \"::\" + x.getName())));\n } else if (selectedButton == radioButtonBeerWithId) {\n /*\n * Gibt in einer Zeile ID und Namen und in einer zweiten Zeile die Beschreibung\n * des entsprechenden Bieres aus.\n *\n * @param id id nach der gesucht werden soll\n * */\n Beer beer = beerService.getBeerById(textFieldArgs.getText());\n if (beer != null) {\n list.addElement(beer.getId() + \"::\" + beer.getName());\n }\n }\n }", "@Override\n\t\t\tpublic void onChanged(ListChangeListener.Change<? extends PR1Model.Shape> e) { \n\t\t\t\t\n\t\t\t\trepaint(); \n\t\t\t\treTable();\n\t\t\t\tviewState.set(ViewState.MODIFIED);\n\t\t\t\t\n\t\t\t}", "@Override\n public void onPlayListEdited(PlayList playList) {\n }", "protected void notifyWorkflowStatusListeners() {\n\t\tfor (WorkflowStatusListener listener : workflowStatusListeners) {\n\t\t\tlistener.workflowStatusChanged(this);\n\t\t}\n\t}", "@Override\n\t\t\tpublic void onCheckedChanged(RadioGroup group, int checkedId) {\n\t\t\t\tif(checkedId == cpu.getId()){\n\t\t\t\t\tLog.v(TAG,\"cpu\");\n\t\t\t\t\tvibrator.vibrate(pattern, -1);\n\t\t\t\t}else if(checkedId == memory.getId()) {\t\n\t\t\t\t\tvibrator.vibrate(pattern, -1);\n\t\t\t\t\tshowMemoryList();\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}else if(checkedId == useRate.getId()) {\n\t\t\t\t\tLog.v(TAG, \"useRate\");\n\t\t\t\t\tvibrator.vibrate(pattern, -1);\n\t\t\t\t}else if(checkedId == other.getId()) {\n\t\t\t\t\tLog.v(TAG, \"other\");\n\t\t\t\t\tvibrator.vibrate(pattern, -1);\n\t\t\t\t}else{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}", "@Override\r\n\t\tpublic void valueChanged(ListSelectionEvent e) {\r\n\t\t\t\r\n\t\t}", "@Override\n public void onCheckedChanged(RadioGroup group, int checkedId) {\n pos = radioGroup.indexOfChild(findViewById(checkedId));\n switch (pos) {\n case 1:\n\n Status_id = 0;\n new getStudentList().execute();\n // Toast.makeText(getApplicationContext(), \"1\"+Status_id,Toast.LENGTH_SHORT).show();\n break;\n case 2:\n\n Status_id = 1;\n // Toast.makeText(getApplicationContext(), \"2\"+Status_id, Toast.LENGTH_SHORT).show();\n break;\n\n default:\n //The default selection is RadioButton 1\n Status_id = 1;\n new getStudentList().execute();\n // Toast.makeText(getApplicationContext(), \"3\"+Status_id,Toast.LENGTH_SHORT).show();\n break;\n }\n }", "private void SelectionChanged(String type) {\n try {\n VaadinSession.getCurrent().getLockInstance().lock();\n Listeners_Map.values().stream().forEach((filter) -> {\n filter.selectionChanged(type);\n });\n } finally {\n VaadinSession.getCurrent().getLockInstance().unlock();\n busyTask.setVisible(false);\n }\n\n }", "public void addListener(Listener listener) {\n\t\tListener wrapper = new ParameterListenerWrapper(this, listener);\r\n\t\tfor (Button b : radioButton) {\r\n\t\t\tb.addListener(SWT.Selection, wrapper);\r\n\t\t}\r\n\t}", "private void addBindingAndListener() {\n // When the simulation has more than one time of simulation this property change the selected element\n // of time series.\n this.changeListener = (observable, oldValue, newValue) -> {\n if (newValue instanceof Component) { // IS LINK OR NODE\n Component comp = (Component) newValue;\n idTextField.setText(comp.getId());\n }\n };\n this.selectableItem.addListener(changeListener);\n }", "private void change() {\n\t\tsetChanged();\n\t\t//NotifyObservers calls on the update-method in the GUI\n\t\tnotifyObservers();\n\t}", "private void addListenerOnButton() {\n\t\tradioSex = (RadioGroup) findViewById(R.id.radioSex);\n\t\tbtnDisplay = (Button) findViewById(R.id.btnDisplay);\n\t\n\t\tbtnDisplay.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tint seledtedId = radioSex.getCheckedRadioButtonId();\n\t\t\t\tRadioButton radioMale = (RadioButton) findViewById(seledtedId);\n\t\t\t\tToast.makeText(ExampleRadio.this, radioMale.getText(), Toast.LENGTH_LONG).show();\n\t\t\t}\n\t\t});\n\t}", "@Override\n\tpublic void valueChanged(ListSelectionEvent arg0) {\n\t\t\n\t}", "public void erisRadioButtonListener()\r\n {\r\n \r\n if (erisRadioButton.isSelected())\r\n dwarfPlanetsImageView.setImage(erisImage);\r\n discoveredByLabel.setText(\"Discovered By: Brown, Trujillo, and Rabinowitz\");\r\n dateOfDiscoveryLabel.setText(\"Date of Discovery: October 21, 2003\");\r\n orbitPeriodLabel.setText(\"Orbit Period: 561.37 Earth Years\");\r\n lengthOfDayLabel.setText(\"Length of Day: 25.90 Hours\");\r\n namedAfterLabel.setText(\"Named After: The ancient Greek goddess of discord and strife\");\r\n }", "public void valueChanged(ListSelectionEvent e) {\n\t\t\n\t}", "public interface SettingsSelectedListener\t{\n\t}", "void onRecommendationChanged();", "private void notifyDocumentChanged(SingleDocumentModel previousModel, SingleDocumentModel currentModel) {\n\t\tcurrent = currentModel;\n\t\tfor (MultipleDocumentListener l : listeners) {\n\t\t\tl.currentDocumentChanged(previousModel, currentModel);\n\t\t}\n\t}", "void changed(DiscoveryEvent e);", "@Override\n\t\t\t\tpublic void stateChanged(ChangeEvent e) {\n\t\t\t\t\tif (!updating && button.isSelected()) {\n\t\t\t\t\t\tmodel.set(db);\n\t\t\t\t\t}\n\t\t\t\t\tif (!useRadioButtons) {\n\t\t\t\t\t\tlabel.setForeground(button.isSelected() ? selectedForeground : unselectedForeground);\n\t\t\t\t\t}\n\t\t\t\t}", "public void valueChanged(ListSelectionEvent arg0) {\n\t\t\r\n\t}", "private void setListeners() {\n\t\trefreshButton.addActionListener(new refreshButtonListener());\n\n\t\tthis.list.addMouseListener(new MouseAdapter() {\n\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent event) {\n\t\t\t\tif (event.getClickCount() == 2 && list.getSelectedValue() != null && !list.getSelectedValue().equals(\"\") && tabs.getSelectedIndex() != -1) {\n\t\t\t\t\tlaunchDocument(tabs.getTitleAt(tabs.getSelectedIndex()), list.getSelectedValue());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\ttabs.addChangeListener(new ChangeListener() {\n\n\t\t\t@Override\n\t\t\tpublic void stateChanged(ChangeEvent arg0) {\n\t\t\t\tif (!tabs.getTitleAt(tabs.getSelectedIndex()).equals(\"Chat\")) {\n\t\t\t\t\tlistmodel.clear();\n\t\t\t\t\tmakeRequest();\n\t\t\t\t}\n\t\t\t}\n\n\t\t});\n\t}", "public void alert(){\n\t\tfor (ChangeListener l : listeners) {\n\t\t\tl.stateChanged(new ChangeEvent(this));\n\t\t}\n\t}", "public void statusChanged() {\n\t\tif(!net.getArray().isEmpty()) {\n\t\t\tigraj.setEnabled(true);\n\t\t}else\n\t\t\tigraj.setEnabled(false);\n\t\t\n\t\tupdateKvota();\n\t\tupdateDobitak();\n\t}", "public void refresh() {\n clearList();\n for(int i =0;i<toDoList.toDoListLength();i++){\n JRadioButton task = toDoButtonList.get(i);\n task.setText(toDoList.getTask(i).toString());\n }\n }", "private void notifyComboBoxModelChange(int index0, int index1)\n {\n for(ListDataListener l : comboBoxModelListDataListeners)\n l.contentsChanged(new ListDataEvent(this, ListDataEvent.CONTENTS_CHANGED, index0, index1));\n }", "public void notifyChangementJoueurs();", "public void onRadioButtonClicked1(View view) {\n boolean checked = ((RadioButton) view).isChecked();\n\n // Check which radio button was clicked\n switch(view.getId()) {\n case R.id.R_button1:\n if (checked)\n\n weeklyInformation.radiobutton1(radioButton1.getText().toString());\n\n break;\n case R.id.R_button2:\n if (checked)\n\n weeklyInformation.radiobutton2(radioButton2.getText().toString());\n\n break;\n }\n }", "public interface ListChanged {\n void calculateTotal();\n void showDelete(String data);\n}", "public void contentsChanged(ListDataEvent e) {\n\t\tint size=store.size();\n\t\tif (size<2) return;\n\n\t\t// Remove existing list\n\t\tfor (int index=0; index<size; index++) {\n\t\t // Keep removing the first entry until the list is empty\n\t\t JMenuItem item = identityMenu.getItem(identityIndex);\n\t\t identityButtonGroup.remove(item);\n\t\t identityMenu.remove(item);\n\t\t}\n\n\t\t// Create new list\n\t\tfor (int index=0; index<size; index++)\t{\n\t\t CertificatePair cert = store.get(index);\n\t\t Action action = new ActionSelectCertificate(JGSFrame.this, cert, selection);\n\t\t if (index<9)\n\t\t\taction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"control \"+(index+1)));\n\t\t JRadioButtonMenuItem jrb = new JRadioButtonMenuItem(action);\n\t\t identityButtonGroup.add(jrb);\n\t\t identityMenu.insert(jrb, identityIndex + index);\n\t\t}\n\t }", "@Override\n public void valueChanged(javax.swing.event.ListSelectionEvent e)\n {\n this.choice = e.getFirstIndex();\n }", "@Override\n\tpublic void playlistChanged(MPDStatus mpdStatus, int oldPlaylistVersion) {\n\t\t\n\t}", "private void completeListener() {\n buttonPanel.getCompleteTask().addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n for (int i = 0;i<toDoList.toDoListLength();i++) {\n JRadioButton task = toDoButtonList.get(i);\n if (task.isSelected()&& !task.getText().equals(\"\")){\n toDoList.getTask(i).setComplete();\n }\n }\n refresh();\n }\n });\n }", "private void reloadAccountTypeRadioButtons() {\n accountTypeStandardJRadioButton.setSelected(true);\n }", "protected void notifyDirty() {\n Event evt = new Event();\n evt.item = this;\n evt.widget = this;\n SelectionEvent event = new SelectionEvent(evt);\n for (SelectionListener listener : dirtyListener) {\n listener.widgetSelected(event);\n }\n }", "public interface MediaSelectedListener {\n public void onHasNoSelected();\n\n public void onHasSelected(List<MediaItem> mediaSelectedList);\n}", "public void bindPlotListChangedEvent(final OIFitsCollectionManagerEventListener listener) {\n getPlotListChangedEventNotifier().register(listener);\n\n // force fire PLOT_LIST_CHANGED event to initialize the listener with current OIFitsCollection ASAP:\n firePlotListChanged(null, listener);\n }", "public interface SignalStateListener{\n\n void onSimStateChanged(boolean sim1Exist, boolean sim2Exist) ;\n\n void onSignalStrengthsChanged(int simId, SimSignalInfo signalInfo) ;\n }", "public interface UpdateListListener {\r\n\r\n void updateList(ArrayList<Movie> movies);\r\n\r\n}", "@Override\n public void onSettingChanged(ListPreference pref) {\n }", "public void valueChanged(ListSelectionEvent e) {\n selectedTeacher = editTeachersList.getSelectedIndex();\r\n if (e.getValueIsAdjusting()&&selectedTeacher!=-1){ \r\n //set value to selected teacher on jlist\r\n selectedTeacher = editTeachersList.getSelectedIndex();\r\n //remove the panel to refresh later\r\n editTeachersPanel.removeAll();\r\n editTeachersSubPanel.removeAll();\r\n teacherPeriodsListModel.removeAllElements();\r\n //add the teachers name to label\r\n editTeachersName = new JLabel(\"Selected Teacher: \"+ teachers.get(selectedTeacher).getName()); \r\n //add all the teachers periods to label\r\n for (int i=0;i<teachers.get(selectedTeacher).getPeriodNumbers().size();i++){ \r\n teacherPeriodsListModel.addElement(teachers.get(selectedTeacher).getPeriodNumbers().get(i));\r\n }\r\n \r\n //Refreshing the page by adding to the panel again\r\n JPanel dividingPanel = new JPanel(new GridLayout(1,2));\r\n dividingPanel.add(editTeachersListScroll);\r\n JPanel periodAndButtonsPanel = new JPanel(new GridLayout(2,1));\r\n periodAndButtonsPanel.add(teacherPeriodsListScroll);\r\n JPanel mainButtonPanel = new JPanel(new BorderLayout());\r\n JPanel teacherButtonPanel = new JPanel(new GridLayout(2,2));\r\n teacherButtonPanel.add(addTeachersButtonEdit);\r\n teacherButtonPanel.add(addPeriodsButton1);\r\n teacherButtonPanel.add(removeTeachersButtonEdit);\r\n teacherButtonPanel.add(removePeriodsButton);\r\n mainButtonPanel.add(teacherButtonPanel, BorderLayout.CENTER);\r\n mainButtonPanel.add(backToTeachersEdit, BorderLayout.PAGE_END);\r\n periodAndButtonsPanel.add(mainButtonPanel);\r\n dividingPanel.add(periodAndButtonsPanel);\r\n editTeachersPanel.add(dividingPanel);\r\n editFrame.add(editTeachersPanel); \r\n editTeachersPanel.setVisible(false);\r\n editTeachersPanel.setVisible(true);\r\n }\r\n }", "private void gListValueChanged(ListSelectionEvent e) {\n }", "public interface SurveyVoteListener {\n void voteListener(int yes, int no);\n void editListener(String newQuestion, String newOptionOne, String newOptionTwo);\n }", "void eventChanged();", "protected void updateTypeList() {\n\t sequenceLabel.setText(\"Sequence = \" + theDoc.theSequence.getId());\n\t typeList.setListData(theDoc.theTypes);\n\t signalList.setListData(nullSignals);\n\t valueField.setEnabled(false);\n\t valueList.setEnabled(false);\n }" ]
[ "0.69039154", "0.66157365", "0.6430671", "0.62133574", "0.6197986", "0.61825615", "0.61281174", "0.60929596", "0.60809493", "0.6074434", "0.60484457", "0.60276616", "0.59680426", "0.59680426", "0.59680426", "0.59680426", "0.5866658", "0.58467203", "0.5820176", "0.5812669", "0.5802765", "0.5791876", "0.5776054", "0.5773957", "0.5773687", "0.5771496", "0.5768436", "0.5726144", "0.57222646", "0.5716103", "0.5709622", "0.56933105", "0.56900895", "0.5679407", "0.5676223", "0.5668936", "0.56662625", "0.56607246", "0.56494796", "0.56448185", "0.5626276", "0.5622409", "0.5619959", "0.56171876", "0.5610517", "0.5599978", "0.55969214", "0.55959105", "0.5590964", "0.55803734", "0.5576284", "0.5575721", "0.55689806", "0.55622375", "0.55540526", "0.5544277", "0.5539984", "0.5535349", "0.5533112", "0.55318475", "0.5531645", "0.5527637", "0.5522327", "0.55190796", "0.5516362", "0.5507717", "0.55027175", "0.5495196", "0.5494786", "0.5484846", "0.54840404", "0.5482454", "0.5480742", "0.5466288", "0.5464763", "0.5464058", "0.54640347", "0.54538655", "0.5449798", "0.5433828", "0.5427284", "0.5424735", "0.54207796", "0.5419483", "0.54139125", "0.54137635", "0.54106", "0.5407247", "0.5405933", "0.5392784", "0.5392426", "0.5381272", "0.5380407", "0.53761077", "0.5373277", "0.53725326", "0.53701234", "0.5369949", "0.5369229", "0.5362211" ]
0.6070621
10
Listener that notifies when different radio lists was updated
public interface LastPlayedRetrievedListener { public void onLastPlayedRetrieved(final List<Radio> radios); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface RadioListRetrievedListener {\n\n public void onRadioListRetrieved(final List<Radio> radios);\n\n public void onError();\n }", "private void setRadioOnCheckedChangedEvent() {\n ((RadioButton) findViewById(R.id.radio_akb48)).setOnCheckedChangeListener(this);\n ((RadioButton) findViewById(R.id.radio_ske48)).setOnCheckedChangeListener(this);\n ((RadioButton) findViewById(R.id.radio_nmb48)).setOnCheckedChangeListener(this);\n ((RadioButton) findViewById(R.id.radio_hkt48)).setOnCheckedChangeListener(this);\n }", "@Override\n public void widgetSelected(SelectionEvent e) {\n if (e.getSource() instanceof Button) {\n onRadioTypeUpdated((Button) e.getSource());\n }\n }", "public void onLoadMenuRadioSelected();", "public interface ListListener {\n\t/*\n\t * Called by soundfun.ui when a different element\n\t * has been selected. This also is called if no\n\t * element was previously selected and is now selected.\n\t */\n\tpublic void selected(String action);\n}", "@Override\n\t\t\tpublic void changed(ObservableValue<? extends Toggle> observable, Toggle oldValue, Toggle newValue) {\n\t\t\t\tif (group.getSelectedToggle() != null) {\n\t\t\t\t\tRadioButton button = (RadioButton) group.getSelectedToggle();\n\t\t\t\t\tSystem.out.println(\"Button: \" + button.getText());\n switch (button.getText()) {\n case \"False\":\n ReportResult.updateLastResult(Boolean.FALSE);\n break;\n case \"True\":\n default:\n ReportResult.updateLastResult(Boolean.TRUE);\n break;\n }\n\t\t\t\t\tinfoArea.appendText(\"You choosed the result of the report text : \" + button.getText() + \"\\n\");\n\t\t\t\t}\n\t\t\t}", "@Override\n public void onPlaylistChanged() {\n for (final MusicStateListener listener : mMusicStateListener) {\n if (listener != null) {\n listener.onPlaylistChanged();\n }\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}", "private void notifyListSelectionListener()\r\n {\r\n \tif (listSelectionListeners != null && listSelectionListeners.size() > 0) \r\n \t{\r\n ListSelectionEvent event = new ListSelectionEvent(this, avatarIndex, avatarIndex, false);\r\n\r\n for (ListSelectionListener listener : listSelectionListeners)\r\n {\r\n listener.valueChanged(event);\r\n }\r\n \t}\r\n }", "public interface FavoritesRetrievedListener {\n\n public void onFavoritesRetrieved(final List<Radio> radios);\n }", "void regListValueChanged(){\r\n\t\tseries = dealer.getSeriesQueue();\r\n\t\tIterator<BuzzardSeriesInfo> it = series.iterator();\r\n\t\tint i=0;\r\n\t\tint selInd = reList.getSelectedIndex();\r\n\t\twhile(i<=selInd&&it.hasNext()){\r\n\t\t\tinfo = it.next();\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tnrLabel.setText(nrLabelText + String.valueOf(info.getNoOfMatches()));\r\n\t\t// Welch Freude... wir sehen den Fragezeichenoperator in action ;)\r\n\t\tviLabel.setText(viLabelText + (info.isSimulated()?\"Ja\":\"Nein\"));\r\n\t\tgeList.clear();\r\n\t\tgeList.displayPlayers(info.getPlayers());\r\n\t}", "public void addListenerOnRadioGroupButton() {\n\n priorityRadioGroup = (RadioGroup) findViewById(R.id.priorityRadioGroup);\n medium = (RadioButton) findViewById(R.id.medium);\n high = (RadioButton) findViewById(R.id.high);\n low = (RadioButton) findViewById(R.id.low);\n\n //default value if no value change\n priorityLevel = \"low\";\n low.setChecked(true);\n\n priorityRadioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener()\n {\n public void onCheckedChanged(RadioGroup group, int checkedId) {\n switch(checkedId){\n case R.id.low:\n Log.d(\"TAG\", \"low checked\");\n priorityLevel = \"low\";\n break;\n case R.id.medium:\n Log.d(\"TAG\", \"medium checked\");\n priorityLevel = \"medium\";\n break;\n case R.id.high:\n Log.d(\"TAG\", \"high checked\");\n priorityLevel = \"high\";\n break;\n }\n }\n });\n\n }", "@Override\n public void valueChanged(ListSelectionEvent le) {\n JMusicList list = (JMusicList) le.getSource();\n\n /* Si la lista existe y no ha sido seleccionada aun */\n if (list != null && JSoundsMainWindowViewController.isSelected)\n {\n /* Se obtiene el indice seleccionado. Si es distinto de -1 algo se selecciono */\n int idx = list.getSelectedIndex();\n if (idx != -1)\n {\n /* Si se selecciono la lista de otro album, se borra la seleccion de la lista anterior */\n if (JSoundsMainWindowViewController.jlActualListSongs != null &&\n !JSoundsMainWindowViewController.jlActualListSongs.equals(list))\n JSoundsMainWindowViewController.jlActualListSongs.clearSelection();\n\n /* La lista actual es la seleccionada */\n JSoundsMainWindowViewController.jlActualListSongs = list; \n }\n\n JSoundsMainWindowViewController.isSelected = false;\n }\n else\n {\n if (!JSoundsMainWindowViewController.isSelected)\n JSoundsMainWindowViewController.isSelected = true;\n }\n }", "@Override\n public void valueChanged(ListSelectionEvent le) {\n JMusicList list = (JMusicList) le.getSource();\n\n /* Si la lista existe y no ha sido seleccionada aun */\n if (list != null && JSoundsMainWindowViewController.isSelected)\n {\n /* Se obtiene el indice seleccionado. Si es distinto de -1 algo se selecciono */\n int idx = list.getSelectedIndex();\n if (idx != -1)\n {\n /* Si se selecciono la lista de otro album, se borra la seleccion de la lista anterior */\n if (JSoundsMainWindowViewController.jlActualListSongs != null &&\n !JSoundsMainWindowViewController.jlActualListSongs.equals(list))\n JSoundsMainWindowViewController.jlActualListSongs.clearSelection();\n\n /* La lista actual es la seleccionada */\n JSoundsMainWindowViewController.jlActualListSongs = list; \n }\n\n JSoundsMainWindowViewController.isSelected = false;\n }\n else\n {\n if (!JSoundsMainWindowViewController.isSelected)\n JSoundsMainWindowViewController.isSelected = true;\n }\n }", "@Override\n public void valueChanged(ListSelectionEvent le) {\n JMusicList list = (JMusicList) le.getSource();\n\n /* Si la lista existe y no ha sido seleccionada aun */\n if (list != null && JSoundsMainWindowViewController.isSelected)\n {\n /* Se obtiene el indice seleccionado. Si es distinto de -1 algo se selecciono */\n int idx = list.getSelectedIndex();\n if (idx != -1)\n {\n /* Si se selecciono la lista de otro album, se borra la seleccion de la lista anterior */\n if (JSoundsMainWindowViewController.jlActualListSongs != null &&\n !JSoundsMainWindowViewController.jlActualListSongs.equals(list))\n JSoundsMainWindowViewController.jlActualListSongs.clearSelection();\n\n /* La lista actual es la seleccionada */\n JSoundsMainWindowViewController.jlActualListSongs = list; \n }\n\n JSoundsMainWindowViewController.isSelected = false;\n }\n else\n {\n if (!JSoundsMainWindowViewController.isSelected)\n JSoundsMainWindowViewController.isSelected = true;\n }\n }", "@Override\n public void valueChanged(ListSelectionEvent le) {\n JMusicList list = (JMusicList) le.getSource();\n\n /* Si la lista existe y no ha sido seleccionada aun */\n if (list != null && JSoundsMainWindowViewController.isSelected)\n {\n /* Se obtiene el indice seleccionado. Si es distinto de -1 algo se selecciono */\n int idx = list.getSelectedIndex();\n if (idx != -1)\n {\n /* Si se selecciono la lista de otro album, se borra la seleccion de la lista anterior */\n if (JSoundsMainWindowViewController.jlActualListSongs != null &&\n !JSoundsMainWindowViewController.jlActualListSongs.equals(list))\n JSoundsMainWindowViewController.jlActualListSongs.clearSelection();\n\n /* La lista actual es la seleccionada */\n JSoundsMainWindowViewController.jlActualListSongs = list; \n }\n\n JSoundsMainWindowViewController.isSelected = false;\n }\n else\n {\n if (!JSoundsMainWindowViewController.isSelected)\n JSoundsMainWindowViewController.isSelected = true;\n }\n }", "public void valueChanged(ListSelectionEvent event) {\n\t\t\t\tdata = (ConnectionData)((JList)event.getSource()).getSelectedValue();\r\n\t\t\t\t//Enables the Connect button\r\n\t\t\t\tbtnConnect.setEnabled(true);\r\n\t\t\t\t//Enables the Leap Motion and Gamepad radio buttons\r\n\t\t\t\trdbtnLeapMotion.setEnabled(true);\r\n\t\t\t\trdbtnGamepad.setEnabled(true);\r\n\t\t\t}", "public void classListChanged();", "void onListenerChanged(ListenerUpdate update);", "public interface ChangedListener {\n\n\n public void onMenuChanged(List<Menu> menus);\n\n}", "@Override\n\tpublic abstract void valueChanged(ListSelectionEvent arg0);", "public final void updateListener() {\n\t\tswitch (state) {\n\t\tcase 0:\n\t\t\taddMouseListenerToResultList();\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\taddMouseListenerToMovieDisplay();\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\taddMouseListenerToPersonDisplay();\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\taddMouseListenerToCompanyDisplay();\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\taddMouseListenerToRandomMoviePanel();\n\t\t\tbreak;\n\t\t}\n\t}", "private void onRadioTypeUpdated(Button typeWidget) {\n // Do nothing if this is an internal modification or if the widget has been\n // de-selected.\n if (mInternalTypeUpdate || !typeWidget.getSelection()) {\n return;\n }\n\n // Find type info that has just been enabled.\n TypeInfo type = null;\n for (TypeInfo ti : sTypes) {\n if (ti.getWidget() == typeWidget) {\n type = ti;\n break;\n }\n }\n\n if (type == null) {\n return;\n }\n\n // update the combo\n\n updateRootCombo(type);\n\n // update the folder path\n\n String wsFolderPath = mWsFolderPathTextField.getText();\n String newPath = null;\n\n mConfigSelector.getConfiguration(mTempConfig);\n ResourceQualifier qual = mTempConfig.getInvalidQualifier();\n if (qual == null) {\n // The configuration is valid. Reformat the folder path using the canonical\n // value from the configuration.\n\n newPath = RES_FOLDER_ABS + mTempConfig.getFolderName(type.getResFolderType());\n } else {\n // The configuration is invalid. We still update the path but this time\n // do it manually on the string.\n if (wsFolderPath.startsWith(RES_FOLDER_ABS)) {\n wsFolderPath.replaceFirst(\n \"^(\" + RES_FOLDER_ABS +\")[^-]*(.*)\", //$NON-NLS-1$ //$NON-NLS-2$\n \"\\\\1\" + type.getResFolderName() + \"\\\\2\"); //$NON-NLS-1$ //$NON-NLS-2$\n } else {\n newPath = RES_FOLDER_ABS + mTempConfig.getFolderName(type.getResFolderType());\n }\n }\n\n if (newPath != null && !newPath.equals(wsFolderPath)) {\n mInternalWsFolderPathUpdate = true;\n mWsFolderPathTextField.setText(newPath);\n mInternalWsFolderPathUpdate = false;\n }\n\n validatePage();\n }", "private void setupRadioList() {\r\n // setup the \r\n final ExpandableListView listViewRadioList = (ExpandableListView) findViewById(android.R.id.list);\r\n listViewRadioList.setAdapter(mRadioCategoryAdapter);\r\n listViewRadioList.setOnChildClickListener(new OnChildClickListener() {\r\n\r\n @Override\r\n public boolean onChildClick(final ExpandableListView parent, final View v,\r\n final int groupPosition,\r\n final int childPosition, final long id) {\r\n Radio radio = mRadioCategoryAdapter.getChild(groupPosition, childPosition);\r\n\r\n mRadioPlayer.playRadio(RadioType.RADIO, radio.getId());\r\n setPlayerVisible(true);\r\n return true;\r\n }\r\n });\r\n }", "@Override\n\t\tpublic void valueChanged(ListSelectionEvent e) {\n\t\t\tif (e.getValueIsAdjusting()) {\n\t\t\t\tJList list = (JList) e.getSource();\n\t\t\t\tint index = list.getSelectedIndex();\n\t\t\t\tSystem.out.println(\"selected: \" + list.getSelectedValue());\n\t\t\t\tint userSelect = list.getSelectedIndex();\n\t\t\t\tplayingDBThread = null;\n\t\t\t\taudioDBThread = null;\n\t\t\t\tload_DB_video(resultListRankedNames.get(userSelect));\n\t\t\t\tupdateSimilarFrame();\n\t\t\t\tslider.setValue(0);\n\t\t\t}\n\t\t}", "private void refreshLights(){\n\n if (this.selectedTrain.getLights() == 1){ this.lightsOnRadioButton.setSelected(true); }\n else if (this.selectedTrain.getLights() == 0){ this.lightsOffRadioButton.setSelected(true); }\n else if (this.selectedTrain.getLights() == -1){ this.lightsFailureRadioButton.setSelected(true); }\n }", "public void updateList(List<?> listOfObjects){\n this.radioObjects = listOfObjects;\n }", "@Override\n public void onCheckedChanged(RadioGroup radioGroup, @IdRes int checked) {\n }", "private void handleSimSubscriptionInfoChanged() {\n if (!this.mIsSimBindEnable) {\n Assert.isMainThread();\n Log.v(\"KeyguardUpdateMonitor\", \"onSubscriptionInfoChanged()\");\n List completeActiveSubscriptionInfoList = this.mSubscriptionManager.getCompleteActiveSubscriptionInfoList();\n if (completeActiveSubscriptionInfoList != null) {\n Iterator it = completeActiveSubscriptionInfoList.iterator();\n while (it.hasNext()) {\n Log.v(\"KeyguardUpdateMonitor\", \"SubInfo:\" + ((SubscriptionInfo) it.next()));\n }\n } else {\n Log.v(\"KeyguardUpdateMonitor\", \"onSubscriptionInfoChanged: list is null\");\n }\n List<SubscriptionInfo> subscriptionInfo = getSubscriptionInfo(true);\n ArrayList arrayList = new ArrayList();\n for (int i = 0; i < subscriptionInfo.size(); i++) {\n SubscriptionInfo subscriptionInfo2 = subscriptionInfo.get(i);\n if (refreshSimState(subscriptionInfo2.getSubscriptionId(), subscriptionInfo2.getSimSlotIndex())) {\n arrayList.add(subscriptionInfo2);\n }\n }\n for (int i2 = 0; i2 < arrayList.size(); i2++) {\n SimData simData = this.mSimDatas.get(Integer.valueOf(((SubscriptionInfo) arrayList.get(i2)).getSubscriptionId()));\n for (int i3 = 0; i3 < this.mCallbacks.size(); i3++) {\n KeyguardUpdateMonitorCallback keyguardUpdateMonitorCallback = this.mCallbacks.get(i3).get();\n if (keyguardUpdateMonitorCallback != null) {\n keyguardUpdateMonitorCallback.onSimStateChanged(simData.subId, simData.slotId, simData.simState);\n }\n }\n }\n callbacksRefreshCarrierInfo();\n }\n }", "private void infereProteinsChanged() {\n boolean enabled = checkInferProteins.isSelected();\n\n filtersProteinInference.setEnabled(enabled);\n comboAvailableBaseScores.setEnabled(enabled);\n filtersProteinLevel.setEnabled(enabled);\n\n Enumeration<AbstractButton> btns = radioGrpInferenceMethod.getElements();\n while (btns.hasMoreElements()) {\n btns.nextElement().setEnabled(enabled);\n }\n\n btns = radioGrpProteinScoring.getElements();\n while (btns.hasMoreElements()) {\n btns.nextElement().setEnabled(enabled);\n }\n\n btns = radioGrpPSMsForScoring.getElements();\n while (btns.hasMoreElements()) {\n btns.nextElement().setEnabled(enabled);\n }\n }", "void onChange_placeholder_xjal(ShapeRadioButtonGroup oldValue) {}", "@Override\n\n // The flow will come here when\n // any of the radio buttons in the radioGroup\n // has been clicked\n\n // Check which radio button has been clicked\n public void onCheckedChanged(RadioGroup group,\n int checkedId) {\n RadioButton\n radioButton\n = (RadioButton) group\n .findViewById(checkedId);\n }", "protected void onChange(FlxRadioButton RadioButton)\n\t{\n\t\t// Break if it's already selected.\n\t\tif(_current == RadioButton)\n\t\t{\n\t\t\tRadioButton.setActive(true);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tFlxRadioButton object;\n\t\tfor(int i = 0; i < members.size; i++)\n\t\t{\n\t\t\tobject = members.get(i);\n\t\t\tobject.setActive(false);\n\t\t}\n\t\tRadioButton.setActive(true);\n\t\t_current = RadioButton;\n\t\tif(onChange != null)\n\t\t\tonChange.callback();\n\t}", "public void onPersonListChanged();", "@Override\n public void eventsChanged() {\n }", "public void valueChanged(ListSelectionEvent event) {\n String contratoId = jTableContratos.getValueAt(jTableContratos.getSelectedRow(), 0).toString(); \n String clienteId = jTableContratos.getValueAt(jTableContratos.getSelectedRow(), 6).toString(); \n String activo = jTableContratos.getValueAt(jTableContratos.getSelectedRow(), 8).toString(); \n \n \n if(activo.equalsIgnoreCase(\"1\")){\n radioActivoEdit.setSelected(true);\n }else if(activo.equalsIgnoreCase(\"0\")){\n radioInactivoEdit.setSelected(true);\n }\n \n lblClienteid.setText(clienteId);\n lblContratoId.setText(contratoId);\n \n }", "private void updateOntChanges() {\r\n\t\ttry {\r\n\t\t\tString status = \"Status: [ACTION - Update Local Ontology]...\";\r\n\t\t\tstatusBar.setText(status);\r\n\t\t\tif (existingOntRadio.isSelected()) {\r\n\t\t\t\tOWLOntology ont = (OWLOntology) ontBox.getSelectedItem();\r\n\t\t\t\tList changes = swoopModel.getChangesCache().getChangeList(ont.getURI());\r\n\t\t\t\tfor (int i=0; i<changes.size(); i++) {\r\n\t\t\t\t\tSwoopChange swc = (SwoopChange) changes.get(i);\r\n\t\t\t\t\tif (!isPresent(ontChanges, swc)) ontChanges.add(swc.clone());\r\n\t\t\t\t}\r\n\t\t\t\tthis.sortChanges(ontChanges);\r\n\t\t\t\tthis.refreshOntTreeTable(); \r\n\t\t\t}\r\n\t\t\tstatusBar.setText(status+\"DONE\");\r\n\t\t}\r\n\t\tcatch (OWLException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}", "private void onClickRadioButton() {\n radioGroupChoice.setOnCheckedChangeListener(this);\n }", "public void handleRadioToggle(){\n\n if(radioBrown.isArmed()){\n radio3.setDisable(false);\n radio3.setSelected(true);\n radio2.setDisable(true);\n radio1.setDisable(true);\n colourValue = 3;\n vegColour = \"brown\";\n }else if(radioGreen.isArmed()){\n radio1.setSelected(true);\n radio1.setDisable(false);\n radio2.setDisable(true);\n radio3.setDisable(true);\n colourValue = 1;\n vegColour = \"green\";\n }else if(radioYellow.isArmed()){\n radio2.setDisable(false);\n radio2.setSelected(true);\n radio1.setDisable(true);\n radio3.setDisable(true);\n colourValue = 2;\n vegColour = \"yellow\";\n }\n }", "@Override\n public void valueChanged(ListSelectionEvent arg0) {\n\n }", "private void actionSampleDetectionModeChanged ()\r\n\t{\r\n\t\tif (mainFormLink.getComponentPanelLeft().getComponentRadioModeAuto().isSelected())\r\n\t\t{\r\n\t\t\tmainFormLink.getComponentPanelLeft().getComponentSampleAdd().setEnabled(false);\r\n\t\t\tmainFormLink.getComponentPanelLeft().getComponentSampleAddControl().setEnabled(false);\r\n\t\t\tmainFormLink.getComponentPanelLeft().getComponentSampleDelete().setEnabled(false);\r\n\t\t}\r\n\r\n\t\tif (mainFormLink.getComponentPanelLeft().getComponentRadioModeManual().isSelected())\r\n\t\t{\r\n\t\t\tmainFormLink.getComponentPanelLeft().getComponentSampleAdd().setEnabled(true);\r\n\t\t\tmainFormLink.getComponentPanelLeft().getComponentSampleAddControl().setEnabled(true);\r\n\t\t\tmainFormLink.getComponentPanelLeft().getComponentSampleDelete().setEnabled(true);\r\n\t\t}\r\n\t}", "public void onUpdatedPlaylist() {\n setCurrentTrack();\n //this was implemented so this device could have a view of the playlist\n }", "@Override\n\tpublic void valueChanged(ListSelectionEvent e) {\n\t\t// TODO Auto-generated method stub\n\t\tString name = ((JList) e.getSource()).getName();\n\t\tif (name.equals(\"pred\")){\n\t\t\tint selected = displayPred.getSelectedIndex();\n\t\t\tif (selected == -1)\n\t\t\t\tselected = 0;\n\t\t\tString loc = predParticles.get(selected).getPath();\n\t\t\tvm.updateParticleGame(loc);\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tint selected = displayPrey.getSelectedIndex();\n\t\t\tString loc = preyParticles.get(selected).getPath();\n\t\t\tvm.updateParticleGame(loc);\n\t\t}\n\t}", "public interface onChangeListener {\n void Change(List<Item> list, boolean isChange);\n }", "private void addListener() {\n\t\tOperatorPair operators = chooseOperators(name);\n\t\t\n\t\taddActionListener(e -> {\n\t\t\ttry {\n\t\t\t\tif (inversion.isSelected()) {\n\t\t\t\t\tmodel.setValue(operators.inversed.applyAsDouble(model.getValue()));\n\t\t\t\t} else {\n\t\t\t\t\tmodel.setValue(operators.original.applyAsDouble(model.getValue()));\n\t\t\t\t}\n\t\t\t} catch(IllegalArgumentException ex) {\n\t\t\t\tmodel.clearAll();\n\t\t\t\tpopupMessage(\"Cannot perform that operation.\");\n\t\t\t}\n\t\t});\n\t}", "public void radioButtonChenged() {\n if (this.radioButtons.getSelectedToggle().equals(this.btn1))\r\n radioButtonlabel.setText(\"You selected table 1\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn2))\r\n radioButtonlabel.setText(\"You selected table 2\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn3))\r\n radioButtonlabel.setText(\"You selected table 3\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn4))\r\n radioButtonlabel.setText(\"You selected table 4\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn5))\r\n radioButtonlabel.setText(\"You selected table 5\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn6))\r\n radioButtonlabel.setText(\"You selected table 6\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn7))\r\n radioButtonlabel.setText(\"You selected table 7\");\r\n\r\n if (this.radioButtons.getSelectedToggle().equals(this.btn8))\r\n radioButtonlabel.setText(\"You selected table 8\");\r\n\r\n }", "public void onRadioButtonClicked2(View view) {\n boolean checked = ((RadioButton) view).isChecked();\n\n // Check which radio button was clicked\n switch(view.getId()) {\n case R.id.R_button3:\n if (checked)\n\n weeklyInformation.radiobutton3(radioButton3.getText().toString());\n\n break;\n case R.id.R_button4:\n if (checked)\n\n weeklyInformation.radiobutton4(radioButton4.getText().toString());\n\n break;\n }\n }", "private void addListenerRadioGroup() {\n int selectedID = radioGroupJenisKel.getCheckedRadioButtonId();\n\n //Mencari radio Button\n radioButtonJenisKel = (RadioButton) findViewById(selectedID);\n }", "@Override\r\n\tpublic void onCheckedChanged(RadioGroup group, int checkedId) {\n\t\t\r\n\t}", "private void notifyEventListListeners() {\n this.eventListListeners.forEach(listener -> listener.onEventListChange(this.getEventList()));\n }", "private void firePlotListChanged() {\n firePlotListChanged(this, null);\n }", "protected void notifyChangeListeners() { \n Utilities.invokeLater(new Runnable() {\n public void run() { for(ChangeListener l: _changeListeners) l.apply(this); }\n });\n }", "@Override\n public void onTrackChange(final RadioStream.TrackInfo trackInfo) {\n }", "private void addListeners() {\n\t\t\n\t\tresetButton.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\t \n\t\t public void handle(ActionEvent e) {\n\t\t \n\t\t \treset();\n\t\t \t\n\t\t }\n\t\t \n\t\t});\n\t\t\n\t\ttoggleGroup.selectedToggleProperty().addListener(\n\t\t\t (ObservableValue<? extends Toggle> ov, Toggle old_toggle, \n\t\t\t Toggle new_toggle) -> {\n\t\t\t \t\n\t\t\t \tif(rbCourse.isSelected()) {\n\t\t \t\t\n\t\t \t\thbox3.getChildren().set(0, CourseSelectionBox.instance());\n\t\t \t\thbox3.setDisable(false);\n\t\t \t\t\n\t\t \t}else if(rbAuthor.isSelected()) {\n\t\t \t\t\n\t\t \t\thbox3.getChildren().set(0, AuthorSelectionBox.instance());\n\t\t \t\thbox3.setDisable(false);\n\t\t \t\t\n\t\t \t}else if(rbNone.isSelected()) {\n\t\t \t\t\n\t\t \t\thbox3.setDisable(true);\n\t\t \t\t\n\t\t \t}\n\t\t\t \t\n\t\t\t});\n\t\t\n\t\tapplyButton.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\t \n\t\t public void handle(ActionEvent e) {\n\t\t \n\t\t \tfilter();\n\t\t \t\n\t\t }\n\t\t \n\t\t});\n\t\t\n\t\tsearchButton.setOnAction(new EventHandler<ActionEvent>() {\n\t\t\t \n\t\t public void handle(ActionEvent e) {\n\t\t \n\t\t \tResult.instance().search(quizIDField.getText());\n\t\t \t\n\t\t }\n\t\t \n\t\t});\n\t\t\n\t}", "public void valueChanged(ListSelectionEvent e) {\r\n\t\tObject source = e.getSource();\r\n\t\tif (source == this.gragraNames) {\r\n\t\t\tswitch (this.stepPanel.getStep()) {\r\n\t\t\tcase StepPanel.STEP_HOST_GRAPH:\r\n\t\t\t\tsetGraph(StepPanel.STEP_HOST_GRAPH);\r\n\t\t\t\tbreak;\r\n\t\t\tcase StepPanel.STEP_STOP_GRAPH:\r\n\t\t\t\tsetGraph(StepPanel.STEP_STOP_GRAPH);\r\n\t\t\t\tbreak;\r\n\t\t\tcase StepPanel.STEP_CRITICAL_PAIRS:\r\n\t\t\t\tsetPairs();\r\n\t\t\t\tbreak;\r\n\t\t\tcase StepPanel.STEP_FINISH:\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}\r\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n AbstractButton selectedButton = null;\n for (Enumeration<AbstractButton> buttons = buttonGroup.getElements(); buttons.hasMoreElements(); ) {\n AbstractButton button = buttons.nextElement();\n if (button.isSelected()) {\n selectedButton = button;\n }\n }\n\n //Model um das hinzufügen von Zeilen zu ermöglichen\n DefaultListModel<String> list = ((DefaultListModel<String>) listResults.getModel());\n //Jedes mal zuerst die Liste Leeren\n list.clear();\n if (selectedButton == radioButtonAllStyles) {\n /*\n * Erzeugt Guiausgabe der Bierarten.\n * Die id wird mit \"::\" vor dem Bierart Namen ausgeben.\n * */\n beerService.getBeerStyles()\n .forEach((k, v) -> list.addElement(k + \"::\" + v));\n } else if (selectedButton == radioButtonStyle) {\n /*\n * Erzeugt Guiausgabe der Bierarten, welche die Zeichenfolge ″search″ im Namen enthalten.\n * Die id wird mit \"::\" vor dem Bierart Namen ausgeben.\n *\n * @param searchString Zeichenfolge die enthalten sein soll\n * */\n beerService.getBeerStylesBySearchStr(textFieldArgs.getText())\n .forEach((k, v) -> list.addElement(k + \"::\" + v));\n } else if (selectedButton == radioButtonAllBeers) {\n /*\n * Gibt zeilenweise ID und Name mit \"::\" getrennt der Biere aus.\n * */\n beerService.getBeers()\n .forEach(x -> list.addElement((x.getId() + \"::\" + x.getName())));\n } else if (selectedButton == radioButtonBeerWithId) {\n /*\n * Gibt in einer Zeile ID und Namen und in einer zweiten Zeile die Beschreibung\n * des entsprechenden Bieres aus.\n *\n * @param id id nach der gesucht werden soll\n * */\n Beer beer = beerService.getBeerById(textFieldArgs.getText());\n if (beer != null) {\n list.addElement(beer.getId() + \"::\" + beer.getName());\n }\n }\n }", "@Override\n\t\t\tpublic void onChanged(ListChangeListener.Change<? extends PR1Model.Shape> e) { \n\t\t\t\t\n\t\t\t\trepaint(); \n\t\t\t\treTable();\n\t\t\t\tviewState.set(ViewState.MODIFIED);\n\t\t\t\t\n\t\t\t}", "@Override\n public void onPlayListEdited(PlayList playList) {\n }", "protected void notifyWorkflowStatusListeners() {\n\t\tfor (WorkflowStatusListener listener : workflowStatusListeners) {\n\t\t\tlistener.workflowStatusChanged(this);\n\t\t}\n\t}", "@Override\n\t\t\tpublic void onCheckedChanged(RadioGroup group, int checkedId) {\n\t\t\t\tif(checkedId == cpu.getId()){\n\t\t\t\t\tLog.v(TAG,\"cpu\");\n\t\t\t\t\tvibrator.vibrate(pattern, -1);\n\t\t\t\t}else if(checkedId == memory.getId()) {\t\n\t\t\t\t\tvibrator.vibrate(pattern, -1);\n\t\t\t\t\tshowMemoryList();\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}else if(checkedId == useRate.getId()) {\n\t\t\t\t\tLog.v(TAG, \"useRate\");\n\t\t\t\t\tvibrator.vibrate(pattern, -1);\n\t\t\t\t}else if(checkedId == other.getId()) {\n\t\t\t\t\tLog.v(TAG, \"other\");\n\t\t\t\t\tvibrator.vibrate(pattern, -1);\n\t\t\t\t}else{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}", "@Override\r\n\t\tpublic void valueChanged(ListSelectionEvent e) {\r\n\t\t\t\r\n\t\t}", "@Override\n public void onCheckedChanged(RadioGroup group, int checkedId) {\n pos = radioGroup.indexOfChild(findViewById(checkedId));\n switch (pos) {\n case 1:\n\n Status_id = 0;\n new getStudentList().execute();\n // Toast.makeText(getApplicationContext(), \"1\"+Status_id,Toast.LENGTH_SHORT).show();\n break;\n case 2:\n\n Status_id = 1;\n // Toast.makeText(getApplicationContext(), \"2\"+Status_id, Toast.LENGTH_SHORT).show();\n break;\n\n default:\n //The default selection is RadioButton 1\n Status_id = 1;\n new getStudentList().execute();\n // Toast.makeText(getApplicationContext(), \"3\"+Status_id,Toast.LENGTH_SHORT).show();\n break;\n }\n }", "private void SelectionChanged(String type) {\n try {\n VaadinSession.getCurrent().getLockInstance().lock();\n Listeners_Map.values().stream().forEach((filter) -> {\n filter.selectionChanged(type);\n });\n } finally {\n VaadinSession.getCurrent().getLockInstance().unlock();\n busyTask.setVisible(false);\n }\n\n }", "public void addListener(Listener listener) {\n\t\tListener wrapper = new ParameterListenerWrapper(this, listener);\r\n\t\tfor (Button b : radioButton) {\r\n\t\t\tb.addListener(SWT.Selection, wrapper);\r\n\t\t}\r\n\t}", "private void addBindingAndListener() {\n // When the simulation has more than one time of simulation this property change the selected element\n // of time series.\n this.changeListener = (observable, oldValue, newValue) -> {\n if (newValue instanceof Component) { // IS LINK OR NODE\n Component comp = (Component) newValue;\n idTextField.setText(comp.getId());\n }\n };\n this.selectableItem.addListener(changeListener);\n }", "private void change() {\n\t\tsetChanged();\n\t\t//NotifyObservers calls on the update-method in the GUI\n\t\tnotifyObservers();\n\t}", "private void addListenerOnButton() {\n\t\tradioSex = (RadioGroup) findViewById(R.id.radioSex);\n\t\tbtnDisplay = (Button) findViewById(R.id.btnDisplay);\n\t\n\t\tbtnDisplay.setOnClickListener(new OnClickListener() {\n\t\t\t\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tint seledtedId = radioSex.getCheckedRadioButtonId();\n\t\t\t\tRadioButton radioMale = (RadioButton) findViewById(seledtedId);\n\t\t\t\tToast.makeText(ExampleRadio.this, radioMale.getText(), Toast.LENGTH_LONG).show();\n\t\t\t}\n\t\t});\n\t}", "@Override\n\tpublic void valueChanged(ListSelectionEvent arg0) {\n\t\t\n\t}", "public void erisRadioButtonListener()\r\n {\r\n \r\n if (erisRadioButton.isSelected())\r\n dwarfPlanetsImageView.setImage(erisImage);\r\n discoveredByLabel.setText(\"Discovered By: Brown, Trujillo, and Rabinowitz\");\r\n dateOfDiscoveryLabel.setText(\"Date of Discovery: October 21, 2003\");\r\n orbitPeriodLabel.setText(\"Orbit Period: 561.37 Earth Years\");\r\n lengthOfDayLabel.setText(\"Length of Day: 25.90 Hours\");\r\n namedAfterLabel.setText(\"Named After: The ancient Greek goddess of discord and strife\");\r\n }", "public void valueChanged(ListSelectionEvent e) {\n\t\t\n\t}", "public interface SettingsSelectedListener\t{\n\t}", "void onRecommendationChanged();", "private void notifyDocumentChanged(SingleDocumentModel previousModel, SingleDocumentModel currentModel) {\n\t\tcurrent = currentModel;\n\t\tfor (MultipleDocumentListener l : listeners) {\n\t\t\tl.currentDocumentChanged(previousModel, currentModel);\n\t\t}\n\t}", "void changed(DiscoveryEvent e);", "@Override\n\t\t\t\tpublic void stateChanged(ChangeEvent e) {\n\t\t\t\t\tif (!updating && button.isSelected()) {\n\t\t\t\t\t\tmodel.set(db);\n\t\t\t\t\t}\n\t\t\t\t\tif (!useRadioButtons) {\n\t\t\t\t\t\tlabel.setForeground(button.isSelected() ? selectedForeground : unselectedForeground);\n\t\t\t\t\t}\n\t\t\t\t}", "public void valueChanged(ListSelectionEvent arg0) {\n\t\t\r\n\t}", "private void setListeners() {\n\t\trefreshButton.addActionListener(new refreshButtonListener());\n\n\t\tthis.list.addMouseListener(new MouseAdapter() {\n\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent event) {\n\t\t\t\tif (event.getClickCount() == 2 && list.getSelectedValue() != null && !list.getSelectedValue().equals(\"\") && tabs.getSelectedIndex() != -1) {\n\t\t\t\t\tlaunchDocument(tabs.getTitleAt(tabs.getSelectedIndex()), list.getSelectedValue());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\ttabs.addChangeListener(new ChangeListener() {\n\n\t\t\t@Override\n\t\t\tpublic void stateChanged(ChangeEvent arg0) {\n\t\t\t\tif (!tabs.getTitleAt(tabs.getSelectedIndex()).equals(\"Chat\")) {\n\t\t\t\t\tlistmodel.clear();\n\t\t\t\t\tmakeRequest();\n\t\t\t\t}\n\t\t\t}\n\n\t\t});\n\t}", "public void alert(){\n\t\tfor (ChangeListener l : listeners) {\n\t\t\tl.stateChanged(new ChangeEvent(this));\n\t\t}\n\t}", "public void statusChanged() {\n\t\tif(!net.getArray().isEmpty()) {\n\t\t\tigraj.setEnabled(true);\n\t\t}else\n\t\t\tigraj.setEnabled(false);\n\t\t\n\t\tupdateKvota();\n\t\tupdateDobitak();\n\t}", "public void refresh() {\n clearList();\n for(int i =0;i<toDoList.toDoListLength();i++){\n JRadioButton task = toDoButtonList.get(i);\n task.setText(toDoList.getTask(i).toString());\n }\n }", "private void notifyComboBoxModelChange(int index0, int index1)\n {\n for(ListDataListener l : comboBoxModelListDataListeners)\n l.contentsChanged(new ListDataEvent(this, ListDataEvent.CONTENTS_CHANGED, index0, index1));\n }", "public void notifyChangementJoueurs();", "public void onRadioButtonClicked1(View view) {\n boolean checked = ((RadioButton) view).isChecked();\n\n // Check which radio button was clicked\n switch(view.getId()) {\n case R.id.R_button1:\n if (checked)\n\n weeklyInformation.radiobutton1(radioButton1.getText().toString());\n\n break;\n case R.id.R_button2:\n if (checked)\n\n weeklyInformation.radiobutton2(radioButton2.getText().toString());\n\n break;\n }\n }", "public interface ListChanged {\n void calculateTotal();\n void showDelete(String data);\n}", "public void contentsChanged(ListDataEvent e) {\n\t\tint size=store.size();\n\t\tif (size<2) return;\n\n\t\t// Remove existing list\n\t\tfor (int index=0; index<size; index++) {\n\t\t // Keep removing the first entry until the list is empty\n\t\t JMenuItem item = identityMenu.getItem(identityIndex);\n\t\t identityButtonGroup.remove(item);\n\t\t identityMenu.remove(item);\n\t\t}\n\n\t\t// Create new list\n\t\tfor (int index=0; index<size; index++)\t{\n\t\t CertificatePair cert = store.get(index);\n\t\t Action action = new ActionSelectCertificate(JGSFrame.this, cert, selection);\n\t\t if (index<9)\n\t\t\taction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"control \"+(index+1)));\n\t\t JRadioButtonMenuItem jrb = new JRadioButtonMenuItem(action);\n\t\t identityButtonGroup.add(jrb);\n\t\t identityMenu.insert(jrb, identityIndex + index);\n\t\t}\n\t }", "@Override\n public void valueChanged(javax.swing.event.ListSelectionEvent e)\n {\n this.choice = e.getFirstIndex();\n }", "@Override\n\tpublic void playlistChanged(MPDStatus mpdStatus, int oldPlaylistVersion) {\n\t\t\n\t}", "private void completeListener() {\n buttonPanel.getCompleteTask().addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n for (int i = 0;i<toDoList.toDoListLength();i++) {\n JRadioButton task = toDoButtonList.get(i);\n if (task.isSelected()&& !task.getText().equals(\"\")){\n toDoList.getTask(i).setComplete();\n }\n }\n refresh();\n }\n });\n }", "private void reloadAccountTypeRadioButtons() {\n accountTypeStandardJRadioButton.setSelected(true);\n }", "protected void notifyDirty() {\n Event evt = new Event();\n evt.item = this;\n evt.widget = this;\n SelectionEvent event = new SelectionEvent(evt);\n for (SelectionListener listener : dirtyListener) {\n listener.widgetSelected(event);\n }\n }", "public interface MediaSelectedListener {\n public void onHasNoSelected();\n\n public void onHasSelected(List<MediaItem> mediaSelectedList);\n}", "public void bindPlotListChangedEvent(final OIFitsCollectionManagerEventListener listener) {\n getPlotListChangedEventNotifier().register(listener);\n\n // force fire PLOT_LIST_CHANGED event to initialize the listener with current OIFitsCollection ASAP:\n firePlotListChanged(null, listener);\n }", "public interface SignalStateListener{\n\n void onSimStateChanged(boolean sim1Exist, boolean sim2Exist) ;\n\n void onSignalStrengthsChanged(int simId, SimSignalInfo signalInfo) ;\n }", "public interface UpdateListListener {\r\n\r\n void updateList(ArrayList<Movie> movies);\r\n\r\n}", "@Override\n public void onSettingChanged(ListPreference pref) {\n }", "public void valueChanged(ListSelectionEvent e) {\n selectedTeacher = editTeachersList.getSelectedIndex();\r\n if (e.getValueIsAdjusting()&&selectedTeacher!=-1){ \r\n //set value to selected teacher on jlist\r\n selectedTeacher = editTeachersList.getSelectedIndex();\r\n //remove the panel to refresh later\r\n editTeachersPanel.removeAll();\r\n editTeachersSubPanel.removeAll();\r\n teacherPeriodsListModel.removeAllElements();\r\n //add the teachers name to label\r\n editTeachersName = new JLabel(\"Selected Teacher: \"+ teachers.get(selectedTeacher).getName()); \r\n //add all the teachers periods to label\r\n for (int i=0;i<teachers.get(selectedTeacher).getPeriodNumbers().size();i++){ \r\n teacherPeriodsListModel.addElement(teachers.get(selectedTeacher).getPeriodNumbers().get(i));\r\n }\r\n \r\n //Refreshing the page by adding to the panel again\r\n JPanel dividingPanel = new JPanel(new GridLayout(1,2));\r\n dividingPanel.add(editTeachersListScroll);\r\n JPanel periodAndButtonsPanel = new JPanel(new GridLayout(2,1));\r\n periodAndButtonsPanel.add(teacherPeriodsListScroll);\r\n JPanel mainButtonPanel = new JPanel(new BorderLayout());\r\n JPanel teacherButtonPanel = new JPanel(new GridLayout(2,2));\r\n teacherButtonPanel.add(addTeachersButtonEdit);\r\n teacherButtonPanel.add(addPeriodsButton1);\r\n teacherButtonPanel.add(removeTeachersButtonEdit);\r\n teacherButtonPanel.add(removePeriodsButton);\r\n mainButtonPanel.add(teacherButtonPanel, BorderLayout.CENTER);\r\n mainButtonPanel.add(backToTeachersEdit, BorderLayout.PAGE_END);\r\n periodAndButtonsPanel.add(mainButtonPanel);\r\n dividingPanel.add(periodAndButtonsPanel);\r\n editTeachersPanel.add(dividingPanel);\r\n editFrame.add(editTeachersPanel); \r\n editTeachersPanel.setVisible(false);\r\n editTeachersPanel.setVisible(true);\r\n }\r\n }", "private void gListValueChanged(ListSelectionEvent e) {\n }", "public interface SurveyVoteListener {\n void voteListener(int yes, int no);\n void editListener(String newQuestion, String newOptionOne, String newOptionTwo);\n }", "void eventChanged();", "protected void updateTypeList() {\n\t sequenceLabel.setText(\"Sequence = \" + theDoc.theSequence.getId());\n\t typeList.setListData(theDoc.theTypes);\n\t signalList.setListData(nullSignals);\n\t valueField.setEnabled(false);\n\t valueList.setEnabled(false);\n }" ]
[ "0.69039154", "0.6430671", "0.62133574", "0.6197986", "0.61825615", "0.61281174", "0.60929596", "0.60809493", "0.6074434", "0.6070621", "0.60484457", "0.60276616", "0.59680426", "0.59680426", "0.59680426", "0.59680426", "0.5866658", "0.58467203", "0.5820176", "0.5812669", "0.5802765", "0.5791876", "0.5776054", "0.5773957", "0.5773687", "0.5771496", "0.5768436", "0.5726144", "0.57222646", "0.5716103", "0.5709622", "0.56933105", "0.56900895", "0.5679407", "0.5676223", "0.5668936", "0.56662625", "0.56607246", "0.56494796", "0.56448185", "0.5626276", "0.5622409", "0.5619959", "0.56171876", "0.5610517", "0.5599978", "0.55969214", "0.55959105", "0.5590964", "0.55803734", "0.5576284", "0.5575721", "0.55689806", "0.55622375", "0.55540526", "0.5544277", "0.5539984", "0.5535349", "0.5533112", "0.55318475", "0.5531645", "0.5527637", "0.5522327", "0.55190796", "0.5516362", "0.5507717", "0.55027175", "0.5495196", "0.5494786", "0.5484846", "0.54840404", "0.5482454", "0.5480742", "0.5466288", "0.5464763", "0.5464058", "0.54640347", "0.54538655", "0.5449798", "0.5433828", "0.5427284", "0.5424735", "0.54207796", "0.5419483", "0.54139125", "0.54137635", "0.54106", "0.5407247", "0.5405933", "0.5392784", "0.5392426", "0.5381272", "0.5380407", "0.53761077", "0.5373277", "0.53725326", "0.53701234", "0.5369949", "0.5369229", "0.5362211" ]
0.66157365
1
Notifies when the data from the database has changed, so then the listeners can trigger an update
public void onDataChanged();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void dataChanged() {\n\t\tif (wijzigInfo)\n\t\t\twijzigInfo();\n\n\t\tsetChanged();\n\t\tnotifyObservers(\"dataChanged\");\n\t}", "public void onDataChanged(){}", "void onDataChanged();", "public void notifyChangementJoueurs();", "@Override\n public void onDataChanged() {\n\n }", "@Override\n public void onDataChanged() {\n }", "@Override\n public void onDataChanged() {\n }", "@Override\n protected void onDataChanged() {\n }", "public void receivedUpdateFromServer();", "public interface DatabaseListener {\n\n void databaseChanged(DatabaseEvent databaseEvent);\n\n}", "void notifyPrisonerDataChanged();", "public void notifyChange()\r\n {\r\n setChanged();\r\n notifyObservers();\r\n }", "public void dataUpdateEvent();", "@Override\n\tpublic void onDataChanged()\n\t{\n\t\tfor (DataChangedCallbacks listener : this.dataChangedListeners)\n\t\t{\n\t\t\tlistener.onDataChanged();\n\t\t}\n\t}", "public void updateData() {}", "public void willbeUpdated() {\n\t\t\n\t}", "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 notifyModelUpdated()\n {}", "public void update() {\n Log.d(TAG, \"Updating database\");\n databaseRef.child(TAG).setValue(events);\n Log.d(TAG, \"Database update complete\");\n }", "public void doSomeChanges() {\n\n eventBus.publish(\"our.event.coming.from.model\", \"some data passed\");\n }", "public void dataChanged() {\n // get latest data\n runs = getLatestRuns();\n wickets = getLatestWickets();\n overs = getLatestOvers();\n\n currentScoreDisplay.update(runs, wickets, overs);\n averageScoreDisplay.update(runs, wickets, overs);\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 boolean isDataChanged() {\n\n\t\treturn true;\n\t}", "public void dataChanged(DataChangeEvent e) {\n\t\t\t}", "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 }", "private void notifyUpdated() {\n if (mChanged) {\n mChanged = false;\n mObserver.onChanged(this);\n }\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\r\n\tpublic void notifyObservers() {\n\t\t\r\n\t}", "@Override // ohos.data.resultset.AbsResultSet\r\n public void notifyChange() {\r\n super.notifyChange();\r\n }", "public void onDataChanged(IData data) {\r\n setData(data);\r\n }", "void notifyAllAboutChange();", "public void updatedTable() {\r\n\t\tfireTableDataChanged();\r\n\t}", "public boolean wasDataUpdated() {\n\t\treturn true;\n\t}", "@Override\r\n\t\t\t\t\tpublic void changedUpdate(DocumentEvent e) {\n\t\t\t\t\t\tcheckID();\r\n\t\t\t\t\t}", "@Override\n\t\t\tpublic void changedUpdate(DocumentEvent arg0) {\n\t\t\t}", "@Override\n public void updateDatabase() {\n }", "public void refreshData() {\r\n\t\tfireTableDataChanged();\r\n\t\tgetTable().tableChanged(new TableModelEvent(this));\r\n\t}", "public void notifyObservers() {}", "protected void onDataChanged(V item) {\n\n }", "public void notifyObservers();", "public void notifyObservers();", "public void notifyObservers();", "void updateData();", "@Override\r\n\tpublic void updateData() {\n\t\t\r\n\t}", "void notifyObservers();", "void notifyObservers();", "@Override\r\n\tpublic void operations() {\n\t\tSystem.out.println(\"update self!\"); \r\n notifyObservers(); \r\n\r\n\t}", "private void updateDB() {\n }", "@Override\n\tpublic void changedUpdate(DocumentEvent de) {\n\n\t}", "private void notifyListeners(boolean dataChanged) {\n for (OnDataChangedListener listener : dataChangedListeners) {\n listener.onDataChanged(dataChanged);\n }\n }", "private void reafficher() {\n\t\tthis.setChanged();\n\t\tthis.notifyObservers();\n\t}", "public void onDataChanged(IData data) {\r\n\t this.data = data;\r\n\t repaint();\r\n\t}", "public void allActualValuesUpdated ();", "@DISPID(-2147412072)\n @PropPut\n void ondatasetchanged(\n java.lang.Object rhs);", "public void refresh() {\n calcDataInTable();\n fireTableDataChanged();\n\n}", "@Override\n public void changedUpdate(DocumentEvent e) {\n verifierSaisie();\n }", "public void update() {\n tableChanged(new TableModelEvent(this));\n }", "private void notifyChange() {\n\t\tif (OllieProvider.isImplemented()) {\n\t\t\tOllie.getContext().getContentResolver().notifyChange(OllieProvider.createUri(getClass(), id), null);\n\t\t}\n\t}", "@DISPID(-2147412072)\n @PropGet\n java.lang.Object ondatasetchanged();", "@Override\n public void DataIsInserted() {\n }", "@Override\n\tpublic void onUpdate() {\n\t\tlistener.onUpdate();\n\t}", "public interface DbSubscriber extends Subscriber {\n void onDbDataUpdated(@Db.DbEvent int tableId, Object dbObject);\n\n void onDbErrorError(@Db.DbEvent int tableId, Object error);\n}", "@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n }", "@Override\n\t\tpublic void changedUpdate(DocumentEvent e) {\n\t\t\t\n\t\t}", "public void updateTable()\r\n {\r\n ((JarModel) table.getModel()).fireTableDataChanged();\r\n }", "protected void indicateModified() {\n invalidationListenerManager.callListeners(this);\n }", "public static interface DataChangeObserver {\n /**\n * Called when data has been changed.\n */\n void onDataChanged();\n /**\n * Called when data has been cleared.\n */\n void onDataCleared();\n /**\n * Called when usage reports can be reported to local indexing service.\n */\n void startReportingTask();\n /**\n * Called when usage reports can't be reported to local indexing service any more.\n */\n void stopReportingTask();\n }", "void update(Subscriber record);", "@Override\n\t\t\t\tpublic void allRowsChanged() {\n\n\t\t\t\t}", "private void change() {\n\t\tsetChanged();\n\t\t//NotifyObservers calls on the update-method in the GUI\n\t\tnotifyObservers();\n\t}", "@Override\r\n\tpublic void valuesChanged() {\r\n\t}", "protected void notifyChangeListeners() { \n Utilities.invokeLater(new Runnable() {\n public void run() { for(ChangeListener l: _changeListeners) l.apply(this); }\n });\n }", "public void updateObserver();", "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\tpublic void NotifyObserver() {\n\n\t}", "@Override\n public void onDataChanged(DataEventBuffer dataEventBuffer) {\n for (DataEvent event : dataEventBuffer) {\n if (event.getType() == DataEvent.TYPE_CHANGED) {\n // DataItem changed\n DataItem item = event.getDataItem();\n if (item.getUri().getPath().compareTo(\"/latlnglist\") == 0) {\n\n DataMap dataMap = DataMapItem.fromDataItem(item).getDataMap();\n\n Log.d(\"hudwear\", \"new data, sending message to handler\");\n\n Message m = new Message();\n Bundle b = new Bundle();\n b.putDouble(\"latitude\", dataMap.getDouble(\"latitude\"));\n b.putDouble(\"longitude\", dataMap.getDouble(\"longitude\"));\n m.setData(b);\n handler.sendMessage(m);\n }\n\n } else if (event.getType() == DataEvent.TYPE_DELETED) {\n // DataItem deleted\n }\n }\n }", "@Override\n\tpublic void onDataChanged(long timestamp, int msg) {\n\t\tif(msg==AgentMessage.ERROR.getCode()) \n\t\t\tToolBox.showRemoteErrorMessage(connBean, error);\n\t\t\n\t\tsynchronized (mutex) {\n setEnabled(false);\n if (solid != null && timestamp > lastestTimeStamp+1500*1000000) {\n int result = JOptionPane.showConfirmDialog(StartUI.getFrame(), \"The config of this lift has changed. Reload it?\", \"Update\",\n JOptionPane.YES_NO_OPTION);\n if (result == JOptionPane.OK_OPTION) {\n solid = null;\n event = new Parser_Event( connBean.getIp(), connBean.getPort() );\n setHot();\n }\n } else {\n setHot();\n }\n setEnabled(true);\n }\n\t}", "@Override\n\t\t\tpublic void notify(Notification n) {\n\t\t\t\tif (isActive()) handleModelChanged();\n\t\t\t\trefreshAdapters();\n\t\t\t}", "@Override\n\tpublic void update(Observable observable, Object data) {\n\n\t}", "private void fireContentModelModified(final String id, final String xmlData) throws SystemException {\r\n for (final ResourceListener contentModelListener : this.contentModelListeners) {\r\n contentModelListener.resourceModified(id, xmlData);\r\n }\r\n }", "public void notifyUpdate(String publicID) {\n }", "public boolean hasChanged();", "public boolean hasChanged();", "public void markChanged()\n \t{\n \t\tbChanged=true;\n \t}", "@Override\n public void eventsChanged() {\n }", "protected synchronized void setChanged() {\n changed = true;\n }", "@Override\n public void doUpdate(NotificationMessage notification) {\n \n }", "@Override\n public void onChanged(@Nullable final Contact contactFromDb) {\n contact = contactFromDb;\n notifyContactChanged();\n }", "@Override\n\t\t\t\tpublic void changedUpdate(final DocumentEvent e) {\n\t\t\t\t}", "public void notifyChangementCroyants();", "public void updateTable() {\n ((AbstractTableModel) table.getModel()).fireTableDataChanged();\n }", "private void dbListeners() {\n // Set if image+text is being worked on currently\n //================================================\n mBeingWorkedOnListener = new ValueEventListener() {\n @Override\n public void onDataChange(final DataSnapshot dataSnapshot) {\n new AsyncTask<Void, Void, String>() {\n @Override\n protected String doInBackground(Void... voids) {\n return dataSnapshot.getValue(String.class);\n }\n\n @Override\n protected void onPostExecute(String s) {\n beingWorkedOn = s;\n }\n }.execute();\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n };\n\n dGlobalRef.child(\"beingWorkedOn\").addValueEventListener(mBeingWorkedOnListener);\n }", "public void afterUpdate(DevicelabtestBean pObject) throws SQLException;", "public void notifyChangementTour();", "private void notifyObservers() {\n BinStatusUpdate newStatus = buildNewStatus();\n observers.iterator().forEachRemaining(binStatusUpdateStreamObserver -> binStatusUpdateStreamObserver.onNext(newStatus));\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}", "public interface IVersionUpdateListener extends IBaseDataListener {\n void onSuccess(VersionUpdateDataBean data);\n}", "@Override\r\n\t\t\tpublic void changedUpdate(DocumentEvent e) {\n\t\t\t}", "interface DataListener\n{\n\tpublic void DataChanged(MDSplus.Data data);\n}", "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}" ]
[ "0.7728549", "0.7466266", "0.74483913", "0.71606606", "0.6953101", "0.69478965", "0.69478965", "0.6869286", "0.6844533", "0.6791709", "0.6784726", "0.6784077", "0.6737685", "0.6722587", "0.66521466", "0.6627685", "0.660116", "0.6591614", "0.6569187", "0.6540799", "0.6519971", "0.6516555", "0.647241", "0.64502126", "0.6437429", "0.6433186", "0.63929117", "0.6376701", "0.6374146", "0.63408923", "0.6304953", "0.6288639", "0.62867767", "0.6284279", "0.62749696", "0.627245", "0.62557876", "0.6255387", "0.62498033", "0.62424827", "0.62424827", "0.62424827", "0.62419724", "0.62395614", "0.6236529", "0.6236529", "0.6234485", "0.6225772", "0.6219046", "0.62135273", "0.6187445", "0.61778414", "0.6176759", "0.6167279", "0.6157566", "0.6156642", "0.61536545", "0.6118247", "0.61003065", "0.60909796", "0.60901725", "0.6088399", "0.60846156", "0.60836464", "0.6067055", "0.60639644", "0.60624886", "0.6060909", "0.6060178", "0.6055551", "0.60512424", "0.60502243", "0.6048391", "0.60478854", "0.60386133", "0.60295147", "0.6025454", "0.60244304", "0.60214317", "0.6013706", "0.60123974", "0.60036695", "0.60036695", "0.5997471", "0.5995978", "0.59865516", "0.5984016", "0.59834933", "0.59811175", "0.59785914", "0.5975604", "0.5958601", "0.5954876", "0.595484", "0.59506184", "0.5945079", "0.59346706", "0.5934145", "0.5928542", "0.5927138" ]
0.7587523
1
Requests the list of data from the server
public void provide(@NonNull final RadioListRetrievedListener listener) { final Long timeBefore = System.currentTimeMillis(); ServerDataProvider dataProvider = new ServerDataProvider(); dataProvider.provideRadioList( new RadioListRetrievedListener() { @Override public void onError() { listener.onError(); } @Override public void onRadioListRetrieved(List<Radio> radios) { final Long timeElapsedForAddDevice = System.currentTimeMillis() - timeBefore; final String timeAddDevice = String.format("%1$,.5f", (double) timeElapsedForAddDevice / 1000); Log.d(LOG_TAG, "time for retrieving " + timeAddDevice); Observable<List<Radio>> radiosObservable = requestFromServerAndSync(radios); radiosObservable.subscribeOn(Schedulers.newThread()).observeOn( AndroidSchedulers.mainThread()).subscribe( new Subscriber<List<Radio>>() { @Override public void onCompleted() { // nothing } @Override public void onError(Throwable e) { listener.onError(); } @Override public void onNext(List<Radio> radios) { final Long timeElapsedForAddDevice = System.currentTimeMillis() - timeBefore; final String timeAddDevice = String.format("%1$,.5f", (double) timeElapsedForAddDevice / 1000); Log.d(LOG_TAG, "time for all " + timeAddDevice); listener.onRadioListRetrieved(radios); } }); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void getRequests();", "public void loadData(){\n JsonArrayRequest request = new JsonArrayRequest(\"http://www.efstratiou.info/projects/newsfeed/getList.php\", netListener, errorListener);\n\n //submit request\n ArticlesApp.getInstance().getRequestQueue().add(request);\n\n }", "void getDataFromServer();", "private void getMasechtotListFromServer() {\n\n\n RequestManager.getMasechtotList().subscribe(new Observer<Result<MasechetList>>() {\n @Override\n public void onSubscribe(Disposable d) {\n\n }\n\n @Override\n public void onNext(Result<MasechetList> masechetListResult) {\n\n saveMasechtotList(masechetListResult.getData());\n mMasechtotList = masechetListResult.getData();\n\n }\n\n @Override\n public void onError(Throwable e) {\n\n }\n\n @Override\n public void onComplete() {\n\n }\n });\n\n\n }", "private void handleListOperation() {\n\n Client client = ClientBuilder.newBuilder().build();\n WebTarget webTarget = client.target(\"http://localhost:8080/pa165/rest/bricks/\");\n webTarget.register(auth);\n Invocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON);\n Response response = invocationBuilder.get();\n\n if (response.getStatus() == Response.Status.OK.getStatusCode()) {\n List<BrickDto> brickDtoList = response.readEntity(new GenericType<List<BrickDto>>() {\n });\n System.out.println(\"Number of bricks returned: \" + brickDtoList.size());\n\n for (BrickDto b : brickDtoList) {\n System.out.println(b);\n }\n } else {\n System.out.println(\"Error code:\" + response.getStatus());\n }\n }", "List<SdkHttpRequest> getRequests();", "private JsonArrayRequest getDataFromServer(String url, String requestCount) {\r\n\r\n //JsonArrayRequest of volley\r\n return new JsonArrayRequest(url + String.valueOf(requestCount),\r\n new Response.Listener<JSONArray>() {\r\n @Override\r\n public void onResponse(JSONArray response) {\r\n //Calling method to parse the json response\r\n parseData(response, requestCount);\r\n }\r\n },\r\n new Response.ErrorListener() {\r\n @Override\r\n public void onErrorResponse(VolleyError error) {\r\n //If an error occurs that means end of the list has reached\r\n }\r\n });\r\n }", "@Override\r\n\tpublic String list() {\n\t\tList<HeadLine> dataList=new ArrayList<HeadLine>();\r\n\t\tPagerItem pagerItem=new PagerItem();\r\n\t\tpagerItem.parsePageSize(pageSize);\r\n\t\tpagerItem.parsePageNum(pageNum);\r\n\t\t\r\n\t\tLong count=headLineService.count();\r\n\t\tpagerItem.changeRowCount(count);\r\n\t\t\r\n\t\tdataList=headLineService.pager(pagerItem.getPageNum(), pagerItem.getPageSize());\r\n\t\tpagerItem.changeUrl(SysFun.generalUrl(requestURI, queryString));\r\n\t\t\r\n\t\trequest.put(\"DataList\", dataList);\r\n\t\trequest.put(\"pagerItem\", pagerItem);\r\n\t\t\r\n\t\t\r\n\t\treturn \"list\";\r\n\t}", "public static List<Item> getItems() {\n\n HttpRequest request = HttpRequest.newBuilder().GET().uri(URI.create(\"http://localhost:8080/item/all\")).setHeader(\"Cookie\", Authenticator.SESSION_COOKIE).build();\n HttpResponse<String> response = null;\n try {\n response = client.send(request, HttpResponse.BodyHandlers.ofString());\n } catch (Exception e) {\n e.printStackTrace();\n //return \"Communication with server failed\";\n }\n if (response.statusCode() != 200) {\n System.out.println(\"Status: \" + response.statusCode());\n }\n\n ObjectMapper mapper = new ObjectMapper();\n mapper.registerModule(new JavaTimeModule());\n List<Item> items = null;\n // TODO handle exception\n try {\n items = mapper.readValue(response.body(), new TypeReference<List<Item>>(){});\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return items;\n }", "public static List<Book> getDataFromServer(String requestURL) {\n return parseServerResponse(readInputStream(performNetworkRequest(convertStringToURL(requestURL))));\n }", "private void requestServerToGetInformation() {\n Net net = Net.getInstance();\n Log.i(TAG, \"requestServerToGetInformation: Start connect server\");\n net.get(AppConstant.SERVER_COMBO_URL, new Callback() {\n @Override\n public void onFailure(Call call, IOException e) {\n Log.i(TAG, \"onFailure: connect error; \" + e.getMessage());\n }\n @Override\n public void onResponse(Call call, Response response) throws IOException {\n // get the JSON from responses.\n String jsonStr = response.body().string();\n Log.i(TAG, \"onResponse: --------------------------------\" + jsonStr);\n parseJsonAndUpdateView(jsonStr.trim());\n }\n });\n }", "void requestData();", "public void fetchResults() {\n String requestUrl = \"http://192.168.1.40:8090/trending\";\n StringRequest request = new StringRequest(\n Request.Method.POST,\n requestUrl,\n trendingGetData,\n errorListener){\n\n protected Map<String, String> getParams() throws com.android.volley.AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"memberID\", \"MMM111\");\n return params;\n };\n };\n RequestQueue queue = Volley.newRequestQueue(this);\n queue1 = Volley.newRequestQueue(this);\n queue2 = Volley.newRequestQueue(this);\n queue.add(request);\n }", "private void getDevices(){\n progress.setVisibility(View.VISIBLE);\n\n emptyMessage.setVisibility(View.GONE);\n getListView().setVisibility(View.GONE);\n\n // request device list from the server\n Model.PerformRESTCallTask gd = Model.asynchRequest(this,\n getString(R.string.rest_url) + \"?\"\n + \"authentification_key=\" + MainActivity.authentificationKey + \"&operation=\" + \"getdevices\",\n //Model.GET,\n \"getDevices\");\n tasks.put(\"getDevices\", gd);\n }", "@Override\n\tpublic void sendItemListRequest() {\n\t\ttry {\n\t\t\tString xml = \"\";\n\t\t\tif (this.servType.equals(SERVICE_TYPE_SOAP)){\n\t\t\t\txml = server.getItems();\n\t\t\t} else {\n\t\t\t\tWebResource itemListReqService = service.path(URI_GETITEMS);\n\t\t\t\txml = itemListReqService.accept(MediaType.TEXT_XML).get(String.class);\n\t\t\t}\n\t\t\n\t\t\tArrayList<ItemObject> items = XMLParser.parseToListItemObject(xml);\n\t\t\tgui.setTableContent(items);\n\t\t} catch (ParserConfigurationException | SAXException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (ClientHandlerException ex){\n\t\t\tex.printStackTrace();\n\t\t\tsetOKDialog(\"Error\", \"The RESTFul server is not responding!!\");\n\t\t} catch (WebServiceException ex){\n\t\t\tex.printStackTrace();\n\t\t\tsetOKDialog(\"Error\", \"The SOAP-RPC server is not responding!!\");\n\t\t}\n\t}", "public List<Data> getAllDataFromService() {\n\t\t\n\t\tList<Data> data = new ArrayList<>();\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\t\n\t\t// get first page data\n\t\tResponse response = restTemplate.getForObject(\n\t\t\t\t\"https://jsonmock.hackerrank.com/api/article_users/search?page=1\",\n\t\t\t\tResponse.class);\n\t\tdata.addAll(response.getData());\n\t\t\n\t\t// get second page data\n\t\tResponse response2 = restTemplate.getForObject(\n\t\t\t\t\"https://jsonmock.hackerrank.com/api/article_users/search?page=2\",\n\t\t\t\tResponse.class);\n\t\tdata.addAll(response2.getData());\n\t\t\n\t\treturn data;\t\n\t}", "public static int doGetList(Result r) {\n // Make an HTTP GET passing the name on the URL line\n r.setValue(\"\");\n String response = \"\";\n HttpURLConnection conn;\n int status = 0;\n try {\n \n URL url = new URL(\"https://intense-lake-93564.herokuapp.com/menusection/\");\n conn = (HttpURLConnection) url.openConnection();\n conn.setRequestMethod(\"GET\");\n // tell the server what format we want back\n conn.setRequestProperty(\"Accept\", \"text/plain\");\n // wait for response\n status = conn.getResponseCode();\n // If things went poorly, don't try to read any response, just return.\n if (status != 200) {\n // not using msg\n String msg = conn.getResponseMessage();\n return conn.getResponseCode();\n }\n String output = \"\";\n // things went well so let's read the response\n BufferedReader br = new BufferedReader(new InputStreamReader(\n (conn.getInputStream()))); \n while ((output = br.readLine()) != null) {\n response += output; \n } \n conn.disconnect();\n \n }\n catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } \n // return value from server\n // set the response object\n r.setValue(response);\n // return HTTP status to caller\n return status;\n }", "java.util.List<Rsp.RequestFromSelf>\n getRequestsList();", "@GET\n @Produces(MediaType.APPLICATION_JSON)\n public Response index() {\n ArrayList<String> serversClone = new ArrayList<>();\n this.cm.getServers().forEach(server -> {\n serversClone.add(server);\n });\n while (!serversClone.isEmpty()) {\n String selectedServer = this.cm.getServer();\n serversClone.remove(selectedServer);\n try{\n String endpoint = \"http://\" + selectedServer\n + \"/WebService/webresources/files\";\n String methodType=\"GET\";\n URL url = new URL(endpoint);\n HttpURLConnection urlConnection = (HttpURLConnection) \n url.openConnection();\n urlConnection.setRequestMethod(methodType);\n urlConnection.setDoOutput(true);\n urlConnection.setRequestProperty(\n \"Content-type\", MediaType.APPLICATION_JSON\n );\n urlConnection.setRequestProperty(\n \"Accept\", MediaType.APPLICATION_JSON\n );\n int httpResponseCode = urlConnection.getResponseCode();\n if (httpResponseCode == HttpURLConnection.HTTP_OK) {\n BufferedReader in = new BufferedReader(\n new InputStreamReader(urlConnection.getInputStream()));\n String inputLine;\n StringBuilder content = new StringBuilder();\n while ((inputLine = in.readLine()) != null) {\n content.append(inputLine);\n }\n return Response.ok(content.toString()).build();\n } else {\n if (serversClone.isEmpty()) {\n return Response\n .status(httpResponseCode).build();\n }\n } \n } catch (IOException ex) {\n System.err.println(ex);\n return Response.serverError().build();\n }\n }\n return Response.status(HttpURLConnection.HTTP_UNAVAILABLE).build();\n }", "java.util.List<Pokemon.Request> \n getRequestsList();", "Object getAll(WebRequest webRequest, HttpServletResponse response, Model model) throws Exception;", "java.util.List<com.google.protobuf.ByteString> getResponseList();", "private void requestData() {\n Jc11x5Factory.getInstance().getJobPriceList(mHandler);\n }", "private void getData() {\n\n //Adding the method to the queue by calling the method getDataFromServer\n requestQueue.add(getDataFromServer(pos));\n\n }", "public static void ObtenerDatosGustoVerdura(Context context) {\n\n queue = Volley.newRequestQueue(context);\n\n String url = \"http://161.35.14.188/Persuhabit/GustoVerdura\";//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 }", "private void getEcoleList(){\r\n\t\tEcoleRequestFactory rf = GWT.create(EcoleRequestFactory.class);\r\n\t\trf.initialize(this.getEventBus(), new EventSourceRequestTransport(this.getEventBus()));\r\n\t\tEcoleRequestContext rc = rf.ecoleRequest();\r\n\t\trc.listAllActive().fire(new Receiver<List<EcoleProxy>>(){\r\n\t\t\t@Override\r\n\t\t\tpublic void onSuccess(List<EcoleProxy> response){\r\n\t\t\t\tgetView().setEcoleAddList(response);\r\n\t\t\t}\r\n\t\t\t@Override\r\n\t\t\tpublic void onFailure(ServerFailure error){\r\n\t\t\t\tWindow.alert(error.getMessage());\r\n\t\t\t}\r\n\t\t});\r\n\t}", "private void getData(){\r\n \tsetProgressBarIndeterminateVisibility(true);\r\n \t\r\n\t String url = \"HospitalInfo?hospital=\" + URLEncoder.encode(hospital) + \"&ssid=\" + UserInfo.getSSID();\r\n\t download = new HttpGetJSONConnection(url, mHandler, TASK_GETDATA);\r\n\t download.start();\r\n }", "java.util.List<TransmissionProtocol.Request> \n getRequestList();", "private void getRequestList()\n {\n StringBuilder soapMessage = new StringBuilder();\n soapMessage.append(\"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\");\n soapMessage.append(\"<Envelope xmlns=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\">\");\n soapMessage.append(\"<Body>\");\n soapMessage.append(\"<ListRequestType xmlns=\\\"\" + Constants.TEMP_URI_NAMESPACE + \"\\\">\");\n soapMessage.append(\"<userHash>\" + DataManager.getInstance().user.getUserHash() + \"</userHash>\");\n soapMessage.append(\"</ListRequestType>\");\n soapMessage.append(\"</Body>\");\n soapMessage.append(\"</Envelope>\");\n showProgressDialog();\n VollyResponseListener vollyResponseListener = new VollyResponseListener()\n {\n @Override\n public void onErrorResponse(VolleyError volleyError)\n {\n volleyError.printStackTrace();\n }\n\n @Override\n public void onResponse(String response)\n {\n hideProgressDialog();\n requestList = new ArrayList<SmartObject>();\n Helper.Log(\"Response:%n %s\", response);\n DataManager.getInstance().requestUser = ParserManager.parseRequestResponse(response);\n for (int i = 0; i < ParserManager.parseRequestResponse(response).getRequests().size(); i++)\n {\n int requestId = Integer.parseInt(ParserManager.parseRequestResponse(response).getRequests().get(i).getRequestId());\n String requestName = ParserManager.parseRequestResponse(response).getRequests().get(i).getRequestName();\n requestList.add(i, new SmartObject(requestId, requestName));\n }\n\n {\n if (!requestList.isEmpty())\n showListPopUp(etSelectTeam, requestList);\n }\n\n }\n };\n try\n {\n VollyCustomRequest vollyCustomRequest = new VollyCustomRequest(Constants.PLANNER_WEBSERVICE_URL,\n soapMessage.toString(), Constants.TEMP_URI_NAMESPACE + \"IPlannerService/ListRequestType\", vollyResponseListener);\n vollyCustomRequest.init(\"validateUser\");\n\n\n } catch (Exception e1)\n {\n e1.printStackTrace();\n }\n\n }", "@GET\n @Path(\"/\")\n @Produces(\"application/json\")\n public Response all() {\n // Return some cliched textual content\n return Response.ok(\"clients list goes here\", MediaType.APPLICATION_JSON).build();\n }", "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 }", "public static void ObtenerDatosHistorial_Autoeficacia(Context context) {\n\n queue = Volley.newRequestQueue(context);\n\n String url = \"http://161.35.14.188/Persuhabit/HistorialAuto\";//establece ruta al servidor para obtener los datos\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n try {\n JSONArray jsonArray = response.getJSONArray(\"data\");//\n\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n queue.add(jsonObjectRequest);\n }", "public List<Volume> list() {\n List<Volume> volumes = new ArrayList<Volume>();\n\n try {\n\n HttpResponse<Volume[]> jsonResponse = Unirest.get(rootUrl + ENDPOINT_DATASET_LIST)\n .basicAuth(auth.getUsername(),auth.getPassword())\n .header(\"accept\", \"application/json\")\n .asObject(Volume[].class);\n //System.out.print(jsonResponse.getBody());\n\n if (jsonResponse.getStatus() == HttpStatus.SC_OK) {\n Volume [] body = jsonResponse.getBody();\n System.out.println(body);\n\n for (Volume b: body){\n volumes.add(b);\n }\n }\n\n } catch (UnirestException e) {\n e.printStackTrace();\n }\n\n return volumes;\n }", "public void getRemoteItems() {\n url = getAllItemsOrderedByCategory;\n params = new HashMap<>();\n params.put(param_securitykey, param_securitykey);\n\n if (ApiHelper.checkInternet(mContext)) {\n mApiHelper.getItems(mIRestApiCallBack, true, url, params);\n } else {\n //Toast.makeText(mContext, mContext.getString(R.string.noInternetConnection), Toast.LENGTH_LONG).show();\n mIRestApiCallBack.onNoInternet();\n CacheApi cacheApi = loadCacheData(url, params);\n mSqliteCallBack.onDBDataObjectLoaded(cacheApi);\n }\n\n }", "@Override\n public void doGet(HttpServletRequest request, HttpServletResponse response) {\n System.out.println(\"[Servlet] GET request /list\");\n\n response.setContentType(EventServiceDriver.APP_TYPE);\n response.setStatus(HttpURLConnection.HTTP_BAD_REQUEST);\n\n try {\n PrintWriter pw = response.getWriter();\n String responseBody = EventServiceDriver.eventList.toJsonArray().toString();\n\n response.setStatus(HttpURLConnection.HTTP_OK);\n pw.println(responseBody);\n }\n catch (IOException ignored) {}\n }", "public static void ObtenerDatosGustoFrutas(Context context) {\n\n queue = Volley.newRequestQueue(context);\n\n String url = \"http://161.35.14.188/Persuhabit/GustoFrutas\";//establece ruta al servidor para obtener los datos\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n try {\n JSONArray jsonArray = response.getJSONArray(\"data\");//\n\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n queue.add(jsonObjectRequest);\n }", "public void getClients(AsyncCallback<List<Client>> cb);", "public static void ObtenerDatosRecompensas(Context context) {\n\n queue = Volley.newRequestQueue(context);\n\n\n String url = \"http://161.35.14.188/Persuhabit/recompensas\";//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 String descrip = jsonObject.getString(\"descrip\");\n System.out.println(descrip);\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n queue.add(jsonObjectRequest);\n }", "public ArrayList<CompanyProtheus> requestCompanysProtheus() {\n\n // Local variables.\n CompanyProtheus[] companysProtheus;\n ArrayList<CompanyProtheus> listCompanysProtheus = new ArrayList<>();\n\n // Define url for request.\n urlPath = \"http://{ipServer}:{portServer}/REST/GET/JWSRUSERS/emp/{userCode}\";\n urlPath = urlPath.replace(\"{ipServer}\", ipServer);\n urlPath = urlPath.replace(\"{portServer}\", portServer);\n urlPath = urlPath.replace(\"{userCode}\", userProtheus.getCode());\n\n try {\n\n // Set URL for request.\n url = new URL(urlPath);\n\n // Set key for authorization basic\n authorizationBasic = \"Basic \" + Base64.encodeToString((userProtheus.getCode()+ \":\" + userProtheus.getPassword()).getBytes() , Base64.DEFAULT);\n\n // Open connection HTTP.\n httpConnection = (HttpURLConnection) url.openConnection();\n\n // set header for request.\n httpConnection.setRequestMethod(\"GET\");\n httpConnection.setRequestProperty(\"Content-type\", \"application/json\");\n httpConnection.setRequestProperty(\"Accept\", \"application/json\");\n httpConnection.setRequestProperty(\"Authorization\", authorizationBasic);\n httpConnection.setDoOutput(true);\n httpConnection.setDoInput(true);\n httpConnection.setConnectTimeout(5000);\n httpConnection.connect();\n\n // Get response.\n bufferedLine = \"\";\n bufferedReader = new BufferedReader(new InputStreamReader(url.openStream()));\n while ((bufferedLine = bufferedReader.readLine()) != null) {\n httpReturn.append(bufferedLine);\n }\n\n // Set userProtheus with json reponse.\n companysProtheus = (CompanyProtheus[]) new Gson().fromJson(httpReturn.toString(), CompanyProtheus[].class);\n listCompanysProtheus = new ArrayList<CompanyProtheus>(Arrays.asList(companysProtheus));\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (ProtocolException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return listCompanysProtheus;\n\n }", "private void getNewsList() {\n // While the app fetched data we are displaying a progress dialog\n\n if (isOnline(mContext)) {\n showProgressDialog();\n\n ApiInterface apiService = ApiRequest.getClient().create(ApiInterface.class);\n\n Call<News> call = apiService.loadNewsList();\n call.enqueue(new Callback<News>() {\n @Override\n public void onResponse(Call<News> call, retrofit2.Response<News> response) {\n dismissProgressDialog();\n\n news.setTitle(response.body().getTitle());\n\n newsList.addAll(response.body().getRows());\n showList();\n ActionBar actionBar = getActionBar();\n actionBar.setDisplayHomeAsUpEnabled(true);\n actionBar.setDisplayShowHomeEnabled(false);\n actionBar.setDisplayShowTitleEnabled(true);\n actionBar.setTitle(news.getTitle());\n actionBar.setDisplayUseLogoEnabled(false);\n }\n\n @Override\n public void onFailure(Call<News> call, Throwable t) {\n dismissProgressDialog();\n displayMessage(t.getMessage());\n setTextMessage();\n\n }\n });\n } else {\n\n displayMessage(getString(R.string.no_network));\n setTextMessage();\n }\n\n }", "public void getGameList() {\n try {\n write(\"get gamelist\");\n } catch (IOException e) {\n System.out.println(\"No connecting with server:getGameList\");\n }\n }", "private void getData(){\n final ProgressDialog loading = ProgressDialog.show(this, \"Please wait...\",\"Fetching data...\",false,false);\n\n //Creating a json array request to get the json from our api\n JsonArrayRequest jsonArrayRequest = new JsonArrayRequest(DATA_URL,\n new Response.Listener<JSONArray>() {\n @Override\n public void onResponse(JSONArray response) {\n //Dismissing the progressdialog on response\n loading.dismiss();\n\n\n Log.d(\"Data\", String.valueOf(response));\n\n //Displaying our grid\n showGrid(response);\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n }\n );\n\n //Creating a request queue\n RequestQueue requestQueue = Volley.newRequestQueue(this);\n //Adding our request to the queue\n requestQueue.add(jsonArrayRequest);\n }", "private void refreshList() {\n\t\t\t\tlist.clear();\n\t\t\t\tGetChildrenBuilder childrenBuilder = client.getChildren();\n\t\t\t\ttry {\n\t\t\t\t\tList<String> listdir = childrenBuilder.forPath(servicezoopath);\n\t\t\t\t\tfor (String string : listdir) {\n\t\t\t\t\t\tbyte[] data = client.getData().forPath(servicezoopath + \"/\" + string);\n\t\t\t\t\t\tlist.add(new String(data));\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "public static void ObtenerCuestionario_Nutricion(Context context) {\n\n queue = Volley.newRequestQueue(context);\n\n String url = \"http://161.35.14.188/Persuhabit/CuestionarioNutri\";//establece ruta al servidor para obtener los datos\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n try {\n JSONArray jsonArray = response.getJSONArray(\"data\");//\n\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n queue.add(jsonObjectRequest);\n }", "public static void ObtenerDatosDetalleReg(Context context) {\n\n queue = Volley.newRequestQueue(context);\n\n String url = \"http://161.35.14.188/Persuhabit/DetalleReg\";//establece ruta al servidor para obtener los datos\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n try {\n JSONArray jsonArray = response.getJSONArray(\"data\");//\n\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n queue.add(jsonObjectRequest);\n }", "public static String getAll() {\n Result r = new Result();\n int status = 0;\n if((status = doGetList(r)) != 200) return \"Error from server \"+ status;\n return r.getValue();\n }", "public static void ObtenerDatosUsuarios(Context context) {\n\n queue = Volley.newRequestQueue(context);\n\n String url = \"http://161.35.14.188/Persuhabit/usuarios\";//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 }", "private void getData() {\n\t\tif (ultimoItem == 2)\n\t\t\taa.clear();\n\t\tString result = \"\";\n\t\ttry {\n\t\t\tStringBuilder url = new StringBuilder(URL_BOOKS);\n\t\t\tHttpGet get = new HttpGet(url.toString());\n\t\t\tHttpResponse r = client.execute(get);\n\t\t\tint status = r.getStatusLine().getStatusCode();\n\t\t\tif (status == 200) {\n\t\t\t\tHttpEntity e = r.getEntity();\n\t\t\t\tInputStream webs = e.getContent();\n\t\t\t\ttry {\n\t\t\t\t\tBufferedReader reader = new BufferedReader(\n\t\t\t\t\t\t\tnew InputStreamReader(webs, \"iso-8859-1\"), 8);\n\t\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\t\tString line = null;\n\t\t\t\t\twhile ((line = reader.readLine()) != null) {\n\t\t\t\t\t\tsb.append(line + \"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\twebs.close();\n\t\t\t\t\tresult = sb.toString();\n\t\t\t\t\tJSONArray jArray = new JSONArray(result);\n\t\t\t\t\tif (jArray.length() == 0) {\n\t\t\t\t\t\tvalorUltimo = 1;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tfor (int i = 0; i < jArray.length(); i++) {\n\t\t\t\t\t\tJSONObject json_data = jArray.getJSONObject(i);\n\t\t\t\t\t\tBooks resultRow = new Books();\n\t\t\t\t\t\tString creado = json_data.getString(\"created_at\");\n\t\t\t\t\t\tresultRow.id = json_data.getString(\"id\");\n\t\t\t\t\t\tresultRow.title = json_data.getString(\"title\");\n\t\t\t\t\t\tresultRow.author = json_data.getString(\"author\");\n\t\t\t\t\t\tresultRow.publisher = json_data.getString(\"publisher\");\n\t\t\t\t\t\tresultRow.additional_info = json_data\n\t\t\t\t\t\t\t\t.getString(\"additional_info\");\n\t\t\t\t\t\tresultRow.contact_info = json_data\n\t\t\t\t\t\t\t\t.getString(\"contact_info\");\n\t\t\t\t\t\tresultRow.offer_type = json_data\n\t\t\t\t\t\t\t\t.getString(\"offer_type\");\n\t\t\t\t\t\tresultRow.reply_count = json_data\n\t\t\t\t\t\t\t\t.getString(\"reply_count\");\n\t\t\t\t\t\tresultRow.price = json_data.getString(\"price\");\n\t\t\t\t\t\tfechaformato = new String[jArray.length()];\n\t\t\t\t\t\tfechaformato[i] = creado;\n\t\t\t\t\t\tString eventTime = new String(creado);\n\t\t\t\t\t\tString currentTime = new String(SuperTiempo);\n\t\t\t\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\n\t\t\t\t\t\t\t\t\"yyyy-MM-dd'T'hh:mm:ss.SSS'Z'\");\n\t\t\t\t\t\tDate eventDate = sdf.parse(eventTime);\n\t\t\t\t\t\tDate currentDate = sdf.parse(currentTime);\n\t\t\t\t\t\tlong eventTimelong = eventDate.getTime();\n\t\t\t\t\t\tlong currentTimelong = currentDate.getTime();\n\t\t\t\t\t\tlong diff = currentTimelong - eventTimelong;\n\t\t\t\t\t\tlong segundoslong = diff / 1000;\n\t\t\t\t\t\tlong minutoslong = diff / 60000; // 60 por 1000\n\t\t\t\t\t\tlong horaslong = diff / 3600000; // 60 por 60 por 1000\n\t\t\t\t\t\tlong diaslong = horaslong / 24;\n\t\t\t\t\t\tlong meseslong = diaslong / 31;\n\t\t\t\t\t\tlong añolong = meseslong / 12;\n\t\t\t\t\t\tif (añolong == 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + añolong + \" año \";\n\t\t\t\t\t\telse if (añolong > 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + añolong + \" años \";\n\t\t\t\t\t\telse if (meseslong == 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + meseslong + \" mes \";\n\t\t\t\t\t\telse if (meseslong > 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + meseslong + \" meses \";\n\t\t\t\t\t\telse if (diaslong == 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + diaslong + \" día \";\n\t\t\t\t\t\telse if (diaslong > 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + diaslong + \" días \";\n\t\t\t\t\t\telse if (horaslong == 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + horaslong + \" hora \";\n\t\t\t\t\t\telse if (horaslong > 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + horaslong + \" horas \";\n\t\t\t\t\t\telse if (minutoslong == 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + minutoslong + \" minuto \";\n\t\t\t\t\t\telse if (minutoslong > 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + minutoslong + \" minutos \";\n\t\t\t\t\t\telse if (segundoslong == 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + segundoslong + \" segundo \";\n\t\t\t\t\t\telse if (segundoslong > 1)\n\t\t\t\t\t\t\thoraAgo = \"hace \" + segundoslong + \" segundos \";\n\t\t\t\t\t\telse if (segundoslong == 0)\n\t\t\t\t\t\t\thoraAgo = \"justo ahora\";\n\t\t\t\t\t\tresultRow.created_at = horaAgo;\n\t\t\t\t\t\tJSONObject usuarios = json_data.getJSONObject(\"owner\");\n\t\t\t\t\t\tresultRow.owner_name = usuarios.getString(\"name\");\n\t\t\t\t\t\tJSONObject grupos = json_data.getJSONObject(\"group\");\n\t\t\t\t\t\tresultRow.group_name = grupos.getString(\"name\");\n\t\t\t\t\t\tresultRow.group_id = grupos.getString(\"id\");\n\t\t\t\t\t\tJSONObject owner = json_data.getJSONObject(\"owner\");\n\t\t\t\t\t\tJSONObject profile_pic = owner\n\t\t\t\t\t\t\t\t.getJSONObject(\"profile_pic\");\n\t\t\t\t\t\tresultRow.thumbnail_url = profile_pic\n\t\t\t\t\t\t\t\t.getString(\"thumbnail_url\");\n\t\t\t\t\t\tarrayBooks.add(resultRow);\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\tLog.e(\"log_tag\",\n\t\t\t\t\t\t\t\"Error convirtiendo el resultado\" + e1.toString());\n\t\t\t\t}\n\t\t\t\tmyListView.setAdapter(aa);\n\t\t\t\tif (ultimoItem == 1) {\n\t\t\t\t\tmyListView.setSelection(superTotal);\n\t\t\t\t\tnuevo = nuevo + superTotal;\n\t\t\t\t}\n\t\t\t\tultimoItem = 0;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public ArrayList<Person> getAllFromServer() throws IOException, JSONException {\n\t\tArrayList<Person> personsFromSrv = new ArrayList<Person>();\n\t\t\n\t\tURL url = new URL(\"https://jsonplaceholder.typicode.com/users\");\n\t\tHttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t\tInputStream is = conn.getInputStream();\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(is));\n\t\tString line;\n\t\tStringBuilder jsonBuilder = new StringBuilder();\n\t\tJSONArray jsonArray = null;\n\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\tjsonBuilder.append(line);\n\t\t}\n\t\tString json = jsonBuilder.toString();\n\t\tjson = json.replace(\"\\n\", \"\").replace(\"\\r\", \"\");\n\t\tSystem.out.println(json);\n\t\ttry {\n\t\t\tjsonArray = new JSONArray(json);\n\t\t} catch (JSONException e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tfor (int i = 0; i < jsonArray.length(); i++) {\n\t\t\tJSONObject person = jsonArray.getJSONObject(i);\n\t\t\tPerson p = personMapper.convertFromJSONObjectToPersonObject(person);\n\t\t\tpersonsFromSrv.add(p);\n\t\t}\n\t\treturn personsFromSrv;\n\t}", "private void buscarLista(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t}", "public static void ObtenerCanjeFi(Context context) {\n\n queue = Volley.newRequestQueue(context);\n\n String url = \"http://161.35.14.188/Persuhabit/CanjeFi\";//establece ruta al servidor para obtener los datos\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n try {\n JSONArray jsonArray = response.getJSONArray(\"data\");//\n\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n queue.add(jsonObjectRequest);\n }", "public void doGet(HttpServletRequest request, HttpServletResponse response) {\n\t\tList<Singer> singers = new ArrayList<>();\n\t\tsingers = serviceSinger.listar();\n\t\ttry {\n\t\t\tPrintWriter out = response.getWriter();\n\t\t\tfor(Singer singer : singers) {\n\t\t\t\tout.println(singer.getId() + \" || \" + singer.getFirst_name() + \" || \" \n\t\t\t\t\t\t+ singer.getLast_name() + \" || \" + singer.getBirth_date());\n\t\t\t}\n\t\t\tout.close();\n\t\t\t\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "void retrieveBrokerList() {\n java.util.logging.Logger.getLogger(TAG).log(Level.INFO, \"Start: retrieveBrokerList()\");\n // request the list to the cloud\n // parse the response and add brokers to \"brokers\"\n NetworkThread thread = new NetworkThread();\n thread.start();\n try {\n thread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n java.util.logging.Logger.getLogger(TAG).log(Level.INFO, \"Finish: retrieveBrokerList()\");\n }", "public void requestServerData() throws IOException {\n Iterator it = gameServers.entrySet().iterator();\n while (it.hasNext()) {\n Map.Entry<InetSocketAddress, GameServer> pair = (Map.Entry) it.next();\n pair.getValue().requestAll();\n }\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {\n //Setting up response\n response.setContentType(\"application/json\");\n response.setCharacterEncoding(\"UTF-8\");\n response.addHeader(\"Access-Control-Allow-Origin\", \"*\");\n PrintWriter out = response.getWriter();\n\n //Check if data is cached\n if(isCached) {\n out.print(convertToJSON(newsItems));\n out.flush();\n }\n //Otherwise scrape data\n else {\n //Scrape data from Time.com and build NewsItem list\n scrapeUrl();\n //Sort each NewsItem by its corresponding articles published time\n newsItems.sort(Comparator.comparing(NewsItem::getPublishedDate));\n //Reverse list to have the most recent NewsItem first\n Collections.reverse(newsItems);\n //Set flag for next request to use cached data\n isCached = true;\n out.print(convertToJSON(newsItems));\n out.flush();\n }\n }", "@Override\r\n\tpublic void getRequest(Request request, Response response) {\r\n\t\tlistUsers(request, response);\r\n\t}", "Rsp.RequestFromSelf getRequests(int index);", "public List<T> showAllClients();", "protected void fetch() {\n HttpClient client = new HttpClient();\n client.getHostConfiguration().setHost(HOST, PORT, SCHEME);\n\n List<String> prefectures = getCodes(client, PATH_PREF, \"pref\");\n List<String> categories = getCodes(client, PATH_CTG, \"category_s\");\n\n // This is a workaround for the gnavi API.\n // Gnavi API only allows max 1000 records for output.\n // Therefore, we divide records into smaller pieces\n // by prefectures and categories.\n for (String prefecture: prefectures) {\n for (String category: categories) {\n logger.debug(\"Prefecture: {}\", prefecture);\n logger.debug(\"Category: {}\", category);\n getVenues(client, prefecture, category, 1);\n }\n }\n }", "private void getVideos() {\n\n StringRequest videosRequest = new StringRequest(VIDEOS_URL+query, new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n //parse data from webservice to get Contracts as Java object\n Example videos = new Gson().fromJson(response, Example.class);\n\n setAdapter(videos.getItems());\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"Videos\", \"Error\");\n }\n });\n\n Volley.newRequestQueue(this).add(videosRequest);\n }", "public void requestWishList() {\n if (!hasInternetConnection()) {\n PromeetsDialog.show(this, getString(R.string.no_internet));\n } else {\n UserPOJO userPOJO = (UserPOJO) PromeetsUtils.getUserData(PromeetsPreferenceUtil.USER_OBJECT_KEY, UserPOJO.class);\n if (userPOJO == null) finish();\n String[] key = {Constant.USERID, Constant.PAGENUMBER};\n String[] value = {userPOJO.id + \"\", page + \"\"};\n\n PromeetsDialog.showProgress(this);\n HashMap<String, String> header = new HashMap<>();\n header.put(\"ptimestamp\", ServiceHeaderGeneratorUtil.getInstance().getPTimeStamp());\n header.put(\"promeetsT\", ServiceHeaderGeneratorUtil.getInstance().getPromeetsTHeader(Constant.FETCH_MY_WISH_LIST));\n header.put(\"accessToken\", ServiceHeaderGeneratorUtil.getInstance().getAccessToken());\n header.put(\"API_VERSION\", Utility.getVersionCode());\n new GenericServiceHandler(Constant.ServiceType.WISH_LIST, this, PromeetsUtils.buildURL(Constant.FETCH_MY_WISH_LIST, key, value), null, header, IServiceResponseHandler.GET, false, \"Please wait!\", \"Processing..\").execute();\n }\n }", "public void reqlist()\n\t{\n\t\tNameValueSet.Builder value = NameValueSet.newBuilder();\n\t\tvalue.setName(\"ReqCourseList_Name\");\n\t\tvalue.setValue(\"ReqCourseList_value\");\n\t\t\n\t\tJobDesc.Builder desc = JobDesc.newBuilder();\n\t\tdesc.setNameSpace(\"ReqCourseList_namespace\");\n\t\tdesc.setJobId(\"Zero\");\n\t\tdesc.setOwnerId(0);\n\t\tdesc.setStatus(JobCode.JOBUNKNOWN);\n\t\tdesc.setOptions(value.build());\n\t\t\n\t\tJobOperation.Builder j = eye.Comm.JobOperation.newBuilder();\n\t\tj.setAction(JobAction.ADDJOB);\n\t\tj.setJobId(\"Zero\");\n\t\tj.setData( desc.build());\n\n\t\t\n\t\tGetCourse.Builder gb=eye.Comm.GetCourse.newBuilder();\n\t\tgb.setCourseId(-1);\n\t\tRequestList.Builder sb= eye.Comm.RequestList.newBuilder();\n\t\t sb.addCourseList(gb.build());\n\t\t \n\n\t\t// Payload containing data\n\t\tRequest.Builder r = Request.newBuilder();\n\t\teye.Comm.Payload.Builder p = Payload.newBuilder();\n\t\tp.setReqList(sb.build());\n\t\tp.setJobOp(j.build());\n\t\tr.setBody(p.build());\n\n\t\t// header with routing info\n\t\teye.Comm.Header.Builder h = Header.newBuilder();\n\t\th.setOriginator(\"client\");\n\t\th.setTag(\"ReqCourseList\");\n\t\th.setTime(System.currentTimeMillis());\n\t\th.setRoutingId(eye.Comm.Header.Routing.JOBS);\n\t\tr.setHeader(h.build());\n\n\t\teye.Comm.Request req = r.build();\n\n\t\ttry {\n\t\t\tcomm.sendMessage(req);\n\t\t} catch (Exception e) {\n\t\t\tlogger.warn(\"Unable to deliver message, queuing\");\n\t\t}\n\t\t\n\t}", "public String LIST(){\n String nameList = \"\";\n Enumeration keys = this.clientData.keys();\n while(keys.hasMoreElements()){\n nameList += keys.nextElement() + \" \";\n }\n return \"OK \" + nameList;\n }", "public static void ObtenerDatosMensajes_Persuasivos(Context context) {\n\n queue = Volley.newRequestQueue(context);\n\n String url = \"http://161.35.14.188/Persuhabit/MsgPersuasivo\";//establece ruta al servidor para obtener los datos\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n try {\n JSONArray jsonArray = response.getJSONArray(\"data\");//\n\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n queue.add(jsonObjectRequest);\n }", "public void getRequest() throws IOException {\n PrintWriter Pout = new PrintWriter(socket.getOutputStream(), true);\n //Creates a BufferedReader that contains the server response\n BufferedReader Bin = new BufferedReader(new InputStreamReader(socket.getInputStream(), StandardCharsets.UTF_8));\n\n Pout.println(\"GET / HTTP/1.1\");\n Pout.println(\"Host: \" + socket.getInetAddress().getHostName());\n Pout.println(\"Cache-Control: max-age=3, must-revalidate\");\n Pout.println(\"Content-Type: text/html; charset=UTF-8\");\n Pout.println(\"\");\n Pout.flush();\n\n String line;\n String pattern = \"[^\\\\/]+(.jpg|.gif|.png)+\";\n while ((line = Bin.readLine()) != null) {\n Matcher matcher = Pattern.compile(pattern).matcher(line);\n if (matcher.find()) {\n imageList.add(matcher.group());\n }\n System.out.println(line);\n }\n Bin.close();\n Pout.close();\n socket.close();\n }", "private void list() throws JSONException, InterruptedException {\r\n\t /**Database Manager Object used to access mlab.com*/\r\n db.setDataBaseDestination(cDatabase, null, true);\r\n db.accessDatabase();\r\n MongoCollection<Document> col = db.getEntireDatabaseResults();\r\n \r\n // iterator to go through clubs in database\r\n Iterable<Document> iter;\r\n iter = col.find();\r\n \r\n // ArrayList of clubs names \r\n ArrayList<String> clubs = new ArrayList<>();\r\n \r\n // add names to list\r\n for (Document doc : iter) {\r\n JSONObject profile = new JSONObject(doc);\r\n clubs.add(profile.get(cName).toString());\r\n }\r\n \r\n Collections.sort(clubs);\r\n \r\n for (String name : clubs)\r\n \t logger.log(Level.INFO, name);\r\n \r\n displayOpen();\r\n }", "@Override\n public void run() {\n HttpsURLConnection httpConn = null;\n\n // Read text input stream.\n InputStreamReader isReader = null;\n\n // Read text into buffer.\n BufferedReader bufReader = null;\n\n // Save server response text.\n StringBuffer readTextBuf = new StringBuffer();\n\n try {\n // Create a URL object use page url.\n URL url = new URL(reqUrl + \"?\" + reqParams);\n\n // Open http connection to web server.\n httpConn = (HttpsURLConnection) url.openConnection();\n\n // Set http request method to get.\n httpConn.setRequestMethod(\"GET\");\n httpConn.setRequestProperty(\"User-Agent\", \"\");\n httpConn.setRequestProperty(\"Content-Type\", \"application/json\");\n httpConn.setRequestProperty(\"Accept\", \"application/json\");\n\n httpConn.setDoInput(true);\n\n // Set connection timeout and read timeout value.\n httpConn.setConnectTimeout(10000);\n httpConn.setReadTimeout(10000);\n int statusCode = httpConn.getResponseCode();\n\n InputStream is = httpConn.getInputStream();\n InputStreamReader isr = new InputStreamReader(is);\n BufferedReader br = new BufferedReader(isr);\n\n String inputLine;\n StringBuilder sb = new StringBuilder();\n\n while ((inputLine = br.readLine()) != null) {\n sb.append(inputLine);\n }\n String result = sb.toString();\n DailyWeather dailyWeather = DailyWeather.getObjectFromString(result);\n if (dailyWeather != null) {\n listDaily[index] =dailyWeather;\n }\n\n br.close();\n httpConn.disconnect();\n\n } catch (MalformedURLException ex) {\n Log.e(LOG_TAG, ex.getMessage(), ex);\n } catch (Exception ex) {\n Log.e(LOG_TAG, ex.getMessage(), ex);\n ex.printStackTrace();\n\n } finally {\n try {\n if (getCount.incrementAndGet()==8){\n if (subscribe != null) {\n subscribe.onGetComplete();\n getCount.set(0);\n }\n }\n if (bufReader != null) {\n bufReader.close();\n bufReader = null;\n }\n if (isReader != null) {\n isReader.close();\n isReader = null;\n }\n if (httpConn != null) {\n httpConn.disconnect();\n httpConn = null;\n }\n } catch (IOException ex) {\n }\n\n }\n }", "public List<Clients> getallClients();", "public void run() {\n\t\t\t\tHttpURLConnection connection = null;\r\n\t\t\t\tStringBuilder response = new StringBuilder();\r\n\t\t\t\ttry{\r\n\t\t\t\t\tURL url = new URL(address);\r\n\t\t\t\t\tconnection = (HttpURLConnection) url.openConnection();\r\n\t\t\t\t\tconnection.setRequestMethod(\"GET\");\r\n\t\t\t\t\tconnection.setConnectTimeout(8000);\r\n\t\t\t\t\tconnection.setReadTimeout(8000);\r\n\t\t\t\t\tconnection.setDoInput(true);\r\n\t\t\t\t\t//connection.setDoOutput(true);\r\n\t\t\t\t\tint responseCode = connection.getResponseCode();\r\n\t\t\t\t\tLog.d(\"HttpUtil\", String.valueOf(responseCode));\r\n\t\t\t\t\tif(responseCode != 200){\r\n\t\t\t\t\t\tLog.d(\"HttpUtil\", \"Get Fail\");\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tInputStream in = connection.getInputStream();\r\n\t\t\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(in));\r\n\t\t\t\t\t\tString line;\r\n\t\t\t\t\t\twhile((line = reader.readLine()) != null){\r\n\t\t\t\t\t\t\tresponse.append(line);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tLog.d(\"HttpUtil\", \"Get Success\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(listener != null){\r\n\t\t\t\t\t\tlistener.onFinish(response.toString());\r\n\t\t\t\t\t}\r\n\t\t\t\t}catch(Exception e){\r\n\t\t\t\t\tif(listener != null){\r\n\t\t\t\t\t\tlistener.onError(e);\r\n\t\t\t\t\t}\r\n\t\t\t\t}finally{\r\n\t\t\t\t\tif(connection != null){\r\n\t\t\t\t\t\tconnection.disconnect();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}", "public void fetchDatafromServer(String type) {\n final Home baseHomeActivity = (Home) getActivity();\r\n\r\n JsonArrayRequest jsonArrayRequest =\r\n new JsonArrayRequest(\r\n Request.Method.GET, serverURL + \"/\" + type + \"/\", null, this, this) {\r\n @Override\r\n public Map<String, String> getHeaders() throws AuthFailureError {\r\n HashMap<String, String> headers = new HashMap<String, String>();\r\n headers.put(\"Authorization\", \"Token \" + baseHomeActivity.mToken);\r\n return headers;\r\n }\r\n };\r\n baseHomeActivity.mQueue.add(jsonArrayRequest);\r\n }", "public void getDataFromServer() {\n\n //can't start new request if old one is not finish\n if (isGetingDataFromMSSQL) {\n return;\n }\n\n // clear list before load elements\n listOverView.clear();\n\n // change var for true if start getting data - can't start new request if old one is not finish\n isGetingDataFromMSSQL = true;\n\n // show progress bar\n progressBarInOverViewWait.setVisibility(View.VISIBLE);\n\n if (connectionMSSQL == null) { // if is NO connection\n Log.d(TAG, \"getDataFromServer: connection NOT CONNECTED\");\n Toast.makeText(this, \"Brak połączenia z bazą danych\", Toast.LENGTH_SHORT).show();\n } else { // if connection is CONNECTED\n Log.d(TAG, \"getDataFromServer: connection CONNECTED\");\n\n new Thread(new Runnable() { // NOT in UI thread\n @Override\n public void run() {\n\n // execute query and get result\n try {\n\n // set number of rows taken from MSSQL and show in list view\n int numberOFRowsToShow = 20;\n\n Statement statement = connectionMSSQL.createStatement();\n //ResultSet result = statement.executeQuery(\"SELECT indx WHERE userName='Jan.kowalski'\"); // query for indx,\n //ResultSet result = statement.executeQuery(\"SELECT indx,dateTime,description,picture FROM dbo.androidTest\"); // query to MS SQL for all rows\n ResultSet result = statement.executeQuery(\"SELECT TOP \" + numberOFRowsToShow + \" indx,dateTime,description,miniature FROM dbo.androidTest ORDER BY indx DESC\"); // query to MS SQL for last numberOFRowsToShow rows\n\n // put data to array\n for (int i = 0; i < numberOFRowsToShow; i++) { // number of rows to show - can be more than is in DB - won't be crash - olny thow exception\n result.next(); // start from next line - must be because first line has no data\n String indxFromResult = \"\" + result.getInt(\"indx\"); // take indx from MS SQL\n String dateTimeFromResult = result.getString(\"dateTime\"); // take dateTime from MS SQL\n String descriptionFromResult = result.getString(\"description\"); // take description from MS SQL\n\n // get picture miniature\n byte[] bArrayMiniatureTakenFromMSSQL = result.getBytes(\"miniature\"); // take picture miniature from MS SQL\n // set picture miniature\n Bitmap bitmapFromResultMiniature = null;\n if (bArrayMiniatureTakenFromMSSQL != null) {\n bitmapFromResultMiniature = BitmapFactory.decodeByteArray(bArrayMiniatureTakenFromMSSQL, 0, bArrayMiniatureTakenFromMSSQL.length); // byte[] into bitmap (miniature)\n }\n\n // add element to list view\n listOverView.add(new OverViewItem(bitmapFromResultMiniature, indxFromResult, dateTimeFromResult, descriptionFromResult));\n\n //result\n Log.d(TAG, \"getDataFromServer: RESULT: \" + \"indxFromResult: \" + indxFromResult + \", dateTimeFromResult: \" + dateTimeFromResult + \", descriptionFromResult: \" + descriptionFromResult + \", number of row: \" + i);\n\n Log.d(TAG, \"getDataFromServer: listOverView.size(): \" + listOverView.size());\n }\n\n } catch (SQLException e) { // cath when is set numberOFRowsToShow more than exist - can be - no crash\n Log.d(TAG, \"onCreate: SQLException: \" + e);\n }\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() { //in UI thread\n\n // reverse list if need\n //Collections.reverse(listOverView);\n\n // notyfi adapter\n adapterOverView.notifyDataSetChanged();\n\n // hide progress bar\n progressBarInOverViewWait.setVisibility(View.GONE);\n\n // change var for false if end getting data - can't start new request if old one is not finish\n isGetingDataFromMSSQL = false;\n }\n });\n }\n }).start();\n }\n }", "@Override\n\tpublic void selectList(RestRequest request, RestResponse response) throws Exception {\n\t\t\n\t}", "public List<String> getAllData(){\n\t}", "private void getItemList(){\n sendPacket(Item_stocksTableAccess.getConnection().getItemList());\n \n }", "java.util.List<online_info>\n getInfoList();", "private void requestRoomList() {\n String get_list_data = Network.GET_CROUP_LIST_DATA;\n\n JSONObject params = new JSONObject();\n\n JsonObjectRequest request = new JsonObjectRequest(\n Request.Method.POST, AppConfig.GROUP_LIST_URL, params,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n try {\n\n boolean error = response.getBoolean(Network.TAG_ERROR);\n\n\n if (!error) {\n\n final List<String[]> roomList = new LinkedList<>();\n\n JSONArray rooms = response.getJSONArray(Network.TAG_ROOMS);\n\n for (int i = 0; i < rooms.length(); i++) {\n\n JSONObject room = rooms.getJSONObject(i);\n\n if (room.has(Network.TAG_NAME) && !room.isNull(Network.TAG_NAME)) {\n\n Room roomObject = new Room();\n\n roomObject.setId(room.getString(Network.TAG_USER_ID));\n roomObject.setName(room.getString(Network.TAG_NAME));\n\n mRoomList.add(roomObject);\n\n String count = String.valueOf(room.getInt(Network.TAG_COUNT));\n roomList.add(new String[]{room.getString(Network.TAG_NAME), count});\n }\n\n }\n\n mListView.setAdapter(new ArrayAdapter<String[]>(\n RoomListActivity.this,\n android.R.layout.simple_list_item_2,\n android.R.id.text1,\n roomList) {\n\n\n @Override\n public View getView(int position, View convertView, ViewGroup parent) {\n\n // Must always return just a View.\n View view = super.getView(position, convertView, parent);\n\n // If you look at the android.R.layout.simple_list_item_2 source, you'll see\n // it's a TwoLineListItem with 2 TextViews - text1 and text2.\n //TwoLineListItem listItem = (TwoLineListItem) view;\n String[] entry = roomList.get(position);\n TextView text1 = (TextView) view.findViewById(android.R.id.text1);\n TextView text2 = (TextView) view.findViewById(android.R.id.text2);\n text1.setText(entry[0]);\n text2.setText(getString(R.string.joined) + entry[1]);\n return view;\n }\n\n\n });\n\n mListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Intent joinIntent = new Intent(RoomListActivity.this, JoinGroupActivity.class);\n\n joinIntent.putExtra(AppConfig.EXTRA_ROOM_ID, mRoomList.get(position).getId());\n\n joinIntent.putExtra(AppConfig.EXTRA_ROOM_NAME, mRoomList.get(position).getName());\n startActivity(joinIntent);\n }\n });\n\n if (roomList.isEmpty()) {\n\n mEmptyList.setVisibility(View.VISIBLE);\n }else {\n mEmptyList.setVisibility(View.GONE);\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 Log.e(TAG, \"LoginError:\" + error.getMessage());\n\n }\n });\n\n // Adding request to request queue\n VolleySingleton.getInstance().addToRequestQueue(request, get_list_data);\n }", "public static void ObtenerDatosEnvia_Msg(Context context) {\n\n queue = Volley.newRequestQueue(context);\n\n String url = \"http://161.35.14.188/Persuhabit/EnviaMsg\";//establece ruta al servidor para obtener los datos\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n try {\n JSONArray jsonArray = response.getJSONArray(\"data\");//\n\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n queue.add(jsonObjectRequest);\n }", "public List<TwitterDataExtract> GetData();", "public static void ObtenerDatosRegistro(Context context) {\n\n queue = Volley.newRequestQueue(context);\n\n String url = \"http://161.35.14.188/Persuhabit/registro\";//establece ruta al servidor para obtener los datos\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.GET, url, null, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n\n try {\n JSONArray jsonArray = response.getJSONArray(\"data\");//\n\n for (int i = 0; i < jsonArray.length(); i++) {\n JSONObject jsonObject = jsonArray.getJSONObject(i);\n\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n queue.add(jsonObjectRequest);\n }", "private static void listMovies(){\n\n\t\ttry{\n\t\t\tURL url = new URL(\"http://localhost:8080/listMovies\");\n\t\t\tString rawJSONList = getHTTPResponse(url);\n\t\t\tJSONArray JSONList = new JSONArray(rawJSONList);\n\t\t\tStringBuilder list = new StringBuilder();\n\t\t\t\n\t\t\tfor (int i=0 ; i<JSONList.length() ; i++){\n\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\tJSONObject temp = JSONList.getJSONObject(i);\n\t\t\t\tsb.append(temp.getInt(\"id\"));\n\t\t\t\tsb.append(\". \");\n\t\t\t\tsb.append(temp.getString(\"name\"));\n\t\t\t\tsb.append(\"\\n\");\n\t\t\t\t\n\t\t\t\tlist.append(sb.toString());\n\t\t\t}\n\t\t\tSystem.out.println(list.toString());\n\t\t}catch(Exception e){System.out.println(\"Error - wrong input or service down\");}\n\t\t\n\t}", "List<String> data();", "@Override\r\n\tpublic String listDeal() {\n\t\trequest.put(\"lineName\",lineName);\r\n\t\t\r\n\t\tList<HeadLine> dataList=null;\r\n\t\tPagerItem pagerItem=new PagerItem();\r\n\t\tpagerItem.parsePageNum(pageNum);\r\n\t\tpagerItem.parsePageSize(pageSize);\r\n\t\tLong count=0L;\r\n\t\tif(!SysFun.isNullOrEmpty(lineName))\r\n\t\t{\r\n\t\t\tcount=headLineService.countByName(lineName);\r\n\t\t\tpagerItem.changeRowCount(count);\r\n\t\t\tdataList=headLineService.pagerByName(lineName, pagerItem.getPageNum(), pagerItem.getPageSize());\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tcount=headLineService.count();\r\n\t\t\tpagerItem.changeRowCount(count);\r\n\t\t\tdataList=headLineService.pager(pagerItem.getPageNum(), pagerItem.getPageSize());\r\n\t\t}\r\n\t\tpagerItem.changeUrl(SysFun.generalUrl(requestURI, queryString));\r\n\t\t\r\n\t\trequest.put(\"DataList\", dataList);\r\n\t\trequest.put(\"pagerItem\", pagerItem);\r\n\t\t\r\n\t\treturn \"list\";\r\n\t}", "private void getBooks(){\n final ProgressDialog loading = ProgressDialog.show(this,\"Fetching Data\",\"Please wait...\",false,false);\n\n //Creating a rest adapter\n RestAdapter adapter = new RestAdapter.Builder()\n .setEndpoint(ROOT_URL)\n .build();\n\n //Creating an object of our api interface\n BooksAPI api = adapter.create(BooksAPI.class);\n\n //Defining the method\n api.getBooks(new Callback<List<Book>>() {\n @Override\n public void success(List<Book> list, Response response) {\n //Dismissing the loading progressbar\n loading.dismiss();\n Log.e(\"response\", response.getReason());\n //Storing the data in our list\n books = (ArrayList<Book>) list;\n lv.setAdapter(listAdapter);\n //Calling a method to show the list\n //showList();\n }\n\n @Override\n public void failure(RetrofitError error) {\n //you can handle the errors here\n Log.e(\"error\",error.getResponse().getReason());\n }\n });\n }", "public static void connectToServer(String baseUrl) {\n\n Retrofit retrofit = new Retrofit.Builder().baseUrl(baseUrl).addConverterFactory(GsonConverterFactory.create()).build();\n UPKService service = retrofit.create(UPKService.class);\n Call<UPKResponse> call = service.getData(\"1ITPdXilVjBOLG_rxaSxeWbK-esHrY8AX3pGvixAzDXo\", \"3\", \"\");\n call.enqueue(new Callback<UPKResponse>() {\n @Override\n public void onResponse(Call<UPKResponse> call, Response<UPKResponse> response) {\n /*\n HAKEEM: added an arraylist data field that will get populated here\n */\n Log.d(\"Success\", \"in there\");\n Log.d(\"YOOO\", \"POJO\" + response.body());\n UPKResponse upkResponse = response.body();\n mUPKList = upkResponse.getRows();\n// uPKReceyclerView.setLayoutManager(new LinearLayoutManager(MapsActivity_Hakeem.getView().getContext()));\n// UPKMapAdapter adapter = new UPKMapAdapter(mUPKList);\n// uPKReceyclerView.setAdapter(adapter);\n Log.d(\"Adapter\", \"adapter attached\");\n\n data = response.body().getRows();\n System.out.println(data);\n System.out.println(\"UPK DATA STREAM\");\n// childCareAdapter = new ChildCareAdapter(response.body());\n// childCareRecyclerView.setLayoutManager(new LinearLayoutManager(getContext()));\n// childCareRecyclerView.setAdapter(adapter);\n }\n\n @Override\n public void onFailure(Call<UPKResponse> call, Throwable t) {\n Log.d(TAG, \"Failed to connect\");\n }\n });\n }", "@GetMapping(\"/getRE\")\n\tpublic List<EnquiryDetails> getDataRE()\n\t{\n\t\tString url=\"http://localhost:8083/getclient/getalldatafor_re\";\n\t\tList<EnquiryDetails> list=rt.getForObject(url, List.class);\n\t\tSystem.out.println(list);\n\t\treturn list;\n\t}", "public List<Client> getAllClient();", "@Override\n\tprotected String doInBackground(Void... params) {\n\t\tHttpParams httpParams = new BasicHttpParams();\n\t\tHttpConnectionParams.setSoTimeout(httpParams, SOCKET_TIMEOUT);\n\t\tHttpConnectionParams.setConnectionTimeout(httpParams, CONNECTION_TIMEOUT);\n\n\t\tAbstractHttpClient client = HttpClientFactory.getInstance();\n\t\tclient.setParams(httpParams);\n\t\tString callUrl = PATH + \"?element=\"+name+\"&cid=\"+category.getId()+\"&qtty=\"+quantity;\n\t\t\n\t\tLog.i(\"Lists\", callUrl);\n\t\tHttpGet request = new HttpGet(callUrl);\n\n\t\ttry {\n\t\t\tHttpResponse response = client.execute(request);\n\n\t\t\tStatusLine status = response.getStatusLine();\n\t\t\tif (status.getStatusCode() != HttpStatus.SC_OK) {\n\t\t\t\texception = new IOException(\"Invalid response from server: \"\n\t\t\t\t\t\t+ status.toString());\n\t\t\t} else {\n\t\t\t\tHttpEntity entity = response.getEntity();\n\t\t\t\tInputStream inputStream = entity.getContent();\n\n\t\t\t\tByteArrayOutputStream content = new ByteArrayOutputStream();\n\n\t\t\t\t// Read response into a buffered stream\n\t\t\t\tint readBytes = 0;\n\t\t\t\tbyte[] sBuffer = new byte[BUFFER_SIZE];\n\t\t\t\twhile ((readBytes = inputStream.read(sBuffer)) != -1) {\n\t\t\t\t\tcontent.write(sBuffer, 0, readBytes);\n\t\t\t\t}\n\n\t\t\t\t// Return result from buffered stream\n\t\t\t\tString dataAsString = new String(content.toByteArray(), Charset.forName(\"ISO-8859-1\"));\n\n\n\t\t\t\tLog.d(\"Json\", dataAsString);\n\t\t\t\treturn dataAsString;\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\texception = e;\n\t\t}\n\t\treturn null;\n\t}", "@GET(\"/dev/gig/\")\n Call<List<GigListResp>> getGigList(@Header(\"authorization\") String auth);", "@GET\r\n\t@Produces(MediaType.APPLICATION_JSON)\r\n\tpublic List<CohabitRequestInfo> listAllCohabitRequests(){\r\n\t\t\r\n\t\tEntityManager em = getEntityManager();\r\n\t\tManageRequestService service = new ManageRequestService(em);\r\n\t\tList<CohabitRequest> cohabitRequests = service.viewAllRequests();\r\n\t\tList<CohabitRequestInfo> requests = CohabitRequestInfo.wrap(cohabitRequests);\r\n\t\tem.close();\r\n\t\t\r\n\t\treturn requests;\r\n\t}", "private void fetchData() {\n if (!isNetworkAvailable()){\n Toast.makeText(this, getString(R.string.no_internet_connection), Toast.LENGTH_SHORT).show();\n swipeRefreshLayout.setRefreshing(false);\n return;\n }\n\n apiInterface = ApiUtils.getApi();\n Call<List<Item>> call = apiInterface.getItems();\n call.enqueue(new Callback<List<Item>>() {\n @Override\n public void onResponse(Call<List<Item>> call, Response<List<Item>> response) {\n if (response.isSuccessful()){\n DatabaseController.getInstance(getApplicationContext()).clearDatabase();\n PicassoTools.clearCache(Picasso.with(getApplicationContext()));\n List<Item> items = response.body();\n for (Item item : items) {\n DatabaseController.getInstance(getApplicationContext()).addItem(item);\n// Log.d(TAG, \"add in list items \" + item.getId().toString());\n }\n updateUI();\n }else {\n Log.d(TAG, response.errorBody().toString());\n Toast.makeText(MainActivity.this, R.string.error, Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onFailure(Call<List<Item>> call, Throwable t) {\n Log.d(TAG, \"onFailure: \" + t.getMessage());\n swipeRefreshLayout.setRefreshing(false);\n }\n });\n }", "private void loadListView() {\n\t\tList<ClientData> list = new ArrayList<ClientData>();\n\t\ttry {\n\t\t\tlist = connector.get();\n\t\t\tlView.updateDataView(list);\n\t\t} catch (ClientException e) {\n\t\t\tlView.showErrorMessage(e);\n\t\t}\n\n\t}", "@Nullable\r\n public static List<JSONArray> retrieveProducts(final Context context, int offset, List<String> shopList)\r\n {\r\n List<JSONArray> content = new ArrayList<>();\r\n\r\n try\r\n {\r\n final SharedPreferencesManager sharedPreferencesManager = new SharedPreferencesManager(context);\r\n\r\n final boolean man = sharedPreferencesManager.retrieveUser().getMan();\r\n\r\n final List<RequestFuture<JSONArray>> futures = new ArrayList<>();\r\n\r\n // Metemos en content el resultado de cada uno\r\n for (int i = 0; i < shopList.size(); i++)\r\n {\r\n final String fixedURL = Utils.fixUrl(Properties.SERVER_URL + \":\" + Properties.SERVER_SPRING_PORT\r\n + \"/products/\" + shopList.get(i) + \"/\" + man + \"/\" + offset);\r\n\r\n Log.d(Properties.TAG, \"[REST_CLIENT_SINGLETON] Conectando con: \" + fixedURL\r\n + \" para traer los productos de hace \" + Integer.toString(offset) + \" dias\");\r\n\r\n futures.add(RequestFuture.<JSONArray>newFuture());\r\n\r\n // Creamos una peticion\r\n final JsonArrayRequest jsonObjReq = new JsonArrayRequest(Request.Method.GET\r\n , fixedURL\r\n , null\r\n , futures.get(i)\r\n , futures.get(i));\r\n\r\n // La mandamos a la cola de peticiones\r\n VolleySingleton.getInstance(context).addToRequestQueue(jsonObjReq);\r\n Log.d(Properties.TAG, \"[REST_CLIENT_SINGLETON] Petición (\" + shopList.get(i) + \") creada y enviada\");\r\n }\r\n\r\n for (int i = 0; i < shopList.size(); i++)\r\n {\r\n try\r\n {\r\n JSONArray response = futures.get(i).get(20, TimeUnit.SECONDS);\r\n\r\n Log.d(Properties.TAG, \"[REST_CLIENT_SINGLETON] Respuesta (\" + shopList.get(i) + \") recibida\");\r\n\r\n content.add(response);\r\n\r\n } catch (InterruptedException e) {\r\n ExceptionPrinter.printException(\"REST_CLIENT_SINGLETON\", e);\r\n\r\n return null;\r\n }\r\n }\r\n\r\n // Si content es vacio, es que han fallado todas las conexiones.\r\n if (content.isEmpty())\r\n {\r\n Log.d(Properties.TAG, \"[REST_CLIENT_SINGLETON] Todas las peticiones han fallado\");\r\n\r\n return null;\r\n }\r\n\r\n } catch(Exception ex) {\r\n ExceptionPrinter.printException(\"REST_CIENT_SINGLETON\", ex);\r\n\r\n return null;\r\n }\r\n\r\n return content;\r\n }", "private void getData(){\n\n\n String url= URLS.BaseUrl+URLS.getAllAdsUrl+startIndex+\"/\"+endIndex;\n\n\n StringRequest request = new StringRequest(Request.Method.GET, url, new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n\n try {\n JSONArray rootArr= new JSONArray(response);\n\n\n\n\n\n } catch (JSONException e) {\n Constraints.MyToast(getActivity(),getString(R.string.errorParsing), Toast.LENGTH_SHORT);\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n String errorMsg =\"حدث خطأ,برجاء المحاولة مرة اخرى\" ;\n\n NetworkResponse response = error.networkResponse;\n if(response != null && response.data != null){\n errorMsg = new String(response.data);\n }\n\n Constraints.MyToast(getActivity(),errorMsg,Toast.LENGTH_SHORT);\n\n }\n });\n\n\n AppController.getInstance().addToRequestQueue(request);\n\n }", "Future<ListWorkRequestsResponse> listWorkRequests(\n ListWorkRequestsRequest request,\n AsyncHandler<ListWorkRequestsRequest, ListWorkRequestsResponse> handler);", "private void listar(HttpServletRequest request, HttpServletResponse response) throws SQLException {\n\t\t// TODO Auto-generated method stub\n\t\ttry {\n\t\t\t//pasamos un atributo en la redireccion con la lista que devuelve el metodo listarHabitaciones() del modelo\n\t\t\trequest.setAttribute(\"listaClientes\", modelo.listarClientes());//tipo (atributo,valor)\n\t\t\t\t\n\t\t\t//hacemos la redireccion a la vista en el servidor, NO en el cliente. Para no perder la lista que se pasa como atributo\n\t\t\trequest.getRequestDispatcher(\"/clientes/listaClientes.jsp\").forward(request, response);\n\t\t\t\t\n\t\t} catch (ServletException | IOException e) {\n\t\t\t\t\n\t\t\te.printStackTrace();\n\t\t\t\t\n\t\t}\n\t}", "@Override\n\t\t\t\t\tpublic void run() {\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tList<String> headers = readRequest(client);\n\t\t\t\t\t\t\tif (headers != null && headers.size() >= 1) {\n\t\t\t\t\t\t\t\tString requestURL = getRequestURL(headers.get(0));\n\t\t\t\t\t\t\t\tLog.d(TAG, requestURL);\n\n\t\t\t\t\t\t\t\tif (requestURL.startsWith(\"http://\")) {\n\n\t\t\t\t\t\t\t\t\t// HttpRequest request = new\n\t\t\t\t\t\t\t\t\t// BasicHttpRequest(\"GET\", requestURL);\n\n\t\t\t\t\t\t\t\t\tprocessHttpRequest(requestURL, client, headers);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tprocessFileRequest(requestURL, client, headers);\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} catch (IllegalStateException 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} catch (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\t}", "private void getData()\n {\n\n Gson gson = new GsonBuilder()\n .setLenient()\n .create();\n\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(WebAPIService.BASE_URL)\n .addConverterFactory(GsonConverterFactory.create(gson))\n .build();\n\n WebAPIService api = retrofit.create(WebAPIService.class);\n\n final Call<List<FoodItem>> call = api.getFoodData();\n\n call.enqueue(new Callback<List<FoodItem>>() {\n @Override\n public void onResponse(Call<List<FoodItem>> call, Response<List<FoodItem>> response) {\n\n foodList.clear();\n mainFoodList.clear();\n\n foodList.addAll(response.body());\n mainFoodList.addAll(response.body());\n\n foodListAdapter.notifyDataSetChanged();\n progressBar.setVisibility(View.GONE);\n swipeRefreshLayout.setRefreshing(false);\n }\n\n @Override\n public void onFailure(Call<List<FoodItem>> call, Throwable t) {\n Log.d(\"Retrofit err\" , t.getMessage());\n }\n });\n }", "public DesktopClient printItemList() {\n String uri = \"http://localhost:8080/api/items\";\n RestTemplate restTemplate = new RestTemplate();\n ResponseEntity<Item[]> result = restTemplate.getForEntity(uri, Item[].class);\n Item[] items = result.getBody();\n List<Item> itemList = new ArrayList<>();\n if (items != null) {\n itemList.addAll(Arrays.asList(items));\n\n for (Item item :\n itemList) {\n System.out.println(item.toString());\n }\n } else {\n System.out.println(\"Didn't get items.\");\n }\n\n return this;\n }", "@Override\n protected StringBuilder doInBackground(Void... voids) {\n try {\n URL url = new URL(\"https://api.nytimes.com/svc/books/v3/lists.json?\"+ \"list-name=\" + API_HARDCOVER_FICTION + \"&api-key=\" + API_KEY);\n HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();\n try {\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(httpURLConnection.getInputStream()));\n StringBuilder stringBuilder = new StringBuilder();\n String line;\n while((line = bufferedReader.readLine()) != null) {\n stringBuilder.append(line).append(\"\\n\");\n }\n bufferedReader.close();\n return stringBuilder;\n }\n finally {\n httpURLConnection.disconnect();\n }\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "java.util.List<pb4client.TransportRequest> \n getReqList();", "private void getData(int option){\n String src;\n if(option == 0)\n src = \"connectDB.php\";\n else\n src = \"sortByRate.php\";\n\n //Creating a string request\n StringRequest stringRequest = new StringRequest(\"http://140.116.82.52/iBeaconNavigationApp/\" + src,\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n JSONObject j;\n try {\n //Parsing the fetched Json String to JSON Object\n j = new JSONObject(response);\n\n //Storing the Array of JSON String to our JSON Array\n result = j.getJSONArray(\"result\");\n\n //Calling method getStudents to get the students from the JSON Array\n getDatas(result);\n setList();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n\n }\n });\n\n //Creating a request queue\n RequestQueue requestQueue = Volley.newRequestQueue(getActivity());\n\n //Adding request to the queue\n requestQueue.add(stringRequest);\n }" ]
[ "0.6996128", "0.68806434", "0.68802446", "0.6859786", "0.67214596", "0.65951973", "0.64411354", "0.64369315", "0.63755834", "0.63571113", "0.62790924", "0.62724084", "0.6251636", "0.620998", "0.6150496", "0.6143791", "0.61211115", "0.6116631", "0.61029196", "0.6082218", "0.6071427", "0.6048067", "0.6042921", "0.6037664", "0.6022133", "0.6014823", "0.6013446", "0.6002979", "0.5987068", "0.59753776", "0.5974709", "0.59492797", "0.5940519", "0.59370637", "0.59246695", "0.5920186", "0.591383", "0.58913416", "0.5880875", "0.58649594", "0.5859213", "0.5853107", "0.5852177", "0.5849681", "0.58403146", "0.5835482", "0.583534", "0.58288074", "0.5824508", "0.5812509", "0.5808819", "0.5798752", "0.5797251", "0.57903546", "0.57719505", "0.57665753", "0.5756315", "0.57518685", "0.57477355", "0.57474905", "0.5737121", "0.573572", "0.5733408", "0.5723182", "0.5721448", "0.5721427", "0.5716039", "0.57154197", "0.57126343", "0.5702771", "0.5695735", "0.5691448", "0.56895953", "0.5688931", "0.5688818", "0.5679831", "0.56787163", "0.5677838", "0.5659423", "0.5655502", "0.5647034", "0.5642316", "0.56375283", "0.5629214", "0.5628565", "0.5622402", "0.5622317", "0.56197935", "0.56155443", "0.5611305", "0.55992097", "0.55986446", "0.5594432", "0.55775523", "0.5572119", "0.5570034", "0.5569943", "0.55696297", "0.5559213", "0.5543654", "0.55407673" ]
0.0
-1
Returns the list of radios that are not in the database or that have been updated Making the method protected to test it
protected List<Radio> getNewUpdatedRadios(@NonNull final List<Radio> radios, @NonNull final List<Radio> dbRadios) { List<Radio> newOrUpdatedRadios = new ArrayList<Radio>(radios); // radios that have been retrieved from the BE, exist in the database but we don't know // their ID and the radio from the database HashMap<Radio, Radio> existingRadiosMap = new HashMap<Radio, Radio>(); List<Radio> updatedRadios = new ArrayList<Radio>(); for (Radio dbRadio : dbRadios) { Radio existingRadio = null; for (Radio radio : radios) { // if title and category are equal, we consider the radios equal if (radio.getTitle().equals(dbRadio.getTitle()) && radio.getGenre().equals (dbRadio.getGenre())) { existingRadio = radio; if(!(radio.getDescription().equals(dbRadio.getDescription()) && radio.getCategory().equals(dbRadio.getCategory()) && radio.getImageUrl().equals(dbRadio.getImageUrl()) && radio.getURL().equals(dbRadio.getURL()))){ Log.d(LOG_TAG, "radio: " + radio.toString()); Log.d(LOG_TAG, "db radio: " + dbRadio.toString()); updatedRadios.add(radio); } break; } } if (existingRadio != null) { existingRadiosMap.put(existingRadio, dbRadio); } } // if from the list of radios we remove all the radios that exist already // we get the list of new radios newOrUpdatedRadios.removeAll(existingRadiosMap.keySet()); //for every updated radio, update the id, is favorite and last play date // according to the value from the database // like this we don't loose the info that we saved in the DB // add the key set of the existing map to the list of new radios. for (Radio radio : updatedRadios) { Radio dbRadio = existingRadiosMap.get(radio); radio.setId(dbRadio.getId()); radio.setFavorite(dbRadio.isFavorite()); radio.setPlayedDate(dbRadio.getPlayedDate()); newOrUpdatedRadios.add(radio); } return newOrUpdatedRadios; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<Radio> getRadioList(){\n return this.radioList;\n }", "public List<Drawing> getChangedDrawings() {\n// Set<String> changedDrawingNames = new HashSet<String>();\n// for (Drawing drawing : _changedDrawings) {\n// changedDrawingNames.add(drawing.getName());\n// }\n return new ArrayList<Drawing>(_changedDrawings);\n }", "@Override\n\tpublic List<Rating> getAllRating() {\n\t\treturn rr.getAllRating();\n\t}", "public ArrayList<Reminder> getAllReminders()\r\n\t{\r\n\t\treturn dataService.getAllReminders();\r\n\t}", "public ArrayList<rubro> obtenerTodoslosRubros() {\n ArrayList<rubro> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n PreparedStatement pr = conn.prepareStatement(\"select id_rubro , nombre, descripcion, estado, ruta \\n\"\n + \" from rubros \");\n\n ResultSet rs = pr.executeQuery();\n\n while (rs.next()) {\n int id = rs.getInt(1);\n String nombre = rs.getString(2);\n String descripcion = rs.getString(3);\n boolean estado = rs.getBoolean(4);\n String ruta = rs.getString(5);\n\n rubro r = new rubro(id, nombre, estado, descripcion, ruta);\n\n lista.add(r);\n }\n\n rs.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n\n }", "private void searchAllRadioCategory() {\r\n DeezerRequest request = DeezerRequestFactory.requestRadiosCategories();\r\n AsyncDeezerTask task = new AsyncDeezerTask(mDeezerConnect,\r\n new RadioCategoriesRequestListener() {\r\n\r\n @SuppressWarnings(\"unchecked\")\r\n @Override\r\n public void onResult(final Object result, final Object requestId) {\r\n\r\n mRadioCategoryList.clear();\r\n\r\n try {\r\n mRadioCategoryList.addAll((List<RadioCategory>) result);\r\n } catch (ClassCastException e) {\r\n handleError(e);\r\n }\r\n if (mRadioCategoryList.isEmpty()) {\r\n Toast.makeText(RadiosActivity.this, getResources()\r\n .getString(R.string.no_results), Toast.LENGTH_LONG).show();\r\n }\r\n\r\n mRadioCategoryAdapter.notifyDataSetChanged();\r\n }\r\n\r\n @Override\r\n public void onException(final Exception exception,\r\n final Object requestId) {\r\n handleError(exception);\r\n }\r\n\r\n\r\n });\r\n task.execute(request);\r\n }", "public List < SelectItem > getListPrivilegesRadio() {\r\n PrivilegesRadioEnum[] enums = PrivilegesRadioEnum.values();\r\n\r\n List < SelectItem > selectItems = new ArrayList < SelectItem >();\r\n // If creation\r\n if (!this.getGroupController().getIsCreation()) {\r\n for (PrivilegesRadioEnum privilegesRadio : enums) {\r\n selectItems.add(new SelectItem(privilegesRadio.getLabel(), this.getString(privilegesRadio\r\n .getLabel())));\r\n }\r\n } else {\r\n // Else management\r\n PrivilegesRadioEnum privilegesRadio = PrivilegesRadioEnum.IMMEDIATE;\r\n selectItems\r\n .add(new SelectItem(privilegesRadio.getLabel(), this.getString(privilegesRadio.getLabel())));\r\n }\r\n\r\n return selectItems;\r\n }", "@Override\n\tpublic List<Rental> getRentals() {\n\t\treturn null;\n\t}", "public int getDataSource(){\n radioList = new ArrayList<Radio>();\n\n new OnlineRadioRetriever().execute(owner.getString(R.string.radio_list));\n\n\n Document doc = null;\n // Try to open an internal source file first\n try {\n String filePath = owner.getBaseContext().getFilesDir() + \"/\" + \"radios.xml\";\n //Log.i(LOG_TAG,\"FILE LOCATION: \" + filePath);\n File fXmlFile = new File(filePath);\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n doc = dBuilder.parse(fXmlFile);\n\n }\n // There is no internal source file, open the default file in Res\n catch (Exception e1) {\n try {\n DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n doc = dBuilder.parse(owner.getResources().openRawResource(R.raw.radios));\n } catch (Exception e2) {\n //TODO: FireBase Crash report\n e2.printStackTrace();\n }\n }\n // Start reading data file, save into the list of radios\n finally {\n doc.getDocumentElement().normalize();\n\n //Log.i(LOG_TAG, \"Read radios.xml file :\" + doc.getDocumentElement().getNodeName());\n NodeList nList = doc.getElementsByTagName(\"track\");\n //Log.i(LOG_TAG,\"Found \" + nList.getLength() + \" items\");\n\n for (int temp = 0; temp < nList.getLength(); temp++) {\n Node nNode = nList.item(temp);\n if (nNode.getNodeType() == Node.ELEMENT_NODE) {\n Element eElement = (Element) nNode;\n String title = eElement.getElementsByTagName(\"title\").item(0).getTextContent();\n String url = eElement.getElementsByTagName(\"location\").item(0).getTextContent();\n //Log.i(LOG_TAG,\"\\t\" + nNode.getNodeName() + \" #\" + temp + \": Title :\" + title + \" | Url :\" + url);\n radioList.add(new Radio(url, title));\n }\n }\n }\n\n\n if (radioList.size()>0){\n currentStation = 0;\n }\n return radioList.size();\n }", "public List<Reimbursement> getAllReims() {\n\t\t\n\t\tlog.info(\"USER RETRIEVED ALL REIMBURSEMENTS\");\n\t\treturn rDao.getAllReims();\n\t\t\n\t}", "public ArrayList<Transaction> isRenting(){\n ArrayList<Transaction> renting= new ArrayList<Transaction>();\n for(int i=0;i< Library.Transactions.size();i++){\n //transaction book title equals the book returning\n if((Library.Transactions.get(i).getUsername().equals(this.getUserName()))&&(Library.Transactions.get(i).getReturndate()==null)){\n renting.add(Library.Transactions.get(i));\n }\n }\n return renting;\n\t}", "public ArrayList<ItemModel> getAllUncheckedProduct() {\n ArrayList<ItemModel> uncheckedProducts = new ArrayList<ItemModel>();\n ArrayList<ItemModel> allProducts = getAllProducts();\n Log.d(DatabaseHelper.class.getName(), \"getAllUncheckedProducts:\");\n for (ItemModel item : allProducts) {\n if (!item.isAcquired()) {\n Log.d(DatabaseHelper.class.getName(), \"\\tgetAllUncheckedProducts:\" + item.toString());\n uncheckedProducts.add(item);\n }\n }\n\n return uncheckedProducts;\n }", "public List<Double> getPreviousReadings() {\n return unmodifiableReadings;\n }", "@Override\n public List<Revue> getAll() {\n return null;\n }", "@Test\n public void listOfRadioButtons() throws InterruptedException {\n driver.get(\"http://practice.cybertekschool.com/radio_buttons\");\n\n // driver.findElements --> returns a LIST of element\n // returns all the elements that match the given locator\n // if the locator does not match anhytihg, it does not throw exception, it just returns empty list\n\n List<WebElement> sports = driver.findElements(By.name(\"sport\"));\n\n System.out.println(sports.size());\n\n for (WebElement radioButton : sports) {\n Assert.assertFalse(radioButton.isSelected());\n }\n }", "public static ArrayList<Krediti> falseScetKrediti() {\r\n\t\tArrayList<Krediti> foundKrediti = new ArrayList<Krediti>();\r\n\t\tint i = 0;\r\n\t\tfor (Krediti kredit : kred) {\r\n\t\t\tif (kredit.getStat() == false) {\r\n\t\t\t\tfoundKrediti.add(kredit);\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn foundKrediti;\r\n\t}", "public static List<RawRecord> getDirtyRecords(DBManager db) {\n\n \tList<RawRecord> dirtyTimes = new ArrayList<RawRecord>() ;\n /*\n * get dirty records from db\n */\n \tList<TimeRecord> trlist = db.query();\n \tfor(TimeRecord tr: trlist) {\n \t\tLog.d(TAG, \"time record: \"+myLog(tr));\n \t //check the dirty and deleted flag\n \t final boolean isDeleted = (1 == tr.deleted);\n \t final boolean isDirty = (1 == tr.dirty);\n if (isDeleted) {\n Log.i(TAG, \"Contact is marked for deletion\");\n RawRecord rawContact = RawRecord.createDeletedRecord(tr._id,\n tr.server_id);\n dirtyTimes.add(rawContact);\n } else if (isDirty) {\n RawRecord rawContact = getRawRecord(db, tr._id);\n Log.i(TAG, \"Contact Name: \" + rawContact.getUserName());\n dirtyTimes.add(rawContact);\n }\n \t}\n \t \t\n \treturn dirtyTimes;\n }", "Object getROIs();", "public static LinkedList<Recensione> getRecensioniNonApprovate() throws SQLException {\n\t\t\tString query = \"SELECT * \"\n\t\t\t\t\t+ \"FROM recensione \"\n\t\t\t\t\t+ \"WHERE approvata = 0 ;\";\n\t\t\t\n\t\t\tConnection con = connectToDB();\n\t\t\t// Creiamo un oggetto Statement per poter interrogare il db.\n\t\t\tStatement cmd = con.createStatement ();\n\t\t\t// Eseguiamo una query e immagazziniamone i risultati in un oggetto ResultSet.\n\t\t\t// String qry = \"SELECT * FROM utente\";\n\t\t\tResultSet res = cmd.executeQuery(query);\n\t\t\tLinkedList<Recensione> mList = new LinkedList<Recensione>();\n\t\t\t// Stampiamone i risultati riga per riga\n\t\t\twhile (res.next()) {\n\t\t\t\t// (id, testo, approvata).\n\t\t\t\tRecensione r = new Recensione(res.getInt(\"id\"), res.getString(\"testo\"), res.getBoolean(\"approvata\"));\n\t\t\t\tmList.add(r);\n\t\t\t}\n\t\t\tcloseConnectionToDB(con);\n\t\t\treturn mList;\n\t\t}", "private void refreshRightDoors(){\n\n if (this.selectedTrain.getRightDoor() == 1){ this.rightDoorsOpenRadioButton.setSelected(true); }\n else if (this.selectedTrain.getRightDoor() == 0){ this.rightDoorsCloseRadioButton.setSelected(true); }\n else if (this.selectedTrain.getRightDoor() == -1) {this.rightDoorsFailureRadioButton.setSelected(true); }\n }", "@Override\n\tpublic ArrayList<Representation> getALL() {\n\t\treturn null;\n\t}", "public List<DBObject> WhichWatch();", "@Query(value = \"Select t From TestReport t where t.testResult = null\")\n\tpublic List<TestReport> getPendingUpdateTestReports();", "private void findAllReceivers()\n {\n //IF actually there is something where we can search\n if(getDataStore().containsKey(MUSICIAN_LIST))\n {\n //We take the list from the data store\n musicians = (Vector) getDataStore().get(MUSICIAN_LIST);\n\n //exclude myself from the list\n for (int i = 0; i<musicians.size(); i++)\n {\n if(!musicians.get(i).equals(myAgent.getAID()))\n {\n receivers.add(musicians.get(i));\n }\n }\n }\n nResponders = receivers.size();\n\n }", "public List<Road> getRoads() {\n\t\treturn new ArrayList<Road>(roadsByUri.values());\n\t}", "public List<InvalidRatSightingReason> getReasons() {\n return reasons;\n }", "public final double getQrInconsistency()\n {\n return qrInconsistency;\n }", "private void reloadRadioStationFromRawXML(){\n //Log.i(LOG_TAG, \"reloadRadioStationFromRawXML\");\n try {\n String filePath = owner.getBaseContext().getFilesDir() + \"/\" + \"radios.xml\";\n File fXmlFile = new File(filePath);\n fXmlFile.delete();\n getDataSource();\n } catch (Exception e) {\n //TODO FireBase report\n e.printStackTrace();\n }\n }", "private List<String> needRefresh(){\n\t\treturn null;\n\t}", "public List<ServiceType> getAllByUpdate() {\n\t\t// TODO Auto-generated method stub\n\t\tSession session = HibernateUtil.getSessionFactory().openSession();\n\t\tsession.beginTransaction();\n\t\t@SuppressWarnings(\"unchecked\")\n\t\tList <ServiceType> lst =(List<ServiceType>) session.createCriteria(ServiceType.class)\n\t\t.add(Restrictions.ne(\"updateDate\", \"\"))\n\t\t.list();\n\t\tsession.close();\n\t\treturn lst;\n\t}", "@Override\r\n\tpublic List<reclamation> gettoutReclamation() {\n\t\treturn reclamations;\r\n\t}", "@Override\n\tpublic LinkedList<Vehicle> getUserRentHistory() {\n\t\treturn this.vehiclesRented;\n\t}", "public boolean getKeepChangedValues();", "private List<JRadioButton> setupRoomButtons() {\n\t List<JRadioButton> btns = new ArrayList<JRadioButton>();\n\t // select the top button\n\t\tJRadioButton kitchenBtn = new JRadioButton(frame.makeDave(GameOfCluedo.KITCHEN));\n\t kitchenBtn.setSelected(true);\n\t // add buttons to list\n\t btns.add(kitchenBtn);\n \tbtns.add(new JRadioButton(frame.makeDave(GameOfCluedo.BALL_ROOM)));\n\t btns.add(new JRadioButton(frame.makeDave(GameOfCluedo.CONSERVATORY))); \n\t btns.add(new JRadioButton(frame.makeDave(GameOfCluedo.BILLIARD_ROOM))); \n\t btns.add(new JRadioButton(frame.makeDave(GameOfCluedo.LIBRARY))); \n\t btns.add(new JRadioButton(frame.makeDave(GameOfCluedo.STUDY))); \n\t btns.add(new JRadioButton(frame.makeDave(GameOfCluedo.HALL))); \n\t btns.add(new JRadioButton(frame.makeDave(GameOfCluedo.LOUNGE))); \n\t btns.add(new JRadioButton(frame.makeDave(GameOfCluedo.DINING_ROOM))); \n\t\treturn btns;\n\t}", "public static ArrayList<Vkladi> falseScetVkladi() {\r\n\t\tArrayList<Vkladi> foundVkladi = new ArrayList<Vkladi>();\r\n\t\tint i = 0;\r\n\t\tfor (Vkladi vkla : vklad) {\r\n\t\t\tif (vkla.getStat() == false) {\r\n\t\t\t\tfoundVkladi.add(vkla);\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn foundVkladi;\r\n\t}", "@Test\n public void getAllRecipes_ReturnsList(){\n ArrayList<Recipe> allRecipes = testDatabase.getAllRecipes();\n assertNotEquals(\"getAllRecipes - Non-empty List Returned\", 0, allRecipes.size());\n }", "public ArrayList<ItemModel> getAllCheckedProduct() {\n ArrayList<ItemModel> allProducts;\n ArrayList<ItemModel> checkedProducts = new ArrayList<ItemModel>();\n allProducts = getAllProducts();\n Log.d(DatabaseHelper.class.getName(), \"getAllCheckedProducts:\");\n for (ItemModel item : allProducts) {\n if (item.isAcquired()) {\n Log.d(DatabaseHelper.class.getName(), \"\\tgetAllCheckedProducts:\" + item.toString());\n\n checkedProducts.add(item);\n }\n }\n\n return checkedProducts;\n }", "private void updateChecks(Uri uri) {\n List<OPLocalRingtoneAdapter.RingtoneData> list = this.mSystemRings;\n if (!(list == null || this.mOPLocalRingtoneAdapter == null)) {\n for (OPLocalRingtoneAdapter.RingtoneData ringtoneData : list) {\n ringtoneData.isCheck = ringtoneData.mUri.equals(uri);\n }\n this.mOPLocalRingtoneAdapter.notifyDataSetChanged();\n }\n }", "java.util.List<java.lang.Integer> getRareIdList();", "java.util.List<java.lang.Integer> getRareIdList();", "public static ArrayList<Representation> getAll() throws SQLException {\n ArrayList<Representation> arrObjRepresentation = new ArrayList<Representation>();\n Representation objRepresentation;\n ResultSet rs;\n PreparedStatement pstmt;\n Jdbc jdbc = Jdbc.getInstance();\n // préparer la requête\n String requete = \"SELECT id, daterepr, id_lieu, id_groupe, heure_debut, heure_fin, nombre_place_restante FROM Representation\";\n pstmt = jdbc.getConnexion().prepareStatement(requete);\n rs = pstmt.executeQuery();\n while (rs.next()) {\n objRepresentation = RepresentationDao.RepresentationFromResultSet(rs);\n arrObjRepresentation.add(objRepresentation);\n }\n return arrObjRepresentation;\n }", "LiveData<List<Recommendation>> getAllRecsSortRefreshed() {\n allRecs = recommendationRepository.getAllRecsSortRefreshed();\n return allRecs;\n }", "public Vector<ESItem> getUnsavedChanges() {\n Vector<ESItem> vars = new Vector<ESItem>();\n Enumeration en = root.depthFirstEnumeration();\n while (en.hasMoreElements()) {\n DefaultMutableTreeNode node = (DefaultMutableTreeNode) en.nextElement();\n Object obj = node.getUserObject();\n if (obj instanceof ESItem) {\n ESItem var = (ESItem) obj;\n if (var.isChanged()) {\n vars.add(var);\n }\n }\n }\n return vars;\n }", "public Set<Irrigation> getAvailableIrrigationSlots ()\n {\n Set<Irrigation> availableIrrigations = new HashSet<>();\n\n ArrayList<Cell> neightboors;\n\n neightboors = getExistingNeighboors(new Point());\n\n neightboors.forEach(cell -> {\n ArrayList<Cell> touching = getCommonNeighboors(cell.getCoords(), new Point());\n touching.stream()\n .filter(t -> !verifIrrigation(cell.getCoords(), t.getCoords()))\n .forEach(t -> availableIrrigations.add(new Irrigation((Plot) t, (Plot) cell)));\n });\n\n for (Irrigation irg : irrigation)\n {\n\n neightboors = getCommonNeighboors(irg.getPlot1().getCoords(), irg.getPlot2().getCoords());\n\n neightboors.stream().filter(cell -> !(cell.getCoords().equals(new Point()))).forEach(plot -> {\n\n if (!verifIrrigation(plot.getCoords(), irg.getPlot1().getCoords())) availableIrrigations.add(new Irrigation((Plot) plot,\n irg.getPlot1()));\n\n if (!verifIrrigation(plot.getCoords(), irg.getPlot2().getCoords())) availableIrrigations.add(new Irrigation((Plot) plot,\n irg.getPlot2()));\n\n });\n }\n availableIrrigations.removeAll(irrigation);\n return availableIrrigations;\n }", "public ArrayList<Star> getModifiedStars()\n\t{\n\t\treturn starList;\n\t}", "public CompactEqkRupList get_rupture_list () {\n\n\t\t// For null list, return null\n\n\t\tif (eqk_count < 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// For empty list, pass in zero-size arrays\n\n\t\tif (eqk_count == 0) {\n\t\t\treturn new CompactEqkRupList (eqk_count, new long[0], new long[0]);\n\t\t}\n\n\t\t// For non-empty list, pass our arrays\n\n\t\treturn new CompactEqkRupList (eqk_count, lat_lon_depth_list, mag_time_list);\n\t}", "public CompactEqkRupList get_rupture_list () {\n\n\t\t// For null list, return null\n\n\t\tif (eqk_count < 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// For empty list, pass in zero-size arrays\n\n\t\tif (eqk_count == 0) {\n\t\t\treturn new CompactEqkRupList (eqk_count, new long[0], new long[0]);\n\t\t}\n\n\t\t// For non-empty list, pass our arrays\n\n\t\treturn new CompactEqkRupList (eqk_count, lat_lon_depth_list, mag_time_list);\n\t}", "public abstract Collection<Turtle> getActiveTurtles();", "List<StadiumModel> getStadiums();", "public List<ConceptoRetencionSRI> getListaConceptoRetencionSRI()\r\n/* 141: */ {\r\n/* 142:153 */ if (this.listaConceptoRetencionSRI == null) {\r\n/* 143:154 */ cargarConceptoRetencion();\r\n/* 144: */ }\r\n/* 145:156 */ return this.listaConceptoRetencionSRI;\r\n/* 146: */ }", "public java.util.List<com.lesen.rpc.protobuf.LesenRPCProto.LesenRPCResult> getReaultList() {\n return reault_;\n }", "public List <reclamation> findall(){\n\t\tList<reclamation> a = reclamationRepository.findAll();\n\t\t\n\t\tfor(reclamation reclamations : a)\n\t\t{\n\t\t\tL.info(\"reclamations :\"+ reclamations);\n\t\t\t\n\t\t}\n\t\treturn a;\n\t\t}", "void getRadiationlevel();", "private List<User> getSynchronizablePacients() {\n List<User> pacients = userRepository.findByRoles_Name(RolesNamesEnum.PATIENT.name());\n\n pacients = pacients.stream().filter(p -> (p.getTreatment() != null && !p.getTreatment().getVitals().isEmpty() && !p.getOauths().isEmpty())).collect(Collectors.toList());\n return pacients;\n }", "public boolean checkRapelState () { return noOfRapels > 0; }", "java.util.List<com.lesen.rpc.protobuf.LesenRPCProto.LesenRPCResult> \n getReaultList();", "public List<R> getAll();", "public static List<Recette> getAllRecettes() {\n\t\tList<Recette> listeRecette = new ArrayList<Recette>();\n\t\tSet<Recette> tempListe = new TreeSet<Recette>();\n\t\tfor (Entity entity : getAllEntities()) {\n\t\t\ttempListe.add(getRecette(entity));\n\t\t}\n\t\tlisteRecette.addAll(tempListe);\n\t\treturn listeRecette;\n\t}", "List<Question> getQuestionsUsed();", "public static List<String> getAllRoofTypes() throws UserException {\n List<String> rooftypeList = new ArrayList<>();\n try (Connection connection = database.connect()) {\n String sql = \"SELECT * FROM fog.roof_types;\";\n\n try (PreparedStatement ps = connection.prepareStatement(sql)) {\n ResultSet rs = ps.executeQuery();\n while (rs.next()) {\n String roofType = rs.getString(\"roof_type\");\n rooftypeList.add(roofType);\n\n }\n return rooftypeList;\n } catch (SQLException ex) {\n throw new UserException(ex.getMessage());\n }\n } catch (SQLException | UserException ex) {\n throw new UserException(\"Connection to database could not be established\");\n }\n }", "private void disableRadioButtons() {\n RadioButton radioButtonA = (RadioButton) findViewById(R.id.radio_button_A);\n radioButtonA.setEnabled(false);\n RadioButton radioButtonB = (RadioButton) findViewById(R.id.radio_button_B);\n radioButtonB.setEnabled(false);\n RadioButton radioButtonC = (RadioButton) findViewById(R.id.radio_Button_C);\n radioButtonC.setEnabled(false);\n RadioButton radioButtonD = (RadioButton) findViewById(R.id.radio_Button_D);\n radioButtonD.setEnabled(false);\n }", "public List<RefineriesFilter> getRefineriesFilter();", "public int[] getAllRatings() {\n return new int[] { 1, 3, 5, 3, 4, 2, 4, 3, 2, 1, 2, 5, 1, 1, 2, 5 };\n }", "private TenderTypeEnum[] getEnabledRmRefundOptions(RPIResponseIfc rpiReturnResponse, TenderTypeEnum[] enabledTypes)\n {\n List<RPIItemResponse> itemResponses = rpiReturnResponse.getItemRefundResponse();\n int numberOfReturnItems = itemResponses.size();\n\n List<SelectedTenderType> selectedTenderTypes = new ArrayList<SelectedTenderType>();\n\n Iterator<RPIItemResponse> iter = itemResponses.iterator();\n while ( iter.hasNext() )\n {\n RPIItemResponse rpiItemResponse = iter.next();\n List<RPITenderType> returnTenderTypes = rpiItemResponse.getRefundTenderTypes();\n if ( returnTenderTypes==null || returnTenderTypes.size()==0 )\n {\n //RM returns maintain tenders\n for (int i=0; i<enabledTypes.length; i++)\n {\n SelectedTenderType selectedTenderType = getSelectedTenderType(selectedTenderTypes, enabledTypes[i]);\n if ( selectedTenderType == null )\n {\n selectedTenderType = new SelectedTenderType();\n selectedTenderType.setTenderType(enabledTypes[i]);\n selectedTenderType.setSelected(1); //the first return item select\n }\n else\n {\n selectedTenderType.setSelected(selectedTenderType.getSelected()+1);\n }\n selectedTenderTypes.add(selectedTenderType);\n }\n }\n else\n {\n //use the original transaction's tender types\n Iterator<RPITenderType> tenderTypeIter = returnTenderTypes.iterator();\n while ( tenderTypeIter.hasNext() )\n {\n RPITenderType rpiTenderType = tenderTypeIter.next();\n String tenderType = rpiTenderType.getType();\n TenderTypeEnum tenderTypeEnum = mapTOTenderTypeEnum(tenderType);\n SelectedTenderType selectedTenderType = getSelectedTenderType(selectedTenderTypes, tenderTypeEnum);\n if ( selectedTenderType == null )\n {\n //first time find the tender type as a refund tender\n selectedTenderType = new SelectedTenderType();\n selectedTenderType.setTenderType(tenderTypeEnum);\n selectedTenderType.setSelected(1);\n }\n else\n {\n //find one more time.\n selectedTenderType.setSelected(selectedTenderType.getSelected()+1);\n }\n selectedTenderTypes.add(selectedTenderType);\n }\n }\n }\n List<TenderTypeEnum> tenderList = new ArrayList<TenderTypeEnum>(6);\n Iterator<SelectedTenderType> selectedTenderIter = selectedTenderTypes.iterator();\n while ( selectedTenderIter.hasNext() )\n {\n SelectedTenderType selectedTenderType = selectedTenderIter.next();\n tenderList.add(selectedTenderType.getTenderType());\n }\n\n // convert list to array\n TenderTypeEnum[] tenderTypeArray = new TenderTypeEnum[tenderList.size()];\n tenderTypeArray = tenderList.toArray(tenderTypeArray);\n return tenderTypeArray;\n }", "public Collection<InterfaceAbstractCar> getRentedCars() {\r\n\t\treturn rentDetails.values();\r\n\t}", "public List<DataQuestion> getAllAnswer(){\n return items;\n }", "@Override public RentalList getRentalList() throws RemoteException, SQLException {\r\n return gameListClientModel.clientGetRentalList();\r\n }", "public\tList<ChangedJsMethod>\tgetChangedMethods() {\n\t\t\n\t\treturn\tCollections.unmodifiableList(this.changedMethods);\n\t}", "@Override\n\tpublic List<ModificationRequest> findAll() {\n\t\treturn this.entityManager.createQuery(\"SELECT request from ModificationRequest request where request.active = TRUE\", ModificationRequest.class)\n\t\t\t\t\t\t\t\t\t.getResultList();\n\t}", "public ArrayList findShapes() {\n ArrayList shapes = new ArrayList<>();\n\n // open database connection\n DatabaseConnection connection = new DatabaseConnection();\n\n if (connection.openConnection()) {\n\n // if a connection was successfully setup, execute the SELECT statement.\n ResultSet resultset = connection.executeSQLSelectStatement(\n \"SELECT *\\n\" +\n \"FROM shape_objects\\n\" +\n \"JOIN shape ON shape_objects.shape = shape.shape_id\\n\");\n\n // check if result is not null\n if (resultset != null) {\n try {\n while (resultset.next()) {\n\n int idFromDb = resultset.getInt(\"id\");\n double heightFromDb = resultset.getDouble(\"height\");\n double radiusFromDb = resultset.getDouble(\"radius\");\n double lengthFromDb = resultset.getDouble(\"width\");\n double widthFromDb = resultset.getDouble(\"length\");\n String shapeNameFromDb = resultset.getString(\"name\");\n\n\n if (Objects.equals(shapeNameFromDb, \"cilinder\")) {\n Cilinder newCilinder = new Cilinder(idFromDb, shapeNameFromDb, heightFromDb, radiusFromDb);\n shapes.add(newCilinder);\n }\n\n if (Objects.equals(shapeNameFromDb, \"sphere\")) {\n Sphere newSphere = new Sphere(idFromDb, shapeNameFromDb, radiusFromDb);\n shapes.add(newSphere);\n }\n\n if (Objects.equals(shapeNameFromDb, \"cubic\")) {\n Cubic newCubic = new Cubic(idFromDb, shapeNameFromDb, lengthFromDb, widthFromDb, heightFromDb);\n shapes.add(newCubic);\n }\n }\n } catch (SQLException e) {\n shapes.clear();\n }\n }\n\n // close database connection\n connection.closeConnection();\n }\n\n return shapes;\n }", "public List<Car> getReadyForDeletion() {\n\n \tList<Car> listDeletedCars = em.createNamedQuery(\"Car.findCarsToBeDeleted\", Car.class).getResultList();\n \treturn listDeletedCars;\n \t\n }", "public RebateChanges[] getRebateChanges() {\n return this.rebateChanges;\n }", "public boolean hasRid() {\n return result.hasRid();\n }", "public boolean hasRid() {\n return result.hasRid();\n }", "public boolean hasRid() {\n return result.hasRid();\n }", "public boolean hasRid() {\n return result.hasRid();\n }", "public ArrayList<int[]> getRoundHistory()\n {\n return this.roundHistory;\n }", "public List<IncomingReport> list(boolean discrepancy) throws DAOException;", "public ArrayList<Rubro> getRubros() {\n ArrayList<CuentaCorriente> cuentaCorrientes = getCuentasCorrientesCollection();\n ArrayList<Rubro> rubros = new ArrayList<>();\n\n //Tengo que mergear todos los rubros\n for (CuentaCorriente cuentaCorriente : cuentaCorrientes) {\n for (Rubro rubroProveedor : cuentaCorriente.getProveedor().getRubros()) {\n //Si no tengo rubros inicialmente, agregas uno\n if (rubros.isEmpty()) {\n rubros.add(rubroProveedor);\n } else {\n boolean existe = false;\n //Tengo que mergear todos los productos de los rubros\n for (Rubro rubro : rubros) {\n if (rubroProveedor.getIdRubro() == rubro.getIdRubro()) {\n existe = true;\n //Es el mismo rubro\n for (Producto productoProveedor : rubroProveedor.getProductos()) {\n boolean noTieneProducto = true;\n //Quiero mergear los PPPP de cada producto igual\n for (Producto producto : rubro.getProductos()) {\n if (productoProveedor.getIdProducto() == producto.getIdProducto()) {\n List<PrecioProductoPorProveedor> precios = producto.getPreciosPorProveedor();\n precios.addAll(productoProveedor.getPreciosPorProveedor());\n producto.setPreciosPorProveedor(precios);\n noTieneProducto = false;\n }\n }\n //Si no encontre el producto, agrego\n if (noTieneProducto) {\n rubro.addProducto(productoProveedor);\n }\n }\n }\n }\n\n if (!existe) {\n rubros.add(rubroProveedor);\n }\n }\n }\n }\n\n return rubros;\n }", "@Override\r\n public List<Object> getMatchedResources() {\n return null;\r\n }", "@Override\n\tpublic List<RatingEntity> findAll() {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<ERForm> getAllForms() {\nString sql = \"select * from project1.reimbursementInfo;\";\n\t\t\n\t\tPreparedStatement stmt;\n\t\t\n\t\tList<ERForm> allForms = new ArrayList<ERForm>();\n\t\t\n\t\ttry {\n\t\t\tstmt = conn.prepareStatement(sql);\n\t\t\tResultSet rs = stmt.executeQuery();\n\t\t\twhile(rs.next()) {\n\t\t\t\tERForm form = new ERForm();\n\t\t\t\tform.setRID(rs.getInt(1));\n\t\t\t\tform.setUserName(rs.getString(2));\n\t\t\t\tform.setFullName(rs.getString(3));\n\t\t\t\tform.setTheDate(rs.getDate(4).toLocalDate());\n\t\t\t\tform.setEventStartDate(rs.getDate(5).toLocalDate());\n\t\t\t\tform.setTheLocation(rs.getString(6));\n\t\t\t\tform.setDescription(rs.getString(7));\n\t\t\t\tform.setTheCost(rs.getDouble(8));\n\t\t\t\tform.setGradingFormat(rs.getString(9));\n\t\t\t\tform.setPassingPercentage(rs.getString(10));\n\t\t\t\tform.setEventType(rs.getString(11));\n\t\t\t\tform.setFileName(rs.getString(12));\n\t\t\t\tform.setStatus(rs.getString(13));\n\t\t\t\tform.setReason(rs.getString(14));\n\t\t\t\tallForms.add(form);\n\t\t\t}\n\t\t\t\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}return allForms;\n\t}", "public void refresh() {\n clearList();\n for(int i =0;i<toDoList.toDoListLength();i++){\n JRadioButton task = toDoButtonList.get(i);\n task.setText(toDoList.getTask(i).toString());\n }\n }", "@Override\n public Collection<WegasPermission> getRequieredUpdatePermission(RequestContext context) {\n return this.getState().getRequieredUpdatePermission(context);\n }", "@java.lang.Override\n public java.util.List<com.dogecoin.protocols.payments.Protos.Output> getRefundToList() {\n return java.util.Collections.unmodifiableList(\n instance.getRefundToList());\n }", "@Override\n\tpublic List<RecipeTable> list() {\n\t\treturn null;\n\t}", "java.util.List<WorldUps.UTruck> \n getTruckstatusList();", "public abstract Collection<Turtle> getAllTurtles();", "private void refreshStock(){\n storeStock = sysMgr.getStock(sysMgr.getLoginId());\n ArrayList<Stock> nonEmpty = new ArrayList<>();\n for(Stock i : storeStock)\n if(i.getQuantity() != 0)\n nonEmpty.add(i);\n storeStock = nonEmpty;\n }", "public Rooms getRmTable();", "@org.jetbrains.annotations.NotNull()\n public abstract java.util.List<java.lang.String> getUnactivatedPaymentMethods();", "public synchronized List<Update<V>> getUpdates() {\n if (!isReadOnly() && updates == null) {\n updates = calculateUpdates();\n }\n return updates;\n }", "public ArrayList<Richiesta> getListaRichieste() {\n\t\treturn listaRichieste;\n\t}", "public ArrayList<Materia> getListaMaterieNoEsame() {\n\n // Apertura connessione db sola lettura\n SQLiteDatabase db = dbHelper.getReadableDatabase();\n String selectQuery = \"SELECT \" +\n Materia.KEY_ID + \",\" +\n Materia.KEY_nome + \",\" +\n Materia.KEY_email + \",\" +\n Materia.KEY_crediti +\n \" FROM \" + Materia.TABLE +\n \" WHERE \" + Materia.KEY_ID +\n \" NOT IN \" +\n \" (SELECT \" + Esame.KEY_IDMateria + \" FROM \" + Esame.TABLE + \")\" +\n \" ORDER BY \" + Materia.KEY_nome;\n\n ArrayList<Materia> listaMaterie = new ArrayList<Materia>();\n\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n // Itera nelle righe generate dalla query ed aggiunge le materie alla lista\n if (cursor.moveToFirst()) {\n do {\n Materia m = new Materia();\n m.setID(cursor.getInt(cursor.getColumnIndex(Materia.KEY_ID)));\n m.setNome(cursor.getString(cursor.getColumnIndex(Materia.KEY_nome)));\n m.setEmail(cursor.getString(cursor.getColumnIndex(Materia.KEY_email)));\n m.setCrediti(cursor.getInt(cursor.getColumnIndex(Materia.KEY_crediti)));\n listaMaterie.add(m);\n } while (cursor.moveToNext());\n }\n\n cursor.close();\n db.close();\n return listaMaterie;\n }", "private void refreshLights(){\n\n if (this.selectedTrain.getLights() == 1){ this.lightsOnRadioButton.setSelected(true); }\n else if (this.selectedTrain.getLights() == 0){ this.lightsOffRadioButton.setSelected(true); }\n else if (this.selectedTrain.getLights() == -1){ this.lightsFailureRadioButton.setSelected(true); }\n }", "public ArrayList<Recording> getAll() {\r\n synchronized (lastUpdate) {\r\n if (System.currentTimeMillis() - lastUpdate > 60000) {\r\n update();\r\n }\r\n }\r\n return recordings;\r\n }", "public List<Resep> getReseps() {\r\n return sessionFactory.getCurrentSession().createCriteria(Resep.class).list();\r\n }", "public List getRatingList() throws GenericBusinessException {\n sust.bookshelves.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.bookshelves.hibernatehelper.HibernateQueryHelper();\n try {\n\n String queryString = \"from \" + Rating.class.getName() + \" e\";\n // Add a an order by on all primary keys to assure reproducable results.\n String orderByPart = \"\";\n orderByPart += \" order by e.ratingId\";\n queryString += orderByPart;\n Query query = hibernateTemplate.createQuery(queryString);\n List list = hibernateTemplate.list(query);\n\n return list;\n } finally {\n log.debug(\"finished getRatingList\");\n }\n }", "abstract List<T> getReuslt();", "public Set<AspectRatio> ratios() {\n return this.mRatios.keySet();\n }" ]
[ "0.59271103", "0.53232694", "0.52921385", "0.5246834", "0.5229222", "0.52242345", "0.52166027", "0.5148891", "0.51343215", "0.50816894", "0.50419116", "0.50417465", "0.5018384", "0.5011803", "0.50058126", "0.49815622", "0.49487075", "0.49294788", "0.49290103", "0.4925897", "0.49216568", "0.49114284", "0.49060583", "0.49031523", "0.48975772", "0.4890409", "0.4889944", "0.48865274", "0.48691463", "0.48682353", "0.4867024", "0.4863347", "0.4855538", "0.48548082", "0.48345366", "0.48339775", "0.48157147", "0.4809592", "0.48075116", "0.48075116", "0.48040736", "0.48031002", "0.48019046", "0.47951508", "0.47870135", "0.4782805", "0.4782805", "0.4777689", "0.47704884", "0.47604457", "0.47592503", "0.47505766", "0.47407168", "0.4740454", "0.47390622", "0.473768", "0.47270706", "0.47235295", "0.47215945", "0.47209245", "0.47168615", "0.46996102", "0.4699098", "0.46967858", "0.46966934", "0.46959564", "0.46938026", "0.4690143", "0.46875864", "0.46830487", "0.4679579", "0.46765104", "0.46759465", "0.46759465", "0.46759465", "0.46759465", "0.46634814", "0.4660976", "0.46603614", "0.46553457", "0.46550965", "0.46514195", "0.46482638", "0.46447498", "0.46366033", "0.46356532", "0.4633764", "0.46336165", "0.46224117", "0.46192583", "0.46163085", "0.461575", "0.46104056", "0.45956025", "0.4593363", "0.4591183", "0.45906663", "0.4590525", "0.45874172", "0.45798635" ]
0.67769724
0
Created by omgimbot on 7/19/2019.
public interface IDokterHewanView { void initView(); void showLoadingIndicator(); void hideLoadingIndicator(); void onDataReady(DokterHewans result); void onHubWa(String noHp); void onRequestFailed(String rm); void onNetworkError(String cause); void goToDashboard(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\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\r\n\tpublic void tires() {\n\t\t\r\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "public void mo38117a() {\n }", "public void mo4359a() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\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\n protected void getExras() {\n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public int describeContents() { return 0; }", "@Override\n protected void initialize() \n {\n \n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\n public void memoria() {\n \n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "private void m50366E() {\n }", "@Override\n public void init() {\n }", "@Override\n\tprotected void interr() {\n\t}", "public Pitonyak_09_02() {\r\n }", "@Override\n void init() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void mo6081a() {\n }", "@Override\n\tpublic void anular() {\n\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 }", "private void poetries() {\n\n\t}", "Petunia() {\r\n\t\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\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\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "private TMCourse() {\n\t}", "private MetallicityUtils() {\n\t\t\n\t}", "@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 }", "@Override\n public void init() {}", "public void gored() {\n\t\t\n\t}", "@Override\n public void initialize() {\n \n }", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\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 inizializza() {\n\n super.inizializza();\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "protected void mo6255a() {\n }", "@Override\n public void initialize() { \n }", "public final void mo91715d() {\n }", "@Override\r\n\tpublic void init() {}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n\tpublic void nghe() {\n\n\t}", "private UsineJoueur() {}", "public void mo12930a() {\n }", "@Override\n public int getSize() {\n return 1;\n }", "private void init() {\n\n\t}", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\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}", "public void mo12628c() {\n }", "@Override public int describeContents() { return 0; }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "public void mo55254a() {\n }", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}" ]
[ "0.61307436", "0.5980111", "0.5954083", "0.58332896", "0.5748223", "0.5748223", "0.5706672", "0.5705224", "0.5674853", "0.56513876", "0.562191", "0.5600847", "0.5598736", "0.5587748", "0.5587748", "0.5587748", "0.5587748", "0.5587748", "0.5587748", "0.557957", "0.5565883", "0.5559652", "0.553893", "0.55330545", "0.5525628", "0.5520551", "0.5517864", "0.5502458", "0.5499931", "0.5496054", "0.5493468", "0.54932344", "0.54808104", "0.5471563", "0.5458944", "0.5455129", "0.5452861", "0.54524213", "0.5446985", "0.5440195", "0.5438144", "0.5438144", "0.5438144", "0.5438144", "0.5438144", "0.5438144", "0.5438144", "0.5428684", "0.54257464", "0.5416314", "0.54155177", "0.54155177", "0.54148865", "0.5410555", "0.54104203", "0.54004997", "0.53929484", "0.53929484", "0.5378046", "0.53775257", "0.5368918", "0.53600127", "0.5359379", "0.5353984", "0.5353242", "0.5347014", "0.5347014", "0.5347014", "0.5347014", "0.5347014", "0.5346339", "0.53252023", "0.5324876", "0.5317442", "0.5317433", "0.53110075", "0.5308465", "0.5308465", "0.5306261", "0.5306261", "0.5306261", "0.528774", "0.5283145", "0.52828336", "0.52748543", "0.5274268", "0.5270782", "0.52643734", "0.52643734", "0.52643734", "0.52562875", "0.5252718", "0.5249979", "0.5247886", "0.5247886", "0.5247886", "0.5237708", "0.52332306", "0.52332306", "0.52292246", "0.5229116" ]
0.0
-1
System.out.println("ask " + page + " page"); System.out.println("filters : " + "firstname = " + firstName + " lastname = " + lastName + " code = " + code + " library = " + library + " department = " + department); System.out.println("sort order : " + sortOrders.toString());
@Transactional public List<Student> fetch(int page, int limit, String firstName, String lastName, String code, String library, String department, List<StudentSort> sortOrders) { EntityManager entityManager = entityManagerFactory.createEntityManager(); entityManager.getTransaction().begin(); CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder(); CriteriaQuery<Student> query = criteriaBuilder.createQuery(Student.class); Root<Student> root = query.from(Student.class); Join<Student, Library> studentLibraryJoin = root.join("library"); Join<Student, Department> studentDepartmentJoin = root.join("department"); query.select(root); List<Predicate> predicates = new ArrayList<>(); if (firstName != null) { predicates.add(criteriaBuilder.like(criteriaBuilder.lower(root.get("firstName")), "%" + firstName.toLowerCase() + "%")); } if (lastName != null) { predicates.add(criteriaBuilder.like(criteriaBuilder.lower(root.get("lastName")), "%" + lastName.toLowerCase() + "%")); } if (code != null) { predicates.add(criteriaBuilder.equal(root.get("code"), Integer.parseInt(code))); } if (library != null) { predicates.add(criteriaBuilder.like(criteriaBuilder.lower(studentLibraryJoin.get("address")), "%" + library.toLowerCase() + "%")); } if (department != null) { predicates.add(criteriaBuilder.or( criteriaBuilder.like(criteriaBuilder.lower(studentDepartmentJoin.get("faculty")), "%" + department.toLowerCase() + "%"), criteriaBuilder.like(criteriaBuilder.lower(studentDepartmentJoin.get("university")), "%" + department.toLowerCase() + "%"))); } query.where(criteriaBuilder.and(predicates.toArray(new Predicate[predicates.size()]))); if (!sortOrders.isEmpty()) { if (sortOrders.get(0).isDescending()) { if (sortOrders.get(0).getPropertyName().equals("department")) { query.orderBy(criteriaBuilder.desc(studentDepartmentJoin.get("university")), criteriaBuilder.desc(studentDepartmentJoin.get("faculty"))); } else { if (sortOrders.get(0).getPropertyName().equals("library")) { query.orderBy(criteriaBuilder.desc(studentLibraryJoin.get("address"))); } else query.orderBy(criteriaBuilder.desc(root.get(sortOrders.get(0).getPropertyName()))); } } else { if (sortOrders.get(0).getPropertyName().equals("department")) { query.orderBy(criteriaBuilder.asc(studentDepartmentJoin.get("university")), criteriaBuilder.asc(studentDepartmentJoin.get("faculty"))); } else { if (sortOrders.get(0).getPropertyName().equals("library")) { query.orderBy(criteriaBuilder.asc(studentLibraryJoin.get("address"))); } else query.orderBy(criteriaBuilder.asc(root.get(sortOrders.get(0).getPropertyName()))); } } } else query.orderBy(criteriaBuilder.asc(root.get("id"))); List<Student> result = entityManager.createQuery(query).setFirstResult(page * limit).setMaxResults(limit).getResultList(); entityManager.getTransaction().commit(); entityManager.close(); //System.out.println(result); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sort()\n {\n com.jayway.restassured.response.Response response= given().relaxedHTTPSValidation().when().get(\"http://18.222.188.206:3333/accounts?_sort=title&_order=asc\");\n response.then().assertThat().statusCode(200);\n System.out.println(\"The accounts that are sorted according to it's title is displayed below:\");\n response.prettyPrint();\n \n }", "Page<ExamPackage> searchList(int pageNo, int pageSize, Sort sort);", "private String getOrderBy( List<Integer> listSortBy )\n {\n StringBuffer strOrderBy = new StringBuffer( );\n String strReturn = SuggestUtils.EMPTY_STRING;\n int ncpt = 0;\n\n if ( ( listSortBy != null ) && ( listSortBy.size( ) != 0 ) )\n {\n strOrderBy.append( SQL_ORDER_BY );\n\n for ( Integer sort : listSortBy )\n {\n ncpt++;\n\n switch ( sort )\n {\n case SubmitFilter.SORT_BY_DATE_RESPONSE_ASC:\n strOrderBy.append( SQL_FILTER_SORT_BY_DATE_RESPONSE_ASC );\n\n break;\n\n case SubmitFilter.SORT_BY_DATE_RESPONSE_DESC:\n strOrderBy.append( SQL_FILTER_SORT_BY_DATE_RESPONSE_DESC );\n\n break;\n\n case SubmitFilter.SORT_BY_SCORE_ASC:\n strOrderBy.append( SQL_FILTER_SORT_BY_SCORE_ASC );\n\n break;\n\n case SubmitFilter.SORT_BY_SCORE_DESC:\n strOrderBy.append( SQL_FILTER_SORT_BY_SCORE_DESC );\n\n break;\n\n case SubmitFilter.SORT_BY_NUMBER_COMMENT_ASC:\n strOrderBy.append( SQL_FILTER_SORT_BY_NUMBER_COMMENT_ENABLE_ASC );\n\n break;\n\n case SubmitFilter.SORT_BY_NUMBER_COMMENT_DESC:\n strOrderBy.append( SQL_FILTER_SORT_BY_NUMBER_COMMENT_ENABLE_DESC );\n\n break;\n\n case SubmitFilter.SORT_BY_NUMBER_VIEW_ASC:\n strOrderBy.append( SQL_FILTER_SORT_BY_NUMBER_VIEW_ASC );\n\n break;\n\n case SubmitFilter.SORT_BY_NUMBER_VIEW_DESC:\n strOrderBy.append( SQL_FILTER_SORT_BY_NUMBER_VIEW_DESC );\n\n break;\n\n case SubmitFilter.SORT_BY_NUMBER_VOTE_ASC:\n strOrderBy.append( SQL_FILTER_SORT_BY_NUMBER_VOTE_ASC );\n\n break;\n\n case SubmitFilter.SORT_BY_NUMBER_VOTE_DESC:\n strOrderBy.append( SQL_FILTER_SORT_BY_NUMBER_VOTE_DESC );\n\n break;\n\n case SubmitFilter.SORT_MANUALLY:\n strOrderBy.append( SQL_FILTER_SORT_MANUALLY );\n\n break;\n\n default:\n break;\n }\n\n if ( ncpt < listSortBy.size( ) )\n {\n strOrderBy.append( \",\" );\n }\n }\n\n strReturn = strOrderBy.toString( );\n\n if ( strReturn.endsWith( \",\" ) )\n {\n strReturn = strReturn.substring( 0, strReturn.length( ) - 1 );\n }\n }\n\n return strReturn;\n }", "public static void main(String[] args) {\n ArrayList<BankAccount> accounts = makeBankingSystem();\n \n Collections.sort(accounts, BankAccount.createComparatorByBalance(false));\n for (BankAccount c: accounts){\n System.out.println(c.getName(c)+\", \"+c.getBalance(c));\n \n }\n \n}", "Page<ExamPackage> searchListByFullnameAuthor(String fullname, int categoryID, int pageNo, int pageSiz,Sort sort);", "void printFilteredItems();", "public static void main(String[] args) {\n ProductService service = new ProductService();\n service.sortByPriceAndRating();\n service.view();\n System.out.println(\"==================\");\n System.out.println(service.filterByName(\"sofa\"));\n\n }", "public void Search(ArrayList<Integer> nFilters, String nQuery, String sort, boolean ascending)\n {\n sortOption = sort;\n query = nQuery;\n filters = nFilters;\n ascendingOption = ascending;\n\n BPSearch();\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(queryporder.querySum(0, 60));\n\t\tSystem.out.println(queryporder.queryName(\"郭靖\"));\n\t\tSystem.out.println(queryporder.queryAll());\n\t\t\n\t\t//List l = queryporder.queryAll();\n\t\t//List l = queryporder.querySum(0, 60);\n\t\tList l = queryporder.queryName(\"郭靖\");\n\t\tfor(Object o : l) {\n\t\t\tporder p = (porder)o;\n\t\t\tSystem.out.println(\n\t\t\t\tp.getId()+\",\"+\n\t\t\t\tp.getName()+\",\"+\n\t\t\t\tp.getProduct1()+\",\"+\n\t\t\t\tp.getProduct2()+\",\"+\n\t\t\t\tp.getProduct3()+\",\"+\n\t\t\t\tp.getSum()+\",\"+\n\t\t\t\tp.getDiscount()\n\t\t\t\t\t\n\t\t\t\t\t);\n\t\t}\n\t\t\n\t}", "private void viewOrder() {\r\n\r\n System.out.println();\r\n System.out.println(\" View Orders\");\r\n System.out.println();\r\n\r\n\r\n //asks user to select which variable they would like to search by\r\n Scanner scanner = new Scanner(System.in);\r\n\r\n System.out.println(\"What would you like to search by: \");\r\n System.out.println(\" a. Product ID \\n b. Customer Email \\n c. Customer Location \\n d. Order Date \\n\");\r\n String attribute = console.next();\r\n\r\n\r\n //if a is selected, enter the product id to search for\r\n if (attribute.equals(\"a\")){\r\n System.out.println(\"Enter the product id you would like to search for: \");\r\n String searchProductId = console.next();\r\n OrderItem pIdSearchingFor = null;\r\n int count1 = 0;\r\n for (int i=0; i<orderInfo.size(); i++ ){\r\n if (searchProductId.equalsIgnoreCase(orderInfo.get(i).getProductId())) { // if product id is found print data\r\n \tpIdSearchingFor = orderInfo.get(i); \r\n \r\n \r\n System.out.println();\r\n\r\n System.out.println(\"Product ID: \" + pIdSearchingFor.getProductId()+ \" \"\r\n + \"Quantity: \" + pIdSearchingFor.getQuantity()+ \" \"\r\n + \"Customer Email: \" + pIdSearchingFor.getCustomerEmail()+ \" \"\r\n + \"Customer Zip Code: \" + pIdSearchingFor.getCustomerLocation()+ \" \"\r\n + \"Order Date: \" + pIdSearchingFor.getOrderDate());\r\n \r\n \r\n }\r\n \r\n else{\r\n count1++; //if product id is not found, add to count and compare to array size. If greater than or equal display product id not found\r\n if(count1 >= orderInfo.size()){\r\n System.out.println();\r\n System.out.println(\"Product ID Not Found.\");\r\n System.out.println();\r\n }\r\n}\r\n }\r\n //prompt to continue viewing orders or exit program\r\n System.out.println();\r\n System.out.println(\"Would you like to continue viewing orders? Enter yes or no: \");\r\n String cont = console.next();\r\n if(cont.equalsIgnoreCase(\"yes\")){\r\n viewOrder();\r\n }\r\n\r\n }\r\n //if b is selected enter the customer email\r\n else if(attribute.equals(\"b\")) {\r\n System.out.println(\"Enter the Customer Email you would like to search for: \");\r\n String searchCustomerEmail = console.next();\r\n OrderItem custSearchingFor = null;\r\n int count2 = 0;\r\n for (int j=0; j<orderInfo.size(); j++ ){\r\n if (searchCustomerEmail.equalsIgnoreCase(orderInfo.get(j).getCustomerEmail())) { // if customer email is found print data\r\n custSearchingFor = orderInfo.get(j); \r\n\r\n \r\n System.out.println();\r\n\r\n System.out.println(\"Product ID: \" + custSearchingFor.getProductId()+ \" \"\r\n + \"Quantity: \" + custSearchingFor.getQuantity()+ \" \"\r\n + \"Customer Email: \" + custSearchingFor.getCustomerEmail()+ \" \"\r\n + \"Customer Zip Code: \" + custSearchingFor.getCustomerLocation()+ \" \"\r\n + \"Order Date: \" + custSearchingFor.getOrderDate());\r\n \r\n \r\n } \r\n else{\r\n count2++; //if email is not found, add to count and compare to array size. If greater than or equal display email not found\r\n if(count2 >= orderInfo.size()){\r\n System.out.println();\r\n System.out.println(\"Email Not Found.\");\r\n System.out.println();\r\n }\r\n \r\n }\r\n }\r\n //prompt to continue viewing orders or exit program\r\n System.out.println();\r\n System.out.println(\"Would you like to continue viewing orders? Enter yes or no: \");\r\n String cont = console.next();\r\n if(cont.equalsIgnoreCase(\"yes\")){\r\n viewOrder();\r\n }\r\n\r\n }\r\n //if c is selected enter the customer zip code\r\n else if(attribute.equals(\"c\")) {\r\n System.out.println(\"Enter the Customer ZIP code you would like to search for: \");\r\n String searchCustomerLoc = console.next();\r\n OrderItem locSearchingFor = null;\r\n int count3 = 0;\r\n for (int j=0; j<orderInfo.size(); j++ ){\r\n if (searchCustomerLoc.equalsIgnoreCase(orderInfo.get(j).getCustomerLocation())) { // if zip code is found display data\r\n \tlocSearchingFor = orderInfo.get(j); \r\n\r\n \r\n System.out.println();\r\n\r\n System.out.println(\"Product ID: \" + locSearchingFor.getProductId() + \" \"\r\n + \"Quantity: \" + locSearchingFor.getQuantity() + \" \"\r\n + \"Customer Email: \" + locSearchingFor.getCustomerEmail() + \" \"\r\n + \"Customer Zip Code: \" + locSearchingFor.getCustomerLocation() + \" \"\r\n + \"Order Date: \" + locSearchingFor.getOrderDate());\r\n\r\n }\r\n \r\n \r\n else{\r\n count3++; //if zip code is not found, add to count and compare to array size. If greater than or equal display zip code not found\r\n if(count3 >= orderInfo.size()){\r\n System.out.println();\r\n System.out.println(\"Zip Code Not Found.\");\r\n System.out.println();\r\n }\r\n }\r\n }\r\n //prompt to continue viewing orders or exit program\r\n System.out.println();\r\n System.out.println(\"Would you like to continue viewing orders? Enter yes or no: \");\r\n String cont = console.next();\r\n if(cont.equalsIgnoreCase(\"yes\")){\r\n viewOrder();\r\n }\r\n\r\n }\r\n\r\n //if d is selected enter the customer order date\r\n else if (attribute.equals(\"d\")){\r\n System.out.println(\"Enter the date of the order you would like to search for in the format(Year-month-day e.g. 2020-01-13): \");\r\n String searchOrderDate = console.next();\r\n OrderItem dateSearchingFor = null;\r\n int count4 = 0;\r\n for (int k=0; k<orderInfo.size(); k++ ){\r\n if (searchOrderDate.equalsIgnoreCase(orderInfo.get(k).getOrderDate())) { // if date is found display data\r\n \tdateSearchingFor = orderInfo.get(k); \r\n\r\n \r\n System.out.println();\r\n\r\n System.out.println(\"Product ID: \" + dateSearchingFor.getProductId()+ \" \"\r\n + \"Quantity: \" + dateSearchingFor.getQuantity() + \" \"\r\n + \"Customer Email: \" + dateSearchingFor.getCustomerEmail() + \" \"\r\n + \"Customer Zip Code: \" + dateSearchingFor.getCustomerLocation() + \" \"\r\n + \"Order Date: \" + dateSearchingFor.getOrderDate());}\r\n \r\n \r\n \r\n else{\r\n count4++; //if date is not found, add to count and compare to array size. If greater than or equal display date not found\r\n if(count4 >= orderInfo.size()){\r\n System.out.println();\r\n System.out.println(\"Order Date Not Found.\");\r\n System.out.println();\r\n }\r\n \r\n }\r\n }\r\n //prompt to continue viewing orders or exit program\r\n System.out.println();\r\n System.out.println(\"Would you like to continue viewing orders? Enter yes or no: \");\r\n String cont = console.next();\r\n if(cont.equalsIgnoreCase(\"yes\")){\r\n viewOrder();\r\n }\r\n }\r\n }", "public String buildFilterString(SearchCriteria search){\n System.out.println(search);\n\n int i = 0;\n if(search.getTitle().equals(\"title\")){\n i++;\n }\n if(search.getAuthor().equals(\"author\")){\n i++;\n }\n if(search.getPublisher().equals(\"publisher\")){\n i++;\n }\n if(search.getLanguage().equals(\"language\")){\n i++;\n }\n if(search.getFormat().equals(\"format\")){\n i++;\n }\n if(search.getIsbn10().equals(\"isbn10\")){\n i++;\n }\n if(search.getIsbn13().equals(\"isbn13\")){\n i++;\n }\n\n String filter = \"SELECT * from testdb.book WHERE\";\n System.out.println(filter);\n System.out.println(\"number of filters \" + i);\n if(search.getTitle().equals(\"title\")){\n i--;\n System.out.println(filter);\n\n filter += \" title LIKE '%\" + search.getSearch() + \"%'\";\n if(i>0){\n\n filter += \" OR\";\n\n }\n }\n if(search.getAuthor().equals(\"author\")){\n i--;\n filter += \" author LIKE '%\" + search.getSearch() + \"%'\";\n if(i>0){\n\n filter += \" OR\";\n\n }\n }\n if(search.getPublisher().equals(\"publisher\")){\n i--;\n filter += \" publisher LIKE '%\" + search.getSearch() + \"%'\";\n if(i>0){\n filter +=\" OR\";\n\n }\n }\n if(search.getLanguage().equals(\"language\")){\n i--;\n filter += \" language LIKE '%\" + search.getSearch() + \"%'\";\n if(i>0){\n filter += \" OR\";\n }\n }\n if(search.getFormat().equals(\"format\")){\n i--;\n filter += \" format LIKE '%\" + search.getSearch() + \"%'\";\n if(i>0){\n filter += \" OR\";\n }\n }\n if(search.getIsbn10().equals(\"isbn10\")){\n i--;\n filter += \" isbn10 LIKE '%\" + search.getSearch() + \"%'\";\n if(i>0){\n filter += \" OR\";\n }\n }\n if(search.getIsbn13().equals(\"isbn13\")){\n\n filter += \" isbn13 LIKE '%\" + search.getSearch() + \"%'\";\n\n }\n System.out.println(\"END \" + filter);\n return filter;\n }", "public static void main(String[] args) {\r\n System.out.println(\"Searching and sorting algorithms\");\r\n \r\n \r\n // TO-DO: Add code that tests the searching and sorting\r\n // methods.\r\n System.out.println(\"Selection sort.\");\r\n List<Integer> data = makeList(12);\r\n printList(data);\r\n System.out.println(\" **** \");\r\n selectionSort(data);\r\n printList(data);\r\n\r\n System.out.println(\" **** \");\r\n\r\n System.out.println(\"Insertion sort.\");\r\n data = makeList(12);\r\n printList(data);\r\n System.out.println(\" **** \");\r\n insertionSort(data);\r\n printList(data);\r\n\r\n System.out.println(\" **** \");\r\n\r\n System.out.println(\"Merge sort.\");\r\n data = makeList(12);\r\n printList(data);\r\n System.out.println(\" **** \");\r\n mergeSort(data);\r\n printList(data);\r\n }", "public static void main(String[] args) {\n String[] orgs={\"birlasoft\",\"ZOHO\",\"Cognizant\",\"infosys\",\"amazon\"};\n Selection.sort(orgs);\n for(String yet:orgs)\n {\n \t System.out.println(yet);\n }\n \t\t \n \n\t}", "Sort asc(QueryParameter parameter);", "public void printTheCatalog() {\n System.out.println(\"choose an option:\\n1)print all sorting by title\");\n System.out.println(\"2)print all sorting by author\\n3)print all sorting by Subject\");\n int option1 = input.nextInt();\n if (option1 == 1) {\n Collections.sort(cards, Card.OrderByTitle);\n System.out.println(\"books ordered by title: \" + cards);\n } else if (option1 == 2) {\n Collections.sort(cards, Card.OrderByAuthor);\n System.out.println(\"books ordered by Author: \" + cards);\n } else if (option1 == 3) {\n Collections.sort(cards, Card.OrderBySubject);\n System.out.println(\"books ordered by Subject: \" + cards);\n }\n }", "Page<ExamPackage> getPageByUsername(String username, int pageNo, int pageSize, Sort sort);", "private static void sortingOptions(ArrayList<Person> p) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tArrayList<Person> personList = p;\n\t\tboolean again = true;\n\t\twhile (again) {\n\t\t\tagain = false;\n\t\t\tSystem.out.println(\"Ascending or descending?\\n\" + \"1: Ascending\\n\" + \"2: Descending\");\n\t\t\tint input = scan.nextInt();\n\n\t\t\tswitch (input) {\n\t\t\tcase 1:\n\t\t\t\tprintDataFormat(personList);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tCollections.reverse(personList);\n\t\t\t\tprintDataFormat(personList);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tagain = true;\n\t\t\t\tSystem.out.println(\"Enter either 1 or 2\");\n\t\t\t}\n\t\t}\n\t\tscan.close();\n\t}", "public static void main(String[] args) {\n ArrayList<SortObjects> a = new ArrayList<SortObjects>();\n\n SortObjects o = new SortObjects(\"Latha\", 23, 26000);\n SortObjects o2= new SortObjects(\"Ramya\", 20, 11000);\n SortObjects o3= new SortObjects(\"Kalai\", 29, 30000);\n SortObjects o4= new SortObjects(\"Vidya\", 24, 25000);\n a.add(o);\n a.add(o2);\n a.add(o3);\n a.add(o4);\n SortComparator s = new SortComparator();\n a.sort(s);\n System.out.println(a);\n \n \n\n\t}", "private String doSortOrder(SlingHttpServletRequest request) {\n RequestParameter sortOnParam = request.getRequestParameter(\"sortOn\");\n RequestParameter sortOrderParam = request.getRequestParameter(\"sortOrder\");\n String sortOn = \"sakai:filename\";\n String sortOrder = \"ascending\";\n if (sortOrderParam != null\n && (sortOrderParam.getString().equals(\"ascending\") || sortOrderParam.getString()\n .equals(\"descending\"))) {\n sortOrder = sortOrderParam.getString();\n }\n if (sortOnParam != null) {\n sortOn = sortOnParam.getString();\n }\n return \" order by @\" + sortOn + \" \" + sortOrder;\n }", "@GET\n @Produces({ \"application/json\" })\n public abstract Response get(@QueryParam(\"sort\") String sort);", "private void addSortingPagination(Map params, String entity, String dir, String sort, int start, int limit,\n\t\t\tint page) {\n\n\t\tparams.put(IReportDAO.ENTITY, entity);\n\t\tparams.put(IReportDAO.DIR, dir);\n\t\tparams.put(IReportDAO.SORT_COLUMN, sort);\n\t\tparams.put(IReportDAO.START_INDEX, start);\n\t\tparams.put(IReportDAO.LIMIT, limit);\n\t\tparams.put(IReportDAO.PAGE, page);\n\t}", "public static void main(String[] args) {\n\t\tArrayList<Employee> list= new ArrayList<Employee>();\n\t\t\n\t\tlist.add(new Employee(3,6000,\"vinod\"));\n\t\tlist.add(new Employee(6,7500,\"Rangu\"));\n\t\tlist.add(new Employee(1,9000,\"kittu\"));\n\t\tlist.add(new Employee(5,5000,\"bunny\"));\n\t\t\n\t\tCollections.sort(list, new NameComparator());\n\t\t\n\t\tIterator it = list.iterator();\n\t\t\n\t\twhile(it.hasNext()){\n\t\t\tEmployee emp = (Employee)it.next();\n\t\t\tSystem.out.println(emp.id+\" \"+emp.salaray+\" \"+emp.name);\n\t\t\t\n\t\t\t/*Collections.sort(list, new SalaryComparator());\n\t\t\t\n\t\t\tIterator it = list.iterator();\n\t\t\t\n\t\t\twhile(it.hasNext()){\n\t\t\t\tEmployee emp = (Employee)it.next();\n\t\t\t\tSystem.out.println(emp.id+\" \"+emp.salaray+\" \"+emp.name);\n\t\t}*/\n\t}\n\t}", "public String printSortedResult() {\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tsb.append(printStartNumberAndName() + \"; \");\n\t\tsb.append(printInfo());\n\t\t\n\t\tsb.append(printTotalTime());\n\t\t\n\t\tsb.append(errorHandler.print());\n\t\t\n\t\treturn sb.toString();\n\t}", "GeneralSearchForm searchPurchaseOrderHeadersPaging(GeneralSearchForm searchForm);", "Page<ExamPackage> searchListByUsernameAuthor(String username, int categoryID, int pageNo, int pageSize,Sort sort);", "public static void main(String args[]) {\n Order ord1 = new Order(101, 203.34f, \"11/19/2017\", \"11/20/2017\", \"Sony\");\n Order ord2 = new Order(102, 439.49f, \"11/19/2017\", \"11/20/2017\",\"Hitachi\");\n Order ord3 = new Order(103, 611.31f,\"11/19/2017\", \"11/20/2017\", \"Philips\");\n\n //putting Objects into Collection to sort\n List<Order> orders = new ArrayList<Order>();\n orders.add(ord3);\n orders.add(ord1);\n orders.add(ord2);\n orders.add(ord3);\n orders.add(ord1);\n\n //printing unsorted collection\n System.out.println(\"Unsorted Collection : \" + orders);\n\n UniqueList( orders );\n //Sorting Order Object on natural order - ascending\n Collections.sort(orders);\n\n //printing sorted collection\n System.out.println(\"List of UNIQUE Order object sorted in natural order : \" + orders);\n\n // Sorting object in descending order in Java\n Collections.sort(orders, Collections.reverseOrder());\n System.out.println(\"List of object sorted in descending order : \" + orders);\n\n //Sorting object using Comparator in Java\n Collections.sort(orders, new Order.OrderByAmount());\n System.out.println(\"List of Order object sorted using Comparator - amount : \" + orders);\n\n // Comparator sorting Example - Sorting based on customer\n Collections.sort(orders, new Order.OrderByVendor());\n System.out.println(\"Collection of Orders sorted using Comparator - by vendor : \" + orders);\n }", "public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"chromedriver\");\n\t\tWebDriver driver=new ChromeDriver();\n\t\tdriver.get(\"https://rahulshettyacademy.com/seleniumPractise/#/offers\");\n\t\tdriver.findElement(By.cssSelector(\"tr th:nth-child(3)\")).click();\n\t\t//driver.findElement(By.cssSelector(\"tr th:nth-child(3)\")).click();\n\t\tList<WebElement> list1=driver.findElements(By.cssSelector(\"tr td:nth-child(3)\"));\n sort(list1,\"desc\",\"integer\");\n\t}", "public static void main(String[] args) {\n\r\n\t\tList<Library> list=new ArrayList<Library>();\r\n\t\tlist.add(new Library(100, \"bhagyesh\"));\r\n\t\tlist.add(new Library(4, \"patel\"));\r\n\t\tlist.add(new Library(5, \"sid\"));\r\n\t\tlist.add(new Library(78, \"naitik\"));\r\n\t\tlist.add(new Library(39, \"amit\"));\r\n\t\t\r\n \tlist.stream().forEach(p -> System.out.println(p.getName()));\r\n \tlist.sort(Comparator.comparing(Library::getName));\r\n \tlist.stream().forEach(p -> System.out.println(p.getName()));\r\n \r\n \t\r\n \t\r\n \t\r\n\t}", "public void select(int first, int pageSize, String sortField, Object filterValue) throws SQLException, NamingException, IOException {\n\t\n\t \t\tContext initContext = new InitialContext(); \n\t \tDataSource ds = (DataSource) initContext.lookup(JNDI);\n\t \t\tcon = ds.getConnection();\n\t \t//Reconoce la base de datos de conección para ejecutar el query correspondiente a cada uno\n\t \t\tDatabaseMetaData databaseMetaData = con.getMetaData();\n\t \t\tproductName = databaseMetaData.getDatabaseProductName();//Identifica la base de datos de conección\n\n\t \t\t\n\t \t\tString query = \"\";\n\t \t\t \t\n\t \t\tif(pcodcia==null){\n\t \t\t\tpcodcia = \" - \";\n\t }\n\t if(pcodcia==\"\"){\n\t \tpcodcia = \" - \";\n\t }\n\t \n\t \n\t \t\t//String[] veccodcia = pcodcia.split(\"\\\\ - \", -1);\n\t \n\t switch ( productName ) {\n\t case \"Oracle\":\n\t \t//Consulta paginada\n\t \tquery = \" select * from \";\n\t \tquery += \" ( select query.*, rownum as rn from\";\n\t\t \t\tquery += \" ( SELECT b.nomcia2, trim(a.p_codcia), trim(a.coduser), a.cedula, trim(a.cluser), trim(a.mail), trim(a.nbr), trim(a.codrol)||' - '||trim(c.desrol), a.grupo\";\n\t\t query += \" FROM autos01 a, pnt001 b, seg002 c\";\n\t\t query += \" where a.p_codcia=b.codcia\";\n\t\t query += \" and a.grupo=b.grupo\";\n\t\t query += \" and a.codrol=c.codrol\";\n\t\t query += \" and a.grupo=c.grupo\";\n\t\t query += \" and b.nomcia2||a.coduser||a.cedula like '%\" + ((String) filterValue).toUpperCase() + \"%'\";\n\t\t //query += \" and a.p_codcia like '\" + veccodcia[0] + \"%'\"; \n\t\t query += \" and a.grupo = '\" + grupo + \"'\";\n\t\t \t\tquery += \" order by \" + sortField.replace(\"v\", \"\") + \") query\";\n\t\t query += \" ) where rownum <= \" + pageSize ;\n\t\t query += \" and rn > (\" + first + \")\";\n\n\t break;\n\t case \"PostgreSQL\":\n\t \t//Consulta paginada\n\t\t \t\tquery = \"SELECT b.nomcia2, trim(a.p_codcia), trim(a.coduser), CAST(a.cedula AS text), trim(a.cluser), trim(a.mail), trim(a.nbr), trim(a.codrol)||' - '||trim(c.desrol), a.grupo\";\n\t\t query += \" FROM autos01 a, pnt001 b, seg002 c\";\n\t\t query += \" where a.p_codcia=b.codcia\";\n\t\t query += \" and a.grupo=b.grupo\";\n\t\t query += \" and a.codrol=c.codrol\";\n\t\t query += \" and a.grupo=c.grupo\";\n\t\t query += \" and b.nomcia2||a.coduser||a.cedula like '%\" + ((String) filterValue).toUpperCase() + \"%'\";\n\t\t //query += \" and a.p_codcia like '\" + veccodcia[0] + \"%'\"; \n\t\t query += \" and CAST(a.grupo AS text) = '\" + grupo + \"'\";\n\t\t query += \" order by \" + sortField.replace(\"v\", \"\") ;\n\t\t query += \" LIMIT \" + pageSize;\n\t\t query += \" OFFSET \" + first;\n\t break; \t\t \n\t \t\t}\n\t\n\t \t\t\n\t \t\t\n\t \t\t\n\t\n\t\n\t \n\t pstmt = con.prepareStatement(query);\n\t //System.out.println(query);\n\t \t\t\n\t ResultSet r = pstmt.executeQuery();\n\t \n\t \n\t while (r.next()){\n\t \tRegistros select = new Registros();\n\t \tselect.setVpcodcia(r.getString(1));\n\t select.setVpcodciadescia(r.getString(2) + \" - \" + r.getString(1));\n\t select.setVcedula(r.getString(4));\n\t select.setVcoduser(r.getString(3));\n\t select.setVcluser(r.getString(5));\n\t select.setVmail(r.getString(6));\n\t select.setPcodcia(r.getString(2));\n\t select.setVnbr(r.getString(7));\n\t select.setVcodrol(r.getString(8));\n\t select.setVgrupo(r.getString(9));\n\t \t//Agrega la lista\n\t \tlist.add(select);\n\t }\n\t //Cierra las conecciones\n\t pstmt.close();\n\t con.close();\n\t r.close();\n\t \n\t \t}", "Results sortResults(FilterSpecifier.ListBy listBy, SortSpecifier sortspec) throws SearchServiceException;", "public String sortBy();", "public static void main(String[] args) {\n\n\t\tArrayList<String> listOfCountries = new ArrayList<String>();\n\t\tlistOfCountries.add(\"India\");\n\t\tlistOfCountries.add(\"US\");\n\t\tlistOfCountries.add(\"China\");\n\t\tlistOfCountries.add(\"Denmark\");\n\t\t\n\t\t// unsorted list\n\t\tSystem.out.println(\"Before Sorting: \");\n\t\tfor(String counter: listOfCountries)\n\t\t\tSystem.out.println(counter);\n\t\t\n\t\t// sort statement\n\t\tCollections.sort(listOfCountries);\n\t\t\n\t\t// sorted list\n\t\tSystem.out.println(\"\\nAfter Sorting: \");\n\t\tfor(String counter: listOfCountries)\n\t\t\tSystem.out.println(counter);\n\t}", "public void filterAndPrint(List<Student> students, Predicate<Student> filter, Consumer<Student> action, Comparator<Student> sort) {\n\t\t// I have filter the list and sorted it, Also forLoop print the result.\n\t\tstudents.stream().filter(filter).sorted(sort).forEach(action);\n\t}", "java.lang.String getOrderBy();", "void onPositiveResult(@Nullable Sort sort, boolean isSortAsc, @Nullable ArrayList<String> selectedFilters);", "private void searchDisplay()\r\n {\r\n System.out.println();\r\n System.out.println(\"------------ Search Menu ----------------\");\r\n System.out.println(\"(1) By Registration Number\");\r\n System.out.println(\"(2) By Car Make and Car Model\");\r\n System.out.println(\"(3) By Age\");\r\n System.out.println(\"(4) By Price (range)\");\r\n System.out.println(\"(5) Back to Main Menu\");\r\n }", "private int getSortValue() {\n\t\tint sortBy = DisplaySpecServices.ORDERDATESORT; // default sort option -\n\t\t// ORDERDATE\n\t\tif (this.searchNotSort == false) {\n\t\t\ttry {\n\t\t\t\tsortBy = Integer.parseInt(this.sortOption);\n\t\t\t} catch (NumberFormatException nfe) {\n\t\t\t\tsortBy = DisplaySpecServices.ORDERDATESORT; // default sort\n\t\t\t\t// option\n\t\t\t}\n\t\t} else {\n\t\t\tString searchOption = this.getSearchOption();\n\n\t\t\ttry {\n\t\t\t\tint searchOptValue = Integer.parseInt(searchOption);\n\t\t\t\tswitch (searchOptValue) {\n\t\t\t\tcase DisplaySpecServices.ORDERDATEFILTER:\n\t\t\t\t\tsortBy = DisplaySpecServices.ORDERDATESORT;\n\t\t\t\t\tthis.sortOption = String.valueOf(sortBy);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DisplaySpecServices.REPUBLICATIONDATEFILTER:\n\t\t\t\t\tsortBy = DisplaySpecServices.REPUBLICATIONDATESORT;\n\t\t\t\t\tthis.sortOption = String.valueOf(sortBy);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DisplaySpecServices.PUBLICATIONTITLEFILTER:\n\t\t\t\t\tsortBy = DisplaySpecServices.PUBLICATIONTITLESORT;\n\t\t\t\t\tthis.sortOption = String.valueOf(sortBy);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DisplaySpecServices.ORDERDETAILIDFILTER:\n\t\t\t\t\tsortBy = DisplaySpecServices.ORDERDETAILIDSORT;\n\t\t\t\t\tthis.sortOption = String.valueOf(sortBy);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DisplaySpecServices.PERMISSIONTYPEFILTER:\n\t\t\t\t\tsortBy = DisplaySpecServices.PERMISSIONTYPESORT; // 2ndary\n\t\t\t\t\t// sort\n\t\t\t\t\t// Order\n\t\t\t\t\t// Date\n\t\t\t\t\tthis.sortOption = String.valueOf(sortBy);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DisplaySpecServices.PERMISSIONSTATUSFILTER:\n\t\t\t\t\tsortBy = DisplaySpecServices.PERMISSIONSTATUSSORT; // 2ndary\n\t\t\t\t\t// sort\n\t\t\t\t\t// Order\n\t\t\t\t\t// Date\n\t\t\t\t\tthis.sortOption = String.valueOf(sortBy);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DisplaySpecServices.BILLINGSTATUSFILTER:\n\t\t\t\t\tsortBy = DisplaySpecServices.ORDERDATESORT;\n\t\t\t\t\tthis.sortOption = String.valueOf(sortBy);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DisplaySpecServices.YOURREFERENCEFILTER:\n\t\t\t\t\tsortBy = DisplaySpecServices.YOURREFERENCESORT;\n\t\t\t\t\tthis.sortOption = String.valueOf(sortBy);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DisplaySpecServices.INVOICENUMBERFILTER:\n\t\t\t\t\tsortBy = DisplaySpecServices.INVOICENUMBERSORT;\n\t\t\t\t\tthis.sortOption = String.valueOf(sortBy);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DisplaySpecServices.REPUBLICATIONTITLEFILTER:\n\t\t\t\t\tsortBy = DisplaySpecServices.REPUBLICATIONTITLESORT;\n\t\t\t\t\tthis.sortOption = String.valueOf(sortBy);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DisplaySpecServices.REPUBLICATIONPUBLISHERFILTER:\n\t\t\t\t\tsortBy = DisplaySpecServices.REPUBLICATIONPUBLISHERSORT;\n\t\t\t\t\tthis.sortOption = String.valueOf(sortBy);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DisplaySpecServices.LASTUPDATEDATESORT:\n\t\t\t\t\tsortBy = DisplaySpecServices.LASTUPDATEDATESORT;\n\t\t\t\t\tthis.sortOption = String.valueOf(sortBy);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tsortBy = DisplaySpecServices.ORDERDATESORT; // default\n\t\t\t\t\tthis.sortOption = String.valueOf(sortBy);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} catch (NumberFormatException nfe) {\n\t\t\t\tsortBy = DisplaySpecServices.ORDERDATESORT; // default\n\t\t\t\tthis.sortOption = String.valueOf(sortBy);\n\t\t\t}\n\t\t}\n\t\treturn sortBy;\n\t}", "public static void main(String[] args) {\n\r\n\t\tAlunoTreinar alunoTreinar = new AlunoTreinar();\r\n\t\t\r\n\t\talunoTreinar.setNome(\"Teste\");\r\n\t\talunoTreinar.setCpf(123);\r\n\t\talunoTreinar.setNome(\"Albert\");\r\n\t\talunoTreinar.setCpf(321)\r\n\t\t\r\n\t\tList<String> lista = new ArrayList<>();\r\n\t\tlista.add(alunoTreinar.toString());\r\n\t\t\r\n\t\tSystem.out.print(lista.get(0));\r\n\t\t\r\n\t\tCollections.sort(lista);\r\n\t\t\r\n\t\tfor (alunoTreinar AlunoTreinar : lista) {\r\n\t\t\t\t\t\t\r\n\t\t\tSystem.out.print(lista);\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public static void userSort(ArrayList<FileData> fromFile, int primary_sort, int secondary_sort, int primary_order, int secondary_order)\n {\n \n // user wants to sort by primary = state code and secondary = county code\n if(primary_sort == 1 && secondary_sort == 2) \n {\n if(primary_order == 1 && secondary_order == 1){// user wants both primary and secondary in ascending order\n Collections.sort(fromFile, new Sort_State_Code());\n Collections.sort(fromFile,new Sort_County_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo()); // print the sorted information by state and county code\n }\n }\n else if(primary_order == 2 && secondary_order == 2){ // user wants both primary and secondary in decending order\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n Collections.sort(fromFile, new Sort_State_Code().reversed()); \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){// primary is ascending\n Collections.sort(fromFile, new Sort_State_Code());\n Collections.sort(fromFile,new Sort_County_Code().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){//primary is descending\n Collections.sort(fromFile, new Sort_State_Code().reversed()); \n Collections.sort(fromFile,new Sort_County_Code()); \n for(int i=0; i<fromFile.size(); i++){\n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n // user wants to sort by primary = county code and secondary = state code\n if(primary_sort == 2 && secondary_sort == 1){\n if(primary_order == 1 && secondary_order == 1){\n //primary and seconary is ascending\n Collections.sort(fromFile, new Sort_State_Code());\n Collections.sort(fromFile,new Sort_County_Code());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order == 2 && secondary_order == 2){\n //both descending\n Collections.sort(fromFile, new Sort_State_Code().reversed()); \n Collections.sort(fromFile,new Sort_County_Code().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){//primary is ascending\n Collections.sort(fromFile, new Sort_State_Code().reversed()); \n Collections.sort(fromFile,new Sort_County_Code()); // primary sort\n \n for(int i=0; i<fromFile.size(); i++){\n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){//primary is descending\n Collections.sort(fromFile, new Sort_State_Code());\n Collections.sort(fromFile,new Sort_County_Code().reversed()); // primary sort\n for(int i=0; i<fromFile.size(); i++){\n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==1&&secondary_sort==3){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n Collections.sort(fromFile,new Sort_State_Name());\n Collections.sort(fromFile, new Sort_State_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n Collections.sort(fromFile, new Sort_State_Code().reversed()); \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n Collections.sort(fromFile, new Sort_State_Code()); \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo()); // print the sorted information by state and county code\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Name());\n Collections.sort(fromFile, new Sort_State_Code().reversed()); \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo()); // print the sorted information by state and county code\n } \n } \n }\n \n if(primary_sort==3&&secondary_sort==1){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_State_Code());\n Collections.sort(fromFile,new Sort_State_Name());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile, new Sort_State_Code().reversed());\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile,new Sort_State_Code().reversed());\n Collections.sort(fromFile, new Sort_State_Name()); \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo()); // print the sorted information by state and county code\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Code());\n Collections.sort(fromFile, new Sort_State_Name().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==1&&secondary_sort==4){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n Collections.sort(fromFile, new Sort_County_Name());\n Collections.sort(fromFile,new Sort_State_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n Collections.sort(fromFile,new Sort_State_Code().reversed());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile,new Sort_County_Name().reversed());\n Collections.sort(fromFile, new Sort_State_Code()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Name());\n Collections.sort(fromFile, new Sort_State_Code().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==4&&secondary_sort==1){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n Collections.sort(fromFile, new Sort_State_Code());\n Collections.sort(fromFile,new Sort_County_Name());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n \n Collections.sort(fromFile, new Sort_State_Code().reversed());\n Collections.sort(fromFile,new Sort_County_Name().reversed());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile,new Sort_State_Code().reversed());\n Collections.sort(fromFile, new Sort_County_Name()); \n for(int i=0; i<fromFile.size(); i++){\n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Code());\n Collections.sort(fromFile, new Sort_County_Name().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n System.out.println(fromFile.get(i).printInfo());\n } \n } \n } \n if(primary_sort==1&&secondary_sort==5){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n Collections.sort(fromFile, new SortFirstConfirmCount());\n Collections.sort(fromFile,new Sort_State_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_State_Code().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_State_Code());\n \n for(int i=0; i<fromFile.size(); i++){\n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortFirstConfirmCount());\n Collections.sort(fromFile, new Sort_State_Code().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==5&&secondary_sort==1){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n Collections.sort(fromFile,new Sort_State_Code());\n Collections.sort(fromFile, new SortFirstConfirmCount());\n for(int i=0; i<fromFile.size(); i++){\n System.out.println(fromFile.get(i).printInfo());\n } \n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile, new Sort_State_Code().reversed());\n Collections.sort(fromFile,new SortFirstConfirmCount().reversed());\n for(int i=0; i<fromFile.size(); i++){\n System.out.println(fromFile.get(i).printInfo());\n } \n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile,new Sort_State_Code().reversed());\n Collections.sort(fromFile, new SortFirstConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo()); // print the sorted information \n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Code());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed()); \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo()); // print the sorted information \n } \n } \n }\n \n \n if(primary_sort==1&&secondary_sort==6){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortSecondConfirmCount());\n Collections.sort(fromFile,new Sort_State_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo()); \n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_State_Code().reversed());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo()); \n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_State_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo()); // print the sorted information by state and county code\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortSecondConfirmCount());\n Collections.sort(fromFile, new Sort_State_Code().reversed()); \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo()); // print the sorted information by state and county code\n } \n } \n }\n \n if(primary_sort==6&&secondary_sort==1){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n Collections.sort(fromFile,new Sort_State_Code());\n Collections.sort(fromFile, new SortSecondConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile, new Sort_State_Code().reversed());\n Collections.sort(fromFile,new SortSecondConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile,new Sort_State_Code().reversed());\n Collections.sort(fromFile, new SortSecondConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Code());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==1&&secondary_sort==7){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortThirdConfirmCount());\n Collections.sort(fromFile,new Sort_State_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_State_Code().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_State_Code());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortThirdConfirmCount());\n Collections.sort(fromFile, new Sort_State_Code().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==7&&secondary_sort==1){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n Collections.sort(fromFile,new Sort_State_Code());\n Collections.sort(fromFile, new SortThirdConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile, new Sort_State_Code().reversed());\n Collections.sort(fromFile,new SortThirdConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile,new Sort_State_Code().reversed());\n Collections.sort(fromFile, new SortThirdConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Code());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==1&&secondary_sort==8){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortFourthConfirmCount());\n Collections.sort(fromFile,new Sort_State_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_State_Code().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_State_Code());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortFourthConfirmCount());\n Collections.sort(fromFile, new Sort_State_Code().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n \n if(primary_sort==8&&secondary_sort==1){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n Collections.sort(fromFile,new Sort_State_Code());\n Collections.sort(fromFile, new SortFourthConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile, new Sort_State_Code().reversed());\n Collections.sort(fromFile,new SortFourthConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile,new Sort_State_Code().reversed());\n Collections.sort(fromFile, new SortFourthConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Code());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==2&&secondary_sort==3){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_State_Name());\n Collections.sort(fromFile,new Sort_County_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n Collections.sort(fromFile, new Sort_County_Code().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_State_Name().reversed());\n Collections.sort(fromFile,new Sort_County_Code());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Name());\n Collections.sort(fromFile, new Sort_County_Code().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==3&&secondary_sort==2){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_County_Code());\n Collections.sort(fromFile,new Sort_State_Name());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n Collections.sort(fromFile, new Sort_State_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_County_Code().reversed());\n Collections.sort(fromFile,new Sort_State_Name());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Code());\n Collections.sort(fromFile, new Sort_State_Name().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==2&&secondary_sort==4){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_County_Name());\n Collections.sort(fromFile,new Sort_County_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_County_Name().reversed());\n Collections.sort(fromFile, new Sort_County_Code().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n Collections.sort(fromFile,new Sort_County_Code());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Name());\n Collections.sort(fromFile, new Sort_County_Code().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==4&&secondary_sort==2){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_County_Code());\n Collections.sort(fromFile,new Sort_County_Name());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_County_Code().reversed());\n Collections.sort(fromFile,new Sort_County_Name());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Code());\n Collections.sort(fromFile, new Sort_County_Name().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==2&&secondary_sort==5){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n \n Collections.sort(fromFile,new SortFirstConfirmCount());\n Collections.sort(fromFile, new Sort_County_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n \n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n \n Collections.sort(fromFile,new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_County_Code());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n \n Collections.sort(fromFile, new SortFirstConfirmCount());\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==5&&secondary_sort==2){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_County_Code());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_County_Code().reversed());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Code());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n } \n \n if(primary_sort==2&&secondary_sort==6){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n \n Collections.sort(fromFile,new SortSecondConfirmCount());\n Collections.sort(fromFile, new Sort_County_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n \n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n \n Collections.sort(fromFile,new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_County_Code());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n \n Collections.sort(fromFile, new SortSecondConfirmCount());\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n } \n if(primary_sort==6&&secondary_sort==2){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_County_Code());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_County_Code().reversed());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Code());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n } \n \n if(primary_sort==2&&secondary_sort==7){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n \n Collections.sort(fromFile,new SortThirdConfirmCount());\n Collections.sort(fromFile, new Sort_County_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n \n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n \n Collections.sort(fromFile,new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_County_Code());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n \n Collections.sort(fromFile, new SortThirdConfirmCount());\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n } \n if(primary_sort==7&&secondary_sort==2){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_County_Code());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_County_Code().reversed());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Code());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==2&&secondary_sort==8){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n \n Collections.sort(fromFile,new SortFourthConfirmCount());\n Collections.sort(fromFile, new Sort_County_Code());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n \n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n \n Collections.sort(fromFile,new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_County_Code());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n \n Collections.sort(fromFile, new SortFourthConfirmCount());\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n } \n if(primary_sort==8&&secondary_sort==2){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_County_Code());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_County_Code().reversed());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_County_Code().reversed());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Code());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed()); \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n } \n \n if(primary_sort==3&&secondary_sort==4){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n \n Collections.sort(fromFile,new Sort_County_Name());\n Collections.sort(fromFile, new Sort_State_Name());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n \n Collections.sort(fromFile, new Sort_County_Name().reversed());\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n \n Collections.sort(fromFile,new Sort_County_Name().reversed());\n Collections.sort(fromFile, new Sort_State_Name());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n \n Collections.sort(fromFile, new Sort_County_Name());\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==4&&secondary_sort==3){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_State_Name());\n Collections.sort(fromFile,new Sort_County_Name());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_State_Name().reversed());\n Collections.sort(fromFile,new Sort_County_Name());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Name());\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==3&&secondary_sort==5){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n \n Collections.sort(fromFile,new SortFirstConfirmCount());\n Collections.sort(fromFile, new Sort_State_Name());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n \n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n \n Collections.sort(fromFile,new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_State_Name());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n \n Collections.sort(fromFile, new SortFirstConfirmCount());\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==5&&secondary_sort==3){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_State_Name());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_State_Name().reversed());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Name());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==3&&secondary_sort==6){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n Collections.sort(fromFile, new Sort_State_Name());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n \n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n \n Collections.sort(fromFile,new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_State_Name());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile, new SortSecondConfirmCount());\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==6&&secondary_sort==3){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_State_Name());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_State_Name().reversed());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Name());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==3&&secondary_sort==7){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n \n Collections.sort(fromFile,new SortThirdConfirmCount());\n Collections.sort(fromFile, new Sort_State_Name());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n \n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n \n Collections.sort(fromFile,new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_State_Name());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n \n Collections.sort(fromFile, new SortThirdConfirmCount());\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==7&&secondary_sort==3){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_State_Name());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_State_Name().reversed());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Name());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==3&&secondary_sort==8){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n \n Collections.sort(fromFile,new SortFourthConfirmCount());\n Collections.sort(fromFile, new Sort_State_Name());\n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n \n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n \n Collections.sort(fromFile,new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_State_Name());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n \n Collections.sort(fromFile, new SortFourthConfirmCount());\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==8&&secondary_sort==3){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_State_Name());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_State_Name().reversed());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_State_Name().reversed());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_State_Name());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==4&&secondary_sort==5){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortFirstConfirmCount());\n Collections.sort(fromFile,new Sort_County_Name());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_County_Name());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortFirstConfirmCount());\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==5&&secondary_sort==4){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_County_Name());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_County_Name().reversed());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Name());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==4&&secondary_sort==6){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortSecondConfirmCount());\n Collections.sort(fromFile,new Sort_County_Name());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_County_Name());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortSecondConfirmCount());\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==6&&secondary_sort==4){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_County_Name());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_County_Name().reversed());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Name());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==4&&secondary_sort==7){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortThirdConfirmCount());\n Collections.sort(fromFile,new Sort_County_Name());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_County_Name());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortThirdConfirmCount());\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==7&&secondary_sort==4){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_County_Name());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_County_Name().reversed());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Name());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==4&&secondary_sort==8){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortFourthConfirmCount());\n Collections.sort(fromFile,new Sort_County_Name());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile,new Sort_County_Name());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortFourthConfirmCount());\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==8&&secondary_sort==4){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new Sort_County_Name());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new Sort_County_Name().reversed());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new Sort_County_Name().reversed());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new Sort_County_Name());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==5&&secondary_sort==6){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortSecondConfirmCount());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortSecondConfirmCount());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==6&&secondary_sort==5){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortFirstConfirmCount());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortFirstConfirmCount());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==5&&secondary_sort==7){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortThirdConfirmCount());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortThirdConfirmCount());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==7&&secondary_sort==5){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortFirstConfirmCount());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortFirstConfirmCount());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==5&&secondary_sort==8){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortFourthConfirmCount());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile,new SortFirstConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortFourthConfirmCount());\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n \n if(primary_sort==8&&secondary_sort==5){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortFirstConfirmCount());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortFirstConfirmCount().reversed());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortFirstConfirmCount());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==6&&secondary_sort==7){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortThirdConfirmCount());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortThirdConfirmCount());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==7&&secondary_sort==6){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortSecondConfirmCount());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortSecondConfirmCount());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==6&&secondary_sort==8){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortFourthConfirmCount());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile,new SortSecondConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortFourthConfirmCount());\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==8&&secondary_sort==6){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortSecondConfirmCount());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortSecondConfirmCount().reversed());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortSecondConfirmCount());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==7&&secondary_sort==8){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortFourthConfirmCount());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n Collections.sort(fromFile,new SortThirdConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order==2){\n //primary is descending\n Collections.sort(fromFile,new SortFourthConfirmCount());\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n if(primary_sort==8&&secondary_sort==7){\n if(primary_order==1&&secondary_order==1){\n //primary and second is ascending\n \n Collections.sort(fromFile, new SortThirdConfirmCount());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==2&&secondary_order==2){\n //both descending\n Collections.sort(fromFile,new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n \n \n for(int i=0; i<fromFile.size(); i++){ \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n \n else if(primary_order==1){\n //secondary is descending\n Collections.sort(fromFile, new SortThirdConfirmCount().reversed());\n Collections.sort(fromFile,new SortFourthConfirmCount());\n \n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n }\n }\n else if(primary_order == 2){\n //primary is descending\n Collections.sort(fromFile,new SortThirdConfirmCount());\n Collections.sort(fromFile, new SortFourthConfirmCount().reversed());\n \n for(int i=0; i<fromFile.size(); i++){\n \n System.out.println(fromFile.get(i).printInfo());\n } \n } \n }\n }", "@When(\"^Order and print the products by name ascendant$\")\n public void order_and_print_the_products_by_name_ascendant() throws Throwable {\n \tint i=0;\n \tfor(i=0;i<5;i++) { \t\t\n \t\t\n \t\tSystem.out.println(pageHome.product2().get(i).getText());\n\n \t}\n }", "static void sort(String[] array, int count) { //method to sort and format the array by alphabetical order\n String temp;\n for (int i = 0; i < count; i++) { //iterates through and compares elements in the array to sort them\n for (int j = i + 1; j < count; j++) { \n if (array[i].compareTo(array[j]) > 0) {\n temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n }\n }\n }\n if (bothSort && !firstDone)\n System.out.println(\"\\t\\tTESTER\\t\\t\\t\\t\\t\\t CODER\"); //If its printing both by Coder and Tester on the first run\n else if (bothSort && firstDone)\n System.out.println(\"\\t\\tCODER\\t\\t\\t\\t\\t\\t TESTER\"); //if printin by both coder and tester on the second run\n else if (testerSort)\n System.out.println(\"\\t\\tTESTER\\t\\t\\t\\t\\t\\t CODER\"); //if only printing by tester\n else\n System.out.println(\"\\t\\tCODER\\t\\t\\t\\t\\t\\t TESTER\"); //if only printing by coder\n if (arguments.length > 1 && arguments[1].equals(\"--last-name\"))\n System.out.format(\"%-50s %-50s\", (String.format(\"%-15s %-15s %-15s\", \"Last Name\", \"First Name\", \"Block\")), (String.format(\"%-15s %-15s %-15s\", \"Last Name\", \"First Name\",\"Block\")));\n else\n System.out.format(\"%-50s %-50s\", (String.format(\"%-15s %-15s %-15s\", \"First Name\", \"Last Name\", \"Block\")), (String.format(\"%-15s %-15s %-15s\", \"First Name\", \"Last Name\",\"Block\")));\n System.out.print(\"\\n----------------------------------------------------------------------------------------\");\n for (int i = 0; i < count; i++) { //print each non-null array element\n if (array[i] != null)\n System.out.print(array[i]);\n }\n System.out.print(\"\\n\");\n firstDone = true;\n }", "protected void doQuery2(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\n\t\tint orderNo = 0;\r\n\t\tif (null != request.getParameter(\"orderNo\")) {\r\n\t\t\torderNo = Integer.parseInt(request.getParameter(\"orderNo\"));\r\n\t\t\t// orderNo = new String(orderNo.getBytes(\"iso-8859-1\"), \"utf-8\");\r\n\t\t\tSystem.out.println(orderNo);\r\n\t\t}\r\n\t\t// List<Logistics> list = ls.queryLogisticsByOrderNo(1);\r\n\t\t// for (Logistics logistics : list) {\r\n\t\t// System.out.println(logistics);\r\n\t\t// }\r\n\t\t// System.out.println(list);\r\n\t\t// 将查询的关键字也存储起来 传递到jsp\r\n\t\t// request.setAttribute(\"logistics\", list);\r\n\r\n\t\t// 转发到页面\r\n\t\trequest.getRequestDispatcher(\"follow.jsp\").forward(request, response);\r\n\t}", "public static void main(String[] args) {\n\t\tList<Product> prodList = new ArrayList<>();\n\t\tprodList.add(new Product(12, \"Refrigerator\", \"Whirlpool\", 43000.00f));\n\t\tprodList.add(new Product(16, \"Mobile\", \"Samsung\", 18000.00f));\n\t\tprodList.add(new Product(11, \"Laptop\", \"Lenovo\", 28300.00f));\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"Before Sorting\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\tCollections.sort(prodList);\n\t\t\n\t\tSystem.out.println(\"After Sorting\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\tProductNameComparator pnc = new ProductNameComparator();\n\t\tCollections.sort(prodList, pnc);\n\t\t\n\t\tSystem.out.println(\"After Sorting as per name\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\tCollections.sort(prodList,Collections.reverseOrder());\n\t\t\n\t\tSystem.out.println(\"After Sorting as per desc id\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\tCollections.sort(prodList,Collections.reverseOrder(pnc));\n\t\t\n\t\tSystem.out.println(\"After Sorting as per desc name\");\n\t\tfor(Product p:prodList) {\n\t\t\tSystem.out.println(p);\n\t\t}\n\t\t\n\t\t\n\t\tCollections.sort(prodList, (p1,p2)-> p1.getPrice()>p2.getPrice()?1:-1 );\n\t\tSystem.out.println(\"After Sorting as per price\");\n\t\tprodList.forEach(p->System.out.println(p));\n\t\t\n\t\tCollections.sort(prodList, (p1,p2)-> p1.getPrice()<p2.getPrice()?1:-1 );\n\t\tSystem.out.println(\"After Sorting as per desc price\");\n\t\tprodList.forEach(System.out::println);\n\t\t\n\t}", "@Test\n public void given_devEnvironmentWithParamFieldAndSort_when_callEndPointShowStudentAndSort_then_returnStatus200AndSortListStudent() throws Exception {\n List<Student> studentListSort = STUDENT_LIST.stream().sorted((student1, student2) -> student1.getName().compareTo(student2.getName())).collect(Collectors.toList());\n\n Mockito.when(studentRepo.findAll(ArgumentMatchers.any(Sort.class))).thenReturn(studentListSort);\n\n RequestBuilder request = MockMvcRequestBuilders\n .get(\"/students/sort\")\n .accept(MediaType.APPLICATION_JSON)\n .param(\"field\", \"name\")\n .param(\"sort\", \"ASC\");\n\n mockMvc.perform(request)\n .andExpect(status().isOk())\n .andExpect(content().json(gson.toJson(studentListSort)))\n .andDo(MockMvcResultHandlers.print())\n .andReturn();\n }", "@Override\n\tpublic int filterOrder() {\n\t\treturn 1;\n\t}", "public void step4(){\n\n Collections.sort(names,(a,b)->b.compareTo(a));\n\n\n System.out.println(\"names sorted are :\"+names);\n }", "public String doSort();", "public static void main(String[] args) {\n\t\tList<String> animal = new ArrayList<String>();\n\n\t\tanimal.add(\"Cat\");\n\t\tanimal.add(\"Mouse\");\n\t\tanimal.add(\"Lion\");\n\t\tanimal.add(\"Zeebra\");\n\t\tanimal.add(\"Bear\");\n\t\tanimal.add(\"Deer\");\n\n\t\t// Collections.sort(animal,new StringLengthComparator());\n\n\t\tCollections.sort(animal, new ReverseAlphabeticalComparator());\n\t\tfor (String animal1 : animal) {\n\n\t\t\tSystem.out.println(animal1);\n\t\t}\n\n\t\t/////////////////////////////// Sorting Numbers ////////////////////////////////\n\t\tList<Integer> numbers = new ArrayList<Integer>();\n\n\t\tnumbers.add(5);\n\t\tnumbers.add(31);\n\t\tnumbers.add(16);\n\t\tnumbers.add(605);\n\t\tnumbers.add(15);\n\n\t\tCollections.sort(numbers, new Comparator<Integer>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(Integer num1, Integer num2) {\n\n\t\t\t\treturn -num1.compareTo(num2);\n\t\t\t}\n\n\t\t});\n\n\t\tfor (Integer num1 : numbers) {\n\n\t\t\tSystem.out.println(num1);\n\t\t}\n\t\t///////////////////////////// Sorting Arbitrary Objects ////////////////////////////\n\n\t\tList<Person> people = new ArrayList<Person>();\n\n\t\tpeople.add(new Person(3, \"Ajeer\"));\n\t\tpeople.add(new Person(1, \"Sudeer\"));\n\t\tpeople.add(new Person(2, \"Sureash\"));\n\t\tpeople.add(new Person(4, \"Sam\"));\n\t\t\n\t\t// Sort in Order of ID\n\t\tCollections.sort(people, new Comparator<Person>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(Person p1, Person p2) {\n\t\t\t\tif (p1.getId() > p2.getId()) {\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\telse if (p1.getId()< p2.getId()) {\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t});\n\t\tfor (Person person1 : people) {\n\n\t\t\tSystem.out.println(person1);\n\t\t}\n\t\tSystem.out.println(\"\\n\");\n\t\t// Sort In Order of NAME....\n\t\tCollections.sort(people, new Comparator<Person>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(Person p1, Person p2) {\n\t\t\t\n\t\t\t\treturn p1.getName().compareTo(p2.getName());\n\t\t\t}\n\t\t});\n\t\tfor (Person person1 : people) {\n\n\t\t\tSystem.out.println(person1);\n\t\t}\n\t}", "protected void sortAndFilterAnnotationData() {\n SortColumn sortType = (SortColumn) sortAction.getValue(COLUMN_PROPERTY);\r\n FilterSubTypeColumn filterType = (FilterSubTypeColumn) filterTypeAction.getValue(COLUMN_PROPERTY);\r\n FilterAuthorColumn filterAuthor = (FilterAuthorColumn) filterAuthorAction.getValue(COLUMN_PROPERTY);\r\n Color filterColor = (Color) filterColorAction.getValue(COLUMN_PROPERTY);\r\n FilterVisibilityColumn filterVisibility = (FilterVisibilityColumn) filterVisibilityAction.getValue(COLUMN_PROPERTY);\r\n filterDropDownButton.setSelected(!filterAuthor.equals(FilterAuthorColumn.ALL) ||\r\n !filterType.equals(FilterSubTypeColumn.ALL) ||\r\n filterColor != null);\r\n\r\n // setup search pattern\r\n Pattern searchPattern = null;\r\n String searchTerm = searchTextField.getText();\r\n boolean caseSensitive = caseSensitiveMenutItem.isSelected();\r\n if (searchTerm != null && !searchTerm.isEmpty()) {\r\n searchPattern = Pattern.compile(caseSensitive ? searchTerm : searchTerm.toLowerCase());\r\n // todo we can add search flags at a later date, via drop down on search or checkboxes.\r\n }\r\n\r\n markupAnnotationHandlerPanel.sortAndFilterAnnotationData(\r\n searchPattern, sortType, filterType, filterAuthor, filterVisibility, filterColor,\r\n regexMenuItem.isSelected(), caseSensitive);\r\n }", "public static void main(String[] args) {\n\t\tStud1 s1=new Stud1(1,\"Yogi\");\r\n\t\tStud1 s2=new Stud1(4,\"Rushi\");\r\n\t\tStud1 s3=new Stud1(2,\"Praje\");\r\n\t\tStud1 s4=new Stud1(3,\"Amre\");\r\n\t\t\r\n\t\tList l=new ArrayList();\r\n\t\tl.add(s1);\r\n\t\tl.add(s2);\r\n\t\tl.add(s3);\r\n\t\tl.add(s4);\r\n\t\t\r\n\t\tSystem.out.println(l);\r\n\t\t\r\n\t\tCollections.sort(l);\r\n\t\t\r\n\t\tEnumeration e=Collections.enumeration(l);\r\n\t\t\r\n\t\twhile(e.hasMoreElements())\r\n\t\t{\r\n\t\t\tObject o=e.nextElement();\r\n\t\t\tSystem.out.println(o);\r\n\t\t}\r\n\r\n\t}", "public Collection<Object> getOrderedTestNames(Map<String,String> filter) throws\n NEDSSSystemException , InvalidSRTFilterKeysException {\n\n\n\n ArrayList<Object> returnSet = null;\n String programArea = null;\n String condition = null;\n String orderingFacility = null;\n String orderedTest = null;\n\n programArea = (String) filter.get(SRTFilterKeys.PROGRAM_AREA_CODE);\n condition = (String) filter.get(SRTFilterKeys.CONDITION_CODE);\n orderingFacility = (String) filter.get(SRTFilterKeys.REPORTING_FACILITY_ID);\n orderedTest = (String) filter.get(SRTFilterKeys.ORDERED_TEST_CODE);\n\n if (filter.size() == 1) {\n if (orderingFacility != null)\n returnSet = (ArrayList<Object> ) getOrderedTestNamesByOrderingFacility(orderingFacility);\n else {\n throw new InvalidSRTFilterKeysException(\"Invalid Filter Key Exception\");\n\n }\n }\n else\n {\n if (programArea != null && orderingFacility != null)\n {\n returnSet = (ArrayList<Object> ) getOrderedTestNamesByPA(programArea, orderingFacility);\n if(returnSet == null)\n returnSet = (ArrayList<Object> ) getOrderedTestNamesByPA(programArea, \"DEFAULT\");\n }\n\n else if (condition != null && orderingFacility != null)\n {\n returnSet = (ArrayList<Object> ) getOrderedTestNamesByCondition(condition, orderingFacility);\n if(returnSet == null)\n returnSet = (ArrayList<Object> ) getOrderedTestNamesByCondition(condition, \"DEFAULT\");\n }\n\n else if(orderedTest != null && orderingFacility != null)\n {\n returnSet = (ArrayList<Object> ) getOrderedTestNamesByOrderingFacilityAndTest(orderingFacility, orderedTest);\n if(returnSet == null)\n returnSet = (ArrayList<Object> ) getOrderedTestNamesByOrderingFacilityAndTest(\"DEFAULT\",orderedTest);\n }\n else\n throw new NEDSSSystemException(\"Invalid Filter Key Exception\");\n\n }\n\n if (returnSet == null)\n return getOrderedTestNamesByOrderingFacility(\"DEFAULT\");\n else\n return returnSet;\n}", "public static void sortByPeriod() {\n\t\tArrayList<Student> sortedPeriod = new ArrayList<Student>();\n\t\tsortedPeriod = Main.students;\n\t\t//gather info\n\t\tSystem.out.println(\"Which period would you like to sort by?\");\n\t\tScanner periodChoiceIn = new Scanner(System.in);\n\t\tint periodChoice = periodChoiceIn.nextInt();\n\t\t//conditionals to sort proper period\n\t\t//each one calls the proper comparator class and sorts it, then prints out all the info\n\t\tif(periodChoice == 1){\n\t\t\tCollections.sort(sortedPeriod, new PeriodOneComparator());\n\t\t\tInputHelper.printAllStudentsAndInfo(sortedPeriod);\t\n\t\t}\n\t\telse if(periodChoice == 2) {\n\t\t\tCollections.sort(sortedPeriod, new PeriodTwoComparator());\n\t\t\tInputHelper.printAllStudentsAndInfo(sortedPeriod);\t\n\t\t}\n\t\telse if(periodChoice == 3) {\n\t\t\tCollections.sort(sortedPeriod, new PeriodThreeComparator());\n\t\t\tInputHelper.printAllStudentsAndInfo(sortedPeriod);\t\n\t\t}\n\t\telse{\n\t\t\tsortByPeriod();\n\t\t}\n\t\tMain.selectOption();\n\t}", "public static void doSort ( RunData data)\n\t{\n\t\tSessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ());\n\n\t\t//get the ParameterParser from RunData\n\t\tParameterParser params = data.getParameters ();\n\n\t\t// save the current selections\n\t\tSet selectedSet = new TreeSet();\n\t\tString[] selectedItems = data.getParameters ().getStrings (\"selectedMembers\");\n\t\tif(selectedItems != null)\n\t\t{\n\t\t\tselectedSet.addAll(Arrays.asList(selectedItems));\n\t\t}\n\t\tstate.setAttribute(STATE_LIST_SELECTIONS, selectedSet);\n\n\t\tString criteria = params.getString (\"criteria\");\n\n\t\tif (criteria.equals (\"title\"))\n\t\t{\n\t\t\tcriteria = ResourceProperties.PROP_DISPLAY_NAME;\n\t\t}\n\t\telse if (criteria.equals (\"size\"))\n\t\t{\n\t\t\tcriteria = ResourceProperties.PROP_CONTENT_LENGTH;\n\t\t}\n\t\telse if (criteria.equals (\"created by\"))\n\t\t{\n\t\t\tcriteria = ResourceProperties.PROP_CREATOR;\n\t\t}\n\t\telse if (criteria.equals (\"last modified\"))\n\t\t{\n\t\t\tcriteria = ResourceProperties.PROP_MODIFIED_DATE;\n\t\t}\n\t\telse if (criteria.equals(\"priority\") && ContentHostingService.isSortByPriorityEnabled())\n\t\t{\n\t\t\t// if error, use title sort\n\t\t\tcriteria = ResourceProperties.PROP_CONTENT_PRIORITY;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tcriteria = ResourceProperties.PROP_DISPLAY_NAME;\n\t\t}\n\n\t\tString sortBy_attribute = STATE_SORT_BY;\n\t\tString sortAsc_attribute = STATE_SORT_ASC;\n\t\tString comparator_attribute = STATE_LIST_VIEW_SORT;\n\t\t\n\t\tif(state.getAttribute(STATE_MODE).equals(MODE_REORDER))\n\t\t{\n\t\t\tsortBy_attribute = STATE_REORDER_SORT_BY;\n\t\t\tsortAsc_attribute = STATE_REORDER_SORT_ASC;\n\t\t\tcomparator_attribute = STATE_REORDER_SORT;\n\t\t}\n\t\t// current sorting sequence\n\t\tString asc = NULL_STRING;\n\t\tif (!criteria.equals (state.getAttribute (sortBy_attribute)))\n\t\t{\n\t\t\tstate.setAttribute (sortBy_attribute, criteria);\n\t\t\tasc = Boolean.TRUE.toString();\n\t\t\tstate.setAttribute (sortAsc_attribute, asc);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// current sorting sequence\n\t\t\tasc = (String) state.getAttribute (sortAsc_attribute);\n\n\t\t\t//toggle between the ascending and descending sequence\n\t\t\tif (asc.equals (Boolean.TRUE.toString()))\n\t\t\t{\n\t\t\t\tasc = Boolean.FALSE.toString();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tasc = Boolean.TRUE.toString();\n\t\t\t}\n\t\t\tstate.setAttribute (sortAsc_attribute, asc);\n\t\t}\n\n\t\tif (state.getAttribute(STATE_MESSAGE) == null)\n\t\t{\n\t\t\tComparator comparator = ContentHostingService.newContentHostingComparator(criteria, Boolean.getBoolean(asc));\n\t\t\tstate.setAttribute(comparator_attribute, comparator);\n\t\t\t\n\t\t\t// sort sucessful\n\t\t\t// state.setAttribute (STATE_MODE, MODE_LIST);\n\n\t\t}\t// if-else\n\n\t}", "private void processSortButton() {\n try {\n dataOutputArea.setText(\"\");\n\n //Stop a user from sorting before a World exists to search\n if(this.world == null) {\n JOptionPane.showMessageDialog(null, \"You must read a data file first!\", \"Error\", JOptionPane.ERROR_MESSAGE);\n return;\n }\n //First if stops a user from attempting to sort any type of thing other than a Ship by any attribute other than Name\n if (!sortCriteriaThingBox.getSelectedItem().toString().toLowerCase().equals(\"ship\") && !sortAttributeBox.getSelectedItem().toString().toLowerCase().equals(\"name\")) {\n JOptionPane.showMessageDialog(null, \"You can only sort Ships by an attribute other than 'Name'!\", \"Error\", JOptionPane.WARNING_MESSAGE);\n //This if will sort whatever Thing is selected by calling sortMyThingByName in the World class\n } else if (sortAttributeBox.getSelectedItem().toString().toLowerCase().equals(\"name\")) {\n String sortThing = sortCriteriaThingBox.getSelectedItem().toString();\n String sortResultByName = world.sortMyThingByName(sortThing);\n dataOutputArea.setText(sortResultByName);\n } else {\n String sortAttribute = sortAttributeBox.getSelectedItem().toString();\n String sortResultByAttribute = world.sortShipByAttribute(sortAttribute);\n dataOutputArea.setText(sortResultByAttribute);\n }\n } catch(Exception e7) {\n JOptionPane.showMessageDialog(null, \"Something went wrong while sorting!\\n\\n\" + e7.getMessage(), \"Error\", JOptionPane.ERROR_MESSAGE);\n } //end of catch()\n }", "private static void printSortMovieMenu() {\n\t\tprintln(\"Movie Sorting Options:\");\n\t\tprintln(\"\\tTA: Title Ascending (A-Z)\");\n\t\tprintln(\"\\tTD: Title Descending (Z-A)\");\n\t\tprintln(\"\\tYA: Year Ascending\");\n\t\tprintln(\"\\tYD: Year Descending\");\n\t}", "public String getSortOrder();", "List<PurchaseOrderHeader> searchPurchaseOrderHeaders(GeneralSearchForm searchForm);", "public static void main (String args []) throws Exception {\n\n\n ArrayList<Person> people = new ArrayList<Person>();\n Person youngestPerson = getYoungestPerson(people);\n Person oldestPerson = getOldestPerson(people);\n ArrayList<Person> sortedByAgeList = getSortedListByAge(people);\n ArrayList<Person> sortedByNameList = getSortedListByName(people, false);\n\n\n /*\n For the below to work where you can see what you've done, you must have\n done the section 1 recap portion where you override the toString() method of the\n Person class!\n */\n\n for(Person p : sortedByAgeList) {\n System.out.println(p);\n }\n\n for(Person p : sortedByNameList) {\n System.out.println(p);\n }\n }", "private void filterAndSort()\n {\n filteredAndSortedElements = elements;\n\n // filter and sort, use Job if too much elements\n if ( configuration.getFilter().isFiltered() || configuration.getSorter().isSorted() )\n {\n if ( elements.length > BrowserUIPlugin.getDefault().getPreferenceStore()\n .getInt( BrowserUIConstants.PREFERENCE_SEARCHRESULTEDITOR_SORT_FILTER_LIMIT )\n && mainWidget.getViewer() != null && !mainWidget.getViewer().getTable().isDisposed() )\n {\n // deactivate fitering and sorting for large data set\n // FilterAndSortRunnable runnable = new FilterAndSortRunnable( configuration, mainWidget, elements );\n // RunnableContextRunner.execute( runnable, null, true );\n // filteredAndSortedElements = runnable.getFilteredAndSortedElements();\n }\n else if ( elements.length > 0 && mainWidget.getViewer() != null\n && !mainWidget.getViewer().getTable().isDisposed() )\n {\n filteredAndSortedElements = configuration.getFilter().filter( mainWidget.getViewer(), \"\", elements ); //$NON-NLS-1$\n configuration.getSorter().sort( mainWidget.getViewer(), filteredAndSortedElements );\n }\n }\n\n // update virtual table\n mainWidget.getViewer().setItemCount( filteredAndSortedElements.length );\n\n // update state\n String url = \"\"; //$NON-NLS-1$\n boolean enabled = true;\n \n if ( input instanceof ISearch )\n {\n ISearch search = ( ISearch ) input;\n\n if ( filteredAndSortedElements.length < elements.length )\n {\n url += filteredAndSortedElements.length + Messages.getString( \"SearchResultEditorContentProvider.Of\" ); //$NON-NLS-1$\n }\n\n if ( search.getSearchResults() == null )\n {\n url += Messages.getString( \"SearchResultEditorContentProvider.SearchNotPerformed\" ); //$NON-NLS-1$\n enabled = false;\n }\n else if ( search.getSearchResults().length == 1 )\n {\n url += search.getSearchResults().length\n + Messages.getString( \"SearchResultEditorContentProvider.Result\" ); //$NON-NLS-1$\n }\n else\n {\n url += search.getSearchResults().length\n + Messages.getString( \"SearchResultEditorContentProvider.Results\" ); //$NON-NLS-1$\n }\n\n // url += search.getURL();\n url += Messages.getString( \"SearchResultEditorContentProvider.SearchBase\" ) + search.getSearchBase().getName() + \" - \"; //$NON-NLS-1$ //$NON-NLS-2$\n url += Messages.getString( \"SearchResultEditorContentProvider.Filter\" ) + search.getFilter(); //$NON-NLS-1$\n\n boolean showDn = BrowserUIPlugin.getDefault().getPreferenceStore().getBoolean(\n BrowserUIConstants.PREFERENCE_SEARCHRESULTEDITOR_SHOW_DN )\n || search.getReturningAttributes().length == 0;\n configuration.getFilter().inputChanged( search, showDn );\n configuration.getSorter().inputChanged( search, showDn );\n }\n else\n {\n url = Messages.getString( \"SearchResultEditorContentProvider.NoSearchSelected\" ); //$NON-NLS-1$\n enabled = false;\n }\n\n if ( mainWidget.getInfoText() != null && !mainWidget.getInfoText().isDisposed() )\n {\n mainWidget.getInfoText().setText( url );\n }\n if ( mainWidget.getQuickFilterWidget() != null )\n {\n mainWidget.getQuickFilterWidget().setEnabled( enabled );\n }\n if ( mainWidget.getViewer() != null && !mainWidget.getViewer().getTable().isDisposed() )\n {\n mainWidget.getViewer().getTable().setEnabled( enabled );\n }\n\n }", "public static void main(String[] args) {\n\t\tList<Employee> list = new ArrayList<Employee>();\r\n\t\tlist.add(new Employee(\"Ashish\", new Integer(37), new Double(373727)));\r\n\t\tlist.add(new Employee(\"Ashish\", new Integer(37), new Double(373)));\r\n\t\tlist.add(new Employee(\"Rakesh\", new Integer(37), new Double(373727)));\r\n\r\n\t\tlist.add(new Employee(\"Sakal\", new Integer(25), new Double(3434737)));\r\n\t\tlist.add(new Employee(\"Manish\", new Integer(26), new Double(373727)));\r\n\t\tlist.add(new Employee(\"Manish\", new Integer(37), new Double(373727)));\r\n\r\n\t\t// In collections class one sort method is there which taking two\r\n\t\t// argument\r\n\t\t// one list one one comparator type so here\r\n\t\t// SortBasedOnNameAgeAndSalary is comparator type note: sortimg in\r\n\t\t// assending\r\n\r\n\t\tCollections.sort(list, new SortBasedOnNameAgeAndSalary());\r\n\t\tSystem.out.println(\"after Sorting\" + list);\r\n\t\t// Here i am iterating list and getting sorted result\r\n\t\tfor (Employee employee : list) {\r\n\t\t\tSystem.out.println(employee);\r\n\t\t}\r\n\t}", "public void ClickonSortByFilter(String Text){\r\n\t\tString Data = getValue(Text); \r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- Sort By dropdown should be clicked\");\r\n\t\ttry{ \r\n\t\t\tclickSpecificElementContains(locator_split(\"lnkSortBy\"), Data); \r\n\t\t\tReporter.log(\"PASS_MESSAGE:- Sort By dropdown is clicked\");\r\n\t\t\t//System.out.println(\"Search catogory\"+Data);\r\n\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- Sort By dropdown is not clicked or Not Available\");\r\n\t\t\tthrow new NoSuchElementException(\"The element with\"\r\n\t\t\t\t\t+ elementProperties.getProperty(\"lnkSortBy\")\r\n\t\t\t\t\t+ \" not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "public void sort() {\n }", "public static void main(String[] str) {\n\t\tList<Order> orderListByName = getOrderList();\n\t\tCollections.sort(orderListByName, (o1, o2)-> o1.getOrderName().compareTo(o2.getOrderName()) );\n\t\n\t\t// sort order by order name\n\t\tList<Order> orderListByOrderBill = getOrderList();\n\t\tCollections.sort(orderListByOrderBill, (o1, o2)-> o1.getOrderBillAmount().compareTo(o2.getOrderBillAmount()));\n\t\t}", "void sort(OrderBy orderBy);", "public static void main(String[] args) {\n\t\tArrayList al=new ArrayList();\n\t\tal.add(\"Hello\");\n\t\tal.add(\"Hi\");\n\t\tal.add(\"India\");\n\t\tal.add(\"Japan\");\n\t\tal.add(\"Usa\");\n\t\tal.add(\"China\");\n/**************************Insertion order preserved********************************************************************/\n\t\tSystem.out.println(al);\n/*************************default natural sorting order*****************************************************************/\n\t\tCollections.sort(al);\n\t\tSystem.out.println(al);\n/***************************Customized sorting order********************************************************************/\n\t\tCollections.sort(al, new MyComparator1());\n\t\tSystem.out.println(al);\n\n\n\t}", "@Test\n public void test_sort_pagination() throws Exception {\n matchInvoke(serviceURL, \"PWDDIC_testSearch_sort_pagination_req.xml\",\n \"PWDDIC_testSearch_sort_pagination_res.xml\");\n }", "public static void main(String[] args) {\n Scanner newScanner=new Scanner(System.in);\n\n //Asking for the user to enter the first number\n System.out.println(\"Enter the first number:\");\n\n //Storing the entered data inside the variable\n int firstNumber=newScanner.nextInt();\n\n //Asking to the user to enter the second value\n System.out.println(\"Enter the second number:\");\n\n //Storing the second vale entered from the user inside the second variable\n int secondNumber=newScanner.nextInt();\n\n // System.out.println(\"The two number are:\"+firstNumber+\" \"+secondNumber);\n\n System.out.println(numberComparator(firstNumber,secondNumber));\n\n }", "private static void printSortActorMenu() {\n\t\tprintln(\"Actor Sorting Options:\");\n\t\tprintln(\"\\tAA: Alphabetically Ascending\");\n\t\tprintln(\"\\tAD: Alphabetically Descending\");\n\t\tprintln(\"\\tNA: By Number of Movies They Are In Ascending\");\n\t\tprintln(\"\\tND: By Number of Movies They Are In\");\n\t}", "public IScapSyncSearchSortField[] getSortFields();", "public String sortOrder();", "public List<Reporteador> obtenerListaPorPagina(int startIndex, int pageSize, String sortField, boolean sortOrder, Map<String, String> filters)\r\n/* 52: */ {\r\n/* 53: 71 */ return this.reporteadorDao.obtenerListaPorPagina(startIndex, pageSize, sortField, sortOrder, filters);\r\n/* 54: */ }", "private static void DoOrderBy()\n\t{\n\t\tArrayList<Attribute> inAtts = new ArrayList<Attribute>();\n\t\tinAtts.add(new Attribute(\"Int\", \"n_n_nationkey\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"n_n_name\"));\n\t\tinAtts.add(new Attribute(\"Int\", \"n_n_regionkey\"));\n\t\tinAtts.add(new Attribute(\"Str\", \"n_n_comment\"));\n\n\t\tArrayList<Attribute> outAtts = new ArrayList<Attribute>();\n\t\toutAtts.add(new Attribute(\"Int\", \"att1\"));\n\t\toutAtts.add(new Attribute(\"Str\", \"att2\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att3\"));\n\t\toutAtts.add(new Attribute(\"Str\", \"att4\"));\n\n\t\t// These could be more complicated expressions than simple input columns\n\t\tMap<String, String> exprsToCompute = new HashMap<String, String>();\n\t\texprsToCompute.put(\"att1\", \"n_n_nationkey\");\n\t\texprsToCompute.put(\"att2\", \"n_n_name\");\n\t\texprsToCompute.put(\"att3\", \"n_n_regionkey\");\n\t\texprsToCompute.put(\"att4\", \"n_n_comment\");\n\t\t\n\t\t// Order by region key descending then nation name ascending\n\t\tArrayList<SortKeyExpression> sortingKeys = new ArrayList<SortKeyExpression>();\n\t\tsortingKeys.add(new SortKeyExpression(\"Int\", \"n_n_regionkey\", false));\n\t\tsortingKeys.add(new SortKeyExpression(\"Str\", \"n_n_name\", true));\n\t\t\n\t\t// run the selection operation\n\t\ttry\n\t\t{\n\t\t\tnew Order(inAtts, outAtts, exprsToCompute, sortingKeys, \"nation.tbl\", \"out.tbl\", \"g++\", \"cppDir/\");\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "List<Hybridization> searchByCriteria(PageSortParams<Hybridization> params, HybridizationSearchCriteria criteria);", "public static void main(String[] args) {\n\t\tList<Employee> empList = new ArrayList<>();\r\n\t\tempList.add(new Employee(\"Rashim\", \"SDFSDFJLK\", 52));\r\n\t\tempList.add(new Employee(\"Amit\", \"JLKSDFJKLL79989\", 67));\r\n\t\tempList.add(new Employee(\"Ranjit\", \"ASDFJLKSJLF78676\", 45));\r\n\t\tempList.add(new Employee(\"Shymala\", \"SDFJLSJU8907\", 34));\r\n\t\t\r\n\t\t\r\n//\t\tfirst select only employees whose salary is greater than 50\r\n//\t\tand sort the employees based on their names (ignore case)\r\n//\t\tand print each employee of the stream.\r\n\t\tempList.stream().filter(emp -> emp.getSalary() > 50).sorted((e1, e2) -> e1.getName().compareToIgnoreCase(e2.getName())).forEach(emp -> System.out.println(emp));\r\n\t}", "public static void main(String[] args) {\n\t\tMap<String, Object> testMap = new HashMap<>();\n\t\ttestMap.put(\"userAccount\", \"10000\");\n\t\ttestMap.put(\"where\", \"1=1 and Mobile='15507599162'\");\n\t\ttestMap.put(\"pageIndex\", 0);\n\t\ttestMap.put(\"pageSize\", 10);\n\t\ttestMap.put(\"orderBy\", \"\");\n\t\ttestMap.put(\"cardId\", \"desc\");\n\t\tOpenApiClient apiClient = new OpenApiClient(\"C2549D33134942FB94E936205AA57AA8\", \"I0AAQY\");\n\t\tJsonObject jsonObject = apiClient.CallHttpPost(\"Get_MembersPagedV2\", testMap);\n\n\n\t\tint status = jsonObject.get(\"status\").getAsInt();\n\t\tJsonArray array = jsonObject.get(\"data\").getAsJsonArray();\n\t\tfor(int i=0; i<array.size(); i++){\n\t\t\tSystem.out.println(\" i = \" + i + \" value = \" + array.get(i));\n\t\t\tJsonObject object = array.get(i).getAsJsonObject();\n\t\t\tSystem.out.println(\" ---------->> guid = \" + object.get(\"Guid\").getAsString());\n\t\t}\n\n\t\t BigInteger b = new BigInteger(\"-1888832\");\n b = b.abs();\n System.out.println(b.toString());\n BigInteger bs = new BigInteger(\"1888832\");\n bs = bs.abs();\n System.out.println(bs.toString());\n\t\t//System.out.println(getOrderNo());\n\t\tSystem.out.println(getCommonOrderNumber(Const.System_Module_Enum.LogisticsWebSystem,1));\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"/home/shraddha/Desktop/Setups/Drivers/chromedriver\");\r\n\t\tWebDriver driver = new ChromeDriver();\r\n\t\tdriver.manage().window().maximize();\r\n\t\r\n\t\tString baseUrl = \"https://rahulshettyacademy.com/seleniumPractise/#/offers\";\r\n\t\tdriver.get(baseUrl);\r\n\t\t\r\n\t\t// -----------------------------------------------------------------------------------------\r\n\t\t\r\n\t\t// Select No. Of Table Rows To Be Displayed\r\n\t\tSelect pageSize = new Select(driver.findElement(By.id(\"page-menu\")));\r\n\t\tpageSize.selectByValue(\"10\");\r\n\t\t\r\n\t\t// Click On Sort Column\r\n\t\tdriver.findElement(By.xpath(\"//table//th[1]\")).click();\r\n\t\t\r\n\t\t// Get All Products In A List\r\n\t\tList <WebElement> elementsList = driver.findElements(By.xpath(\"//table//tr/td[1]\"));\r\n\t\t\r\n\t\t// Extract Product Names To Another List Using Stream\r\n\t\tList<String> originalList = elementsList.stream().map(p -> p.getText()).collect(Collectors.toList());\r\n\t\t\r\n\t\t// Sort the Original List Using Stream\r\n\t\tList<String> sortedList = originalList.stream().sorted().collect(Collectors.toList());\r\n\t\t\r\n\t\t// Check Whether Both Lists Are Equal Or Not\r\n\t\tAssert.assertTrue(originalList.equals(sortedList));\r\n\t\t\r\n\t\t// Using Custom Method To Get Price Of All Products\r\n\t\tList <String> priceList = elementsList.stream().map(p -> getPrice(p)).collect(Collectors.toList());\r\n\t\tSystem.out.println(priceList);\r\n\t\t\r\n\t\tdriver.quit();\r\n\t\t\r\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 }", "void getOrders();", "@Override\r\n\tpublic void editSort() {\n\t\t\r\n\t}", "public ArrayList<Question> sortAndFilter(BankOptions temp) {\n\n /* The array being filtered */\n ArrayList<Question> newArr = new ArrayList<Question>();\n\n /* Adds all the questions into the question collection */\n for (int i = 0; i < quesCollec.size(); i++) {\n newArr.add(quesCollec.get(i));\n }\n\n /* checks to see if getDiff is actually set */\n if (temp.getDiff() != -1) {\n\n /* Calls the filter function to filter by Difficulty */\n newArr = filterByDiff(newArr, temp.getDiff());\n }\n\n /* checks to see if the subject is set */\n if (!temp.getSubj().getName().equals(\"None\")) {\n\n /* Calls the filter functions to filter by Subject */\n newArr = filterBySubj(newArr, temp.getSubj());\n }\n\n /* checks to see if the coursename is set */\n if (!temp.getCourse().getName().equals(\"None\")) {\n\n /* Calls the filter functions to filter by course */\n newArr = filterByCourse(newArr, temp.getCourse());\n }\n\n /* checks to see if the question type is set */\n if (!temp.getQuestionType().equals(\"None\")) {\n\n /* Calls the filter functions to filter by question type. */\n newArr = filterByQuestionType(newArr, temp.getQuestionType());\n }\n\n /* checks to see if the search box is set */\n if (!(temp.getSearchBox().equals(\"\") || temp.getSearchBox().equals(\"Search\"))) {\n\n /* Calls the filter functions to filter by the search box. */\n newArr = filterBySearch(newArr, temp.getSearchBox());\n }\n\n /* checks to see if the start date is null */\n if (temp.getStart() != null) {\n /* Calls the filter functions to filter by the dates. */\n newArr = filterByStart(newArr, temp.getStart());\n }\n\n /* checks to see if the end date is null. */\n if (temp.getEnd() != null) {\n newArr = filterByEnd(newArr, temp.getEnd());\n }\n\n return newArr;\n }", "private static void selectSortingOption(ArrayList<Person> p) {\n\t\tArrayList<Person> personList = p;\n\t\tScanner scan = new Scanner(System.in);\n\n\t\tboolean again = true;\n\t\twhile (again) {\n\t\t\tagain = false;\n\t\t\tSystem.out\n\t\t\t\t\t.println(\"Pick your sorting option\\n\" + \"1: First Name\\n\" + \"2: Last Name\\n\" + \"3: Starting Date\");\n\n\t\t\tint input = scan.nextInt();\n\n\t\t\tswitch (input) {\n\t\t\tcase 1:\n\t\t\t\tCollections.sort(personList, new Comparator<Person>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic int compare(final Person object1, final Person object2) {\n\t\t\t\t\t\treturn object1.getFirstName().toUpperCase().compareTo(object2.getFirstName().toUpperCase());\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tsortingOptions(personList);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tCollections.sort(personList, new Comparator<Person>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic int compare(final Person object1, final Person object2) {\n\t\t\t\t\t\treturn object1.getLastName().toUpperCase().compareTo(object2.getLastName().toUpperCase());\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tsortingOptions(personList);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tCollections.sort(personList, new Comparator<Person>() {\n\t\t\t\t\tDateFormat f = new SimpleDateFormat(\"yyyyMMdd\");\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic int compare(Person o1, Person o2) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\treturn f.parse(o1.getStartDate()).compareTo(f.parse(o2.getStartDate()));\n\t\t\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\t\t\tthrow new IllegalArgumentException(e);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tsortingOptions(personList);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tagain = true;\n\t\t\t\tSystem.out.println(\"Enter a number between 1 and 3\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tscan.close();\n\t}", "public void sortCompetitors(){\n\t\t}", "public List<Order> findFilSortOrders(Map<String, String> filters, String sortedColumn, boolean descending, int startRow, int rowsPerPage) throws ApplicationEXContainer.ApplicationCanNotChangeException {\n List<Order> orders;\n try(Connection connection = MySQLDAOFactory.getConnection();\n AutoRollback autoRollback = new AutoRollback(connection)){\n orders = orderDao.findFilSortOrders(connection,filters,sortedColumn,descending,startRow,rowsPerPage);\n autoRollback.commit();\n } catch (SQLException | NamingException | DBException throwables) {\n LOGGER.error(throwables.getMessage());\n throw new ApplicationEXContainer.ApplicationCanNotChangeException(throwables.getMessage(),throwables);\n }\n return orders;\n }", "Map<String, org.springframework.batch.item.database.Order> genBatchOrderByFromSort(TableFields tableFields, Sort sort);", "public void Case11(){\n System.out.println(\"Testing Case 11\");\n productFilter();\n driver.navigate().back();\n driver.navigate().back();\n System.out.println(\"Case 11 Done\");\n }", "private void Searchdata() {\r\n Connection con;\r\n String searchby;\r\n String sortby;\r\n String keyword;\r\n \r\n searchby = (String)cboSearchby.getSelectedItem();\r\n sortby = (String)cboSortby.getSelectedItem();\r\n keyword = txfSearch.getText();\r\n try {\r\n con = ClassSQL.getConnect();\r\n Statement stmt = con.createStatement();\r\n String sql = Searchstmt(searchby,sortby,keyword);\r\n // System.out.println(sql); //for testing purposes\r\n stmt.executeQuery(sql);\r\n con.close();\r\n } catch (SQLException ex) {\r\n ex.printStackTrace();\r\n } finally {\r\n // Place code in here that will always be run.\r\n }\r\n }", "@Test\n\tpublic void testGetBooksSortedByAuthor() {\n\t\tSystem.out.println(\"Sorting books by author name...\");\n\t\tList<Book> result = store.getBooksSortedByAuthor();\n\t\tSystem.out.println(result);\n\t}", "public void step1(){\n\n Collections.sort(names, new Comparator<String>() {\n @Override\n public int compare(String a, String b) {\n return b.compareTo(a);\n }\n });\n }", "public static void main(String[] args) {\n ArrayList<Pessoa> pessoas = new ArrayList<>();\n Scanner s = new Scanner(System.in);\n char sin;\n \n //Identifica como o filtro deve ser realizado\n System.out.println(\"Deseja filtrar por nome (1) ou idade (2)?\");\n sin = s.next().charAt(0); \n \n //Instancia e povoa a primeira pessoa\n Pessoa pessoa1 = new Pessoa();\n pessoa1.setNome(\"Carlos\");\n pessoa1.setIdade(32);\n \n //Instancia e povoa a segunda pessoa\n Pessoa pessoa2 = new Pessoa();\n pessoa2.setNome(\"Izabel\");\n pessoa2.setIdade(21);\n \n //Instancia e povoa a terceira pessoa\n Pessoa pessoa3 = new Pessoa();\n pessoa3.setNome(\"Ademir\");\n pessoa3.setIdade(34); \n \n //Adiciona objetos no ArrayList\n pessoas.add(pessoa1);\n pessoas.add(pessoa2);\n pessoas.add(pessoa3);\n \n //Compara utilizando Comparator - necessario utilizar para permitir a criaçao de dois metodos de comparaçao\n if(sin == '1'){\n Collections.sort(pessoas, comparaNome());\n }else if(sin == '2'){\n Collections.sort(pessoas, comparaIdade());\n }\n \n //Imprime as pessoas considerando a ordem do sort\n System.out.println(\"Saida do comparator: \");\n for(Pessoa p : pessoas){\n System.out.println(\"Nome: \" +p.getNome()+ \" Idade: \" + p.getIdade());\n }\n \n //Compara utilizando Comparable - somente ordenara de acordo com a implementaçao do metodo na clase de origem - somente uma implementaçao\n //O que nao permitira variar entre atributos de ordenaçao diferentes.\n System.out.println(\"\\nSaida do comparable (Filtro atual por idade): \");\n Collections.sort(pessoas);\n for(Pessoa p : pessoas){\n System.out.println(\"Nome: \" +p.getNome()+ \" Idade: \" + p.getIdade());\n }\n \n }", "public static void main(String[] args){\n\t\tSystem.out.println(\"/***Java 8 stream Implementation sorting and filtering ***/\");\n\t\tSystem.out.println(\"/*Stream Implementation sorting and filtering to List*/\");\n\t\tList<Person> streamEx = new ArrayList<Person>();\n\t\tstreamEx.add(new Person(\"Ramu\",12));\n\t\tstreamEx.add(new Person(\"Agil\",52));\n\t\tstreamEx.add(new Person(\"Murali\",17));\n\t\tstreamEx.add(new Person(\"Hari\",17));\n\t\tstreamEx.add(new Person(\"Kalai\",45));\n\t\tstreamEx.add(new Person(\"George\",78));\n\t\tList<String> sortedNames = streamEx\n\t\t.stream().filter(s -> s.getAge() > 18)\n\t\t//.sorted(PERSON_SORT_BY_NAME) // Soreted using Comparator instance already created\n\t\t.sorted((p1,p2)->p1.getAge().compareTo(p2.getAge())) // Defining the Comparator here itself\n\t\t.map(Person::getName)\n\t\t.collect(Collectors.toList());\n\t\tSystem.out.println(sortedNames);\n\t\t\n\t\t// Retriving the first person of the criteria being met\n\t\tOptional<Person> firstPerson = streamEx\n\t\t\t\t\t\t\t\t\t\t.stream()\n\t\t\t\t\t\t\t\t\t\t//.sorted(PERSON_SORT_BY_AGE.reversed()) // Reverse sorting\n\t\t\t\t\t\t\t\t\t\t.sorted(PERSON_SORT_BY_AGE)\n\t\t\t\t\t\t\t\t\t\t.findFirst();\n\t\tSystem.out.println(\"Person with Minimum Age :: \"+firstPerson.get());\n\t\t\n\t\t//Mutiple Sorting conditions\n\t\tSystem.out.println(\"/*\\n*Mutiple Sorting conditions \\n*1.Age\\n*2.Name\\n*/\");\n\t\tstreamEx\n\t\t.stream()\n\t\t.sorted(PERSON_SORT_BY_AGE.thenComparing(PERSON_SORT_BY_NAME))\n\t\t.forEach(e -> System.out.println(e));\n\t\t\n\t\tSystem.out.println(\"/*Stream Implementation sorting and filtering to Map*/\");\n\t\tMap<String,Integer> sortedMap = streamEx\n\t\t.stream()\n\t\t.collect(Collectors.toMap(Person::getName,Person::getAge));\n\t\tSystem.out.println(sortedMap);\n\t\t\n\t\t//Limiting Records\n\t\tSystem.out.println(\"/** Limiting Records **/\");\n\t\tstreamEx\n\t\t.stream()\n\t\t.sorted(PERSON_SORT_BY_NAME)\n\t\t.filter(s -> s.getAge() < 18)\n\t\t.limit(2)\n\t\t.forEach(e -> System.out.println(e));\n\t\t\n\t\tprintMethodName();\n\t\n\t}", "void printNumberOfFilteredItems();", "private static void populateArtworkSorts() {\r\n if (artworkSorts.isEmpty()) {\r\n artworkSorts.add(SORT_FAV_ASC);\r\n artworkSorts.add(SORT_FAV_DESC);\r\n artworkSorts.add(SORT_NAME_ASC);\r\n artworkSorts.add(SORT_NAME_DESC);\r\n }\r\n }", "public static void testQuery() {\n\t\tParameters parameters = new Parameters();\r\n\t\tparameters.setUrl(\"VchicleServlet.json?action=pagequery\");\r\n\t\tparameters.setList(new ArrayList<NameValuePair>());\r\n\t\tparameters.getList().add(new BasicNameValuePair(\"pageSize\", \"2\"));\r\n\t\tparameters.getList().add(new BasicNameValuePair(\"currPage\", \"3\"));\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tString string = (String) MainUtilityTools.execute(parameters);\r\n\t}", "public static void main(String[] args)\n {\n Employee[] employees = {\n new Employee(\"Jason\", \"Red\", 5000, \"IT\"),\n new Employee(\"Ashley\", \"Green\", 7600, \"IT\"),\n new Employee(\"Matthew\", \"Indigo\", 3587.5, \"Sales\"),\n new Employee(\"James\", \"Indigo\", 4700.77, \"Marketing\"),\n new Employee(\"Luke\", \"Indigo\", 6200, \"IT\"),\n new Employee(\"Jason\", \"Blue\", 3200, \"Sales\"),\n new Employee(\"Wendy\", \"Brown\", 4236.4, \"Marketing\")};\n\n // get List view of the Employees\n List<Employee> list = Arrays.asList(employees);\n\n // display all Employees\n System.out.println(\"Complete Employee list:\");\n list.stream().forEach(System.out::println); // A method reference.\n \n List<Employee> list2 = Arrays.asList(employees);\n Collections.sort(list2, new myEmployeeComparator());\n\n //display all Employees\n System.out.println(\"\\nComplete Employee list Ordered:\");\n list2.stream().forEach(System.out::println); // A method reference.\n \n //Predicate (boolean-valued function) that returns true for salaries \n //in the range $4000-$6000\n Predicate<Employee> fourToSixThousand = \n e -> (e.getSalary() >= 4000 && e.getSalary() <= 6000);\n\n //Display Employees with salaries in the range $4000-$6000\n // sorted into ascending order by salary\n System.out.printf(\n \"%nEmployees earning $4000-$6000 per month sorted by salary:%n\");\n\n list.stream()\n .filter(fourToSixThousand)\n .sorted(Comparator.comparing(Employee::getSalary))\n .forEach(System.out::println);\n\n //Display first Employee with salary in the range $4000-$6000\n System.out.printf(\"%nFirst employee who earns $4000-$6000:%n%s%n\",\n list.stream()\n .filter(fourToSixThousand)\n .findFirst()\n .get());\n\n // Functions for getting first and last names from an Employee\n Function<Employee, String> byFirstName = Employee::getFirstName;\n Function<Employee, String> byLastName = Employee::getLastName;\n\n //Comparator for comparing Employees by first name then last name\n Comparator<Employee> lastThenFirst = \n Comparator.comparing(byLastName).thenComparing(byFirstName);\n\n // sort employees by last name, then first name \n System.out.printf(\n \"%nEmployees in ascending order by last name then first:%n\");\n list.stream()\n .sorted(lastThenFirst)\n .forEach(System.out::println);\n\n //sort employees in descending order by last name, then first name\n System.out.printf(\n \"%nEmployees in descending order by last name then first:%n\");\n list.stream()\n .sorted(lastThenFirst.reversed())\n .forEach(System.out::println);\n\n //display unique employee last names sorted\n System.out.printf(\"%nUnique employee last names:%n\");\n list.stream()\n .map(Employee::getLastName)\n .distinct()\n .sorted()\n .forEach(System.out::println);\n\n //display only first and last names\n System.out.printf(\n \"%nEmployee names in order by last name then first nameX:%n\"); \n list.stream()\n .sorted(lastThenFirst)\n .map(Employee::getName)\n .forEach(System.out::println);\n\n //group Employees by department\n System.out.printf(\"%nEmployees by department:%n\"); \n Map<String, List<Employee>> groupedByDepartment =\n list.stream()\n .collect(Collectors.groupingBy(Employee::getDepartment));\n\n groupedByDepartment.forEach(\n (department, employeesInDepartment) -> \n {\n System.out.println(department);\n employeesInDepartment.forEach(\n employee -> System.out.printf(\" %s%n\", employee));\n }\n );\n System.out.printf(\"%nAverage salary by department:%n\"); \n \n groupedByDepartment.forEach(\n \t (department, employeesInDepartment) -> \n \t {\n \t System.out.println(department);\n \t System.out.printf(\" %.2f%n\",employeesInDepartment.stream().mapToDouble(Employee::getSalary).average().getAsDouble());\n \t \n \t }\n \t );\n \n System.out.printf(\"%nMax salary by department:%n\"); \n \n groupedByDepartment.forEach(\n \t (department, employeesInDepartment) -> \n \t {\n \t System.out.println(department);\n \t System.out.printf(\" %.2f%n\",employeesInDepartment.stream().mapToDouble(Employee::getSalary).max().getAsDouble());\n \t \n \t }\n \t );\n\n //count number of Employees in each department\n System.out.printf(\"%nCount of Employees by department:%n\"); \n\n Map<String, Long> employeeCountByDepartment =\n list.stream()\n .collect(Collectors.groupingBy(Employee::getDepartment, \n TreeMap::new, Collectors.counting()));\n\n employeeCountByDepartment.forEach(\n (department, count) -> System.out.printf(\n \"%s has %d employee(s)%n\", department, count));\n\n/* Output looks something like :\n\n HR 4\n IT 8\n Sales 12\n*/\n\n\n // sum of Employee salaries with DoubleStream sum method\n System.out.printf(\n \"%nSum of Employees' salaries (via sum method): %.2f%n\",\n list.stream()\n .mapToDouble(Employee::getSalary)\n .sum());\n\n //calculate sum of Employee salaries with Stream reduce method\n System.out.printf(\n \"Sum of Employees' salaries (via reduce method): %.2f%n\",\n list.stream()\n .mapToDouble(Employee::getSalary)\n .reduce(0, (value1, value2) -> value1 + value2)); \n\n //average of Employee salaries with DoubleStream average method\n System.out.printf(\"Average of Employees' salaries: %.2f%n\",\n list.stream()\n .mapToDouble(Employee::getSalary)\n .average()\n .getAsDouble()); \n \n System.out.printf(\"Number of Lastnames beginning with B %d\",\n \t list.stream()\n \t .map(Employee::getLastName)\n \t .filter(e->e.charAt(0)=='b' || e.charAt(0)=='B')\n \t .count()); \n \n \n System.out.printf(\"\\nList of Employees with lastname beginning with B %s\",\n \t list.stream()\n \t .map(Employee::getLastName)\n \t .filter(e->(e.charAt(0)=='b' || e.charAt(0)=='B'))\n \t .collect(Collectors.toList()\n \t \t\t )); \n \n List<Employee> lastbyB =\n \t list.stream()\n \t .filter(s -> s.getLastName().startsWith(\"B\")||s.getLastName().startsWith(\"b\"))\n \t .collect(Collectors.toList()) ;\n \n System.out.printf(\n \t \"\\nFirst and Lastname upper case \\n\\n\");\n \n \n list.stream()\n\t .filter(s -> s.getLastName().startsWith(\"B\"))\n .map(emp ->{ \n \t return \n \t\t\t new Employee(emp.getFirstName().toUpperCase(), \n \t\t emp.getLastName().toUpperCase(),emp.getSalary(),\n \t\t emp.getDepartment());\n \t })\n .forEach(System.out::println);\n \n System.out.printf(\n \t \"\\nLastname upper case \\n\\n\");\n \n \n\nlist.stream()\n.map(x-> {\n\tif(x.getLastName().startsWith(\"B\")) {\n\treturn new Employee(x.getFirstName(), x.getLastName().toUpperCase(),x.getSalary(),x.getDepartment());\n\t}else {\n\t\treturn new Employee(x.getFirstName(), x.getLastName(),x.getSalary(),x.getDepartment());\n\n\t}\n\t})\n.forEach(System.out::println);\n\nStream<Employee> mstr=list.stream()\n.map(x-> {\n\tif(x.getLastName().startsWith(\"B\")) {\n\treturn new Employee(x.getFirstName(), x.getLastName().toUpperCase(),x.getSalary(),x.getDepartment());\n\t}else {\n\t\treturn new Employee(x.getFirstName(), x.getLastName(),x.getSalary(),x.getDepartment());\n\n\t}\n\t//return new Employee(x.getFirstName(), x.getLastName(),x.getSalary(),x.getDepartment());\n\t});\nStream<Employee> mstr1=list.stream()\n.map(x-> {\n\tif(x.getLastName().startsWith(\"B\")) {\n\treturn new Employee(x.getFirstName(), x.getLastName().toUpperCase(),x.getSalary(),x.getDepartment());\n\t}else {\n\t\treturn new Employee(x.getFirstName(), x.getLastName(),x.getSalary(),x.getDepartment());\n\n\t}\n\t//return new Employee(x.getFirstName(), x.getLastName(),x.getSalary(),x.getDepartment());\n\t});\n\n\n\n\n\nSystem.out.println(\n \"\\nJoining in Employees \\n\\n\"+\nmstr\n.map( Employee::toString)\n.collect(Collectors.joining()));\n\nSystem.out.println(\n \"\\nJoining in Employees with separator\\n\\n\"+\nmstr1\n.map( Employee::toString)\n.collect(Collectors.joining(\"---\\n---\")));\n\n\n\n\nSystem.out.printf(\n \"\\nEmploying with Last Name starting with I, sorted and without duplicate upper case \\n\\n\");\n\nlist.stream()\n.filter(s -> s.getLastName().startsWith(\"I\")||s.getLastName().startsWith(\"i\"))\n.map(e->e.getLastName())\n.sorted()\n.distinct()\n.forEach(System.out::println);\n\nSystem.out.printf(\n \"\\nAverage of Salary %.1f\\n\",\nlist.stream()\n.map(e->e.getSalary()/list.size())\n.reduce(0.0, (x,y)->x+y)\n.doubleValue());\n\nSystem.out.printf(\n \"\\nAverage of Salary %.1f\\n\",\nlist.stream()\n.mapToDouble(Employee::getSalary)\n.average().getAsDouble());\n\nSystem.out.printf(\n \"\\nAverage of Salary %.1f\\n\",\nlist.stream()\n.collect(Collectors.averagingDouble(Employee::getSalary)));\n\nSystem.out.printf(\n \"\\nTotal of Salary %.1f\\n\",\nlist.stream()\n.map(e->e.getSalary())\n.reduce(0.0, (x,y)->x+y)\n.doubleValue());\n\nSystem.out.printf(\n \"\\nFirstname of All Employees\\n\\n\");\n\nlist.stream()\n.map(e->e.getFirstName())\n.forEach(System.out::println);\n\nSystem.out.printf(\n \"\\nInfinite even numbers print the 20 first\\n\\n\");\nIntStream \n\n.iterate(0, i -> i + 2)\n.limit(20)\n.forEach(System.out::println); \n\n \t \n \n }", "public static void main(String[] args) {\n\t\t\n\t\tEmployee.retrieve(\" isactiveemp=1\", new String[0]).stream().forEachOrdered(e -> System.out.println(e.getFullName()));\n\t\t\n\t}", "public NetworkQuery(String firstname, String lastname, int sortorder) {\n HttpConnection c = null;\n \n int ch;\n InputStream is = null;\n InputStreamReader reader;\n String url;\n\n // Format the complete URL to request\n buffer.setLength(0);\n buffer.append(baseurl);\n buffer.append(\"?last=\");\n buffer.append((lastname != null) ? lastname : empty);\n buffer.append(\"&first=\");\n buffer.append((firstname != null) ? firstname : empty);\n buffer.append(\"&sort=\" + sortorder);\n\n url = buffer.toString();\n\n // Open the connection to the service\n try {\n c = open(url);\n results.removeAllElements();\n\n /*\n * Open the InputStream and construct a reader to convert from bytes\n * to chars.\n */\n is = c.openInputStream();\n reader = new InputStreamReader(is);\n while (true) {\n int i = 0;\n fields[0] = empty;\n fields[1] = empty;\n fields[2] = empty;\n fields[3] = empty;\n fields[4] = empty;\n fields[5] = empty;\n fields[6] = empty;\n do {\n buffer.setLength(0);\n while ((ch = reader.read()) != -1 && (ch != ',')\n && (ch != '\\n')) {\n if (ch == '\\r') {\n continue;\n }\n buffer.append((char) ch);\n }\n\n if (ch == -1) {\n throw new EOFException();\n }\n\n if (buffer.length() > 0) {\n if (i < fields.length) {\n fields[i++] = buffer.toString();\n }\n }\n } while (ch != '\\n');\n\n if (fields[0].length() > 0) {\n results.addElement(SimpleRecord.createRecord(Integer.valueOf(fields[0]),\n fields[1], fields[2], fields[3], fields[4], Integer.valueOf(fields[5]), fields[6]));\n }\n }\n } catch (Exception e) {\n\n } finally {\n try {\n if (is != null) {\n is.close();\n }\n if (c != null) {\n c.close();\n }\n } catch (Exception e) {\n }\n }\n resultsEnumeration = results.elements();\n }", "public void sortQueries(){\n\t\tif (queries == null || queries.isEmpty()) {\n\t\t\treturn;\n\t\t} else {\n\t\t Collections.sort(queries, new Comparator<OwnerQueryStatsDTO>() {\n @Override\n public int compare(OwnerQueryStatsDTO obj1, OwnerQueryStatsDTO obj2) {\n if(obj1.isArchived() && obj2.isArchived()) {\n return 0;\n } else if(obj1.isArchived()) {\n return 1;\n } else if(obj2.isArchived()) {\n return -1;\n } else {\n return 0;\n }\n }\n });\n\n\t }\n\t}", "public static void main(String[] args) {\n pizzaOptions();\n\n System.out.println(Arrays.toString(newOrder.toArray()));\n\n //printOrder(\"name\");\n }", "public static void main(String[] args) {\n\n List<String> animals = new ArrayList <String>();\n\n animals.add(\"Elephatn\");\n animals.add(\"snake\");\n animals.add(\"Lion\");\n animals.add(\"Mongoose\");\n animals.add(\"Cat\");\n\n\n\n// Collections.sort(animals, new StringLengthComparator());\n// Collections.sort(animals, new AlphabeticalComparator());\n Collections.sort(animals, new ReverseAlphabeticalComparator());\n for(String animal:animals){\n System.out.println(animal);\n }\n\n//////////////Sorting Numbers ///////////\n List<Integer> numbers = new ArrayList <Integer>();\n\n numbers.add(54);\n numbers.add(1);\n numbers.add(36);\n numbers.add(73);\n numbers.add(9);\n\n Collections.sort(numbers, new Comparator <Integer>() {\n @Override\n public int compare(Integer num1, Integer num2) {\n return num1.compareTo(num2);\n }\n });\n\n for(Integer number: numbers){\n System.out.println(number);\n }\n\n\n///////////////Sorting Arbitrary objects////////\n\n\n List<Person> people = new ArrayList <Person>();\n\n people.add(new Person(1,\"Joe\"));\n people.add(new Person(5,\"Harry\"));\n people.add(new Person(2,\"Hermoine\"));\n people.add(new Person(4,\"Muffet\"));\n\n// Sort in order of ID\n Collections.sort(people, new Comparator <Person>() {\n @Override\n public int compare(Person p1, Person p2) {\n\n if(p1.getId()>p2.getId()){\n return 1;\n }else if(p1.getId()<p2.getId()){\n return -1;\n }\n return 0;\n\n }\n });\n\n\n // Sort in order of Name\n Collections.sort(people, new Comparator <Person>() {\n @Override\n public int compare(Person p1, Person p2) {\n\n return p1.getName().compareTo(p2.getName());\n\n\n }\n });\n\n for(Person person: people){\n System.out.println(person);\n\n }\n\n }", "String pageDetails();", "@Override\n public int filterOrder() {\n return 1;\n }" ]
[ "0.63823026", "0.6307124", "0.606328", "0.58922654", "0.58478403", "0.58048016", "0.57379", "0.5723631", "0.5714745", "0.569929", "0.5695729", "0.56884235", "0.5677539", "0.5674051", "0.5671962", "0.5646494", "0.56265974", "0.56098086", "0.5578281", "0.5574898", "0.5527455", "0.551088", "0.5460802", "0.54605097", "0.5452916", "0.5450847", "0.5442223", "0.54340756", "0.5433286", "0.5427695", "0.54201627", "0.5417594", "0.5404885", "0.53835905", "0.5380908", "0.5377807", "0.5376446", "0.5369724", "0.5361218", "0.5354175", "0.53535366", "0.53410745", "0.5340931", "0.5329146", "0.5328401", "0.5316485", "0.5315937", "0.5315727", "0.5314979", "0.53143054", "0.53136617", "0.530871", "0.530076", "0.5297521", "0.52965575", "0.5288329", "0.52870303", "0.5286338", "0.5285899", "0.52837086", "0.52689743", "0.52687734", "0.5262148", "0.52533716", "0.52518284", "0.52472174", "0.5244718", "0.52422756", "0.52415174", "0.52398413", "0.52397454", "0.52357924", "0.5224256", "0.52240026", "0.521549", "0.5215164", "0.52132535", "0.52099043", "0.5206933", "0.5205291", "0.52048063", "0.52041155", "0.51961064", "0.5195868", "0.5194233", "0.5191769", "0.51895607", "0.5188328", "0.5188211", "0.5179474", "0.51668084", "0.5166708", "0.5164484", "0.51622784", "0.5156167", "0.51555675", "0.5151349", "0.5149895", "0.51435256", "0.5141638", "0.51363826" ]
0.0
-1
Fragment2 f = new Fragment2();
@Nullable @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { final View view = inflater.inflate(R.layout.fragment1,container,false); btnnavfrag1=(Button) view.findViewById(R.id.btnnavfrag1); aboutusbutton2 = (Button)view.findViewById(R.id.aboutusbutton2); Log.d(TAG,"onCreateView: started."); btnnavfrag1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // Toast.makeText(getActivity(),"Going To Fragment 1",Toast.LENGTH_SHORT).show(); ((MainActivity)getActivity()).setViewPager(1); // new Handler().postDelayed(new Runnable() { // @Override // public void run() { // slide = AnimationUtils.loadAnimation(view.getContext(),R.anim.slide); // aboutusbutton2 = (Button)view.findViewById(R.id.aboutusbutton2); // aboutusbutton2.setAnimation(slide); // } // }, 5000); } }); return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Fragment2 newInstance() {\n Fragment2 fragment = new Fragment2();\n return fragment;\n }", "public MainFragment2() {\r\n super();\r\n }", "public FragmentMy() {\n }", "@Override\n public void onClick(View v) {\n fragment = fragmentManager.findFragmentByTag(\"frag1\"); // you gonna find a fragment by a tag ..u defined that in acitivty when you called that fragment\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n if (fragment != null) {\n fragmentTransaction.remove(fragment); // remove Transaction\n }\n\n // now calling and adding another fragment after remove its parent fragment (where you are calling fragmetn from) fragment to fragment call\n fragment = new Fragment2();\n fragmentTransaction.add(R.id.base_layout, fragment, \"frag2\"); //giving tag to fragment\n fragmentTransaction.commit();\n }", "public void createFragment() {\n\n }", "protected abstract Fragment createFragment();", "public abstract Fragment getFragment();", "@Override\n public void onClick(View view) {\n\n Fragment fragment1 = getSupportFragmentManager().findFragmentByTag(fragment1Tag);\n if(fragment1 == null) {\n fragment1 = new IngrediantFragment();\n getSupportFragmentManager().beginTransaction()\n .add(R.id.fram1, fragment1,fragment1Tag)\n .commit();\n }\n else\n Toast.makeText(getApplicationContext(),\"fragment = null\",Toast.LENGTH_LONG).show();\n }", "public DisplayFragment() {\n\n }", "public Fragment_Tutorial() {}", "public static Fragment3 newInstance() {\n Fragment3 fragment = new Fragment3();\n return fragment;\n }", "public static Fragment0 newInstance(String param1, String param2) {\n Fragment0 fragment = new Fragment0();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public ExploreFragment() {\n\n }", "public RegisterFragment() {\n }", "public MyGoodsFragment() {\n }", "public static first_Fragment newInstance(String param1, String param2) {\n first_Fragment fragment = new first_Fragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public progFragment() {\n }", "public EmployeeFragment() {\n }", "public static Activity2Fragment newInstance(String param1, String param2) {\n Activity2Fragment fragment = new Activity2Fragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static FriendsFragment newInstance(String param1, String param2) {\n FriendsFragment fragment = new FriendsFragment();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "public static frag4_viewcompliment newInstance(String param1, String param2) {\r\n frag4_viewcompliment fragment = new frag4_viewcompliment();\r\n Bundle args = new Bundle();\r\n args.putString(ARG_PARAM1, param1);\r\n args.putString(ARG_PARAM2, param2);\r\n fragment.setArguments(args);\r\n return fragment;\r\n }", "@Override\r\n\tpublic void onFragmentCreate(Bundle savedInstanceState) {\n\t}", "public static SurvivorIncidentFormFragment newInstance(String param1, String param2) {\n// SurvivorIncidentFormFragment fragment = new SurvivorIncidentFormFragment();\n// Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n// fragment.setArguments(args);\n// return fragment;\n\n SurvivorIncidentFormFragment fragment = new SurvivorIncidentFormFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n\n\n }", "public static BlankFragment2 newInstance(String param1, String param2) {\n BlankFragment2 fragment = new BlankFragment2();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public CuartoFragment() {\n }", "public static TabClass_S_Fragment newInstance(String param1, String param2) {\n TabClass_S_Fragment fragment = new TabClass_S_Fragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "@Override\n public void onClick(View v) {\n Fragment fragmento = null;\n\n switch (v.getId()){\n case R.id.fragment1_button:\n fragmento = new Fragment1();\n break;\n case R.id.fragment2_button:\n fragmento = new Fragment2();\n break;\n }\n\n if(fragmento != null){\n FragmentTransaction ft = getFragmentManager().beginTransaction();\n ft.replace(R.id.place_holder, fragmento);\n ft.commit();\n }\n\n }", "RecommendSecondFragment(Place ref) {\n this.mPlace = ref;\n }", "public static FragmentTousWanted newInstance() {\n FragmentTousWanted fragment = new FragmentTousWanted();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState)\n\t{\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.main);\n\n\t\tFragmentManager fm = getFragmentManager();\n\t\tfm.findFragmentById(R.id.fragment1);\n\t}", "public MainActivityFragment(){\n\n }", "@Override\n public View onCreateView(\n LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState\n ) {\n return inflater.inflate(R.layout.fragment_second, container, false);\n }", "public RickAndMortyFragment() {\n }", "FragmentType createFragmentType();", "public static MiPerfilFamiliaFragment newInstance(String param1, String param2) {\n MiPerfilFamiliaFragment fragment = new MiPerfilFamiliaFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static P2Fragment newInstance(String param1) {\n P2Fragment fragment = new P2Fragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n\n fragment.setArguments(args);\n return fragment;\n }", "public CarModifyFragment() {\n }", "public static ReferenceFragment newInstance(String param1, String param2) {\n ReferenceFragment fragment = new ReferenceFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public NewShopFragment() {\n }", "public RegisterFragment() {\n // Required empty public constructor\n }", "public static ThirdFragment newInstance(String param1, String param2) {\n ThirdFragment fragment = new ThirdFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static BaseSimpleFragment newInstance(String param1, String param2) {\n BaseSimpleFragment fragment = new BaseSimpleFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n fragment.setArguments(args);\n return fragment;\n }", "public WkfFragment() {\n }", "public VehicleFragment() {\r\n }", "public static com.example.aplicacion.PerfilFragmento newInstance(String param1, String param2) {\n com.example.aplicacion.PerfilFragmento fragment = new com.example.aplicacion.PerfilFragmento();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public AddToCardFragment() {\n }", "public static FavouriteFragment newInstance(String param1, String param2) {\n FavouriteFragment fragment = new FavouriteFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public FavoriteFragment() {\n }", "public static PopularFragment newInstance(String param1, String param2) {\n PopularFragment fragment = new PopularFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static com.example.practiceandroid.Fragment.SearchFragment newInstance(String param1, String param2) {\n com.example.practiceandroid.Fragment.SearchFragment fragment = new com.example.practiceandroid.Fragment.SearchFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public TestDetailFragment() {\n }", "public static FaceRecFragment newInstance(String param1, String param2) {\n FaceRecFragment fragment = new FaceRecFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static Fine newInstance(String param1, String param2) {\n Fine fragment = new Fine();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static MoreFragment newInstance(String param1, String param2) {\n MoreFragment fragment = new MoreFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static OpenFrgament newInstance() {\n OpenFrgament fragment = new OpenFrgament();\n// Bundle args = new Bundle();\n//\n// fragment.setArguments(args);\n return fragment;\n }", "public static fragment_profile newInstance(String param1, String param2) {\n fragment_profile fragment = new fragment_profile();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_second, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_second, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_second, container, false);\n }", "public final Fragment mo60918d() {\n return new HotSearchAndDiscoveryFragment2();\n }", "public static FragmentRestaurante newInstance(String param1, String param2) {\n FragmentRestaurante fragment = new FragmentRestaurante();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static FortimewodgenerateFragment newInstance(String param1, String param2) {\n FortimewodgenerateFragment fragment = new FortimewodgenerateFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public ForecastFragment() {\n }", "public RestaurantFragment() {\n }", "@Override\n public Fragment getItem(int position) {\n if (position == 0) {\n FirstTabFragment tab1 = FirstTabFragment.newInstance();\n return tab1;\n } else {\n SecondTabFragment tab2 = SecondTabFragment.newInstance();\n return tab2;\n }\n }", "@Override\n protected Fragment createFragment() {\n Intent intent = getIntent();\n\n long id = intent.getLongExtra(MovieDetailFragment.EXTRA_ID, -1);\n return MovieDetailFragment.newInstance(id);\n }", "public HomeFragment() {}", "public static QuotationsFragment newInstance(String param1, String param2) {\n QuotationsFragment fragment = new QuotationsFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public CustomerFragment() {\n }", "public ProfileFragment() {\n\n }", "public static Fragmento_Exterior newInstance()\n {\n return new Fragmento_Exterior();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return secondfragmentLayout;\n }", "public static Fragment_home newInstance(String imei, String param2) {\n Fragment_home fragment = new Fragment_home();\n Bundle bundle=new Bundle();\n bundle.putString(\"imei\",imei);\n fragment.setArguments(bundle);\n return fragment;\n }", "public MainActivityFragment() {\n }", "public MainActivityFragment() {\n }", "public static fragment_search newInstance(String param1, String param2) {\n fragment_search fragment = new fragment_search();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static FourthFragment newInstance(String param1, String param2) {\n FourthFragment fragment = new FourthFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "@Override\n\tprotected Fragment createFragment() {\n\t\treturn new FormFragment();\n\t}", "public PersonDetailFragment() {\r\n }", "public static ShopFragment newInstance(String param1, String param2) {\n ShopFragment fragment = new ShopFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "private void placeNewFragment(Fragment f) {\r\n\t\tFragmentManager manager = getSupportFragmentManager();\r\n FragmentTransaction fragmentTransaction = manager.beginTransaction();\r\n fragmentTransaction.replace(R.id.fragmentHolder, f);\r\n fragmentTransaction.addToBackStack(null);\r\n fragmentTransaction.commit();\r\n\t}", "@Override\r\n public void setFragment(FragmentManager fragmentManager) {\n\r\n }", "private void loadFragment(String fragmentTag)\n {\n\n FragmentManager fm = getSupportFragmentManager();\n FragmentTransaction ft = fm.beginTransaction();\n ft.setCustomAnimations(android.R.anim.slide_in_left, android.R.anim.slide_out_right);\n\n Fragment taggedFragment = (Fragment) fm.findFragmentByTag(fragmentTag);\n if (taggedFragment == null)\n {\n\n if (fragmentTag == LondonFragment.TAG)\n {\n taggedFragment = new LondonFragment();\n }\n\n if (fragmentTag == ParisFragment.TAG)\n {\n taggedFragment = new ParisFragment();\n }\n\n if (fragmentTag == CopenhagenFragment.TAG)\n {\n taggedFragment = new CopenhagenFragment();\n }\n\n if (fragmentTag == DualFragment.TAG)\n {\n taggedFragment = new DualFragment();\n }\n\n }\n ft.replace(R.id.container, taggedFragment, fragmentTag);\n ft.commit();\n\n //Ezt fontos hívni\n getSupportFragmentManager().executePendingTransactions();\n\n Fragment frag2 = (Fragment) fm.findFragmentByTag(fragmentTag);\n frag2.getActivity();\n\n\n\n\n\n drawerLayout.closeDrawer(Gravity.LEFT);\n }", "public static FragmentCaminar newInstance(String param1, String param2) {\n FragmentCaminar fragment = new FragmentCaminar();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static QueenBEmbassyF newInstance() {\n QueenBEmbassyF fragment = new QueenBEmbassyF();\n //the way to pass arguments between fragments\n Bundle args = new Bundle();\n\n fragment.setArguments(args);\n return fragment;\n }", "public static FirstFragment newInstance(String param1, String param2) {\n FirstFragment fragment = new FirstFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static EmployeeFragment newInstance(String param1, String param2) {\n EmployeeFragment fragment = new EmployeeFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static ReservationFragment newInstance() {\n\n ReservationFragment _fragment = new ReservationFragment();\n// Bundle args = new Bundle();\n// args.putString(ARG_PARAM1, param1);\n// args.putString(ARG_PARAM2, param2);\n// fragment.setArguments(args);\n return _fragment;\n }", "public static MyProfileFragment newInstance(String param1, String param2) {\n MyProfileFragment fragment = new MyProfileFragment();\n return fragment;\n }", "public static ItemFragment newInstance(String param1, String param2) {\n ItemFragment fragment = new ItemFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_two, container, false);\n }", "@Override\n\tprotected Fragment createFragment() {\n\t\t// TODO Auto-generated method stub\n\t\t//Log.d(TAG, \"this is CrimeListActivity \", new Exception());\n\t\treturn new CrimeListFragment();\n\t\t\n\t}", "public static FragmentComida newInstance(String param1) {\n FragmentComida fragment = new FragmentComida();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n fragment.setArguments(args);\n return fragment;\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_second, container, false);\n }", "public PeopleFragment() {\n // Required empty public constructor\n }", "public static RVFragment newInstance(String param1, String param2) {\n RVFragment fragment = new RVFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static ContactoFragment newInstance(String param1, String param2) {\n ContactoFragment fragment = new ContactoFragment();\n Bundle args = new Bundle();\n args.putString(\"\", param1);\n args.putString(\"\", param2);\n fragment.setArguments(args);\n return fragment;\n }", "public BookDetailFragment() {\n setRetainInstance(true);\n }", "public static StepViewFragment newInstance(String param1, String param2) {\n StepViewFragment fragment = new StepViewFragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "public static Team1Fragment newInstance(String param1, String param2) {\n Team1Fragment fragment = new Team1Fragment();\n Bundle args = new Bundle();\n args.putString(ARG_PARAM1, param1);\n args.putString(ARG_PARAM2, param2);\n fragment.setArguments(args);\n return fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n return inflater.inflate(R.layout.fragment_second, container, false);\n }" ]
[ "0.7899438", "0.7460012", "0.70462996", "0.68839544", "0.6812196", "0.68110144", "0.66358614", "0.66043484", "0.6595967", "0.6567652", "0.65025455", "0.64907026", "0.6470883", "0.6462279", "0.64291793", "0.64183736", "0.637858", "0.6370246", "0.6364591", "0.6353952", "0.6350967", "0.63486683", "0.6335128", "0.6329055", "0.6328978", "0.6326917", "0.631334", "0.63117874", "0.63042575", "0.630027", "0.6296204", "0.6291096", "0.6275831", "0.62716", "0.62698233", "0.6265514", "0.6239701", "0.62365824", "0.6219646", "0.62152624", "0.6214375", "0.6213303", "0.6208501", "0.62056255", "0.6203077", "0.6201003", "0.6200516", "0.61974573", "0.6195512", "0.61893326", "0.6176085", "0.6169737", "0.6168418", "0.6167707", "0.615955", "0.61537665", "0.6153384", "0.6153384", "0.6153384", "0.61470634", "0.61457103", "0.6141454", "0.6140926", "0.61402947", "0.6126348", "0.6126157", "0.61259466", "0.6120471", "0.6118819", "0.6116535", "0.6114592", "0.6109092", "0.61069274", "0.610685", "0.610685", "0.609462", "0.6093796", "0.60856485", "0.608433", "0.60764194", "0.6076054", "0.6074985", "0.60741526", "0.60729647", "0.6070926", "0.60708165", "0.60636175", "0.60636103", "0.6062691", "0.6055201", "0.6053656", "0.6053271", "0.60505813", "0.6048571", "0.60390306", "0.6037704", "0.60293216", "0.60284996", "0.6027626", "0.6026952", "0.6026313" ]
0.0
-1
Toast.makeText(getActivity(),"Going To Fragment 1",Toast.LENGTH_SHORT).show();
@Override public void onClick(View v) { ((MainActivity)getActivity()).setViewPager(1); // new Handler().postDelayed(new Runnable() { // @Override // public void run() { // slide = AnimationUtils.loadAnimation(view.getContext(),R.anim.slide); // aboutusbutton2 = (Button)view.findViewById(R.id.aboutusbutton2); // aboutusbutton2.setAnimation(slide); // } // }, 5000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View view) {\n Toast.makeText( getActivity(), \"Fragment Second's\", Toast.LENGTH_SHORT ).show();\n\n\n }", "@Override\n public void onClick(View v) {\n\n String msg = fragmentCallback.getMsgFromActivity(\"null\");\n Toast.makeText(BlankFragment1.this.getContext(), msg, Toast.LENGTH_SHORT).show();\n }", "private void displayToast() {\n if(getActivity() != null && toast != null) {\n Toast.makeText(getActivity(), toast, Toast.LENGTH_LONG).show();\n toast = null;\n }\n }", "public void onClick(View v) {\n getActivity().getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, new MyContactFragment()).commit();\n\n // Replace\n Toast.makeText( getActivity(),\"Emergency contact\", Toast.LENGTH_SHORT).show();\n }", "@Override \n public void onClick(View v) \n {\n \tShowFragmentXXH1 demoFragment = new ShowFragmentXXH1();\n FragmentManager fragmentManager = getFragmentManager();\n FragmentTransaction transaction =fragmentManager.beginTransaction();\n transaction.replace(R.id.fragment_container, demoFragment);\n transaction.commit();\n \n }", "@Override \n public void onClick(View v) \n {\n \tShowFragmentXXH2 demoFragment = new ShowFragmentXXH2();\n FragmentManager fragmentManager = getFragmentManager();\n FragmentTransaction transaction =fragmentManager.beginTransaction();\n transaction.replace(R.id.fragment_container, demoFragment);\n transaction.commit();\n \n }", "@Override\n public void onClick(View view) {\n\n Fragment fragment1 = getSupportFragmentManager().findFragmentByTag(fragment1Tag);\n if(fragment1 == null) {\n fragment1 = new IngrediantFragment();\n getSupportFragmentManager().beginTransaction()\n .add(R.id.fram1, fragment1,fragment1Tag)\n .commit();\n }\n else\n Toast.makeText(getApplicationContext(),\"fragment = null\",Toast.LENGTH_LONG).show();\n }", "@Override\n public void displayMessage(String message) {\n Toast.makeText(getActivity(),message,Toast.LENGTH_SHORT).show();\n }", "private void showFragment(Fragment fragment) {\n Log.d(TAG, \"showFragment: Run selected fragment\");\n FragmentManager fragmentManager = getSupportFragmentManager();\n fragmentManager.beginTransaction()\n .replace(R.id.content_frame, fragment)\n .commit();\n }", "Activity getActivity();", "Activity getActivity();", "@Override\n public void onClick(View v) {\n ((MainActivity)getActivity()).showFragment(new ListeAnnonceFragment());\n\n }", "@Override\n public void onWaitFragmentInteractionShow() {\n getSupportFragmentManager()\n .beginTransaction()\n .add(R.id.main_container, new WaitFragment(), \"WAIT\")\n .addToBackStack(null)\n .commit();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n FragmentTransaction fragmentTransaction = mFragmentManager.beginTransaction();\n fragmentTransaction.replace(R.id.containerView,new SentFragment()).commit();\n //Intent i = new Intent(getApplicationContext(), Task_Process.class);\n //startActivity(i);\n //finish();\n }", "public void onClick(View v) {\n switchFragmentTo(1);\n }", "@Override\n public void onClick(View v) {\n android.app.Fragment onjF = null;\n onjF = new BlankFragment();\n FragmentManager fragmentManager = getFragmentManager();\n fragmentManager.beginTransaction().replace(R.id.fragment,onjF).commit();\n }", "public void openFragment(Fragment fragment) {\n\n transaction = getSupportFragmentManager().beginTransaction();\n\n transaction.addToBackStack(null);\n transaction.replace(R.id.container, fragment);\n transaction.commit();\n\n\n }", "private void startValveFragment() {\n FragmentTransaction ft = getSupportFragmentManager().beginTransaction();\n Fragment valveFragment = new vavlesFragment(mUser, ProfileActivity.this, dialogCallBack);\n ft.replace(R.id.fragment_container, valveFragment).commit();\n }", "@Override\n public void onClick(View view) {\n Intent i = new Intent(getActivity(), MainActivity.class );\n i.putExtra( \"fragmentName\", \"expenseFragment\");\n startActivity( i );\n }", "public void goToFriends() {\n\t\tFragmentManager manager = getActivity().getSupportFragmentManager();\n\t\tFragmentTransaction transaction = manager.beginTransaction();\n\t\ttransaction.replace(R.id.container_fragment_main,new FragmentFriends());\n\t\ttransaction.commit();\n\t}", "@Override\n public void onClick(View v) {\n ThreeFragment dialogFragment = ThreeFragment.newInstance(\"Are you sure to do this action?\");\n dialogFragment.show(getFragmentManager(), \"dialog\");\n }", "@Override\n public void onClick(View view) {\n if (uuidString == null) {\n SignupFragment fragment = new SignupFragment();\n getActivity().getSupportFragmentManager().beginTransaction()\n .replace(R.id.fragment_container, fragment,\"findThisFragment\")\n .addToBackStack(null)\n .commit();\n } else {\n Intent intent = new Intent(getActivity(), DashboardActivity.class);\n startActivity(intent);\n }\n }", "public void onClick(View v) {\n switchFragmentTo(2);\n }", "public void onClick(View v) {\n switchFragmentTo(2);\n }", "@Override\n public void onClick(View v) {\n Fragment fragmento = null;\n\n switch (v.getId()){\n case R.id.fragment1_button:\n fragmento = new Fragment1();\n break;\n case R.id.fragment2_button:\n fragmento = new Fragment2();\n break;\n }\n\n if(fragmento != null){\n FragmentTransaction ft = getFragmentManager().beginTransaction();\n ft.replace(R.id.place_holder, fragmento);\n ft.commit();\n }\n\n }", "public void showFragment(Fragment fragment, String tag) {\n fragment.setRetainInstance(true);\n getSupportFragmentManager()\n .beginTransaction()\n .replace(R.id.content_frame, fragment, tag)\n .addToBackStack(null)\n .commit();\n setTitleForTag(tag);\n }", "void onFragmentInteraction(View v);", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n Toast.makeText(getActivity(), getResources().getString(R.string.onCreateViewTop), Toast.LENGTH_SHORT).show();\n return inflater.inflate(R.layout.fragment_first, container, false);\n }", "private void displaySelectedFragment(Fragment fragment) {\n// if (fragmentName == null || !fragment.getClass().getSimpleName().equals(fragmentName)) {\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.frame_container, fragment);\n fragmentTransaction.commit();\n fragmentName = fragment.getClass().getSimpleName();\n// }\n }", "public void onClick(View v) {\n switchFragmentTo(3);\n }", "public void onClick(View v) {\n switchFragmentTo(3);\n }", "@Override\n public void onClick(View v) {\n FragmentManager fm = getActivity().getSupportFragmentManager();\n Fragment upFragment = fm.findFragmentById(R.id.fragment_container_up);\n TextView upText = upFragment.getView().findViewById(R.id.text_view_up);\n if (upText == null){\n Log.i(MainActivity.TAG, \"TextView in up not found\");\n }else{\n upText.setText(\"got from down fragment\");\n }\n\n }", "@Override\n public void onComplete(@NonNull Task<Void> task)\n {\n FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.fragment_container, new Fragment_VacatureOmschrijving()).addToBackStack(\"tag\").commit();\n Toast.makeText(getActivity(), \"Uw sollicitatie is succesvol verzonden\", Toast.LENGTH_LONG).show();\n }", "public void goToPortfolioFragment(){\n Fragment fragment = new PortfolioFragment();\n FragmentManager fm = getSupportFragmentManager();\n FragmentTransaction transaction = fm.beginTransaction();\n transaction.replace(R.id.contentFragment, fragment);\n transaction.commit();\n }", "void showDialog() {\n DialogFragment newFragment = MyAlertDialogFragment.newInstance(R.string.alert_dialog_two_buttons_title);\n newFragment.show(getFragmentManager(), \"dialog\");\n }", "void onFragmentInteraction();", "void onFragmentInteraction();", "void onFragmentInteraction();", "@Override\n public void onClick(View view) {\n FragmentManager fragmentManager = getSupportFragmentManager();\n final CheckingDialog checkingDialog = CheckingDialog.getInstance(0);\n checkingDialog.show(fragmentManager,\"check\");\n checkingDialog.setCancelable(true);\n }", "void onFragmentInteraction(int position);", "public void showFragment(Fragment fragment, String tagFragment) {\n // In tablet layout, do not try to display the Home Fragment again. Show empty fragment.\n if (isDualPanel() && tagFragment.equalsIgnoreCase(BudgetListFragment.class.getName())) {\n fragment = new Fragment();\n tagFragment = \"Empty\";\n }\n\n FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\n transaction.setCustomAnimations(R.anim.slide_in_right, R.anim.slide_out_left, R.anim.slide_in_right,\n R.anim.slide_out_left);\n // Replace whatever is in the fragment_container view with this fragment,\n // and add the transaction to the back stack.\n if (isDualPanel()) {\n transaction.replace(R.id.fragmentDetail, fragment, tagFragment);\n } else {\n // Single panel UI.\n transaction.replace(R.id.fragmentMain, fragment, tagFragment);\n\n // todo: enable going back only if showing the list.\n// boolean showingList = tagFragment.equals(BudgetListFragment.class.getName());\n// setDisplayHomeAsUpEnabled(showingList);\n\n transaction.addToBackStack(null);\n }\n\n // Commit the transaction\n transaction.commit();\n }", "@Override\n public void onClick(View v){\n SignUpFragment fragment = new SignUpFragment();\n FragmentManager manager = getFragmentManager();\n manager.beginTransaction().replace(R.id.fragmentHolder,fragment,\"Sign Up\").commit();\n }", "private void displayView(int position) {\n title = getString(R.string.app_name);\n\n if (currentLoggedUser == null){\n fragment = new HomeFragment();\n title = getString(R.string.title_home);\n\n if (dontShowMustLoginToast){\n dontShowMustLoginToast=false;\n }\n else{\n Toast.makeText(MainActivity.this, R.string.auth_must_login_first, Toast.LENGTH_SHORT).show(); // display messages\n }\n\n }\n else {\n\n\n switch (position) {\n case 0:\n fragment = new HomeFragment();\n title = getString(R.string.title_home);\n break;\n case 1:\n fragment = new MyProfileFragment();\n title = getString(R.string.title_myprofile);\n break;\n case 2:\n JustDonatedFragment.DonationValidity donationValidity = JustDonatedFragment.isLegalDonation();\n if (donationValidity == JustDonatedFragment.DonationValidity.LEGAL) {\n showBloodDonationConfirmDialog().show();\n }\n else if (donationValidity == JustDonatedFragment.DonationValidity.ILLEGAL_DATE){\n Toast.makeText(MainActivity.this, R.string.illegalDonationDate, Toast.LENGTH_LONG).show(); // display message\n }\n else {\n Toast.makeText(MainActivity.this, R.string.illegalDonationLocation, Toast.LENGTH_LONG).show(); // display message\n }\n break;\n\n case 3:\n fragment = new DonateNowFragment();\n title = getString(R.string.title_donate_now);\n break;\n\n case 4:\n fragment = new Game4();\n title = getString(R.string.title_gameprogress);\n break;\n case 5:\n fragment = new NavigationFragment();\n title = getString(R.string.title_navigation);\n break;\n default:\n break;\n }\n }\n\n if (fragment != null) {\n FragmentManager fragmentManager = getSupportFragmentManager();\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n fragmentTransaction.replace(R.id.container_body, fragment);\n fragmentTransaction.commit();\n\n // set the toolbar title\n getSupportActionBar().setTitle(title);\n }\n }", "@Override\n public void onClick(View v) {\n ((LoginActivity) getActivity()).showLoginFragment();\n\n\n }", "void onFragmentInteraction(String string);", "void onFragmentInteraction(String string);", "private void openTeacherCheck() {\n FragmentTransaction fr1 = getFragmentManager().beginTransaction().addToBackStack(\"Tag\");\n fr1.replace(R.id.fragment_container, new Fragment_View_In_Out());\n fr1.commit();\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(\n R.layout.fragment_first, container, false);\n\n txt = v.findViewById(R.id.txt);\n txt.setText(\"First Fragment\");\n return v;\n }", "public void show(android.app.FragmentManager fragmentManager,\r\n\t\t\tString string) {\n\t\t\r\n\t}", "Long onFragmentInteraction();", "public void onUPP()\r\n {\r\n Fragment frag = getSupportFragmentManager().findFragmentById(R.id.fragmentSad);\r\n// //android.app.FragmentManager fm = getFragmentManager();\r\n// FragmentTransaction ft = getFragmentManager().beginTransaction();\r\n// ft.remove(frag);\r\n// ft.commit();\r\n//}\r\n\r\n FragmentManager fm = getSupportFragmentManager();\r\n fm.beginTransaction()\r\n .setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out)\r\n .show(frag)\r\n .commit();\r\n\r\n }", "public void goAddFriends (View view){\n Fragment newFragment = new AddFriendsFragment();\n FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\n\n // Replace whatever is in the fragment_container view with this fragment,\n // and add the transaction to the back stack if needed\n transaction.replace(R.id.fragment_container, newFragment);\n transaction.addToBackStack(null);\n\n // Commit the transaction\n transaction.commit();\n\n }", "public void onClick(View v) {\n switchFragmentTo(5);\n }", "@Override\n public void onBoomButtonClick(int index) {\n fragment = null;\n fragmentClass = TvShowFragment.class;\n ((AppCompatActivity)getActivity()).getSupportActionBar().setTitle(\"TV Show\");\n ((AppCompatActivity)getActivity()).getSupportActionBar().setBackgroundDrawable(new ColorDrawable(Color.parseColor(\"#660099\")));\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {\n Window window = getActivity().getWindow();\n window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);\n window.setStatusBarColor(Color.parseColor(\"#660099\"));\n }\n mNavigationView = (NavigationView)getActivity().findViewById(R.id.nvView);\n Menu nv = mNavigationView.getMenu();\n MenuItem item = nv.findItem(R.id.nav_horloge_atomique_fragment);\n item.setChecked(true);\n try {\n fragment = (Fragment) fragmentClass.newInstance();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n // Insert the fragment by replacing any existing fragment\n FragmentManager fragmentManager = getActivity().getSupportFragmentManager();\n fragmentManager.beginTransaction().replace(R.id.flContent, fragment).commit();\n }", "@Override\n public void onClick(View v) {\n Toast.makeText(getContext(),\"hey uuuu clicked me \",Toast.LENGTH_SHORT).show();\n }", "private void showHome(){\n fragment = new HomeFragment();\n FragmentManager fragmentManager = getSupportFragmentManager();\n fragmentManager.beginTransaction().replace(R.id.mainLayout, fragment, fragment.getTag()).commit();\n }", "void onFragmentInteractionMain();", "public void loadFragment(Fragment fragment) { Animation connectingAnimation = AnimationUtils.loadAnimation(getContext(), R.anim.slide_up);\n//\n FragmentTransaction transaction = getActivity().getSupportFragmentManager().beginTransaction();\n transaction.replace(R.id.nowShowingFrame, fragment);\n transaction.addToBackStack(null);\n transaction.commit();\n }", "public void onClick(View v) {\n switchFragmentTo(4);\n }", "public void onClick(View v) {\n switchFragmentTo(4);\n }", "@Override\n public void onClick(View v) {\n fragment = fragmentManager.findFragmentByTag(\"frag1\"); // you gonna find a fragment by a tag ..u defined that in acitivty when you called that fragment\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n if (fragment != null) {\n fragmentTransaction.remove(fragment); // remove Transaction\n }\n\n // now calling and adding another fragment after remove its parent fragment (where you are calling fragmetn from) fragment to fragment call\n fragment = new Fragment2();\n fragmentTransaction.add(R.id.base_layout, fragment, \"frag2\"); //giving tag to fragment\n fragmentTransaction.commit();\n }", "void onFragmentInteraction(String id);", "private void showToast(String message){\n\n Toast.makeText(this, message, Toast.LENGTH_SHORT).show();\n }", "@Nullable\r\n @Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\r\n final View view = inflater.inflate(R.layout.fragment1,container,false);\r\n btnnavfrag1=(Button) view.findViewById(R.id.btnnavfrag1);\r\n aboutusbutton2 = (Button)view.findViewById(R.id.aboutusbutton2);\r\n Log.d(TAG,\"onCreateView: started.\");\r\n btnnavfrag1.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n// Toast.makeText(getActivity(),\"Going To Fragment 1\",Toast.LENGTH_SHORT).show();\r\n ((MainActivity)getActivity()).setViewPager(1);\r\n// new Handler().postDelayed(new Runnable() {\r\n// @Override\r\n// public void run() {\r\n// slide = AnimationUtils.loadAnimation(view.getContext(),R.anim.slide);\r\n// aboutusbutton2 = (Button)view.findViewById(R.id.aboutusbutton2);\r\n// aboutusbutton2.setAnimation(slide);\r\n// }\r\n// }, 5000);\r\n\r\n }\r\n });\r\n return view;\r\n }", "@Override\r\n\tpublic void onFragmentCreate(Bundle savedInstanceState) {\n\t}", "private void showToast(final String message, final int toastLength) {\n post(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(getActivity(), message, toastLength).show();\n }\n });\n }", "@Override\n public void onClick(View view) {\n FragmentManager fm = getSupportFragmentManager();\n EditNameDialog editNameDialog = new EditNameDialog();\n editNameDialog.show(fm, \"fragment_edit_name\");\n }", "@Override\r\n\tpublic void onFragmentStart() {\n\t}", "@Override\n public void onClick(View v) {\n FragmentManager manager = getSupportFragmentManager();\n Fragment frag = manager.findFragmentByTag(\"fragment_camera\");\n if (frag != null) {\n manager.beginTransaction().remove(frag).commit();\n }\n CreateGistDialogFragment alertDialogFragment = new CreateGistDialogFragment();\n alertDialogFragment.show(manager, \"fragment_camera\");\n }", "void OpenFragmentInteraction();", "@Override\n public void onPause() {\n super.onPause();\n\n Toast.makeText(getContext(),\"on pause\",Toast.LENGTH_SHORT).show();\n Log.e(\"fragmentlifecycle\",\"on pause\");\n }", "public void onClick(View view) {\n FragmentManager manager = getFragmentManager();\n Fragment frag = manager.findFragmentByTag(\"fragment_edit_name\");\n if (frag != null) {\n manager.beginTransaction().remove(frag).commit();\n }\n switch (view.getId()) {\n case R.id.showcustom:\n Lab6MyDialogFragment editNameDialog = new Lab6MyDialogFragment();\n editNameDialog.show(manager, \"fragment_edit_name\");\n break;\n case R.id.showalert:\n Lab6MyAlertDialogFragment alertDialogFragment = new Lab6MyAlertDialogFragment();\n alertDialogFragment.show(manager, \"fragment_edit_name\");\n break;\n }\n }", "@Override\n public void onClick(View v) {\n\n Toast toast = Toast.makeText(getApplicationContext(), \"Coming soon.\", Toast.LENGTH_SHORT);\n toast.show();\n\n }", "@Override\n public void onClick(View view) {\n getActivity().getSupportFragmentManager().beginTransaction()\n .replace(R.id.container, new CadastrarFragments())\n .commitNow();\n }", "@Override\n public void onDialogPositiveClick(DialogFragment dialog) {\n // User touched the dialog's positive button\n Toast.makeText(this, \"OK\", Toast.LENGTH_LONG).show();\n\n }", "protected void pushFragment(Fragment fragment){\n\n if(fragment == null)\n return;\n\n android.app.FragmentManager fragmentManager = getFragmentManager();\n\n if(fragmentManager != null){\n android.app.FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n if(fragmentTransaction != null){\n //vacio hace referencia al id de la pantalla de bienvenida\n //fragmentTransaction.replace(R.id.vacio, fragment);\n //fragmentTransaction.commit();\n fragmentManager.beginTransaction().replace(R.id.vacio, fragment).addToBackStack(null).commit();\n }\n }\n\n }", "@Override\n public void onClick(View v) {\n FragmentTransaction FT = getSupportFragmentManager().beginTransaction();\n FT.replace(R.id.Frame_Fragments, new simplefragment());\n FT.commit();\n\n button2.setVisibility(View.GONE);\n button.setVisibility(View.VISIBLE);\n }", "@Override\n public void onClick(View v) {\n TextView activityText = getActivity().findViewById(R.id.text_view_activity);\n if (activityText == null) {\n Log.i(MainActivity.TAG, \"TextView in activity not found\");\n } else {\n activityText.setText(\"got from down fragment\");\n Log.i(MainActivity.TAG, \"TextView in activity edited successfully\");\n }\n }", "public void onClick(View v) {\n Toast.makeText( getActivity(),\"Voice Recognition\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getActivity(), \"clicked okay\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v){\n FragmentTransaction transaction = getFragmentManager().beginTransaction();\n transaction.replace(R.id.frame_layout,new final_confirmation());\n transaction.commit();\n }", "private void loadFragment(Fragment fragment, String tag) {\n\n FragmentManager fm = getSupportFragmentManager();\n FragmentTransaction ft = fm.beginTransaction();\n ft.replace(R.id.frame_tut, fragment, tag);\n ft.setTransition(FragmentTransaction.TRANSIT_FRAGMENT_OPEN);\n ft.commit();\n }", "void showDialog() {\n\t\tDialogFragment newFragment = MyAlertDialogFragment\n\t\t\t\t.newInstance(R.string.not_enoughth_information);\n\t\tnewFragment.show(getFragmentManager(), \"dialog\");\n\t}", "@Override\n public void onClick(View v) {\n Fragment newFragment = new NewMovimientoFragment();\n FragmentTransaction transaction = getFragmentManager().beginTransaction();\n\n // Replace whatever is in the fragment_container view with this fragment,\n // and add the transaction to the back stack\n transaction.replace(R.id.frame_container, newFragment);\n transaction.addToBackStack(null);\n\n // Commit the transaction\n transaction.commit();\n }", "public void startRegisterFragment() {\n RegisterFragment registerFragment = new RegisterFragment();\n fragmentManager.beginTransaction().replace(R.id.fragment, registerFragment).commit();\n }", "@Override\n public void onClick(View v) {\n if (v == backclick){\n getFragmentManager().popBackStack();\n\n }\n\nelse if(v == improvelisting){\n\n\n Fragment fr = new Improvelisting();\n FragmentChangeListener fc = (FragmentChangeListener) getActivity();\n fc.replaceFragment(fr);\n }\n\n /*else if (v == thingstodoattractionavailable)\n {\n Toast.makeText(getActivity(),\"things\",Toast.LENGTH_SHORT).show();\n\n }*/\n /* else if (v == peoplewviewd){\n\n getFragmentManager().popBackStack();\n }*/\n\n\n\n\n\n }", "@Override\n public void onViewCreated(View view, Bundle savedInstanceState) {\n osmanycaptbtn=view.findViewById(R.id.osmanycaptbtn);\n osmanycaptbtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n //Intent intent=new Intent(getActivity(),MainActivity.class);\n //startActivity(intent);\n Toast.makeText(getActivity(),\"bal\",Toast.LENGTH_SHORT).show();\n Intent intent=new Intent(getActivity(),osmanyhallcapt.class);\n startActivity(intent);\n }\n });\n\n }", "public void onClick(View v) {\n switch (v.getId()) {\n case R.id.send_money:\n Toast.makeText(getActivity().getApplicationContext(), \"Send Money Button\", Toast.LENGTH_SHORT).show();\n Fragment sendMoneyFragment = new SendMoneyFragment();\n FragmentTransaction transaction = getFragmentManager().beginTransaction();\n\n transaction.replace(R.id.main_activity, sendMoneyFragment);\n transaction.addToBackStack(null);\n\n transaction.commit();\n break;\n case R.id.withdraw_cash:\n Toast.makeText(getActivity().getApplicationContext(), \"Withdraw Cash Button\", Toast.LENGTH_SHORT).show();\n break;\n case R.id.buy_airtime:\n Toast.makeText(getActivity().getApplicationContext(), \"Buy Airtime Button\", Toast.LENGTH_SHORT).show();\n break;\n case R.id.m_shwari:\n Toast.makeText(getActivity().getApplicationContext(), \"M-Shwari Button\", Toast.LENGTH_SHORT).show();\n break;\n case R.id.lipa_na_mpesa:\n Toast.makeText(getActivity().getApplicationContext(), \"Lipa na MPESA Button\", Toast.LENGTH_SHORT).show();\n break;\n case R.id.my_account:\n Toast.makeText(getActivity().getApplicationContext(), \"My Account Button\", Toast.LENGTH_SHORT).show();\n break;\n default:\n break;\n }\n }", "public void doPositiveClick() {\n // Do stuff here.\n Log.i(\"FragmentAlertDialog\", \"Positive click!\");\n }", "public void goMainStampCard() {\n FragmentManager fragmentManager = getSupportFragmentManager();\n FragmentTransaction fragmentTransaction = fragmentManager\n .beginTransaction();\n fragmentTransaction.setCustomAnimations(R.anim.abc_fade_in,\n R.anim.abc_fade_out);\n fragmentTransaction.addToBackStack(null);\n FragmentMainStampCard fragmentMain = FragmentMainStampCard\n .newInstances();\n fragmentTransaction.replace(R.id.container, fragmentMain);\n fragmentTransaction.commit();\n }", "@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n Student student = (Student) adapter.getItem(position);\n //Toast.makeText(getActivity(), movie.originalName, Toast.LENGTH_SHORT).show();\n startActivity(new Intent(getApplicationContext(), MultipleFragmentsActivity.class));\n }", "protected void showToast(String message) {\n\tToast.makeText(this, message, Toast.LENGTH_SHORT).show();\n}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view=(View) inflater.inflate(R.layout.fragment_fragment_name, container, false);\r\n view.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n Intent intent = new Intent(getContext(),SecondActivity.class);\r\n }\r\n });\r\n\r\n return view;\r\n }", "@Override\n public void onClick(View view) {\n Fragment newCase=new TripNoteAddFragment();\n FragmentTransaction transaction=getFragmentManager().beginTransaction();\n transaction.replace(R.id.content_frames,newCase); // give your fragment container id in first parameter\n transaction.addToBackStack(null); // if written, this transaction will be added to backstack\n transaction.commit();\n }", "private void switchToFragment(Fragment fragment) {\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.replace(binding.frame.getId(), fragment);\n fragmentTransaction.commit();\n }", "private void showHomeOnClick(){\n //create a new fragment and transaction\n homeFragment = new HomeFragment();\n FragmentTransaction ft = getFragmentManager().beginTransaction();\n //replace whatever is in the fragment container view with this fragment\n //and add the transaction to the back stack\n ft.add(R.id.fragment_container,homeFragment);\n ft.addToBackStack(null);\n ft.commit();\n }", "public void onClick(DialogInterface dialog, int whichButton) {\n fragment = new JustDonatedFragment();\n title = getString(R.string.title_just_donated);\n if (fragment != null) {\n FragmentManager fragmentManager = getSupportFragmentManager();\n FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction();\n fragmentTransaction.replace(R.id.container_body, fragment);\n fragmentTransaction.commit();\n\n // set the toolbar title\n getSupportActionBar().setTitle(title);\n }\n\n }", "public void onClick(DialogInterface dialog, int id) {\n\r\n Context context = getApplicationContext();\r\n CharSequence text = \"Welcome \" + name + \"! Signing up...\";\r\n int duration = Toast.LENGTH_SHORT;\r\n\r\n Toast toast = Toast.makeText(context, text, duration);\r\n toast.show();\r\n }", "void showDialog2(int i) {\n FragmentTransaction ft = getSupportFragmentManager().beginTransaction();\n Fragment prev = getSupportFragmentManager().findFragmentByTag(\"dialog\");\n if (prev != null) {\n Log.d(TAG, \"dialog is already showing!!!\");\n// DialogFragment df = (DialogFragment) prev;\n// df.dismiss();\n ft.remove(prev);\n }\n\n // Create and show the dialog.\n DialogFragment newFragment = MyDialogFragment.newInstance(i);\n newFragment.show(ft, \"dialog\");\n }", "@Override\n public void onClick(View v) {\n FragmentTransaction ft = getFragmentManager().beginTransaction();\n Fragment fragment = new FavoriteFragment();\n ft.replace(R.id.layout_fragment, fragment, \"FavoriteFragment\");\n ft.commit();\n }", "public void returnFromFragment(View v) {\n blankFrag.setVisibility(View.VISIBLE);\n itemFrag.setVisibility(View.INVISIBLE);\n userFrag.setVisibility(View.INVISIBLE);\n Toast.makeText(AdminActivity.this, \"Back\", Toast.LENGTH_SHORT).show();\n }" ]
[ "0.82731616", "0.7294103", "0.72557056", "0.7145437", "0.7052633", "0.7039421", "0.7005832", "0.6963483", "0.68367445", "0.6834603", "0.6834603", "0.6813486", "0.6789885", "0.6768063", "0.6736456", "0.67238945", "0.67101425", "0.6705777", "0.6690564", "0.6686207", "0.6681246", "0.66742307", "0.66576326", "0.66576326", "0.6628704", "0.66172767", "0.6605999", "0.658272", "0.6580795", "0.65753424", "0.65753424", "0.6569823", "0.6547072", "0.6538656", "0.65313464", "0.6527184", "0.6527184", "0.6527184", "0.65241235", "0.6518126", "0.6516231", "0.65113986", "0.65010244", "0.6484289", "0.64771336", "0.64771336", "0.64699054", "0.64484274", "0.641706", "0.6414007", "0.6387977", "0.638674", "0.63820165", "0.638008", "0.6375686", "0.6365946", "0.636063", "0.63605464", "0.6350983", "0.6350983", "0.634579", "0.6331749", "0.63238275", "0.63213813", "0.6313421", "0.6305273", "0.62898713", "0.6289758", "0.628101", "0.62762904", "0.6268515", "0.626173", "0.6250864", "0.62485826", "0.6235478", "0.6228007", "0.622479", "0.6223502", "0.6223091", "0.6216928", "0.6214748", "0.62138355", "0.62121403", "0.6210492", "0.62063116", "0.61993194", "0.61985266", "0.61940396", "0.6192105", "0.6185876", "0.61826134", "0.6178361", "0.6171634", "0.61703193", "0.61680275", "0.6167251", "0.61671424", "0.61665154", "0.61627066", "0.6154173", "0.61507493" ]
0.0
-1
Append all the strings from the map of arrays.
private String getFileContents () { final String s = m_buffers.values ()// .stream ()// .flatMap (List::stream)// .collect (Collectors.joining ()); return s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void encodeEmbeddedStringArrays(XMLStreamReader reader, Map<String, Integer> mapping, ByteArrayOutputStream baos) throws XMLStreamException {\n Map<String, List<String>> valuesByFeature = new HashMap<>();\n while (reader.hasNext()) {\n if (reader.getEventType() == XMLStreamConstants.START_ELEMENT) {\n String feature = reader.getName().getLocalPart();\n // Forward to the element text which is the feature value string\n reader.next();\n String value = reader.getText();\n valuesByFeature.compute(feature, (k, v) -> v != null ? v : new ArrayList<>()).add(value);\n }\n reader.next();\n }\n\n // Now write the values in a compact way: Write the encoded feature name once and how many values to expect, then write those values.\n // Write the numbers of string array features that have values\n writeInt(valuesByFeature.keySet().size(), baos);\n for (String feature : valuesByFeature.keySet()) {\n final Collection<String> values = valuesByFeature.get(feature);\n writeInt(mapping.get(feature), baos);\n writeInt(values.size(), baos);\n for (String value : values) {\n writeString(value, baos);\n }\n }\n }", "private static String[] getNewArray(HashMap listas){\n ArrayList<String> result = new ArrayList<String>();\n for (int i = 0; i< listas.size(); i++ ){\n String key = \"L\" + i;\n ArrayList<String> itemsList = (ArrayList<String>) listas.get(key);\n result.addAll(itemsList);\n }\n return result.toArray(new String[0]);\n }", "public void buildDict(String[] dict) {\n for (String s:dict){\n insert(s);\n }\n }", "public static void main(String[] args) {\n StringySuperArray data = new StringySuperArray(5);\n\n //System.out.println(data1.toStringDebug());\n System.out.println(data.toStringDebug());\n\n // data1.add(\"hi\");\n //data.add(\"hi\");\n \n int i = 0;\n while(i < 26){\n\tdata.add(\"\"+(char)('A'+i%26));\n\t//data1.add(\"asd\");\n\ti++;\n }\n\n //data1.add(\"hi\");\n \n //System.out.println(data1.add(\"wfd\"));\n\n //System.out.println(data.size());\n \n //System.out.println(data.get(10));\n\n //System.out.println(data.toStringDebug());\n\n System.out.println(data);\n System.out.println(\"Standard loop:\");\n\n for(int n = 0; n < data.size(); n++){\n System.out.print(data.get(n)+\" \");\n }\n \n System.out.println();\n System.out.println(\"for-each loop:\");\n \n for(String s : data){\n System.out.print(s+\" \");\n }\n }", "private void insertArray(List<String> strings) {\n while (strings.size() > stringArray.length) {\n reallocArray();\n }\n int i = 0;\n for(String string : strings) {\n if (string != null) stringArray[i++] = string;\n }\n }", "public void addAll(String[] a)\n {\n\tfor (String s : a)\n\t this.add(s);\n }", "private void insertStrings(Map<String,String> mapValues) {\n mapFieldsStrings.putAll(mapValues);\n }", "private void fillMap(String[] querys) {\r\n\r\n\t\tLOG.info(\"fillMap\");\r\n\r\n\t\tquerysMap = new HashMap<String, String>();\r\n\t\t\r\n\t\tfor (String query : querys) {\r\n\t\t\t\r\n\t\t\tString[] temp = getStringArray(query, START_QUERY_PATTERN);\r\n\t\t\t\r\n\t\t\tif (temp != null && temp.length == 2) {\r\n\t\t\t\t\r\n\t\t\t\ttemp[0] = temp[0].replaceAll(\"\\\\P{Alnum}\", \"\");\r\n\t\t\t\tquerysMap.put(temp[0], temp[1].trim());\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\tLOG.error(\"El array es nulo o la longitud no es la esperada\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\tLOG.info(\"END fillMap\");\r\n\r\n\t}", "private String toStringMap( Map<String, String[]> m ) {\n StringBuilder builder = new StringBuilder();\n m.keySet().forEach( ( k ) -> {\n builder.append( \"Key=\" ).append( k )\n .append( \", \" )\n .append( \"Value/s=\" ).append( Arrays.toString( m.get( k ) ) )\n .append( System.lineSeparator() );\n } );\n return builder.toString();\n }", "public void fillMap(Map<String, List<String>> map){\n \tfor(String word : dictionary.words){ //Iterate over the ArrayList in the Dictionary object\n \t\tList<String> list = new ArrayList<String>();\n \t\tfor(String w : dictionary.words){ //iterate through all words in dictionary to find all one letter off from word\n \t\t\tif(isOneLetterOff(w, word))\n \t\t\t\tlist.add(w);\n \t\t\t//if w isn't off from word by one letter, check next w\n \t\t}\n \t\tmap.put(word, list);\n \t}\n }", "private void makeArrays()\n\t{\n\t\tfor (String key : sub.keySet())\n\t\t\tsub.put(key, ((List<String>) sub.get(key)).toArray(s0));\n\t\tfor (String key : attrs.keySet())\n\t\t\tattrs.put(key, ((List<String>) attrs.get(key)).toArray(s0));\n\t\tfor (String key : defs.keySet())\n\t\t\tdefs.put(key, ((List<String>) defs.get(key)).toArray(s0));\n\t\tfor (String key : smodes.keySet())\n\t\t{\n\t\t\tList<Integer> list = (List<Integer>) smodes.get(key);\n\t\t\tint[] array = new int[list.size()];\n\t\t\tfor (int i = 0; i < list.size(); i++)\n\t\t\t\tarray[i] = list.get(i);\n\t\t\tsmodes.put(key, array);\n\t\t}\n\t\tfor (String key : amodes.keySet())\n\t\t{\n\t\t\tList<Integer> list = (List<Integer>) amodes.get(key);\n\t\t\tint[] array = new int[list.size()];\n\t\t\tfor (int i = 0; i < list.size(); i++)\n\t\t\t\tarray[i] = list.get(i);\n\t\t\tamodes.put(key, array);\n\t\t}\n\t}", "@Override\n\tpublic void putAll(Map<? extends String, ? extends String> m) {\n\t}", "public abstract ArrayList<String[]> toStrings();", "public void buildMap()\n {\n for(int letterNum=0; letterNum < myText.length()-myNum; letterNum++) {\n String key = myText.substring(letterNum,letterNum+myNum);\n String nextLetter = String.valueOf(myText.charAt(letterNum + myNum));\n if (!map.containsKey(key)) {\n ArrayList<String> lettersArray = new ArrayList<String>();\n lettersArray.add(nextLetter);\n map.put(key,lettersArray);\n }else\n {\n map.get(key).add(nextLetter);\n }\n }\n }", "public void mapToString() {\r\n for (Square[] x : map) {\r\n for (Square y : x) {\r\n System.out.print(y.getVisual() + \" \");\r\n }\r\n System.out.println();\r\n }\r\n }", "public static void concatMap() {\n List<String> data = Utils.getData();\n Observable.fromIterable(data)\n .concatMap((item) -> Observable.just(item + \" concat mapped\").repeat(2)\n ).subscribe(new MyObserver<>());\n }", "public void add(String... values) {\n\t\t// checks if is a valid array\n\t\tif (ArrayUtil.isNotEmpty(values)) {\n\t\t\t// creates new JS array and push it\n\t\t\tarray.push(ArrayString.fromOrEmpty(values));\n\t\t}\n\t}", "public static void printArrays() {\r\n\t\tIterator it = arrayMap.entrySet().iterator();\r\n\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tMap.Entry<Integer, ArrayList<Integer>> pair = (Map.Entry<Integer, ArrayList<Integer>>) it\r\n\t\t\t\t\t.next();\r\n\t\t\tArrayList<Integer> list = pair.getValue();\r\n\t\t\tIterator liter = list.iterator();\r\n\t\t\twhile (liter.hasNext()) {\r\n\t\t\t\tSystem.out.print(liter.next() + \" \");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "String[][] packData();", "public void buildDict(String[] dict) {\n for (String word : dict) {\n for (int i = 0; i < word.length(); i++) {\n String key = word.substring(0, i) + word.substring(i+1);\n int[] indexAndChar = new int[2];\n indexAndChar[0] = i;\n indexAndChar[1] = word.charAt(i) - 'a';\n List<int[]> indexAndCharList = dictonary.getOrDefault(key, new ArrayList<>());\n indexAndCharList.add(indexAndChar);\n\n dictonary.put(key, indexAndCharList);\n }\n }\n }", "void writeMap(Collection<?> array);", "private static List<String> appendAll(final String[] names, final String toAppend) {\n return new ArrayList<String>() { {\n for (String name : names) { add(name + toAppend); }\n } };\n }", "public static void main(String[] args) throws FileNotFoundException {\n\r\n\t\tRandom random = new Random();\r\n\t\tMap<String, String[][]> mapTM = new HashMap<String, String[][]>();\r\n\t\tMap<String, List<String>> map = new HashMap<String, List<String>>();\r\n\r\n\t\tArrayList<String> list1 = new ArrayList<String>();\r\n\t\tlist1.add(\"T\");\r\n\t\tlist1.add(\"E\");\r\n\t\tlist1.add(\"M\");\r\n\t\tlist1.add(\"P\");\r\n\t\tlist1.add(\"C\");\r\n\t\tlist1.add(\"SS\");\r\n\r\n\t\tArrayList<String> list2 = new ArrayList<String>();\r\n\t\tlist2.add(\"T\");\r\n\t\tlist2.add(\"E\");\r\n\t\tlist2.add(\"M\");\r\n\t\tlist2.add(\"P\");\r\n\t\tlist2.add(\"C\");\r\n\t\tlist2.add(\"SS\");\r\n\r\n\t\tArrayList<String> list3 = new ArrayList<String>();\r\n\t\tlist3.add(\"T\");\r\n\t\tlist3.add(\"E\");\r\n\t\tlist3.add(\"M\");\r\n\t\tlist3.add(\"P\");\r\n\t\tlist3.add(\"C\");\r\n\t\tlist3.add(\"SS\");\r\n\t\t\r\n\t\tArrayList<String> list4 = new ArrayList<String>();\r\n\t\tlist4.add(\"T\");\r\n\t\tlist4.add(\"Ex\");\r\n\t\tlist4.add(\"M\");\r\n\t\tlist4.add(\"Px\");\r\n\t\tlist4.add(\"C\");\r\n\t\tlist4.add(\"ScS\");\r\n\r\n\t\tArrayList<String> list5 = new ArrayList<String>();\r\n\t\tlist5.add(\"Tf\");\r\n\t\tlist5.add(\"E\");\r\n\t\tlist5.add(\"M\");\r\n\t\tlist5.add(\"Pd\");\r\n\t\tlist5.add(\"C\");\r\n\t\tlist5.add(\"SS\");\r\n\r\n\t\tArrayList<String> list6 = new ArrayList<String>();\r\n\t\tlist6.add(\"Tf\");\r\n\t\tlist6.add(\"E\");\r\n\t\tlist6.add(\"Mf\");\r\n\t\tlist6.add(\"P\");\r\n\t\tlist6.add(\"Cd\");\r\n\t\tlist6.add(\"SS\");\r\n\r\n\t\tmap.put(\"C1\", list1);\r\n\t\tmap.put(\"C2\", list2);\r\n\t\tmap.put(\"C3\", list3);\r\n\t\tmap.put(\"C4\", list4);\r\n\t\tmap.put(\"C5\", list5);\r\n\t\tmap.put(\"C6\", list6);\r\n\t\t\r\n\t\tList<String> keys = new ArrayList<String>(map.keySet());\r\n\t\tCollections.shuffle(keys);\r\n\r\n\t\tfor (Object string : keys) {\r\n\t\t\tint row = 6;\r\n\t\t\tint column = 8;\r\n\t\t\tint i = 0;\r\n\t\t\tint j = 0;\r\n\t\t\tboolean reset =false;\r\n\t\t\tString[][] stringArray = new String[row][column];\r\n\t\t\tList<String> temp = map.get(string);\r\n\t\t\tCollections.shuffle(temp);\r\n\t\t\tfor (int iterator = 0; iterator < column; iterator++) {\r\n\t\t\t\t\r\n\t\t\t\tif(iterator >= temp.size()){\r\n\t\t\t\t\tint randomInteger = random.nextInt(temp.size());\r\n\t\t\t\t\tstringArray[i][j] = temp.get(randomInteger);\r\n\t\t\t\t}else{\r\n\t\t\t\t\tstringArray[i][j] = temp.get(iterator);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tfor(Object string01 : keys){\r\n\t\t\t\t\tif(mapTM.get(string01) != null && !string01.equals(string)){\r\n\t\t\t\t\t\tString[][] temp01 = mapTM.get(string01);\r\n\t\t\t\t\t\tif(temp01[i][j] != null && temp01[i][j].equals(stringArray[i][j])){\r\n\t\t\t\t\t\t\tj = 0;\r\n\t\t\t\t\t\t\tCollections.shuffle(temp);\r\n\t\t\t\t\t\t\titerator = -1;\r\n\t\t\t\t\t\t\treset = 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\tif(reset){\r\n\t\t\t\t\treset = false;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (j < column && j != column - 1) {\r\n\t\t\t\t\tj++;\r\n\t\t\t\t} else if (j == column - 1 && i != row - 1) {\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tj = 0;\r\n\t\t\t\t\tCollections.shuffle(temp);\r\n\t\t\t\t\titerator = -1;\r\n\t\t\t\t} else if (j == column - 1 && i == row - 1) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tmapTM.put((String) string, stringArray);\r\n\t\t}\r\n\t\t\r\n\t\tfor (Map.Entry<String, String[][]> entry : mapTM.entrySet()) {\r\n\t\t\tSystem.out.println(entry.getKey());\r\n\t\t\tSystem.out.println(Arrays.deepToString(entry.getValue()));\r\n\t\t}\r\n\r\n\t}", "public static String[] recorrerElementos(String[] arr){\n\n int maxLenght = maxLength(arr);\n for (int i = maxLenght-1; i >= 0 ; i--){\n HashMap listas = getListas(10);\n for(String arrayElement: arr){\n String key = \"L\" + arrayElement.charAt(i);\n\n ArrayList<String> itemsList = (ArrayList<String>) listas.get(key);\n itemsList.add(arrayElement);\n }\n arr = getNewArray(listas);\n }\n return arr;\n }", "private void appendMap(StringBuilder strBuilder, Map<String, String> map) {\n strBuilder.append(\"(\");\n for (Map.Entry<String, String> entry : map.entrySet()) {\n strBuilder.append(\"'\")\n .append(entry.getKey().replaceAll(\"'\", \"\\\\\\\\'\"))\n .append(\"'='\")\n .append(entry.getValue().replaceAll(\"'\", \"\\\\\\\\'\"))\n .append(\"', \");\n }\n // remove trailing \", \"\n strBuilder.deleteCharAt(strBuilder.length() - 1)\n .deleteCharAt(strBuilder.length() - 1)\n .append(\")\");\n }", "public void tempArray() {\n for (int i = 0; i < newWord.length(); i++) {\n for (String c : keySetNewWord) {\n if(String.valueOf(newWord.charAt(i)).equals(c)) {\n int p = mapNewWord.get(c) + 1;\n mapNewWord.put(c, p);\n }\n }\n }\n }", "void append(E[] elements);", "final static String[] getEnvVarArray(@SuppressWarnings(\"rawtypes\") Map map)\n {\n if (map == null)\n {\n return null;\n }\n\n String[] arr = new String[map.size()];\n\n int x = 0;\n for (Object k : map.keySet())\n {\n Object v = map.get(k);\n arr[x] = String.format(\"%s=%s\", k, v);\n ++x;\n }\n\n return arr;\n }", "private static List<ajr> m19375a(Map<String, String> map) {\n if (map == null) {\n return null;\n }\n if (map.isEmpty()) {\n return Collections.emptyList();\n }\n List<ajr> arrayList = new ArrayList(map.size());\n for (Entry entry : map.entrySet()) {\n arrayList.add(new ajr((String) entry.getKey(), (String) entry.getValue()));\n }\n return arrayList;\n }", "public static String[] getValueSet(Map<String, String> mp, String[] keys) {\n \n List<String> tmpvl = new ArrayList<String>();\n for (int i=0; i< keys.length; i++){\n tmpvl.add(mp.get(keys[i]));\n }\n String[] tmpv = (String[])tmpvl.toArray(new String[tmpvl.size()]);\n return tmpv;\n }", "public static String[][] map2array(Map<String, String> map) {\n if (map == null) return new String[2][0];\n int n = map.size();\n String[][] rt = new String[2][n];\n rt[0] = (String[]) map.keySet().toArray(new String[n]);\n rt[1] = (String[]) map.values().toArray(new String[n]);\n return rt;\n }", "private String[] combine(String array1[], String array2[]) {\n\t\tint length = array1.length + array2.length;\r\n\t\tString result[] = new String[length];\r\n\t\tSystem.arraycopy(array1, 0, result, 0, array1.length);\r\n\t\tSystem.arraycopy(array2, 0, result, array1.length, array2.length);\r\n\t\treturn result;\r\n\t}", "public void addValues(String[] values) {\n this.values.addAll(Arrays.asList(values));\n }", "void doMerge() {\n int[] temp = new int[arr.length + brr.length];\n int count = 0;\n for (int i = 0; i < arr.length; i++) {\n temp[i] = arr[i];\n count++;\n }\n for (int i = 0; i < brr.length; i++) {\n temp[count++] = brr[i];\n }\n for (int i = 0; i < temp.length; i++) {\n System.out.println( temp[i] );\n }\n String a[] = {\"A\", \"E\", \"I\"};\n String b[] = {\"O\", \"U\"};\n List<String> list = new ArrayList( Arrays.asList( a ) );\n list.addAll( Arrays.asList( b ) );\n Object[] c = list.toArray();\n System.out.println( Arrays.toString( c ) );\n }", "public static void main(String[] args) {\n\t\tArrayList<String> givenArray = new ArrayList<String>();\n\t\tArrayList<String> listOfNamesStartingWithA = new ArrayList<String>();\n\t\tArrayList<String> listOfNamesStartingWithG = new ArrayList<String>();\n\t\tgivenArray.add(\"apple\");\n\t\tgivenArray.add(\"appleinc\");\n\t\tgivenArray.add(\"applemac\");\n\t\tgivenArray.add(\"google\");\n\t\t\n\t\tHashMap<String, ArrayList> map = new HashMap<String, ArrayList>();\n\t\tmap.clone();\n\t\tIterator<String> itr = givenArray.iterator();\n\t\t\n\t\twhile(itr.hasNext()) {\n\t\t\tString arrayListOb = itr.next();\n\n\t\t\tString key =arrayListOb.substring(0, 1);\n\t\t\tif(key.startsWith(\"a\")) {\n\t\t\t\tlistOfNamesStartingWithA.add(arrayListOb);\t\n\t\t\t\tmap.put(key, listOfNamesStartingWithA);\t\n\t\t\t}\n\t\t\tif(key.startsWith(\"g\")) {\n\t\t\t\tlistOfNamesStartingWithG.add(arrayListOb);\n\t\t\t\tmap.put(key, listOfNamesStartingWithG);\n\t\t\t}\t\t\t\t\n\t\t\tSystem.out.println(key);\n\t\t\tSystem.out.println(map.get(key));\n\t\t}\n\t\tSystem.out.println(map.size());\n\t\t//System.out.println(map.get(\"g\"));\n\t\t//System.out.println(map.get(\"a\"));\n\t\t/*for(Map.Entry<String,ArrayList> entry: map.entrySet())\n\t\t{\n\t\t\tSystem.out.println(map.get(\"a\"));\n\t\t}*/\n\t}", "public static String[] merge(String[] arr1, String[] arr2, String arr3[]) {\n StringList list = new StringList(arr1);\n list.merge(arr2);\n list.merge(arr3);\n return list.toArray();\n }", "public void setStrings(String mkey, String[] values) {\n\t\tint j = 0;\n\t\tif (values != null)\n\t\t\tfor (String value : values) {\n\t\t\t\tif (value != null) {\n\t\t\t\t\tsetString(mkey + j, value);\n\t\t\t\t\tj++;\n\t\t\t\t}\n\t\t\t}\n\t\t// erase other elements\n\t\tString last;\n\t\twhile (true) {\n\t\t\tlast = getString(mkey + j);\n\t\t\tif (last == null)\n\t\t\t\tbreak;\n\t\t\tsetString(mkey + j, null);\n\t\t\tj++;\n\t\t}\n\t}", "protected abstract Set<String> _addToSet(String key, Collection<String> str);", "public Builder addAllStrValues(\n java.lang.Iterable<java.lang.String> values) {\n ensureStrValuesIsMutable();\n super.addAll(values, strValues_);\n onChanged();\n return this;\n }", "public String[] getStringArray() {\r\n\t\tString[] a = value.getStringArray();\r\n\t\tif (a == null)\r\n\t\t\treturn null;\r\n\t\tint n = a.length;\r\n\t\tString[] b = new String[n];\r\n\t\tfor (int i = 0; i < n; i++)\r\n\t\t\tb[i] = substitution(a[i]);\r\n\t\treturn (b);\r\n\t}", "public static String[] merge(String[] arr1, String[] arr2) {\n StringList list = new StringList(arr1);\n list.merge(arr2);\n return list.toArray();\n }", "private void appendLongStrBuf(char[] arr) {\n for (int i = 0; i < arr.length; i++) {\n appendLongStrBuf(arr[i]);\n }\n }", "void addDictContent (String[] parts){\n String s2;\n\n // добавление ИНов и АУТов в СПРАВОЧНИК\n for (int i = 1; i<this.counterString1+1; i++) {\n s2=parts[0]+\"|\"+parts[4];\n\n if (s2.equals( this.string1 [i][1])) {\n if (parts[2].equals(\"IN\")){\n this.string1 [i][2]=this.string1 [i][2]+parts[1]+\"|\"+parts[3]+\"|\";\n }\n if (parts[2].equals(\"OUT\")){\n this.string1 [i][3]=this.string1 [i][3]+parts[1]+\"|\"+parts[3]+\"|\";\n }\n\n }\n } // endif I\n }", "public void addStrings(String... strings) {\r\n\t\tif (strings != null) {\r\n\t\t\tfor (String string : strings) {\r\n\t\t\t\tthis.addString(string);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void append(ExtElement el, String... values) {\r\n\t\tJsArrayString arr = JsArray.createArray().cast();\r\n\t\tfor (String s : values) {\r\n\t\t\tarr.push(s);\r\n\t\t}\r\n\t\tappend(el, arr);\r\n\t}", "public static String[] concatenateArray(String[] a, String[] b) {\n String[] r = new String[a.length + b.length];\n\n for (int i = 0; i < a.length; i++) {\n r[i] = a[i];\n }\n\n for (int i = 0; i < b.length; i++) {\n r[a.length + i] = b[i];\n }\n\n return r;\n }", "public void putAll(Map<? extends String, ? extends List<String>> m)\r\n/* 411: */ {\r\n/* 412:576 */ this.headers.putAll(m);\r\n/* 413: */ }", "@Override\n public void putAll(Map<? extends String, ? extends T> m) {\n for (Map.Entry<? extends String, ? extends T> e : m.entrySet()) {\n put(e.getKey(), e.getValue());\n }\n }", "public HashMap<String, StringBuffer> addEndTags(HashMap<String, StringBuffer> map) {\n\t\tfor (StringBuffer b : map.values()) {\n\t\t\tif (b.length() > 0)\n\t\t\t\tb.append(Constants.SEMICOLON);\n\t\t}\n\t\treturn map;\n\t}", "private static void standardPopulate(String[] s) {\n\t\tfor(/*int i = 0; i<s.length;i++*//* String z: s*/ int i = 0;i<s.length;i++){\r\n\t\t\t//s[i] = \"String #\"+(i+1);\r\n\t\t\t/*i++;\r\n\t\t\tz = \"String #\"+(i+1); */\r\n\t\t\tString string= \"String #\"+(i+1);\r\n\t\t\ts[i] = string; // setting position i into string\r\n\t\t\t\r\n\t\t}\r\n\t}", "private void addWordsToBuffer(String [] words) {\r\n\t\tfor(String s : words) {\r\n\t\t\tbuffer.add(s);\r\n\t\t}\r\n \r\n }", "public void genericStringArray() {\n\t\tArrayList<String> b1 = new ArrayList<String>();\n\t\tb1.add(\"ABC\");\n\t\tb1.add(\"sdfsdfs\");\n\t\tSystem.out.println(\"String generic ArrayList b1: \" + b1);\n\n\t}", "public void putAll(MultiStringMap<V> mappings) {\n for (Map.Entry<String, Collection<V>> entry : mappings.entrySet()) {\n putAll(entry.getKey(), entry.getValue());\n }\n }", "public void setStringArray(String[] value);", "public void replaceThesarusWordwithGoogleWord ( ) {\r\n\t \t\t \t\r\n\t \tfor (Map.Entry<String, List<String>> entry : GoogleToThesarus.entrySet()) {\r\n\t String key = entry.getKey();\r\n\t List<String> values = entry.getValue();\r\n\t //String wordIsReplaced=null;\r\n\t \r\n\t for (String temp: values) {\r\n\t \t//why is this null\r\n\t \t\r\n\t \tif (splitto.equals(temp)) {\r\n\t \t\tsplitto=key;\r\n\t \t\tif(!replacedWordList.contains(splitto))\r\n\t \t\t\treplacedWordList.add(splitto);\r\n \t\t\r\n\t \t \t\t \t\t}\r\n\t \telse {\r\n\t \t\t//wordIsReplaced=splitto;\r\n\t \t\t//System.out.println(\"failed\");\r\n\t \t}\r\n\t \t\t }\r\n\t \t}\r\n\t }", "public abstract String[] map() throws TooFewNocNodesException;", "public String[] getStringArray(String key);", "public static void main(String[] args) {\n\t\tString[][] strArray1 = new String [][] { {\"H\", \"e\", \"l\", \"l\", \"o\"}, {\"W\", \"o\", \"r\", \"l\", \"d\"} };\r\n\t\tString printString = \"\";\r\n\t\t\r\n\t\tString[][] strArray2 = new String[][] { {\"H\", \"W\"}, {\"e\", \"o\"}, {\"l\", \"r\"}, {\"l\", \"l\"}, {\"o\", \"d\"} };\r\n\t\tString printString2 = \"\";\r\n\t\t\r\n\t\tString[][] strArray3 = new String[][] { {\"o\", \"l\", \"l\", \"e\", \"H\"}, {\"d\", \"l\", \"r\", \"o\", \"W\"} };\r\n\t\tString printString3 = \"\";\r\n\t\t\r\n\t\tString[][] strArray4 = new String[][] { {\"W\", \"H\"}, {\"o\", \"e\"}, {\"r\", \"l\"}, {\"l\", \"l\"}, {\"d\", \"o\"} };\r\n\t\tString printString4 = \"\";\r\n\t\t\r\n\t\t\r\n\t\t//printString = arrManip1(strArray1);\r\n\t\t//System.out.println(printString);\r\n\t\t\r\n\t\t//printString2 = arrManip2(strArray2);\r\n\t\t//System.out.println(printString2);\r\n\t\t\r\n\t\t//printString3 = arrManip3(strArray3);\r\n\t\t//System.out.println(printString3);\r\n\t\t\r\n\t\tprintString4 = arrManip4(strArray4);\r\n\t\tSystem.out.println(printString4);\r\n\t\t\r\n\t}", "@Override\n\tpublic String toString()\n\t{\n\t\tfinal AppendingStringBuffer buffer = new AppendingStringBuffer();\n\t\tboolean first = true;\n\t\tfor (Map.Entry<String, Object> entry : entrySet())\n\t\t{\n\t\t\tif (first == false)\n\t\t\t{\n\t\t\t\tbuffer.append(' ');\n\t\t\t}\n\t\t\tfirst = false;\n\n\t\t\tbuffer.append(entry.getKey());\n\t\t\tbuffer.append(\" = \\\"\");\n\t\t\tfinal Object value = entry.getValue();\n\t\t\tif (value == null)\n\t\t\t{\n\t\t\t\tbuffer.append(\"null\");\n\t\t\t}\n\t\t\telse if (value.getClass().isArray())\n\t\t\t{\n\t\t\t\tbuffer.append(Arrays.asList((Object[])value));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tbuffer.append(value);\n\t\t\t}\n\n\t\t\tbuffer.append('\\\"');\n\t\t}\n\t\treturn buffer.toString();\n\t}", "private void addHistogram2map(HashMap<String, double[][]> map, double[] histValues, String key, int iteration) {\r\n if (!map.containsKey(key)) {\r\n map.put(key, new double[nRandomisations][]);\r\n }\r\n double[][] values = map.get(key);\r\n values[iteration] = histValues;\r\n }", "public void testing(){\n //-2 because the last one has the double bracket\n finalSites = new String[(sites.length -1)][10]; //the final 2d array to hold onto the sites\n for(int i = 0; i < (sites.length -1); i++) { //for all of the sites\n String temp = sites[i];\n String temp1 = temp.replaceAll(\"\\\"\", \"\"); // get rid of the \"\" around each thing\n String temp2 = temp1.replaceAll(\"\\\\[\", \"\"); //get rid of the brackets\n tempSites = temp2.split(\",\"); //split site info by comma\n for (int j = 0; j < tempSites.length; j++) { //from 0 -->10 (id, site id, lat, long....)\n finalSites[i][j] = tempSites[j]; //put the value into the final array\n if(i == (sites.length-2) && j == (tempSites.length -1)){ //sites.length - 2 && tempSites.length.\n makeMap(); //new method to help break up the code...\n break; //redundant\n }\n } //end j for\n } //end i for\n }", "abstract CharArraySet build();", "public void addAll(String[] words, String filename) {\n\t\taddAll(words, filename, 1);\n\t}", "public static String[] toStringArray(final HashMap<String, Integer> syms) {\n return syms.keySet().toArray(new String[syms.size()]);\n }", "public String getArrayValues(){\n String tempString = \"\";\r\n for(int y = 0; y < this.arraySize; y++){\r\n tempString += \" \"+this.arr[y]+\" \";\r\n }\r\n return tempString;\r\n }", "public void setAll(Map<String, String> values)\r\n/* 360: */ {\r\n/* 361:532 */ for (Map.Entry<String, String> entry : values.entrySet()) {\r\n/* 362:533 */ set((String)entry.getKey(), (String)entry.getValue());\r\n/* 363: */ }\r\n/* 364: */ }", "public void addToArray(String computerOutput, String userOutput)\n\t{\n\t\tif ((userOutput != null) && (!userOutput.equals(\"\"))\n\t\t\t\t&& (arrayCount != arrayMax))\n\t\t{\n\t\t\tbotArray[arrayCount] = computerOutput.toLowerCase();\n\t\t\tuserArray[arrayCount] = userOutput;\n\t\t\tarrayCount++;\n\t\t}\n\n\t}", "public String[] getStrings(String mkey) {\n\t\tString last;\n\t\tint i = 0;\n\t\tArrayList<String> v = new ArrayList<>();\n\t\twhile (true) {\n\t\t\tlast = getString(mkey + i);\n\t\t\ti++;\n\t\t\tif (last == null)\n\t\t\t\tbreak;\n\t\t\tv.add(last);\n\t\t}\n\t\tif (v.size() != 0) {\n\t\t\tString[] str = new String[v.size()];\n\t\t\treturn v.toArray(str);\n\t\t} else {\n\t\t\treturn (String[]) getDefault(mkey);\n\t\t}\n\t}", "private static void createMap()\r\n {\r\n position = new String[8][8];\r\n for(int i=0;i<8;i++)\r\n {\r\n int z=0;\r\n for(int j=72;j>=65;j--)\r\n {\r\n position[i][z]=(char)j+\"\"+(i+1); //uses ascii char placement for letters\r\n z++;\r\n }\r\n }\r\n \r\n }", "public String[] concatArrays(String[] input1, String[] input2){\n String[] result = new String[input1.length + input2.length];\n System.arraycopy(input1, 0, result, 0, input1.length);\n System.arraycopy(input2, 0, result, input1.length, result.length - input1.length);\n return result;\n }", "@SuppressWarnings(\"rawtypes\")\n void addToArray(Pair<ArrayList<Object>> arr, Pair add)\n {\n arr.parsed.add(add.parsed);\n arr.unparsed = arr.unparsed.substring(0, arr.unparsed.length() - 1);\n if (arr.unparsed.length() > 1)\n arr.unparsed += \",\";\n arr.unparsed += add.unparsed + \"]\";\n }", "private String[] convertList(String[][] l){\n String[] list = new String[l.length];\n for(int i =0; i<list.length;i++){\n String input = l[i][1];\n System.out.println(input);\n list[i] = input;\n }\n \n return list;\n }", "public void append(String toAppend) {\n if (toAppend == null) {\n toAppend = \"null\";\n }\n int appendLength = toAppend.length();\n if (appendLength > 0) {\n stringArray[arrayLen++] = toAppend;\n stringLength += appendLength;\n /*\n * If we hit 1k elements, let's do a join to reduce the array size. This\n * number was arrived at experimentally through benchmarking.\n */\n if (arrayLen > 1024) {\n toString();\n // Preallocate the next 1024 (faster on FF).\n setLength(stringArray, 1024);\n }\n }\n }", "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 StrStrMap(Map<String, String> map) {\n this.map.putAll(map);\n }", "private void getMapping() {\n double [][] chars = new double[CHAR_SET_SIZE][1];\n for (int i = 0; i < chars.length; i++) {\n chars[i][0] = i;\n }\n Matrix b = new Matrix(key).times(new Matrix(chars));\n map = b.getArray();\n }", "public static void initializeArr(String[] arr){\n\t for(int i = 0; i < arr.length; i++){\n\t arr[i] = \"\";\n\t }\n\t}", "public static void main(String[] args) {\n\t\tList<String> list_Strings = new ArrayList<String>();\n\t\tlist_Strings.add(\"Red\");\n\t\tlist_Strings.add(\"Green\");\n\t\tlist_Strings.add(\"Orange\");\n\t\tlist_Strings.add(\"White\");\n\t\tlist_Strings.add(\"Black\");\n\t\t\n\t\tList<String> list_Strings2 = new ArrayList<String>();\n\t\tlist_Strings2.add(\"Rojo\");\n\t\tlist_Strings2.add(\"Verde\");\n\t\tlist_Strings2.add(\"Naranja\");\n\t\tlist_Strings2.add(\"Blanco\");\n\t\tlist_Strings2.add(\"Negro\");\n\t\t\n\t\tSystem.out.println(\"Antes list_Strings \" +list_Strings +\"\\nAntes list_Strings2 \" + list_Strings2);\n\t\tList<String> NewArrayList = joinArrayAWhitArrayB(list_Strings, list_Strings2);\t\t\n\t\tSystem.out.println(\"Despues list_Strings \" +list_Strings +\"\\nDespues list_Strings2 \" + list_Strings2+\"\\nNew ArrayList \"+NewArrayList);\n\t\t\n\t}", "private static String[] resetStringArray() {\n String[] st = new String[L_MAX];\n L = 2 << 8;\n W = 9;\n int i;\n // initialize symbol table with all 1-character strings\n for (i = 0; i < R; i++)\n st[i] = \"\" + (char) i;\n st[i++] = \"\"; // (unused) lookahead for EOF\n return st;\n }", "private static HashMap<String, Integer> makeMap(String[] words) {\n HashMap<String, Integer> map = new HashMap();\n for (int i = 0; i < words.length; i++) {\n map.merge(words[i], 1, Integer::sum);\n }\n return map;\n}", "private static List<List<String>> groupAnagrams(String[] strs) {\n List<List<String>> result = new ArrayList<List<String>>();\n\n HashMap<Integer, ArrayList<String>> map = new HashMap<Integer, ArrayList<String>>();\n for(String str: strs){\n int key = 0;\n for(int i=0; i<str.length(); i++){\n key = key + (str.charAt(i)-'a');\n }\n\n if(map.containsKey(key)){\n map.get(key).add(str);\n }else{\n ArrayList<String> al = new ArrayList<String>();\n al.add(str);\n map.put(key, al);\n }\n }\n\n result.addAll(map.values());\n\n return result;\n }", "private void addPeptidesToMap(String protAcc, String[] peptides) {\n\n List<String> totalPeptides = new ArrayList<>();\n for (int i = 0; i <= missedCleavages; i++) {\n List<String> partPeptides = getPeptideCombinations(peptides, i);\n totalPeptides.addAll(partPeptides);\n }\n\n accToPeptides.put(protAcc, totalPeptides.toArray(new String[0]));\n }", "public static void appendMapDelimited(Writer wr, String v, char sep, char quote, Character escape, char arraySeparator, char mapKeySeparator) throws IOException {\n try {\n JSONObject obj = new JSONObject(v);\n Iterator<?> it = obj.keys();\n int i = 0;\n StringBuilder sb = new StringBuilder();\n boolean shouldQuote = false;\n while (it.hasNext()) {\n String key = (String) it.next();\n String value = obj.getString(key);\n if (i++ > 0) sb.append(arraySeparator);\n shouldQuote |= appendEscaped(sb, key, sep, quote, escape);\n sb.append(mapKeySeparator);\n shouldQuote |= appendEscaped(sb, value, sep, quote, escape);\n }\n if (shouldQuote) {\n // TODO check the actual hive Serde implementation\n wr.write(quote);\n wr.write(sb.toString());\n wr.write(quote);\n } else {\n wr.write(sb.toString());\n }\n } catch (JSONException e) {\n throw new IOException(e);\n }\n }", "protected void addToStoredStrings(String s) {\n \tif (debug) debug(\n \t\t\"addToStoredStrings(s=\", StringUtil.toString(s), \") at index=\",\n \t\tString.valueOf(storedStrings.size())\n \t);\n storedStrings.add(s);\n }", "private static String[] getMapStrings(boolean desc) {\n\n\n\n ArrayList list = new ArrayList();\n Locale locale = Locale.getDefault();\n String name = locale.toString();\n if (desc)\n name = \"locale=\" + name;\n list.add(0, name);\n\n String os = \"-\" + getOSType();\n if (desc)\n os = \" (os=\" + System.getProperty(\"os.name\")\n + \", \" + System.getProperty(\"os.version\") + \")\";\n name += os;\n list.add(0, name);\n\n // Allow the invoker to override the keyStrokeMap to support\n // case where you are working on a remote machine with a different\n // local or platform.\n \n String override = System.getProperty(\"abbot.keyStrokeMap\");\n if (override!=null) {\n list.add(0, override);\n }\n \n \n /*\n String vm = System.getProperty(\"java.version\");\n name += \" vm=\" + vm;\n list.add(0, name);\n String version = System.getProperty(\"os.version\");\n name += \" version=\" + version;\n list.add(0, name);\n String arch = System.getProperty(\"os.arch\");\n name += \" arch=\" + arch;\n list.add(0, name);\n */\n return (String[])list.toArray(new String[list.size()]);\n }", "public static String[] strings() {\n\tString[]update = new String[MAX];\n\tfor (int i = 0; i < MAX; i++) {\n\t update[i] = new String (\"george\");\n\t}\n\n\treturn update;\n }", "public <DATA extends JSONFriendlyObject<DATA>> void puts(JSONObject target , String key , DATA[] array){\r\n\t\tif ( array==null|| array.length==0)\r\n\t\t\treturn ; \r\n\t\tJSONArray arr = new JSONArray();\r\n\t\tint i = 0 ;\r\n\t\tfor(DATA scn : array){\r\n\t\t\tarr.set(i++, scn.translateToJSON()); \r\n\t\t}\r\n\t\ttarget.put(key, arr);\r\n\t}", "set.addAll(Arrays.asList(a));", "private static byte[] concat(byte[]... arrays) {\n int length = 0;\n for (byte[] array : arrays) {\n length += array.length;\n }\n final byte[] res = new byte[length];\n int pos = 0;\n for (byte[] array : arrays) {\n System.arraycopy(array, 0, res, pos, array.length);\n pos += array.length;\n }\n return res;\n }", "protected static String[][] growArray(String[][] base, String[] items) {\n if (base == null) {\n return new String[][] { items };\n } else {\n int length = base.length;\n String[][] grow = new String[length+1][];\n System.arraycopy(base, 0, grow, 0, length);\n grow[length] = items;\n return grow;\n }\n }", "@SuppressWarnings(\"unchecked\")\n public void arrayAddValue(LinkedList<String> keyList, Object array, Object value) throws IOException {\n if (value instanceof JSONParseEngine.ByteBuffer) {\n value = value.toString();\n }\n ((ArrayList) array).add(value);\n }", "public void addAll(T[] arr);", "public void setInitMap(int size,String[][] text) {\n\t\tfor(int i=0;i<this.size;i++) {\n\t\t\tfor(int j=0;j<this.size;j++) {\n\t\t\t\tthis.map[i][j] = text[i][j];\n\t\t\t\tif(map[i][j].equals(\"p\")) {\n\t\t\t\t\tsetPlayer(i,j,map[i][j]);\n\t\t\t\t}\n\t\t\t\telse if(map[i][j].equals(\"h\")||map[i][j].equals(\"s\")||map[i][j].equals(\"H\")||map[i][j].equals(\"c\")) {\n\t\t\t\t\tsetEnemy(i,j,map[i][j]);\n\t\t\t\t}\n\t\t\t\telse if(!(map[i][j].equals(\" \")||map[i][j].equals(\"*\"))){\n\t\t\t\t\tsetItemList(i,j,map[i][j]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "@Override // io.reactivex.functions.Function\n public Iterable<? extends Map.Entry<? extends String, ? extends String>> apply(Map<String, ? extends String> map) {\n Map<String, ? extends String> map2 = map;\n Intrinsics.checkNotNullParameter(map2, \"it\");\n return map2.entrySet();\n }", "public static HashMap<String,String[][]> build(String[][] data){\r\n\t\tString key;\t\t\t\t\t\t\t\t\t\t\t//One of the keys\r\n\t\tString[][] value;\t\t\t\t\t\t\t\t\t//The corresponding value\r\n\t\tString[] valueElement0, valueElement1;\t\t\t\t//The two arrays in the value\r\n\t\tInteger step;\t\t\t\t\t\t\t\t\t\t//For keeping track of the position in the array\r\n\t\tString warning;\t\t\t\t\t\t\t\t\t\t//A message to let the user know there might be a problem\r\n\t HashMap<String, String[][]> result;\r\n\t \r\n\t if ((data.length % 3) != 0) {\r\n\t \twarning = \r\n\t \t\t\t\"WARNING in HashMapBuilder2.build: Bug detected. Contact Ken Samuel.\";\r\n\t \tSystem.err.println(warning);\r\n\t \tGlobal.unableToRespondMessage.add(warning);\r\n\t }\r\n\t \r\n\t result = new HashMap<String, String[][]>();\t\t\t//Initialize\r\n\t key = null;\t\t\t\t\t\t\t\t\t\t\t//Initialize\r\n\t valueElement0 = new String[0];\t\t\t\t\t\t//Initialize\r\n\t valueElement1 = new String[0];\t\t\t\t\t\t//Initialize\r\n\t step = -1;\t\t\t\t\t\t\t\t\t\t\t//Initialize\r\n\t for(String[] array : data){\r\n\t step++;\r\n\t switch(step % 3){\r\n\t case 0: \r\n\t if(array[0] == null) {\r\n\t \twarning = \"WARNING in HashMapBuilder2.build: Bug detected. Contact Ken Samuel.\";\r\n\t \t \tSystem.err.println(warning);\r\n\t \t \tGlobal.unableToRespondMessage.add(warning);\r\n\t }\r\n\t key = array[0];\r\n\t continue;\r\n\t case 1:\r\n\t \tvalueElement0 = array;\r\n\t continue;\r\n\t case 2:\r\n\t \tvalueElement1 = array;\r\n\t\t \tvalue = new String[2][Math.max(valueElement0.length,valueElement1.length)];\r\n\t\t \tvalue[0] = valueElement0;\r\n\t\t \tvalue[1] = valueElement1;\r\n\t\t \tresult.put(key,value);\r\n\t break;\r\n\t default:\t\t\t//This should never happen\r\n\t \twarning = \"WARNING in HashMapBuilder2.build: Bug detected. Contact Ken Samuel.\";\r\n \t \tSystem.err.println(warning);\r\n \t \tGlobal.unableToRespondMessage.add(warning);\r\n\t }\r\n\t }\r\n\t return result;\r\n\t}", "@Override\r\n public String encodeAll(List<LinkedHashMap<String, String>> dataList) {\n StringBuilder str = new StringBuilder();\r\n\r\n for (LinkedHashMap<String, String> dataMap : dataList) {\r\n Collection<String> value = dataMap.values();\r\n\r\n for (Iterator<String> itr = value.iterator(); itr.hasNext();) {\r\n str = str.append(\"\\\"\").append(itr.next()).append(\"\\\"\").append(\",\");\r\n\r\n }\r\n str = str.deleteCharAt(str.length() - 1);\r\n str = str.append(\"\\n\");\r\n }\r\n\r\n return str.toString();\r\n\r\n }", "public ArrayList<String> anagrams(String[] strs) {\n HashMap<String, ArrayList<String>> rec=new HashMap<String,ArrayList<String>>();\n ArrayList<String> ans=new ArrayList<String>();\n if(strs.length==0)return ans;\n for(int i=0;i<strs.length;i++){\n char[] key=strs[i].toCharArray();\n Arrays.sort(key);\n String newkey=new String(key);\n if(rec.containsKey(newkey)){\n rec.get(newkey).add(strs[i]);\n }\n else{\n ArrayList<String> ad=new ArrayList<String>();\n ad.add(strs[i]);\n rec.put(newkey,ad);\n }\n }\n for(ArrayList<String> value:rec.values()){\n if(value.size()>1)ans.addAll(value);\n }\n return ans;\n }", "public void load(String... values) {\n\t\t// checks if is a valid array\n\t\tif (ArrayUtil.isNotEmpty(values)) {\n\t\t\t// scans values\n\t\t\tfor (String value : values) {\n\t\t\t\t// checks is not null\n\t\t\t\tif (value != null) {\n\t\t\t\t\t// pushes to JS array\n\t\t\t\t\tadd(value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void addTypedStrings(Set<String> set, String hdr) {\n BundlesG globals = getRTParent().getRootBundles().getGlobals(); Set<String> to_add = new HashSet<String>();\n\tSet<BundlesDT.DT> datatypes = globals.getFieldDataTypes(globals.fieldIndex(hdr));\n\n // In transformed datatypes (e.g., dstip|ORG), the datatypes lookup fails and a null is returned. I'm\n // unsure if the following will further break the selection/filtered data views -- the underlying assumption\n // in the original implementation was that all of the entities were strongly typed... however, for IP Org\n // lookups, this is clearly not the case.\n if (datatypes == null) return;\n\n\tIterator<BundlesDT.DT> it_dt = datatypes.iterator();\n\twhile (it_dt.hasNext()) {\n\t BundlesDT.DT dt = it_dt.next();\n\t Iterator<String> it = set.iterator();\n while (it.hasNext()) {\n\t String str = it.next();\n\t if (BundlesDT.stringIsType(str, dt)) to_add.add(hdr + BundlesDT.DELIM + str);\n\t }\n\t}\n\tset.addAll(to_add);\n }", "public static String joinStrings(String[] a){\n String js=\"\";\n for (int i=0;i<a.length;i++){\n if (i==0){\n js = a[i];\n } else{\n js = js + \" \" + a[i];\n }\n }\n return js;\n }", "void printArray(String ints[], int len) {\n\t\tArrayList<String> path = new ArrayList<>();\n\t\tint i;\n for (i = 0; i < len; i++) \n {\n path.add(ints[i]);\n } \t\n paths.add(path);\n if(path.contains(\"aaa\"))\n \tpaths.remove(path);\n\t}" ]
[ "0.6125948", "0.571079", "0.5691951", "0.56434786", "0.5625016", "0.5616952", "0.5566656", "0.5562437", "0.55545324", "0.55366874", "0.5503386", "0.54832405", "0.54639506", "0.540362", "0.53912765", "0.5313736", "0.5279431", "0.5277867", "0.5253774", "0.52120423", "0.519495", "0.5179045", "0.51549053", "0.51524097", "0.5147232", "0.514152", "0.51341677", "0.51291674", "0.5121205", "0.5097552", "0.509126", "0.50703245", "0.50478196", "0.504473", "0.50439984", "0.5037807", "0.503464", "0.50128955", "0.5010554", "0.5004842", "0.4999367", "0.4974605", "0.49575227", "0.49506113", "0.49452293", "0.49451405", "0.49375182", "0.4933766", "0.49310282", "0.49248037", "0.4924353", "0.49154818", "0.49136636", "0.49050757", "0.48847362", "0.48843375", "0.48817435", "0.48719645", "0.48697695", "0.48588786", "0.48510373", "0.48497534", "0.48446622", "0.48423615", "0.4836587", "0.48362005", "0.48355466", "0.48209286", "0.48043147", "0.47934756", "0.47918382", "0.47638112", "0.47488937", "0.4746116", "0.47459838", "0.47251767", "0.4716702", "0.47103736", "0.47093296", "0.4707197", "0.47018853", "0.46942803", "0.4673127", "0.46719795", "0.46680114", "0.46663782", "0.46660614", "0.46621332", "0.46605626", "0.4658382", "0.46565843", "0.46547437", "0.46466213", "0.4644076", "0.46403044", "0.46373948", "0.46280935", "0.4626032", "0.46126324", "0.46119094", "0.4610976" ]
0.0
-1
Custom components // Appens a label with hyperlink behaviour that streches from the default label column to the end of the form
public void appendLabelAsLink(String url, String text) { JLabel label = UISupport.createLabelLink(url, text); append(null, null, label, null, DEFAULT_LABEL_COLUMN, getColumnSpanToTheEnd(DEFAULT_LABEL_COLUMN)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void labelEdit2MouseClicked(MouseEvent e) {\n }", "@Override\n\tpublic void setComponentLabel(String label) {\n\t\t\n\t}", "public abstract String getManipulatorLinkLabel();", "public void linkLabels(boolean b) { link_labels_cb.setSelected(b); }", "@Override\n\t\tpublic void addLabel(Label label) {\n\n\t\t}", "private JPanel getLinkPanel() {\n JPanel p = ProgramPresets.createTitledPanel(\"LINK\");\n p.setLayout(new BorderLayout());\n linkLabel = new JLabel(LINK);\n linkLabel.setForeground(ProgramPresets.COLOR_BUTTONS);\n linkLabel.setFont(ProgramPresets.DEFAULT_FONT_ITALICS);\n linkLabel.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n linkLabel.addMouseListener(new MouseAdapter() {\n \n @Override\n public void mouseClicked(MouseEvent e) {\n try {\n Desktop.getDesktop().browse(new URI(LINK));\n } catch (IOException | URISyntaxException e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n }\n }\n \n @Override\n public void mouseExited(MouseEvent e) {\n linkLabel.setText(LINK);\n }\n \n @Override\n public void mouseEntered(MouseEvent e) {\n linkLabel.setText(\"<html><a href=''>\" + LINK + \"</a></html>\");\n \n }\n \n });\n linkLabel.setHorizontalAlignment(SwingConstants.CENTER);\n linkLabel.setVerticalAlignment(SwingConstants.CENTER);\n p.add(linkLabel, BorderLayout.CENTER);\n JPanel sub = ProgramPresets.createPanel();\n sub.setLayout(new BorderLayout());\n sub.add(Box.createRigidArea(new Dimension(100, 0)), BorderLayout.EAST);\n sub.add(p, BorderLayout.CENTER);\n sub.add(Box.createRigidArea(new Dimension(100, 0)), BorderLayout.WEST);\n sub.add(Box.createRigidArea(new Dimension(0, 20)), BorderLayout.SOUTH);\n return sub;\n }", "protected void addLabel(AeIconLabel aLabel) {\r\n }", "@Override\n\tpublic void setLabelText(String label) {\n\t}", "public LinkPanel(String id, String Label)\n {\n super(id);\n label = Label;\n }", "public LinkPanel(String id, String Label, IModel<I> model)\n {\n super(id, model);\n label = Label;\n }", "ILinkDeleterActionBuilder<SOURCE_BEAN_TYPE, LINKED_BEAN_TYPE> setLinkedEntityLabelPlural(String label);", "String addLabel(String label);", "public boolean linkLabels() { return link_labels_cb.isSelected(); }", "ILinkDeleterActionBuilder<SOURCE_BEAN_TYPE, LINKED_BEAN_TYPE> setLinkedEntityLabelSingular(String label);", "@Override\n public String getLabel() {\n return label;\n }", "private void addDestinationTextLabel() {\n try {\n Component lastComponent = destinationLabelPanel.getComponent(2);\n if (lastComponent == destinationButton) {\n destinationLabelPanel.remove(destinationButton);\n destinationLabelPanel.add(destinationTextLabel);\n }\n }\n catch (ArrayIndexOutOfBoundsException e) {\n destinationLabelPanel.add(destinationTextLabel);\n }\n }", "public boolean drawLinkLabels() { return link_labels_cb.isSelected(); }", "@Override\n\tpublic void setLabel(String label) {\n\t\t\n\t}", "private void jLabel97MouseClicked(java.awt.event.MouseEvent evt) {\n }", "public void setLabel(String label) {\n this.label = label;\n }", "private void closeLabelMouseEntered(java.awt.event.MouseEvent evt) {\n Border labelBorder = BorderFactory.createMatteBorder(1, 1, 1, 1, Color.MAGENTA);\n closeLabel.setBorder(labelBorder);\n closeLabel.setForeground(Color.red);\n }", "@Override\r\n\t\t\t\tpublic void focusGained(FocusEvent e) {\n\t\t\t\t\tJLabel labelFocused = (JLabel) e.getComponent();\r\n\t\t\t\t\tlabelFocused.setIcon(focusedIcon);\r\n\t\t\t\t}", "@Override\n public void setLabelToDisplay(java.lang.String labelToDisplay) throws G2AccessException {\n setAttributeValue (SystemAttributeSymbols.LABEL_TO_DISPLAY_, labelToDisplay);\n }", "void addLabel(Object newLabel);", "void addLabel(Object newLabel);", "@Override\n public void setLabel(String arg0)\n {\n \n }", "private JLabel createSection5() {\r\n\t\r\n\t\tJLabel section5 = new JLabel(\"How To Chat\");\r\n\t\t//section1.setHorizontalAlignment(SwingConstants.LEFT);\r\n\t\t//section1.setVerticalAlignment(SwingConstants.TOP);\r\n\t\tsection5.setFont(new Font(\"DejaVu Sans\", Font.PLAIN, 15));\r\n\t\tsection5.setForeground(Color.WHITE);\r\n\r\n\t\t// open subsections when clicked\r\n\t\tsection5.addMouseListener(new ClickListener());\r\n\r\n\t\treturn section5;\r\n\t\r\n}", "java.lang.String getLabel();", "Label getLabel();", "Label getLabel();", "Label getLabel();", "private FormComponentLabel addLabeled( String id, FormComponent<?> component ) {\n component.setOutputMarkupId( true );\n FormComponentLabel result = new FormComponentLabel( id, component );\n add( result );\n add( component );\n addIssuesAnnotation( component, getFlow(), component.getId() );\n return result;\n }", "public abstract void addLabel(String str);", "public void setLabel( String label )\n { \n this.label = label;\n show_text();\n }", "public static void EmployeeAddress() {\r\n\t\t\r\n\t\tJLabel e2 = new JLabel(\"Employee's Address:\");\r\n\t\te2.setFont(f);\r\n\t\tGUI1Panel.add(e2);\r\n\t\tGUI1Panel.add(employeeAddress);\r\n\t\te2.setHorizontalAlignment(JLabel.LEFT);\r\n\t\tGUI1Panel.add(Box.createHorizontalStrut(5));\r\n\t\t\t\r\n}", "@Override\n\tboolean applyLabel() {\n\n\t\treturn false;\n\t}", "public abstract String getLabel();", "public WrappingLabelLayout( Element element ){\r\n super(element);\r\n }", "public boolean isLink(String label)\n {\n return true;\n }", "public abstract String getLabelText();", "void setlabel (String label){\r\n\t\tthis.label = label;\r\n\t}", "public void addLabel()\r\n {\r\n LabelFigure label = new LabelFigure();\r\n this.labels.add(label);\r\n add(label);\r\n }", "@Override\n\tpublic void mouseExited(MouseEvent e) {\n\t\tJLabel jLabel = (JLabel)e.getSource() ;\n\t\tjLabel.setForeground(Color.black) ;\n\t\tjLabel.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)) ;\n\t}", "public OntologyLinkModeTool()\n \t{\n \tedu.tufts.vue.ontology.ui.OntologyBrowser.getBrowser().addOntologySelectionListener(this);\n \t//creationLink.setID(\"<creationLink>\"); // can't use label or it will draw one \n \t//invisibleLinkEndpoint.addLinkRef(creationLink);\n \tcreationLink=null;\n invisibleLinkEndpoint.setSize(0,0);\n \n \t}", "@Override\n\tpublic void updateLabels() {\n\n\t}", "@Override\r\n\tpublic JLabel createLabel() {\r\n\t\treturn new JLabel();\r\n\t}", "private void addNameLabel() {\n\t\tadd (new JLabel(\"Name \"), SOUTH);\n\t}", "private void underlineLabelText(JLabel label) {\n Font font = label.getFont();\n Map attributes = font.getAttributes();\n attributes.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON);\n label.setFont(font.deriveFont(attributes));\n }", "public void hyperlinkUpdate(HyperlinkEvent e) \n {\n\t\tif (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) \n {\n \tJEditorPane pane = (JEditorPane) e.getSource();\n \tif (e instanceof HTMLFrameHyperlinkEvent) \n \t{\n \t\tHTMLFrameHyperlinkEvent evt = (HTMLFrameHyperlinkEvent)e;\n \t\tHTMLDocument doc = (HTMLDocument)pane.getDocument();\n \t\tdoc.processHTMLFrameHyperlinkEvent(evt);\n \t}\n \telse \n \t{\n \t\ttry \n \t\t{\n \t\t\tpane.setPage(e.getURL());\n \t\t}\n \t\tcatch (Throwable t) \n \t\t{\n \t\t\tt.printStackTrace();\n \t\t}\n \t}\n }\n }", "String getLabel();", "String getLabel();", "public void setLabel(String label) {\r\n this.label = label;\r\n }", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_2.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}", "public static JLabel newHyperlinkLabel(final URI uri, String text) {\n final JLabel label = newLabel(text);\n\n\n Map<TextAttribute, Object> map = new HashMap();\n map.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_LOW_ONE_PIXEL);\n final Font def = label.getFont();\n final Font hover = def.deriveFont(map);\n\n label.addMouseListener(\n new MouseAdapter() {\n\n @Override\n public void mouseClicked(MouseEvent e) {\n\n try {\n Desktop.getDesktop().browse(uri);\n } catch (IOException ex) {\n LOGGER.error(\"Could not open browser\");\n }\n }\n\n\n @Override\n public void mouseEntered(MouseEvent e) {\n label.setCursor(new Cursor(Cursor.HAND_CURSOR));\n label.setFont(hover);\n }\n\n\n @Override\n public void mouseExited(MouseEvent e) {\n label.setCursor(new Cursor(Cursor.DEFAULT_CURSOR));\n label.setFont(def);\n }\n });\n\n return label;\n }", "@Override\n public void showLabel(Message message){\n\n clear(container);\n container.setLayout(new FlowLayout());\n errorLabel = new JLabel(message.toString());\n container.add(errorLabel);\n errorLabel.setLocation(475,108);\n errorLabel.setSize(100,100);\n applyChangesTo(container);\n\n\n }", "private JLabel addNonEditableLine(JPanel parent, String label, String data) {\n\t\tJPanel tmp = new JPanel(new GridLayout(0, 2, 40, 10));\n\n\t\tJLabel l1 = new JLabel(label);\n\t\tl1.setAlignmentX(LEFT_ALIGNMENT);\n\t\ttmp.add(l1);\n\n\t\tJLabel l2 = new JLabel(data);\n\t\tl2.setAlignmentX(LEFT_ALIGNMENT);\n\t\ttmp.add(l2);\n\n\t\tparent.add(tmp);\n\t\treturn l2;\n\t}", "public void setLabelToBeShown(String label);", "@Override\r\n\tpublic void mouseClicked(MouseEvent e) {\n\t\tLinkLikeButton source = (LinkLikeButton) e.getSource();\r\n\t\tif(e.getClickCount()==1){\r\n\t\tif (source.getName().equals(\"TableLinkLikeButton\")) {\r\n\t\t\tif (source.getText().equals(\"Tags\") || source.getText().equals(\"Ingress\") || source.getText().equals(\"Egress\") || source.getText().equals(\"Rules\") || source.getText().equals(\"All Actions\") || source.getText().equals(\"All Conditions\")\r\n\t\t\t\t\t|| source.getText().equals(\"Redirect\") || source.getText().startsWith(\"ELBs\") || source.getText().contains(\"targetgroup\") || source.getText().contains(\"Method Settings\")) {\r\n\t\t\t\t// Do nothing\r\n\t\t\t} else {\r\n\t\t\t\tsource.getCustomAWSObject().showDetailesFrame(getAccount(), source.getCustomAWSObject(), jScrollableDesktopPan);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t\tsource.getCustomAWSObject().showDetailesFrame(getAccount(), source.getCustomAWSObject(), jScrollableDesktopPan);\r\n\t\t}\r\n\t\t}\r\n\t}", "@Override\n public void anchor_()\n {\n }", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_1.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}", "@Override\r\n public synchronized String getLabelExtension() {\r\n int sourceSize = (getSource() != null) ? 1 : 0;\r\n int targetSize = (getTarget() != null) ? getTarget().size() : 0;\r\n String prefix = (!super.getLabelExtension().equals(Constant.EMPTY_STRING)) ? super\r\n .getLabelExtension()\r\n : Schema.TYPE_LINK;\r\n return prefix + Constant.BLANK + Constant.OPEN_PARENTHESIS + sourceSize\r\n + Constant.COMMA + Constant.BLANK + targetSize\r\n + Constant.CLOSE_PARENTHESIS;\r\n }", "private void jLabel83MousePressed(java.awt.event.MouseEvent evt) {\n }", "public CustomLabel(String text){\n setHorizontalAlignment(JLabel.LEFT);\n Font font = new Font(\"Bold\", Font.BOLD, 20);\n setFont(font);\n setText(\" \" + text);\n }", "ReadOnlyStringProperty labelProperty();", "public static ComponentBuilder<?, ?> createCustomTitleComponent(String label) {\n\n StyleBuilder bold12CenteredStyle = stl.style(boldStyle).setFontSize(12);\n StyleBuilder bold16CenteredStyle = stl.style(boldStyle).setFontSize(16).setForegroundColor(new Color(0, 0, 0));\n //StyleBuilder italicStyle = stl.style(rootStyle).italic();\n ComponentBuilder<?, ?> logoComponent = cmp.verticalList(\n //cmp.image(Templates.class.getResource(\"/logopalm.png\")).setFixedDimension(150, 60),\n cmp.text(label).setStyle(bold16CenteredStyle).setHorizontalAlignment(HorizontalAlignment.CENTER) \n );\n return logoComponent;\n }", "private void closeLabelMouseExited(java.awt.event.MouseEvent evt) {\n Border labelBorder = BorderFactory.createMatteBorder(1, 1, 1, 1, Color.black);\n closeLabel.setBorder(labelBorder);\n closeLabel.setForeground(Color.black);\n }", "String getFormFieldLabel();", "void setLabel(String label);", "@Override\npublic void linkUIComponentToMe(VirtualComponent c) {\n\t\n}", "@Override\n\tpublic String getLabel() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getLabel() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getLabel() {\n\t\treturn null;\n\t}", "@Override\n public boolean handleComponentPressed(MapMouseEvent e)\n {\n LWComponent hit = e.getPicked();\n // TODO: handle LWGroup picking\n //if (hit instanceof LWGroup)\n //hit = ((LWGroup)hit).findDeepestChildAt(e.getMapPoint());\n\n if (hit != null && hit.canLinkTo(null)) {\n linkSource = hit;\n // todo: pick up current default stroke color & stroke width\n // and apply to creationLink\n creationLink.setTemporaryEndPoint1(linkSource);\n // EditorManager.applyCurrentProperties(creationLink);\n // never let drawn creator link get less than 1 pixel wide on-screen\n float minStrokeWidth = (float) (1 / e.getViewer().getZoomFactor());\n if (creationLink.getStrokeWidth() < minStrokeWidth)\n creationLink.setStrokeWidth(minStrokeWidth);\n invisibleLinkEndpoint.setLocation(e.getMapPoint());\n e.setDragRequest(invisibleLinkEndpoint);\n // using a LINK as the dragComponent is a mess because geting the\n // \"location\" of a link isn't well defined if any end is tied\n // down, and so computing the relative movement of the link\n // doesn't work -- thus we just use this invisible endpoint\n // to move the link around.\n return true;\n }\n \t \n return false;\n }", "public java.lang.String getLabel();", "@Override\n\t\t\tpublic String getLabel() {\n\t\t\t\treturn null;\n\t\t\t}", "private void fillLabelsTabel() {\n }", "public LinkDisplay()\n\t{\n\t\treturn;\n\t}", "public abstract Code addLabel(String label);", "@Override\r\n\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\tSystem.out.println(\"Clicked on: \" + x + \",\" + y);\r\n\t\t\tif (lastSelected != null) {\r\n\t\t\t\tlastSelected.setBorder(null);\r\n\t\t\t}\r\n\t\t\tsetBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED));\r\n\t\t\tGCollector.getInstance().getEnv().setAgentPosTextFields(x, y);\r\n\t\t\tGCollector.getInstance().getEnv().setModifyPosTextFields(x, y);\r\n\r\n\t\t\tlastSelected = (JLabel) e.getComponent();\r\n\t\t}", "@Override\n public boolean handleComponentPressed(MapMouseEvent e)\n {\n LWComponent hit = e.getPicked();\n // TODO: handle LWGroup picking\n //if (hit instanceof LWGroup)\n //hit = ((LWGroup)hit).findDeepestChildAt(e.getMapPoint());\n\n if (hit != null && hit.canLinkTo(null)) {\n linkSource = hit;\n // todo: pick up current default stroke color & stroke width\n // and apply to creationLink\n\n creationLink.setParent(linkSource.getParent()); // needed for new relative-to-parent link code\n //invisibleLinkEndpoint.setParent(linkSource.getParent()); // needed for new relative-to-parent link code\n \n creationLink.setTemporaryEndPoint1(linkSource);\n EditorManager.applyCurrentProperties(creationLink); // don't target until / unless link actually created\n // never let drawn creator link get less than 1 pixel wide on-screen\n float minStrokeWidth = (float) (1 / e.getViewer().getZoomFactor());\n if (creationLink.getStrokeWidth() < minStrokeWidth)\n creationLink.setStrokeWidth(minStrokeWidth);\n invisibleLinkEndpoint.setLocation(e.getMapPoint());\n creationLink.notifyEndpointMoved(null, invisibleLinkEndpoint);\n e.setDragRequest(invisibleLinkEndpoint);\n // using a LINK as the dragComponent is a mess because geting the\n // \"location\" of a link isn't well defined if any end is tied\n // down, and so computing the relative movement of the link\n // doesn't work -- thus we just use this invisible endpoint\n // to move the link around.\n return true;\n }\n \t \n return false;\n }", "@Override\n protected void layoutChildren() {\n super.layoutChildren();\n label.setVisible(label.prefWidth(-1) < getWidth() - getPadding().getLeft() - getPadding().getRight());\n }", "public void switchToLabel() {\n if (deckPanel.getVisibleWidget() == LABEL_INDEX) {\n return;\n }\n // Fires the ValueChanged event.\n setValue(textArea.getText(), true);\n deckPanel.showWidget(LABEL_INDEX);\n }", "public void setLabel(String label)\n\t{\n\t\tthis.label = label;\n\t}", "public String getLabel();", "public String getLabel();", "public String getLabel();", "public String getLabel();", "@Override\npublic void linkUIComponentToMe() {\n\t\n}", "public void setLabel(String label) {\r\n\t\tthis.label = label;\r\n\t}", "public void setLabel(String label) {\r\n\t\tthis.label = label;\r\n\t}", "private void addDestinationButton() {\n try {\n Component lastComponent = destinationLabelPanel.getComponent(2);\n if (lastComponent == destinationTextLabel) {\n destinationLabelPanel.remove(destinationTextLabel);\n destinationLabelPanel.add(destinationButton);\n }\n }\n catch (ArrayIndexOutOfBoundsException e) {\n destinationLabelPanel.add(destinationButton);\n }\n }", "void setLabel(Label label);", "public void setLabelText(String text);", "public MavenRepositoriesViewLabelDecorator() {\r\n\t\tsuper();\r\n\t}", "public boolean labelOnOlemassa(String label);", "@Override\n\t\t\tpublic void mouseEntered(MouseEvent e) {\n\t\t\t\tlabel_3.setForeground(Color.orange);\n\t\t\t\tsetCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));\n\t\t\t}", "public String getLabelText();", "private void ajouteBouton(String label, JPanel p) {\r\n // Ajoute un bouton, avec le texte label, au panneau p\r\n JButton b = new JButton(label);\r\n p.add(b);\r\n b.addActionListener(this);\r\n }", "@Override\r\n\tprotected void onInitialize() {\n\t\tsuper.onInitialize();\r\n\t\tadd(new MultiLineLabel(LABEL_ID, LABEL_TEXT));\r\n\t}", "public LinkButton() {\n\t\tsuper();\n\t\tinit();\n\t}" ]
[ "0.63563895", "0.62092096", "0.6133756", "0.6073409", "0.6048496", "0.5856931", "0.57907593", "0.5723428", "0.57132864", "0.57113963", "0.56897146", "0.5682033", "0.5675362", "0.5674744", "0.5647891", "0.564085", "0.563949", "0.5613854", "0.55845207", "0.5577934", "0.5559698", "0.5552", "0.55301356", "0.5522702", "0.5522702", "0.55221194", "0.5514321", "0.54779017", "0.54715466", "0.54715466", "0.54715466", "0.5454827", "0.5450239", "0.5441743", "0.5403087", "0.5396601", "0.53955936", "0.5394954", "0.5372243", "0.5371994", "0.5371751", "0.5365474", "0.5352932", "0.53524524", "0.5342576", "0.53372824", "0.5325974", "0.5320749", "0.5317188", "0.5303731", "0.5303731", "0.53025347", "0.5296432", "0.5291365", "0.5280975", "0.52762234", "0.526266", "0.526254", "0.5257524", "0.52566206", "0.5251248", "0.5249893", "0.52473867", "0.524208", "0.52417946", "0.5232075", "0.52304184", "0.52287054", "0.5212765", "0.5212452", "0.5212452", "0.5212452", "0.52072036", "0.5207011", "0.5204149", "0.5200352", "0.5199524", "0.51987237", "0.51973456", "0.51932156", "0.518873", "0.51856166", "0.5179623", "0.51742953", "0.51742953", "0.51742953", "0.51742953", "0.5169633", "0.5169334", "0.5169334", "0.5165977", "0.51656955", "0.5165446", "0.5162107", "0.5156547", "0.5153498", "0.5151335", "0.51508206", "0.5146267", "0.51454824" ]
0.53519857
44
Appends a heading with bold text that streches from the default label column to the end of the form
public void appendHeading(String text) { JLabel label = new JLabel(text); Font font = label.getFont(); Font fontBold = new Font(font.getName(), Font.BOLD, font.getSize()); label.setFont(fontBold); append(null, null, label, null, DEFAULT_LABEL_COLUMN, getColumnSpanToTheEnd(DEFAULT_LABEL_COLUMN)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Builder addHeadline(Text value);", "Builder addHeadline(String value);", "public JLabel buildDefaultHeader(){\n JLabel returnHeader = new JLabel();\n returnHeader.setHorizontalAlignment(SwingConstants.LEFT);\n returnHeader.setFont(new Font(\"Comic Sans MS\", Font.PLAIN, 48)); // Great font, makes it pop\n returnHeader.setForeground(Color.WHITE);\n returnHeader.setBackground(Color.BLACK);\n \n return returnHeader;\n }", "private void createLabel(WritableSheet sheet)\n throws WriteException {\n WritableFont times10pt = new WritableFont(WritableFont.TIMES, 10);\n // Define the cell format\n times = new WritableCellFormat(times10pt);\n // Lets automatically wrap the cells\n times.setWrap(true);\n\n // create create a bold font with unterlines\n WritableFont times10ptBoldUnderline = new WritableFont(\n WritableFont.TIMES, 10, WritableFont.BOLD, true,\n UnderlineStyle.SINGLE);\n timesBoldUnderline = new WritableCellFormat(times10ptBoldUnderline);\n // Lets automatically wrap the cells\n timesBoldUnderline.setWrap(true);\n\n CellView cv = new CellView();\n cv.setFormat(times);\n cv.setFormat(timesBoldUnderline);\n cv.setAutosize(true);\n\n// addCaption(sheet, 3, 0, mExcelObject.getHourActivity()); // ชั่วโมง\n\n // Write a few headers\n// addCaption(sheet, 0, 0, \"ชื่อกิจกรรม \"+mExcelObject.getActivityName()); // ชื่อกิจกรรม\n// addCaption(sheet, 1, 0, \"วันที่จัด \"+mExcelObject.getTimeStart()); // วันที่จัด\n// addCaption(sheet, 2, 0, \"สถานที่่่ \"+mExcelObject.getLocationName()); // สถานที่\n\n\n\n\n\n addCaption(sheet, 0, 1, \"ลำดับ\");\n addCaption(sheet, 1, 1, \"ชื่อผู้ปกครอง\");\n addCaption(sheet, 2, 1, \"ชื่อเด็กนักเรียน\");\n //addCaption(sheet, 3, 1, \"ระดับชั้น\");\n // addCaption(sheet, 4, 1, \"เวลามารับ\");\n\n\n\n\n\n }", "public void addHeaders() {\n TableLayout tl = findViewById(R.id.table);\n TableRow tr = new TableRow(this);\n tr.setLayoutParams(getLayoutParams());\n if (!haverford) {\n tr.addView(getTextView(0, \"Leave Bryn Mawr\", Color.WHITE, Typeface.BOLD, Color.BLUE));\n tr.addView(getTextView(0, \"Arrive Haverford\", Color.WHITE, Typeface.BOLD, Color.BLUE));\n } else {\n tr.addView(getTextView(0, \"Leave Haverford\", Color.WHITE, Typeface.BOLD, Color.BLUE));\n tr.addView(getTextView(0, \"Arrive Bryn Mawr\", Color.WHITE, Typeface.BOLD, Color.BLUE));\n }\n tl.addView(tr, getTblLayoutParams());\n }", "Builder addAlternativeHeadline(Text value);", "public void addHeadingField(String label, int index) {\n //inflater needed to \"inflate\" layouts\n LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n //instantiate our data object.\n ElementHeadingField elementHeadingField = new ElementHeadingField(label);\n //insert element data object in slot on page\n if (isLoading){\n currentPage.addElement(elementHeadingField);\n }else{\n currentPage.insertElement(index, elementHeadingField);\n }\n //we need to instantiate our xml fragment (text field) and bind it to the data object\n HeadingFieldBinding headingFieldBinding = HeadingFieldBinding.inflate(inflater, null,false);\n headingFieldBinding.setElementHeadingField(elementHeadingField);\n //get new view (our xml fragment -the text field) and add it to current view\n View newView = headingFieldBinding.getRoot();\n if (isInspecting){\n EditText editText = newView.findViewById(R.id.label);\n editText.setFocusable(false);\n }\n linearLayoutBody.addView(newView, index);\n Context context = App.getContext();\n LogManager.reportStatus(context, \"INSPECTOR\", \"onAddHeadingField\");\n }", "public void addTextFieldsAndLabels(){\n this.add(this.firstLabel);\n this.add(firstNameField);\n this.add(this.secondLabel);\n this.add(lastNameField);\n }", "private void addCaption(WritableSheet sheet, int column, int row, String s,\n\t\t\t\tint width) throws RowsExceededException, WriteException {\n\t\t\tLabel headingLabel;\n\t\t\theadingLabel = new Label(column, row, s, timesBoldUnderline);\n\t\t\tsheet.setColumnView(column, width);\n\t\t\tsheet.addCell(headingLabel);\n\t\t}", "private JLabel makeLabel(String title, boolean h1) {\n JLabel label = new JLabel(title);\n if (h1 == true) {//if the label is to be a title\n label.setForeground(themeColor);\n label.setFont(new Font(\"Terminal Bold\", Font.PLAIN, 48));\n } else {\n label.setFont(new Font(\"Terminal Bold\", Font.PLAIN, 25));\n label.setForeground(Color.white);\n }\n return label;\n\n }", "private void renderTitle() {\n this.row = sheet.createRow(INT_ROW_START);\n //se crea titulos de la tabla\n this.addCell(column_++, \"CODIGO DE BARRAS\", this.cellStyleTitle());\n this.addCell(column_++, \"FECHA\", this.cellStyleTitle());\n this.addCell(column_++, \"HORA\", this.cellStyleTitle());\n this.addCell(column_++, \"MARBETE\", this.cellStyleTitle());\n this.addCell(column_++, \"PRODUCTO\", this.cellStyleTitle());\n this.addCell(column_++, \"DESCRIPCIÓN\", this.cellStyleTitle());\n this.addCell(column_++, \"LOTE\", this.cellStyleTitle());\n this.addCell(column_++, \"PESO\", this.cellStyleTitle());\n this.addCell(column_++, \"RESPONSABLE\", this.cellStyleTitle());\n }", "public void displayHeader(AbstractAccount theAccount, LocalDate theDay) { \n mySB.delete(0, mySB.length());\n mySB.append(Main.LINE_BREAK);\n mySB.append(\"Urban Parks | \");\n mySB.append(theDay.getMonthValue());\n mySB.append(\"/\");\n mySB.append(theDay.getDayOfMonth());\n mySB.append(\"/\");\n mySB.append(theDay.getYear());\n mySB.append(Main.LINE_BREAK);\n mySB.append(\"Welcome \");\n mySB.append(theAccount.getRealName());\n mySB.append(\" (\");\n mySB.append(theAccount.AccountType());\n mySB.append(')');\n mySB.append(Main.LINE_BREAK);\n mySB.append(\"-----------------------------------------------------------------\");\n mySB.append(Main.LINE_BREAK);\n System.out.print(mySB.toString());\n }", "private void setTitleFormat(LeaderboardAdapter.ViewHolder holder, int titleIndex) {\n holder.mRank.setText(\" \");\n holder.mTitle.setText(LEADERBOARD_TITLES[titleIndex]);\n holder.mTitle.setTypeface(Typeface.SERIF, Typeface.BOLD);\n holder.mValue.setText(\" \");\n }", "private void insertHeader(StringBuilder sb) {\n String id = \"ID\";\n String name = \"Name\";\n String objects = \"Objects collected\";\n sb.append(id);\n insertSpacing(sb, id);\n sb.append(name);\n insertSpacing(sb, name);\n sb.append(objects);\n insertSpacing(sb, objects);\n sb.append(NEWLINE);\n sb.append(\"---------------------------------------------------------------\");\n sb.append(NEWLINE);\n }", "private Font getTitleFont() {\n\t\tFont f = lblTitle.getFont();\n\t\tf = f.deriveFont(Font.BOLD, PosUIManager.getTitleFontSize());\n\t\treturn f;\n\t}", "public void setHeaderLabel() {\n\t\t\tlblGameBoard\n\t\t\t\t\t.setText(LABEL);\n\t}", "private void createLabels() {\n addLabels(\"Dog Name:\", 160);\n addLabels(\"Weight:\", 180);\n addLabels(\"Food:\", 200);\n }", "Builder addAlternativeHeadline(String value);", "private org.gwtbootstrap3.client.ui.Heading get_f_Heading18() {\n return build_f_Heading18();\n }", "public static void BottomRow() {\r\n\t\r\n\tb1.setFont(new Font(\"Times New Roman\", Font.BOLD, 20));\r\n\r\n\tb2.setFont(new Font(\"Times New Roman\", Font.BOLD, 20));\r\n\r\n\tb3.setFont(new Font(\"Times New Roman\", Font.BOLD, 20));\r\n\tGUI1Panel.add(b1);\r\n\tGUI1Panel.add(b2);\r\n\tGUI1Panel.add(b3);\r\n\r\n}", "String getFormFieldLabel();", "public CustomLabel(String text){\n setHorizontalAlignment(JLabel.LEFT);\n Font font = new Font(\"Bold\", Font.BOLD, 20);\n setFont(font);\n setText(\" \" + text);\n }", "private void printHeading()\n {\n System.out.println(\"==============================================\");\n System.out.println(\" Stock Management Application \");\n System.out.println(\" App05: by Haroon Sadiq \");\n System.out.println(\"==============================================\");\n }", "private Widget getLabel(String text, final List defList) {\n Image newField = getNewFieldButton(defList);\n\n HorizontalPanel h = new HorizontalPanel();\n h.add(new SmallLabel(text)); h.add(newField);\n return h;\n\t}", "public void createDisplayHeader()\r\n\t{\r\n\t\tboolean isEType;\r\n\t\tint currentK, lowestJValue, highestJValue;\r\n\r\n\t\t// redundant now\r\n\t\tisEType = getIsEType();\r\n\t\tcurrentK = getCurrentK();\r\n\t\tlowestJValue = getLowestJValue();\r\n\t\thighestJValue = getHighestJValue();\r\n\r\n\t\tString symmetry;\r\n\t\tString kOutput;\r\n\r\n\t\tif (isEType) {\r\n\t\t\tif (currentK >= 0) {\r\n\t\t\t\tkOutput = currentK + \"\";\r\n\t\t\t\tsymmetry = \"E1\";\r\n\t\t\t} else {\r\n\t\t\t\tkOutput = Math.abs(currentK) + \"\";\r\n\t\t\t\tsymmetry = \"E2\";\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tkOutput = Math.abs(currentK) + \"\";\r\n\t\t\tsymmetry = \"A\";\r\n\r\n\t\t\tif (currentK >= 0) {\r\n\t\t\t\tkOutput += \"+\";\r\n\t\t\t} else {\r\n\t\t\t\tkOutput += \"-\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tString ls = System.lineSeparator();\r\n\t\tmainHeader = \"================================================================\"\r\n\t\t\t\t+ ls + \"Symmetry type:\\t\\t\\t\\t\\t\" + symmetry + ls\r\n\t\t\t\t+ \"The K of the lower energy is:\\t\\t\\t\" + kOutput + ls + \"The input \"\r\n\t\t\t\t+ INPUT_BRANCH_TYPE + \" branch was flipped:\\t\\t\\t\" + inputIsFlipped + ls\r\n\t\t\t\t+ \"The input \" + INPUT_BRANCH_TYPE + \" branch used a J range of:\\t\\t\"\r\n\t\t\t\t+ lowestJValue + \" to \" + highestJValue\r\n\t\t\t\t+ ls + ls + \"Results for these selections are...\" + ls;\r\n\r\n\t\tsetHeaderDisplayState(true);\r\n\t}", "private static void printHeading(){\n\t\tSystem.out.println(\"Your Name\");\n\t\tSystem.out.println(\"Course name and semester\");\n\t\tSystem.out.println(\"Programming Project 1\");\n\t\tSystem.out.println(\"Your Name in Code\");\n\t\tSystem.out.println();\n\n\t}", "private void underlineLabelText(JLabel label) {\n Font font = label.getFont();\n Map attributes = font.getAttributes();\n attributes.put(TextAttribute.UNDERLINE, TextAttribute.UNDERLINE_ON);\n label.setFont(font.deriveFont(attributes));\n }", "java.lang.String getLabel();", "private String bold() {\n if (selection != null) {\n list.get(selection.start).setBold();\n list.get(selection.end).setBold();\n\n }\n\n //return sb.toString();\n return printList();\n }", "public abstract String getLabelText();", "@Override\n\t\tpublic float getBoldOffset() {\n\t\t\treturn 0.5F;\n\t\t}", "@Override\n public void setHeading(String heading) {\n }", "String addLabel(String label);", "private org.gwtbootstrap3.client.ui.Heading get_f_Heading50() {\n return build_f_Heading50();\n }", "private void setHeaders(List<String> a){\n\t\tFont hfont = wb.createFont();\n\t\thfont.setBold(true);\n\t\tCellStyle cs = wb.createCellStyle();\n\t\tcs.setFont(hfont);\n\n\t\tRow r=s.createRow(rowcount++);\n\t\tCell c;\n\t\tint colcount=1;\n\n\t\tc = r.createCell(0);\n\t\tc.setCellStyle(cs);\n\t\tc.setCellValue(\"Group\");\n\n\t\tfor(String e :a){\n\t\t\tif(!isSel(e))\n\t\t\t\tcontinue;\n\t\t\tc = r.createCell(colcount++);\n\t\t\tc.setCellStyle(cs);\n\t\t\tc.setCellValue(e);\n\t\t}\n\t}", "private void createFinalTimeLabel(WritableSheet sheet)\n throws WriteException {\n WritableFont times10pt = new WritableFont(WritableFont.TIMES, 10);\n // Define the cell format\n times = new WritableCellFormat(times10pt);\n // Lets automatically wrap the cells\n times.setWrap(true);\n\n // create create a bold font with unterlines\n WritableFont times10ptBoldUnderline = new WritableFont(WritableFont.TIMES, 10, WritableFont.BOLD, false,\n UnderlineStyle.SINGLE);\n timesBoldUnderline = new WritableCellFormat(times10ptBoldUnderline);\n // Lets automatically wrap the cells\n timesBoldUnderline.setWrap(true);\n\n CellView cv = new CellView();\n cv.setFormat(times);\n cv.setFormat(timesBoldUnderline);\n cv.setAutosize(true);\n\n // Write a few headers\n addCaption(sheet, 0, 0, \"File\");\n addCaption(sheet, 1, 0, \"Time\");\n\n }", "@Override\n public String getLabel() {\n return columnInfo.getLabel();\n }", "private void outputHeader(){\n System.out.printf(\"\\n%9s%11s%7s%5s%7s%8s\\n\",\"Last Name\",\"First Name\",\"Gender\",\"Rate\",\"Tenure\",\"Salary\");\n pw.printf(\"\\n%9s%11s%7s%5s%7s%8s\\n\",\"Last Name\",\"First Name\",\"Gender\",\"Rate\",\"Tenure\",\"Salary\");\n }", "private void showPanelLabel(String title, TableLayout tl)\n {\n LayoutParams lpSpan = new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);\n lpSpan.span = 2; \n \n TableRow tableRow = new TableRow(getContext());\n tableRow.setLayoutParams(lpSpan);\n \n TextView label = new TextView(getContext());\n label.setText(title);\n label.setTextAppearance(getContext(), android.R.style.TextAppearance_Medium);\n label.setPadding(0, 0, 0, 10);\n label.setLayoutParams(lpSpan);\n \n tableRow.addView(label);\n \n tl.addView(tableRow);\n }", "private void setupTitle(){\n\t\tJLabel title = new JLabel(quiz_type.toString()+\": \"+parent_frame.getDataHandler().getLevelNames().get(parent_frame.getDataHandler().getCurrentLevel())); \n\t\ttitle.setFont(new Font(\"Arial Rounded MT Bold\", Font.BOLD, 65));\n\t\ttitle.setForeground(new Color(254, 157, 79));\n\t\ttitle.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tadd(title);\n\t\ttitle.setBounds(32, 24, 1136, 119);\n\t\ttitle.setOpaque(false);\n\t}", "private void writeColumnHeader() throws WriteException, IOException {\r\n WriteXLS.getInstance().writeColumnLabels();\r\n }", "private org.gwtbootstrap3.client.ui.Heading get_f_Heading30() {\n return build_f_Heading30();\n }", "public void drawNoticeText(int h){\r\n Font font=new Font(\"SanSerif\",Font.BOLD,15); \r\n g.setColor(Color.red);\r\n g.setFont(font);\r\n String t=\"NOTE: All players cannot be on the same team.\";\r\n g.drawString(t,50,265);\r\n t=\"Use WASD to move.\";\r\n g.drawString(t,50,48); \r\n t=\"Press SPACE on the Start Button to Begin!\";\r\n g.drawString(t,120,h-5); \r\n \r\n font=new Font(\"SanSerif\",Font.BOLD,40); \r\n g.setColor(Color.black);\r\n g.setFont(font); \r\n t=\"Settings\";\r\n g.drawString(t,330,40); \r\n }", "public ComponentBuilder<?, ?> createTitleComponent(String label) {\r\n\t\treturn cmp.horizontalList()\r\n\t\t\t\t.add(dynamicReportsComponent,\r\n\t\t\t\t\t\tcmp.text(label).setStyle(normal12LeftStyle)\r\n\t\t\t\t\t\t\t\t.setHorizontalTextAlignment(HorizontalTextAlignment.LEFT))\r\n\t\t\t\t.newRow().add(cmp.line()).newRow().add(cmp.verticalGap(10));\r\n\t}", "public static void updateHeaderFooterText(IBaseSlide master)\n {\n for (IShape shape : master.getShapes())\n {\n if (shape.getPlaceholder() != null)\n {\n if (shape.getPlaceholder().getType() == PlaceholderType.Header)\n {\n ((IAutoShape) shape).getTextFrame().setText(\"HI there new header\");\n }\n }\n }\n }", "private void addNameLabel() {\n\t\tadd (new JLabel(\"Name \"), SOUTH);\n\t}", "public String getLabelText();", "private org.gwtbootstrap3.client.ui.Heading get_f_Heading6() {\n return build_f_Heading6();\n }", "public static ComponentBuilder<?, ?> createCustomTitleComponent(String label) {\n\n StyleBuilder bold12CenteredStyle = stl.style(boldStyle).setFontSize(12);\n StyleBuilder bold16CenteredStyle = stl.style(boldStyle).setFontSize(16).setForegroundColor(new Color(0, 0, 0));\n //StyleBuilder italicStyle = stl.style(rootStyle).italic();\n ComponentBuilder<?, ?> logoComponent = cmp.verticalList(\n //cmp.image(Templates.class.getResource(\"/logopalm.png\")).setFixedDimension(150, 60),\n cmp.text(label).setStyle(bold16CenteredStyle).setHorizontalAlignment(HorizontalAlignment.CENTER) \n );\n return logoComponent;\n }", "@Override\n\t\t\tpublic String getLabel() {\n\t\t\t\treturn null;\n\t\t\t}", "private org.gwtbootstrap3.client.ui.Heading get_f_Heading40() {\n return build_f_Heading40();\n }", "private ConfigurationHTMLPrinter doHeaderRow() {\n println(\"<tr>\").incrementIndent();\n doHeaderCell(\"Name\");\n doHeaderCell(\"Default value\");\n doHeaderCell(\"Aliases\");\n doHeaderCell(\"Value type\");\n doHeaderCell(\"Description\");\n return decrementIndent().println(\"</tr>\");\n }", "private void fillLabelsTabel() {\n }", "private void addHeaders(){\n\n /** Create a TableRow dynamically **/\n tr = new TableRow(this);\n tr.setLayoutParams(new TableRow.LayoutParams(\n TableRow.LayoutParams.MATCH_PARENT,\n TableRow.LayoutParams.WRAP_CONTENT));\n\n /** Creating a TextView to add to the row **/\n TextView item = new TextView(this);\n item.setText(\"Recipe\");\n item.setWidth(320);\n item.setBackgroundColor(getResources().getColor(R.color.colorPrimary));\n item.setTextColor(Color.WHITE);\n item.setTypeface(Typeface.DEFAULT, Typeface.BOLD);\n item.setPadding(5, 5, 5, 0);\n tr.addView(item); // Adding textView to tablerow.\n\n\n // Add the TableRow to the TableLayout\n tl.addView(tr, new TableLayout.LayoutParams(\n TableRow.LayoutParams.MATCH_PARENT,\n TableRow.LayoutParams.WRAP_CONTENT));\n\n\n }", "public static void EmployeeName() {\r\n\t\t\r\n\t\tJLabel e1 = new JLabel(\"Employee's Name:\");\r\n\t\te1.setFont(f);\r\n\t\tGUI1Panel.add(e1);\r\n\t\tGUI1Panel.add(employeeName);\r\n\t\te1.setHorizontalAlignment(JLabel.LEFT);\r\n\t\tGUI1Panel.add(Box.createHorizontalStrut(5));\r\n\t\t\r\n\t}", "public void addCommentField(String comment, boolean italics) {\n Label commentLabel = new Label(getComposite(), SWT.LEFT | SWT.WRAP);\n commentLabel.setText(comment);\n if (italics) {\n commentLabel.setFont(getCommentFont());\n }\n TableWrapData layoutData = TableWrapLayoutHelper.createLayoutData(true, false, TableWrapData.FILL,\n TableWrapData.FILL);\n layoutData.colspan = 4;\n layoutData.rowspan = 1;\n layoutData.maxWidth = 200;\n commentLabel.setLayoutData(layoutData);\n }", "private String addTitle(StringBuilder finalText) {\n\t\t// One Parameter: DisplayName\n\t\tMainController.titleName = parameters[0];\n\t\tStringBuilder tag = new StringBuilder();\n\t\ttag.append(\"|title:\" + parameters[0]);\n\t\treturn tag.toString();\n\t}", "public static void displayTableTitle()\r\n {\n }", "public abstract void addLabel(String str);", "protected JTableHeader createDefaultTableHeader() {\n return new JTableHeader(columnModel) {\n public String getToolTipText(MouseEvent e) {\n java.awt.Point p = e.getPoint();\n int index = columnModel.getColumnIndexAtX(p.x);\n int realIndex = columnModel.getColumn(index).getModelIndex();\n return columnToolTips[realIndex];\n }\n };\n }", "public void processAddLabel() {\n AppTextEnterDialogSingleton dialog = AppTextEnterDialogSingleton.getSingleton();\n\n // POP UP THE DIALOG\n dialog.show(\"Add Label\", \"Enter text of the label to add:\");\n \n // CHANGE THE CURSOR\n Scene scene = app.getGUI().getPrimaryScene();\n scene.setCursor(Cursor.CROSSHAIR);\n \n // CHANGE THE STATE\n dataManager.setState(mmmState.ADD_LABEL_MODE);\n }", "private void createStartingLabel() {\n \tcreateLabel(myResources.getString(\"title\"), 1, 0, TITLE_FONT);\n }", "private void createTitleContent(BufferedWriter writer) throws IOException {\r\n\t\tString title = data.getSuiteName();\r\n\t\tString titleTag = \"<div style='height: 50px; width: inherit; box-shadow: 1px 1px 1px #888888;background-color: #616161;'>\";\r\n\t\tString label = \"<label style='font-weight: bold;position: absolute;padding-left: 16px;color: white;padding-top: 8px;\"\r\n\t\t\t\t+ \"font-family: Roboto, sans-serif;'>\"\r\n\t\t\t\t+ title\r\n\t\t\t\t+ \"</label></div>\";\r\n\t\twriter.write(titleTag);\r\n\t\twriter.write(label);\r\n\t}", "@Override\n protected JTableHeader createDefaultTableHeader()\n {\n return new JTableHeader(columnModel)\n {\n /**\n * Serial version UID variable for the inner class.\n */\n public static final long serialVersionUID = 111222333444555601L;\n\n @Override\n public String getToolTipText(MouseEvent e)\n {\n int index = columnModel.getColumnIndexAtX( e.getPoint().x );\n int realIndex = columnModel.getColumn(index).getModelIndex();\n return columnNames[realIndex];\n }\n };\n }", "public void joinRow(AccountingLineTableRow headerLabelRow, AccountingLineTableRow row) {\n AccountingLineTableCell cell = new AccountingLineTableCell();\n\n AccountingLineTable columnsTable = new AccountingLineTable();\n\n List<AccountingLineTableRow> rows = createRowsForFields();\n \n columnsTable.setRows(rows);\n cell.addRenderableElement(columnsTable);\n headerLabelRow.addCell(cell);\n }", "protected void addTitleRow(Workbook wb, Sheet s, Row r) {\n\t\tr.setHeight((short)(r.getHeight()*2));\n\t\t\n\t\t//make a heading font for the title to be large and bold\n\t\tCellStyle headingStyle = wb.createCellStyle();\n\t\tFont font = wb.createFont();\n\t\tfont.setFontHeightInPoints((short)16);\n\t\tfont.setBoldweight(Font.BOLDWEIGHT_BOLD);\n\t\theadingStyle.setFont(font);\n\n\t\tCell c = r.createCell(0);\n\t\tc.setCellType(Cell.CELL_TYPE_STRING);\n\t\tc.setCellValue(\"MedStream CU Tracking System - Account Summary\");\n\t\tc.setCellStyle(headingStyle);\n\t\t//merge it the length of the report (all columns).\n\t\ts.addMergedRegion(new CellRangeAddress(0,0,0,15));\n\t}", "@Test(enabled = false) //ExSkip\n public void insertNewPageWithHeading(final DocumentBuilder builder, final String captionText, final String styleName) {\n builder.insertBreak(BreakType.PAGE_BREAK);\n String originalStyle = builder.getParagraphFormat().getStyleName();\n builder.getParagraphFormat().setStyle(builder.getDocument().getStyles().get(styleName));\n builder.writeln(captionText);\n builder.getParagraphFormat().setStyle(builder.getDocument().getStyles().get(originalStyle));\n }", "public java.lang.String getLabel();", "String getLabel();", "String getLabel();", "private static void addHeading(Sheet sheet) throws IOException {\r\n sheet.ensureRowCount(4);\r\n sheet.ensureColumnCount(10);\r\n sheet.getCellAt(\"A1\").setValue(\"income\");\r\n sheet.getCellAt(\"A2\").setValue(\"expense\");\r\n sheet.getCellAt(\"A3\").setValue(\"sum\");\r\n sheet.getCellAt(\"B1\").setValue(0.0);\r\n sheet.getCellAt(\"B2\").setValue(0.0);\r\n sheet.getCellAt(\"B3\").setValue(0.0);\r\n sheet.getCellAt(\"A4\").setValue(\"id\");\r\n sheet.getCellAt(\"B4\").setValue(\"amount\");\r\n sheet.getCellAt(\"C4\").setValue(\"date\");\r\n sheet.getCellAt(\"D4\").setValue(\"info\");\r\n }", "@Override\n\tpublic String getLabel() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getLabel() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String getLabel() {\n\t\treturn null;\n\t}", "private void sendTableHeader(CommandType type) {\n switch (type) {\n case LECTURER:\n sendMsgToClient(\"@|bold,cyan \" + String.format(\"%-25s %s\", \"Name\", \"Subject\" + \"|@\"));\n sendMsgToClient(\"@|cyan -------------------------------- |@\");\n break;\n case SUBJECT:\n sendMsgToClient(\"@|bold,cyan \" +\n String.format(\"%-30s %-10s %-10s %s\", \"Subject\", \"Code\", \"Enrolled\", \"Lecturer(s)|@\"));\n sendMsgToClient(\"@|cyan ----------------------------------------------------------------------------- |@\");\n break;\n }\n }", "public static void EmployeeAddress() {\r\n\t\t\r\n\t\tJLabel e2 = new JLabel(\"Employee's Address:\");\r\n\t\te2.setFont(f);\r\n\t\tGUI1Panel.add(e2);\r\n\t\tGUI1Panel.add(employeeAddress);\r\n\t\te2.setHorizontalAlignment(JLabel.LEFT);\r\n\t\tGUI1Panel.add(Box.createHorizontalStrut(5));\r\n\t\t\t\r\n}", "private ConfigurationHTMLPrinter doTagTitle(final String tag) {\n println(\"<tr>\").incrementIndent();\n print(\"<td class='header_cell tag_cell' colspan='5'><h3>\").print0(convertTag(tag)).print0ln(\"</h3></td>\");\n decrementIndent().println(\"</tr>\");\n return doHeaderRow();\n }", "private void IsiTabelHeader(String text) {\n IsiTabelHeader = new TextView(getActivity());\n IsiTabelHeader.setText(text);\n IsiTabelHeader.setTextColor(getResources().getColor(R.color.white));\n IsiTabelHeader.setLayoutParams(new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.WRAP_CONTENT));\n IsiTabelHeader.setBackground(getResources().getDrawable(R.drawable.header_tabel));\n TR.addView(IsiTabelHeader);\n }", "private StringBuffer2D makeLettersHeader(){\n int actualWidth = getActualWidth();\n StringBuffer2D sb = new StringBuffer2D();\n //letters\n for(int y=0;y<board.getWidth();++y){\n sb.appendRow(0, \" \"+\"_\".repeat((int) Math.ceil(actualWidth/2)) +\n Color.GREEN_UNDERLINED.escape(getCharForNumber(y)) +\n \"_\".repeat((int) Math.ceil(actualWidth/2)));\n }\n return sb;\n }", "private org.gwtbootstrap3.client.ui.Heading get_f_Heading77() {\n return build_f_Heading77();\n }", "protected String getHeader(ELesxUseCase useCase) {\n StringBuilder string;\n string = new StringBuilder(128);\n if (useCase == EDIT) {\n string.append(LesxMessage.getMessage(\"TEXT-HEADER_LABEL_COMPONENT_PANE\", component.toString()));\n }\n else {\n string.append(LesxMessage.getMessage(\"TEXT-HEADER_LABEL_COMPONENT_PANE\", \"Nuevo\"));\n }\n string.append(\".\");\n return string.toString();\n }", "protected JTableHeader createDefaultTableHeader() {\r\n \treturn new JTableHeader(columnModel) {\r\n \t\t\r\n \t\tprivate static final long serialVersionUID = 1L;\r\n \t\t\r\n \t\tpublic String getToolTipText(MouseEvent e) {\r\n \t\t\tjava.awt.Point p = e.getPoint();\r\n \t\t\tint index = columnModel.getColumnIndexAtX(p.x);\r\n \t\t\tint realColumnIndex = convertColumnIndexToModel(index);\r\n \t\t\tif ((realColumnIndex >= 0) && (realColumnIndex < getModel().getColumnCount()))\r\n \t\t\t\treturn \"The column \" + getModel().getColumnName(realColumnIndex);\r\n \t\t\telse\r\n \t\t\t\treturn \"\";\r\n \t\t}\r\n \t};\r\n }", "String makeHeader() {\n StringBuilder ans = new StringBuilder(\" \"); // README shows two spaces at\n String sep=\"\"; //start with nothing to separate, then switch to | to separate\n for (int i = 0; i < toDisplay.getWidth(); i++) {\n ans.append(sep);\n ans.append(i);\n sep = \"|\";\n }\n ans.append(\"\\n\");\n return ans.toString();\n }", "private String createLabelFieldSQL(boolean isFieldText)\n\t{\n\t\tStringBuffer str = new StringBuffer();\n\n\t\tString sqlOperand = isFieldText ? \" TEXT IS \" : \" IS \";\n\n\t\t// Keep track of the list of fields\n\t\tList<String> listFields = new ArrayList<String>();\n\n\t\t// Table command\n\t\tstr.append(\"LABEL ON COLUMN \" + getFullPath() + \"( \");\n\t\tstr.append(isFieldText ? createStandardGZFieldTexts() : createStandardGZFieldColumnHeadings());\n\n\t\t// Loop through all InputFields\n\t\tfor (InputFieldSet fieldSet : function.getInputFieldSets())\n\t\t{\n\t\t\tfor (InputField inputField : fieldSet.getInputFields())\n\t\t\t{\n\t\t\t\t// Phase 2 does not support repeating fields being journalled\n\t\t\t\tif (!Field.isRepeating(inputField))\n\t\t\t\t{\n\t\t\t\t\tString fieldName = SQLToolbox.cvtToSQLFieldName(inputField.getId());\n\t\t\t\t\t// add only if not existing\n\t\t\t\t\tif (listFields.indexOf(fieldName) == -1)\n\t\t\t\t\t{\n\t\t\t\t\t\tstr.append(\", \");\n\t\t\t\t\t\tString label = inputField.getLabel();\n\t\t\t\t\t\tif (label.trim().equals(Element.DEFAULT_TEXT_VALUE))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tlabel = inputField.getId();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tstr.append(fieldName + sqlOperand + \"'\" + SQLToolbox.cvtToSQLFieldColHdg(label) + \"'\");\n\t\t\t\t\t\tlistFields.add(fieldName);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// End\n\t\tstr.append(\" ) \");\n\t\treturn str.toString();\n\t}", "@Override\r\n protected void layout() {\n\r\n Check.setY(this.getHalfHeight() - Check.getHalfHeight());\r\n\r\n float asc = lblName.getFont().getDescent();\r\n\r\n lblName.setY(this.getHeight() - lblName.getHeight() + asc);\r\n lblName.setX(this.getLeftWidth());\r\n }", "public void createLabels()\n {\n title = new JLabel(\"Game Over\");\n title.setForeground(Color.RED);\n title.setFont(new Font(title.getFont().getName(), Font.PLAIN, 42));\n title.setAlignmentX(Component.CENTER_ALIGNMENT);\n\n roundLabel = new JLabel(\"CPU was infected on round \"+roundLost);\n roundLabel.setForeground(Color.RED);\n roundLabel.setFont(new Font(title.getFont().getName(), Font.PLAIN, 18));\n roundLabel.setAlignmentX(Component.CENTER_ALIGNMENT);\n }", "public void setHeading(String heading) {\n this.heading = heading;\n }", "@Override\n public String getLabel() {\n return label;\n }", "private void createLabel(String title, int row, int col, int fontsize) {\n \tLabel label1 = new Label(title);\n \tlabel1.setFont(Font.font(myResources.getString(\"font\"), \n \t\t\tFontWeight.EXTRA_BOLD, FontPosture.ITALIC, fontsize));\n \tlabel1.setTextFill(Color.RED);\n \tstartScreen.add(label1, row, col);\n }", "@Override\n\t\tpublic void addLabel(Label label) {\n\n\t\t}", "@Test\n\tpublic void h2_header_bold_test() {\n\t\tString text = \"## **heading2**\";\n\t\tassertEquals(\"<html><h2><strong>heading2</strong></h2></html>\", createHTML(text));\n\t}", "void setDescribingLabel(ILabel describingLabel);", "private ConfigurationHTMLPrinter doHeaderCell(final String value) {\n return print(\"<td class='header_cell'>\").print0(value).print0ln(\"</td>\");\n }", "private String createLabelTableSQL()\n\t{\n\t\treturn \"LABEL ON TABLE \" + getFullPath() + \" IS '\" + SQLToolbox.cvtToSQLFieldColHdg(function.getLabel()) + \"'\";\n\t}", "protected void header(String s, boolean beforeLabel) {\n if (beforeLabel)\n System.out.println(\"before array: \" + s);\n else System.out.println(\"after array: \" + s);\n }", "private void crearLabels(){\n\t\tJLabel label = new JLabel(\" USER \");\n\t\tuser = new JTextField(15);\n\t\tthis.getContentPane().add(label);\n\t\tthis.getContentPane().add(user);\n\t\tJLabel label1 = new JLabel(\"PASSWORD\");\n\t\tpassword = new JPasswordField(15);\n\t\tthis.getContentPane().add(label1);\n\t\tthis.getContentPane().add(password);\n\t}", "private void appendText()\n\t{\n\t\tString fieldText = \"\";\n\t\tString newText = \"\";\n\t\tfieldText = entry.getText();\n\t\t\n\t\tif(fieldText.equals (\"0\"))\n\t\t{\n\t\t\tnewText += append;\n\t\t\tfieldText = newText;\n\t\t\tentry.setText (fieldText);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfieldText += append;\n\t\t\tentry.setText (fieldText);\n\t\t}\n\t\t\n\t\tentry.grabFocus ( );\n\t\t\n\t}", "@Test\n\tpublic void h1_header_bold_test() {\n\t\tString text = \"# **heading1**\";\n\t\tassertEquals(\"<html><h1><strong>heading1</strong></h1></html>\", createHTML(text));\n\t}", "private void setWelcomeMessageAfterPhoneIsCreated(JLabel welcomeInstructions) {\n\t\twelcomeInstructions.setText(\"<html>\" + \"Welcome to the Robo-Call Blocker Program.\" + \"<br>\" + \"<br>\"\n\t\t\t\t+ \"Please click the start button to receive your first call.\" + \"<br>\" + \"<br>\" + \"You have \"\n\t\t\t\t+ phone.getNumberOfContactsForUser() + \" people in your contact list.\" + \"<br>\" + \"<br>\" + \"<br>\"\n\t\t\t\t+ \"<br>\" + \"<br>\" + \"</html>\");\n\t}", "private Label setTitle() {\r\n Label title = new Label(TITLE);\r\n title.setFont(Font.font(null, FontWeight.BOLD, null, TITLESZE));\r\n return title;\r\n }" ]
[ "0.6213087", "0.6065601", "0.59825665", "0.594188", "0.58561313", "0.57472324", "0.5730623", "0.57186145", "0.5673993", "0.5609892", "0.5566236", "0.552778", "0.5466493", "0.5463555", "0.5442176", "0.5441018", "0.5430609", "0.5405808", "0.5383491", "0.5371128", "0.53688115", "0.53593796", "0.5352777", "0.5349454", "0.53491074", "0.53462183", "0.5345689", "0.5343195", "0.53319484", "0.5308292", "0.52986926", "0.52908856", "0.5286352", "0.5285067", "0.5280902", "0.52734333", "0.52681595", "0.52661544", "0.5249871", "0.5247339", "0.5214893", "0.5213953", "0.5211776", "0.51970786", "0.51949215", "0.51908255", "0.51840895", "0.51768774", "0.5162922", "0.5154704", "0.5141667", "0.5139904", "0.5128209", "0.5122848", "0.510133", "0.51004", "0.50988746", "0.5098805", "0.50903654", "0.5090069", "0.508978", "0.5081004", "0.5074772", "0.50714034", "0.506172", "0.50469327", "0.5046891", "0.50446045", "0.504312", "0.504312", "0.50380975", "0.5031647", "0.5031647", "0.5031647", "0.50303316", "0.5026461", "0.50213075", "0.50191253", "0.50147504", "0.5007574", "0.5003525", "0.50002515", "0.49971998", "0.49957114", "0.4993902", "0.49885106", "0.4972685", "0.49663955", "0.49596497", "0.49528983", "0.4948197", "0.4941924", "0.4941744", "0.49389726", "0.49353012", "0.49289972", "0.49281463", "0.49270502", "0.49219298", "0.4921018" ]
0.7291041
0
Appends a label and a text field to the form
public JTextField appendTextField(String label, String tooltip) { return appendTextField(label, label, tooltip, defaultTextFieldColumns); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addTextFieldsAndLabels(){\n this.add(this.firstLabel);\n this.add(firstNameField);\n this.add(this.secondLabel);\n this.add(lastNameField);\n }", "public DynaForm addField(String label, StatefullComponent input) {\n\t\treturn null;\r\n\t}", "public void addField (String label, String field) {\n addField (label, field, \"\");\n }", "String getFormFieldLabel();", "public void addToTextbox(String input) {\n\t\tlabel.setText(input.trim());\n\t}", "public LabelField addLabelField(final String key) {\n String label = key;\n LabelField labelField = new LabelField(getComposite(), _form, key, label, false);\n labelField.adapt(_formToolkit);\n _form.mapField(key, labelField);\n return labelField;\n }", "public void processAddLabel() {\n AppTextEnterDialogSingleton dialog = AppTextEnterDialogSingleton.getSingleton();\n\n // POP UP THE DIALOG\n dialog.show(\"Add Label\", \"Enter text of the label to add:\");\n \n // CHANGE THE CURSOR\n Scene scene = app.getGUI().getPrimaryScene();\n scene.setCursor(Cursor.CROSSHAIR);\n \n // CHANGE THE STATE\n dataManager.setState(mmmState.ADD_LABEL_MODE);\n }", "public void addHeadingField(String label, int index) {\n //inflater needed to \"inflate\" layouts\n LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n //instantiate our data object.\n ElementHeadingField elementHeadingField = new ElementHeadingField(label);\n //insert element data object in slot on page\n if (isLoading){\n currentPage.addElement(elementHeadingField);\n }else{\n currentPage.insertElement(index, elementHeadingField);\n }\n //we need to instantiate our xml fragment (text field) and bind it to the data object\n HeadingFieldBinding headingFieldBinding = HeadingFieldBinding.inflate(inflater, null,false);\n headingFieldBinding.setElementHeadingField(elementHeadingField);\n //get new view (our xml fragment -the text field) and add it to current view\n View newView = headingFieldBinding.getRoot();\n if (isInspecting){\n EditText editText = newView.findViewById(R.id.label);\n editText.setFocusable(false);\n }\n linearLayoutBody.addView(newView, index);\n Context context = App.getContext();\n LogManager.reportStatus(context, \"INSPECTOR\", \"onAddHeadingField\");\n }", "public void addTextField(String label, String fill, int index) {\n //inflater needed to \"inflate\" layouts\n LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n //instantiate our data object.\n ElementTextField elementTextField = new ElementTextField(label, fill);\n //insert element data object in slot on page\n if (isLoading){\n currentPage.addElement(elementTextField);\n }else{\n currentPage.insertElement(index, elementTextField);\n }\n //we need to instantiate our xml fragment (text field) and bind it to the data object\n TextFieldBinding textFieldBinding = TextFieldBinding.inflate(inflater, null,false);\n textFieldBinding.setElementTextField(elementTextField);\n //get new view (our xml fragment -the text field) and add it to current view\n View newView = textFieldBinding.getRoot();\n if (isInspecting){\n EditText editText = newView.findViewById(R.id.label);\n editText.setFocusable(false);\n }\n linearLayoutBody.addView(newView, index);\n Context context = App.getContext();\n LogManager.reportStatus(context, \"INSPECTOR\", \"onTextField\");\n }", "public void add(String label, JTextField txt1, JTextField txt2, JTextField txt3){\n\t\tGridBagConstraints cons = new GridBagConstraints();\n\t\tcons.fill = GridBagConstraints.NORTHEAST; \n\t\tcons.insets = new Insets(4,4,4,4); \n\n\t\tcons.fill = GridBagConstraints.NONE; \n\t\tcons.anchor = GridBagConstraints.NORTHWEST; \n\t\tcons.weightx = 0; \n\t\tcons.gridwidth = 1; \n\t\tthis.getContentPane().add(new JLabel(label), cons); \n\n\t\tcons.weightx = 1; \n\t\tcons.gridwidth = 1; \n\t\tcons.fill = GridBagConstraints.NONE; \n\t\tthis.getContentPane().add(txt1, cons); \n\n\t\tcons.fill = GridBagConstraints.NONE; \n\t\tcons.weightx = 0; \n\t\tcons.gridwidth = 1; \n\t\tthis.getContentPane().add(txt2, cons); \n\n\t\tcons.weightx = 1; \n\t\tcons.fill = GridBagConstraints.NONE; \n\t\tcons.gridwidth = GridBagConstraints.REMAINDER; \n\t\tthis.getContentPane().add(txt3, cons); \n\t}", "public void addTextFieldDescription()\n\t{\n\t\tJTextField textFieldDescription = new JTextField(20);\n\t\ttextFieldDescription.setMaximumSize(textFieldDescription.getPreferredSize());\n\t\ttextFieldDescription.setAlignmentX(JLabel.LEFT_ALIGNMENT);\n\t\t\n\t\t// Add new description text field\n\t\tnewVersionDescriptionPanel.add(textFieldDescription);\n\t\ttextFieldsDescription.add(textFieldDescription);\n\t\t\n\t\t// Refresh panel\n\t\tnewVersionPanel.revalidate();\n\t\tnewVersionPanel.repaint();\n\t}", "String addLabel(String label);", "public void addField (String label, String field, String nada) {\n labels.add (label);\n if (! field.equals (nada)) {\n addLine (label + LABEL_SUFFIX + field);\n // System.out.println (\"TextBlock.addField field follows:\");\n // StringUtils.println (System.out, field);\n }\n }", "public void addFormString(Element parent, String label, String text) {\r\n\t\tElement stringItem = mDocument.createElement(\"IppStringItem\");\r\n\t\tparent.appendChild(stringItem);\r\n\r\n\t\taddTextNode(stringItem, \"Label\", label);\r\n\r\n\t\taddTextNode(stringItem, \"Text\", text);\r\n\t}", "@Override\n\t\tpublic void addLabel(Label label) {\n\n\t\t}", "@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 infoTextField = new javax.swing.JTextField();\n \n jLabel1.setText(\"Info:\");\n \n org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .addContainerGap()\n .add(jLabel1)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(infoTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 321, Short.MAX_VALUE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .addContainerGap()\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(jLabel1)\n .add(infoTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(252, Short.MAX_VALUE))\n );\n }", "private void addInputFields() {\n dogName = new JTextField();\n dogName.setBounds(205, 160, 140, 25);\n\n weight = new JTextField();\n weight.setBounds(205, 180, 140, 25);\n\n food = new JTextField();\n food.setBounds(205, 200, 140, 25);\n\n this.add(dogName);\n this.add(weight);\n this.add(food);\n }", "private void createTextFieldLabels() {\n // initialize empty textfield\n this.name = new TextField();\n this.id = new TextField();\n this.fiber = new TextField();\n this.calories = new TextField();\n this.fat = new TextField();\n this.carbohydrate = new TextField();\n this.protein = new TextField();\n // initialize labels\n this.nameLabel = new Label(\"Name:\");\n this.idLabel = new Label(\"ID:\");\n this.fiberLabel = new Label(\"Fiber:\");\n this.caloriesLabel = new Label(\"Calories:\");\n this.fatLabel = new Label(\"Fat:\");\n this.carbohydrateLabel = new Label(\"Carbohydrate:\");\n this.proteinLabel = new Label(\"Protein:\");\n }", "public final void addTextField() {\n\t\taddDecoratorForBuiltInFormComponent(new TextField<>(\"textField\"), \"textFieldFragment\");\n\t}", "public Field label(String label);", "public void addFormTextField(Element parent, int maxSize, ConstraintType type, boolean isPassword,\r\n\t\t\tboolean isUneditable, String key, String label, String text) {\r\n\t\tElement textBox = mDocument.createElement(\"IppTextField\");\r\n\t\tif (maxSize > 0) {\r\n\t\t\ttextBox.setAttribute(\"MaxSize\", String.valueOf(maxSize));\r\n\t\t}\r\n\t\ttextBox.setAttribute(\"Constraint\", type.toString());\r\n\t\ttextBox.setAttribute(\"Default\", \"TEXT\");\r\n\t\tif (isPassword) {\r\n\t\t\ttextBox.setAttribute(\"PASSWORD\", \"YES\");\r\n\t\t}\r\n\t\tif (key != null) {\r\n\t\t\ttextBox.setAttribute(\"Key\", key);\r\n\t\t}\r\n\t\tif (isUneditable) {\r\n\t\t\ttextBox.setAttribute(\"Uneditable\", \"YES\");\r\n\t\t}\r\n\t\tparent.appendChild(textBox);\r\n\r\n\t\taddTextNode(textBox, \"Label\", label);\r\n\r\n\t\taddTextNode(textBox, \"Text\", text);\r\n\t}", "public static JLabel newFormLabel(String text) {\n JLabel label = newLabel(text);\n label.setHorizontalAlignment(SwingConstants.RIGHT);\n label.setForeground(label.getForeground().brighter());\n return label;\n }", "private JTextField generateTextEntryPanel(String label, int textColumns, \r\n\t\t\tJPanel containingPanel) {\r\n\t\tJPanel entryPanel = new JPanel();\r\n\t\tentryPanel.add(new JLabel(label));\r\n\t\tJTextField textEntry = new JTextField(10);\r\n\t\ttextEntry.addKeyListener(new TextFieldEditListener());\r\n\t\tentryPanel.add(textEntry);\r\n\t\tcontainingPanel.add(entryPanel);\r\n\t\treturn textEntry;\r\n\t}", "protected void createTextfield(CompContainer cc, String name, String type)\r\n\t{\r\n\t\t// create label\r\n\t\tcc.label = new JLabel(localer.getBundleText(name));\r\n\t\tcc.label.setName(\"Label-\" + name);\r\n\t\tcc.label.setFont(cc.label.getFont().deriveFont(Font.PLAIN));\r\n\t\t\r\n\t\t// create component\r\n\t\tif(type.equals(\"JTextField\"))\r\n\t\t\tcc.comp = new JTextField(prefMap.get(name));\r\n\t\telse if(type.equals(\"JPasswordField\"))\r\n\t\t\tcc.comp = new JPasswordField(prefMap.get(name));\r\n\t\telse if(type.equals(\"NumericTextField\"))\r\n\t\t\tcc.comp = new NumericTextField(prefMap.get(name));\r\n\t\tcc.comp.setName(name);\r\n\t}", "public void praticien_zone(){\n\n JLabel lbl_Praticien = new JLabel(\"Praticien :\");\n lbl_Praticien.setBounds(40, 50, 119, 16);\n add(lbl_Praticien);\n\n\n\n JTextField praticien = new JTextField();\n praticien.setBounds(200, 50, 200, 22);\n praticien.setEditable(false);\n try {\n praticien.setText((DAO_Praticien.nomPraticien(rapport_visite.elementAt(DAO_Rapport.indice)[1])));\n } catch (SQLException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n add(praticien);\n\n }", "public TextField addTextField(final String key) {\n String label = key;\n TextField textField = new TextField(getComposite(), _form, key, label, false);\n textField.adapt(_formToolkit);\n _form.mapField(key, textField);\n return textField;\n }", "private void addNameInput()\n {\n username = new JTextField();\n username.setName(\"username\");\n username.setSize(200, 30);\n username.setAction(new CreateUserAction());\n add(username);\n }", "private void appendText()\n\t{\n\t\tString fieldText = \"\";\n\t\tString newText = \"\";\n\t\tfieldText = entry.getText();\n\t\t\n\t\tif(fieldText.equals (\"0\"))\n\t\t{\n\t\t\tnewText += append;\n\t\t\tfieldText = newText;\n\t\t\tentry.setText (fieldText);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfieldText += append;\n\t\t\tentry.setText (fieldText);\n\t\t}\n\t\t\n\t\tentry.grabFocus ( );\n\t\t\n\t}", "public void addField()\n {\n DefaultMutableTreeNode node = (DefaultMutableTreeNode) availableFieldsComp.getTree().getLastSelectedPathComponent();\n if (node == null || !node.isLeaf() || !(node.getUserObject() instanceof DataObjDataFieldWrapper) )\n {\n return; // not really a field that can be added, just empty or a string\n }\n\n Object obj = node.getUserObject();\n if (obj instanceof DataObjDataFieldWrapper)\n {\n DataObjDataFieldWrapper wrapper = (DataObjDataFieldWrapper) obj;\n String sep = sepText.getText();\n if (StringUtils.isNotEmpty(sep))\n {\n try\n {\n DefaultStyledDocument doc = (DefaultStyledDocument) formatEditor.getStyledDocument();\n if (doc.getLength() > 0)\n {\n doc.insertString(doc.getLength(), sep, null);\n }\n }\n catch (BadLocationException ble) {}\n \n }\n insertFieldIntoTextEditor(wrapper);\n setHasChanged(true);\n }\n }", "private void crearLabels(){\n\t\tJLabel label = new JLabel(\" USER \");\n\t\tuser = new JTextField(15);\n\t\tthis.getContentPane().add(label);\n\t\tthis.getContentPane().add(user);\n\t\tJLabel label1 = new JLabel(\"PASSWORD\");\n\t\tpassword = new JPasswordField(15);\n\t\tthis.getContentPane().add(label1);\n\t\tthis.getContentPane().add(password);\n\t}", "public JTextField appendTextField(String label, String name, String tooltip, int textFieldColumns) {\r\n JTextField textField = new JUndoableTextField();\r\n textField.setName(name);\r\n textField.setColumns(textFieldColumns);\r\n setToolTip(textField, tooltip);\r\n textField.getAccessibleContext().setAccessibleDescription(tooltip);\r\n JTextComponentPopupMenu.add(textField);\r\n append(label, textField);\r\n return textField;\r\n }", "private JComponent addField(FactoryViewPanel panel, ViewModel<?> model)\r\n {\r\n JComponent component = createComponent(model);\r\n panel.addLabelComponent(ControllerFactory.createLabel(model, component), component);\r\n return component;\r\n }", "public abstract void addLabel(String str);", "private void initFields(){\n labels.put(\"patientID\", new JLabel(\"Patient ID:\"));\n labels.put(\"newOwed\", new JLabel(\"New Owed:\"));\n \n fields.put(\"patientID\", new JTextField());\n fields.put(\"newOwed\", new JTextField());\n }", "public void setDataIntoField(String fieldLabel, String value){\n reporter.info(\"Set data \"+value+\" into field\"+fieldLabel);\n setText(LOCATORS.getBy(COMPONENT_NAME,\"FIELD_INPUT_BY_NAME\",fieldLabel),value,SHORT_TIMEOUT);\n }", "private FormComponentLabel addLabeled( String id, FormComponent<?> component ) {\n component.setOutputMarkupId( true );\n FormComponentLabel result = new FormComponentLabel( id, component );\n add( result );\n add( component );\n addIssuesAnnotation( component, getFlow(), component.getId() );\n return result;\n }", "String getFormFieldDescription();", "public abstract Code addLabel(String label);", "public void addParagraphField(String label, String fill, int index) {\n //inflater needed to \"inflate\" layouts\n LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n //instantiate our data object.\n ElementParagraphField elementParagraphField = new ElementParagraphField(label, fill);\n //insert element data object in slot on page\n if (isLoading){\n currentPage.addElement(elementParagraphField);\n }else{\n currentPage.insertElement(index, elementParagraphField);\n }\n //we need to instantiate our xml fragment (text field) and bind it to the data object\n ParagraphFieldBinding paragraphFieldBinding = ParagraphFieldBinding.inflate(inflater, null,false);\n paragraphFieldBinding.setElementParagraghField(elementParagraphField);\n //get new view (our xml fragment -the text field) and add it to current view\n View newView = paragraphFieldBinding.getRoot();\n if (isInspecting){\n EditText editText = newView.findViewById(R.id.label);\n editText.setFocusable(false);\n }\n linearLayoutBody.addView(newView, index);\n Context context = App.getContext();\n LogManager.reportStatus(context, \"INSPECTOR\", \"onAddParagraphField\");\n }", "public JLabel addChamp(String texte) {\n JLabel label = new JLabel(texte); //Cree le label\n simplePanel.add(label); //Ajoute le label au panneau\n JTextField champ = new JTextField(10);//Cree le champ\n simplePanel.add(champ); //Ajoute le champ au panneau\n champs.add(champ);//Ajoute le champ dans le tableau champs\n return label; //Retourne le label\n }", "public void motif_zone(){\n\n JLabel lbl_Motif = new JLabel(\"Motif du Rapport :\");\n lbl_Motif.setBounds(40, 130, 119, 16);\n add(lbl_Motif);\n\n motif_content = new JTextField();\n motif_content.setBounds(200, 130, 200, 22);\n motif_content.setText(rapport_visite.elementAt(DAO_Rapport.indice)[4]);\n motif_content.setEditable(false);\n add(motif_content);\n\n\n\n }", "com.microsoft.schemas.xrm._2011.contracts.Label addNewLabel();", "private Label addNewLabel() {\n getElement().getChildren().forEach(e -> getElement().removeChild(e));\n // Create and add a new slotted label\n Label label = new Label();\n label.getElement().setAttribute(\"slot\", \"label\");\n this.getElement().appendChild(label.getElement());\n return label;\n }", "private String getLabel(String label, String text) {\n\t\tStringBuffer buffer = new StringBuffer(label);\n\t\tif (text != null && !\"\".equals(text)) {\n\t\t\tif (!\"Choose One\".equals(text)) {\n\t\t\t\tbuffer.append(\": '\" + text + \"'\");\n\t\t\t}\n\t\t}\n\n\t\treturn buffer.toString();\n\t}", "private Widget getLabel(String text, final List defList) {\n Image newField = getNewFieldButton(defList);\n\n HorizontalPanel h = new HorizontalPanel();\n h.add(new SmallLabel(text)); h.add(newField);\n return h;\n\t}", "@Override\n\tpublic void setLabelText(String label) {\n\t}", "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 }", "public void addTextField(String text, boolean compulsory) {\n EditText field = new EditText(getContext());\n\n if (text.toLowerCase().contains(\"email\"))\n field.setInputType(InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);\n\n if (compulsory)\n addTextChangeListener(field);\n\n String req = compulsory ? required : \"\";\n\n field.setHint(text + req);\n\n mainll.addView(field);\n map.put(field, compulsory);\n }", "protected abstract void addFormComponents(final Form<T> form);", "void addLabel(Object newLabel);", "void addLabel(Object newLabel);", "public void setLabel( String label )\n { \n this.label = label;\n show_text();\n }", "public void addLabel(Label label) {\n\t\tgetCodeItem().addLabel(label);\n\t}", "@Override\r\n public void actionPerformed(ActionEvent e) {\n String texto = tf.getText();\r\n //lo seteo como texto en el Label\r\n lab.setText(texto);\r\n //refresco los componentes de la ventana\r\n validate();\r\n //combierto a mayuscula el texto del textfield\r\n tf.setText(texto.toUpperCase());\r\n //lo selecciono todo\r\n tf.selectAll();\r\n }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\tingredientFields.add(new JTextField());\r\n\t\t\tform.add(ingredientFields.get(ingredientFields.size()-1));\r\n\r\n\t\t\tform.revalidate();\r\n\t\t\tform.repaint();\r\n\t\t\tpack();\r\n\t\t}", "public static void addInput2Pane(String label, Component c, JPanel p,\r\n\t\t\tint row) {\r\n\t\tJLabel jlabel = new JLabel(label);\r\n\t\tint a = GridBagConstraints.WEST, f = GridBagConstraints.HORIZONTAL;\r\n\t\tGuiUtil.addComponent(p, jlabel, 0, row, 1, 1, f, a, 0, 0);\r\n\t\tGuiUtil.addComponent(p, c, 1, row, 1, 1, f, a, 1, 1);\r\n\t}", "public void addFormField(final String name, final String value) {\r\n writer.append(\"--\").append(boundary).append(LINE_FEED)\r\n .append(\"Content-Disposition: form-data; name=\\\"\").append(name)\r\n .append(\"\\\"\").append(LINE_FEED)\r\n .append(\"Content-Type: text/plain; charset=\").append(CHARSET)\r\n .append(LINE_FEED).append(LINE_FEED).append(value).append(LINE_FEED);\r\n }", "private void addToTodoTaskGui(JLabel createLabelName, JLabel createLabelDescription,\r\n JLabel createLabelDueDate, JLabel createLabelPriority) {\r\n panelTask.add(createLabelName);\r\n panelTask.add(createLabelDescription);\r\n panelTask.add(createLabelDueDate);\r\n panelTask.add(createLabelPriority);\r\n panelTask.add(textFieldDueDate);\r\n\r\n panelTask.add(textFieldName);\r\n panelTask.add(textFieldDescription);\r\n panelTask.add(textFieldDueDate);\r\n panelTask.add(comboPriority);\r\n\r\n }", "public void setLabelText(String text);", "public TextBox addTextBox(final String key) {\n String label = key;\n TextBox textBox = new TextBox(getComposite(), _form, key, label, false);\n textBox.adapt(_formToolkit);\n _form.mapField(key, textBox);\n return textBox;\n }", "public void addFormField(String name, String value) {\n writer.append(\"--\" + boundary).append(LINE_FEED);\n writer.append(\"Content-Disposition: form-data; name=\\\"\" + name + \"\\\"\")\n .append(LINE_FEED);\n writer.append(\"Content-Type: text/plain; charset=\" + charset).append(\n LINE_FEED);\n writer.append(LINE_FEED);\n writer.append(value).append(LINE_FEED);\n writer.flush();\n }", "public void addFormField(String name, String value) {\n writer.append(\"--\" + boundary).append(LINE_FEED);\n writer.append(\"Content-Disposition: form-data; name=\\\"\" + name + \"\\\"\")\n .append(LINE_FEED);\n writer.append(\"Content-Type: text/plain; charset=\" + charset).append(\n LINE_FEED);\n writer.append(LINE_FEED);\n writer.append(value).append(LINE_FEED);\n writer.flush();\n }", "Builder addText(String value);", "public final DecoratorBuilder withLabel(String labelText) {\n\t\treturn withLabel(Model.of(labelText));\n\t}", "public final void addEmailTextField() {\n\t\taddDecoratorForBuiltInFormComponent(new EmailTextField(\"textField\"), \"emailTextFieldFragment\");\n\t}", "public void addFormField(String name, String value)\n throws UnsupportedEncodingException {\n String fieldContent = \"--\" + boundary + LINE_FEED;\n fieldContent += \"Content-Disposition: form-data; name=\\\"\" + name + \"\\\"\" + LINE_FEED;\n fieldContent += \"Content-Type: text/plain; charset=\" + charset + LINE_FEED;\n fieldContent += LINE_FEED;\n fieldContent += value + LINE_FEED;\n contentLength += fieldContent.getBytes(charset).length;\n fields.add(new FormField(name, value));\n }", "public JLabel addLabel(String texte) {\n JLabel label = new JLabel(texte);\n simplePanel.add(label);\n return label;\n }", "public frmNewArtist() {\n initComponents();\n lblID.setText(Controller.Agent.ManageController.getNewArtistID());\n lblGreeting.setText(\"Dear \"+iMuzaMusic.getLoggedUser().getFirstName()+\", please use the form below to add an artist to your ranks.\");\n \n }", "private void addNameLabel() {\n\t\tadd (new JLabel(\"Name \"), SOUTH);\n\t}", "public Form(){\r\n\t\t\tString[] labelStrings = {\r\n\t\t\t\t\t\"Name: \",\r\n\t\t\t\t\t\"Description: \",\r\n\t\t\t\t\t\"Directions: \",\r\n\t\t\t\t\t\"Ingredients: \"\r\n\t\t\t};\r\n\r\n\t\t\tlabels = new JLabel[labelStrings.length];\r\n\t\t\tfields = new JComponent[labelStrings.length];\r\n\r\n\r\n\t\t\tfor(int i=0; i<4; i++) {\r\n\t\t\t\tlabels[i] = new JLabel(labelStrings[i], JLabel.TRAILING);\r\n\t\t\t\t// labels[i].setBorder(BorderFactory.createEmptyBorder(0,-20,0,0));\r\n\t\t\t}\r\n\r\n\t\t\tnameField = new JTextField(30);\r\n\r\n\t\t\tfields[fieldNum++] = nameField;\r\n\r\n\t\t\tdescriptionField = new JTextField(30);\r\n\t\t\tfields[fieldNum++] = descriptionField;\r\n\r\n\t\t\t// directionsField = new JTextField(30);\r\n\t\t\tdirectionsField = new JTextArea(15,25);\r\n\t\t\tdirectionsField.setLineWrap(true);\r\n\t\t\tdirectionsField.setBorder(new JTextField().getBorder());\r\n\t\t\t\r\n\t\t\t// pressing TAB or SHIFT-TAB in directionsField will move\r\n\t\t\t// the cursor to another component\r\n\t\t\tdirectionsField.addKeyListener(new KeyAdapter() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void keyPressed(KeyEvent e) {\r\n\t\t\t\t\tif (e.getKeyCode() == KeyEvent.VK_TAB) {\r\n\t\t\t\t\t\tif (e.getModifiers() > 0) {\r\n\t\t\t\t\t\t\tdirectionsField.transferFocusBackward();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tdirectionsField.transferFocus();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\te.consume();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t// fields[fieldNum++] = directionsField;\r\n\r\n\t\t\tdirectionsScrollPane = new JScrollPane(directionsField);\r\n\t\t\tfields[fieldNum++] = directionsScrollPane;\r\n\r\n\t\t\tfields[fieldNum++] = ingredientFields.get(0);\r\n\r\n\t\t\tsetLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS)); \r\n\t\t\tsetBorder(BorderFactory.createEmptyBorder(0, 10, 10, 10));\r\n\r\n\t\t\taddComponents();\r\n\r\n\t\t}", "@Nonnull\n LabelResponse addLabel(@Nonnull final Label label, @Nonnull final Telegraf telegraf);", "void setlabel (String label){\r\n\t\tthis.label = label;\r\n\t}", "private void createTextField(){\n Font font = new Font(\"Verdana\", Font.BOLD,3*getGameContainer().getWidth()/100);\n TrueTypeFont ttf = new TrueTypeFont(font,true);\n int fieldWidth = getGameContainer().getWidth()/3;\n int fieldHeight = getGameContainer().getHeight()/18;\n nameField = new TextField(getGameContainer(), ttf,43*getGameContainer().getWidth()/100,24*getGameContainer().getHeight()/100, fieldWidth, fieldHeight);\n nameField.setBackgroundColor(Color.white);\n nameField.setTextColor(Color.black);\n passwordField= new TextField(getGameContainer(), ttf,43*getGameContainer().getWidth()/100,32*getGameContainer().getHeight()/100, fieldWidth, fieldHeight);\n passwordField.setBackgroundColor(Color.white);\n passwordField.setTextColor(Color.black);\n }", "public AddFingerprint() {\n \n initComponents();\n \n //String ename=fnameLbl.getText().trim(); \n }", "public JTextField addFocusCourseNameTxtField() {\n JTextField courseNameTxtField = new JTextField(\"e.g.'CPSC-121'\", 10);\n courseNameTxtField.addFocusListener(new FocusListener() {\n public void focusGained(FocusEvent e) {\n courseNameTxtField.setText(\"\");\n }\n\n public void focusLost(FocusEvent e) {\n if (courseNameTxtField.getText().equals(\"\")) {\n courseNameTxtField.setText(\"e.g.'CPSC-121'\");\n }\n }\n });\n return courseNameTxtField;\n }", "private void displayEmailFields() {\n FieldRelatedLabel emailLabel = new FieldRelatedLabel(\"Email\", 750, 270);\n\n invalidEmailLabel = new InvalidFormEntryLabel(\"Email must follow the format:\\[email protected]\", 910, 290, false);\n\n emailTF = new TextField();\n emailTF.relocate(750, 300);\n emailTF.textProperty().addListener(e->{FormValidatorPokeMongo.handleEmail(emailTF, invalidEmailLabel); });\n\n sceneNodes.getChildren().addAll(emailLabel, invalidEmailLabel, emailTF);\n }", "@Override\r\n protected void addAdditionalFormFields(AssayDomainIdForm domainIdForm, DataRegion rgn)\r\n {\n rgn.addHiddenFormField(\"providerName\", domainIdForm.getProviderName());\r\n }", "Form addElement(Element element);", "public void setLabel(String label) {\n this.label = label;\n }", "public JTextField addFocusTuitionTxtField() {\n JTextField tuitionTxtField = new JTextField(\"Annual Tuition\", 10);\n tuitionTxtField.addFocusListener(new FocusListener() {\n public void focusGained(FocusEvent e) {\n tuitionTxtField.setText(\"\");\n }\n\n public void focusLost(FocusEvent e) {\n if (tuitionTxtField.getText().equals(\"\")) {\n tuitionTxtField.setText(\"Annual Tuition\");\n }\n }\n });\n return tuitionTxtField;\n }", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.getContentPane().setBackground(Color.GRAY);\r\n\t\tframe.setBounds(100, 100, 664, 483);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tJLabel lblNewLabel = new JLabel(\"BOOK YOUR TRAIN TICKET\");\r\n\t\tlblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblNewLabel.setForeground(Color.WHITE);\r\n\t\tlblNewLabel.setFont(new Font(\"Arial Black\", Font.BOLD, 22));\r\n\t\tlblNewLabel.setBackground(Color.GRAY);\r\n\t\tlblNewLabel.setBounds(134, 11, 381, 32);\r\n\t\tframe.getContentPane().add(lblNewLabel);\r\n\t\t\r\n\t\tJLabel lblNewLabel_1 = new JLabel(\"FROM\");\r\n\t\tlblNewLabel_1.setForeground(new Color(0, 0, 128));\r\n\t\tlblNewLabel_1.setFont(new Font(\"Times New Roman\", Font.BOLD, 19));\r\n\t\tlblNewLabel_1.setBounds(103, 80, 79, 22);\r\n\t\tframe.getContentPane().add(lblNewLabel_1);\r\n\t\t\r\n\t\ttextField = new JTextField();\r\n\t\ttextField.setForeground(new Color(128, 0, 0));\r\n\t\ttextField.setBackground(new Color(255, 255, 224));\r\n\t\ttextField.setFont(new Font(\"Times New Roman\", Font.PLAIN, 18));\r\n\t\ttextField.setBounds(328, 80, 225, 23);\r\n\t\tframe.getContentPane().add(textField);\r\n\t\ttextField.setColumns(10);\r\n\t\t\r\n\t\tJLabel lblTo = new JLabel(\"TO\");\r\n\t\tlblTo.setForeground(new Color(0, 0, 128));\r\n\t\tlblTo.setFont(new Font(\"Times New Roman\", Font.BOLD, 19));\r\n\t\tlblTo.setBounds(103, 125, 79, 22);\r\n\t\tframe.getContentPane().add(lblTo);\r\n\t\t\r\n\t\ttextField_1 = new JTextField();\r\n\t\ttextField_1.setForeground(new Color(128, 0, 0));\r\n\t\ttextField_1.setFont(new Font(\"Times New Roman\", Font.PLAIN, 18));\r\n\t\ttextField_1.setColumns(10);\r\n\t\ttextField_1.setBackground(new Color(255, 255, 224));\r\n\t\ttextField_1.setBounds(328, 125, 225, 23);\r\n\t\tframe.getContentPane().add(textField_1);\r\n\t\t\r\n\t\tJLabel lblDate = new JLabel(\"DATE\");\r\n\t\tlblDate.setForeground(new Color(0, 0, 128));\r\n\t\tlblDate.setFont(new Font(\"Times New Roman\", Font.BOLD, 19));\r\n\t\tlblDate.setBounds(103, 171, 79, 22);\r\n\t\tframe.getContentPane().add(lblDate);\r\n\t\t\r\n\t\tJLabel lblClass = new JLabel(\"CLASS\");\r\n\t\tlblClass.setForeground(new Color(0, 0, 128));\r\n\t\tlblClass.setFont(new Font(\"Times New Roman\", Font.BOLD, 19));\r\n\t\tlblClass.setBounds(103, 215, 79, 22);\r\n\t\tframe.getContentPane().add(lblClass);\r\n\t\t\r\n\t\tJLabel lblNoOfPassenger = new JLabel(\"NO OF PASSENGER\");\r\n\t\tlblNoOfPassenger.setForeground(new Color(0, 0, 128));\r\n\t\tlblNoOfPassenger.setFont(new Font(\"Times New Roman\", Font.BOLD, 19));\r\n\t\tlblNoOfPassenger.setBounds(103, 261, 182, 22);\r\n\t\tframe.getContentPane().add(lblNoOfPassenger);\r\n\t}", "public PointEditForm(RouteEditList backDisplay) {\n super(LangHolder.getString(Lang.editpoint));\n this.backDisplay=backDisplay;\n \n backCommand=new Command(LangHolder.getString(Lang.back), Command.BACK, 10);\n saveCommand=new Command(LangHolder.getString(Lang.save), Command.ITEM, 1);\n addCommand(backCommand);\n addCommand(saveCommand);\n setCommandListener(this);\n \n textName=new TextField(LangHolder.getString(Lang.label),null,30,TextField.ANY);\n append(textName);\n \n \n StringItem si = new StringItem(LangHolder.getString(Lang.example)+\"\\n\",MapUtil.emptyString);\n if (RMSOption.coordType==RMSOption.COORDMINSECTYPE) si.setText(\"60 23 41\\n(GG MM SS.S)\");\n else if (RMSOption.coordType==RMSOption.COORDMINMMMTYPE) si.setText(\"60 23.683\\n(GG MM.MMM)\");\n else if (RMSOption.coordType==RMSOption.COORDGGGGGGTYPE) si.setText(\"60.39471\\n(GG.GGGGG)\");\n append(si);\n textLat=new TextField(LangHolder.getString(Lang.latitude),null,12,TextField.NON_PREDICTIVE);\n append(textLat);\n textLon=new TextField(LangHolder.getString(Lang.longitude),null,12,TextField.NON_PREDICTIVE);\n append(textLon);\n //!NO-NUMERIC\n textAlt=new TextField(LangHolder.getString(Lang.altitude),null,6,TextField.ANY|TextField.NON_PREDICTIVE);\n append(textAlt);\n \n }", "private void setNameUI() {\n namePanel = new JPanel();\n name = new JLabel();\n\n name.setText(\"Name : \");\n name.setFont(new Font(\"Nunito\", Font.PLAIN, 14));\n name.setForeground(new Color(247, 37, 133));\n\n nameField = new JTextFieldHintUI(\"Enter country\");\n setTextFieldUI(nameField);\n\n namePanel.add(Box.createHorizontalStrut(15));\n namePanel.add(name);\n namePanel.add(nameField);\n namePanel.setAlignmentX(Component.CENTER_ALIGNMENT);\n namePanel.setBackground(null);\n }", "Builder addText(Text value);", "public ADD_OFFICER() {\n initComponents();\n filltf();\n jLabel12.setText(\"Select a file\");\n setLocationRelativeTo(null);\n }", "public LabelField addLabelField(final Property prop) {\n return addLabelField(prop.getKey());\n }", "public TextWithLabel(Context context, AttributeSet attrs)\r\n {\r\n \r\n // Call the super class constructor to create a basic Textbox: \r\n super(context, attrs);\r\n \r\n // Generate new TextView for the label: \r\n labelView = new TextView(context, attrs);\r\n \r\n // Get custom attributes from XML file:\r\n getCustomAttributes(attrs);\r\n\r\n \r\n /**** Set some attributes: **********************\r\n * Could add more attributes?\r\n ************************************************/\r\n labelView.setTextSize(android.util.TypedValue.COMPLEX_UNIT_PT, labelSize);\r\n labelView.setGravity( android.view.Gravity.RIGHT );\r\n \r\n /**** Set text colour... ************************/\r\n //Resources res = getResources();\r\n //int color = res.getColor(R.color.normal_text);\r\n //labelView.setTextColor(color);\r\n //itemView.setTextColor(color);\r\n \r\n // Add the new text boxes to this layout: \r\n addView(labelView);\r\n \r\n }", "public\t\tvoid\t\tsetLabel(String text)\n\t\t{\n\t\tif (label != null)\n\t\t\t{\n\t\t\tif (label instanceof MiWidget)\n\t\t\t\t((MiWidget )label).setValue(text);\n\t\t\telse if (label instanceof MiText)\n\t\t\t\t((MiText )label).setText(text);\n\t\t\telse\n\t\t\t\tlabel.replaceSelf(new MiText(text));\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\tlabel = new MiText(text);\n\t\t\tappendPart(label);\n\t\t\t}\n\t\t}", "public void limpaTextFields() {\n tfMatricula.setText(\"\");\n tfNome.setText(\"\");\n tfDataNascimento.setText(\"\");\n tfTelefone.setText(\"\");\n tfSalario.setText(\"\");\n }", "@Override\n\t\tpublic void addText(String txt) {\n\t\t\t\n\t\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n label1 = new java.awt.Label();\n t1 = new java.awt.TextField();\n button1 = new java.awt.Button();\n t2 = new java.awt.Label();\n t3 = new java.awt.Label();\n t4 = new java.awt.Label();\n t5 = new java.awt.Label();\n t6 = new java.awt.Label();\n t7 = new java.awt.Label();\n t8 = new java.awt.Label();\n t9 = new java.awt.Label();\n label10 = new java.awt.Label();\n label11 = new java.awt.Label();\n label12 = new java.awt.Label();\n label13 = new java.awt.Label();\n label14 = new java.awt.Label();\n label15 = new java.awt.Label();\n label16 = new java.awt.Label();\n label17 = new java.awt.Label();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n label1.setText(\"enter id\");\n\n t1.setText(\"textField1\");\n\n button1.setLabel(\"button1\");\n button1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n button1ActionPerformed(evt);\n }\n });\n\n t2.setText(\"label2\");\n\n t3.setText(\"label3\");\n\n t4.setText(\"label4\");\n\n t5.setText(\"label5\");\n\n t6.setText(\"label6\");\n\n t7.setText(\"label7\");\n\n t8.setText(\"label8\");\n\n t9.setText(\"label9\");\n\n label10.setText(\"cname\");\n\n label11.setText(\"email\");\n\n label12.setText(\"contact\");\n\n label13.setText(\"address\");\n\n label14.setText(\"tenth\");\n\n label15.setText(\"twelth\");\n\n label16.setText(\"graduation\");\n\n label17.setText(\"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 .addGap(86, 86, 86)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(45, 45, 45)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(t2, 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 .addGroup(layout.createSequentialGroup()\n .addComponent(t1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 39, Short.MAX_VALUE)\n .addComponent(button1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(50, 50, 50))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(t9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(t8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(t7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(t6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(t5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(t4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(t3, 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 .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(button1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(t1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(22, 22, 22)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(t2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(t3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(t4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(t5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(t6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(t7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(t8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(t9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(75, 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 jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n nameText = new javax.swing.JTextField();\n saveButton = new javax.swing.JButton();\n proceedButton = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 36)); // NOI18N\n jLabel1.setText(\"Info about Normal User\");\n\n jLabel2.setText(\"Name\");\n\n saveButton.setText(\"Save\");\n saveButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n saveButtonActionPerformed(evt);\n }\n });\n\n proceedButton.setText(\"Proceed\");\n proceedButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n proceedButtonActionPerformed(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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(9, 9, 9)\n .addComponent(nameText, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 97, Short.MAX_VALUE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(saveButton)\n .addGap(26, 26, 26)))\n .addComponent(proceedButton))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(64, 64, 64)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(nameText, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(97, 97, 97)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(proceedButton)\n .addComponent(saveButton))\n .addContainerGap(32, Short.MAX_VALUE))\n );\n\n pack();\n }", "FORM createFORM();", "public JTextField addFocusLongCourseNameTxtField() {\n JTextField courseNameTxtField = new JTextField(\"e.g.'CPSC-210'\", 22);\n courseNameTxtField.addFocusListener(new FocusListener() {\n public void focusGained(FocusEvent e) {\n courseNameTxtField.setText(\"\");\n }\n\n public void focusLost(FocusEvent e) {\n if (courseNameTxtField.getText().equals(\"\")) {\n courseNameTxtField.setText(\"e.g.'CPSC-210'\");\n }\n }\n });\n return courseNameTxtField;\n }", "private void displayNicknameFields() {\n FieldRelatedLabel usernameLabel = new FieldRelatedLabel(\"Username\", 350, 270);\n\n invalidUsernameLabel = new InvalidFormEntryLabel(\"Username must only contain letters,\\nnumbers, spaces and _\", 510, 290, false);\n\n usernameTF = new TextField();\n usernameTF.relocate(350, 300);\n usernameTF.textProperty().addListener(e->FormValidatorPokeMongo.handleUsername(usernameTF, invalidUsernameLabel));\n\n sceneNodes.getChildren().addAll(usernameLabel, usernameTF, invalidUsernameLabel);\n }", "@Override\n\t\t\tpublic void onAction(Component component ) {\n\t\t\t\tcomponent.setLabel(inputComponent.getValue());\n\t\t\t\tform.showComponents();\n\t\t\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n cndNameField = new javax.swing.JTextField();\n addBt = new javax.swing.JButton();\n submitBt = new javax.swing.JButton();\n countlb = new javax.swing.JLabel();\n\n setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);\n\n jLabel1.setText(\"Candidate Name\");\n\n addBt.setText(\"Add\");\n\n submitBt.setText(\"Submit\");\n\n countlb.setForeground(new java.awt.Color(0, 0, 204));\n countlb.setText(\"0 Candidates added\");\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(59, 59, 59)\n .addComponent(jLabel1)\n .addGap(31, 31, 31)\n .addComponent(cndNameField, javax.swing.GroupLayout.PREFERRED_SIZE, 426, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(32, 32, 32)\n .addComponent(addBt, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(34, 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(countlb, javax.swing.GroupLayout.PREFERRED_SIZE, 192, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(submitBt, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(242, 242, 242))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(47, 47, 47)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addGroup(layout.createSequentialGroup()\n .addGap(9, 9, 9)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(cndNameField, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(addBt, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(30, 30, 30)\n .addComponent(countlb)\n .addGap(29, 29, 29)\n .addComponent(submitBt, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n\n addBt.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if(count<electionData.Candidate_Count)\n {\n candidateName[count++]=cndNameField.getText().trim();\n countlb.setText(count+\" Candidates added\");\n cndNameField.setText(\"\");\n }else{\n JOptionPane.showMessageDialog(null,\"Maximum \"+electionData.Candidate_Count+\" Candidate Allow\");\n }\n\n }\n });\n\n submitBt.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if(count==electionData.Candidate_Count){\n try {\n String sql = \"INSERT INTO NEW_ELECTION\" +\n \"(ELECTION_NAME,CANDIDATE_COUNT,DATE,START_TIME,END_TIME)\" +\n \"VALUES('\"+ electionData.Election_Name.trim() + \"','\" + electionData.Candidate_Count + \"','\" + electionData.date.trim() + \"','\" + electionData.Start_Time + \"','\" + electionData.End_Time + \"')\";\n\n boolean b=s.execute(sql);\n if(b==false) {\n// sql = \"create table \" + electionData.Election_Name + \"'(candidatename varchar(25),vote int);'\";\n sql=\"create table \"+electionData.Election_Name.trim()+electionData.date.replace(\"-\",\"_\").trim()+ \"(candidatename varchar(25),vote int);\";\n int re=s.executeUpdate(sql);\n if(re==0) {\n for(int i=0;i<count;i++)\n {\n sql=\"INSERT INTO \"+electionData.Election_Name.trim()+electionData.date.replace(\"-\",\"_\").trim()+\" values('\"+candidateName[i]+\"',0)\";\n b=s.execute(sql);\n\n }\n sql=\"create table \"+electionData.Election_Name.trim()+electionData.date.replace(\"-\",\"_\").trim()+ \"voting(username varchar(25));\";\n re=s.executeUpdate(sql);\n\n JOptionPane.showMessageDialog(null,\"New Election Created Successfully\");\n dispose();\n }\n }\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }else {\n JOptionPane.showMessageDialog(null,\"Please add total\"+electionData.Candidate_Count+\" Candidate!\");\n\n }\n\n }\n\n });\n\n pack();\n }", "public void addContentToPane(JLabel addNewCourseLabel, JTextField courseNameTxtField, JTextField tuitionTxtField,\n JTextField salaryTxtField, JTextField maxStudentsTxtField,\n JButton submitNewCourseBtn, Container contentPane) {\n contentPane.add(addNewCourseLabel);\n contentPane.add(courseNameTxtField);\n contentPane.add(tuitionTxtField);\n contentPane.add(salaryTxtField);\n contentPane.add(maxStudentsTxtField);\n contentPane.add(submitNewCourseBtn);\n }", "public void setLabel(String label) {\n addNewLabel().setText(label);\n }", "private JLabel addNonEditableLine(JPanel parent, String label, String data) {\n\t\tJPanel tmp = new JPanel(new GridLayout(0, 2, 40, 10));\n\n\t\tJLabel l1 = new JLabel(label);\n\t\tl1.setAlignmentX(LEFT_ALIGNMENT);\n\t\ttmp.add(l1);\n\n\t\tJLabel l2 = new JLabel(data);\n\t\tl2.setAlignmentX(LEFT_ALIGNMENT);\n\t\ttmp.add(l2);\n\n\t\tparent.add(tmp);\n\t\treturn l2;\n\t}" ]
[ "0.71438986", "0.67995256", "0.6744355", "0.65417683", "0.6393691", "0.6324196", "0.63220704", "0.62856793", "0.6249823", "0.6179614", "0.612649", "0.60866386", "0.6073442", "0.6063173", "0.6002967", "0.5901218", "0.58940077", "0.58753246", "0.5837438", "0.5817812", "0.5814272", "0.58047646", "0.57578075", "0.5754287", "0.5743135", "0.57421756", "0.573414", "0.5733926", "0.5732585", "0.57300866", "0.5717158", "0.570231", "0.56882834", "0.56858546", "0.5675575", "0.565618", "0.5637714", "0.563377", "0.56178933", "0.56014514", "0.55822194", "0.5576044", "0.55655944", "0.5520676", "0.5511056", "0.54835606", "0.54765993", "0.5474208", "0.5463466", "0.54442936", "0.54442936", "0.54069763", "0.5401748", "0.5380844", "0.53503", "0.5347942", "0.5345442", "0.53327405", "0.53283805", "0.5325813", "0.5318029", "0.5318029", "0.5314193", "0.53041375", "0.529997", "0.52857363", "0.5278336", "0.52753615", "0.5274462", "0.5262249", "0.5258964", "0.5257954", "0.5236936", "0.5235726", "0.52241844", "0.52196693", "0.5217878", "0.5217824", "0.5217677", "0.52048147", "0.5203777", "0.52016973", "0.5199743", "0.5199395", "0.519745", "0.5196969", "0.5194829", "0.5179103", "0.5177046", "0.51766104", "0.51735777", "0.5172313", "0.5161057", "0.51487356", "0.51426834", "0.5130096", "0.51235193", "0.5121152", "0.5120695", "0.51179266" ]
0.62011325
9
Appends a label and a text field to the form
public JTextField appendTextField(String label, String name, String tooltip, int textFieldColumns) { JTextField textField = new JUndoableTextField(); textField.setName(name); textField.setColumns(textFieldColumns); setToolTip(textField, tooltip); textField.getAccessibleContext().setAccessibleDescription(tooltip); JTextComponentPopupMenu.add(textField); append(label, textField); return textField; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addTextFieldsAndLabels(){\n this.add(this.firstLabel);\n this.add(firstNameField);\n this.add(this.secondLabel);\n this.add(lastNameField);\n }", "public DynaForm addField(String label, StatefullComponent input) {\n\t\treturn null;\r\n\t}", "public void addField (String label, String field) {\n addField (label, field, \"\");\n }", "String getFormFieldLabel();", "public void addToTextbox(String input) {\n\t\tlabel.setText(input.trim());\n\t}", "public LabelField addLabelField(final String key) {\n String label = key;\n LabelField labelField = new LabelField(getComposite(), _form, key, label, false);\n labelField.adapt(_formToolkit);\n _form.mapField(key, labelField);\n return labelField;\n }", "public void processAddLabel() {\n AppTextEnterDialogSingleton dialog = AppTextEnterDialogSingleton.getSingleton();\n\n // POP UP THE DIALOG\n dialog.show(\"Add Label\", \"Enter text of the label to add:\");\n \n // CHANGE THE CURSOR\n Scene scene = app.getGUI().getPrimaryScene();\n scene.setCursor(Cursor.CROSSHAIR);\n \n // CHANGE THE STATE\n dataManager.setState(mmmState.ADD_LABEL_MODE);\n }", "public void addHeadingField(String label, int index) {\n //inflater needed to \"inflate\" layouts\n LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n //instantiate our data object.\n ElementHeadingField elementHeadingField = new ElementHeadingField(label);\n //insert element data object in slot on page\n if (isLoading){\n currentPage.addElement(elementHeadingField);\n }else{\n currentPage.insertElement(index, elementHeadingField);\n }\n //we need to instantiate our xml fragment (text field) and bind it to the data object\n HeadingFieldBinding headingFieldBinding = HeadingFieldBinding.inflate(inflater, null,false);\n headingFieldBinding.setElementHeadingField(elementHeadingField);\n //get new view (our xml fragment -the text field) and add it to current view\n View newView = headingFieldBinding.getRoot();\n if (isInspecting){\n EditText editText = newView.findViewById(R.id.label);\n editText.setFocusable(false);\n }\n linearLayoutBody.addView(newView, index);\n Context context = App.getContext();\n LogManager.reportStatus(context, \"INSPECTOR\", \"onAddHeadingField\");\n }", "public void addTextField(String label, String fill, int index) {\n //inflater needed to \"inflate\" layouts\n LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n //instantiate our data object.\n ElementTextField elementTextField = new ElementTextField(label, fill);\n //insert element data object in slot on page\n if (isLoading){\n currentPage.addElement(elementTextField);\n }else{\n currentPage.insertElement(index, elementTextField);\n }\n //we need to instantiate our xml fragment (text field) and bind it to the data object\n TextFieldBinding textFieldBinding = TextFieldBinding.inflate(inflater, null,false);\n textFieldBinding.setElementTextField(elementTextField);\n //get new view (our xml fragment -the text field) and add it to current view\n View newView = textFieldBinding.getRoot();\n if (isInspecting){\n EditText editText = newView.findViewById(R.id.label);\n editText.setFocusable(false);\n }\n linearLayoutBody.addView(newView, index);\n Context context = App.getContext();\n LogManager.reportStatus(context, \"INSPECTOR\", \"onTextField\");\n }", "public JTextField appendTextField(String label, String tooltip) {\r\n return appendTextField(label, label, tooltip, defaultTextFieldColumns);\r\n }", "public void add(String label, JTextField txt1, JTextField txt2, JTextField txt3){\n\t\tGridBagConstraints cons = new GridBagConstraints();\n\t\tcons.fill = GridBagConstraints.NORTHEAST; \n\t\tcons.insets = new Insets(4,4,4,4); \n\n\t\tcons.fill = GridBagConstraints.NONE; \n\t\tcons.anchor = GridBagConstraints.NORTHWEST; \n\t\tcons.weightx = 0; \n\t\tcons.gridwidth = 1; \n\t\tthis.getContentPane().add(new JLabel(label), cons); \n\n\t\tcons.weightx = 1; \n\t\tcons.gridwidth = 1; \n\t\tcons.fill = GridBagConstraints.NONE; \n\t\tthis.getContentPane().add(txt1, cons); \n\n\t\tcons.fill = GridBagConstraints.NONE; \n\t\tcons.weightx = 0; \n\t\tcons.gridwidth = 1; \n\t\tthis.getContentPane().add(txt2, cons); \n\n\t\tcons.weightx = 1; \n\t\tcons.fill = GridBagConstraints.NONE; \n\t\tcons.gridwidth = GridBagConstraints.REMAINDER; \n\t\tthis.getContentPane().add(txt3, cons); \n\t}", "public void addTextFieldDescription()\n\t{\n\t\tJTextField textFieldDescription = new JTextField(20);\n\t\ttextFieldDescription.setMaximumSize(textFieldDescription.getPreferredSize());\n\t\ttextFieldDescription.setAlignmentX(JLabel.LEFT_ALIGNMENT);\n\t\t\n\t\t// Add new description text field\n\t\tnewVersionDescriptionPanel.add(textFieldDescription);\n\t\ttextFieldsDescription.add(textFieldDescription);\n\t\t\n\t\t// Refresh panel\n\t\tnewVersionPanel.revalidate();\n\t\tnewVersionPanel.repaint();\n\t}", "String addLabel(String label);", "public void addField (String label, String field, String nada) {\n labels.add (label);\n if (! field.equals (nada)) {\n addLine (label + LABEL_SUFFIX + field);\n // System.out.println (\"TextBlock.addField field follows:\");\n // StringUtils.println (System.out, field);\n }\n }", "public void addFormString(Element parent, String label, String text) {\r\n\t\tElement stringItem = mDocument.createElement(\"IppStringItem\");\r\n\t\tparent.appendChild(stringItem);\r\n\r\n\t\taddTextNode(stringItem, \"Label\", label);\r\n\r\n\t\taddTextNode(stringItem, \"Text\", text);\r\n\t}", "@Override\n\t\tpublic void addLabel(Label label) {\n\n\t\t}", "@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 infoTextField = new javax.swing.JTextField();\n \n jLabel1.setText(\"Info:\");\n \n org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .addContainerGap()\n .add(jLabel1)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(infoTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 321, Short.MAX_VALUE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .addContainerGap()\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(jLabel1)\n .add(infoTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(252, Short.MAX_VALUE))\n );\n }", "private void addInputFields() {\n dogName = new JTextField();\n dogName.setBounds(205, 160, 140, 25);\n\n weight = new JTextField();\n weight.setBounds(205, 180, 140, 25);\n\n food = new JTextField();\n food.setBounds(205, 200, 140, 25);\n\n this.add(dogName);\n this.add(weight);\n this.add(food);\n }", "private void createTextFieldLabels() {\n // initialize empty textfield\n this.name = new TextField();\n this.id = new TextField();\n this.fiber = new TextField();\n this.calories = new TextField();\n this.fat = new TextField();\n this.carbohydrate = new TextField();\n this.protein = new TextField();\n // initialize labels\n this.nameLabel = new Label(\"Name:\");\n this.idLabel = new Label(\"ID:\");\n this.fiberLabel = new Label(\"Fiber:\");\n this.caloriesLabel = new Label(\"Calories:\");\n this.fatLabel = new Label(\"Fat:\");\n this.carbohydrateLabel = new Label(\"Carbohydrate:\");\n this.proteinLabel = new Label(\"Protein:\");\n }", "public final void addTextField() {\n\t\taddDecoratorForBuiltInFormComponent(new TextField<>(\"textField\"), \"textFieldFragment\");\n\t}", "public Field label(String label);", "public void addFormTextField(Element parent, int maxSize, ConstraintType type, boolean isPassword,\r\n\t\t\tboolean isUneditable, String key, String label, String text) {\r\n\t\tElement textBox = mDocument.createElement(\"IppTextField\");\r\n\t\tif (maxSize > 0) {\r\n\t\t\ttextBox.setAttribute(\"MaxSize\", String.valueOf(maxSize));\r\n\t\t}\r\n\t\ttextBox.setAttribute(\"Constraint\", type.toString());\r\n\t\ttextBox.setAttribute(\"Default\", \"TEXT\");\r\n\t\tif (isPassword) {\r\n\t\t\ttextBox.setAttribute(\"PASSWORD\", \"YES\");\r\n\t\t}\r\n\t\tif (key != null) {\r\n\t\t\ttextBox.setAttribute(\"Key\", key);\r\n\t\t}\r\n\t\tif (isUneditable) {\r\n\t\t\ttextBox.setAttribute(\"Uneditable\", \"YES\");\r\n\t\t}\r\n\t\tparent.appendChild(textBox);\r\n\r\n\t\taddTextNode(textBox, \"Label\", label);\r\n\r\n\t\taddTextNode(textBox, \"Text\", text);\r\n\t}", "public static JLabel newFormLabel(String text) {\n JLabel label = newLabel(text);\n label.setHorizontalAlignment(SwingConstants.RIGHT);\n label.setForeground(label.getForeground().brighter());\n return label;\n }", "private JTextField generateTextEntryPanel(String label, int textColumns, \r\n\t\t\tJPanel containingPanel) {\r\n\t\tJPanel entryPanel = new JPanel();\r\n\t\tentryPanel.add(new JLabel(label));\r\n\t\tJTextField textEntry = new JTextField(10);\r\n\t\ttextEntry.addKeyListener(new TextFieldEditListener());\r\n\t\tentryPanel.add(textEntry);\r\n\t\tcontainingPanel.add(entryPanel);\r\n\t\treturn textEntry;\r\n\t}", "protected void createTextfield(CompContainer cc, String name, String type)\r\n\t{\r\n\t\t// create label\r\n\t\tcc.label = new JLabel(localer.getBundleText(name));\r\n\t\tcc.label.setName(\"Label-\" + name);\r\n\t\tcc.label.setFont(cc.label.getFont().deriveFont(Font.PLAIN));\r\n\t\t\r\n\t\t// create component\r\n\t\tif(type.equals(\"JTextField\"))\r\n\t\t\tcc.comp = new JTextField(prefMap.get(name));\r\n\t\telse if(type.equals(\"JPasswordField\"))\r\n\t\t\tcc.comp = new JPasswordField(prefMap.get(name));\r\n\t\telse if(type.equals(\"NumericTextField\"))\r\n\t\t\tcc.comp = new NumericTextField(prefMap.get(name));\r\n\t\tcc.comp.setName(name);\r\n\t}", "public void praticien_zone(){\n\n JLabel lbl_Praticien = new JLabel(\"Praticien :\");\n lbl_Praticien.setBounds(40, 50, 119, 16);\n add(lbl_Praticien);\n\n\n\n JTextField praticien = new JTextField();\n praticien.setBounds(200, 50, 200, 22);\n praticien.setEditable(false);\n try {\n praticien.setText((DAO_Praticien.nomPraticien(rapport_visite.elementAt(DAO_Rapport.indice)[1])));\n } catch (SQLException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n add(praticien);\n\n }", "public TextField addTextField(final String key) {\n String label = key;\n TextField textField = new TextField(getComposite(), _form, key, label, false);\n textField.adapt(_formToolkit);\n _form.mapField(key, textField);\n return textField;\n }", "private void addNameInput()\n {\n username = new JTextField();\n username.setName(\"username\");\n username.setSize(200, 30);\n username.setAction(new CreateUserAction());\n add(username);\n }", "private void appendText()\n\t{\n\t\tString fieldText = \"\";\n\t\tString newText = \"\";\n\t\tfieldText = entry.getText();\n\t\t\n\t\tif(fieldText.equals (\"0\"))\n\t\t{\n\t\t\tnewText += append;\n\t\t\tfieldText = newText;\n\t\t\tentry.setText (fieldText);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfieldText += append;\n\t\t\tentry.setText (fieldText);\n\t\t}\n\t\t\n\t\tentry.grabFocus ( );\n\t\t\n\t}", "public void addField()\n {\n DefaultMutableTreeNode node = (DefaultMutableTreeNode) availableFieldsComp.getTree().getLastSelectedPathComponent();\n if (node == null || !node.isLeaf() || !(node.getUserObject() instanceof DataObjDataFieldWrapper) )\n {\n return; // not really a field that can be added, just empty or a string\n }\n\n Object obj = node.getUserObject();\n if (obj instanceof DataObjDataFieldWrapper)\n {\n DataObjDataFieldWrapper wrapper = (DataObjDataFieldWrapper) obj;\n String sep = sepText.getText();\n if (StringUtils.isNotEmpty(sep))\n {\n try\n {\n DefaultStyledDocument doc = (DefaultStyledDocument) formatEditor.getStyledDocument();\n if (doc.getLength() > 0)\n {\n doc.insertString(doc.getLength(), sep, null);\n }\n }\n catch (BadLocationException ble) {}\n \n }\n insertFieldIntoTextEditor(wrapper);\n setHasChanged(true);\n }\n }", "private void crearLabels(){\n\t\tJLabel label = new JLabel(\" USER \");\n\t\tuser = new JTextField(15);\n\t\tthis.getContentPane().add(label);\n\t\tthis.getContentPane().add(user);\n\t\tJLabel label1 = new JLabel(\"PASSWORD\");\n\t\tpassword = new JPasswordField(15);\n\t\tthis.getContentPane().add(label1);\n\t\tthis.getContentPane().add(password);\n\t}", "private JComponent addField(FactoryViewPanel panel, ViewModel<?> model)\r\n {\r\n JComponent component = createComponent(model);\r\n panel.addLabelComponent(ControllerFactory.createLabel(model, component), component);\r\n return component;\r\n }", "public abstract void addLabel(String str);", "private void initFields(){\n labels.put(\"patientID\", new JLabel(\"Patient ID:\"));\n labels.put(\"newOwed\", new JLabel(\"New Owed:\"));\n \n fields.put(\"patientID\", new JTextField());\n fields.put(\"newOwed\", new JTextField());\n }", "public void setDataIntoField(String fieldLabel, String value){\n reporter.info(\"Set data \"+value+\" into field\"+fieldLabel);\n setText(LOCATORS.getBy(COMPONENT_NAME,\"FIELD_INPUT_BY_NAME\",fieldLabel),value,SHORT_TIMEOUT);\n }", "private FormComponentLabel addLabeled( String id, FormComponent<?> component ) {\n component.setOutputMarkupId( true );\n FormComponentLabel result = new FormComponentLabel( id, component );\n add( result );\n add( component );\n addIssuesAnnotation( component, getFlow(), component.getId() );\n return result;\n }", "String getFormFieldDescription();", "public abstract Code addLabel(String label);", "public void addParagraphField(String label, String fill, int index) {\n //inflater needed to \"inflate\" layouts\n LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n //instantiate our data object.\n ElementParagraphField elementParagraphField = new ElementParagraphField(label, fill);\n //insert element data object in slot on page\n if (isLoading){\n currentPage.addElement(elementParagraphField);\n }else{\n currentPage.insertElement(index, elementParagraphField);\n }\n //we need to instantiate our xml fragment (text field) and bind it to the data object\n ParagraphFieldBinding paragraphFieldBinding = ParagraphFieldBinding.inflate(inflater, null,false);\n paragraphFieldBinding.setElementParagraghField(elementParagraphField);\n //get new view (our xml fragment -the text field) and add it to current view\n View newView = paragraphFieldBinding.getRoot();\n if (isInspecting){\n EditText editText = newView.findViewById(R.id.label);\n editText.setFocusable(false);\n }\n linearLayoutBody.addView(newView, index);\n Context context = App.getContext();\n LogManager.reportStatus(context, \"INSPECTOR\", \"onAddParagraphField\");\n }", "public JLabel addChamp(String texte) {\n JLabel label = new JLabel(texte); //Cree le label\n simplePanel.add(label); //Ajoute le label au panneau\n JTextField champ = new JTextField(10);//Cree le champ\n simplePanel.add(champ); //Ajoute le champ au panneau\n champs.add(champ);//Ajoute le champ dans le tableau champs\n return label; //Retourne le label\n }", "public void motif_zone(){\n\n JLabel lbl_Motif = new JLabel(\"Motif du Rapport :\");\n lbl_Motif.setBounds(40, 130, 119, 16);\n add(lbl_Motif);\n\n motif_content = new JTextField();\n motif_content.setBounds(200, 130, 200, 22);\n motif_content.setText(rapport_visite.elementAt(DAO_Rapport.indice)[4]);\n motif_content.setEditable(false);\n add(motif_content);\n\n\n\n }", "com.microsoft.schemas.xrm._2011.contracts.Label addNewLabel();", "private Label addNewLabel() {\n getElement().getChildren().forEach(e -> getElement().removeChild(e));\n // Create and add a new slotted label\n Label label = new Label();\n label.getElement().setAttribute(\"slot\", \"label\");\n this.getElement().appendChild(label.getElement());\n return label;\n }", "private String getLabel(String label, String text) {\n\t\tStringBuffer buffer = new StringBuffer(label);\n\t\tif (text != null && !\"\".equals(text)) {\n\t\t\tif (!\"Choose One\".equals(text)) {\n\t\t\t\tbuffer.append(\": '\" + text + \"'\");\n\t\t\t}\n\t\t}\n\n\t\treturn buffer.toString();\n\t}", "private Widget getLabel(String text, final List defList) {\n Image newField = getNewFieldButton(defList);\n\n HorizontalPanel h = new HorizontalPanel();\n h.add(new SmallLabel(text)); h.add(newField);\n return h;\n\t}", "@Override\n\tpublic void setLabelText(String label) {\n\t}", "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 }", "public void addTextField(String text, boolean compulsory) {\n EditText field = new EditText(getContext());\n\n if (text.toLowerCase().contains(\"email\"))\n field.setInputType(InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);\n\n if (compulsory)\n addTextChangeListener(field);\n\n String req = compulsory ? required : \"\";\n\n field.setHint(text + req);\n\n mainll.addView(field);\n map.put(field, compulsory);\n }", "protected abstract void addFormComponents(final Form<T> form);", "void addLabel(Object newLabel);", "void addLabel(Object newLabel);", "public void setLabel( String label )\n { \n this.label = label;\n show_text();\n }", "public void addLabel(Label label) {\n\t\tgetCodeItem().addLabel(label);\n\t}", "@Override\r\n public void actionPerformed(ActionEvent e) {\n String texto = tf.getText();\r\n //lo seteo como texto en el Label\r\n lab.setText(texto);\r\n //refresco los componentes de la ventana\r\n validate();\r\n //combierto a mayuscula el texto del textfield\r\n tf.setText(texto.toUpperCase());\r\n //lo selecciono todo\r\n tf.selectAll();\r\n }", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\tingredientFields.add(new JTextField());\r\n\t\t\tform.add(ingredientFields.get(ingredientFields.size()-1));\r\n\r\n\t\t\tform.revalidate();\r\n\t\t\tform.repaint();\r\n\t\t\tpack();\r\n\t\t}", "public static void addInput2Pane(String label, Component c, JPanel p,\r\n\t\t\tint row) {\r\n\t\tJLabel jlabel = new JLabel(label);\r\n\t\tint a = GridBagConstraints.WEST, f = GridBagConstraints.HORIZONTAL;\r\n\t\tGuiUtil.addComponent(p, jlabel, 0, row, 1, 1, f, a, 0, 0);\r\n\t\tGuiUtil.addComponent(p, c, 1, row, 1, 1, f, a, 1, 1);\r\n\t}", "public void addFormField(final String name, final String value) {\r\n writer.append(\"--\").append(boundary).append(LINE_FEED)\r\n .append(\"Content-Disposition: form-data; name=\\\"\").append(name)\r\n .append(\"\\\"\").append(LINE_FEED)\r\n .append(\"Content-Type: text/plain; charset=\").append(CHARSET)\r\n .append(LINE_FEED).append(LINE_FEED).append(value).append(LINE_FEED);\r\n }", "private void addToTodoTaskGui(JLabel createLabelName, JLabel createLabelDescription,\r\n JLabel createLabelDueDate, JLabel createLabelPriority) {\r\n panelTask.add(createLabelName);\r\n panelTask.add(createLabelDescription);\r\n panelTask.add(createLabelDueDate);\r\n panelTask.add(createLabelPriority);\r\n panelTask.add(textFieldDueDate);\r\n\r\n panelTask.add(textFieldName);\r\n panelTask.add(textFieldDescription);\r\n panelTask.add(textFieldDueDate);\r\n panelTask.add(comboPriority);\r\n\r\n }", "public void setLabelText(String text);", "public TextBox addTextBox(final String key) {\n String label = key;\n TextBox textBox = new TextBox(getComposite(), _form, key, label, false);\n textBox.adapt(_formToolkit);\n _form.mapField(key, textBox);\n return textBox;\n }", "public void addFormField(String name, String value) {\n writer.append(\"--\" + boundary).append(LINE_FEED);\n writer.append(\"Content-Disposition: form-data; name=\\\"\" + name + \"\\\"\")\n .append(LINE_FEED);\n writer.append(\"Content-Type: text/plain; charset=\" + charset).append(\n LINE_FEED);\n writer.append(LINE_FEED);\n writer.append(value).append(LINE_FEED);\n writer.flush();\n }", "public void addFormField(String name, String value) {\n writer.append(\"--\" + boundary).append(LINE_FEED);\n writer.append(\"Content-Disposition: form-data; name=\\\"\" + name + \"\\\"\")\n .append(LINE_FEED);\n writer.append(\"Content-Type: text/plain; charset=\" + charset).append(\n LINE_FEED);\n writer.append(LINE_FEED);\n writer.append(value).append(LINE_FEED);\n writer.flush();\n }", "Builder addText(String value);", "public final DecoratorBuilder withLabel(String labelText) {\n\t\treturn withLabel(Model.of(labelText));\n\t}", "public final void addEmailTextField() {\n\t\taddDecoratorForBuiltInFormComponent(new EmailTextField(\"textField\"), \"emailTextFieldFragment\");\n\t}", "public void addFormField(String name, String value)\n throws UnsupportedEncodingException {\n String fieldContent = \"--\" + boundary + LINE_FEED;\n fieldContent += \"Content-Disposition: form-data; name=\\\"\" + name + \"\\\"\" + LINE_FEED;\n fieldContent += \"Content-Type: text/plain; charset=\" + charset + LINE_FEED;\n fieldContent += LINE_FEED;\n fieldContent += value + LINE_FEED;\n contentLength += fieldContent.getBytes(charset).length;\n fields.add(new FormField(name, value));\n }", "public JLabel addLabel(String texte) {\n JLabel label = new JLabel(texte);\n simplePanel.add(label);\n return label;\n }", "public frmNewArtist() {\n initComponents();\n lblID.setText(Controller.Agent.ManageController.getNewArtistID());\n lblGreeting.setText(\"Dear \"+iMuzaMusic.getLoggedUser().getFirstName()+\", please use the form below to add an artist to your ranks.\");\n \n }", "private void addNameLabel() {\n\t\tadd (new JLabel(\"Name \"), SOUTH);\n\t}", "public Form(){\r\n\t\t\tString[] labelStrings = {\r\n\t\t\t\t\t\"Name: \",\r\n\t\t\t\t\t\"Description: \",\r\n\t\t\t\t\t\"Directions: \",\r\n\t\t\t\t\t\"Ingredients: \"\r\n\t\t\t};\r\n\r\n\t\t\tlabels = new JLabel[labelStrings.length];\r\n\t\t\tfields = new JComponent[labelStrings.length];\r\n\r\n\r\n\t\t\tfor(int i=0; i<4; i++) {\r\n\t\t\t\tlabels[i] = new JLabel(labelStrings[i], JLabel.TRAILING);\r\n\t\t\t\t// labels[i].setBorder(BorderFactory.createEmptyBorder(0,-20,0,0));\r\n\t\t\t}\r\n\r\n\t\t\tnameField = new JTextField(30);\r\n\r\n\t\t\tfields[fieldNum++] = nameField;\r\n\r\n\t\t\tdescriptionField = new JTextField(30);\r\n\t\t\tfields[fieldNum++] = descriptionField;\r\n\r\n\t\t\t// directionsField = new JTextField(30);\r\n\t\t\tdirectionsField = new JTextArea(15,25);\r\n\t\t\tdirectionsField.setLineWrap(true);\r\n\t\t\tdirectionsField.setBorder(new JTextField().getBorder());\r\n\t\t\t\r\n\t\t\t// pressing TAB or SHIFT-TAB in directionsField will move\r\n\t\t\t// the cursor to another component\r\n\t\t\tdirectionsField.addKeyListener(new KeyAdapter() {\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void keyPressed(KeyEvent e) {\r\n\t\t\t\t\tif (e.getKeyCode() == KeyEvent.VK_TAB) {\r\n\t\t\t\t\t\tif (e.getModifiers() > 0) {\r\n\t\t\t\t\t\t\tdirectionsField.transferFocusBackward();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tdirectionsField.transferFocus();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\te.consume();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t// fields[fieldNum++] = directionsField;\r\n\r\n\t\t\tdirectionsScrollPane = new JScrollPane(directionsField);\r\n\t\t\tfields[fieldNum++] = directionsScrollPane;\r\n\r\n\t\t\tfields[fieldNum++] = ingredientFields.get(0);\r\n\r\n\t\t\tsetLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS)); \r\n\t\t\tsetBorder(BorderFactory.createEmptyBorder(0, 10, 10, 10));\r\n\r\n\t\t\taddComponents();\r\n\r\n\t\t}", "@Nonnull\n LabelResponse addLabel(@Nonnull final Label label, @Nonnull final Telegraf telegraf);", "void setlabel (String label){\r\n\t\tthis.label = label;\r\n\t}", "private void createTextField(){\n Font font = new Font(\"Verdana\", Font.BOLD,3*getGameContainer().getWidth()/100);\n TrueTypeFont ttf = new TrueTypeFont(font,true);\n int fieldWidth = getGameContainer().getWidth()/3;\n int fieldHeight = getGameContainer().getHeight()/18;\n nameField = new TextField(getGameContainer(), ttf,43*getGameContainer().getWidth()/100,24*getGameContainer().getHeight()/100, fieldWidth, fieldHeight);\n nameField.setBackgroundColor(Color.white);\n nameField.setTextColor(Color.black);\n passwordField= new TextField(getGameContainer(), ttf,43*getGameContainer().getWidth()/100,32*getGameContainer().getHeight()/100, fieldWidth, fieldHeight);\n passwordField.setBackgroundColor(Color.white);\n passwordField.setTextColor(Color.black);\n }", "public AddFingerprint() {\n \n initComponents();\n \n //String ename=fnameLbl.getText().trim(); \n }", "public JTextField addFocusCourseNameTxtField() {\n JTextField courseNameTxtField = new JTextField(\"e.g.'CPSC-121'\", 10);\n courseNameTxtField.addFocusListener(new FocusListener() {\n public void focusGained(FocusEvent e) {\n courseNameTxtField.setText(\"\");\n }\n\n public void focusLost(FocusEvent e) {\n if (courseNameTxtField.getText().equals(\"\")) {\n courseNameTxtField.setText(\"e.g.'CPSC-121'\");\n }\n }\n });\n return courseNameTxtField;\n }", "private void displayEmailFields() {\n FieldRelatedLabel emailLabel = new FieldRelatedLabel(\"Email\", 750, 270);\n\n invalidEmailLabel = new InvalidFormEntryLabel(\"Email must follow the format:\\[email protected]\", 910, 290, false);\n\n emailTF = new TextField();\n emailTF.relocate(750, 300);\n emailTF.textProperty().addListener(e->{FormValidatorPokeMongo.handleEmail(emailTF, invalidEmailLabel); });\n\n sceneNodes.getChildren().addAll(emailLabel, invalidEmailLabel, emailTF);\n }", "@Override\r\n protected void addAdditionalFormFields(AssayDomainIdForm domainIdForm, DataRegion rgn)\r\n {\n rgn.addHiddenFormField(\"providerName\", domainIdForm.getProviderName());\r\n }", "Form addElement(Element element);", "public void setLabel(String label) {\n this.label = label;\n }", "public JTextField addFocusTuitionTxtField() {\n JTextField tuitionTxtField = new JTextField(\"Annual Tuition\", 10);\n tuitionTxtField.addFocusListener(new FocusListener() {\n public void focusGained(FocusEvent e) {\n tuitionTxtField.setText(\"\");\n }\n\n public void focusLost(FocusEvent e) {\n if (tuitionTxtField.getText().equals(\"\")) {\n tuitionTxtField.setText(\"Annual Tuition\");\n }\n }\n });\n return tuitionTxtField;\n }", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.getContentPane().setBackground(Color.GRAY);\r\n\t\tframe.setBounds(100, 100, 664, 483);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tJLabel lblNewLabel = new JLabel(\"BOOK YOUR TRAIN TICKET\");\r\n\t\tlblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\tlblNewLabel.setForeground(Color.WHITE);\r\n\t\tlblNewLabel.setFont(new Font(\"Arial Black\", Font.BOLD, 22));\r\n\t\tlblNewLabel.setBackground(Color.GRAY);\r\n\t\tlblNewLabel.setBounds(134, 11, 381, 32);\r\n\t\tframe.getContentPane().add(lblNewLabel);\r\n\t\t\r\n\t\tJLabel lblNewLabel_1 = new JLabel(\"FROM\");\r\n\t\tlblNewLabel_1.setForeground(new Color(0, 0, 128));\r\n\t\tlblNewLabel_1.setFont(new Font(\"Times New Roman\", Font.BOLD, 19));\r\n\t\tlblNewLabel_1.setBounds(103, 80, 79, 22);\r\n\t\tframe.getContentPane().add(lblNewLabel_1);\r\n\t\t\r\n\t\ttextField = new JTextField();\r\n\t\ttextField.setForeground(new Color(128, 0, 0));\r\n\t\ttextField.setBackground(new Color(255, 255, 224));\r\n\t\ttextField.setFont(new Font(\"Times New Roman\", Font.PLAIN, 18));\r\n\t\ttextField.setBounds(328, 80, 225, 23);\r\n\t\tframe.getContentPane().add(textField);\r\n\t\ttextField.setColumns(10);\r\n\t\t\r\n\t\tJLabel lblTo = new JLabel(\"TO\");\r\n\t\tlblTo.setForeground(new Color(0, 0, 128));\r\n\t\tlblTo.setFont(new Font(\"Times New Roman\", Font.BOLD, 19));\r\n\t\tlblTo.setBounds(103, 125, 79, 22);\r\n\t\tframe.getContentPane().add(lblTo);\r\n\t\t\r\n\t\ttextField_1 = new JTextField();\r\n\t\ttextField_1.setForeground(new Color(128, 0, 0));\r\n\t\ttextField_1.setFont(new Font(\"Times New Roman\", Font.PLAIN, 18));\r\n\t\ttextField_1.setColumns(10);\r\n\t\ttextField_1.setBackground(new Color(255, 255, 224));\r\n\t\ttextField_1.setBounds(328, 125, 225, 23);\r\n\t\tframe.getContentPane().add(textField_1);\r\n\t\t\r\n\t\tJLabel lblDate = new JLabel(\"DATE\");\r\n\t\tlblDate.setForeground(new Color(0, 0, 128));\r\n\t\tlblDate.setFont(new Font(\"Times New Roman\", Font.BOLD, 19));\r\n\t\tlblDate.setBounds(103, 171, 79, 22);\r\n\t\tframe.getContentPane().add(lblDate);\r\n\t\t\r\n\t\tJLabel lblClass = new JLabel(\"CLASS\");\r\n\t\tlblClass.setForeground(new Color(0, 0, 128));\r\n\t\tlblClass.setFont(new Font(\"Times New Roman\", Font.BOLD, 19));\r\n\t\tlblClass.setBounds(103, 215, 79, 22);\r\n\t\tframe.getContentPane().add(lblClass);\r\n\t\t\r\n\t\tJLabel lblNoOfPassenger = new JLabel(\"NO OF PASSENGER\");\r\n\t\tlblNoOfPassenger.setForeground(new Color(0, 0, 128));\r\n\t\tlblNoOfPassenger.setFont(new Font(\"Times New Roman\", Font.BOLD, 19));\r\n\t\tlblNoOfPassenger.setBounds(103, 261, 182, 22);\r\n\t\tframe.getContentPane().add(lblNoOfPassenger);\r\n\t}", "public PointEditForm(RouteEditList backDisplay) {\n super(LangHolder.getString(Lang.editpoint));\n this.backDisplay=backDisplay;\n \n backCommand=new Command(LangHolder.getString(Lang.back), Command.BACK, 10);\n saveCommand=new Command(LangHolder.getString(Lang.save), Command.ITEM, 1);\n addCommand(backCommand);\n addCommand(saveCommand);\n setCommandListener(this);\n \n textName=new TextField(LangHolder.getString(Lang.label),null,30,TextField.ANY);\n append(textName);\n \n \n StringItem si = new StringItem(LangHolder.getString(Lang.example)+\"\\n\",MapUtil.emptyString);\n if (RMSOption.coordType==RMSOption.COORDMINSECTYPE) si.setText(\"60 23 41\\n(GG MM SS.S)\");\n else if (RMSOption.coordType==RMSOption.COORDMINMMMTYPE) si.setText(\"60 23.683\\n(GG MM.MMM)\");\n else if (RMSOption.coordType==RMSOption.COORDGGGGGGTYPE) si.setText(\"60.39471\\n(GG.GGGGG)\");\n append(si);\n textLat=new TextField(LangHolder.getString(Lang.latitude),null,12,TextField.NON_PREDICTIVE);\n append(textLat);\n textLon=new TextField(LangHolder.getString(Lang.longitude),null,12,TextField.NON_PREDICTIVE);\n append(textLon);\n //!NO-NUMERIC\n textAlt=new TextField(LangHolder.getString(Lang.altitude),null,6,TextField.ANY|TextField.NON_PREDICTIVE);\n append(textAlt);\n \n }", "private void setNameUI() {\n namePanel = new JPanel();\n name = new JLabel();\n\n name.setText(\"Name : \");\n name.setFont(new Font(\"Nunito\", Font.PLAIN, 14));\n name.setForeground(new Color(247, 37, 133));\n\n nameField = new JTextFieldHintUI(\"Enter country\");\n setTextFieldUI(nameField);\n\n namePanel.add(Box.createHorizontalStrut(15));\n namePanel.add(name);\n namePanel.add(nameField);\n namePanel.setAlignmentX(Component.CENTER_ALIGNMENT);\n namePanel.setBackground(null);\n }", "Builder addText(Text value);", "public ADD_OFFICER() {\n initComponents();\n filltf();\n jLabel12.setText(\"Select a file\");\n setLocationRelativeTo(null);\n }", "public LabelField addLabelField(final Property prop) {\n return addLabelField(prop.getKey());\n }", "public TextWithLabel(Context context, AttributeSet attrs)\r\n {\r\n \r\n // Call the super class constructor to create a basic Textbox: \r\n super(context, attrs);\r\n \r\n // Generate new TextView for the label: \r\n labelView = new TextView(context, attrs);\r\n \r\n // Get custom attributes from XML file:\r\n getCustomAttributes(attrs);\r\n\r\n \r\n /**** Set some attributes: **********************\r\n * Could add more attributes?\r\n ************************************************/\r\n labelView.setTextSize(android.util.TypedValue.COMPLEX_UNIT_PT, labelSize);\r\n labelView.setGravity( android.view.Gravity.RIGHT );\r\n \r\n /**** Set text colour... ************************/\r\n //Resources res = getResources();\r\n //int color = res.getColor(R.color.normal_text);\r\n //labelView.setTextColor(color);\r\n //itemView.setTextColor(color);\r\n \r\n // Add the new text boxes to this layout: \r\n addView(labelView);\r\n \r\n }", "public\t\tvoid\t\tsetLabel(String text)\n\t\t{\n\t\tif (label != null)\n\t\t\t{\n\t\t\tif (label instanceof MiWidget)\n\t\t\t\t((MiWidget )label).setValue(text);\n\t\t\telse if (label instanceof MiText)\n\t\t\t\t((MiText )label).setText(text);\n\t\t\telse\n\t\t\t\tlabel.replaceSelf(new MiText(text));\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\tlabel = new MiText(text);\n\t\t\tappendPart(label);\n\t\t\t}\n\t\t}", "public void limpaTextFields() {\n tfMatricula.setText(\"\");\n tfNome.setText(\"\");\n tfDataNascimento.setText(\"\");\n tfTelefone.setText(\"\");\n tfSalario.setText(\"\");\n }", "@Override\n\t\tpublic void addText(String txt) {\n\t\t\t\n\t\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n label1 = new java.awt.Label();\n t1 = new java.awt.TextField();\n button1 = new java.awt.Button();\n t2 = new java.awt.Label();\n t3 = new java.awt.Label();\n t4 = new java.awt.Label();\n t5 = new java.awt.Label();\n t6 = new java.awt.Label();\n t7 = new java.awt.Label();\n t8 = new java.awt.Label();\n t9 = new java.awt.Label();\n label10 = new java.awt.Label();\n label11 = new java.awt.Label();\n label12 = new java.awt.Label();\n label13 = new java.awt.Label();\n label14 = new java.awt.Label();\n label15 = new java.awt.Label();\n label16 = new java.awt.Label();\n label17 = new java.awt.Label();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n label1.setText(\"enter id\");\n\n t1.setText(\"textField1\");\n\n button1.setLabel(\"button1\");\n button1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n button1ActionPerformed(evt);\n }\n });\n\n t2.setText(\"label2\");\n\n t3.setText(\"label3\");\n\n t4.setText(\"label4\");\n\n t5.setText(\"label5\");\n\n t6.setText(\"label6\");\n\n t7.setText(\"label7\");\n\n t8.setText(\"label8\");\n\n t9.setText(\"label9\");\n\n label10.setText(\"cname\");\n\n label11.setText(\"email\");\n\n label12.setText(\"contact\");\n\n label13.setText(\"address\");\n\n label14.setText(\"tenth\");\n\n label15.setText(\"twelth\");\n\n label16.setText(\"graduation\");\n\n label17.setText(\"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 .addGap(86, 86, 86)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(45, 45, 45)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(t2, 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 .addGroup(layout.createSequentialGroup()\n .addComponent(t1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 39, Short.MAX_VALUE)\n .addComponent(button1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(50, 50, 50))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(t9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(t8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(t7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(t6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(t5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(t4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(t3, 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 .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(button1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(t1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(22, 22, 22)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(t2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(t3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(t4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(t5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(t6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(t7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(t8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(t9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(label17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(75, 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 jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n nameText = new javax.swing.JTextField();\n saveButton = new javax.swing.JButton();\n proceedButton = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Tahoma\", 0, 36)); // NOI18N\n jLabel1.setText(\"Info about Normal User\");\n\n jLabel2.setText(\"Name\");\n\n saveButton.setText(\"Save\");\n saveButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n saveButtonActionPerformed(evt);\n }\n });\n\n proceedButton.setText(\"Proceed\");\n proceedButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n proceedButtonActionPerformed(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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 54, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(9, 9, 9)\n .addComponent(nameText, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 97, Short.MAX_VALUE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(saveButton)\n .addGap(26, 26, 26)))\n .addComponent(proceedButton))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(64, 64, 64)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(nameText, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(97, 97, 97)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(proceedButton)\n .addComponent(saveButton))\n .addContainerGap(32, Short.MAX_VALUE))\n );\n\n pack();\n }", "FORM createFORM();", "public JTextField addFocusLongCourseNameTxtField() {\n JTextField courseNameTxtField = new JTextField(\"e.g.'CPSC-210'\", 22);\n courseNameTxtField.addFocusListener(new FocusListener() {\n public void focusGained(FocusEvent e) {\n courseNameTxtField.setText(\"\");\n }\n\n public void focusLost(FocusEvent e) {\n if (courseNameTxtField.getText().equals(\"\")) {\n courseNameTxtField.setText(\"e.g.'CPSC-210'\");\n }\n }\n });\n return courseNameTxtField;\n }", "private void displayNicknameFields() {\n FieldRelatedLabel usernameLabel = new FieldRelatedLabel(\"Username\", 350, 270);\n\n invalidUsernameLabel = new InvalidFormEntryLabel(\"Username must only contain letters,\\nnumbers, spaces and _\", 510, 290, false);\n\n usernameTF = new TextField();\n usernameTF.relocate(350, 300);\n usernameTF.textProperty().addListener(e->FormValidatorPokeMongo.handleUsername(usernameTF, invalidUsernameLabel));\n\n sceneNodes.getChildren().addAll(usernameLabel, usernameTF, invalidUsernameLabel);\n }", "@Override\n\t\t\tpublic void onAction(Component component ) {\n\t\t\t\tcomponent.setLabel(inputComponent.getValue());\n\t\t\t\tform.showComponents();\n\t\t\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">\n private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n cndNameField = new javax.swing.JTextField();\n addBt = new javax.swing.JButton();\n submitBt = new javax.swing.JButton();\n countlb = new javax.swing.JLabel();\n\n setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);\n\n jLabel1.setText(\"Candidate Name\");\n\n addBt.setText(\"Add\");\n\n submitBt.setText(\"Submit\");\n\n countlb.setForeground(new java.awt.Color(0, 0, 204));\n countlb.setText(\"0 Candidates added\");\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(59, 59, 59)\n .addComponent(jLabel1)\n .addGap(31, 31, 31)\n .addComponent(cndNameField, javax.swing.GroupLayout.PREFERRED_SIZE, 426, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(32, 32, 32)\n .addComponent(addBt, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(34, 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(countlb, javax.swing.GroupLayout.PREFERRED_SIZE, 192, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(submitBt, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(242, 242, 242))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(47, 47, 47)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addGroup(layout.createSequentialGroup()\n .addGap(9, 9, 9)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(cndNameField, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(addBt, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(30, 30, 30)\n .addComponent(countlb)\n .addGap(29, 29, 29)\n .addComponent(submitBt, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n\n addBt.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if(count<electionData.Candidate_Count)\n {\n candidateName[count++]=cndNameField.getText().trim();\n countlb.setText(count+\" Candidates added\");\n cndNameField.setText(\"\");\n }else{\n JOptionPane.showMessageDialog(null,\"Maximum \"+electionData.Candidate_Count+\" Candidate Allow\");\n }\n\n }\n });\n\n submitBt.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if(count==electionData.Candidate_Count){\n try {\n String sql = \"INSERT INTO NEW_ELECTION\" +\n \"(ELECTION_NAME,CANDIDATE_COUNT,DATE,START_TIME,END_TIME)\" +\n \"VALUES('\"+ electionData.Election_Name.trim() + \"','\" + electionData.Candidate_Count + \"','\" + electionData.date.trim() + \"','\" + electionData.Start_Time + \"','\" + electionData.End_Time + \"')\";\n\n boolean b=s.execute(sql);\n if(b==false) {\n// sql = \"create table \" + electionData.Election_Name + \"'(candidatename varchar(25),vote int);'\";\n sql=\"create table \"+electionData.Election_Name.trim()+electionData.date.replace(\"-\",\"_\").trim()+ \"(candidatename varchar(25),vote int);\";\n int re=s.executeUpdate(sql);\n if(re==0) {\n for(int i=0;i<count;i++)\n {\n sql=\"INSERT INTO \"+electionData.Election_Name.trim()+electionData.date.replace(\"-\",\"_\").trim()+\" values('\"+candidateName[i]+\"',0)\";\n b=s.execute(sql);\n\n }\n sql=\"create table \"+electionData.Election_Name.trim()+electionData.date.replace(\"-\",\"_\").trim()+ \"voting(username varchar(25));\";\n re=s.executeUpdate(sql);\n\n JOptionPane.showMessageDialog(null,\"New Election Created Successfully\");\n dispose();\n }\n }\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n }else {\n JOptionPane.showMessageDialog(null,\"Please add total\"+electionData.Candidate_Count+\" Candidate!\");\n\n }\n\n }\n\n });\n\n pack();\n }", "public void addContentToPane(JLabel addNewCourseLabel, JTextField courseNameTxtField, JTextField tuitionTxtField,\n JTextField salaryTxtField, JTextField maxStudentsTxtField,\n JButton submitNewCourseBtn, Container contentPane) {\n contentPane.add(addNewCourseLabel);\n contentPane.add(courseNameTxtField);\n contentPane.add(tuitionTxtField);\n contentPane.add(salaryTxtField);\n contentPane.add(maxStudentsTxtField);\n contentPane.add(submitNewCourseBtn);\n }", "public void setLabel(String label) {\n addNewLabel().setText(label);\n }", "private JLabel addNonEditableLine(JPanel parent, String label, String data) {\n\t\tJPanel tmp = new JPanel(new GridLayout(0, 2, 40, 10));\n\n\t\tJLabel l1 = new JLabel(label);\n\t\tl1.setAlignmentX(LEFT_ALIGNMENT);\n\t\ttmp.add(l1);\n\n\t\tJLabel l2 = new JLabel(data);\n\t\tl2.setAlignmentX(LEFT_ALIGNMENT);\n\t\ttmp.add(l2);\n\n\t\tparent.add(tmp);\n\t\treturn l2;\n\t}" ]
[ "0.71438986", "0.67995256", "0.6744355", "0.65417683", "0.6393691", "0.6324196", "0.63220704", "0.62856793", "0.6249823", "0.62011325", "0.6179614", "0.612649", "0.60866386", "0.6073442", "0.6063173", "0.6002967", "0.5901218", "0.58940077", "0.58753246", "0.5837438", "0.5817812", "0.5814272", "0.58047646", "0.57578075", "0.5754287", "0.5743135", "0.57421756", "0.573414", "0.5733926", "0.5732585", "0.57300866", "0.570231", "0.56882834", "0.56858546", "0.5675575", "0.565618", "0.5637714", "0.563377", "0.56178933", "0.56014514", "0.55822194", "0.5576044", "0.55655944", "0.5520676", "0.5511056", "0.54835606", "0.54765993", "0.5474208", "0.5463466", "0.54442936", "0.54442936", "0.54069763", "0.5401748", "0.5380844", "0.53503", "0.5347942", "0.5345442", "0.53327405", "0.53283805", "0.5325813", "0.5318029", "0.5318029", "0.5314193", "0.53041375", "0.529997", "0.52857363", "0.5278336", "0.52753615", "0.5274462", "0.5262249", "0.5258964", "0.5257954", "0.5236936", "0.5235726", "0.52241844", "0.52196693", "0.5217878", "0.5217824", "0.5217677", "0.52048147", "0.5203777", "0.52016973", "0.5199743", "0.5199395", "0.519745", "0.5196969", "0.5194829", "0.5179103", "0.5177046", "0.51766104", "0.51735777", "0.5172313", "0.5161057", "0.51487356", "0.51426834", "0.5130096", "0.51235193", "0.5121152", "0.5120695", "0.51179266" ]
0.5717158
31
Appends a vararg of PropertyComponents to a single row in the form. It's assumed that every other column contains a component and the others are used for spacing including the initial column.
public void appendInOneRow(PropertyComponent... propertyComponents) { Preconditions.checkArgument(propertyComponents.length * 2 <= layout.getColumnCount() - 1, "There is not enough room for the components to be added"); int currentColumn = DEFAULT_COMPONENT_COLUMN; for (int i = 0; i < propertyComponents.length; i++) { PropertyComponent propertyComponent = propertyComponents[i]; if (i == 0) { append(null, null, propertyComponent.getComponent(), "left,center", currentColumn, DEFAULT_COLUMN_SPAN); } else { addComponentToRow(null, propertyComponent.getComponent(), "left,center", currentColumn, getRowCount(), DEFAULT_COLUMN_SPAN); } currentColumn += 2; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public GridBagPanel addRow(Component... components)\n {\n if (myGBC.gridx == GridBagConstraints.RELATIVE)\n {\n setGridx(0);\n }\n if (myGBC.gridy == GridBagConstraints.RELATIVE)\n {\n setGridy(0);\n }\n\n for (Component component : components)\n {\n add(component);\n incrementGridx();\n }\n setGridx(0);\n incrementGridy();\n return this;\n }", "protected static void addRow(Container container, GridBagConstraints gbc, JComponent... components) {\r\n\t\tif(components.length == 0) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tfor(int c = 0; c < components.length; c++) {\r\n\t\t\tif(c == components.length - 1) {\r\n\t\t\t\tgbc.gridwidth = GridBagConstraints.REMAINDER;\r\n\t\t\t}\r\n\t\t\tcontainer.add(components[c], gbc);\r\n\t\t\tgbc.gridx++;\r\n\t\t}\r\n\t\t\t\r\n\t\tgbc.gridwidth = 1;\r\n\t\tgbc.gridx = 0;\r\n\t\tgbc.gridy++;\r\n\t}", "public void addComponents(Component... components);", "private void addComponent(Component component, // the Component to add\n int row, // add Component at cell row 0..?\n int column, // add Component at cell column 0..?\n int width, // let the Component span this many cells wide\n int height) { // let the Component span this many cells high\n constraints.gridx = column; // store the four parameters in the constraints\n constraints.gridy = row;\n constraints.gridwidth = width;\n constraints.gridheight = height;\n layout.setConstraints(component, constraints); // set the constraints on the layout manager\n add(component); // before add the actual component to the Applet\n }", "private void addrowActionPerformed(java.awt.event.ActionEvent evt) {\n if(count == max_row-1){\n JOptionPane.showMessageDialog(null, \"Maximum of 10 rows can be added\",\"Failed!!\",JOptionPane.ERROR_MESSAGE);\n return;\n }\n count++; \n combo1[count] = new javax.swing.JComboBox(); \n for(int i=1;i<=5;i++){\n combo1[count].addItem(\"Item \" + i);\n } \n combo2[count] = new javax.swing.JComboBox(); \n for(int i=1;i<=5;i++){\n combo2[count].addItem(\"Item \" + i);\n } \n text1[count] = new javax.swing.JTextField(); \n jPanel2.setLayout(new GridLayout(0,3,20,20));\n jPanel2.add(combo1[count]);\n jPanel2.add(combo2[count]);\n jPanel2.add(text1[count]);\n jPanel2.revalidate();\n jPanel2.repaint();\n }", "public void addComponents(){\r\n\r\n\t\t\tfor(int i=0; i < fieldNum ; i++){ \r\n\t\t\t\tadd(labels[i]);\r\n\t\t\t\tif(i==3){\r\n\t\t\t\t\tadd(fields[i]);\r\n\t\t\t\t\tfor(int k=1;k<ingredientFields.size();k++)\r\n\t\t\t\t\t\tadd(ingredientFields.get(k));\r\n\t\t\t\t}\r\n\t\t\t\telse \r\n\t\t\t\t\tadd(fields[i]);\r\n\t\t\t}\r\n\r\n\t\t}", "private void addComponents() {\n LOOGER.info(\"Get add Components Entry\");\n // Adding loadButton to first row.\n this.add(loadButton);\n\n // Adding fillButton to first row.\n this.add(fillButton);\n\n // Adding deleteButton to first row.\n this.add(deleteButton);\n LOOGER.info(\"add Components exit\");\n }", "public void addComponents(final Component... components) {\r\n\t\t_hSplit.addComponents(components);\r\n\t}", "private void addRow() {\n ArrayList<EscapeBlock> row = new ArrayList<>();\n grid.add(row);\n \n for (int j = 0; j < gridWidth; j++) {\n EscapeBlock block = new EscapeBlock(j, gridHeight);\n block.setLocation(margin + j * (Block.length+1) ,\n margin + topMargin + gridHeight * (Block.length+1)); \n \n this.add(block); // add to the JPanel \n row.add(block); // and to the row\n }\n \n gridHeight++;\n }", "private void createAndAddViews() {\n \t\t// Create the layout parameters for each field\n \t\tfinal LinearLayout.LayoutParams labelParams = new LinearLayout.LayoutParams(\n \t\t\t\t0, LayoutParams.WRAP_CONTENT, 0.3f);\n \t\tlabelParams.gravity = Gravity.RIGHT;\n \t\tlabelParams.setMargins(0, 25, 0, 0);\n \t\tfinal LinearLayout.LayoutParams valueParams = new LinearLayout.LayoutParams(\n \t\t\t\t0, LayoutParams.WRAP_CONTENT, 0.7f);\n \t\tvalueParams.gravity = Gravity.LEFT;\n \t\tvalueParams.setMargins(0, 25, 0, 0);\n \n \t\t// Add a layout and text views for each property\n \t\tfor (final StockProperty property : m_propertyList) {\n \t\t\tLog.d(TAG, \"Adding row for property: \" + property.getPropertyName());\n \n \t\t\t// Create a horizontal layout for the label and value\n \t\t\tfinal LinearLayout layout = new LinearLayout(this);\n \t\t\tlayout.setLayoutParams(new LinearLayout.LayoutParams(\n \t\t\t\t\tLayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT));\n \n \t\t\t// Create a TextView for the label\n \t\t\tfinal TextView label = new TextView(this);\n \t\t\tlabel.setLayoutParams(labelParams);\n \t\t\tlabel.setText(property.getLabelText());\n \t\t\tlabel.setTextAppearance(this, android.R.style.TextAppearance_Medium);\n \t\t\tlayout.addView(label);\n \n \t\t\t// Configure and add the value TextView (created when the property\n \t\t\t// was constructed)\n \t\t\tfinal TextView value = property.getView();\n \t\t\tvalue.setLayoutParams(valueParams);\n \t\t\tvalue.setHint(\"None\");\n \t\t\tvalue.setTextAppearance(this, android.R.style.TextAppearance_Medium);\n \t\t\tvalue.setTypeface(null, Typeface.BOLD);\n \t\t\tlayout.addView(value);\n \n \t\t\t// Add the row to the main layout\n \t\t\tm_resultsLayout.addView(layout);\n \t\t}\n \t}", "@Override\n\tpublic void addRow() {\n\t\tif(this.numCols == 0){\n\t\t\tthis.numCols++;\n\t\t}\n\t\tthis.numRows++;\n\t}", "private void addCom() {\n\n cons = new GridBagConstraints();\n cons.gridx = 0;\n cons.gridy = 0;\n cons.gridwidth = 1;\n cons.fill = GridBagConstraints.HORIZONTAL;\n panelFormulario.add(lbNome, cons);\n\n cons = new GridBagConstraints();\n cons.gridx = 1;\n cons.gridy = 0;\n cons.gridwidth = 2;\n cons.ipadx = 100;\n cons.fill = GridBagConstraints.HORIZONTAL;\n panelFormulario.add(txNome, cons);\n\n //------------------\n cons = new GridBagConstraints();\n cons.gridx = 0;\n cons.gridy = 1;\n cons.gridwidth = 1;\n cons.fill = GridBagConstraints.HORIZONTAL;\n panelFormulario.add(lbSenha, cons);\n\n cons = new GridBagConstraints();\n cons.gridx = 1;\n cons.gridy = 1;\n cons.gridwidth = 2;\n cons.ipadx = 100;\n cons.fill = GridBagConstraints.HORIZONTAL;\n panelFormulario.add(txSenha, cons);\n\n super.add(panelFormulario);\n\n }", "private void addLastValueToTable(){\n\t\t//System.out.println(theModelColumn.size()-1);\n\t\tsetValueAt(theModelColumn.get(theModelColumn.size()-1).getX(), theModelColumn.size()-1, 0);\n\t\tsetValueAt(theModelColumn.get(theModelColumn.size()-1).getY(), theModelColumn.size()-1, 1);\n\t\tsetValueAt(theModelColumn.get(theModelColumn.size()-1).getWidth(), theModelColumn.size()-1, 2);\n\t\tsetValueAt(theModelColumn.get(theModelColumn.size()-1).getHeight(), theModelColumn.size()-1, 3);\n\t}", "private void addComponent( Component component,\n\t\t\t\t\t\t\t int column, int row,\n\t\t\t\t\t\t\t int width, int height,\n\t\t\t\t\t\t\t int weightx, int weighty,\n\t\t\t\t\t\t\t Insets insets, int anchor, int fill )\n\t{\n\t\tgridBagConstraints.gridx = column; // set the gridx constraint\n\t\tgridBagConstraints.gridy = row; // set the gridy constraint\n\t\tgridBagConstraints.gridwidth = width; // set the gridwidth constraint\n\t\tgridBagConstraints.gridheight = height; // set the gridheight constraint\n\t\tgridBagConstraints.weightx = weightx; // set the weightx constraint\n\t\tgridBagConstraints.weighty = weighty; // set the weighty constraint\n\t\tgridBagConstraints.insets = insets; // set the insets constraint\n\t\tgridBagConstraints.anchor = anchor; // set the anchor constraint\n\t\tgridBagConstraints.fill = fill; // set the fill constraint\n\t\tgridBagLayout.setConstraints( component, gridBagConstraints ); // set the constraints for the component\n\t\tadd( component ); // add the component to the frame\n\t}", "private void addComponents()\n\t{\n\t\tPrinter currentPrinter;\n\t\tadd(m_ResultHeader);\n\t\tfor(int i = 2; i <= m_PrinterList.getNumberOfPrinters()+1; i++)\n\t\t{\n\t\t\t// Convert values to Strings\n\t\t\tcurrentPrinter = m_PrinterList.getPrinter(i-2);\n\t\t\tadd(new PrinterLabel(i,MenuWindow.FRAME_WIDTH , MenuWindow.FRAME_HEIGHT,\n\t\t\t\t\tcurrentPrinter.getPrinterName()+ \"\",\n\t\t\t\t\tcurrentPrinter.getVendor(),\n\t\t\t\t\tcurrentPrinter.getTension()+ \"\",\n\t\t\t\t\tcurrentPrinter.getCompression()+ \"\",\n\t\t\t\t\tcurrentPrinter.getImpact()+ \"\",\n\t\t\t\t\tcurrentPrinter.materialsString(),\n\t\t\t\t\tcurrentPrinter.getTolerance()+ \"\",\n\t\t\t\t\tcurrentPrinter.getFinish()+ \"\", true));\n\t\t}\n\t}", "public void addRow(String... cols)\r\n {\r\n rows.add(cols);\r\n }", "@Override\n\t\t\tprotected void populateItem(final ListItem<ComponentData> listItem)\n\t\t\t{\n\t\t\t\tfinal ComponentData componentData = listItem.getModelObject();\n\n\t\t\t\tlistItem.add(new Label(\"row\", Long.toString(listItem.getIndex() + 1)));\n\t\t\t\tlistItem.add(new Label(\"path\", componentData.path));\n\t\t\t\tlistItem.add(new Label(\"size\", Bytes.bytes(componentData.size).toString()));\n\t\t\t\tlistItem.add(new Label(\"type\", componentData.type));\n\t\t\t\tlistItem.add(new Label(\"model\", componentData.value));\n\t\t\t\tlistItem.add(new Label(\"renderDuration\", componentData.renderDuration != null\n\t\t\t\t\t? componentData.renderDuration.toString() : \"n/a\"));\n\t\t\t}", "@Override\n public void buildGrid(){\n for(int column=0; column<columns; column++){\n for(int row=0; row<rows; row++){\n grid[column][row] = \"[ ]\";\n }\n }\n }", "private ConfigurationHTMLPrinter doPropertyRow(final JPPFProperty<?> property) {\n println(\"<tr>\").incrementIndent();\n // property name\n doCell(deprecationStyle(property, convertForHTML(property.getName())));\n // default value\n Object value = property.getDefaultValue();\n if (AVAILABLE_PROCESSORS_NAMES.contains(property.getName())) value = \"available processors\";\n else if (\"jppf.resource.cache.dir\".equals(property.getName())) value = \"sys.property \\\"java.io.tmpdir\\\"\";\n else if (\"jppf.notification.offload.memory.threshold\".equals(property.getName())) value = \"80% of max heap size\";\n else if (value instanceof String[]) value = toString((String[]) value);\n else if (\"\".equals(value)) value = \"empty string\";\n final String val = ((value == null) ? \"null\" : convertForHTML(value.toString()));\n doCell(deprecationStyle(property, val));\n // aliases\n doCell(deprecationStyle(property, toString(property.getAliases())));\n // value type\n doCell(deprecationStyle(property, property.valueType().getSimpleName()));\n // description\n value = getPropertyDoc(property);\n doCell(value == null ? \"\" : convertDescription(value.toString()));\n return decrementIndent().println(\"</tr>\");\n }", "public void addRow () {\n CSVRow row = CSVRow.createEmptyLine(nbOfColumns, this);\n addRow(row);\n }", "public void addComponentsAndExpand(Component... components) {\n addComponents(components);\n\n if (getHeight() < 0) {\n setHeight(100, Unit.PERCENTAGE);\n }\n\n for (Component child : components) {\n child.setHeight(100, Unit.PERCENTAGE);\n setExpandRatio(child, 1);\n }\n }", "private void addGrid() {\n\n\t\tList<ColumnConfig> configs = new LinkedList<ColumnConfig>();\n\n\t\tColumnConfig column = new ColumnConfig(InheritedComponentInstanceSelModelData.PROPERTY_ID, messages\n\t\t\t.columnHeaderId(), 15);\n\t\tcolumn.setSortable(false);\n\t\tcolumn.setRenderer(idCellRenderer);\n\t\tconfigs.add(column);\n\n\t\tcolumn = new ColumnConfig(Constants.PROPERTY_KEY, Constants.EMPTY_STRING, 15);\n\t\tcolumn.setRenderer(gearCellRenderer);\n\t\tcolumn.setSortable(false);\n\t\tconfigs.add(column);\n\n\t\tcolumn = new ColumnConfig();\n\t\tcolumn.setId(Constants.PROPERTY_NAME);\n\t\tcolumn.setHeaderText(pmsMessages.columnHeaderName());\n\t\tcolumn.setWidth(COLUMN_NAME_WIDTH);\n\t\tconfigs.add(column);\n\n\t\tcolumn = new ColumnConfig();\n\t\tcolumn.setId(InheritedComponentInstanceSelModelData.PROPERTY_MODULE);\n\t\tcolumn.setHeaderText(pmsMessages.columnHeaderModule());\n\t\tcolumn.setWidth(COLUMN_MODULE_WIDTH);\n\t\tconfigs.add(column);\n\n\t\tcolumn = new ColumnConfig();\n\t\tcolumn.setId(InheritedComponentInstanceSelModelData.PROPERTY_CONFIGURATION);\n\t\tcolumn.setHeaderText(pmsMessages.columnHeaderConfiguration());\n\t\tcolumn.setWidth(COLUMN_CONFIGURATION_WIDTH);\n\t\tcolumn.setRenderer(new GridCellRenderer<InheritedComponentInstanceSelModelData>() {\n\n\t\t\tpublic Object render(InheritedComponentInstanceSelModelData model, String property, ColumnData config,\n\t\t\t\tint rowIndex, int colIndex, ListStore<InheritedComponentInstanceSelModelData> store,\n\t\t\t\tGrid<InheritedComponentInstanceSelModelData> grid) {\n\n\t\t\t\tString icon = null;\n\t\t\t\tString title = null;\n\t\t\t\tBoolean configuration = model.getDTO().getConfiguration();\n\t\t\t\tif (configuration == null) {\n\t\t\t\t\treturn \"\";\n\t\t\t\t} else if (configuration) {\n\t\t\t\t\ticon = Constants.OK_IMAGE;\n\t\t\t\t\ttitle = pmsMessages.titleComponentOverrideConfiguration();\n\t\t\t\t} else {\n\t\t\t\t\ticon = Constants.ERROR_IMAGE;\n\t\t\t\t\ttitle = pmsMessages.titleComponentInheritedConfiguration();\n\t\t\t\t}\n\t\t\t\treturn TEMPLATE_ICON_CELL.replaceAll(PATTERN_ICON, icon).replaceAll(PATTERN_TITLE, title);\n\t\t\t}\n\t\t});\n\t\tconfigs.add(column);\n\n\t\tcolumn = new ColumnConfig();\n\t\tcolumn.setId(InheritedComponentInstanceSelModelData.PROPERTY_DEPENDENCIES);\n\t\tcolumn.setHeaderText(pmsMessages.columnHeaderDependences());\n\t\tcolumn.setWidth(COLUMN_DEPENDENCIES_WIDTH);\n\t\tcolumn.setRenderer(new GridCellRenderer<InheritedComponentInstanceSelModelData>() {\n\n\t\t\tpublic Object render(InheritedComponentInstanceSelModelData model, String property, ColumnData config,\n\t\t\t\tint rowIndex, int colIndex, ListStore<InheritedComponentInstanceSelModelData> store,\n\t\t\t\tGrid<InheritedComponentInstanceSelModelData> grid) {\n\n\t\t\t\tString icon = null;\n\t\t\t\tString title = null;\n\t\t\t\tBoolean dependencies = model.getDTO().getDependencies();\n\t\t\t\tif (dependencies == null) {\n\t\t\t\t\treturn \"\";\n\t\t\t\t} else if (dependencies) {\n\t\t\t\t\ticon = Constants.OK_IMAGE;\n\t\t\t\t\ttitle = pmsMessages.titleComponentOverrideDependences();\n\t\t\t\t} else {\n\t\t\t\t\ticon = Constants.ERROR_IMAGE;\n\t\t\t\t\ttitle = pmsMessages.titleComponentInheritedDependences();\n\t\t\t\t}\n\t\t\t\treturn TEMPLATE_ICON_CELL.replaceAll(PATTERN_ICON, icon).replaceAll(PATTERN_TITLE, title);\n\t\t\t}\n\t\t});\n\t\tconfigs.add(column);\n\n\t\tColumnModel cm = new ColumnModel(configs);\n\n\t\tstore = new ListStore<InheritedComponentInstanceSelModelData>();\n\t\tstore.setStoreSorter((StoreSorter) storeSorter);\n\t\tstore.setSortField(ModuleInstanceSelModelData.PROPERTY_NAME);\n\n\t\tgrid = new Grid<InheritedComponentInstanceSelModelData>(\n\t\t\t(ListStore<InheritedComponentInstanceSelModelData>) store, cm);\n\t\tgrid.setSelectionModel(new GridSelectionModel<InheritedComponentInstanceSelModelData>());\n\t\tgrid.setAutoExpandColumn(InheritedComponentInstanceSelModelData.PROPERTY_MODULE);\n\t\tgrid.setLoadMask(true);\n\n\t\tGridView gridView = grid.getView();\n\t\tgridView.setForceFit(true);\n\n\t\tadd(grid);\n\t}", "public static void addRow(String[] arg0, String[] arg1) {\n tableModel.addRow(arg0, arg1);\n updateSummaryTable();\n inputModel.addRow(arg0[0], arg1.length / 2);\n updateInputTable();\n }", "public JComponent createFieldsCont() {\n \tJPanel namePanel = new JPanel(new SpringLayout());\n \t\n \tString[] labelStrings = {\n \t\t\t\"First Name: \",\n \t\t\t\"Last Name: \",\n \t\t\t\"Tribe Name: \"\n \t};\n \t\n \tcLabels = new JLabel[labelStrings.length];\n \tJComponent[] fields = new JComponent[labelStrings.length];\n \tint fieldNum = 0;\n \t\n \tfirstFieldC = new JTextField();\n \tfirstFieldC.setColumns(20);\n \tfields[fieldNum++] = firstFieldC;\n \t\n \tlastFieldC = new JTextField();\n \tlastFieldC.setColumns(20);\n \tfields[fieldNum++] = lastFieldC;\n \t\n \ttribeField = new JTextField();\n \ttribeField.setColumns(31);\n \tfields[fieldNum++] = tribeField;\n \t\n \tnamePanel.setOpaque(false);\n \t\n \t//Associate label/field pairs, add everything and lay it out\n \tfor(int i=0; i<labelStrings.length;i++) {\n \t\tcLabels[i] = new JLabel(labelStrings[i], JLabel.TRAILING);\n \t\tcLabels[i].setLabelFor(fields[i]);\n \t\tnamePanel.add(cLabels[i]);\n \t\tnamePanel.add(fields[i]); \t\t\n \t}\n \t\n \tSpringUtilities.makeCompactGrid(namePanel, labelStrings.length, 2, \n \t\t\t\t\t\t\t\t\tGAP, GAP, //init x,y\n \t\t\t\t\t\t\t\t\tGAP, GAP/2); //xpad, ypad\n \treturn namePanel; \t \t\n }", "private void addComponents() {\n gbc.anchor = GridBagConstraints.EAST;\n addComponent(lblName, 0, 0, 1);\n addComponent(lblDay, 0, 1, 1);\n addComponent(lblMonth, 0, 2, 1);\n addComponent(lblTime, 0, 5, 1);\n addComponent(lblDuration, 0, 6, 1);\n gbc.anchor = GridBagConstraints.WEST;\n addComponent(txtName, 1, 0, 1);\n addComponent(cmbDay, 1, 1, 1);\n addComponent(cmbMonth, 1, 2, 1);\n addComponent(radSelectTime, 1, 3, 1);\n addComponent(radAutoTime, 1, 4, 1);\n addComponent(cmbTime, 1, 5, 1);\n addComponent(cmbDuration, 1, 6, 1);\n gbc.anchor = GridBagConstraints.CENTER;\n addComponent(btnSubmit, 0, 7, 2);\n }", "protected void addMultiLinePropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors.add\n\t\t\t(createItemPropertyDescriptor\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n\t\t\t\t getResourceLocator(),\n\t\t\t\t getString(\"_UI_Widget_multiLine_feature\"),\n\t\t\t\t getString(\"_UI_PropertyDescriptor_description\", \"_UI_Widget_multiLine_feature\", \"_UI_Widget_type\"),\n\t\t\t\t WavePackage.Literals.WIDGET__MULTI_LINE,\n\t\t\t\t true,\n\t\t\t\t false,\n\t\t\t\t false,\n\t\t\t\t ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,\n\t\t\t\t null,\n\t\t\t\t null));\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\taddRow();\n\t\t\t}", "protected void layoutComponents() {\n double xOffset = 0;\n double yOffset = 0;\n\n final int numberOfColumns = 3;\n final int gap = 10;\n\n // add children\n int index = 0;\n while (index < operators.length) {\n for (int col = 0; col < numberOfColumns && index < operators.length; col++, index++) {\n final OperatorNode each = operators[index];\n if (each != null) {\n each.setOffset(xOffset + ((cellDim.width - each.getWidth()) / 2), yOffset + (cellDim.height - each.getHeight()) / 2);\n }\n xOffset += (cellDim.width + gap);\n }\n xOffset = 0;\n yOffset += cellDim.height + gap;\n }\n }", "public void add(String stg1, JComponent componente1, String stg2, JComponent componente2, JComponent componente3){\n\t\tGridBagConstraints cons = new GridBagConstraints();\n\t\tcons.fill = GridBagConstraints.BOTH; \n\t\tcons.insets = new Insets(4,4,4,4); \n\n\t\tcons.fill = GridBagConstraints.NONE;\n\t\tcons.anchor = GridBagConstraints.NORTHWEST;\n\t\tcons.weightx = 0; \n\t\tcons.gridwidth = 1; \n\t\tthis.getContentPane().add(new JLabel(stg1), cons); \n\n\t\tcons.weightx = 1; \n\t\tcons.gridwidth = 1; \n\t\tcons.fill = GridBagConstraints.BOTH; \n\t\tthis.getContentPane().add(componente1, cons); \n\n\t\tcons.fill = GridBagConstraints.NONE; \n\t\tcons.weightx = 0; \n\t\tcons.gridwidth = 1; \n\t\tthis.getContentPane().add(new JLabel(stg2), cons); \n\n\t\tcons.weightx = 1; \n\t\tcons.gridwidth = 1; \n\t\tcons.fill = GridBagConstraints.BOTH; \n\t\tthis.getContentPane().add(componente2, cons); \n\n\t\tcons.weightx = 0; \n\t\tcons.fill = GridBagConstraints.BOTH; \n\t\tcons.gridwidth = GridBagConstraints.REMAINDER; \n\t\tthis.getContentPane().add(componente3, cons); \n\t}", "public void addCompound(JPanel panel, JComponent c, int x, int y , int width, int height, int alignment)\n{\n\t// set the gridBagConstraints\n\tGridBagConstraints gc = new GridBagConstraints();\n\t// set the x-axis\n\tgc.gridx = x;\n\t// set the y-axis\n\tgc.gridy = y;\n\t// set the width of the component\n\tgc.gridwidth = width;\n\t// set the height of the component\n\tgc.gridheight = height;\n\t// the space between others (horizontally) is 100\n\tgc.weightx = 100.0;\n\t// the space between others (vertically) is 100\n\tgc.weighty = 100.0;\n\t// the space padding around each component\n\tgc.insets = new Insets(10,10,10,10);\n\t// the position to place the component\n\tgc.anchor = alignment;\n\t// stretch the object to fill the available space\n\tgc.fill = GridBagConstraints.NONE;\n\t// add it in the panel\n\tpanel.add(c,gc);\n}", "protected void add (Component component, int x, int y, int width, int height) {\n add(component,x,y,width,height,GridBagConstraints.BOTH,GridBagConstraints.NORTHWEST,0,0,0,0,0,0);\n }", "private String AddToProperty(String property, String propertyAdd)\n {\n \tString ret = \"\";\n \tif(property == null)\n \t\tret = propertyAdd;\n \telse\n \t\tret = property + \",\" + propertyAdd;\n \treturn ret;\n }", "public void append4Create(final StringBuilder _cmd)\n throws MatrixException\n {\n for (final PropertyDef property : this.properties) {\n _cmd.append(\" property \\\"\").append(AbstractTest.convertMql(property.getName())).append(\"\\\"\");\n if (property.getTo() != null) {\n property.getTo().create();\n _cmd.append(\" to \").append(property.getTo().getCI().getMxType()).append(\" \\\"\")\n .append(AbstractTest.convertMql(property.getTo().getName())).append(\"\\\"\");\n if (property.getTo().getCI() == AbstractTest.CI.UI_TABLE) {\n _cmd.append(\" system\");\n }\n }\n if (property.getValue() != null) {\n _cmd.append(\" value \\\"\").append(AbstractTest.convertMql(property.getValue())).append(\"\\\"\");\n }\n }\n }", "public void addComponents(){\n add(spelerIDLabel);\n add(typeLabel);\n add(codeLabel);\n add(heeftBetaaldLabel);\n\n add(spelerIDField);\n add(typeField);\n add(codeField);\n add(heeftBetaaldField);\n\n add(klaarButton);\n add(terugButton);\n\n }", "public void buildRows(View view, String rowTemplate, UifFormBase model) {\r\n if (StringUtils.isBlank(rowTemplate)) {\r\n return;\r\n }\r\n\r\n rowTemplate = StringUtils.removeEnd(rowTemplate, \",\");\r\n rowTemplate = rowTemplate.replace(\"\\n\", \"\");\r\n rowTemplate = rowTemplate.replace(\"\\r\", \"\");\r\n\r\n StringBuffer rows = new StringBuffer();\r\n List<Object> collectionObjects = ObjectPropertyUtils.getPropertyValue(model, bindingInfo.getBindingPath());\r\n\r\n //uncheck any checked checkboxes globally for this row\r\n rowTemplate = rowTemplate.replace(\"checked=\\\"checked\\\"\", \"\");\r\n\r\n //init token patterns\r\n Pattern idPattern = Pattern.compile(ID_TOKEN + \"(.*?)\" + ID_TOKEN);\r\n Pattern expressionPattern = Pattern.compile(EXPRESSION_TOKEN + \"(.*?)\" + EXPRESSION_TOKEN);\r\n\r\n ExpressionEvaluator expressionEvaluator = ViewLifecycle.getExpressionEvaluator();\r\n expressionEvaluator.initializeEvaluationContext(model);\r\n\r\n int lineIndex = 0;\r\n for (Object obj : collectionObjects) {\r\n //add line index to all ids\r\n String row = idPattern.matcher(rowTemplate).replaceAll(\"$1\" + UifConstants.IdSuffixes.LINE + lineIndex);\r\n\r\n //create the expanded context\r\n Map<String, Object> expandedContext = new HashMap<String, Object>();\r\n expandedContext.put(UifConstants.ContextVariableNames.LINE, obj);\r\n expandedContext.put(UifConstants.ContextVariableNames.INDEX, lineIndex);\r\n expandedContext.put(UifConstants.ContextVariableNames.VIEW, view);\r\n\r\n currentColumnValue = \"\";\r\n\r\n int itemIndex = 0;\r\n for (Component item : this.getItems()) {\r\n //determine original id for this component\r\n String originalId = initialComponentIds.get(itemIndex);\r\n\r\n //special DataField handling\r\n row = handleDataFieldInRow(item, obj, row, lineIndex, originalId);\r\n\r\n //special InputField handling\r\n row = handleInputFieldInRow(item, obj, row, lineIndex, originalId);\r\n\r\n //add item context\r\n if (item.getContext() != null) {\r\n expandedContext.putAll(item.getContext());\r\n }\r\n\r\n //evaluate expressions found by the pattern\r\n row = evaluateAndReplaceExpressionValues(row, lineIndex, model, expandedContext, expressionPattern,\r\n expressionEvaluator);\r\n\r\n if (currentColumnValue == null) {\r\n currentColumnValue = \"\";\r\n }\r\n\r\n row = row.replace(SORT_VALUE + itemIndex + A_TOKEN, currentColumnValue);\r\n\r\n itemIndex++;\r\n }\r\n\r\n // get rowCss class\r\n boolean isOdd = lineIndex % 2 == 0;\r\n String rowCss = KRADUtils.generateRowCssClassString(conditionalRowCssClasses, lineIndex, isOdd,\r\n expandedContext, expressionEvaluator);\r\n\r\n row = row.replace(\"\\\"\", \"\\\\\\\"\");\r\n row = row.replace(ROW_CLASS, rowCss);\r\n row = \"{\" + row + \"},\";\r\n\r\n //special render property expression handling\r\n row = evaluateRenderExpressions(row, lineIndex, model, expandedContext, expressionEvaluator);\r\n\r\n //append row\r\n rows.append(row);\r\n lineIndex++;\r\n }\r\n\r\n StringBuffer tableToolsColumnOptions = new StringBuffer(\"[\");\r\n for (int index = 0; index < this.getItems().size(); index++) {\r\n String colOptions = richTable.constructTableColumnOptions(index, true, false, String.class, null);\r\n tableToolsColumnOptions.append(colOptions + \" , \");\r\n }\r\n\r\n String aoColumnDefs = StringUtils.removeEnd(tableToolsColumnOptions.toString(), \" , \") + \"]\";\r\n Map<String, String> rtTemplateOptions = richTable.getTemplateOptions();\r\n \r\n if (rtTemplateOptions == null) {\r\n richTable.setTemplateOptions(rtTemplateOptions = new HashMap<String, String>());\r\n }\r\n \r\n rtTemplateOptions.put(UifConstants.TableToolsKeys.AO_COLUMN_DEFS, aoColumnDefs);\r\n\r\n // construct aaData option to set data in dataTable options (speed enhancement)\r\n String aaData = StringUtils.removeEnd(rows.toString(), \",\");\r\n aaData = \"[\" + aaData + \"]\";\r\n aaData = aaData.replace(KRADConstants.QUOTE_PLACEHOLDER, \"\\\"\");\r\n\r\n //set the aaData option on datatable for faster rendering\r\n rtTemplateOptions.put(UifConstants.TableToolsKeys.AA_DATA, aaData);\r\n\r\n //make sure deferred rendering is forced whether set or not\r\n rtTemplateOptions.put(UifConstants.TableToolsKeys.DEFER_RENDER,\r\n UifConstants.TableToolsValues.TRUE);\r\n }", "public static void rowPlus() {\n\t\tnRow++;\n\t\tbuildBoard();\n\t\tfor (int c = 0; c < nCol; c++)\n\t\t\tboard[c][nRow - 1] = pItem.getItem(rnd[c][nRow - 1] = random.nextDouble());\n\t\tRightPanel.updateTextBoardInfo();\n\t}", "public JComponent createFieldsPlayer() {\n \tJPanel namePanel = new JPanel(new SpringLayout());\n \t\n \tString[] labelStrings = {\n// \t\t\t\"User ID: \",\n \t\t\t\"First Name: \",\n \t\t\t\"Last Name: \" \t\t\t\n \t};\n \t\n \tpLabels = new JLabel[labelStrings.length];\n \tJComponent[] fields = new JComponent[labelStrings.length];\n \tint fieldNum = 0;\n \t\n \tfirstFieldP = new JTextField();\n \tfirstFieldP.setColumns(20);\n \tfields[fieldNum++] = firstFieldP;\n \t\n \tlastFieldP = new JTextField();\n \tlastFieldP.setColumns(20);\n \tfields[fieldNum++] = lastFieldP;\n \t\n \tnamePanel.setOpaque(false);\n \t\n \t//Associate label/field pairs, add everything and lay it out\n \tfor(int i=0; i<labelStrings.length;i++) {\n \t\tpLabels[i] = new JLabel(labelStrings[i], JLabel.TRAILING);\n \t\tpLabels[i].setLabelFor(fields[i]);\n \t\tnamePanel.add(pLabels[i]);\n \t\tnamePanel.add(fields[i]);\n \t\t\n \t\t// for each field, create a spinner for every entry added\n \t\t/****** To Do ********/\n \t}\n \tSpringUtilities.makeCompactGrid(namePanel, labelStrings.length, 2, \n \t\t\t\t\t\t\t\t\tGAP, GAP, //init x,y\n \t\t\t\t\t\t\t\t\tGAP, GAP/2); //xpad, ypad\n \treturn namePanel; \t \t\n }", "private String addFieldValuesToRow(String row, MapWritable mapw, String columnName) {\n Object valueObj = (Object) mapw.get(new Text(columnName));\n row += valueObj.toString() + \"|\";\n return row;\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\taddRow();\n\t\t\t}", "private void storComponentProperties(){\n\t\t//IPreferenceStore prefStore = JFacePreferences.getPreferenceStore();\n\t\t//PreferenceStore prefStore = mOyster2.getPreferenceStore();\n\t\tProperties mprop = mOyster2.getProperties();\n\t\tint count = mprop.getInteger(Constants.NUMBER_OF_COLUMNS);\n\t\tfor(int i=0; i<count; i++){\n\t\t\tmprop.setString(Constants.COLUMN_TYPE+i, mprop.getDefaultString(Constants.COLUMN_TYPE+i));\n\t\t\tmprop.setString(Constants.COLUMN_NAME+i, mprop.getDefaultString(Constants.COLUMN_NAME+i));\n\t\t\tmprop.setString(Constants.COLUMN_WIDTH+i, mprop.getDefaultString(Constants.COLUMN_WIDTH+i));\n\t\t\t/*\n\t\t\tprefStore.setToDefault(Constants.COLUMN_TYPE+i);\n\t\t\tprefStore.setToDefault(Constants.COLUMN_NAME+i);\n\t\t\tprefStore.setToDefault(Constants.COLUMN_WIDTH+i);\n\t\t\t*/\n\t\t}\n\t\tmprop.setString(Constants.NUMBER_OF_COLUMNS, \"\"+columns.size());\n\t\tfor(int i=0; i<columns.size(); i++){\n\t\t\tResultViewerColumnInfo colInf = getColumnInfo(i);\n\t\t\tmprop.setString(Constants.COLUMN_NAME + i, colInf.getColumnName());\n\t\t\tmprop.setString(Constants.COLUMN_TYPE + i, colInf.getColumnType());\n\t\t\tmprop.setString(Constants.COLUMN_WIDTH + i, \"\"+colInf.getWidth());\n\t\t}\n\t\ttry{\n\t\t\tmprop.storeOn();\n\t\t\t//prefStore.save();\n\t\t}\n\t\tcatch(Exception IO){\n\t\t\tSystem.out.println(\"couldnt save properties\");\n\t\t}\n\t\t\n\t}", "private void addNewLine(String timeAndDate, int steps) {\n\n String stepsString = Integer.toString(steps);\n\n TableRow newRow = new TableRow(this);\n\n // Create the Left hand side\n TextView left = new TextView(this);\n left.setText(timeAndDate);\n left.setGravity(Gravity.START);\n left.setPadding(10,5, 10,5);\n left.setTextSize(15);\n\n // Create the right hand side\n TextView right = new TextView(this);\n right.setText(stepsString);\n right.setGravity(Gravity.END);\n right.setPadding(10,5,10,5);\n right.setTextSize(15);\n\n // Add the TextView Components to the row\n newRow.addView(left);\n newRow.addView(right);\n\n // Add row to the TableLayout\n table.addView(newRow,new TableLayout.LayoutParams(TableLayout.LayoutParams.WRAP_CONTENT,\n TableLayout.LayoutParams.WRAP_CONTENT));\n\n // Create Line to separate rows and add to end of the new row\n View line = new View(this);\n line.setLayoutParams(new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT,1));\n line.setBackgroundColor(Color.BLACK);\n table.addView(line);\n\n // Scroll to the newly added row\n scrollTo(newRow);\n }", "public void fillPropertyArray()\n \t{\n \t\tsuper.fillPropertyArray();\n \t\tsuper.fillPropertyArray( gui );\n \t}", "private void addComponent(Component comp, int x, int y, int width) {\n if (comp.getClass().equals(JButton.class)) {\n gbc.fill = GridBagConstraints.HORIZONTAL;\n }\n gbc.gridx = x;\n gbc.gridy = y;\n gbc.gridwidth = width;\n frame.add(comp, gbc);\n }", "private void designComponents() \n\t{\n\t\tsetLayout(new BoxLayout(this, BoxLayout.Y_AXIS));\n\t\tsetBorder(BorderFactory.createLineBorder(Color.gray));\n\t}", "public void addRow() {\n tableModel.insertRow(this.getRowCount(), new String[]{});\n this.setModel(tableModel);\n\n }", "public void addComponent(JComponent component, int row, int col, int width, int height, int anchor, int fill) {\n \n constraints.gridx = col;\n constraints.gridy = row;\n constraints.gridwidth = width;\n constraints.gridheight = height;\n constraints.anchor = anchor;\n double weightx = 0.0;\n double weighty = 0.0;\n \n // only use extra horizontal or vertical space if component\n // spans more than one column and/or row.\n if(width > 1) weightx = 1.0;\n if(height > 1) weighty = 1.0;\n \n switch(fill) {\n case GridBagConstraints.HORIZONTAL:\n constraints.weightx = weightx;\n constraints.weighty = 0.0;\n break;\n case GridBagConstraints.VERTICAL:\n constraints.weighty = weighty;\n constraints.weightx = 0.0;\n break;\n case GridBagConstraints.BOTH:\n constraints.weightx = weightx;\n constraints.weighty = weighty;\n break;\n case GridBagConstraints.NONE:\n constraints.weightx = 0.0;\n constraints.weighty = 0.0;\n break;\n default:\n break;\n }\n constraints.fill = fill;\n add(component, constraints);\n }", "private void buildRow(int x, int y, int rowBricks) {\r\n\t\tfor (int i = 0; i < rowBricks; i++) {\r\n\t\t\tadd(makeBrick(x, y));\r\n\t\t\tx += BRICK_WIDTH;\r\n\t\t}\r\n\t}", "protected void add (Component component, int x, int y, int width, int height,int fill, int anchor,int ipadx, int ipady, double weightx, double weighty, int top, int left, int bottom, int right) {\n GridBagConstraints c = new GridBagConstraints();\n c.gridx = x;\n c.gridy = y;\n c.gridwidth = width;\n c.gridheight = height;\n c.fill = fill;\n c.anchor = anchor;\n c.anchor = anchor;\n c.weightx = weightx;\n c.weighty = weighty;\n c.ipadx=ipadx;\n c.ipady=ipady;\n c.insets = new Insets(top,left,bottom,right);\n ((GridBagLayout)this.getLayout()).setConstraints(component,c);\n this.add(component);\n }", "private void createRow( String name )\n {\n logger.log(Level.FINE, \"Creating Row\");\n\n JLabel label = new JLabel( name, SwingConstants.RIGHT );\n if (!isHeadless)\n label.setFont(new Font(\"Monospaced\", Font.PLAIN, 15));\n label.setHorizontalAlignment(SwingConstants.CENTER);\n label.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.DARK_GRAY));\n if (name.equals(PROFIT_LOSS))\n bottomPanel.add(label, BorderLayout.NORTH);\n else\n leftPanel.add(label);\n\n JTextField field = new JTextField( 30 );\n field.setEditable(false);\n if (!isHeadless)\n field.setFont(new Font(\"Serif\", Font.BOLD, 30));\n field.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.DARK_GRAY));\n field.setHorizontalAlignment(SwingConstants.CENTER);\n if (name.equals(PROFIT_LOSS)) {\n if (!isHeadless)\n field.setFont(new Font(\"Monospaced\", Font.BOLD, 55));\n bottomPanel.add(field, BorderLayout.CENTER);\n } else\n rightPanel.add(field);\n\n fields.put(name, field);\n\n logger.log(Level.FINE, \"Created Row\");\n\n }", "public JPanel createPanel(List<AbstractFieldEditor> editorList,int cols) {\n\r\n JPanel panel=new JPanel();\r\n\r\n panel.setLayout(new GridBagLayout());\r\n \r\n int row = 0;\r\n\r\n int col = 0;\r\n\r\n for (int i = 0; i < editorList.size(); i++) {\r\n\r\n AbstractFieldEditor comp = editorList.get(i);\r\n\r\n if (comp.isVisible()) {\r\n\r\n if (comp instanceof NewLineFieldEditor) {\r\n row++;\r\n col = 0;\r\n continue;\r\n } else if (comp instanceof TextAreaFieldEditor) {\r\n // 转到新的一行\r\n row++;\r\n col = 0;\r\n JLabel label = new JLabel(getLabelText(comp));\r\n if (comp.getMaxContentSize() != 9999) {\r\n label.setText(comp.getName() + \"(\"+ comp.getMaxContentSize() + \"字内)\" + \"*\");\r\n }\r\n comp.setPreferredSize(new Dimension(150, comp.getOccRow() * 26));\r\n \r\n panel.add(label, new GridBagConstraints(col,row, 1, 1, 1.0, 1.0, GridBagConstraints.EAST,GridBagConstraints.NONE, new Insets(4, 0, 4, 4), 0,0));\r\n\r\n panel.add(comp, new GridBagConstraints(col + 1,row, comp.getOccCol(), comp.getOccRow(), 1.0, 1.0,GridBagConstraints.WEST,GridBagConstraints.HORIZONTAL, new Insets(4, 0, 4,4), 0, 0));\r\n\r\n // 将当前所占的行空间偏移量计算上\r\n row += comp.getOccRow();\r\n col = 0;\r\n\r\n continue;\r\n }\r\n\r\n JLabel label = new JLabel(comp.getName());\r\n\r\n comp.setPreferredSize(new Dimension(200, 23));\r\n\r\n panel.add(label, new GridBagConstraints(col, row, 1,1, 1.0, 1.0, GridBagConstraints.EAST,GridBagConstraints.NONE, new Insets(5, 0, 5, 5), 0, 0));\r\n\r\n panel.add(comp, new GridBagConstraints(col + 1, row,1, 1, 1.0, 1.0, GridBagConstraints.WEST,GridBagConstraints.HORIZONTAL, new Insets(5, 0, 5, 5),0, 0));\r\n\r\n if (col == cols * 2 - 2) {\r\n row++;\r\n col = 0;\r\n } else {\r\n col += 2;\r\n }\r\n }\r\n\r\n }\r\n return panel;\r\n }", "public void addField()\n {\n DefaultMutableTreeNode node = (DefaultMutableTreeNode) availableFieldsComp.getTree().getLastSelectedPathComponent();\n if (node == null || !node.isLeaf() || !(node.getUserObject() instanceof DataObjDataFieldWrapper) )\n {\n return; // not really a field that can be added, just empty or a string\n }\n\n Object obj = node.getUserObject();\n if (obj instanceof DataObjDataFieldWrapper)\n {\n DataObjDataFieldWrapper wrapper = (DataObjDataFieldWrapper) obj;\n String sep = sepText.getText();\n if (StringUtils.isNotEmpty(sep))\n {\n try\n {\n DefaultStyledDocument doc = (DefaultStyledDocument) formatEditor.getStyledDocument();\n if (doc.getLength() > 0)\n {\n doc.insertString(doc.getLength(), sep, null);\n }\n }\n catch (BadLocationException ble) {}\n \n }\n insertFieldIntoTextEditor(wrapper);\n setHasChanged(true);\n }\n }", "public IRow addToLayout(DesignGridLayout layout, int colSpan) {\n JPanel p = new JPanel();\r\n p.setLayout(new BorderLayout());\r\n//\t\tp.add(label, BorderLayout.LINE_START);\r\n p.add(txtPath, BorderLayout.CENTER);\r\n p.add(btnBrowse, BorderLayout.LINE_END);\r\n return layout.row().grid(label).add(p);\r\n }", "private void addComponentToMainLayout(){\n\n // RelativeLayout params were very useful here\n // the addRule method is the key to arrange the components properly\n RelativeLayout.LayoutParams componentB_Params = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);\n componentB_Params.addRule(RelativeLayout.RIGHT_OF, this.tableA.getId());\n\n RelativeLayout.LayoutParams componentC_Params = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);\n componentC_Params.addRule(RelativeLayout.BELOW, this.tableA.getId());\n\n RelativeLayout.LayoutParams componentD_Params = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);\n componentD_Params.addRule(RelativeLayout.RIGHT_OF, this.scrollViewC.getId());\n componentD_Params.addRule(RelativeLayout.BELOW, this.horizontalScrollViewB.getId());\n\n // 'this' is a relative layout,\n // we extend this table layout as relative layout as seen during the creation of this class\n this.addView(this.tableA);\n this.addView(this.horizontalScrollViewB, componentB_Params);\n this.addView(this.scrollViewC, componentC_Params);\n this.addView(this.scrollViewD, componentD_Params);\n\n }", "private void AdditionalSetUpTable() {\n TableColumnModel stuffcm = stuffTable.getColumnModel();\n \n //update: 22 juni 2006 add column code and modal so we can remove them in propertiesComboBox\n //ActionPerformed when we click \"Additonal Properties\"\n //we have to reference name column so we can put category and code column\n //in the left of the name column\n category = stuffcm.getColumn(0);\n code = stuffcm.getColumn(1);\n \n modal = stuffcm.getColumn(3);\n sale = stuffcm.getColumn(4);\n quantity = stuffcm.getColumn(5);\n \n //update: 2 july 2006, add two column; s = t, Third T\n s_t = stuffcm.getColumn(17);\n third = stuffcm.getColumn(18);\n \n //make it middle\n class MiddleCellEditor extends DefaultTableCellRenderer {\n MiddleCellEditor() {\n super();\n setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n }\n }\n quantity.setCellRenderer( new MiddleCellEditor() );\n \n length = stuffcm.getColumn(8);\n length.setCellRenderer( new MiddleCellEditor() );\n width = stuffcm.getColumn(9);\n width.setCellRenderer( new MiddleCellEditor() );\n height = stuffcm.getColumn(10);\n height.setCellRenderer( new MiddleCellEditor() );\n volume = stuffcm.getColumn(11);\n volume.setCellRenderer( new MiddleCellEditor() );\n primary = stuffcm.getColumn(12);\n measurement = stuffcm.getColumn(13);\n measurement.setCellRenderer( new MiddleCellEditor() );\n secondary = stuffcm.getColumn(14);\n produceritem = stuffcm.getColumn(15);\n selleritem = stuffcm.getColumn(16);\n //index column\n TableColumn stuffcol = stuffcm.getColumn(7);\n stuffTable.removeColumn(stuffcol);\n //comment column\n stufftc = stuffTable.getColumnModel().getColumn(6);\n if(!displayComment.isSelected())\n stuffTable.removeColumn(stufftc);\n \n //remove all column first for the first time\n stuffTable.removeColumn(modal);\n stuffTable.removeColumn(sale);\n stuffTable.removeColumn(quantity);\n stuffTable.removeColumn(code);\n stuffTable.removeColumn(category);\n stuffTable.removeColumn(s_t);\n stuffTable.removeColumn(third);\n \n propertiesComboBoxActionPerformed(null);\n \n //additional setup for \"index\" and \"comment\" column on employeeTable\n TableColumnModel employeecm = employeeTable.getColumnModel();\n //index column\n TableColumn employeecol = employeecm.getColumn(9);\n employeeTable.removeColumn(employeecol);\n //comment column\n employeetc = employeecm.getColumn(8);\n if(!displayCommentEmployee.isSelected())\n employeeTable.removeColumn(employeetc);\n \n //additional setup for sellerTable\n TableColumnModel sellercm = sellerTable.getColumnModel();\n //index column\n TableColumn sellercol = sellercm.getColumn(4);\n sellerTable.removeColumn(sellercol);\n //comment column\n sellertc = sellercm.getColumn(3);\n if(!displayCommentSeller.isSelected())\n sellerTable.removeColumn(sellertc);\n \n //additional setup for salesmanTable\n TableColumnModel salesmancm = salesmanTable.getColumnModel();\n //index column\n TableColumn salesmancol = salesmancm.getColumn(8);\n salesmanTable.removeColumn(salesmancol);\n //comment column\n salesmantc = salesmancm.getColumn(7);\n if(!displayCommentSeller.isSelected())\n salesmanTable.removeColumn(salesmantc);\n \n //additional setup for ProducerTable\n TableColumnModel producercm = ProducerTable.getColumnModel();\n //index column\n TableColumn producercol = producercm.getColumn(4);\n ProducerTable.removeColumn(producercol);\n //comment column\n producertc = producercm.getColumn(3);\n if(!DisplayCommentProducer.isSelected())\n ProducerTable.removeColumn(producertc);\n \n //additional setup for customerTable\n TableColumnModel customercm = customerTable.getColumnModel();\n //index column\n TableColumn customercol = customercm.getColumn(4);\n customerTable.removeColumn(customercol);\n //comment column\n customertc = customercm.getColumn(3);\n if(!displayCommentCustomer.isSelected())\n customerTable.removeColumn(customertc);\n \n //additional setup for commisionerTable\n TableColumnModel commisionercm = commisionerTable.getColumnModel();\n //index column\n TableColumn commisionercol = commisionercm.getColumn(4);\n commisionerTable.removeColumn(commisionercol);\n //comment columnlist\n commisionertc = commisionercm.getColumn(3);\n if(!displayCommentCommisioner.isSelected())\n commisionerTable.removeColumn(commisionertc);\n \n //additional setup for debtcreditTable\n// TableColumn debtcreditcol = DebtCreditTable.getColumnModel().getColumn(5);\n// DebtCreditTable.removeColumn(debtcreditcol);\n \n //additional setup for debt table\n TableColumn debtcol = DebtTable.getColumnModel().getColumn(5);\n DebtTable.removeColumn(debtcol);\n \n //additional setup for sale ( edit trans ) table\n TableColumn salecol = SaleTable.getColumnModel().getColumn(6);\n SaleTable.removeColumn(salecol);\n \n //additional setup for purchase ( edit trans ) table\n TableColumn purchasecol = PurchaseTable.getColumnModel().getColumn(6);\n PurchaseTable.removeColumn(purchasecol);\n \n //additional setup for credit table\n TableColumn creditcol = CreditTable.getColumnModel().getColumn(5);\n CreditTable.removeColumn(creditcol);\n \n //additional setup for warehouseTB\n TableColumn warehouseindexcol = WarehouseTB.getColumnModel().getColumn(3);\n WarehouseTB.removeColumn(warehouseindexcol);\n \n //additional setup for containerTB\n TableColumn containerindexcol = ContainerTB.getColumnModel().getColumn(4);\n ContainerTB.removeColumn(containerindexcol);\n }", "public void actionPerformed(ActionEvent e) {\n model.addRow();\n }", "TableRow componentBTableRow(){\n\n TableRow componentBTableRow = new TableRow(this.context);\n int headerFieldCount = this.headerObjects.size();\n\n TableRow.LayoutParams params = new TableRow.LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.MATCH_PARENT);\n// params.setMargins(-1, 0, 0, 0);\n\n for(int x=0; x<(headerFieldCount-1); x++){\n View view = headerObjects.get(x+1);\n\n componentBTableRow.addView(view, params);\n }\n\n\n return componentBTableRow;\n }", "private void addCell( String value ) {\n if ( readCol++ == 0 ) {\n rows.add( new ArrayList( ncol ) );\n }\n ((List) rows.get( rows.size() - 1 )).add( value );\n }", "public void addFilledComponent(JComponent component, int row, int col) {\n addComponent(component, row, col, C_WIDTH, C_HEIGHT, C_WEST, C_HORZ);\n }", "private void createComponentForButtons(Composite section)\n {\n createRowForNewStyleButton(section);\n createRowForNewRegexButton(section);\n createRowForNewColumnButton(section);\n createRowForDeleteButton(section);\n createRowForDeleteAllButton(section);\n }", "public AssociationEndsPropertyPanel(PropertiesPanel propertiesPanel) {\n super(Collections.singletonList(PropertyKind.ASSOCIATION_ENDS_LINK), propertiesPanel);\n\n JPanel panel = retrievePanel();\n Util.setFixedSize(panel, 230, 50);\n\n panel.setLayout(new GridBagLayout());\n\n // initializes the two labels for the two association ends\n // the foreground colors are set to BLUE and the cursors are set to hand cursor\n labelAssociationEnd1 = new JLabel();\n labelAssociationEnd1.setForeground(new Color(4, 87, 162));\n labelAssociationEnd1.setCursor(new Cursor(Cursor.HAND_CURSOR));\n labelAssociationEnd2 = new JLabel();\n labelAssociationEnd2.setForeground(new Color(4, 87, 162));\n labelAssociationEnd2.setCursor(new Cursor(Cursor.HAND_CURSOR));\n\n panel.setBorder(BorderFactory.createTitledBorder(\"Association Ends\"));\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 constraints.insets = new Insets(-5, 40, 0, 0);\n panel.add(labelAssociationEnd1, constraints);\n constraints.gridx = 1;\n constraints.insets = new Insets(-5, 0, 0, 0);\n panel.add(labelAssociationEnd2, constraints);\n\n // Creates an MouseListener instance and assign it to the two labels for association ends\n MouseListener listener = new MouseAdapter() {\n /**\n * <p>\n * Invoked when the mouse has been clicked on a component.\n * </p>\n *\n * <p>\n * When the <code>JLabel</code> is clicked, this method will be invoked\n * </p>\n *\n * @param e an event which indicates that a mouse action occurred in a component\n */\n public void mouseClicked(MouseEvent e) {\n JLabel label = (JLabel) e.getSource();\n\n // The logic will be executed only when all the configured model elements have\n // the same first and second association ends\n if (label.getText().length() > 0) {\n Association association = (Association) getConfiguredModelElements().get(0);\n List<AssociationEnd> ends = association.getConnections();\n\n if (label == labelAssociationEnd1) {\n // configure the panel with the first association end\n if (ends.size() > 0) {\n //getPropertiesPanel().fireSelectionChangeEvent(association);\n getPropertiesPanel().configurePanel(ends.get(0));\n getPropertiesPanel().fireSelectionChangeEvent(ends.get(0));\n\n // set it visible back, since listeners may hide it\n getPropertiesPanel().setVisible(true);\n }\n } else {\n // configure the panel with the second association end\n if (ends.size() > 1) {\n getPropertiesPanel().configurePanel(ends.get(1));\n getPropertiesPanel().fireSelectionChangeEvent(ends.get(1));\n\n // set it visible back, since listeners may hide it\n getPropertiesPanel().setVisible(true);\n }\n }\n }\n }\n };\n\n // install the mouse listener to the two labels\n labelAssociationEnd1.addMouseListener(listener);\n labelAssociationEnd2.addMouseListener(listener);\n }", "private void addComponentsToLayout() {\n//\t\tAdd the \"Add project\" button to the list\n\t\taddComponent(addProject);\n\t\t\n//\t\tIf the user don't have any projects, add the \"No projects\" label instead of the list\n\t\tif(projectRows.size() == 0){\n\t\t\taddComponent(new Label(T.get(\"LABEL_NO_PROJECTS_EXISTS\")));\n\t\t}\n//\t\tOtherwise add all project rows to the list\n\t\telse{\n\t\t\tfor (ProjectRow projectRow : projectRows) {\n\t\t\t\taddComponent(projectRow);\n\t\t\t}\n\t\t}\n\t\t\n\t\tmainView.selectProject();\n\t}", "void addComponents();", "void buildRowComposite(int rowNumber)\n {\n RowComposite rowComposite = new RowComposite(rowNumber);\n compositeRowStack.push(rowComposite);\n }", "public void addComponent(Component c) {\n for (Component C : components) {\n if (c.getClass().equals(C.getClass())) {\n return;\n }\n }\n components.add(c);\n c.setObject(this);\n }", "public HBox collarLine(ComboBox<String> comboCollar)\n {\n HBox collarLine = new HBox(5);\n collarLine.getChildren().addAll(new Label(\"Colar: \"), comboCollar);\n collarLine.setAlignment(Pos.BASELINE_LEFT);\n\n return collarLine; \n }", "private static Element createExtendedItemListProp(ReportDesigner reportDesigner){\r\n\t\tElement listPropertyNode = doc.createElement(\"list-property\");\r\n\t\tlistPropertyNode.setAttribute(ReportDesigner.ATTRIBUTE_NAME_NAME,\"boundDataColumns\");\r\n\r\n\t\tList<ReportColumn> reportColumns = reportDesigner.getReportColumns();\r\n\r\n\t\tfor(ReportColumn col : reportColumns){\r\n\t\t\tElement structureNode = doc.createElement(ReportDesigner.NODE_NAME_STRUCTURE);\r\n\t\t\tlistPropertyNode.appendChild(structureNode);\r\n\r\n\t\t\tElement propertyNode = doc.createElement(ReportDesigner.NODE_NAME_PROPERTY);\r\n\t\t\tpropertyNode.setAttribute(ReportDesigner.ATTRIBUTE_NAME_NAME,ReportDesigner.ATTRIBUTE_VALUE_NAME);\r\n\t\t\tpropertyNode.appendChild(doc.createTextNode(col.getName()));\r\n\t\t\tstructureNode.appendChild(propertyNode);\r\n\r\n\t\t\tElement expressionNode = doc.createElement(ReportDesigner.NODE_NAME_EXPRESSION);\r\n\t\t\texpressionNode.setAttribute(ReportDesigner.ATTRIBUTE_NAME_NAME,ReportDesigner.ATTRIBUTE_VALUE_EXPRESSION);\r\n\t\t\texpressionNode.appendChild(doc.createTextNode(\"dataSetRow[\\\"\"+col.getName()+\"\\\"]\"));\r\n\t\t\tstructureNode.appendChild(expressionNode);\r\n\r\n\t\t\tpropertyNode = doc.createElement(ReportDesigner.NODE_NAME_PROPERTY);\r\n\t\t\tpropertyNode.setAttribute(ReportDesigner.ATTRIBUTE_NAME_NAME,\"dataType\");\r\n\t\t\tpropertyNode.appendChild(doc.createTextNode(ReportDesigner.fromXsd2ReportType(col.getDataType())));\r\n\t\t\tstructureNode.appendChild(propertyNode);\r\n\t\t}\r\n\r\n\t\treturn listPropertyNode;\r\n\t}", "default void append(QueryCursor cursor, String... templateProperties){\n int i = 0, len = templateProperties.length;\n for (; i < len; i++) {\n String propertyName = templateProperties[i];\n String value = null;\n try {\n value = cursor.getString(propertyName);\n }catch (Throwable t){\n logger.error(\"according column name to result set to get column value find a fail, {}\", t);\n }\n if(StringUtils.isEmpty(value)){\n value = \"\";\n }\n append(propertyName, value);\n builder().append(\",\");\n }\n }", "@Override\r\n\tpublic void addRow(Object[] rowData) {\r\n\t\ttry{\r\n\t\t\tPersona newRecord = new Persona();\r\n\t\t\tnewRecord.setNome((String)rowData[0]);\r\n\t\t\tnewRecord.setCognome((String)rowData[1]);\r\n\t\t\tnewRecord.setTelefono((String)rowData[2]);\r\n\t\t\tnewRecord.setIndirizzo((String)rowData[3]);\r\n\t\t\tnewRecord.setEta(Integer.parseInt((String)rowData[4]));\r\n\t\t\tlista.create(newRecord);\r\n\t\t\tsuper.addRow(rowData);\r\n\t\t}\r\n\t\tcatch (NumberFormatException nfe) {\r\n\t\t\tJOptionPane.showMessageDialog(null, NFE_MESSAGE);\r\n\t\t}\r\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n jLabel2 = new javax.swing.JLabel();\n jButton1 = 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 jTextField5 = new javax.swing.JTextField();\n jTextField6 = new javax.swing.JTextField();\n jTextField7 = new javax.swing.JTextField();\n jTextField8 = new javax.swing.JTextField();\n jTextField9 = new javax.swing.JTextField();\n jTextField10 = new javax.swing.JTextField();\n jTextField11 = new javax.swing.JTextField();\n jMenuBar1 = new javax.swing.JMenuBar();\n jMenu1 = new javax.swing.JMenu();\n jMenuItem1 = new javax.swing.JMenuItem();\n jMenuItem2 = new javax.swing.JMenuItem();\n jMenu2 = new javax.swing.JMenu();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBackground(new java.awt.Color(255, 255, 204));\n\n jLabel1.setText(\"Ajout tuple de la table :\");\n\n jButton1.setText(\"Inserer tuples\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jTextField1.setMinimumSize(new java.awt.Dimension(20, 20));\n\n jTextField2.setMinimumSize(new java.awt.Dimension(20, 20));\n\n jTextField3.setMinimumSize(new java.awt.Dimension(20, 20));\n\n jTextField4.setMinimumSize(new java.awt.Dimension(20, 20));\n\n jTextField5.setMinimumSize(new java.awt.Dimension(20, 20));\n\n jTextField6.setMinimumSize(new java.awt.Dimension(20, 20));\n\n jTextField7.setMinimumSize(new java.awt.Dimension(20, 20));\n\n jTextField8.setMinimumSize(new java.awt.Dimension(20, 20));\n jTextField8.setName(\"\"); // NOI18N\n jTextField8.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField8ActionPerformed(evt);\n }\n });\n\n jTextField9.setMinimumSize(new java.awt.Dimension(20, 20));\n jTextField9.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField9ActionPerformed(evt);\n }\n });\n\n jTextField10.setMinimumSize(new java.awt.Dimension(20, 20));\n\n jTextField11.setMinimumSize(new java.awt.Dimension(20, 20));\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(jLabel1)\n .addGap(81, 81, 81)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jTextField10, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 99, Short.MAX_VALUE)\n .addComponent(jTextField9, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jTextField8, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jTextField7, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jTextField6, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jTextField4, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jTextField3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jTextField2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jTextField1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jTextField5, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jTextField11, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 287, Short.MAX_VALUE)\n .addComponent(jButton1)\n .addGap(119, 119, 119))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(57, 57, 57)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 93, 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 .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(17, 17, 17)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel1)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap(41, Short.MAX_VALUE)\n .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(11, 11, 11)\n .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(11, 11, 11)\n .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(11, 11, 11)\n .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(11, 11, 11)\n .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(11, 11, 11)\n .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(11, 11, 11)\n .addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(11, 11, 11)\n .addComponent(jTextField9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(11, 11, 11)\n .addComponent(jTextField10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)))\n .addComponent(jTextField11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(19, 19, 19))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton1)\n .addContainerGap())\n );\n\n jMenu1.setText(\"Fichier\");\n\n jMenuItem1.setText(\"Retour\");\n jMenuItem1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem1ActionPerformed(evt);\n }\n });\n jMenu1.add(jMenuItem1);\n\n jMenuItem2.setText(\"Quitter\");\n jMenuItem2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem2ActionPerformed(evt);\n }\n });\n jMenu1.add(jMenuItem2);\n\n jMenuBar1.add(jMenu1);\n jMenuBar1.add(jMenu2);\n\n setJMenuBar(jMenuBar1);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\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 .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n pack();\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 initializeComponent(String [] entry, Double [] price, String name)\n {\n jLabel1 = new JLabel();\n jLabel2 = new JLabel();\n jTextPane1 = new JTextPane();\n jScrollPane1 = new JScrollPane();\n jTextPane2 = new JTextPane();\n jScrollPane2 = new JScrollPane();\n contentPane = (JPanel)this.getContentPane();\n \n String finalText = \"\";\n for(int i = 0; i < entry.length; i++)\n {\n\tfinalText += entry[i]+price[i].toString()+\"\\n\\n\";\n }\n \n \n String[] columnNames = {\"Item\",\"Price ($)\"};\n \n String [] [] data = new String[entry.length][2];\n \n for(int i = 0; i < entry.length; i++)\n {\n\tdata [i][0] = entry[i];\n\tdata [i][1] = price[i].toString();\n }\n \n JTable jTable = new JTable(data, columnNames);\n \n \n JScrollPane scrollPane = new JScrollPane(jTable);\n jTable.setPreferredScrollableViewportSize(new Dimension(500, 70));\n //\n // jLabel1\n //\n //jLabel1.setText(\"Item\");\n //\n // jLabel2\n //\n //jLabel2.setText(\"Price\");\n //\n // jTextPane1\n //\n //jTextPane1.setText(finalText);\n //\n // jScrollPane1\n //\n jScrollPane1.setViewportView(jTable);//(jTextPane1)\n //\n // jTextPane2\n //\n //jTextPane2.setText(\"abc\");\n //\n // jScrollPane2\n //\n //jScrollPane2.setViewportView(jTextPane2);\n //\n // contentPane\n\t\t//\n contentPane.setLayout(null);\n //addComponent(contentPane, jLabel1, 27,26,60,18);\n //addComponent(contentPane, jLabel2, 220,26,60,18);\n addComponent(contentPane, jScrollPane1, 29,45,400,150);\n //addComponent(contentPane, jScrollPane2, 218,45,60,100);\n //\n // Display\n //\n this.setTitle(\"Menu for \"+name);\n this.setLocation(new Point(100, 50));\n this.setSize(new Dimension(500, 300));\n }", "private void addItem(JPanel p, JComponent c, int x, int y, int width, int height, int align) {\n\t\tGridBagConstraints gc = new GridBagConstraints();\n\t\tgc.gridx = x;\n\t\tgc.gridy = y;\n\t\tgc.gridwidth = width;\n\t\tgc.gridheight = height;\n\t\tgc.weightx = 100.0;\n\t\tgc.weighty = 100.0;\n\t\tgc.insets = new Insets(5, 5, 5, 5);\n\t\tgc.anchor = align;\n\t\tgc.fill = GridBagConstraints.NONE;\n\t\tp.add(c, gc);\n\t}", "@Override\r\n\t\tpublic final boolean combinePropertyLists()\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}", "public void incrementRow() {\n setRowAndColumn(row + 1, column);\n }", "public static void addComponentsToPane(Container pane) {\r\n pane.setLayout(new FlowLayout());\r\n pane.add(new JLabel(\"Faculty: \"));\r\n pane.add(facultyChoice);\r\n pane.add(new JLabel(\"Year: \"));\r\n yearField.setPreferredSize(new Dimension(50, 25));\r\n yearField.setToolTipText(\"YYYY format\");\r\n int now = LocalDate.now().getYear();\r\n if(LocalDate.now().getMonth().compareTo(Month.SEPTEMBER) <= 0){\r\n now--;\r\n }\r\n yearField.setText(\"\" + now);\r\n pane.add(yearField);\r\n \r\n pane.add(new JLabel(\"Semester: \"));\r\n semesterChoice.add(\"1\"); semesterChoice.add(\"2\");\r\n semesterChoice.setPreferredSize(new Dimension(50, 25));\r\n pane.add(semesterChoice);\r\n \r\n pane.add(new JLabel(\"Subjects: \"));\r\n\r\n subjectsArea.setPreferredSize(new Dimension(400, 50)); \r\n subjectsArea.setToolTipText(\"Enter subject's codes separated by semicolon ';'\");\r\n subjectsArea.setLineWrap(true);\r\n JScrollPane scroll = new JScrollPane(subjectsArea, \r\n JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);\r\n JPanel bigPanel = new JPanel(); \r\n bigPanel.setLayout(new BorderLayout());\r\n bigPanel.setPreferredSize(subjectsArea.getPreferredSize());\r\n bigPanel.add(scroll, BorderLayout.CENTER);\r\n pane.add(bigPanel);\r\n \r\n addButton.addActionListener((ActionEvent evt) -> {\r\n addButtonActionPerformed(evt);\r\n });\r\n pane.add(addButton);\r\n \r\n deleteButton.setToolTipText(\"Deletes all added subjects\");\r\n deleteButton.addActionListener((ActionEvent evt) -> {\r\n deleteButtonActionPerformed(evt);\r\n });\r\n pane.add(deleteButton);\r\n \r\n pane.setComponentOrientation(\r\n ComponentOrientation.LEFT_TO_RIGHT);\r\n }", "private void addComponents() {\n\t\t\n\t\t// prima riga di lettere\n\t\tfor (int i = 0; i < 10; i++)\n\t\t\tadd(letterLabel(i));\n\t\t\t\n\t\t/* la scacchiera ha l'oringine 0,0 in basso a sinistra\n\t\t * mentre la griglia si riempie di elementi dall'alto\n\t\t * percio' il for delle x (j) cresce mentre popoliamo le celle (bottoni)\n\t\t * mentre il for delle y (i) decresce man mano che passiamo di riga in riga */\n\t\tfor (int i = 7; i >= 0; i--)\n\t\t\tfor (int j = 0; j < 10; j++) {\n\t\t\t\tif (j == 0 || j == 9)\n\t\t\t\t\tadd(numberLabel(i + 1));\n\t\t\t\telse\n\t\t\t\t\tadd(buttons[j - 1][i]);\n\t\t\t}\n\t\t\n\t\t// ultima riga (uguale alla prima)\n\t\tfor (int i = 0; i < 10; i++)\n\t\t\tadd(letterLabel(i));\n\t}", "private void fillComponents() {\n\t\tthis.pass.setSize(new Dimension(110, 25));\n\t\tthis.setGridBagConstraints(0, 0, 0, 0, 0, 3, 1);\n\t\tthis.center.add(new JLabel(\"Password:\"),c);\n\t\tthis.setGridBagConstraints(1, 0, 0, 0, 0, 3, 1);\n\t\tthis.center.add(pass, c);\n\t\tthis.setGridBagConstraints(2, 1, 0, 0, 0, 1, 1);\n\t\tthis.center.add(back, c);\n\t\tthis.add(center, BorderLayout.CENTER);\n\t}", "protected void addRow(TextButton buttonToAdd)\n {\n table.add(buttonToAdd).width(centre/3.0f);\n table.row();\n }", "@Override\n public Object[] createRow() {\n ObjectDescriptor.TypeObject newTypeObjectInstance = ObjectDescriptor.newInstance();\n List<PropertyDescriptor> descriptors = typeObjectDescriptor.getObjectProperties();\n InitValuesFiller.fill(newTypeObjectInstance, descriptors);\n\n return new Object[]{ StringUtils.EMPTY, newTypeObjectInstance };\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 jScrollPane1 = new javax.swing.JScrollPane();\n properties = new javax.swing.JList();\n cbGetters = new javax.swing.JCheckBox();\n cbSetters = new javax.swing.JCheckBox();\n cbBoolean = new javax.swing.JCheckBox();\n cbJavaDoc = new javax.swing.JCheckBox();\n cbDomainClass = new javax.swing.JCheckBox();\n\n setLayout(new java.awt.GridBagLayout());\n\n jScrollPane1.setViewportView(properties);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 3;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.RELATIVE;\n gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH;\n gridBagConstraints.ipadx = 350;\n gridBagConstraints.ipady = 109;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.weighty = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(12, 10, 0, 10);\n add(jScrollPane1, gridBagConstraints);\n\n cbGetters.setMnemonic('G');\n cbGetters.setText(\"Getters\"); // NOI18N\n cbGetters.setToolTipText(\"Generate Setters according to Ujo Keys\"); // NOI18N\n cbGetters.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cbGettersActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 0;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.RELATIVE;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 22, 0, 0);\n add(cbGetters, gridBagConstraints);\n\n cbSetters.setMnemonic('S');\n cbSetters.setText(\"Setters\"); // NOI18N\n cbSetters.setToolTipText(\"Generate Setters according to Ujo Keys\"); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.RELATIVE;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 22, 0, 0);\n add(cbSetters, gridBagConstraints);\n\n cbBoolean.setMnemonic('B');\n cbBoolean.setText(\"IsBoolean\"); // NOI18N\n cbBoolean.setToolTipText(\"Generate Setters according to Ujo Keys\"); // NOI18N\n cbBoolean.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cbBooleanActionPerformed(evt);\n }\n });\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 2;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.RELATIVE;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(0, 22, 0, 0);\n add(cbBoolean, gridBagConstraints);\n\n cbJavaDoc.setMnemonic('C');\n cbJavaDoc.setText(\"Copy JavaDoc form Keys to new methods\"); // NOI18N\n cbJavaDoc.setToolTipText(\"\"); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 4;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.RELATIVE;\n gridBagConstraints.ipadx = 60;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(4, 22, 0, 10);\n add(cbJavaDoc, gridBagConstraints);\n\n cbDomainClass.setMnemonic('D');\n cbDomainClass.setText(\"Generate a Domain class before Keys\"); // NOI18N\n cbDomainClass.setToolTipText(\"\"); // NOI18N\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 5;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.RELATIVE;\n gridBagConstraints.ipadx = 60;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;\n gridBagConstraints.insets = new java.awt.Insets(4, 22, 0, 10);\n add(cbDomainClass, gridBagConstraints);\n }", "protected String addToMultiLineField(String current, String newline){\n\t\tif(current == null)\n\t\t\tcurrent = \"\";\n\t\t\n\t\tif(newline == null)\n\t\t\tnewline = \"\";\n\t\t\n\t\treturn current +\"\\r\\n\" + newline;\t\n\t}", "public void addComponent(DrawingComponent component) \n\t{\n\n\t\tLog.d(\"DrawingIndividual\", \"addComponent \" + component);\n\t\t\n\t\tif (component instanceof DrawingCompositeWord) \n\t\t{\n\t\t\tchanged = true;\n\n\t\t\tRectF bounds = ((DrawingCompositeWord) component).getBounds();\n\n\t\t\tRectF localBounds = new RectF();\n\n\t\t\tif (path != null)\n\t\t\t\tpath.computeBounds(localBounds, true);\n\n\t\t\tif (localBounds.contains(bounds))\n\t\t\t{\n\n\t\t\t\ttry {\n\n\t\t\t\t\tif (children.size() == 0) \n\t\t\t\t\t{\n\t\t\t\t\t\tchildren.add(component);\n\t\t\t\t\t\tcomponent.parent = this;\n\t\t\t\t\t\tcomponentChild = (DrawingCompositeWord) component;\n\t\t\t\t\t\t\n\t\t\t\t\t\tupdateDrawingComponent();\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (DrawingComponent dc : ((DrawingCompositeWord) component).children)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdc.setDisplayState(this.displayState);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcomponent.setDisplayState(this.displayState);\n\t\t\t\t\t}\n\t\t\t\t\telse \n\t\t\t\t\t{\n\t\t\t\t\t\tchanged = false;\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (DrawingComponent dc : ((DrawingCompositeWord) component).children)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdc.setDisplayState(DisplayObjectState.NONE);\n\t\t\t\t\t\t}\t\t\n\n\t\t\t\t\t\tcomponent.setDisplayState(DisplayObjectState.NONE);\n\t\t\t\t\t\t\n\t\t\t\t\t\tcomponent.parent.childrenToAdd.add(component);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} \n\t\t\t\tcatch (Exception e) \n\t\t\t\t{\n\t\t\t\t\te.printStackTrace();\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfor (DrawingComponent dc : ((DrawingCompositeWord) component).children)\n\t\t\t\t{\n\t\t\t\t\tdc.setDisplayState(DisplayObjectState.NONE);\n\t\t\t\t}\t\t\n\n\t\t\t\tcomponent.setDisplayState(DisplayObjectState.NONE);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse \n\t\t{\n\t\t\tchanged = false;\n\t\t\t\n\t\t\tcomponent.parent.childrenToAdd.add(component);\n\t\t}\n\t\t\n\t}", "public void add(String stg1, JComponent componente1, String stg2, JComponent componente2){\n\t\tGridBagConstraints cons = new GridBagConstraints();\n\t\tcons.fill = GridBagConstraints.BOTH; \n\t\tcons.insets = new Insets(4,4,4,4); \n\n\t\tcons.fill = GridBagConstraints.NONE; \n\t\tcons.anchor = GridBagConstraints.NORTHWEST; \n\t\tcons.weightx = 0; \n\t\tcons.gridwidth = 1; \n\t\tthis.getContentPane().add(new JLabel(stg1), cons); \n\n\t\tcons.weightx = 1; \n\t\tcons.gridwidth = 1; \n\t\tcons.fill = GridBagConstraints.BOTH; \n\t\tthis.getContentPane().add(componente1, cons); \n\n\t\tcons.fill = GridBagConstraints.NONE; \n\t\tcons.weightx = 0; \n\t\tcons.gridwidth = 1; \n\t\tthis.getContentPane().add(new JLabel(stg2), cons); \n\n\t\tcons.weightx = 1; \n\t\tcons.fill = GridBagConstraints.BOTH; \n\t\tcons.gridwidth = GridBagConstraints.REMAINDER; \n\t\tthis.getContentPane().add(componente2, cons); \n\t}", "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, default\", // cols\n\t\t\t\t\"p, 3dlu,p, 3dlu, p, 3dlu, p, 3dlu, p, 3dlu\"); // rows\n\t\tDefaultFormBuilder builder = new DefaultFormBuilder(layout);\n\t\tbuilder.setDefaultDialogBorder();\n\t\tCellConstraints cc = new CellConstraints();\n\t\t\n\t\tIterator l=labels.iterator();\n\t\tIterator c=valueComponents.iterator();\n\t\twhile (l.hasNext()){\n\t\t String name=(String)l.next();\n\t\t JComponent comp=(JComponent)c.next();\n\t\t builder.append(name,comp);\n\t\t builder.nextLine(2);\n\t\t}\n\t\treturn builder.getPanel();\n\t}", "private void psLineEndWithSeparator(int[] mapcols, int columnCount, String[] row) throws SQLException {\n //handling the last column if the value is null in anaplan\n if (jdbcConfig.getJdbcParams() != null && jdbcConfig.getJdbcParams().length > 0\n && !jdbcConfig.getJdbcParams()[0].equals(\"\") && mapcols.length != 0) {\n for (int i = 0; i < mapcols.length; i++) {\n if (i == mapcols.length - 1 && row.length < mapcols.length) {\n preparedStatement.setString(i + 1, \"\");\n } else {\n preparedStatement.setString(i + 1, String.valueOf(row[mapcols[i]]) != \"\" ? String.valueOf(row[mapcols[i]]) : \"\");\n }\n }\n } else {\n for (int i = 0; i < columnCount; i++) {\n if (i == columnCount - 1 && row.length < columnCount) {\n preparedStatement.setString(i + 1, \"\");\n } else {\n preparedStatement.setString(i + 1, String.valueOf(row[i]) != \"\" ? String.valueOf(row[i]) : \"\");\n }\n }\n }\n }", "private void addColumn() {\n for (int j = 0; j < gridHeight; j++) {\n EscapeBlock block = new EscapeBlock(gridWidth,j);\n block.setLocation(margin + gridWidth * (Block.length+1) ,\n margin + topMargin + j * (Block.length+1)); \n this.add(block);\n grid.get(j).add(block);\n }\n gridWidth++;\n }", "private void createRowForNewColumnButton(Composite section2)\n {\n buttonNewColumn = toolkit.createButton(section, \"New Column...\", SWT.PUSH); //$NON-NLS-1$\n buttonGridData(buttonNewColumn, SWT.TOP);\n buttonNewColumn.addSelectionListener(new SelectionListener()\n {\n public void widgetDefaultSelected(SelectionEvent e)\n {\n }\n\n public void widgetSelected(SelectionEvent e)\n {\n NewColumnPopup dialog = new NewColumnPopup(getShell());\n if (dialog.open() == Dialog.OK)\n {\n // if the first field is not set\n if (valueToRecognizeReq == null)\n {\n valueToRecognizeReq = new Column(dialog.getColumnInput(), dialog.getRegexInput());\n reqIdComponent.setValueText(valueToRecognizeReq.getText());\n }\n else\n {\n tree.add(new Column(dialog.getColumnInput(), dialog.getRegexInput()));\n listFormat.refresh();\n }\n controller.removeDocumentType();\n updateWizard();\n }\n }\n });\n\n }", "public final void addTextArea(final int rows) {\n\t\tfinal TextArea<String> textArea = new TextArea<String>(\"textArea\") {\n\t\t\t@Override\n\t\t\tprotected void onComponentTag(final ComponentTag tag) {\n\t\t\t\tsuper.onComponentTag(tag);\n\t\t\t\ttag.put(\"rows\", rows);\n\t\t\t}\n\t\t};\n\t\taddDecoratorForBuiltInFormComponent(textArea, \"textAreaFragment\");\n\t}", "public void addContent(Component... components) {\n this.contentLayout.add(components);\n }", "public Row(Piece[] pieces, int index) {\n this.index = index;\n spaces = new ArrayList<>();\n for (int column = 0; column < 8; column++) {\n spaces.add(new Space(index, column, pieces[column]));\n }\n }", "public PropertyComponent(String label, String initValue, int numLines, boolean needsReload, boolean needsRealign) {\n\t\t\tbReload = needsReload;\n\t\t\tbRealign = needsRealign;\n\t\t\t\n\t\t\tif(numLines == 1) {\n\t\t\t\tnMode = MODE_TEXT;\n\t\t\t\ttheComponent = new JTextField(FIELD_COLUMNS);\n\t\t\t\t((JTextField)theComponent).setBorder(BorderFactory.createLineBorder(Color.BLACK));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tnMode = MODE_MULTI_LINE;\n\t\t\t\ttheComponent = new JTextArea(numLines, FIELD_COLUMNS);\n\t\t\t\t((JTextArea)theComponent).setBorder(BorderFactory.createLineBorder(Color.BLACK));\n\t\t\t\t((JTextArea)theComponent).setLineWrap(true);\n\t\t\t\t((JTextArea)theComponent).setWrapStyleWord(true);\n\t\t\t\t((JTextArea)theComponent).setMinimumSize(((JTextArea)theComponent).getPreferredSize());\n//\t\t\t\t((JTextArea)theComponent).setMaximumSize(((JTextArea)theComponent).getPreferredSize());\n\t\t\t}\n\t\t\t\n\t\t\ttheLabel = new JLabel(label);\n\t\t\ttheLabel.setBackground(Color.WHITE);\n\t\t\tsetValue(initValue);\n\t\t\tsetLayout();\n\t\t}", "public Pane add(Component ... comps) {\t\t\r\n\t\tfor(Component comp: comps) {\r\n\t\t\tcomponents.add(comp);\r\n\t\t\t\r\n\t\t\tif(comp instanceof ActionComponent) {\r\n\t\t\t\tactionComponents.add((ActionComponent) comp);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn this;\r\n\t}", "public Component addComponent(Component component) {\n return popup.add(component);\n }", "public void addFieldLine(float extraBottomMargin) {\n LayoutInflater inflater = LayoutInflater.from(this);\n LinearLayout fieldLine = new LinearLayout(this);\n\n LinearLayout.LayoutParams fLParams = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT,\n LinearLayout.LayoutParams.WRAP_CONTENT);\n fLParams.setMargins(0, (int) (fieldLineTopMargin - overlapMarginVertical),\n 0, (int) (fieldLineBottomMargin + extraBottomMargin - overlapMarginVertical));\n fLParams.gravity = Gravity.CENTER_HORIZONTAL;\n fieldLine.setLayoutParams(fLParams);\n fieldLine.setOrientation(LinearLayout.HORIZONTAL);\n fieldLine.setGravity(Gravity.CENTER);\n mainField.addView(fieldLine, 0);\n\n for (int i = 0; i < game.fieldSize; i++) {\n LinearLayout fieldCell = (LinearLayout) inflater.inflate(R.layout.field_cell, null);\n\n LinearLayout.LayoutParams fCParams = new LinearLayout.LayoutParams((int) fieldCellWidth, (int) fieldCellHeight);\n\n int left = i != 0 ? (int) fieldCellLeftMargin : (int) firstCellLeftMargin;\n int right = i != game.fieldSize - 1 ? (int) fieldCellRightMargin : (int) lastCellRightMargin;\n fCParams.setMargins(left, (int) overlapMarginVertical,\n right,\n (int) (overlapMarginVertical));\n\n fieldCell.setLayoutParams(fCParams);\n fieldCell.setBackgroundResource(R.drawable.field_cell);\n fieldCell.setId(i);\n\n fieldLine.addView(fieldCell);\n }\n\n activeFieldLine = fieldLine;\n }", "private void addComponents(Container pane) {\n // Reset pane\n pane.removeAll();\n\n GridLayout mainLayout = new GridLayout(4,3);\n JPanel mainPanel = new JPanel();\n mainPanel.setLayout(mainLayout);\n\n // Setting up button sizes\n JButton b = new JButton(\"Filler button\");\n Dimension buttonSize = b.getPreferredSize();\n Dimension preferredSize = new Dimension(\n (int)(buttonSize.getWidth() * 7.5) + newGUI.maxGap,\n (int)(buttonSize.getHeight() * 3.5) + newGUI.maxGap * 2);\n mainPanel.setPreferredSize(preferredSize);\n\n // Add the main panel buttons\n mainPanel.add(commands);\n mainPanel.add(availableCommands);\n mainPanel.add(new JLabel());\n mainPanel.add(enterButton);\n\n pane.add(mainPanel, BorderLayout.NORTH);\n pane.add(new JSeparator(), BorderLayout.CENTER);\n }", "protected void addRowAttributes(TableRowBuilder row) {\n }", "public void addLayoutComponent(Component component, Object constraints) { }", "private void addRowToGrid(GridPane targetGrid, int rowIndex, String leftText, String rightText) {\n Label leftLabel = ViewGeneratorUtil.constructLabel(leftText, ViewStyleUtil.STYLE_TEXT_4);\n Label rightLabel = ViewGeneratorUtil.constructLabel(rightText, ViewStyleUtil.STYLE_TEXT_4);\n rightLabel.setWrapText(true);\n targetGrid.addRow(rowIndex, leftLabel, rightLabel);\n }", "public String toString() {\n return super.toString() + \",\" + m_props.size();\n }", "void addComponent(Component component);" ]
[ "0.62272453", "0.56777745", "0.54478115", "0.54266554", "0.5352006", "0.53233594", "0.52415204", "0.51894957", "0.51114315", "0.50481474", "0.5036867", "0.49761295", "0.496511", "0.49518", "0.49274367", "0.48925474", "0.48785102", "0.48713046", "0.48658317", "0.4863996", "0.48359972", "0.4796234", "0.47954515", "0.47849894", "0.47513938", "0.4724869", "0.47018406", "0.4696464", "0.46963835", "0.46665606", "0.4661686", "0.46429524", "0.46286932", "0.46166375", "0.4607431", "0.46019036", "0.45945936", "0.45852828", "0.45817783", "0.45752212", "0.45716822", "0.45657194", "0.45554242", "0.4547147", "0.45457917", "0.45445147", "0.45444763", "0.45421594", "0.45369366", "0.45186326", "0.45154327", "0.4506256", "0.44939876", "0.44877416", "0.44870678", "0.44746196", "0.44724983", "0.44722378", "0.4471777", "0.44595125", "0.44487137", "0.44393542", "0.44363517", "0.44309402", "0.44300005", "0.44294393", "0.44251272", "0.4418548", "0.44185418", "0.4412199", "0.44023913", "0.44015592", "0.43953", "0.43892175", "0.43873098", "0.43858323", "0.43825462", "0.43794122", "0.4376627", "0.43694755", "0.43649814", "0.4353166", "0.43520173", "0.43519282", "0.43388847", "0.43370456", "0.4335648", "0.4329583", "0.43292442", "0.43250188", "0.4324535", "0.43243647", "0.4324069", "0.4323581", "0.4319035", "0.43164223", "0.4315289", "0.43128684", "0.4305423", "0.4302194" ]
0.7728175
0
Returns a column span that stretched to the last component column if using a custom layout. It's assumed that every other column contains a component and the others are used for spacing including the initial column.
private int getColumnSpanToTheEnd(int startingColumn) { return layout.getColumnCount() - startingColumn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getColspan() \n {\n return 1;\n }", "com.google.monitoring.dashboard.v1.ColumnLayout getColumnLayout();", "public int getColspan() \n {\n int colspan = 1;\n List subHeadings = getSubHeadings();\n if (subHeadings != null && subHeadings.size() > 0)\n { \n colspan = subHeadings.size();\n }\n \n return colspan;\n }", "public static ColumnLayout single() {\n // We don't care about the width for single columns.\n return new ColumnLayout(1, 0, 0);\n }", "@Override\n public int getCol() {\n return getLayout().getCol();\n }", "protected final float getMinorAxisInsetSpan() {\n ViewInsets insets = getInsets();\n return (insets != null)\n ? (isXMajorAxis() ? insets.getTopBottom() : insets.getLeftRight())\n : 0;\n }", "public org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle getLastCol()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle)get_store().find_element_user(LASTCOL$12, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public int getRowspan() \n {\n return 1;\n }", "private int columnCalculator() {\n\n DisplayMetrics metrics = new DisplayMetrics();\n Objects.requireNonNull(getActivity())\n .getWindowManager()\n .getDefaultDisplay()\n .getMetrics(metrics);\n\n // Width of smallest tablet\n int divider = 600;\n int width = metrics.widthPixels;\n int columns = width / divider;\n if (columns < 2) return 2;\n\n return columns;\n }", "public int getLastPos ()\r\n {\r\n return (getFirstPos() + getThickness()) - 1;\r\n }", "com.google.monitoring.dashboard.v1.RowLayout getRowLayout();", "public @Override float getMaximumSpan(int axis) {\n // If the following implementation gets overriden the view should\n // consider additional caching variables because it's acting\n // as a layout state.\n return getPreferredSpan(axis); // getResizeWeight() not reflected\n }", "com.google.monitoring.dashboard.v1.ColumnLayoutOrBuilder getColumnLayoutOrBuilder();", "public int getRowspan() \n {\n int rowspan = 1;\n List subHeadings = getSubHeadings();\n if (subHeadings != null && subHeadings.size() > 0)\n { \n rowspan = subHeadings.size();\n }\n \n /*\n while (subHeadings != null || subHeadings.size() > 0)\n { \n subHeadings = recurseHeadings\n \n int size = subHeadings.size();\n for (int i=0; i<size; i++) \n {\n int max = 1;\n List recurseHeadings = \n ((Heading)subHeadings.get(i)).getSubHeadings();\n while (recurseHeadings != null \n && recurseHeadings.size() > 0) \n {\n int test = recurseHeadings.size();\n max = (test > max) ? test : max;\n\n recurseHeadings\n }\n \n } \n }\n */\n return rowspan;\n }", "public int getColumnSpan() {\n/* 2995 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public abstract int getLastCageCol(int row, int col);", "final int fillDown(final int fromPosition, final int overhang) {\n final int paddingLeft = getPaddingLeft();\n final int paddingRight = getPaddingRight();\n final int itemMargin = mItemMargin;\n final int colWidth =\n (getWidth() - paddingLeft - paddingRight - itemMargin * (mColCount - 1)) / mColCount;\n final int gridBottom = getHeight() - getPaddingBottom();\n final int fillTo = gridBottom + overhang;\n int nextCol = getNextColumnDown();\n int position = fromPosition;\n\n while (nextCol >= 0 && mItemBottoms[nextCol] < fillTo && position < mItemCount) {\n final View child = obtainView(position, null);\n LayoutParams lp = (LayoutParams) child.getLayoutParams();\n\n if (child.getParent() != this) {\n if (mInLayout) {\n addViewInLayout(child, -1, lp);\n } else {\n addView(child);\n }\n }\n\n final int span = Math.min(mColCount, lp.span);\n final int widthSize = colWidth * span + itemMargin * (span - 1);\n final int widthSpec = MeasureSpec.makeMeasureSpec(widthSize, MeasureSpec.EXACTLY);\n\n LayoutRecord rec;\n if (span > 1) {\n rec = getNextRecordDown(position, span);\n nextCol = rec.column;\n } else {\n rec = mLayoutRecords.get(position);\n }\n\n boolean invalidateAfter = false;\n if (rec == null) {\n rec = new LayoutRecord();\n mLayoutRecords.put(position, rec);\n rec.column = nextCol;\n rec.span = span;\n } else if (span != rec.span) {\n rec.span = span;\n rec.column = nextCol;\n invalidateAfter = true;\n } else {\n nextCol = rec.column;\n }\n lp.margins = rec.mMargins;\n\n if (mHasStableIds) {\n final long id = mAdapter.getItemId(position);\n rec.id = id;\n lp.id = id;\n }\n\n lp.column = nextCol;\n\n final int heightSpec;\n if (lp.height == LayoutParams.WRAP_CONTENT) {\n heightSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);\n } else {\n heightSpec = MeasureSpec.makeMeasureSpec(lp.height, MeasureSpec.EXACTLY);\n }\n child.measure(widthSpec, heightSpec);\n\n final int childHeight = child.getMeasuredHeight();\n if (invalidateAfter || (childHeight != rec.height && rec.height > 0)) {\n invalidateLayoutRecordsAfterPosition(position);\n }\n rec.height = childHeight;\n\n final int startFrom;\n if (span > 1) {\n int lowest = mItemBottoms[nextCol];\n for (int i = nextCol + 1; i < nextCol + span; i++) {\n final int bottom = mItemBottoms[i];\n if (bottom > lowest) {\n lowest = bottom;\n }\n }\n startFrom = lowest;\n } else {\n startFrom = mItemBottoms[nextCol];\n }\n final int childTop = startFrom + itemMargin;\n final int childBottom = childTop + childHeight;\n final int childLeft = paddingLeft + nextCol * (colWidth + itemMargin);\n final int childRight = childLeft + child.getMeasuredWidth();\n child.layout(childLeft, childTop, childRight, childBottom);\n\n for (int i = nextCol; i < nextCol + span; i++) {\n mItemBottoms[i] = childBottom + rec.getMarginBelow(i - nextCol);\n }\n\n nextCol = getNextColumnDown();\n position++;\n }\n\n int lowestView = 0;\n for (int i = 0; i < mColCount; i++) {\n if (mItemBottoms[i] > lowestView) {\n lowestView = mItemBottoms[i];\n }\n }\n return lowestView - gridBottom;\n }", "@Nullable\n public Component getTrailingComponent ();", "public org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle addNewLastCol()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle)get_store().add_element_user(LASTCOL$12);\n return target;\n }\n }", "public Component getComponent() {\n return _separator;\n }", "public abstract int findColForWindow(int x);", "public abstract int getMaximumDividerLocation(JSplitPane jc);", "public float getMinorAxisSpan(ViewLayoutState child) {\n // Delegate to children\n return getChildren().getMinorAxisSpan(child);\n }", "final double getMajorAxisPreferredSpan() {\n return (children != null)\n ? children.getMajorAxisPreferredSpan() + getMajorAxisInsetSpan()\n : lastMajorAxisPreferredSpan; // if no children then use cached value\n }", "public int getColumns() {\n return mRipple.getWidth();\n }", "final float getMinorAxisAssignedSpan() {\n return minorAxisAssignedSpan;\n }", "private void calculateSpanWidthBorders(int totalSpace){\r\n if(spanWidthBorders == null || spanWidthBorders.length != mSpanCount + 1\r\n || spanWidthBorders[spanWidthBorders.length - 1] != totalSpace){\r\n spanWidthBorders = new int[mSpanCount + 1];\r\n }\r\n spanWidthBorders[0] = 0;\r\n sizePerSpan = totalSpace / mSpanCount;\r\n int sizePerSpanRemainder = totalSpace % mSpanCount;\r\n int consumedPixels = 0;\r\n int additionalSize = 0;\r\n for (int i = 1; i <= mSpanCount; i++) {\r\n int itemSize = sizePerSpan;\r\n additionalSize += sizePerSpanRemainder;\r\n if (additionalSize > 0 && (mSpanCount - additionalSize) < sizePerSpanRemainder) {\r\n itemSize += 1;\r\n additionalSize -= mSpanCount;\r\n }\r\n consumedPixels += itemSize;\r\n spanWidthBorders[i] = consumedPixels;\r\n }\r\n }", "public int getColumn() {\r\n\t\treturn slot % 9;\r\n\t}", "private void findColumnBoundaries(){\n int columnBoundaryX1 = Integer.MAX_VALUE;\n int columnBoundaryX2 = Integer.MIN_VALUE;\n for(ArrayList<Element> cell : cells){\n String pos;\n String[] positions;\n\n Element firstWordInCell = cell.get(0);\n Element lastWordInCell = cell.get(cell.size()-1);\n\n pos = firstWordInCell.attr(\"title\");\n positions = pos.split(\"\\\\s+\");\n int x1 = Integer.parseInt(positions[1]);\n if(x1 < columnBoundaryX1){\n columnBoundaryX1 = x1;\n this.columnBoundaryX1 = x1;\n }\n\n pos = lastWordInCell.attr(\"title\");\n positions = pos.split(\"\\\\s+\");\n int x2 = Integer.parseInt(positions[3]);\n if(x2 > columnBoundaryX2){\n columnBoundaryX2 = x2;\n this.columnBoundaryX2 = x2;\n }\n }\n }", "public CellCoord previousColumn() {\n return new CellCoord(column - 1, row);\n }", "final int fillUp(final int fromPosition, final int overhang) {\n final int paddingLeft = getPaddingLeft();\n final int paddingRight = getPaddingRight();\n final int itemMargin = mItemMargin;\n final int colWidth =\n (getWidth() - paddingLeft - paddingRight - itemMargin * (mColCount - 1)) / mColCount;\n final int gridTop = getPaddingTop();\n final int fillTo = gridTop - overhang;\n int nextCol = getNextColumnUp();\n int position = fromPosition;\n\n while (nextCol >= 0 && mItemTops[nextCol] > fillTo && position >= 0) {\n final View child = obtainView(position, null);\n LayoutParams lp = (LayoutParams) child.getLayoutParams();\n\n if (child.getParent() != this) {\n if (mInLayout) {\n addViewInLayout(child, 0, lp);\n } else {\n addView(child, 0);\n }\n }\n\n final int span = Math.min(mColCount, lp.span);\n final int widthSize = colWidth * span + itemMargin * (span - 1);\n final int widthSpec = MeasureSpec.makeMeasureSpec(widthSize, MeasureSpec.EXACTLY);\n\n LayoutRecord rec;\n if (span > 1) {\n rec = getNextRecordUp(position, span);\n nextCol = rec.column;\n } else {\n rec = mLayoutRecords.get(position);\n }\n\n boolean invalidateBefore = false;\n if (rec == null) {\n rec = new LayoutRecord();\n mLayoutRecords.put(position, rec);\n rec.column = nextCol;\n rec.span = span;\n } else if (span != rec.span) {\n rec.span = span;\n rec.column = nextCol;\n invalidateBefore = true;\n } else {\n nextCol = rec.column;\n }\n lp.margins = rec.mMargins;\n\n if (mHasStableIds) {\n final long id = mAdapter.getItemId(position);\n rec.id = id;\n lp.id = id;\n }\n\n lp.column = nextCol;\n\n final int heightSpec;\n if (lp.height == LayoutParams.WRAP_CONTENT) {\n heightSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);\n } else {\n heightSpec = MeasureSpec.makeMeasureSpec(lp.height, MeasureSpec.EXACTLY);\n }\n child.measure(widthSpec, heightSpec);\n\n final int childHeight = child.getMeasuredHeight();\n if (invalidateBefore || (childHeight != rec.height && rec.height > 0)) {\n invalidateLayoutRecordsBeforePosition(position);\n }\n rec.height = childHeight;\n\n final int startFrom;\n if (span > 1) {\n int highest = mItemTops[nextCol];\n for (int i = nextCol + 1; i < nextCol + span; i++) {\n final int top = mItemTops[i];\n if (top < highest) {\n highest = top;\n }\n }\n startFrom = highest;\n } else {\n startFrom = mItemTops[nextCol];\n }\n final int childBottom = startFrom;\n final int childTop = childBottom - childHeight;\n final int childLeft = paddingLeft + nextCol * (colWidth + itemMargin);\n final int childRight = childLeft + child.getMeasuredWidth();\n child.layout(childLeft, childTop, childRight, childBottom);\n\n for (int i = nextCol; i < nextCol + span; i++) {\n mItemTops[i] = childTop - rec.getMarginAbove(i - nextCol) - itemMargin;\n }\n\n nextCol = getNextColumnUp();\n mFirstPosition = position--;\n }\n\n int highestView = getHeight();\n for (int i = 0; i < mColCount; i++) {\n if (mItemTops[i] < highestView) {\n highestView = mItemTops[i];\n }\n }\n return gridTop - highestView;\n }", "boolean hasColumnLayout();", "private void addColumn() {\n for (int j = 0; j < gridHeight; j++) {\n EscapeBlock block = new EscapeBlock(gridWidth,j);\n block.setLocation(margin + gridWidth * (Block.length+1) ,\n margin + topMargin + j * (Block.length+1)); \n this.add(block);\n grid.get(j).add(block);\n }\n gridWidth++;\n }", "SpanPanel(final JTable table, final MyCellSpan cellAtt) {\n\n\t\t\tsetLayout(new GridLayout(2, 1));\n\t\t\tsetBorder(BorderFactory.createTitledBorder(\"Span\"));\n\t\t\tJButton b_one = new JButton(\"Combine\");\n\t\t\tb_one.addActionListener(new ActionListener() {\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tint[] columns = table.getSelectedColumns();\n\t\t\t\t\tint[] rows = table.getSelectedRows();\n\t\t\t\t\tcellAtt.combine(rows, columns);\n\t\t\t\t\ttable.clearSelection();\n\t\t\t\t\ttable.revalidate();\n\t\t\t\t\ttable.repaint();\n\t\t\t\t}\n\t\t\t});\n\t\t\tJButton b_split = new JButton(\"Split\");\n\t\t\tb_split.addActionListener(new ActionListener() {\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tint column = table.getSelectedColumn();\n\t\t\t\t\tint row = table.getSelectedRow();\n\t\t\t\t\tcellAtt.split(row, column);\n\t\t\t\t\ttable.clearSelection();\n\t\t\t\t\ttable.revalidate();\n\t\t\t\t\ttable.repaint();\n\t\t\t\t}\n\t\t\t});\n\t\t\tadd(b_one);\n\t\t\tadd(b_split);\n\t\t}", "public int mo3354b() {\n return Math.max(0, getChildAt(0).getHeight() - ((getHeight() - getPaddingTop()) - getPaddingBottom()));\n }", "int getCol();", "public int getDecoratedColumn (Node node);", "final void layoutChildren(final boolean queryAdapter) {\n final int paddingLeft = getPaddingLeft();\n final int paddingRight = getPaddingRight();\n final int itemMargin = mItemMargin;\n final int colWidth =\n (getWidth() - paddingLeft - paddingRight - itemMargin * (mColCount - 1)) / mColCount;\n int rebuildLayoutRecordsBefore = -1;\n int rebuildLayoutRecordsAfter = -1;\n\n Arrays.fill(mItemBottoms, Integer.MIN_VALUE);\n\n final int childCount = getChildCount();\n for (int i = 0; i < childCount; i++) {\n View child = getChildAt(i);\n LayoutParams lp = (LayoutParams) child.getLayoutParams();\n int col = lp.column;\n final int[] margins = lp.margins;\n final int position = mFirstPosition + i;\n final boolean needsLayout = queryAdapter || child.isLayoutRequested();\n boolean newChild = false;\n if (position >= mItemCount) {\n // Sometimes it happens...\n final View toDelete = getSpannedChildAt(i);\n removeViewAt(i);\n if (toDelete != null) {\n // Offset children in case our last child was max spanned\n final int height = toDelete.getHeight();\n offsetChildren(height);\n }\n continue;\n }\n\n if (queryAdapter) {\n View newView = obtainView(position, child);\n if (newView != child) {\n removeViewAt(i);\n addView(newView, i);\n child = newView;\n newChild = true;\n }\n lp = (LayoutParams) child.getLayoutParams(); // Might have changed\n\n lp.column = col; // XXX Initial version of StaggeredGridView actually forgets to correct columns which is a nasty bug\n lp.margins = margins;\n }\n\n final int span = Math.min(mColCount, lp.span);\n final int widthSize = colWidth * span + itemMargin * (span - 1);\n\n if (needsLayout) {\n final int widthSpec = MeasureSpec.makeMeasureSpec(widthSize, MeasureSpec.EXACTLY);\n\n final int heightSpec;\n if (lp.height == LayoutParams.WRAP_CONTENT) {\n heightSpec = MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED);\n } else if (lp.height == LayoutParams.MATCH_PARENT) {\n /*heightSpec = getChildMeasureSpec(\n MeasureSpec.makeMeasureSpec(getMeasuredHeight(), MeasureSpec.AT_MOST),\n getPaddingTop() + getPaddingBottom(),\n lp.height\n );*/\n // XXX HACK\n heightSpec = MeasureSpec.makeMeasureSpec(getMeasuredHeight() - getPaddingTop() - getPaddingBottom(),\n MeasureSpec.EXACTLY);\n } else {\n heightSpec = MeasureSpec.makeMeasureSpec(lp.height, MeasureSpec.EXACTLY);\n }\n\n child.measure(widthSpec, heightSpec);\n }\n\n int childTop = mItemBottoms[col] > Integer.MIN_VALUE ? mItemBottoms[col] + mItemMargin\n : /*child.getTop() + (*/newChild ? mItemMargin + getPaddingTop() : child.getTop()/*0)*/;\n if (span > 1) {\n int lowest = childTop;\n for (int j = col + 1; j < col + span; j++) {\n final int bottom = mItemBottoms[j] + mItemMargin;\n if (bottom > lowest) {\n lowest = bottom;\n }\n }\n childTop = lowest;\n }\n final int childHeight = child.getMeasuredHeight();\n final int childBottom = childTop + childHeight;\n final int childLeft = paddingLeft + col * (colWidth + itemMargin);\n final int childRight = childLeft + child.getMeasuredWidth();\n child.layout(childLeft, childTop, childRight, childBottom);\n\n for (int j = col; j < col + span; j++) {\n mItemBottoms[j] = childBottom;\n }\n\n final LayoutRecord rec = mLayoutRecords.get(position);\n if (rec != null && rec.height != childHeight) {\n // Invalidate our layout records for everything before this.\n rec.height = childHeight;\n /*\n * XXX was \"rebuildLayoutRecordsBefore\" previously\n * Rebuilding layout records \"before\" this position\n * leads to a nasty bug - margins for spanned children disappear\n * and the grid layouts children incorrectly\n * I DON'T REALLY KNOW WHY THIS IS SO....\n */\n rebuildLayoutRecordsAfter = position;\n }\n\n if (rec != null && rec.span != span) {\n // Invalidate our layout records for everything after this.\n rec.span = span;\n rebuildLayoutRecordsAfter = position;\n }\n\n }\n\n // Update mItemBottoms for any empty columns\n for (int i = 0; i < mColCount; i++) {\n if (mItemBottoms[i] == Integer.MIN_VALUE) {\n mItemBottoms[i] = mItemTops[i];\n }\n }\n\n if (rebuildLayoutRecordsBefore >= 0 || rebuildLayoutRecordsAfter >= 0) {\n if (rebuildLayoutRecordsBefore >= 0) {\n invalidateLayoutRecordsBeforePosition(rebuildLayoutRecordsBefore);\n }\n if (rebuildLayoutRecordsAfter >= 0) {\n invalidateLayoutRecordsAfterPosition(rebuildLayoutRecordsAfter);\n }\n for (int i = 0; i < childCount; i++) {\n final int position = mFirstPosition + i;\n final View child = getChildAt(i);\n final LayoutParams lp = (LayoutParams) child.getLayoutParams();\n LayoutRecord rec = mLayoutRecords.get(position);\n if (rec == null) {\n rec = new LayoutRecord();\n mLayoutRecords.put(position, rec);\n }\n rec.column = lp.column;\n rec.height = child.getHeight();\n rec.id = lp.id;\n final int span = Math.min(mColCount, lp.span);\n rec.span = span;\n rec.mMargins = lp.margins;\n }\n }\n }", "public int getDefaultLayout() {\n return C0716R.layout.n2_view_holder_micro_row;\n }", "public abstract int getDividerLocation(JSplitPane jc);", "public abstract int getMinimumDividerLocation(JSplitPane jc);", "protected final float getMajorAxisInsetSpan() {\n ViewInsets insets = getInsets();\n return (insets != null)\n ? (isXMajorAxis() ? insets.getLeftRight() : insets.getTopBottom())\n : 0;\n }", "Drawable getBottomDivider(int section, int position);", "protected Integer getGridHeight () {\n\t\treturn null ; \n\t}", "public int span(int row, int column) {\n\n Object current_box = table_model.getValueAt(row, column);\n\n // If the current item at ROW and COLUMN is a timetable screening box\n if(current_box instanceof TimetableScreeningBox){\n TimetableScreeningBox box = (TimetableScreeningBox)current_box;\n // Returns the box's size (the size of the cell)\n return box.getBoxSize();\n }\n\n return 1;\n }", "public int getLayoutColumns() {\n if (getLayout() instanceof RadioButtonLayout) {\n return ((RadioButtonLayout) getLayout()).getColumns();\n }\n return -1;\n }", "private void removeColumn() {\n gridWidth--;\n for (ArrayList<EscapeBlock> row : grid) { // for each row\n this.remove(row.get(gridWidth)); // remove the last block from the UI\n for(EscapeBlock block : row)\n block.disconnectAll();\n row.remove(gridWidth); // remove the last block from the grid\n }\n \n }", "private void addLastValueToTable(){\n\t\t//System.out.println(theModelColumn.size()-1);\n\t\tsetValueAt(theModelColumn.get(theModelColumn.size()-1).getX(), theModelColumn.size()-1, 0);\n\t\tsetValueAt(theModelColumn.get(theModelColumn.size()-1).getY(), theModelColumn.size()-1, 1);\n\t\tsetValueAt(theModelColumn.get(theModelColumn.size()-1).getWidth(), theModelColumn.size()-1, 2);\n\t\tsetValueAt(theModelColumn.get(theModelColumn.size()-1).getHeight(), theModelColumn.size()-1, 3);\n\t}", "int getRemainingHeight(int activeRowIndex) {\n if (!endsOnRow(activeRowIndex)) {\n return 0;\n } else if (includedLength == totalLength) {\n return 0;\n } else {\n return remainingLength + borderBefore + borderAfter + paddingBefore + paddingAfter;\n }\n }", "protected final float getInsetSpan(int axis) {\n// assert ViewUtilities.isAxisValid(axis);\n\n ViewInsets insets = getInsets();\n return (insets != null)\n ? ((axis == X_AXIS) ? insets.getLeftRight() : insets.getTopBottom())\n : 0;\n }", "public StrColumn getPageLast() {\n return delegate.getColumn(\"page_last\", DelegatingStrColumn::new);\n }", "public Component getLastComponent(Container aContainer) {\n if (aContainer == null) {\n throw new IllegalArgumentException(\"aContainer cannot be null\");\n }\n Comparator<? super Component> comparator = getComparator();\n if (comparator instanceof LayoutComparator) {\n ((LayoutComparator)comparator).\n setComponentOrientation(aContainer.\n getComponentOrientation());\n }\n return super.getLastComponent(aContainer);\n }", "public java.lang.String getCellspacing()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(CELLSPACING$28);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public abstract int getLastCageRow(int row, int col);", "Column baseColumn();", "Rect bottomDividerOffset(int section, int position);", "public int getColumnCount() {\n/* 277 */ int last = lastCategoryIndex();\n/* 278 */ if (last == -1) {\n/* 279 */ return 0;\n/* */ }\n/* */ \n/* 282 */ return Math.max(last - this.firstCategoryIndex + 1, 0);\n/* */ }", "public static ColumnLayout single(long width) {\n // We don't care about the width for single columns.\n return new ColumnLayout(1, width, 0);\n }", "int layout(ArrayList<ImageCell> images, int totalWidth);", "public Dimension preferredLayoutSize(Container target)\n {\n synchronized (target.getTreeLock())\n {\n Dimension dim = new Dimension(0, 0);\n int nmembers = target.getComponentCount();\n Insets insets = target.getInsets();\n int numRows = 1; // the number of rows\n int rowSumWidth = insets.left + insets.right; // the width of the row so\n // far\n int rowMaxWidth = target.getSize().width; // the width that the\n // ToolbarLayout is in\n int rowHeight = 0; // the height of each row\n int numOnRow = 0; // the number of components on the row\n\n for (int i = 0; i < nmembers; i++)\n {\n Component m = target.getComponent(i);\n if (m.isVisible())\n {\n Dimension d = m.getPreferredSize();\n rowHeight = Math.max(rowHeight, d.height); // make each row the\n // height of the biggest\n // component of all\n if (i > 0)\n {\n rowSumWidth += hgap;// add on the pre-spacing if this is not the\n // first component\n }\n rowSumWidth += d.width; // add the width of the component\n // if it overflowed and if there are components already on this row\n // then bump this component to next row\n if ((rowSumWidth + hgap) > rowMaxWidth)\n {\n if (numOnRow > 0)\n {\n numRows++;\n rowSumWidth = insets.left + insets.right + d.width;\n numOnRow = 0;// reset the number of components on the next row\n // (we ++ no matter what later)\n }\n }\n numOnRow++;// add this component to the count of the number on the\n // row\n }\n }\n dim.width = rowMaxWidth;\n dim.height = insets.top + insets.bottom + numRows * rowHeight + vgap * (numRows - 1);\n return dim;\n }\n }", "public int getBlockHeight(BoxLayout boxLayout) {\n\t\tif( lines != null && lines.size() > 0 ){\n\t\t\t\n\t\t\tint l = lines.get(lines.size()-1).y;\n\t\t\t//this is the height of the last box - left or right\n\t\t\tint b = boxLayout.getHeight() ;\n\t\t\t\n\t\t\treturn ( l > b ) ? l : b;\n\t\t}\n\t\treturn boxLayout.getHeight();\n\t}", "@Override\n protected Layout constructShellLayout() {\n GridLayout mainLayout = new GridLayout(1, false);\n\n return mainLayout;\n }", "public abstract int layoutHeight();", "public Stone[][] getCurrentBoardLayout() {\n \t\tGoCell[][] currentLayout = getCurrentBoard().getBoard();\n \t\tStone[][] newLayout = new Stone[getCurrentBoard().getWidth()][getCurrentBoard().getHeight()];\n \t\tfor (int i = 0; i < getCurrentBoard().getHeight(); i++)\n \t\t\tfor (int j = 0; j < getCurrentBoard().getWidth(); j++)\n \t\t\t\tnewLayout[i][j] = currentLayout[i][j].getContent();\n \t\treturn newLayout;\n \t}", "@Test\n void testMergingOverlappingCols_OVERLAPS_1_WRAPS() throws IOException {\n try (XSSFWorkbook wb1 = new XSSFWorkbook()) {\n XSSFSheet sheet = wb1.createSheet(\"test\");\n\n CTCols cols = sheet.getCTWorksheet().getColsArray(0);\n CTCol col = cols.addNewCol();\n col.setMin(2 + 1);\n col.setMax(4 + 1);\n col.setWidth(20);\n col.setCustomWidth(true);\n\n sheet.groupColumn((short) 1, (short) 5);\n\n cols = sheet.getCTWorksheet().getColsArray(0);\n LOG.atDebug().log(\"testMergingOverlappingCols_OVERLAPS_1_WRAPS/cols:{}\", cols);\n\n assertEquals(1, cols.getColArray(0).getOutlineLevel());\n assertEquals(2, cols.getColArray(0).getMin()); // 1 based\n assertEquals(2, cols.getColArray(0).getMax()); // 1 based\n assertFalse(cols.getColArray(0).getCustomWidth());\n\n assertEquals(1, cols.getColArray(1).getOutlineLevel());\n assertEquals(3, cols.getColArray(1).getMin()); // 1 based\n assertEquals(5, cols.getColArray(1).getMax()); // 1 based\n assertTrue(cols.getColArray(1).getCustomWidth());\n\n assertEquals(1, cols.getColArray(2).getOutlineLevel());\n assertEquals(6, cols.getColArray(2).getMin()); // 1 based\n assertEquals(6, cols.getColArray(2).getMax()); // 1 based\n assertFalse(cols.getColArray(2).getCustomWidth());\n\n assertEquals(3, cols.sizeOfColArray());\n\n try (XSSFWorkbook wb2 = XSSFTestDataSamples.writeOutAndReadBack(wb1, \"testMergingOverlappingCols_OVERLAPS_1_WRAPS\")) {\n sheet = wb2.getSheet(\"test\");\n\n for (int i = 2; i <= 4; i++) {\n assertEquals(20 * 256, sheet.getColumnWidth(i), \"Unexpected width of column \" + i);\n }\n\n }\n }\n }", "public @Override String toString() {\n return \"lastMajorAxisPreferredSpan=\" + lastMajorAxisPreferredSpan // NOI18N\n + \", lastMinorAxisPreferredSpan=\" + lastMinorAxisPreferredSpan // NOI18N\n + \", minorAxisAssignedSpan=\" + getMinorAxisAssignedSpan(); // NOI18N\n }", "private int getStartCell() {\r\n\t\tint extraCells = (getContentHeight() - getViewableHeight()) / CELL_SIZE_Y;\r\n\t\tif (getContentHeight() < getViewableHeight()) {\r\n\t\t\textraCells = 0;\r\n\t\t}\r\n\t\treturn (int) ((float) extraCells * ((float) _curScrollValue / (float) _maxScrollValue));\r\n\t}", "Group renderColumn(final GridColumn<?> column,\n final GridBodyColumnRenderContext context,\n final BaseGridRendererHelper rendererHelper,\n final BaseGridRendererHelper.RenderingInformation renderingInformation);", "private int numberOfColumns() {\n DisplayMetrics displayMetrics = new DisplayMetrics();\n getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);\n // You can change this divider to adjust the size of the recipe cards\n int widthDivider = 300;\n int width = displayMetrics.widthPixels;\n int numOfColumns = width / widthDivider;\n if (numOfColumns < 2) {\n return 2;\n }\n return numOfColumns;\n }", "com.google.monitoring.dashboard.v1.GridLayout getGridLayout();", "public SplitDisplayLayout getSplitLayout() {\n return this.mSplitLayout;\n }", "void colFull(int col);", "private org.gwtbootstrap3.client.ui.Column get_f_Column2() {\n return build_f_Column2();\n }", "public abstract int layoutWidth();", "private int lastCategoryIndex() {\n/* 158 */ if (this.maximumCategoryCount == 0) {\n/* 159 */ return -1;\n/* */ }\n/* 161 */ return Math.min(this.firstCategoryIndex + this.maximumCategoryCount, this.underlying\n/* 162 */ .getColumnCount()) - 1;\n/* */ }", "@Nullable\n public Component getLeadingComponent ();", "int getColumns();", "int getColumns();", "int atColumn();", "public int getEndRow();", "public StringBuffer2D printBoard(){\n StringBuffer2D sb = new StringBuffer2D();\n StringBuffer2D lettersHeader = makeLettersHeader();\n //hardcoded numberLegend width\n sb.insert(lettersHeader,2,0);\n //top row\n int actualWidth = getActualWidth(true)+1;\n //System.out.println(\" \");\n //top border\n try{\n for(int y=0;y<board.getHeight();++y){\n int startY = lettersHeader.getHeight() + y*getActualHeight();\n //LEFT number headers\n StringBuffer2D numberLegend = makeNumberLegend(y+1);\n sb.insert(numberLegend, 0, startY);\n for(int x=0;x<board.getWidth();++x){\n Position position = new Position(x,y);\n StringBuffer2D dispCell = displayCell(position);\n int startX = numberLegend.getWidth() + x*actualWidth;\n sb.replace(dispCell, startX, startY, maxWidth, startY+getActualHeight());\n }\n }\n }catch(PositionOutOfBoundsException e){\n e.printStackTrace();\n }\n return sb;\n }", "public abstract int getNodeColumnCount();", "ColumnFull createColumnFull();", "private Slot getRight(Slot slot) {\n if (slot.getColumn() + 2 < Board.MAX_COLUMN &&\n boardObject.getSlot(slot.getRow(), slot.getColumn() + 2).getColor() == Slot.EMPTY &&\n boardObject.getSlot(slot.getRow(), slot.getColumn() + 1).getColor() != Slot.EMPTY) {\n return new Slot(slot.getRow(), slot.getColumn() + 2, Slot.EMPTY);\n }\n\n return null;\n }", "int getSplitAxis();", "protected int GetMaxSpacing() {\n return Card.HEIGHT/3;\n }", "protected int GetMaxSpacing() {\n return Card.HEIGHT/3;\n }", "protected int GetMaxSpacing() {\n return Card.HEIGHT/3;\n }", "private JPanel createColPanel(JButton btn1, JButton btn2) {\r\n\t\tJPanel colPanel = new JPanel();\r\n\t\tcolPanel.setLayout(new GridLayout(10,1));\r\n\t\tfor (int i=0; i<3; i++) colPanel.add(new JLabel(\"\"));\r\n\t\tcolPanel.add(btn1);\r\n\t\tcolPanel.add(btn2);\r\n\t\tfor (int i=0; i<5; i++) colPanel.add(new JLabel(\"\"));\r\n\t\treturn colPanel;\r\n\t}", "public CellCoord nextColumn() {\n return new CellCoord(column + 1, row);\n }", "private int calculateColumns(Container target) {\n if (columns > 0) {\n return columns;\n }\n int compCount = target.getComponentCount();\n if (compCount < 4) {\n return compCount;\n }\n if (compCount == 4) {\n return 2;\n }\n return 1;\n }", "public @Override float getMinimumSpan(int axis) {\n // If the following implementation gets overriden the view should\n // consider additional caching variables because it's acting\n // as a layout state.\n return getPreferredSpan(axis); // getResizeWeight() not reflected\n }", "protected int GetMaxSpacing() {\n\t\n return Card.HEIGHT/3;\n }", "private String createDashedLine(){\n return \"- \".repeat(Math.max(0, this.columns));\n }", "@Test\n void testMergingOverlappingCols_OVERLAPS_2_WRAPS() throws IOException {\n try (XSSFWorkbook wb1 = new XSSFWorkbook()) {\n XSSFSheet sheet = wb1.createSheet(\"test\");\n\n CTCols cols = sheet.getCTWorksheet().getColsArray(0);\n CTCol col = cols.addNewCol();\n col.setMin(1 + 1);\n col.setMax(4 + 1);\n col.setWidth(20);\n col.setCustomWidth(true);\n\n sheet.groupColumn((short) 2, (short) 3);\n\n sheet.getCTWorksheet().getColsArray(0);\n LOG.atDebug().log(\"testMergingOverlappingCols_OVERLAPS_2_WRAPS/cols:{}\", cols);\n\n assertEquals(0, cols.getColArray(0).getOutlineLevel());\n assertEquals(2, cols.getColArray(0).getMin()); // 1 based\n assertEquals(2, cols.getColArray(0).getMax()); // 1 based\n assertTrue(cols.getColArray(0).getCustomWidth());\n\n assertEquals(1, cols.getColArray(1).getOutlineLevel());\n assertEquals(3, cols.getColArray(1).getMin()); // 1 based\n assertEquals(4, cols.getColArray(1).getMax()); // 1 based\n assertTrue(cols.getColArray(1).getCustomWidth());\n\n assertEquals(0, cols.getColArray(2).getOutlineLevel());\n assertEquals(5, cols.getColArray(2).getMin()); // 1 based\n assertEquals(5, cols.getColArray(2).getMax()); // 1 based\n assertTrue(cols.getColArray(2).getCustomWidth());\n\n assertEquals(3, cols.sizeOfColArray());\n\n try (XSSFWorkbook wb2 = XSSFTestDataSamples.writeOutAndReadBack(wb1, \"testMergingOverlappingCols_OVERLAPS_2_WRAPS\")) {\n sheet = wb2.getSheet(\"test\");\n\n for (int i = 1; i <= 4; i++) {\n assertEquals(20 * 256, sheet.getColumnWidth(i), \"Unexpected width of column \" + i);\n }\n\n }\n }\n }", "public int getCols();", "public IRow addToLayout(DesignGridLayout layout, int colSpan) {\n JPanel p = new JPanel();\r\n p.setLayout(new BorderLayout());\r\n//\t\tp.add(label, BorderLayout.LINE_START);\r\n p.add(txtPath, BorderLayout.CENTER);\r\n p.add(btnBrowse, BorderLayout.LINE_END);\r\n return layout.row().grid(label).add(p);\r\n }", "public abstract int getNumberOfColumnsInCurrentRow();", "public static WidgetGlue getWidgetGlue(Widget current, Widget other) {\n\t\tfloat x = current.getX(), x1 = current.getX() + current.getWidth(), y = current.getY(), y1 = current.getY() + current.getHeight();\n\t\tfloat otherX = other.getX(), otherX1 = other.getX() + other.getWidth(), otherY = other.getY(), otherY1 = other.getY() + other.getHeight();\n\t\tfloat width = other.getWidth(), height = other.getHeight();\n\t\tfloat horizontalIntersection = 0, verticalIntersection = 0;\n\t\tfloat distX = Math.abs(x - otherX), distX1 = Math.abs(otherX1 - x1), distY = Math.abs(y - otherY), distY1 = Math.abs(otherY1 - y1), \n\t\t\t\tdistXCenter = Math.abs((current.getX() + current.getWidth() / 2) - (other.getX() + other.getWidth() / 2)),\n\t\t\t\tdistYCenter = Math.abs((current.getY() + current.getHeight() / 2) - (other.getY() + other.getHeight() / 2));\n\t\tif ((x < otherX && x1 > otherX1) || (x > otherX && x1 < otherX1)) {\n\t\t\tif (y < otherY1 && y > otherY)\n\t\t\t\tif (distX < distX1 && distX < distXCenter)\n\t\t\t\t\treturn new WidgetGlue(BOTTOM_LEFT, other);\n\t\t\t\telse if (distX1 < distX && distX1 < distXCenter)\n\t\t\t\t\treturn new WidgetGlue(BOTTOM_RIGHT, other);\n\t\t\t\telse\n\t\t\t\t\treturn new WidgetGlue(BOTTOM_CENTER, other);\n\t\t\telse if (y1 > otherY && y1 < otherY1)\n\t\t\t\tif (distX < distX1 && distX < distXCenter)\n\t\t\t\t\treturn new WidgetGlue(TOP_LEFT, other);\n\t\t\t\telse if (distX1 < distX && distX1 < distXCenter)\n\t\t\t\t\treturn new WidgetGlue(TOP_RIGHT, other);\n\t\t\t\telse\n\t\t\t\t\treturn new WidgetGlue(TOP_CENTER, other);\n\t\t}\n\t\t\n\t\tif ((y < otherY && y1 > otherY1) || (y > otherY && y1 < otherY1)) {\n\t\t\tif (x < otherX1 && x > otherX)\n\t\t\t\tif (distY < distY1 && distY < distYCenter)\n\t\t\t\t\treturn new WidgetGlue(RIGHT_TOP, other);\n\t\t\t\telse if (distY1 < distY && distY1 < distYCenter)\n\t\t\t\t\treturn new WidgetGlue(RIGHT_BOTTOM, other);\n\t\t\t\telse\n\t\t\t\t\treturn new WidgetGlue(RIGHT_CENTER, other);\n\t\t\telse if (x1 > otherX && x1 < otherX1)\n\t\t\t\tif (distY < distY1 && distY < distYCenter)\n\t\t\t\t\treturn new WidgetGlue(LEFT_TOP, other);\n\t\t\t\telse if (distY1 < distY && distY1 < distYCenter)\n\t\t\t\t\treturn new WidgetGlue(LEFT_BOTTOM, other);\n\t\t\t\telse\n\t\t\t\t\treturn new WidgetGlue(LEFT_CENTER, other);\n\t\t}\n\t\t\t\n\t\tif (x < otherX && x1 > otherX)\n\t\t\thorizontalIntersection = x1 - otherX;\n\t\telse if (x < otherX1 && x1 > otherX1)\n\t\t\thorizontalIntersection = otherX1 - x;\n\t\t\n\t\tif (y < otherY && y1 > otherY) \n\t\t\tverticalIntersection = y1 - otherY;\n\t\telse if (y < otherY1 && y1 > otherY1)\n\t\t\tverticalIntersection = otherY1 - y;\n\t\t\n\t\t\n\t\tif (horizontalIntersection != 0 || verticalIntersection != 0) {\n\t\t\tif (horizontalIntersection / width > verticalIntersection / height) {\n\t\t\t\tif (y > otherY && y < otherY1)\n\t\t\t\t\tif (distX < distX1 && distX < distXCenter)\n\t\t\t\t\t\treturn new WidgetGlue(BOTTOM_LEFT, other);\n\t\t\t\t\telse if (distX1 < distX && distX1 < distXCenter)\n\t\t\t\t\t\treturn new WidgetGlue(BOTTOM_RIGHT, other);\n\t\t\t\t\telse\n\t\t\t\t\t\treturn new WidgetGlue(BOTTOM_CENTER, other);\n\t\t\t\telse if (y1 > otherY && y1 < otherY1)\n\t\t\t\t\tif (distX < distX1 && distX < distXCenter)\n\t\t\t\t\t\treturn new WidgetGlue(TOP_LEFT, other);\n\t\t\t\t\telse if (distX1 < distX && distX1 < distXCenter)\n\t\t\t\t\t\treturn new WidgetGlue(TOP_RIGHT, other);\n\t\t\t\t\telse\n\t\t\t\t\t\treturn new WidgetGlue(TOP_CENTER, other);\n\t\t\t} else {\n\t\t\t\tif (x > otherX && x < otherX1)\n\t\t\t\t\tif (distY < distY1 && distY < distYCenter)\n\t\t\t\t\t\treturn new WidgetGlue(RIGHT_TOP, other);\n\t\t\t\t\telse if (distY1 < distY && distY1 < distYCenter)\n\t\t\t\t\t\treturn new WidgetGlue(RIGHT_BOTTOM, other);\n\t\t\t\t\telse\n\t\t\t\t\t\treturn new WidgetGlue(RIGHT_CENTER, other);\n\t\t\t\telse if (x1 > otherX && x1 < otherX1)\n\t\t\t\t\tif (distY < distY1 && distY < distYCenter)\n\t\t\t\t\t\treturn new WidgetGlue(LEFT_TOP, other);\n\t\t\t\t\telse if (distY1 < distY && distY1 < distYCenter)\n\t\t\t\t\t\treturn new WidgetGlue(LEFT_BOTTOM, other);\n\t\t\t\t\telse\n\t\t\t\t\t\treturn new WidgetGlue(LEFT_CENTER, other);\n\t\t }\n\t\t\treturn null;\n\t\t} else\n\t\t\treturn null;\n\t}", "@Override\n public int getNumCols(){ return WIDTH; }" ]
[ "0.62655926", "0.5955244", "0.57205427", "0.54964185", "0.54833156", "0.5398529", "0.5364975", "0.5277151", "0.525338", "0.5252973", "0.523312", "0.5173234", "0.5160762", "0.5141505", "0.50771064", "0.50166345", "0.49325514", "0.49300614", "0.4898353", "0.48919043", "0.48916402", "0.4887247", "0.48833293", "0.4834232", "0.4799519", "0.47941995", "0.47726256", "0.47637537", "0.47600287", "0.47285974", "0.47225422", "0.47143757", "0.4711214", "0.46953067", "0.46789208", "0.4677073", "0.46767208", "0.4649592", "0.46395457", "0.4629009", "0.46074086", "0.45848808", "0.45596606", "0.4558965", "0.4534813", "0.45252654", "0.45241588", "0.4523901", "0.4521288", "0.4518973", "0.45124298", "0.45059294", "0.45036867", "0.44921315", "0.4491839", "0.4485031", "0.44788206", "0.4463616", "0.44573", "0.44562742", "0.4454759", "0.44502965", "0.44478828", "0.44475076", "0.44436252", "0.4443552", "0.4443371", "0.44367012", "0.4433116", "0.44300824", "0.44253924", "0.4424734", "0.44220868", "0.44162557", "0.44070935", "0.44011995", "0.4399559", "0.4399559", "0.43974766", "0.4391234", "0.4388328", "0.43878493", "0.4387692", "0.43840545", "0.43828842", "0.43817636", "0.43817636", "0.43817636", "0.4381756", "0.43815845", "0.43796414", "0.43771085", "0.43743303", "0.43740317", "0.43739218", "0.43713322", "0.43666795", "0.43625626", "0.4350881", "0.43421656" ]
0.6251664
1
Private constructor, so we have a "static" class
private ZipCodes() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Util()\n {\n // Empty default ctor, defined to override access scope.\n }", "private Utils()\n {\n // Private constructor to prevent instantiation\n }", "private Instantiation(){}", "private Util() { }", "private Utils() {\n\t}", "private Utils() {\n\t}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utility() {\n\t}", "private Util() {\n }", "private Topography()\n\t{\n\t\tthrow new IllegalStateException(\"This is an utility class, it can not be instantiated\");\n\t}", "private StaticData() {\n\n }", "private Util() {\n }", "private Util() {\n }", "Reproducible newInstance();", "private Singleton()\n\t\t{\n\t\t}", "private Rekenhulp()\n\t{\n\t}", "private Utils() {\n }", "private Utils() {\n }", "private Utils() {\n }", "private Utils() {\n }", "private Utils() {\n }", "private Utility() {\n throw new IllegalAccessError();\n }", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "private WebXmlIo()\n {\n // Voluntarily empty constructor as utility classes should not have a public or default\n // constructor\n }", "private WolUtil() {\n }", "private Singleton() {\n\t}", "public Utils() {}", "private InstanceUtil() {\n }", "private JsonUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }", "private CommonMethods() {\n }", "private Helper() {\r\n // empty\r\n }", "private ClassUtil() {}", "private SnapshotUtils() {\r\n\t}", "private MApi() {}", "private GeoUtil()\n\t{\n\t}", "private XMLUtils()\r\n\t{\r\n\t}", "private HabitTrackerUtils() {\n // Required empty private constructor (to prevent instantiation).\n }", "private S3Utils() {\n throw new UnsupportedOperationException(\"This class cannot be instantiated\");\n }", "private XMLUtil() {\n\t}", "private PluginUtils() {\n\t\t//\t\tthrow new IllegalAccessError(\"Don't instantiate me. I'm a utility class!\");\n\t}", "private QcTestRunner()\n\t{\n\t\t// To prevent external instantiation of this class\n\t}", "private SingletonObject() {\n\n\t}", "private FlowExecutorUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }", "private ATCres() {\r\n // prevent to instantiate this class\r\n }", "private SupplierLoaderUtil() {\n\t}", "private ExplorerFileSystemUtils() {\n // no op\n }", "private Singleton() { }", "private PermissionUtil() {\n throw new IllegalStateException(\"you can't instantiate PermissionUtil!\");\n }", "private SparkseeUtils()\n {\n /*\n * Intentionally left empty.\n */\n }", "public Utils() {\n }", "private VlcUtils()\n {\n \n }", "private FunctionUtils() {\n }", "private NetUtils() {\r\n\t}", "private MetallicityUtils() {\n\t\t\n\t}", "private CollectionUtils() {\n\n\t}", "private TMCourse() {\n\t}", "private OMUtil() { }", "private CLUtil()\n {\n }", "private Singleton(){}", "private Consts(){\n //this prevents even the native class from \n //calling this ctor as well :\n throw new AssertionError();\n }", "private Const() {\n }", "private LOCFacade() {\r\n\r\n\t}", "private ChainingMethods() {\n // private constructor\n\n }", "private BuilderUtils() {}", "private void __sep__Constructors__() {}", "static void init() {}", "private EagerlySinleton()\n\t{\n\t}", "private DataProviderUtils() {\n }", "public DocumentUtil() {\n // Because this class can be instantiated by other classes many times, we only\n // want to call the initialize() function\n // if we will be using the getProblemType() function below.\n }", "private UtilsCache() {\n\t\tsuper();\n\t}", "private Marinator() {\n }", "private Marinator() {\n }", "private PropertiesLoader() {\r\n\t\t// not instantiable\r\n\t}", "private RunUtils() {\n }", "private GuiUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }", "private XMLUtils() {\n }", "private UtilityKlasse() {\n\n }", "private JsonUtils() {\n\t\tsuper();\n\t}", "private DiagnosticMessageUtilities()\n {\n }", "private FileUtility() {\r\n\t}", "private CreateDateUtils()\r\n\t{\r\n\t}", "protected VboUtil() {\n }", "private SelfShieldingCalc()\n {\n // This class should just contain static methods. Don't let anyone\n // instantiate it.\n }", "private ContentUtil() {\n // do nothing\n }", "private AcceleoLibrariesEclipseUtil() {\n \t\t// hides constructor\n \t}", "private JacobUtils() {}", "private RestUtil() {\n\t}", "public ResourceUtils() {\r\n //stub\r\n }", "private Helper() {\r\n // do nothing\r\n }", "private SingleTon() {\n\t}", "private Quantify()\n {\n throw new UnsupportedOperationException(\"Instantiation of utility classes is not supported.\");\n }", "private Tuples() {\n // prevent instantiation.\n }", "private PerksFactory() {\n\n\t}", "private ReportGenerationUtil() {\n\t\t\n\t}", "private SingleObject()\r\n {\r\n }", "private XhtmlUtils()\n\t{\n\t}", "private DocumentBuilderHelper() {\n }", "public ObjectUtils() {\n super();\n }" ]
[ "0.7914253", "0.7711476", "0.76667684", "0.758598", "0.7528477", "0.7528477", "0.74957746", "0.74957746", "0.74957746", "0.74957746", "0.74600226", "0.74480695", "0.7422396", "0.7387467", "0.73829556", "0.73829556", "0.7368829", "0.72891563", "0.7289124", "0.7288877", "0.7288877", "0.7288877", "0.7288877", "0.7288877", "0.7270438", "0.7263874", "0.717521", "0.716954", "0.7154508", "0.71500707", "0.7145908", "0.71347165", "0.711478", "0.71127766", "0.7100047", "0.70788544", "0.70676225", "0.70626414", "0.70580333", "0.7044494", "0.70438814", "0.70433193", "0.70343536", "0.7023718", "0.702222", "0.700088", "0.6979784", "0.69701177", "0.6962607", "0.6954218", "0.6951988", "0.69469506", "0.69335645", "0.6927147", "0.69253117", "0.69220155", "0.69214284", "0.6920709", "0.6918713", "0.6916568", "0.6904452", "0.6899669", "0.68996114", "0.6899387", "0.68950325", "0.68800664", "0.6870924", "0.68664736", "0.68560505", "0.68535525", "0.6845495", "0.68339205", "0.6832647", "0.6829641", "0.6829641", "0.6821256", "0.6821231", "0.6820688", "0.6820033", "0.68184847", "0.68107325", "0.681045", "0.68032986", "0.68003666", "0.6798353", "0.67968494", "0.6794877", "0.67943513", "0.67897886", "0.67883325", "0.6770876", "0.6769181", "0.6766135", "0.6765888", "0.67608464", "0.675951", "0.675199", "0.6750833", "0.6747908", "0.6727895", "0.6726992" ]
0.0
-1
Parses the zip code source data set and loads it into the object for external consumption
private static void populateZipcodeList() { // only load the data once... if (ZipCodes.zipCodesList.size() > 0) { return; } List<String> headers = null; List<String> values = null; String line = null; // create handle the source data file InputStream stream = ZipCodes.class.getResourceAsStream("zipCodes.csv"); BufferedReader buffer = new BufferedReader(new InputStreamReader(stream)); try { // pull header row headers = Arrays.asList(buffer.readLine().split(",")); // add data rows while((line = buffer.readLine()) != null) { HashMap<String, String> zip = new HashMap<String, String>(); values = Arrays.asList(line.split(",")); for (int i = 0; i < headers.size(); i++) { zip.put(headers.get(i), values.get(i)); } ZipCodes.zipCodesList.add(zip); } stream.close(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void loadZipFile(String zipFileName, String classIndex)\n {\n InputStream trainSource = null, testSource = null;\n //The instance file is a zipped file containing a file called 'train' and one called 'test'\n try {\n ZipFile zipFile = new ZipFile(zipFileName);\n Enumeration entries = zipFile.entries();\n while(entries.hasMoreElements()) {\n ZipEntry entry = (ZipEntry)entries.nextElement();\n\n String name = entry.getName();\n if (name.equals(\"train.arff\"))\n {\n trainSource = zipFile.getInputStream(entry);\n }\n else if(name.equals(\"test.arff\"))\n {\n testSource = zipFile.getInputStream(entry);\n }\n else\n {\n //What is this?\n throw new RuntimeException(\"Unknown file in zip dataset '\" + name + \"'\");\n }\n }\n } catch (java.io.IOException e) {\n throw new RuntimeException(\"IO Operation failed\", e);\n }\n\n //Get the training data\n try {\n mTraining = Util.loadDataSource(trainSource);\n if (mTraining.classIndex() == -1){\n if(classIndex.equals(\"last\"))\n mTraining.setClassIndex(mTraining.numAttributes() - 1);\n else\n mTraining.setClassIndex(Integer.parseInt(classIndex));\n }\n } catch(Exception e) {\n throw new RuntimeException(\"Failed to load training data provided in zip\", e);\n }\n\n //Get the testing data\n try {\n mTesting = Util.loadDataSource(testSource);\n if (mTesting.classIndex() == -1){\n if(classIndex.equals(\"last\"))\n mTesting.setClassIndex(mTesting.numAttributes() - 1);\n else\n mTesting.setClassIndex(Integer.parseInt(classIndex));\n }\n } catch(Exception e) {\n throw new RuntimeException(\"Failed to load testing data provided in zip\", e);\n }\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 }", "public ZipDatabase() throws IOException {\r\n int line = 0;\r\n InputStream is = this.getClass().getResourceAsStream(\"zip.txt\");\r\n BufferedReader br = new BufferedReader(new InputStreamReader(is));\r\n String input;\r\n // parses entries of the form:\r\n // 03064,NH,NASHUA\r\n try {\r\n while ((input = br.readLine()) != null) {\r\n line++;\r\n StringTokenizer st = new StringTokenizer(input, \",\");\r\n if (st.countTokens() == 3) {\r\n String zip = st.nextToken();\r\n String state = st.nextToken();\r\n String city = st.nextToken();\r\n city = fixupCase(city);\r\n zipDB.put(zip, new ZipInfo(zip, city, state));\r\n } else {\r\n throw new IOException(\"Bad zip format, line \" + line);\r\n }\r\n }\r\n } finally {\r\n br.close();\r\n }\r\n }", "private void readSourceData() throws Exception {\n\t\tthis.fileDataList = new ArrayList<String>();\n\t\tReader reader = new Reader(this.procPath);\n\t\treader.running();\n\t\tthis.fileDataList = reader.getFileDataList();\n\t}", "void importDivision(Connection con, ZipFile zip) throws Exception;", "private ZipCodes() {}", "public void setZip(String zip);", "private static void processZip(File zip_name, final Histogram class_use, final Histogram method_use) {\n ZipFile zip_file;\n try {\n zip_file = new ZipFile(zip_name);\n } catch (Exception e) {\n throw new IllegalStateException(\"while reading archive '\"+zip_name+\"': \"+e);\n }\n final Enumeration< ? extends ZipEntry> en = zip_file.entries();\n while (en.hasMoreElements()) {\n final ZipEntry e = en.nextElement();\n final String e_name = e.getName();\n if (e.isDirectory()) continue;\n if (e_name.endsWith(\".class\")){\n try {\n final InputStream object_stream=zip_file.getInputStream(e);\n MethodCallEnumerator.analyzeClass(object_stream,class_use,method_use);\n object_stream.close();\n } catch (Exception ex) {\n throw new IllegalStateException(\"while processing: \"+ ex);\n }\n } \n }\n try {\n zip_file.close();\n } catch (Exception e) {\n throw new IllegalStateException(\"while reading archive: \" + e);\n }\n }", "private void setupSource() {\n source = new GeoJsonSource( geojsonSourceId, featureCollection );\n map.addSource( source );\n }", "void mo33697a(ZipFile zipFile, Set<C2090j> set) throws IOException;", "public ZipLineStream() {\n\t\tarchType = ArchiveTypes.ZIP.name();\n\t}", "void mo15917a(ZipFile zipFile, Set<C6556k> set) throws IOException;", "public static void readZip(String zipPath, boolean sort) throws IOException {\n // Load zip and its entries\n ZipFile zip = new ZipFile(new File(zipPath));\n Enumeration<? extends ZipEntry> entries = zip.entries();\n // Read every entry and load it to the HashMap\n while(entries.hasMoreElements()) {\n ZipEntry zipEntry = entries.nextElement();\n InputStream entryStream = zip.getInputStream(zipEntry);\n //Used only for the decoding mode\n //Compressed file that contains the Coded Data\n if(\"codedData.gz\".equals(zipEntry.getName())){\n FileInputStream in = new FileInputStream(\"codedData.gz\");\n GZIPInputStream gis = new GZIPInputStream(in);\n ObjectInputStream ois = new ObjectInputStream(gis);\n try {\n dataList = (ArrayList<CodedData>) (ois.readObject());\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(ProjectePractiques.class.getName()).log(Level.SEVERE, null, ex);\n }\n }else{\n BufferedImage image = ImageIO.read(entryStream);\n imageNames.add(zipEntry.getName()); \n imageDict.put(zipEntry.getName(), image);\n }\n }\n zip.close();\n // Sort the image names list\n if(sort){\n Collections.sort(imageNames, (String f1, String f2) -> f1.compareTo(f2)); \n }\n }", "public void setZipCode(String zipCode) {\n this.zipCode = zipCode;\n }", "MasterZipcode getByZipcodeCode(String zipcodeCode);", "private Map<String, SiteData> extractDataFromZip(InputStream attachmentInputStream) {\n\n Map<String, SiteData> sitesData = new HashMap<String, SiteData>();\n\n final NonCloseableZipInputStream zis = new NonCloseableZipInputStream(attachmentInputStream);\n\n try {\n ZipEntry entry;\n while ((entry = zis.getNextEntry()) != null) {\n // Skip directories\n if (entry.isDirectory()) {\n continue;\n }\n String filePath = entry.getName();\n // Skip empty entries (this allows empty zip files to not cause\n // exceptions).\n if (filePath.equals(\"\") || !filePath.startsWith(SiteConstants.SITE_CONTENTS_ROOT_PATH + \"/\")) {\n continue;\n }\n\n String siteName = extractSiteNameFromPath(filePath);\n\n // if we are in a site (for example /content/sites/acme), take only\n // the files relative to this site\n if (importedSiteName != null && !importedSiteName.equals(siteName)) {\n continue;\n }\n\n // metadata file ?\n if (filePath.endsWith(SiteMetaDataExportTask.FILENAME)) {\n // Unmarshall metadata xml file\n XStream xstream = new XStream();\n xstream.alias(\"metadata\", SiteMetaData.class);\n InputStreamReader isr = new InputStreamReader(zis, \"UTF-8\");\n SiteMetaData siteMetadata = (SiteMetaData) xstream.fromXML(isr);\n\n // Save unmarshalled metadata\n SiteData siteData = sitesData.get(siteName);\n if (siteData == null) {\n siteData = new SiteData();\n }\n siteData.setSiteMetadata(siteMetadata);\n sitesData.put(siteName, siteData);\n }\n // seo file ?\n else if (filePath.endsWith(SiteSEOExportTask.FILENAME)) {\n XStream xStream = new XStream();\n xStream.alias(\"seo\", List.class);\n InputStreamReader isr = new InputStreamReader(zis, \"UTF-8\");\n\n @SuppressWarnings(\"unchecked\")\n List<PageMetadataModel> models = (List<PageMetadataModel>) xStream.fromXML(isr);\n if (models != null && !models.isEmpty()) {\n for (PageMetadataModel pageMetadataModel : models) {\n seoService.storePageMetadata(pageMetadataModel, siteName, false);\n }\n }\n }\n // sysview file ?\n else {\n // Unmarshall sysview xml file to String\n log.info(\"Collecting the node \" + filePath);\n String nodeContent = IOUtils.toString(zis, \"UTF-8\");\n\n // Save unmarshalled sysview\n SiteData siteData = sitesData.get(siteName);\n if (siteData == null) {\n siteData = new SiteData();\n }\n Map<String, String> siteNodes = siteData.getNodeExportFiles();\n if (siteNodes == null) {\n siteNodes = new HashMap<String, String>();\n }\n siteNodes.put(filePath, nodeContent);\n siteData.setNodeExportFiles(siteNodes);\n sitesData.put(siteName, siteData);\n }\n }\n\n zis.reallyClose();\n } catch (Exception e) {\n throw new OperationException(this.operationName, \"Exception when reading the underlying data stream from import.\", e);\n }\n\n return sitesData;\n\n }", "public void setZipCode(java.lang.String zipCode) {\n this.zipCode = zipCode;\n }", "protected InputStream loadFile(String zipPath) throws Exception {\n\t\treturn Files.newInputStream(Paths.get(zipPath));\n\t}", "public void setZipCode(String zipCode) {\n this.zipCode = zipCode;\n }", "public void setZipCode(String zipCode) {\n this.zipCode = zipCode;\n }", "public PostalCodeDataBase()\n {\n codeToCityMap = new HashMap<String, Set<String>>();\n // additional instance variable(s) to be initialized in part (b)\n }", "private static List<Layout> parseLayout(String source) throws IOException{\n FileReader file = new FileReader(source);\n reader = new BufferedReader(file);\n List<Layout> layouts = new ArrayList<>();\n\n String line;\n\n while((line = reader.readLine()) != null){\n // first line - city + zip\n List<String> verticalStreets = new ArrayList<>();\n List<String> horizontalStreets = new ArrayList<>();\n\n String city = line.substring(line.indexOf(\":\") + 2, line.indexOf(\",\"));\n String zip = line.substring(line.indexOf(\",\") + 2);\n\n getStreets(verticalStreets);\n\n reader.readLine();\n getStreets(horizontalStreets);\n\n layouts.add(new Layout(city, zip, verticalStreets, horizontalStreets));\n }\n\n return layouts;\n }", "public Location(String state, String city) {\n try {\n this.city = city;\n this.state = state;\n\n Table<String,String,Demographics> allDemographics = Demographics.load(state);\n\n // this still works even if only 1 city given,\n // because allDemographics will only contain that 1 city\n // we copy the Map returned by the Google Table.row since the implementing\n // class is not serializable\n this.demographics = new HashMap<String, Demographics>(allDemographics.row(state));\n\n if (city != null\n && demographics.values().stream().noneMatch(d -> d.city.equalsIgnoreCase(city))) {\n throw new Exception(\"The city \" + city\n + \" was not found in the demographics file for state \" + state + \".\");\n }\n\n long runningPopulation = 0;\n // linked to ensure consistent iteration order\n populationByCity = new LinkedHashMap<>();\n populationByCityId = new LinkedHashMap<>();\n // sort the demographics to ensure tests pass regardless of implementing class\n // for this.demographics, see comment above on non-serializability of Google Table.row\n ArrayList<Demographics> sortedDemographics =\n new ArrayList<Demographics>(this.demographics.values());\n Collections.sort(sortedDemographics);\n for (Demographics d : sortedDemographics) {\n long pop = d.population;\n runningPopulation += pop;\n if (populationByCity.containsKey(d.city)) {\n populationByCity.put(d.city, pop + populationByCity.get(d.city));\n } else {\n populationByCity.put(d.city, pop);\n }\n populationByCityId.put(d.id, pop);\n }\n\n totalPopulation = runningPopulation;\n } catch (Exception e) {\n System.err.println(\"ERROR: unable to load demographics\");\n e.printStackTrace();\n throw new ExceptionInInitializerError(e);\n }\n\n String filename = null;\n try {\n filename = Config.get(\"generate.geography.zipcodes.default_file\");\n String csv = Utilities.readResource(filename, true, true);\n List<? extends Map<String,String>> ziplist = SimpleCSV.parse(csv);\n\n zipCodes = new HashMap<>();\n for (Map<String,String> line : ziplist) {\n Place place = new Place(line);\n\n if (!place.sameState(state)) {\n continue;\n }\n\n if (!zipCodes.containsKey(place.name)) {\n zipCodes.put(place.name, new ArrayList<Place>());\n }\n zipCodes.get(place.name).add(place);\n }\n } catch (Exception e) {\n System.err.println(\"ERROR: unable to load zips csv: \" + filename);\n e.printStackTrace();\n throw new ExceptionInInitializerError(e);\n }\n\n socialDeterminantsOfHealth = new HashMap<String, Map<String, Double>>();\n try {\n filename = Config.get(\"generate.geography.sdoh.default_file\",\n \"geography/sdoh.csv\");\n String csv = Utilities.readResource(filename, true, true);\n List<? extends Map<String,String>> sdohList = SimpleCSV.parse(csv);\n\n for (Map<String,String> line : sdohList) {\n String lineState = line.remove(\"STATE\");\n if (!lineState.equalsIgnoreCase(state)) {\n continue;\n }\n line.remove(\"FIPS_CODE\");\n line.remove(\"COUNTY_CODE\");\n String county = line.remove(\"COUNTY\");\n line.remove(\"ST\");\n\n Map<String, Double> sdoh = new HashMap<String, Double>();\n for (String attribute : line.keySet()) {\n Double probability = Double.parseDouble(line.get(attribute));\n sdoh.put(attribute.toLowerCase(), probability);\n }\n\n socialDeterminantsOfHealth.put(county, sdoh);\n }\n } catch (Exception e) {\n System.err.println(\"WARNING: unable to load SDoH csv: \" + filename);\n e.printStackTrace();\n }\n\n if (!socialDeterminantsOfHealth.isEmpty()) {\n Map<String, Double> averages = new HashMap<String, Double>();\n for (String county : socialDeterminantsOfHealth.keySet()) {\n Map<String, Double> determinants = socialDeterminantsOfHealth.get(county);\n for (String determinant : determinants.keySet()) {\n Double probability = determinants.get(determinant);\n Double sum = averages.getOrDefault(determinant, 0.0);\n averages.put(determinant, probability + sum);\n }\n }\n for (String determinant : averages.keySet()) {\n Double probability = averages.get(determinant);\n averages.put(determinant, (probability / socialDeterminantsOfHealth.keySet().size()));\n }\n socialDeterminantsOfHealth.put(\"AVERAGE\", averages);\n }\n }", "public void setZip(String s) {\r\n\t\tzip = s;\t\r\n\t}", "public SourceFile(File file) throws Exception {\r\n\t\t// this.file = file;\r\n\t\tthis.zipFile = new ZipFile(file, \"UTF-8\");\r\n\t}", "public void init(String zip, Application app) {\n if(weatherModel!=null){\n return;\n }\n\n //sets the original value to a banck weather model\n final MutableLiveData<WeatherModel> data = new MutableLiveData<>();\n data.setValue(new WeatherModel(\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\"));\n weatherModel=data;\n\n //loads the model from the repo\n weatherModel = ((WeatherApp)app).getWeatherRepo().loadWeather(zip);\n\n }", "private StreamSource getZipSource(final File requestedDirectory) {\n StreamSource zippedDirSource = new StreamSource() {\n private static final long serialVersionUID = 7060525220398731933L;\n public InputStream getStream() {\n // Pipe bauen, um Steam als Download umzulenken\n final CircularByteBuffer cbb = new CircularByteBuffer(1024);\n new Thread(\n new Runnable(){\n public void run(){\n ZipOutputStream zos = new ZipOutputStream(cbb.getOutputStream());\n Utils.zipDir(getVolume(), requestedDirectory.getPath(), zos);\n\n try {\n if (zos != null) {\n zos.flush();\n zos.close();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n ).start();\n\n return cbb.getInputStream();\n }\n };\n return zippedDirSource;\n }", "public void setZip(int zip) {\r\n\t\tthis.zip = zip;\r\n\t}", "public void setZipcode(String zipcode)\n {\n this.zipcode = zipcode;\n }", "private static List<Address> parseAddress(String source) throws IOException {\n FileReader file = new FileReader(source);\n reader = new BufferedReader(file);\n List<Address> addresses = new ArrayList<>();\n String line;\n\n while((line = reader.readLine()) != null){\n int length = 0;\n String number = line.substring(0, line.indexOf(\" \"));\n length += number.length() + 1;\n String street = line.substring(length, line.indexOf(\",\"));\n length += street.length() + 2;\n String city = line.substring(length, line.indexOf(\",\", length));\n length += city.length() + 2;\n String zip = line.substring(length);\n\n addresses.add(new Address(city, zip, number, street));\n }\n\n reader.close();\n return addresses;\n }", "private void parseData() {\n\t\t\r\n\t}", "public static void main(String[] args) throws IOException {\n\n _project _sc = _project.of();\n //reads from a maven-central jar file\n _downloadArchiveConsumer.of(\"https://search.maven.org/remotecontent?filepath=com/github/javaparser/javaparser-core/3.15.18/javaparser-core-3.15.18-sources.jar\",\n (ZipEntry ze, InputStream is)-> {\n if( ze.getName().endsWith(\".java\")){\n _sc.add( _codeUnit.of(is) );\n }\n });\n System.out.println( _sc.size() );\n\n _project _src = _githubProject.of(\"https://github.com/edefazio/bincat\").load();\n //_sources _src = _sources.of();\n //_downloadArchive _da = _downloadArchive.of(url, (ZipEntry ze,InputStream is)-> {\n // if( ze.getName().endsWith(\".java\")){\n // _src.add( _codeUnit.of(is) );\n // }\n //});\n /*\n try( InputStream inputStream = url.openStream();\n ZipInputStream zis = new ZipInputStream(inputStream) ) {\n\n byte[] buffer = new byte[2048];\n\n while (zis.available() > 0) {\n ZipEntry ze = zis.getNextEntry();\n System.out.println(\"reading \" + ze.getName());\n\n if( ze.isDirectory() ){\n ze.\n } else if( ze.)\n\n if (!ze.isDirectory() && ze.getName().endsWith(\".java\")) {\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n int len;\n while ((len = zis.read(buffer)) > 0) {\n baos.write(buffer, 0, len);\n }\n try {\n System.out.println(\"adding\" + ze.getName());\n _src.add(_codeUnit.of(baos.toString()));\n } catch (Exception e) {\n throw new _ioException(\"could not read from entry \" + ze.getName());\n }\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n */\n\n System.out.println( \"finished reading \"+ _src.size());\n }", "public static ToscaServiceTemplate decodeFile(String zipEntryName, InputStream entryData) throws CoderException {\n ToscaServiceTemplate toscaServiceTemplate = null;\n if (zipEntryName.endsWith(\".json\")) {\n toscaServiceTemplate = coder.decode(entryData, ToscaServiceTemplate.class);\n } else if (zipEntryName.endsWith(\".yml\")) {\n toscaServiceTemplate = yamlCoder.decode(entryData, ToscaServiceTemplate.class);\n }\n return toscaServiceTemplate;\n }", "ArrayList<String> getRepresentativeDataByZipcode(String zipcode) throws Exception\n\t{\n\t\tArrayList<String> returnData = new ArrayList<String>();\n\n\t\tString urlHalf1 = \"https://whoismyrepresentative.com/getall_mems.php?zip=\";\n\t\tString urlHalf2 = \"&output=json\";\n\n\t\tString url = urlHalf1 + zipcode + urlHalf2;\n\n\t\tJsonParser parser = new JsonParser();\n\n\t\tString jsonData = getJsonData(url);\n\n\t\tJsonElement jsonTree = parser.parse(jsonData);\n\n\t\tif (jsonTree.isJsonObject())\n\t\t{\n\t\t\tJsonObject treeObject = jsonTree.getAsJsonObject();\n\n\t\t\tJsonElement resultsElement = treeObject.get(\"results\");\n\n\t\t\tif (resultsElement.isJsonArray())\n\t\t\t{\n\t\t\t\tJsonArray resultsArray = resultsElement.getAsJsonArray();\n\n\t\t\t\tint count = 0;\n\n\t\t\t\t// Saves three representatives max from json\n\t\t\t\tfor (int pos = 0; pos < resultsArray.size() && count < 3; pos++)\n\t\t\t\t{\n\t\t\t\t\tJsonElement currentElement = resultsArray.get(pos);\n\n\t\t\t\t\tif (currentElement.isJsonObject())\n\t\t\t\t\t{\n\t\t\t\t\t\tJsonObject currentObject = currentElement.getAsJsonObject();\n\n\t\t\t\t\t\t// Add data to returnData array\n\t\t\t\t\t\treturnData.add(currentObject.get(\"name\").getAsString());\n\t\t\t\t\t\treturnData.add(currentObject.get(\"party\").getAsString());\n\t\t\t\t\t\treturnData.add(currentObject.get(\"phone\").getAsString());\n\t\t\t\t\t\treturnData.add(currentObject.get(\"link\").getAsString());\n\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn returnData;\n\t}", "protected void loadDataFromFile() throws IOException {\n \t\tInputStream is = null;\n \n \t\ttry {\n \t\t\tis = new BufferedInputStream(new GZIPInputStream(\n \t\t\t\t\tnew FileInputStream(this.dataFile)));\n \n \t\t\tint dataOffset = 0;\n \t\t\tByteArrayOutputStream os = new ByteArrayOutputStream();\n \n \t\t\twhile (true) {\n \t\t\t\tint b = is.read();\n \n \t\t\t\tif (b == 0) {\n \t\t\t\t\t// field separator reached.\n \t\t\t\t\tif (this.componentId == null) {\n \t\t\t\t\t\tbyte[] encoded = os.toByteArray();\n \t\t\t\t\t\tdataOffset += encoded.length;\n \t\t\t\t\t\tdataOffset += 1; // include the separator field\n \t\t\t\t\t\tcomponentId = new String(URLEncoding.decode(encoded),\n \t\t\t\t\t\t\t\t\"UTF-8\");\n \t\t\t\t\t} else if (this.query == null) {\n \t\t\t\t\t\tbyte[] encoded = os.toByteArray();\n \t\t\t\t\t\tdataOffset += encoded.length;\n \t\t\t\t\t\tdataOffset += 1; // include the separator field\n \n \t\t\t\t\t\ttry {\n \t\t\t\t\t\t\tString queryXml = new String(URLEncoding\n \t\t\t\t\t\t\t\t\t.decode(encoded), \"UTF-8\");\n \n \t\t\t\t\t\t\t// parse the query.\n \t\t\t\t\t\t\tSAXReader reader = new SAXReader();\n \t\t\t\t\t\t\tElement root = reader.read(\n \t\t\t\t\t\t\t\t\tnew StringReader(queryXml))\n \t\t\t\t\t\t\t\t\t.getRootElement();\n \t\t\t\t\t\t\tthis.query = root.getText();\n \t\t\t\t\t\t} catch (Exception e) {\n \t\t\t\t\t\t\tthrow new IOException(\n \t\t\t\t\t\t\t\t\t\"Cannot unmarshall cached query.\");\n \t\t\t\t\t\t}\n \t\t\t\t\t} else if (this.optionalParams == null) {\n \t\t\t\t\t\tbyte[] encoded = os.toByteArray();\n \t\t\t\t\t\tdataOffset += encoded.length;\n \t\t\t\t\t\tdataOffset += 1; // include the separator field\n \n \t\t\t\t\t\tif (encoded.length > 0) {\n \t\t\t\t\t\t\tMap optionalParams = new HashMap();\n \t\t\t\t\t\t\tString urlEncoded = new String(URLEncoding\n \t\t\t\t\t\t\t\t\t.decode(encoded), \"UTF-8\");\n \t\t\t\t\t\t\tStringTokenizer tokenizer = new StringTokenizer(\n\t\t\t\t\t\t\t\t\turlEncoded, \"&\", false);\n \n \t\t\t\t\t\t\twhile (tokenizer.hasMoreTokens()) {\n String param = tokenizer.nextToken();\n\t\t\t\t\t\t\t\tString key = param.substring(0, param.indexOf('='));\n\t\t\t\t\t\t\t\tString value = param.substring(param.indexOf('=')+1);\n \t\t\t\t\t\t\t\toptionalParams.put(key, value);\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\tthis.optionalParams = optionalParams;\n \t\t\t\t\t\t} else {\n \t\t\t\t\t\t\tthis.optionalParams = null;\n \t\t\t\t\t\t}\n \n \t\t\t\t\t\tthis.dataOffset = dataOffset;\n \t\t\t\t\t\treturn;\n \t\t\t\t\t}\n \n \t\t\t\t\tos.reset();\n \t\t\t\t} else if (b == -1) {\n \t\t\t\t\tthrow new IOException(\"Premature end of cached file.\");\n \t\t\t\t} else {\n \t\t\t\t\tos.write(b);\n \t\t\t\t}\n \t\t\t}\n \t\t} finally {\n \t\t\tif (is != null) {\n \t\t\t\ttry {\n \t\t\t\t\tis.close();\n \t\t\t\t} catch (IOException e) {\n \t\t\t\t\tlog.error(\"Cannot close input cache file: \"\n \t\t\t\t\t\t\t+ this.dataFile.getAbsolutePath());\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}", "public void setZipCode(String zipCode) {\n\t\tthis.zipCode = zipCode;\n\t}", "public void parseSourceCode(String code) {\r\n sourceCode = code;\r\n index = 0;\r\n curlyBracketsLevel = 0;\r\n currentPackage = \"\";\r\n currentClass = null;\r\n inMethod = false;\r\n imports = new HashMap<>();\r\n parse();\r\n }", "public java.util.List<org.landxml.schema.landXML11.SourceDataDocument.SourceData> getSourceDataList()\r\n {\r\n final class SourceDataList extends java.util.AbstractList<org.landxml.schema.landXML11.SourceDataDocument.SourceData>\r\n {\r\n public org.landxml.schema.landXML11.SourceDataDocument.SourceData get(int i)\r\n { return SurfaceImpl.this.getSourceDataArray(i); }\r\n \r\n public org.landxml.schema.landXML11.SourceDataDocument.SourceData set(int i, org.landxml.schema.landXML11.SourceDataDocument.SourceData o)\r\n {\r\n org.landxml.schema.landXML11.SourceDataDocument.SourceData old = SurfaceImpl.this.getSourceDataArray(i);\r\n SurfaceImpl.this.setSourceDataArray(i, o);\r\n return old;\r\n }\r\n \r\n public void add(int i, org.landxml.schema.landXML11.SourceDataDocument.SourceData o)\r\n { SurfaceImpl.this.insertNewSourceData(i).set(o); }\r\n \r\n public org.landxml.schema.landXML11.SourceDataDocument.SourceData remove(int i)\r\n {\r\n org.landxml.schema.landXML11.SourceDataDocument.SourceData old = SurfaceImpl.this.getSourceDataArray(i);\r\n SurfaceImpl.this.removeSourceData(i);\r\n return old;\r\n }\r\n \r\n public int size()\r\n { return SurfaceImpl.this.sizeOfSourceDataArray(); }\r\n \r\n }\r\n \r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return new SourceDataList();\r\n }\r\n }", "public void setSrcZip(String value) {\r\n setAttributeInternal(SRCZIP, value);\r\n }", "public void parseMXL() {\n try {\n unzipMXL();\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n }", "protected void load() {\n codeFolder = new File(folder, \"code\");\n dataFolder = new File(folder, \"data\");\n\n // get list of files in the sketch folder\n String list[] = folder.list();\n\n // reset these because load() may be called after an\n // external editor event. (fix for 0099)\n codeCount = 0;\n\n code = new SketchCode[list.length];\n\n String[] extensions = getExtensions();\n\n for (String filename : list) {\n // Ignoring the dot prefix files is especially important to avoid files\n // with the ._ prefix on Mac OS X. (You'll see this with Mac files on\n // non-HFS drives, i.e. a thumb drive formatted FAT32.)\n if (filename.startsWith(\".\")) continue;\n\n // Don't let some wacko name a directory blah.pde or bling.java.\n if (new File(folder, filename).isDirectory()) continue;\n\n // figure out the name without any extension\n String base = filename;\n // now strip off the .pde and .java extensions\n for (String extension : extensions) {\n if (base.toLowerCase().endsWith(\".\" + extension)) {\n base = base.substring(0, base.length() - (extension.length() + 1));\n\n // Don't allow people to use files with invalid names, since on load,\n // it would be otherwise possible to sneak in nasty filenames. [0116]\n if (Sketch.isSanitaryName(base)) {\n code[codeCount++] =\n new SketchCode(new File(folder, filename), extension);\n }\n }\n }\n }\n // Remove any code that wasn't proper\n code = (SketchCode[]) PApplet.subset(code, 0, codeCount);\n\n // move the main class to the first tab\n // start at 1, if it's at zero, don't bother\n for (int i = 1; i < codeCount; i++) {\n //if (code[i].file.getName().equals(mainFilename)) {\n if (code[i].getFile().equals(primaryFile)) {\n SketchCode temp = code[0];\n code[0] = code[i];\n code[i] = temp;\n break;\n }\n }\n\n // sort the entries at the top\n sortCode();\n\n // set the main file to be the current tab\n if (editor != null) {\n setCurrentCode(0);\n }\n }", "public void parse() throws IOException, StopDataMissingException, JSONException{\n DataProvider dataProvider = new FileDataProvider(filename);\n\n parseStops(dataProvider.dataSourceToString());\n }", "DatasetFileService getSource();", "public void setZip(String zip) {\r\n this.zip = zip == null ? null : zip.trim();\r\n }", "public static void dataSetter() {\n\t\ttry {\n\t\t\t//Sets jsonCities to the JSONObject called in the FileParser class\n\t\t\tjsonCities = FileParser.dataSetter();\n\t\n\t\t}\n\t\t//This exception is to stop misreading files\n\t\t//Same as all other cases below\n\t\tcatch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public ASCTerrain(String zfile) {\n int count;\n try {\n ZipInputStream zis = new ZipInputStream(ASCTerrain.class.getResourceAsStream(\"/assets/\" + zfile));\n ZipEntry ze = zis.getNextEntry();\n System.out.println(\"Opening file: \" + ze.getName());\n byte[] asc = new byte[(int) ze.getSize()];\n count = 0;\n // Read the entire data for the file.\n while (count < ze.getSize()) {\n count += zis.read(asc, count, (int) (ze.getSize() - count));\n }\n process(readFile(asc));\n zis.closeEntry();\n zis.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void setZipcode(String newZip) {\n this.zipCode = newZip;\n }", "private void extractLibraryData( final ArrayList librarys,\n final ArrayList fileset )\n throws TaskException\n {\n if( !fileset.isEmpty() )\n {\n final Extension[] extensions = getExtensions( fileset );\n for( int i = 0; i < extensions.length; i++ )\n {\n librarys.add( extensions[ i ] );\n }\n }\n }", "private void refreshSource() {\n if (source != null && featureCollection != null) {\n source.setGeoJson( featureCollection );\n }\n }", "private void initData() {\n\t\tnamesInfo = new NameSurferDataBase(fileName);\n\n\t}", "String[] getRawWeatherDataByZipcode(String zipcode) throws JsonSyntaxException, Exception\n\t{\n\t\tfinal String urlHalf1 = \"http://api.openweathermap.org/data/2.5/weather?q=\";\n\t\tfinal String apiCode = \"&APPID=0bc46790fafd1239fff0358dc4cbe982\";\n\n\t\tString url = urlHalf1 + zipcode + \",us\" + apiCode;\n\n\t\tString[] weatherData = new String[4];\n\n\t\tJsonParser parser = new JsonParser();\n\n\t\tString hitUrl = url;\n\t\tString jsonData = getJsonData(hitUrl);\n\n\t\tJsonElement jsonTree = parser.parse(jsonData);\n\n\t\tif (jsonTree.isJsonObject())\n\t\t{\n\t\t\tJsonObject jsonObject = jsonTree.getAsJsonObject();\n\n\t\t\tJsonElement weather = jsonObject.get(\"weather\");\n\t\t\tJsonElement main = jsonObject.get(\"main\");\n\n\t\t\tif (weather.isJsonArray())\n\t\t\t{\n\t\t\t\tJsonArray weatherArray = weather.getAsJsonArray();\n\n\t\t\t\tJsonElement skyElement = weatherArray.get(0);\n\n\t\t\t\tif (skyElement.isJsonObject())\n\t\t\t\t{\n\t\t\t\t\tJsonObject skyObject = skyElement.getAsJsonObject();\n\n\t\t\t\t\tJsonElement skyData = skyObject.get(\"description\");\n\n\t\t\t\t\tweatherData[0] = skyData.getAsString();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (main.isJsonObject())\n\t\t\t{\n\t\t\t\tJsonObject mainToObject = main.getAsJsonObject();\n\t\t\t\tSystem.out.println(mainToObject.toString());\n\n\t\t\t\tJsonElement tempMin = mainToObject.get(\"temp_min\");\n\t\t\t\tJsonElement tempMax = mainToObject.get(\"temp_max\");\n\t\t\t\tJsonElement temp = mainToObject.get(\"temp\");\n\n\t\t\t\tweatherData[1] = tempMax.getAsString();\n\t\t\t\tweatherData[2] = tempMin.getAsString();\n\t\t\t\tweatherData[3] = temp.getAsString();\n\t\t\t}\n\t\t}\n\n\t\treturn weatherData;\n\t}", "private Templates load(URL fileSource) throws Exception {\n return m_factory.newTemplates(new StreamSource(fileSource.openStream()));\n }", "private static void unzip(EmailTypes collection) {\n File dir = new File(destDir);\n // create output directory if it doesn't exist\n if(!dir.exists()) {\n dir.mkdirs();\n }\n FileInputStream fis;\n //buffer for read and write data to file\n byte[] buffer = new byte[1024];\n try {\n fis = new FileInputStream(sourceFiles.get(collection).getPath());\n ZipInputStream is = new ZipInputStream(fis);\n ZipEntry zipEntry = is.getNextEntry();\n System.out.println(\"Unzipping set: \" + collection.getCollection() + \".\");\n while(zipEntry != null){\n String fileName = zipEntry.getName();\n File newFile = new File(unpackedFiles.get(collection) + File.separator + fileName);\n new File(newFile.getParent()).mkdirs();\n FileOutputStream fos = new FileOutputStream(newFile);\n int len;\n while ((len = is.read(buffer)) > 0) {\n fos.write(buffer, 0, len);\n }\n fos.close();\n is.closeEntry();\n zipEntry = is.getNextEntry();\n }\n is.closeEntry();\n is.close();\n fis.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void inflateFromFile() {\n\t\t\n\t\tFile file = null;\t\t\n\t\ttry {\n\t\t\tfile = new File(FILE_PATH);\n\t\t} catch (NullPointerException e) {\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t\tFileReader reader = null;\t\t\n\t\ttry {\n\t\t\treader = new FileReader(file);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Can't find source (json file)\");\n\t\t\tSystem.err.println(e.getMessage());\n\t\t\tSystem.exit(1);\n\t\t\t\n\t\t}\n\t\t\n\t\tJSONObject jsonObject = new JSONObject(\n\t\t\t\tnew JSONTokener(reader)\n\t\t\t\t);\n\t\t\n\t\tJSONArray array = jsonObject.getJSONArray(\"students\");\n\t\t\n\t\tfor (int i = 0; i < array.length(); i++) {\t\t\t\n\t\t\tJSONObject student = array.getJSONObject(i);\t\t\t\n\t\t\tString name = student.getString(\"name\");\n\t\t\tString secondName = student.getString(\"secondName\");\n\t\t\tString surname = student.getString(\"surname\");\n\t\t\tString birthday = student.getString(\"birthday\");\n\t\t\tString facultet = student.getString(\"facultet\");\n\t\t\tint groupNumber = student.getInt(\"groupNumber\");\n\t\t\t\n\t\t\tDate dateBirthday = null; \n\t\t\t//делаем Date из строки\t\t\t\n\t\t\ttry {\n\t\t\t\tdateBirthday = new SimpleDateFormat(\"dd.MM.yyyy\").parse(birthday);\n\t\t\t} catch(ParseException e) {\n\t\t\t\tSystem.err.println(\"Can't understand the date format from source.\");\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tstudents.add(\n\t\t\t\t\tStudent.get(name, secondName, surname, dateBirthday, facultet, groupNumber)\n\t\t\t\t\t);\t\t\t\n\t\t}\t\t\t\n\t}", "public void setZipCode(String zipCode) {\n this.zipCode = zipCode == null ? null : zipCode.trim();\n }", "public DataGeocoderImpl() {\r\n\t\tmanager = DALLocator.getDataManager();\r\n\t}", "public void setZip(int value) {\n this.zip = value;\n }", "public static void main(String[] args) throws Exception {\r\n ZipDatabase zipDB = new ZipDatabase();\r\n\r\n BufferedReader br = \r\n new BufferedReader(new InputStreamReader(System.in));\r\n while (true) {\r\n System.out.print(\"Enter zip: \");\r\n String zip = br.readLine();\r\n System.out.println(\"Input: \" + zip);\r\n\r\n ZipInfo info = zipDB.lookup(zip);\r\n System.out.println(\"Output: \" + info);\r\n }\r\n }", "public abstract void setZipCode(String sValue);", "public GeotiffDataSource() {}", "void Parse(Source source);", "public ZipInfo lookup(String zipcode) {\r\n return (ZipInfo) zipDB.get(zipcode);\r\n }", "@Override\n\tpublic void loadModels(ZipInputStream zin)\n\t{\n\t\tf_xmls = new JointFtrXml[1];\n\t\ts_models = null;\n\t\tZipEntry zEntry;\n\t\tString entry;\n\t\t\t\t\n\t\ttry\n\t\t{\n\t\t\twhile ((zEntry = zin.getNextEntry()) != null)\n\t\t\t{\n\t\t\t\tentry = zEntry.getName();\n\t\t\t\t\n\t\t\t\tif (entry.equals(ENTRY_CONFIGURATION))\n\t\t\t\t\tloadDefaultConfiguration(zin);\n\t\t\t\telse if (entry.startsWith(ENTRY_FEATURE))\n\t\t\t\t\tloadFeatureTemplates(zin, Integer.parseInt(entry.substring(ENTRY_FEATURE.length())));\n\t\t\t\telse if (entry.startsWith(ENTRY_FRAMES))\n\t\t\t\t\tloadFrames(zin);\n\t\t\t\telse if (entry.equals(ENTRY_LEXICA))\n\t\t\t\t\tloadLexica(zin);\n\t\t\t\telse if (entry.startsWith(ENTRY_MODEL))\n\t\t\t\t\tloadStatisticalModels(zin, Integer.parseInt(entry.substring(ENTRY_MODEL.length())));\n\t\t\t\telse if (entry.startsWith(ENTRY_WEIGHTS))\n\t\t\t\t\tloadWeightVector(zin, Integer.parseInt(entry.substring(ENTRY_WEIGHTS.length())));\n\t\t\t}\t\t\n\t\t}\n\t\tcatch (Exception e) {e.printStackTrace();}\n\t}", "public final void mo33961a(ZipFile zipFile, Set<C2339j> set) throws IOException {\n this.f2022d.m1441f(this.f2019a, set, new C2333d(this));\n }", "public void readFromSource() {\n\t\ttry {\n\t\t\tif (date != null && !date.isEmpty())\n\t\t\t\tif (hour != null && !hour.isEmpty())\n\t\t\t\t\treadHourData();\n\t\t\t\telse\n\t\t\t\t\treadDayData();\n\t\t\telse\n\t\t\t\tthrow new Exception(\"Date and hour cannot be null\");\n\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(e.getLocalizedMessage(), e);\n\t\t}\n\t}", "public static DBMaker openZip(String zip) {\n DBMaker m = new DBMaker();\n m.location = \"$$ZIP$$://\"+zip;\n return m;\n }", "private List<GeneralResultRow> getData(FeatureSource<?, ?> featureSource)\n\t\t\tthrows Exception {\n\t\tif (featureSource == null) {\n\t\t\tException mple = new Exception(\"featureSource is null\");\n\t\t\tmple.printStackTrace();\n\t\t\tthrow mple;\n\t\t}\n\t\tthis.crs=featureSource.getSchema()\n\t\t\t\t.getCoordinateReferenceSystem();\n\t\tString crs = org.geotools.gml2.bindings.GML2EncodingUtils\n\t\t\t\t.epsgCode(this.crs);\n\t\tif (crs == null) {\n\t\t\tcrs = \"\" + Config.EPSG_CODE + \"\";\n\t\t}else{\n\t\t\ttry {\n\t\t\t\tint code=CRS.lookupEpsgCode(featureSource.getSchema().getCoordinateReferenceSystem(), true);\n\t\t\t\t//System.out.println(\"the code is: \"+code);\n\t\t\t\tcrs = String.valueOf(code);\n\t\t\t} catch (FactoryException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t//e1.printStackTrace();\n\t\t\t}\n\t\t}\n\t\tthis.crsstring=crs;\n\t\t\n\t\tFeatureCollection<?, ?> collection = featureSource.getFeatures();\n\t\tFeatureIterator<?> iterator = collection.features();\n\t\tList<GeneralResultRow> resultlist = new ArrayList<GeneralResultRow>();\n\t\ttry {\n\t\t\tdouble total_thematic_duration=0.0;\n\t\t\tdouble total_duration_geom=0.0;\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\t\n\t\t\t\tlong startTime = System.nanoTime();\n\t\t\t\tFeature feature = iterator.next();\n\t\t\t\tGeneralResultRow newrow = new GeneralResultRow(); // new row\n\t\t\t\tfor (Property p : feature.getProperties()) {\n\t\t\t\t\tnewrow.addPair(p.getName().getLocalPart(), p.getValue());\n\t\t\t\t}\n\t\t\t\tlong endTime = System.nanoTime();\n\t\t\t\tdouble duration = (endTime - startTime) / 1000000; // divide by\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 1000000 to\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// get\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// milliseconds.\n\t\t\t\ttotal_thematic_duration += duration;\n\t\t\t\tPrintTimeStats.printTime(\"Read Thematic from file\", duration);\n\t\t\t\t\n\t\t\t\tnewrow.addPair(primarykey, KeyGenerator.Generate()); // Add\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// primary\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// key\n\t\t\t\tstartTime = System.nanoTime();\n\t\t\t\tGeometryAttribute sourceGeometryAttribute = feature\n\t\t\t\t\t\t.getDefaultGeometryProperty();\n\t\t\t\tendTime = System.nanoTime();\n\t\t\t\tduration = (endTime - startTime) ; // divide by\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// 1000000 to\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// get\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// milliseconds.\n\t\t\t\ttotal_duration_geom+= duration;\n\t\t\t\tPrintTimeStats.printTime(\"Read Geometry from file\", duration);\n\t\t\t\t\n\n\t\t\t\t//RowHandler.handleGeometry(newrow, (Geometry)sourceGeometryAttribute.getValue(), crs);\n\t\t\t\tresultlist.add(newrow);\n\t\t\t}\n\t\t\tPrintTimeStats.printTime(\"Read Thematic data (total) from file\", total_thematic_duration);\n\t\t\tPrintTimeStats.printTime(\"Read Geometries (total) from file\", total_duration_geom);\n\t\t} finally {\n\t\t\titerator.close();\n\t\t}\n\n\t\treturn resultlist;\n\t}", "public abstract String getZipCode();", "private ZipCompressor(){}", "private OSPARRecords parseExcelFile(String excelFilePath) {\n\n\t\ttry {\n\n\t\t\tGsonBuilder builder = new GsonBuilder();\n\t\t\tbuilder.setPrettyPrinting();\n\t\t\tGson gson = builder.create();\n\t\t\t\n\t\t\t\n\t\t\tOSPARRecords or = new OSPARRecords();\n\n\t\t\tFile file = new File(excelFilePath);\n\t\t\tFileInputStream inputStream = new FileInputStream(new File(excelFilePath));\n\n\t\t\tWorkbook workbook = new HSSFWorkbook(inputStream);\n\t\t\tSheet firstSheet = workbook.getSheetAt(0);\n\n\t\t\tint row = 0;\n\n\t\t\tDataFormatter formatter = new DataFormatter();\n\t\t\t\n\t\t\t\n\t\t\twhile (true) {\n\t\t\t\tRow nextRow = firstSheet.getRow(row);\n\n\t\t\t\tif (nextRow == null) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tString value=nextRow.getCell(0)+\"\";\n\t\t\t\t\n\t\t\t\tif (value.equals(\"\")) {\n\t\t\t\t\t\n\t\t\t\t\tString v3=nextRow.getCell(3)+\"\";\n\t\t\t\t\t\n\t\t\t\t\tif (!v3.equals(\"Source/Reference\")) {\n\t\t\t\t\t\tSystem.out.println(excelFilePath+\"\\t\"+or.CasNo+\"\\t\"+v3+\"\\t\"+value);\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\trow++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (value.equals(\"null\")) break;\n\t\t\t\t\n\t\t\t\tfloat fvalue=Float.parseFloat(value);\n\t\t\t\tDecimalFormat decform=new DecimalFormat(\"0.0\");\n\t\t\t\tString svalue=decform.format(fvalue);\n\t\t\t\t\n//\t\t\t\tSystem.out.println(or.CasNo+\"\\t\"+svalue);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tdata_field df = createDataField(nextRow);\n\t\t\t\t\n\t\t\t\tif (df.Value.equals(\"\") && df.Source_Reference.equals(\"\")) {\n\t\t\t\t\trow++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t\tif (svalue.equals(\"0.0\")) \n\t\t\t\t\tor.Name=df.Value;\n\t\t\t\tif (svalue.equals(\"1.1\"))\n\t\t\t\t\tor.CasNo=convertCAS(df.Value);\n\t\t\t\tif (svalue.equals(\"1.2\"))\n\t\t\t\t\tor.EINECS=df.Value;\n\t\t\t\tif (svalue.equals(\"1.3\"))\n\t\t\t\t\tor.Synonym=df.Value;\n\t\t\t\tif (svalue.equals(\"1.4\"))\n\t\t\t\t\tor.Group_Function=df.Value;\n\t\t\t\tif (svalue.equals(\"1.5\"))\n\t\t\t\t\tor.Initial_Selection=df.Value;\n\t\t\t\tif (svalue.equals(\"1.6\"))\n\t\t\t\t\tor.Prioritized_For_Action=df.Value;\n\n\t\t\t\tif (svalue.equals(\"2.1\"))\n\t\t\t\t\tor.Molecular_weight.add(df);\n\t\t\t\tif (svalue.equals(\"2.2\"))\n\t\t\t\t\tor.Water_Solubility.add(df);\n\t\t\t\tif (svalue.equals(\"2.3\"))\n\t\t\t\t\tor.Vapor_Pressure.add(df);\n\n\t\t\t\tif (svalue.equals(\"3.1\"))\n\t\t\t\t\tor.Abiotic_OH_Oxidation_t1_2_d.add(df);\n\t\t\t\tif (svalue.equals(\"3.2\"))\n\t\t\t\t\tor.Photolysis_t1_2_d.add(df);\n\t\t\t\tif (svalue.equals(\"3.3\"))\n\t\t\t\t\tor.Ready_Biodegradability.add(df);\n\t\t\t\tif (svalue.equals(\"3.4\"))\n\t\t\t\t\tor.Halflife.add(df);\n\t\t\t\tif (svalue.equals(\"3.5\"))\n\t\t\t\t\tor.Inherent_Biodegradability.add(df);\n\t\t\t\tif (svalue.equals(\"3.6\"))\n\t\t\t\t\tor.Biodeg_QSAR.add(df);\n\t\t\t\t\n\t\t\t\tif (svalue.equals(\"4.1\"))\n\t\t\t\t\tor.logKow.add(df);\n\t\t\t\tif (svalue.equals(\"4.2\"))\n\t\t\t\t\tor.Bcf.add(df);\n\n\t\t\t\tif (svalue.equals(\"5.1\"))\n\t\t\t\t\tor.Acute_toxicity_algae.add(df);\n\t\t\t\tif (svalue.equals(\"5.2\"))\n\t\t\t\t\tor.Acute_toxicity_daphnia.add(df);\n\t\t\t\tif (svalue.equals(\"5.3\"))\n\t\t\t\t\tor.Acute_toxicity_fish.add(df);\n\t\t\t\tif (svalue.equals(\"5.4\"))\n\t\t\t\t\tor.Chronic_toxicity_daphnia.add(df);\n\t\t\t\tif (svalue.equals(\"5.5\"))\n\t\t\t\t\tor.Chronic_toxicity_fish.add(df);\n\t\t\t\tif (svalue.equals(\"5.6\"))\n\t\t\t\t\tor.Aquatox_QSAR.add(df);\n\t\t\t\tif (svalue.equals(\"5.7\"))\n\t\t\t\t\tor.Aquatic_toxicity_Other.add(df);\n\n\n\t\t\t\tif (svalue.equals(\"6.1\"))\n\t\t\t\t\tor.Acute_toxicity.add(df);\n\t\t\t\tif (svalue.equals(\"6.2\"))\n\t\t\t\t\tor.Carcinogenicity.add(df);\n\t\t\t\tif (svalue.equals(\"6.3\"))\n\t\t\t\t\tor.Chronic_toxicity.add(df);\n\t\t\t\tif (svalue.equals(\"6.4\"))\n\t\t\t\t\tor.Mutagenicity.add(df);\n\t\t\t\tif (svalue.equals(\"6.5\"))\n\t\t\t\t\tor.Reprotoxicity.add(df);\n\n\n\t\t\t\tif (svalue.equals(\"7.1\"))\n\t\t\t\t\tor.Production_Volume.add(df);\n\t\t\t\tif (svalue.equals(\"7.2\"))\n\t\t\t\t\tor.Use_Industry_Category.add(df);\n\t\t\t\tif (svalue.equals(\"7.3\"))\n\t\t\t\t\tor.Use_in_articles.add(df);\n\t\t\t\tif (svalue.equals(\"7.4\"))\n\t\t\t\t\tor.Environm_Occur_Measured.add(df);\n\t\t\t\tif (svalue.equals(\"7.5\"))\n\t\t\t\t\tor.Environm_Occur_Modelled.add(df);\n\n\t\t\t\tif (svalue.equals(\"8.1\"))\n\t\t\t\t\tor.Dir_67_548_EEC_Classification.add(df);\n\t\t\t\tif (svalue.equals(\"8.2\"))\n\t\t\t\t\tor.Reg_793_93_EEC_Existing_substances.add(df);\n\t\t\t\tif (svalue.equals(\"8.3\"))\n\t\t\t\t\tor.Dir_2000_60_EEC_WFD.add(df);\n\t\t\t\tif (svalue.equals(\"8.4\"))\n\t\t\t\t\tor.Dir_76_769_EEC_M_U.add(df);\n\t\t\t\tif (svalue.equals(\"8.5\"))\n\t\t\t\t\tor.Dir_76_464_EEC_water.add(df);\n\t\t\t\tif (svalue.equals(\"8.6\"))\n\t\t\t\t\tor.Dir_91_414_EEC_ppp.add(df);\n\t\t\t\tif (svalue.equals(\"8.7\"))\n\t\t\t\t\tor.Dir_98_8_EEC_biocid.add(df);\n\n\t\t\t\tif (svalue.equals(\"9.1\"))\n\t\t\t\t\tor.Hazard_assessment_OECD.add(df);\n\t\t\t\tif (svalue.equals(\"9.2\"))\n\t\t\t\t\tor.Other_risk_assessments.add(df);\n\n\t\t\t\trow++;\n\n\t\t\t}\n\n\t\t\tinputStream.close();\n\t\t\treturn or;\n\t\t\t\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "private void init(AnalyticSource source) throws AnalysisException {\n columnValuesMap = new HashMap<String,ColumnValueAnalysisResult>();\n\n HadoopAnalyticSource hadoopSource = (HadoopAnalyticSource) source;\n //hadoopSource.getHadoopFileStructureModel().\n String errString;\n //Setting purefilename\n String pureFileName =hadoopSource.getFileName();\n if(null==pureFileName||\"\".equals(pureFileName.trim())){\n errString=\"File name[\"+pureFileName+\"] is either empty or null\";\n throw new IllegalArgumentException(errString);\n }\n setPureFileName(pureFileName);\n //Setting pig server\n setPigServer(acquirePigServerInfo(hadoopSource));\n //Setting the column names\n ValueAnalysisConfig config = (ValueAnalysisConfig) source\n .getAnalyticConfig();\n String cNames = config.getColumnNames();\n if(null==cNames||\"\".equals(cNames.trim())){\n errString=\"Column names[\"+cNames+\"] are either empty or null\";\n throw new IllegalArgumentException(errString);\n }\n setColumnNames(new TreeSet<String>(Arrays.asList(cNames.split(\",\"))));\n fetchColumnValuePairs(hadoopSource.getHadoopFileStructureModel());\n //Setting locale\n Locale loc=hadoopSource.getAnalyticConfig().getLocale();\n if(null==loc){\n itsLogger.error(\"Could not acquire Locale yet will try to continue\");\n }\n setLocale(hadoopSource.getAnalyticConfig().getLocale());\n //Setting pigData source variable name\n String pigDataSourceName = hadoopSource.getInputTempName();\n if(null==pigDataSourceName||\"\".equals(pigDataSourceName.trim())){\n errString=\"PigDataSource name[\"+pigDataSourceName+\"] is either empty or null\";\n throw new IllegalArgumentException(errString);\n }\n setLoadedVariableName(pigDataSourceName);\n initNumberAndTextColumns();\n }", "List<MasterZipcode> getAll();", "public void showOneZipMarket(String zip){\n Long lZip = ParserUtils.tryCastStrToLong(zip);\n if(lZip.equals(0l) || !propertyInfo.containsKey(lZip)){\n System.out.println(0);\n }else{\n Property pro = propertyInfo.get(lZip);\n System.out.println(lZip+\" \"+pro.calAvgMarket());\n }\n }", "public SourceCode() {\n }", "public Layer[] reconstruct(){\r\n ArrayList<String[]> rawData = pullFromText(location);\r\n return rawData != null ? reformat(rawData) : null;\r\n }", "public FlexData() {\n entryCollectionList = null;\n entryCollectionMap = null;\n type = Type.UNKNOWN;\n standardDateFormat = \"yyyy-MM-dd\"; // DB2-Datum\n\t}", "public void loadGzipedSchematic(File f) throws IOException {\nDataInputStream in = new DataInputStream(new GZIPInputStream(new FileInputStream(f)));\nloadUncompressedSchematic(in);\nin.close();\n}", "public String getSrcZip() {\r\n return (String) getAttributeInternal(SRCZIP);\r\n }", "public void process(String pathname) {\n\t\tFile file = new File( pathname );\n\t\tString filename = file.getName();\n\t\tString source = filename.substring( 5, filename.length()-19 );\n\t\tSQLDataSourceDescriptor dsd = sqlDataSourceHandler.getDataSourceDescriptor(source);\n\t\tif (dsd == null) {\n\t\t\tlogger.log(Level.SEVERE, \"skipping: \" + pathname + \" (datasource is invalid)\");\n\t\t\treturn;\n\t\t}\n\t\tSQLDataSource ds = null;\n\t\tVDXSource vds = null;\n\t\ttry {\n\t\t\tObject ods = dsd.getSQLDataSource();\n\t\t\tif (ods != null) {\n\t\t\t\tds = dsd.getSQLDataSource();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t}\n\t\t\n\t\tint defaultRank = 0;\n\t\tint lineLen1, lineLen2;\n\t\tif ( ds != null ) {\n\t\t\t// This is an SQL DataSource\n\t\t\t\n\t\t\t// Build map of channels\n\t\t\tchannelMap = new HashMap<String, Integer>();\n\t\t\tfor ( Channel ch: ds.defaultGetChannelsList(false) )\n\t\t\t\tchannelMap.put( ch.getCode(), ch.getCID() );\n\t\t\tlogger.info( \"Channels mapped: \" + channelMap.size() );\n\t\t\t\n\t\t\t// Build map of columns\n\t\t\tcolumnMap = new HashMap<String, Integer>();\n\t\t\tfor ( Column col: ds.defaultGetColumns(true,ds.getMenuColumnsFlag()) )\n\t\t\t\tcolumnMap.put( col.name, col.idx );\n\t\t\tlogger.info( \"Columns mapped: \" + columnMap.size() );\n\t\t\t\n\t\t\t// Build map of ranks\n\t\t\trankMap = new HashMap<String, Integer>();\n\t\t\tfor ( String rk: ds.defaultGetRanks() ) {\n\t\t\t\tString rkBits[] = rk.split(\":\");\n\t\t\t\tint id = Integer.parseInt(rkBits[0]);\n\t\t\t\trankMap.put( rkBits[1], id );\n\t\t\t\tif ( rkBits[3].equals(\"1\") )\n\t\t\t\t\tdefaultRank = id;\n\t\t\t}\n\t\t\tlogger.info( \"Ranks mapped: \" + rankMap.size() );\n\t\t\t\n\t\t\t// Set limits on # args per input line\n\t\t\tlineLen1 = 7;\n\t\t\tlineLen2 = 9;\n\t\t\t\n\t\t\t// Build map of supp data types\n\t\t\tsdtypeMap = new HashMap<String, Integer>();\n\t\t\tfor ( SuppDatum sdt: ds.getSuppDataTypes() )\n\t\t\t\tsdtypeMap.put( sdt.typeName, sdt.tid );\n\t\t\tlogger.info( \"Suppdata types mapped: \" + sdtypeMap.size() );\n\t\t\t\n\t\t} else {\n\t\t\t// It isn't a SQL datasource; try it as a Winston datasource\n\t\t\tDataSourceDescriptor vdsd = dataSourceHandler.getDataSourceDescriptor(source);\n\t\t\ttry {\n\t\t\t\tvds = (VDXSource)vdsd.getDataSource();\n\t\t\t\tif ( vds == null ) {\n\t\t\t\t\tlogger.log(Level.SEVERE, \"skipping: \" + pathname + \" (datasource is invalid)\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} catch (Exception e2) {\n\t\t\t\tlogger.log(Level.SEVERE, \"skipping: \" + pathname + \" (datasource is invalid)\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Build map of channels\n\t\t\tchannelMap = new HashMap<String, Integer>();\n\t\t\tfor ( gov.usgs.winston.Channel ch: vds.getChannels().getChannels() )\n\t\t\t\tchannelMap.put( ch.getCode(), ch.getSID() );\n\t\t\tlogger.info( \"Channels mapped: \" + channelMap.size() );\n\t\t\t\n\t\t\t// Set limits on # args per input line\n\t\t\tlineLen1 = lineLen2 = 7;\n\n\t\t\t// Build map of supp data types\n\t\t\tsdtypeMap = new HashMap<String, Integer>();\n\t\t\ttry {\n\t\t\t\tfor ( SuppDatum sdt: vds.getSuppDataTypes() )\n\t\t\t\t\tsdtypeMap.put( sdt.typeName, sdt.tid );\n\t\t\t\tlogger.info( \"Suppdata types mapped: \" + sdtypeMap.size() );\n\t\t\t} catch (Exception e3) {\n\t\t\t\tlogger.log(Level.SEVERE, \"skipping: \" + pathname + \" (problem reading supplemental data types)\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Access the input file\n\t\tResourceReader rr = ResourceReader.getResourceReader(pathname);\n\t\tif (rr == null) {\n\t\t\tlogger.log(Level.SEVERE, \"skipping: \" + pathname + \" (resource is invalid)\");\n\t\t\treturn;\n\t\t}\n\t\t// move to the first line in the file\n\t\tString line\t\t= rr.nextLine();\n\t\tint lineNumber\t= 0;\n\n\t\t// check that the file has data\n\t\tif (line == null) {\n\t\t\tlogger.log(Level.SEVERE, \"skipping: \" + pathname + \" (resource is empty)\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tlogger.info(\"importing: \" + filename);\n\t\t\n\t\tSuppDatum sd = new SuppDatum();\n\t\tint success = 0;\n\t\t\n\t\t// we are now at the first row of data. time to import!\n\t\tString[] valueArray = new String[lineLen2];\n\t\twhile (line != null) {\n\t\t\tlineNumber++;\n\t\t\t// Build up array of values in this line\n\t\t\t// First, we split it by quotes\n\t\t\tString[] quoteParts = line.split(\"'\", -1);\n\t\t\tif ( quoteParts.length % 2 != 1 ) {\n\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \", mismatched quotes\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t// Next, walk through those parts, splitting those outside of matching quotes by comma\n\t\t\tint valueArrayLength = 0;\n\t\t\tboolean ok = true;\n\t\t\tfor ( int j=0; ok && j<quoteParts.length; j+=2 ) {\n\t\t\t\tString[] parts = quoteParts[j].split(\",\", -1);\n\t\t\t\tint k, k1 = 1, k2 = parts.length-1;\n\t\t\t\tboolean middle = true;\n\t\t\t\tif ( j==0 ) { // section before first quote\n\t\t\t\t\tmiddle = false;\n\t\t\t\t\tif ( parts.length > 1 && parts[0].trim().length() == 0 ) {\n\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \", leading comma\");\n\t\t\t\t\t\tok = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tk1 --;\n\t\t\t\t} \n\t\t\t\tif ( j==quoteParts.length-1 ) { // section after last quote\n\t\t\t\t\tmiddle = false;\n\t\t\t\t\tif ( parts.length > 1 && parts[parts.length-1].trim().length() == 0 ) {\n\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \", trailing comma\");\n\t\t\t\t\t\tok = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tk2++;\n\t\t\t\t}\n\t\t\t\tif ( middle ) {\n\t\t\t\t\tif ( parts.length == 1 ){\n\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \", missing comma between quotes\");\n\t\t\t\t\t\tok = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ( parts[0].trim().length()!=0 ) {\n\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \", missing comma after a quote\");\n\t\t\t\t\t\tok = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ( parts[parts.length-1].trim().length()!=0 ) {\n\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \", missing comma before a quote\");\n\t\t\t\t\t\tok = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfor ( k=k1; ok && k<k2; k++ ) {\n\t\t\t\t\tif ( valueArrayLength == lineLen2 ) {\n\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \", too many elements\");\n\t\t\t\t\t\tok = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tvalueArray[valueArrayLength++] = parts[k];\n\t\t\t\t}\n\t\t\t\tif ( j+1 < quoteParts.length ) {\n\t\t\t\t\tif ( valueArrayLength == lineLen2 ) {\n\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \", too many elements\");\n\t\t\t\t\t\tok = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tvalueArray[valueArrayLength++] = quoteParts[j+1];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Line has been parsed; get next one\n\t\t\tline\t= rr.nextLine();\n\t\t\tif ( !ok )\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\t// Validate & unmap arguments\n\t\t\tif ( valueArrayLength < lineLen1 ) {\n\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \", too few elements (\" + valueArrayLength + \")\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tsd.cid = channelMap.get( valueArray[3].trim() );\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \n\t\t\t\t\t\", unknown channel: '\" + valueArray[3] + \"'\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tsd.st = Double.parseDouble( valueArray[1].trim() );\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \n\t\t\t\t\t\", invalid start time: '\" + valueArray[1] + \"'\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tString et = valueArray[2].trim();\n\t\t\t\tif ( et.length() == 0 )\n\t\t\t\t\tsd.et = Double.MAX_VALUE;\n\t\t\t\telse\n\t\t\t\t\tsd.et = Double.parseDouble( et );\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \n\t\t\t\t\t\", invalid end time: '\" + valueArray[2] + \"'\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tsd.typeName = valueArray[4].trim();\n\t\t\t\tInteger tid = sdtypeMap.get( sd.typeName );\n\t\t\t\tif ( tid == null ) {\n\t\t\t\t\tsd.color = \"000000\";\n\t\t\t\t\tsd.dl = 1;\n\t\t\t\t\tsd.tid = -1;\n\t\t\t\t} else\n\t\t\t\t\tsd.tid = tid;\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \n\t\t\t\t\t\", couldn't create type: '\" + valueArray[4] + \"'\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ( ds != null ) {\n\t\t\t\tif ( valueArrayLength > lineLen1 ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsd.colid = columnMap.get( valueArray[7].trim() );\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \n\t\t\t\t\t\t\t\", unknown column: '\" + valueArray[7] + \"'\");\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif ( valueArrayLength < lineLen2 ) {\n\t\t\t\t\t\tsd.rid = defaultRank;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tsd.rid = rankMap.get( valueArray[8].trim() );\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \n\t\t\t\t\t\t\t\t\", unknown rank: '\" + valueArray[8] + \"'\");\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} else {\n\t\t\t\t\tsd.colid = -1;\n\t\t\t\t\tsd.rid = -1;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tsd.colid = -1;\n\t\t\t\tsd.rid = -1;\n\t\t\t}\n\t\t\tsd.name = valueArray[5].trim();\n\t\t\tsd.value = valueArray[6].trim();\n\t\t\t\n\t\t\ttry {\n\t\t\t\tsd.sdid = Integer.parseInt( valueArray[0] );\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \n\t\t\t\t\t\", unknown id: '\" + valueArray[0] + \"'\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// Finally, insert/update the data\n\t\t\ttry {\n\t\t\t\tif ( ds != null ) {\n\t\t\t\t\tif ( sd.tid == -1 ) {\n\t\t\t\t\t\tsd.tid = ds.insertSuppDataType( sd );\n\t\t\t\t\t\tif ( sd.tid == 0 ) {\n\t\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \n\t\t\t\t\t\t\t\t\", problem inserting datatype\" );\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsdtypeMap.put( sd.typeName, sd.tid );\n\t\t\t\t\t\tlogger.info(\"Added supplemental datatype \" + sd.typeName );\n\t\t\t\t\t}\n\t\t\t\t\tint read_sdid = sd.sdid;\n\t\t\t\t\tif ( sd.sdid == 0 ) {\n\t\t\t\t\t\tsd.sdid = ds.insertSuppDatum( sd );\n\t\t\t\t\t} else\n\t\t\t\t\t\tsd.sdid = ds.updateSuppDatum( sd );\n\t\t\t\t\tif ( sd.sdid < 0 ) {\n\t\t\t\t\t\tsd.sdid = -sd.sdid;\n\t\t\t\t\t\tlogger.info(\"For import of line \" + lineNumber + \n\t\t\t\t\t\t\", supp data record already exists as SDID \" + sd.sdid +\n\t\t\t\t\t\t\"; will create xref record\");\n\t\t\t\t\t} else if ( sd.sdid==0 ) {\n\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \n\t\t\t\t\t\t\t\", problem \" + (read_sdid==0 ? \"insert\" : \"updat\") + \"ing supp data\" );\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if ( read_sdid == 0 )\n\t\t\t\t\t\tlogger.info(\"Added supp data record SDID \" + sd.sdid);\n\t\t\t\t\telse\n\t\t\t\t\t\tlogger.info(\"Updated supp data record SDID \" + sd.sdid);\n\t\t\t\t\tif ( !ds.insertSuppDatumXref( sd ) )\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\telse\n\t\t\t\t\t\tlogger.info( \"Added xref for SDID \" + sd.sdid );\n\t\t\t\t} else {\n\t\t\t\t\tif ( sd.tid == -1 ) {\n\t\t\t\t\t\tsd.tid = vds.insertSuppDataType( sd );\n\t\t\t\t\t\tif ( sd.tid == 0 ) {\n\t\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \n\t\t\t\t\t\t\t\t\", problem inserting datatype\" );\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsdtypeMap.put( sd.typeName, sd.tid );\n\t\t\t\t\t\tlogger.info(\"Added supplemental datatype \" + sd.typeName );\n\t\t\t\t\t}\n\t\t\t\t\tint read_sdid = sd.sdid;\n\t\t\t\t\tif ( sd.sdid == 0 )\n\t\t\t\t\t\tsd.sdid = vds.insertSuppDatum( sd );\n\t\t\t\t\telse\n\t\t\t\t\t\tsd.sdid = vds.updateSuppDatum( sd );\n\t\t\t\t\tif ( sd.sdid < 0 ) {\n\t\t\t\t\t\tsd.sdid = -sd.sdid;\n\t\t\t\t\t\tlogger.info(\"For import of line \" + lineNumber + \n\t\t\t\t\t\t\", supp data record already exists as SDID \" + sd.sdid +\n\t\t\t\t\t\t\"; will create xref record\");\n\t\t\t\t\t} else if ( sd.sdid==0 ) {\n\t\t\t\t\t\tlogger.warning(\"Aborting import of line \" + lineNumber + \n\t\t\t\t\t\t\t\", problem \" + (read_sdid==0 ? \"insert\" : \"updat\") + \"ing supp data\" );\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if ( read_sdid == 0 )\n\t\t\t\t\t\tlogger.info(\"Added supp data record SDID \" + sd.sdid);\n\t\t\t\t\telse\n\t\t\t\t\t\tlogger.info(\"Updated supp data record SDID \" + sd.sdid);\n\t\t\t\t\tif ( !vds.insertSuppDatumXref( sd ) )\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\telse\n\t\t\t\t\t\tlogger.info( \"Added xref for SDID \" + sd.sdid );\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\tlogger.warning(\"Failed import of line \" + lineNumber + \", db failure: \" + e);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tsuccess++;\n\t\t}\n\t\tlogger.info(\"\" + success + \" of \" + lineNumber + \" lines successfully processed\");\n\t}", "MafSource readSource(File sourceFile);", "private void initData() {\n }", "public void loadData() {\n String[] animalsListRaw = loadStrings(\"data/animalList.csv\");\n //String[] animalsListRaw = loadStrings(\"data/mythical.creatures.csv\");\n String[] animalList = getList(animalsListRaw);\n SearchQuery newSearch = new SearchQuery(animalList); \n allMaps = newSearch.getMap();\n \n map = new UnfoldingMap(this);\n map.setBackgroundColor(color(179, 223, 222, 255));\n map.zoomAndPanTo(width/2, height/2, 2);\n //MapUtils.createDefaultEventDispatcher(this, map);\n countries = GeoJSONReader.loadData(this, \"countries.geo.json\");\n marks = new MarkerMaker(allMaps, countries);\n map.draw();\n}", "@Override\n\tpublic void setZip(long zip) {\n\t\t_candidate.setZip(zip);\n\t}", "private void initData() {\n\t}", "private void init() {\r\n try {\r\n // extracts just sizes only.\r\n ZipFile zf = new ZipFile(jarFileName);\r\n Enumeration e = zf.entries();\r\n ZipEntry zentry = null;\r\n while (e.hasMoreElements()) {\r\n zentry = (ZipEntry) e.nextElement();\r\n if (debugOn) {\r\n System.out.println(dumpZipEntry(zentry));\r\n }\r\n htSizes.put(zentry.getName(), (int) zentry.getSize());\r\n }\r\n if (zf != null) {\r\n zf.close();\r\n }\r\n zf = null;\r\n e = null;\r\n zentry = null;\r\n // extract resources and put them into the hashtable.\r\n FileInputStream fis = new FileInputStream(jarFileName);\r\n BufferedInputStream bis = new BufferedInputStream(fis);\r\n ZipInputStream zis = new ZipInputStream(bis);\r\n ZipEntry ze = null;\r\n while ((ze = zis.getNextEntry()) != null) {\r\n if (ze.isDirectory()) {\r\n continue;\r\n }\r\n if (debugOn) {\r\n System.out.println(\"ze.getName()=\" + ze.getName() + \",\" + \"getSize()=\" + ze.getSize());\r\n }\r\n int size = (int) ze.getSize();\r\n // -1 means unknown size.\r\n if (size == -1) {\r\n size = ((Integer) htSizes.get(ze.getName())).intValue();\r\n }\r\n byte[] b = new byte[size];\r\n int rb = 0;\r\n int chunk = 0;\r\n while ((size - rb) > 0) {\r\n chunk = zis.read(b, rb, size - rb);\r\n if (chunk == -1) {\r\n break;\r\n }\r\n rb += chunk;\r\n }\r\n // add to internal resource hashtable\r\n htJarContents.put(ze.getName(), b);\r\n b = null;\r\n if (debugOn) {\r\n System.out.println(ze.getName() + \" rb=\" + rb + \",size=\" + size + \",csize=\"\r\n + ze.getCompressedSize());\r\n }\r\n }\r\n if (fis != null) {\r\n fis.close();\r\n }\r\n if (bis != null) {\r\n bis.close();\r\n }\r\n if (zis != null) {\r\n zis.close();\r\n }\r\n fis = null;\r\n bis = null;\r\n zis = null;\r\n ze = null;\r\n } catch (NullPointerException e) {\r\n System.out.println(\"done.\");\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "private static List<PackageDTO> preparePackages(String filePath) throws APIException{\n List<PackageDTO> packageDTOS = null;\n try {\n File input = fileService.openFile(filePath);\n packageDTOS = parseService.parseFile(input);\n }catch (APIException e) {\n throw new APIException(\"File not found\", e);\n }\n return packageDTOS;\n }", "public void initialize(String source);", "public Map<String, String> importFilesInSite(String zipReference,\r\n\t String siteId) {\r\n\tMap<File, String> fileMap = (Map<File, String>) getImportedFiles();\r\n\tMap<String, String> fileNameChangesMap = new HashMap<String, String>();\r\n\t// Vars used to retrieve metadata\r\n\tContentHandler handler = null;\r\n\tMetadata metadata = null;\r\n\tParser parser = null;\r\n\tString resourceOutputDir = null;\r\n\ttry {\r\n\t resourceOutputDir = contentHostingService.getSiteCollection(siteId);\r\n\t} catch (Exception e1) {\r\n\t log.error(e1.getMessage());\r\n\t e1.printStackTrace();\r\n\t}\r\n\r\n\tfor (Entry<File, String> entry : fileMap.entrySet()) {\r\n\t File file = entry.getKey();\r\n\t try {\r\n\t\tString fileNameToUse = fileMap.get(file);\r\n\t\tInputStream inputStream = new FileInputStream(file);\r\n\r\n\t\t// Retrieve file extension\r\n\t\tint lastIndexOfPoint = fileNameToUse.lastIndexOf(\".\");\r\n\t\tString fileExtension =\r\n\t\t\tfileNameToUse.substring(lastIndexOfPoint + 1,\r\n\t\t\t\tfileNameToUse.length());\r\n\r\n\t\t// Necessary inits to retreive content type\r\n\t\thandler = new BodyContentHandler();\r\n\t\tmetadata = new Metadata();\r\n\t\tmetadata.set(Metadata.RESOURCE_NAME_KEY, file.getName());\r\n\t\tparser = new AutoDetectParser();\r\n\t\tparser.parse(inputStream, handler, metadata, new ParseContext());\r\n\r\n\t\t// We need to close the inputstream and rebuild it after the\r\n\t\t// parsing here,\r\n\t\t// otherwise the inputstream in unusable\r\n\t\tinputStream.close();\r\n\t\tinputStream = new FileInputStream(file);\r\n\r\n\t\tif (CITATION_EXTENSION.equals(fileExtension)) {\r\n\t\t // read input stream of file to get properties of citation\r\n\t\t fileNameChangesMap.putAll(addCitations(file, siteId,\r\n\t\t\t resourceOutputDir));\r\n\t\t} else {\r\n\t\t String s =\r\n\t\t\t addRessource(fileNameToUse, inputStream,\r\n\t\t\t\t metadata.get(Metadata.CONTENT_TYPE),\r\n\t\t\t\t siteId, resourceOutputDir);\r\n\t\t if (!fileNameToUse.equals(s))\r\n\t\t\tfileNameChangesMap.put(fileNameToUse, s);\r\n\t\t}\r\n\t\tinputStream.close();\r\n\t } catch (Exception e) {\r\n\t\tlog.error(e);\r\n\t\te.printStackTrace();\r\n\t }\r\n\t}\r\n\treturn fileNameChangesMap;\r\n }", "public TSLDataCacheObject getTSLDataFromCountryRegion(String countryRegionCode) throws TSLManagingException {\n\n\t\tTSLDataCacheObject result = null;\n\n\t\tif (!UtilsStringChar.isNullOrEmptyTrim(countryRegionCode)) {\n\n\t\t\ttry {\n\t\t\t\tresult = ConfigurationCacheFacade.tslGetTSLDataFromCountryRegion(countryRegionCode);\n\n\t\t\t\t// Si no lo hemos obtenido, puede ser porque no exista,\n\t\t\t\t// o porque no se haya cargado el TSL Data en caché.\n\t\t\t\tif (result == null) {\n\n\t\t\t\t\t// Intentamos recuperar el TSL Country/Region.\n\t\t\t\t\tTSLCountryRegionCacheObject tcrco = ConfigurationCacheFacade.tslGetTSLCountryRegionCacheObject(countryRegionCode);\n\n\t\t\t\t\t// Si no es nulo...\n\t\t\t\t\tif (tcrco != null) {\n\n\t\t\t\t\t\t// Buscamos en base de datos un TSL Data para este.\n\t\t\t\t\t\tTslCountryRegion tcr = ManagerPersistenceServices.getInstance().getManagerPersistenceConfigurationServices().getTslCountryRegionService().getTslCountryRegionById(tcrco.getCountryRegionId(), false);\n\t\t\t\t\t\tTslData tslData = ManagerPersistenceServices.getInstance().getManagerPersistenceConfigurationServices().getTslDataService().getTslByCountryRegion(tcr, true, false);\n\n\t\t\t\t\t\t// Si lo hemos encontrado significa que hay que añadirlo\n\t\t\t\t\t\t// a la caché...\n\t\t\t\t\t\tif (tslData != null) {\n\n\t\t\t\t\t\t\t// Contruimos el InputStream asociado al array, y\n\t\t\t\t\t\t\t// tratamos de\n\t\t\t\t\t\t\t// parsearlo y añadirlo.\n\t\t\t\t\t\t\tByteArrayInputStream bais = new ByteArrayInputStream(tslData.getXmlDocument());\n\t\t\t\t\t\t\tITSLObject tslObject = null;\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\ttslObject = new TSLObject(tslData.getTslImpl().getSpecification(), tslData.getTslImpl().getVersion());\n\t\t\t\t\t\t\t\ttslObject.buildTSLFromXMLcheckValues(bais);\n\t\t\t\t\t\t\t} finally {\n\t\t\t\t\t\t\t\tUtilsResources.safeCloseInputStream(bais);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Lo añadimos en la caché...\n\t\t\t\t\t\t\tresult = ConfigurationCacheFacade.tslAddUpdateTSLData(tslData, tslObject);\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} catch (TSLException | TSLCacheException e) {\n\t\t\t\tthrow new TSLManagingException(IValetException.COD_187, Language.getFormatResCoreTsl(ICoreTslMessages.LOGMTSL168, new Object[ ] { countryRegionCode }), e);\n\t\t\t}\n\n\t\t}\n\n\t\treturn result;\n\n\t}", "@Override\n public Collection<Source> getSources() {\n\n Map<String, Source> sources = new HashMap<String, Source>();\n\n out: for (Map.Entry<String, Container> path : containers.entrySet()) {\n String sourceId = path.getKey();\n Container container = path.getValue();\n\n for (String map : categoryMaps.keySet()) {\n if (map.endsWith(\"/\")) {\n map = map.substring(0, map.lastIndexOf(\"/\"));\n }\n if (map.endsWith(sourceId)) {\n continue out;\n }\n }\n\n System.err.println(\"Doing source \" + sourceId);\n\n sourceId = applyCategoryMaps(sourceId);\n\n if (sourceId.isEmpty()) {\n continue;\n }\n\n if (sourceId.indexOf(\"/\") == -1 && !sourceId.isEmpty()) {\n if (sources.get(sourceId) == null) {\n String sourceIdShort = sourceId;\n sourceId = \"Catchup/Sources/\" + sourceIdShort;\n String sourceName = container.getTitle();\n Source source = new Source();\n source.setSourceId(sourceIdShort);\n source.setId(sourceId);\n source.setShortName(sourceName);\n source.setLongName(sourceName);\n source.setServiceUrl(\"/category?sourceId=\" + sourceId + \";type=html\");\n URI iconUri = container.getFirstPropertyValue(DIDLObject.Property.UPNP.ALBUM_ART_URI.class);\n URL iconUrl = normaliseURI(iconUri);\n final String iconUrlString = iconUrl == null ? null : iconUrl.toString();\n source.setIconUrl(iconUrlString);\n sources.put(sourceId, source);\n }\n }\n\n\n\n\n }\n\n\n return sources.values();\n }", "public List<Clazz> loadAndScanJar()\n\t\t\tthrows ClassNotFoundException, ZipException, IOException {\n\t\tsuper.addURL(new File(path).toURI().toURL());\n\t\tList<Clazz> representations=new ArrayList<Clazz>();\n\n\t\t// Count the classes loaded\n\t\t// Your jar file\n\t\tFile f = new File(path);\n\n\t\tJarFile jar = new JarFile(path);\n\t\t// Getting the files into the jar\n\t\tEnumeration<? extends JarEntry> enumeration = jar.entries();\n\n\t\t// Iterates into the files in the jar file\n\t\twhile (enumeration.hasMoreElements()) {\n\t\t\tZipEntry zipEntry = enumeration.nextElement();\n\t\t\t// Is this a class?\n\t\t\tif (zipEntry.getName().endsWith(\".class\")) {\n\t\t\t\t// Relative path of file into the jar.\n\t\t\t\tString className = zipEntry.getName();\n\t\t\t\t// Complete class name\n\t\t\t\tclassName = className.replace(\".class\", \"\").replace(\"/\", \".\");\n\t\t\t\t// Load class definition from JVM\n\t\t\t\tClass<?> clazz = this.loadClass(className);\n\t\t\t\ttry {\n\t\t\t\t\t\tClazz actual = new Clazz(clazz.getName());\n\t\t\t\t\t\tfor (java.lang.reflect.Method m : clazz.getMethods()) {\n\t\t\t\t\t\t\tactual.addMethod(m.getReturnType().getName(), m.getName(), getScope(m.getModifiers()),\n\t\t\t\t\t\t\t\t\tModifier.isAbstract(m.getModifiers()), Modifier.isStatic(m.getModifiers()));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (java.lang.reflect.Field m : clazz.getFields()) {\n\t\t\t\t\t\t\tactual.addVariable(m.getType().getName(), m.getName(), getScope(m.getModifiers()),\n\t\t\t\t\t\t\t\t\tModifier.isStatic(m.getModifiers()));\n\t\t\t\t\t\t}\n\t\t\t\t\t\trepresentations.add(actual);\n\n\t\t\t\t} catch (ClassCastException e) {\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tjar.close();\n\t\treturn representations;\n\t}", "public void updateSource() {\n\t\t// Set the mode to recording\n\t\tmode = RECORD;\n\t\t// Traverse the source and record the architectures structure\n\t\tinspect();\n\t\t// Set the mode to code generation\n\t\tmode = GENERATE;\n\t\t// Traverse the source and calls back when key source elements are\n\t\t// missing\n\t\tinspect();\n\t\t// System.out.println(tree);\n\t\t// Add the source files that are missing\n\t\tArrayList<TagNode> tags = tree.getUnvisited();\n\t\tcreateSourceFiles(tags);\n\t}", "public void initAfterUnpersistence() {\n //From a legacy bundle\n if (sources == null) {\n sources = Misc.newList(getName());\n }\n super.initAfterUnpersistence();\n openData();\n }", "public LibraryMap readFromSource(Source source, String libraryFileContents) {\n BooleanErrorListener errorListener = new BooleanErrorListener();\n Scanner scanner = new Scanner(\n source,\n new CharSequenceReader(libraryFileContents),\n errorListener);\n Parser parser = new Parser(source, errorListener);\n CompilationUnit unit = parser.parseCompilationUnit(scanner.tokenize());\n LibraryBuilder libraryBuilder = new LibraryBuilder(useDart2jsPaths);\n // If any syntactic errors were found then don't try to visit the AST structure.\n if (!errorListener.getErrorReported()) {\n unit.accept(libraryBuilder);\n }\n return libraryBuilder.getLibrariesMap();\n }", "public ZIPCachedQuery(File cacheFile) throws IOException {\n \t\tthis.dataFile = cacheFile;\n \t\tloadDataFromFile();\n \t}", "MasterZipcode getById(int id);", "public JenaDataSource(InputStream stream) \n\t{\n\t\tOntModel model = null;\n\t\t\n\t\tmodel = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM);\n\t\tmodel.read(stream, null, \"TTL\");\n\t\tthis.populatePrefixMappings(model);\n\t\t\n\t\tsetModel(model);\n\t}", "private C0148k m470a(ZipEntry zipEntry, ZipFile zipFile) {\n InputStream inputStream;\n try {\n inputStream = zipFile.getInputStream(zipEntry);\n try {\n Properties properties = new Properties();\n properties.load(inputStream);\n String property = properties.getProperty(\"fabric-identifier\");\n String property2 = properties.getProperty(\"fabric-version\");\n String property3 = properties.getProperty(\"fabric-build-type\");\n if (TextUtils.isEmpty(property) || TextUtils.isEmpty(property2)) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"Invalid format of fabric file,\");\n sb.append(zipEntry.getName());\n throw new IllegalStateException(sb.toString());\n }\n C0148k kVar = new C0148k(property, property2, property3);\n C0020i.m69a((Closeable) inputStream);\n return kVar;\n } catch (IOException e) {\n e = e;\n try {\n StringBuilder sb2 = new StringBuilder();\n sb2.append(\"Error when parsing fabric properties \");\n sb2.append(zipEntry.getName());\n C0135c.m449h().mo280e(\"Fabric\", sb2.toString(), e);\n C0020i.m69a((Closeable) inputStream);\n return null;\n } catch (Throwable th) {\n th = th;\n C0020i.m69a((Closeable) inputStream);\n throw th;\n }\n }\n } catch (IOException e2) {\n e = e2;\n inputStream = null;\n StringBuilder sb22 = new StringBuilder();\n sb22.append(\"Error when parsing fabric properties \");\n sb22.append(zipEntry.getName());\n C0135c.m449h().mo280e(\"Fabric\", sb22.toString(), e);\n C0020i.m69a((Closeable) inputStream);\n return null;\n } catch (Throwable th2) {\n th = th2;\n inputStream = null;\n C0020i.m69a((Closeable) inputStream);\n throw th;\n }\n }", "public SourceData(SourceData other) {\n __isset_bitfield = other.__isset_bitfield;\n this.version = other.version;\n if (other.isSetApp_id()) {\n this.app_id = other.app_id;\n }\n this.brand = other.brand;\n this.point = other.point;\n this.campaign_type = other.campaign_type;\n this.point_multiply = other.point_multiply;\n this.snapearn_id = other.snapearn_id;\n if (other.isSetReceipt_number()) {\n this.receipt_number = other.receipt_number;\n }\n this.outlet_id = other.outlet_id;\n this.operator_id = other.operator_id;\n this.rejected_reason = other.rejected_reason;\n }", "static void parseData(Map<String, Set<String>> sourceOutputStrings, Set<String> trueTuples) throws IOException{\n\t\tBufferedReader dataFile = new BufferedReader(new FileReader(DATAFILE));\n\t\t\n\t\tSet<String> bookSet = new HashSet<String>();\n\t\tSet<String> authorSet = new HashSet<String>();\n\t\tSet<String> tupleSet = new HashSet<String>();\n\t\tSet<String> sourceSet = new HashSet<String>();\n\t\t\n\t\tString s;\n\t\tSet<String> sourceBlackList = new HashSet<String>();\n\t\t// remove below books? increases isolated errors, although there should still be correlations between errors such as using first name\n\t\tsourceBlackList.add(\"A1Books\");\n\t\tsourceBlackList.add(\"Indoo.com\");\n\t\tsourceBlackList.add(\"Movies With A Smile\");\n\t\tsourceBlackList.add(\"Bobs Books\");\n\t\tsourceBlackList.add(\"Gunars Store\");\n\t\tsourceBlackList.add(\"Gunter Koppon\");\n\t\tsourceBlackList.add(\"Quartermelon\");\n\t\tsourceBlackList.add(\"Stratford Books\");\n\t\tsourceBlackList.add(\"LAKESIDE BOOKS\");\n\t\tsourceBlackList.add(\"Books2Anywhere.com\");\n\t\tsourceBlackList.add(\"Paperbackshop-US\");\n\t\tsourceBlackList.add(\"tombargainbks\");\n\t\tsourceBlackList.add(\"Papamedia.com\");\n\t\tsourceBlackList.add(\"\");\n\t\tsourceBlackList.add(\"\");\n\t\tsourceBlackList.add(\"\");\n\t\t\n\t\tPattern pattern = Pattern.compile(\"[^a-z]\", Pattern.CASE_INSENSITIVE);\n\t\twhile ((s = dataFile.readLine()) != null) {\n\t\t\tif (s.indexOf('\\t') == -1) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tString[] fields = s.split(\"\\t\");\n\t\t\tif (fields.length != 4) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfinal String sourceId = fields[0];\n\t\t\tif (sourceBlackList.contains(sourceId)) {\n\t\t\t\t//continue;\n\t\t\t}\n\t\t\tfinal String bookId = fields[1];\n\t\t\tfinal String authorString = fields[3];\n\t\t\tList<String> authorList = parseAuthorString(authorString);\n\t\t\t\n\t\t\tbookSet.add(bookId);\n\t\t\tauthorSet.addAll(authorList);\n\t\t\tsourceSet.add(sourceId);\n\t\t\tif (!sourceOutputStrings.containsKey(sourceId)) {\n\t\t\t\tsourceOutputStrings.put(sourceId, new HashSet<String>());\n\t\t\t}\n\t\t\tfor (String author : authorList) {\n\t\t\t\tMatcher matcher = pattern.matcher(author.trim());\n\t\t\t\tif (matcher.find()) {\n\t\t\t\t\tcontinue; // Skip author names that have a special character, since they are likely a parsing error.\n\t\t\t\t}\n\t\t\t\tif (author.equals(\"\")) { // Sometimes, trailing commas result in empty author strings. \n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tfinal String tuple = bookId + \"\\t\" + author.trim();\n\t\t\t\ttupleSet.add(tuple);\n\t\t\t\tsourceOutputStrings.get(sourceId).add(tuple);\n\t\t\t}\n\t\t}\n\t\tdataFile.close();\n\n\t\tBufferedReader labelledDataFile = new BufferedReader(new FileReader(ISBNLABELLEDDATAFILE));\t\t\n\t\twhile ((s = labelledDataFile.readLine()) != null) {\n\t\t\tString[] fields = s.split(\"\\t\");\n\t\t\tif (fields.length < 2) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfinal String bookId = fields[0];\n\t\t\tfinal String authorString = fields[1];\n\t\t\tString[] authors = authorString.split(\"; \");\n\t\t\tfor (int i = 0; i < authors.length; i++) {\n\t\t\t\tauthors[i] = canonicalize(authors[i].trim());\n\t\t\t\ttrueTuples.add(bookId + \"\\t\" + authors[i]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tlabelledDataFile.close();\n\t}" ]
[ "0.61863923", "0.61178416", "0.6114287", "0.5819864", "0.56209713", "0.5560692", "0.5541159", "0.54852074", "0.54165006", "0.5361476", "0.5351527", "0.5314139", "0.5292805", "0.52516925", "0.5237551", "0.5208377", "0.5200513", "0.5198668", "0.5194507", "0.5194507", "0.518643", "0.5175141", "0.5135356", "0.512784", "0.51192176", "0.51158905", "0.51059216", "0.5098233", "0.5097959", "0.5094996", "0.5092426", "0.50824475", "0.5053273", "0.5034031", "0.50041866", "0.50018877", "0.49930277", "0.49886173", "0.49819508", "0.49698108", "0.49527907", "0.49512684", "0.49506277", "0.49417853", "0.49222353", "0.49063203", "0.49052328", "0.48982063", "0.48815787", "0.48760286", "0.48429832", "0.48354915", "0.48148245", "0.48143366", "0.48103827", "0.48102182", "0.4806889", "0.48059466", "0.47981957", "0.4780079", "0.47743037", "0.47741455", "0.47715476", "0.47642514", "0.47604838", "0.47600046", "0.4758574", "0.4750349", "0.47389024", "0.47321236", "0.4730025", "0.47285354", "0.47225744", "0.4720141", "0.47033197", "0.46987605", "0.46979254", "0.46905372", "0.46838313", "0.468249", "0.46803254", "0.46793276", "0.46790513", "0.46757132", "0.4669003", "0.46675012", "0.46543652", "0.4654174", "0.46512383", "0.46464652", "0.46435684", "0.46433672", "0.46401647", "0.46386263", "0.4634134", "0.4631725", "0.46309316", "0.4625816", "0.46222436", "0.46136698" ]
0.6789053
0
XXX should it be always existing directory ?
@Override public File getServletTempDirectory(String moduleContextPath) { ApplicationDescriptor desc = getApplicationDescriptor(moduleContextPath); if (desc == null) { return null; } String domainDir = deploymentManager.getInstanceProperties().getProperty(WLPluginProperties.DOMAIN_ROOT_ATTR); assert domainDir != null; // FIXME can we get this via JMX ? File tmpPath = new File(new File(domainDir), "servers" + File.separator + desc.getServerName() + File.separator + "tmp" // NOI18N + File.separator + "_WL_user" + File.separator + desc.getName()); // NOI18N if (tmpPath.exists() && tmpPath.isDirectory()) { File[] subDirs = tmpPath.listFiles(); if (subDirs != null) { for (File subdir : subDirs) { // FIXME multiple subdirs - what does that mean File servletDir = new File(subdir, "jsp_servlet"); // NOI18N if (servletDir.exists() && servletDir.isDirectory()) { // FIXME make simpler return servletDir.getParentFile(); } } } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean isDir() { return true; }", "public void createDirectory() {\r\n\t\tpath = env.getProperty(\"resources\") + \"/\" + Year.now().getValue() + \"/\";\r\n\t\tFile file = new File(path);\r\n\t\tif (!file.exists())\r\n\t\t\tfile.mkdirs();\r\n\t}", "private File createDirectoryIfNotExisting( String dirName ) throws HarvesterIOException\n {\n \tFile path = FileHandler.getFile( dirName );\n \tif ( !path.exists() )\n \t{\n \t log.info( String.format( \"Creating directory: %s\", dirName ) );\n \t // create path:\n \t if ( !path.mkdir() )\n \t {\n \t\tString errMsg = String.format( \"Could not create necessary directory: %s\", dirName );\n \t\tlog.error( errMsg );\n \t\tthrow new HarvesterIOException( errMsg );\n \t }\n \t}\n \t\n \treturn path;\n }", "private final void directory() {\n\t\tif (!this.plugin.getDataFolder().isDirectory()) {\n\t\t\tif (!this.plugin.getDataFolder().mkdirs()) {\n\t\t\t\tMain.SEVERE(\"Failed to create directory\");\n\t\t\t} else {\n\t\t\t\tMain.INFO(\"Created directory sucessfully!\");\n\t\t\t}\n\t\t}\n\t}", "private void createDir(){\n\t\tPath path = Path.of(this.dir);\n\t\ttry {\n\t\t\tFiles.createDirectories(path);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public String getDir();", "@Override\n protected void createRootDir() {\n }", "private static void checkHistoryDirectory()\n throws FileNotFoundException {\n Path path = Paths.get(HISTORY_FILE_PATH); //creates Path instance\n try {\n Files.createDirectories(Paths.get(DIRECTORY));\n Files.createFile(path); //creates file at specified location\n } catch (IOException e) {\n readHistoryData();\n }\n }", "String getDir();", "Object getDir();", "FsPath baseDir();", "public boolean isDir() { return false; }", "public IStatus prepareRuntimeDirectory(IPath baseDir);", "Directory createAsDirectory() {\n return getParentAsExistingDirectory().findOrCreateChildDirectory(name);\n }", "private void makeDirectory() {\n String userHome = System.getProperty(\"user.home\");\n wnwData = new File(userHome + \"/.wnwdata\");\n wnwData.mkdirs();\n\n makeCampaignChallengesFile();\n makeCustomChallengesFile();\n makeProgressFile();\n makeSettingsFile();\n }", "private static void createSaveDirIfNotExisting() {\n\t\tFile dir = new File(\"save\");\n\t\tif (!dir.exists()) {\n\t\t\t// directory does not exist => create!\n\t\t\tdir.mkdir();\n\t\t}\n\t}", "java.io.File getBaseDir();", "private static void doCreateDir() {\n String newDir = \"new_dir\";\n boolean success = (new File(newDir)).mkdir();\n\n if (success) {\n System.out.println(\"Successfully created directory: \" + newDir);\n } else {\n System.out.println(\"Failed to create directory: \" + newDir);\n }\n\n // Create a directory; all non-existent ancestor directories are\n // automatically created.\n newDir = \"c:/export/home/jeffreyh/new_dir1/new_dir2/new_dir3\";\n success = (new File(newDir)).mkdirs();\n\n if (success) {\n System.out.println(\"Successfully created directory: \" + newDir);\n } else {\n System.out.println(\"Failed to create directory: \" + newDir);\n }\n\n }", "private File createEmptyDirectory() throws IOException {\n File emptyDirectory = findNonExistentDirectory();\n if (emptyDirectory.mkdir() == false) {\n throw new IOException(\"Can't create \" + emptyDirectory);\n }\n\n return emptyDirectory;\n }", "@Override\n\tpublic void generateDirectories() {\n\t\tFile file = new File(\"Data/My Contacts/\");\n\n\t\tif (!file.exists()) {\n\t\t\tfile.mkdirs();\n\t\t}\n\t}", "public void createTestDir() {\n\t\tworkDir = new File(System.getProperty(\"test.dir\", \"target\"));\n\t}", "private static File setYdfDirectory()\r\n/* 27: */ throws IOException\r\n/* 28: */ {\r\n/* 29: 32 */ log.finest(\"OSHandler.setYdfDirectory\");\r\n/* 30: 33 */ ydfDirectory = new File(USER_HOME + \"/\" + \".yourdigitalfile\");\r\n/* 31: 34 */ ydfDirectory.mkdir();\r\n/* 32: 35 */ return ydfDirectory;\r\n/* 33: */ }", "private static void judeDirExists(String myPath) {\n \tFile myDir = new File(Paths.get(myPath).getParent().toString());\n if (!myDir.exists()) {\n \tmyDir.mkdirs(); \n System.out.println(\"Create path:\"+ myDir.getPath());\n }\n }", "@Override\r\n\t\tpublic String getDir()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}", "@Test\n\tpublic void Directories() {\n\t\t\n\t\tString dirs = \"test/one/two/\";\n\t\tFile d = new File(dirs);\n\t\td.mkdirs();\n\t\tAssert.assertTrue(d.exists());\n\t\t\n\t\t//Cleanup\n\t\tif(d.delete()) {\n\t\t\td = new File(\"test/one\");\n\t\t\tif(d.delete()) {\n\t\t\t\td = new File(\"test\");\n\t\t\t\td.delete();\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private Directories() {\n\n\t}", "@Test\n public void testFileInDirectoryFileExists() {\n\n File file1 = new File(\"file1\");\n parent.storeFile(file1);\n assertTrue(parent.fileInDirectory(\"file1\"));\n }", "private void createDirectory(String path) throws IOException {\n\t\tfinal Path p = Paths.get(path);\n\t\tif (!fileExists(p)) {\n\t\t\tFiles.createDirectory(p);\n\t\t}\n\t}", "private File createWorkingDir( final String path )\n {\n File workDir = new File( path );\n workDir.mkdirs();\n return workDir;\n }", "@Override\n public void createDirectory(File storageName) throws IOException {\n }", "abstract File getResourceDirectory();", "abstract File getTargetDirectory();", "Path getBaseInputDir();", "private static boolean checkDirectory() {\n File baseDir = new File(Environment.getExternalStorageDirectory(), \"Andevindo\");\n mImageDir = new File(baseDir.getPath() + File.separator + \"Images\");\n mVideoDir = new File(baseDir.getPath() + File.separator + \"Videos\");\n mMiscDir = new File(baseDir.getPath() + File.separator + \"Misc\");\n if (!baseDir.exists()) {\n if (!baseDir.mkdirs()) {\n\n return false;\n } else {\n\n\n if (!mImageDir.exists()) {\n if (!mImageDir.mkdirs()) {\n\n return false;\n }\n }\n\n\n if (!mVideoDir.exists()) {\n if (!mVideoDir.mkdirs()) {\n\n return false;\n }\n }\n\n\n if (!mMiscDir.exists()) {\n if (!mMiscDir.mkdirs()) {\n\n return false;\n }\n }\n\n }\n }\n return true;\n }", "public boolean makeDirectory(){\n File root = new File(Environment.getExternalStorageDirectory(),\"OQPS\");\n if(!root.exists()){\n return root.mkdir();\n }\n return true; //folder already exists\n }", "private void setUpDirectories() {\r\n\t\tFile creation = new File(\"Creations\");\r\n\t\tFile audio = new File(\"Audio\");\r\n\t\tFile quiz = new File(\"Quiz\");\r\n\t\tFile temp = new File(\"Temp\");\r\n\r\n\t\tif (!creation.isDirectory()) {\r\n\t\t\tcreation.mkdir();\r\n\t\t}\r\n\t\tif (!audio.isDirectory()) {\r\n\t\t\taudio.mkdir();\r\n\t\t}\r\n\t\tif (!quiz.isDirectory()) {\r\n\t\t\tquiz.mkdir();\r\n\t\t}\r\n\t\tif (!temp.isDirectory()) {\r\n\t\t\ttemp.mkdir();\r\n\t\t}\r\n\r\n\t}", "public static boolean createDirIfNotExists(SourceFile sourceFile) throws IOException {\n return createDirIfNotExists(sourceFile.getPath(), sourceFile.getSourceType());\n }", "@Override\n public boolean isDirectory(File directory) {\n\treturn false;\n }", "public void init(){\n\t\ttry{\n\t\t\tFile file=new File(\"c:/EasyShare/setting/dir.es\");\n\t\t\tif(!file.exists()){\n\t\t\t\tfile.getParentFile().mkdirs();\n\t\t\t\tfile.createNewFile();\n\n\t\t\t\t\n\t\t\t\t}\n\t\t\t}catch (Exception e) {\n\t\t\t}\n\t}", "private static void makeDirPath(String targetAddr) {\n\t\tString parentPath = PathUtil.getImgBasePath() + targetAddr;\r\n\t\tFile dirPath = new File(parentPath);\r\n\t\tif (!dirPath.exists()) {\r\n\t\t\tdirPath.mkdirs();\r\n\t\t}\r\n\t}", "private void createDirectories()\r\n\t{\r\n\t\t// TODO: Do some checks here\r\n\t\tFile toCreate = new File(Lunar.OUT_DIR + Lunar.PIXEL_DIR\r\n\t\t\t\t\t\t\t\t\t+ Lunar.PROCESSED_DIR);\r\n\t\ttoCreate.mkdirs();\r\n\t\ttoCreate = null;\r\n\t\ttoCreate = new File(Lunar.OUT_DIR + Lunar.ROW_DIR + Lunar.PROCESSED_DIR);\r\n\t\ttoCreate.mkdirs();\r\n\t\ttoCreate = null;\r\n\t}", "public File getHomeDir() {\n\t\tFile f = new File(System.getProperty(\"user.home\"),MuViChatConstants.muviHomeDir);\t\t\n if (!f.isDirectory()) {\n\t f.mkdir();\t \n\t }\n return f;\n\t}", "static Path createBackupDirectory(Path savegame) {\r\n\t\tPath backupDirectory = Paths.get(savegame.getParent() + \"\\\\Backups\");\r\n\t\tif (!Files.isDirectory(backupDirectory)) {\r\n\t\t\ttry {\r\n\t\t\t\tFiles.createDirectory(backupDirectory);\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tSystem.out.println(\"Error: couldn't create Backup directory\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tif (Files.isDirectory(backupDirectory)) {\r\n\t\t\tSystem.out.println(\"Created Backup Directory..\");\r\n\t\t}\r\n\t\treturn backupDirectory;\r\n\t}", "public abstract boolean isDirectory() throws AccessException;", "private void createEssentialDirs() throws TNotFoundEx{\n\t\tFileUtil fT = new FileUtil();\n\t\tfT.createDirOnDevice(TicklerVars.sdCardPath);\n\t\tif (!fT.isExistOnDevice(TicklerVars.sdCardPath))\n\t\t\tthrow new TNotFoundEx(\"Cannot create Tickler directory \"+TicklerVars.sdCardPath+\". Check your configurations in Tickler.conf file\");\n\t\tfT.createDirOnHost(TicklerVars.appTickDir);\n\t\tif (!fT.isExist(TicklerVars.appTickDir))\n\t\t\tthrow new TNotFoundEx(\"Cannot create Tickler directory \"+TicklerVars.appTickDir+\". Check your configurations in Tickler.conf file\");\n\t\t\n\t}", "private boolean initHome(File file) {\r\n\t\ttry {\r\n\t\t\tFileUtils.forceMkdir(file);\r\n\t\t\treturn true;\r\n\t\t} catch (Exception ex) {\r\n\t\t\tlogger.error(\"Failed to initialize home directory '\" + file + \"'\", ex);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "private void checkIfLocationExists() {\n try {\n File file = new File(saveLocation);\n if(!file.exists()) file.mkdirs();\n } catch (Exception e) {\n log.error(e.getMessage(), e);\n }\n }", "public void createSubDirCameraTaken() {\n\t\tFile f = new File(getPFCameraTakenPath());\n\t\tf.mkdirs();\n\t}", "private Path initFolder(String folder) throws IOException {\n return Files.createDirectory(Paths.get(uploadFolder + \"/\" + folder));\n }", "public void customRootDir() {\n //Be careful with case when res is false which means dir is not valid.\n boolean res = KOOM.getInstance().setRootDir(this.getCacheDir().getAbsolutePath());\n }", "protected static void createDirectory(MasterProcedureEnv env, NamespaceDescriptor nsDescriptor)\n throws IOException {\n createDirectory(env.getMasterServices().getMasterFileSystem(), nsDescriptor);\n }", "private File getDataDir(){\n\t\tFile file = new File(this.configManager.getConfigDirectory() +\n\t\t\t\tFile.separator + \n\t\t\t\tDATA_DIR);\n\t\t\n\t\tif(!file.exists()){\n\t\t\tfile.mkdirs();\n\t\t}\n\t\t\n\t\treturn file;\n\t}", "public boolean isDirectory();", "private void createFolders() {\n File f = new File(System.getProperty(\"user.dir\") + \"/chatimages/\");\n if (!f.exists()){\n f.mkdir();\n }\n }", "private static void findPath()\r\n {\r\n String temp_path = System.getProperty(\"user.dir\");\r\n char last = temp_path.charAt(temp_path.length() - 1);\r\n if(last == 'g')\r\n {\r\n path = \".\";\r\n }\r\n else\r\n {\r\n path = \"./bag\";\r\n }\r\n \r\n }", "private void createFolder(String myFilesystemDirectory) {\n\r\n File file = new File(myFilesystemDirectory);\r\n try {\r\n if (!file.exists()) {\r\n //modified \r\n file.mkdirs();\r\n }\r\n } catch (SecurityException e) {\r\n Utilidades.escribeLog(\"Error al crear carpeta: \" + e.getMessage());\r\n }\r\n }", "public static void initializeOutputFolder() {\n\t\tString default_folder = PropertiesFile.getInstance().getProperty(\"default_folder\");\n\t\t\n\t\t// The file has to exist and is a directory (Not just a child file)\n\t\tString fullQualifiedFolderName = getFullyQualifiedFileName(default_folder);\n\t\tFile defaultDir = new File(fullQualifiedFolderName);\n\t\tif (!checkFolder(fullQualifiedFolderName)) {\n\t\t\tboolean dirCreated = defaultDir.mkdir();\n\t\t\tif(dirCreated == false) {\n\t\t\t\tlog.error(\"Could not create generation folder\");\n\t\t\t}\n\t\t} else\n\t\t\tdeleteFolderRecursively(defaultDir);\n\t}", "public FileSupport(String defaultPath){\n\t this.defaultPath = defaultPath;\n\t \n\t File dir = new File(defaultPath);\n\t \n\t if(!dir.exists()){\n\t\t try{\n\t\t\t dir.mkdir();\n\t\t } catch(SecurityException e){\n\t\t\t \n\t\t }\n\t\t \n\t }\n }", "public static void isDirectory0()\r\n {\r\n try {\r\n System.out.println(\">>>>>>>>>>>>\");\r\n File class0 = new File(\"D:\\\\java\");\r\n boolean ret0 = true;\r\n ret0 = class0.isDirectory();\r\n assert (ret0 == false);\r\n System.out.println(ret0);\r\n }catch (Exception e)\r\n {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "public boolean isDir() { return _entry==null; }", "public void setAndCreateDirPath(String dirname) {\r\n\t File newPath = new File(dirname); \r\n\t \r\n\t if(!newPath.isDirectory()) {\r\n\t\t newPath.mkdirs();\r\n\t }\r\n\t \r\n\t directory = newPath;\r\n }", "String getDirectoryPath();", "private static String getDirectoryPath() {\n // Replace the path here with your own\n File file = new File(Environment.getExternalStorageDirectory(),\n \"/GenericAndroidSoundboard/Audio/\");\n // Create the directory if it doesn't exist\n if (!file.exists()) {\n file.mkdirs();\n }\n\n // Get the path to the newly created directory\n return Environment.getExternalStorageDirectory()\n .getAbsolutePath() + \"/GenericAndroidSoundboard/Audio/\";\n }", "private void checkDirectory() {\n\t\tif( getDirectory()==null ) {\n\t\t\tthrow new LuceneIndexAccessException(\"The directory is not specified\");\n\t\t}\n\t}", "public void createDir(File file){\n\t\tif (!file.exists()) {\n\t\t\tif (file.mkdir()) {\n\t\t\t\tlogger.debug(\"Directory is created!\");\n\t\t\t} else {\n\t\t\t\tlogger.debug(\"Failed to create directory!\");\n\t\t\t}\n\t\t}\n\t}", "private static String getRioHomeDirectory() {\n String rioHome = RioHome.get();\n if(!rioHome.endsWith(File.separator))\n rioHome = rioHome+File.separator;\n return rioHome;\n }", "private File getHomeDirectory() {\n String brunelDir = System.getProperty(\"brunel.home\");\n File home = brunelDir != null ? new File(brunelDir) :\n new File(System.getProperty(\"user.home\"), \"brunel\");\n return ensureWritable(home);\n }", "static void initContacts(){\n String directory = \"contacts\";\n String filename = \"contacts.txt\";\n Path contactsDirectory= Paths.get(directory);\n Path contactsFile = Paths.get(directory, filename);\n try {\n if (Files.notExists(contactsDirectory)) {\n Files.createDirectories((contactsDirectory));\n System.out.println(\"Created directory\");\n }\n if (!Files.exists(contactsFile)) {\n Files.createFile(contactsFile);\n System.out.println(\"Created file\");\n }\n } catch(IOException ioe){\n ioe.printStackTrace();\n }\n }", "Folder createFolder();", "private static void createDirectory(Path path) throws IOException {\n\t\ttry {\n\t\t\tFiles.createDirectory(path);\n\t\t} catch (FileAlreadyExistsException e) {\n\t\t\tif (!Files.isDirectory(path)) {\n\t\t\t\tthrow e;\n\t\t\t}\n\t\t}\n\t}", "File getTargetDirectory();", "public static void createDirectories() \r\n\t{\r\n\t\tif(!fCertificatesDir().exists()) \r\n\t\t{\r\n\t\t\tfCertificatesDir().mkdir();\r\n\t\t}\r\n\t\t\r\n\t\tif(!fDbDir().exists()) \r\n\t\t{\r\n\t\t\tfDbDir().mkdir();\r\n\t\t}\r\n\t\t\r\n\t\tif(!fMibsDir().exists())\r\n\t\t{\r\n\t\t\tfMibsDir().mkdir();\r\n\t\t}\r\n\t\t\r\n\t\tif(!fMibsBinaryDir().exists()) \r\n\t\t{\r\n\t\t\tfMibsBinaryDir().mkdir();\r\n\t\t}\r\n\t\t\r\n\t\tif(!fMibsTextDir().exists()) \r\n\t\t{\r\n\t\t\tfMibsTextDir().mkdir();\r\n\t\t}\r\n\t}", "private boolean directoryExists() {\n if (Meta.getInstance().containDirectory(dirName))\n return true;\n else\n return false;\n }", "public void testFilesDirectoryAccessible() {\n File file = new File(rootBlog.getRoot(), \"files\");\n assertEquals(file, new File(rootBlog.getFilesDirectory()));\n assertTrue(file.exists());\n }", "public void createSubDirData() {\n\t\tFile f = new File(getPFDataPath());\n\t\tf.mkdirs();\n\t}", "private void checkDirectory(File directory) throws MojoExecutionException\n {\n if (!directory.exists())\n {\n if (!directory.mkdirs())\n {\n throw new MojoExecutionException(\n String.format(\"Failed to create directory '%s'\", directory));\n }\n }\n }", "private void createDirectoryIfNeeded(String directoryName)\n\t{\n\t\tFile theDir = new File(directoryName);\n\n\t\t// if the directory does not exist, create it\n\t\tif (!theDir.exists())\n\t\t{\n\t\t\t//System.out.println(\"creating directory: \" + directoryName);\n\t\t\ttheDir.mkdir();\n\t\t}\n\t}", "public void createDir(File file) {\n if (!file.exists()) {\n file.mkdir();\n }\n }", "public Path getDataDirectory();", "public File getStoreDir();", "public void checkFolder() {\n String mPath = Environment.getExternalStorageDirectory().getAbsolutePath() + \"/ExoTest/\";\n mDir = new File(mPath);\n boolean isDirectoryCreated = mDir.exists();\n if (!isDirectoryCreated) {\n isDirectoryCreated = mDir.mkdir();\n }\n if (isDirectoryCreated) {\n // do something\\\n Log.d(\"Folder\", \"Already Created\");\n }\n }", "public static String getDataDir(String path) {\n\t\tFile dir = new File(System.getProperty(\"user.dir\"));\n\t\tif (!(dir.toString().endsWith(\"samples\")))\n\t\t\tdir = dir.getParentFile();\n\t\tdir = new File(dir, \"resources\");\n\t\tdir = new File(dir, path);\n\t\tif (dir.isDirectory() == false)\n\t\t\tdir.mkdir();\n\t\treturn dir.toString();\n\t}", "@Test\n public void testFileInDirectoryFileDoesNotExists() {\n\n assertFalse(parent.fileInDirectory(\"file1\"));\n }", "protected File getDir() {\n return hasSubdirs ? DatanodeUtil.idToBlockDir(baseDir,\n getBlockId()) : baseDir;\n }", "@Override\n protected String getDirPath() {\n throw new UnsupportedOperationException();\n }", "public boolean makeDirectory( String directory, FileType type );", "public static void insurePathToFileExists(File f) {\r\n File p = f.getParentFile();\r\n //System.out.println(\"uu.iPE: parent of \"+filename+\" is \"+parent);\r\n\r\n if (!p.exists()) {\r\n // parent doesn't exist, create it:\r\n if (!p.mkdirs()) {\r\n throw new IllegalStateException(\"Unable to make directory \" + p.getPath());\r\n } // endif -- second mkdir unsuc\r\n } // endif -- parent exists\r\n }", "public static void isDirectory1()\r\n {\r\n try{\r\n System.out.println(\">>>>>>>>>>>>\");\r\n File class0 = new File(\"C:\\\\Users\\\\castle\");\r\n boolean ret0 = true;\r\n ret0 = class0.isDirectory();\r\n assert (ret0 == true);\r\n System.out.println(ret0);\r\n }catch (Exception e)\r\n {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "@Override\n public String getSystemDir() {\n return null;\n }", "protected File getAsinstalldir() throws ClassNotFoundException {\n\t\tif (asinstalldir == null) {\n\t\t\tString home = getProject().getProperty(\"asinstall.dir\");\n\t\t\tif (home != null) {\n asinstalldir = new File(home);\n\t\t\t}\n else {\n home = getProject().getProperty(\"sunone.home\");\n if (home != null)\n {\n final String msg = lsm.getString(\"DeprecatedProperty\", new Object[] {\"sunone.home\", \"asinstall.dir\"});\n log(msg, Project.MSG_WARN);\n asinstalldir = new File(home);\n }\n \n }\n\t\t}\n if (asinstalldir!=null) verifyAsinstalldir(asinstalldir);\n\t\treturn asinstalldir;\n\t}", "@BeforeEach\n void before() {\n if (Files.notExists(path)) path.toFile().mkdirs();\n }", "public static void checkFolder(String dir){\n java.nio.file.Path checkFolderPath = java.nio.file.Paths.get(dir+\"/data\");\n boolean folderExists = java.nio.file.Files.exists(checkFolderPath);\n //folder not exists, create one\n if(!folderExists) {\n new File(dir+\"/data\").mkdirs();\n }\n }", "static public void createClusterProfileDir() {\n if (new File(getClusterProfileDir()).exists() == true) {\n return;\n }\n\n String dir = IJ.getDirectory(\"home\") + File.separator + \".MosaicToolSuite\";\n try {\n ShellCommand.exeCmd(\"mkdir \" + dir);\n }\n catch (final IOException e) {\n e.printStackTrace();\n }\n catch (final InterruptedException e) {\n e.printStackTrace();\n }\n\n dir += File.separator + \"clusterProfile\";\n\n try {\n ShellCommand.exeCmd(\"mkdir \" + dir);\n }\n catch (final IOException e) {\n e.printStackTrace();\n }\n catch (final InterruptedException e) {\n e.printStackTrace();\n }\n }", "private static File getTestDataDir() {\n File ancestor = new File(System.getProperty(\"protobuf.dir\", \".\"));\n String initialPath = ancestor.getAbsolutePath();\n try {\n ancestor = ancestor.getCanonicalFile();\n } catch (IOException e) {\n throw new RuntimeException(\n \"Couldn't get canonical name of working directory.\", e);\n }\n while (ancestor != null && ancestor.exists()) {\n if (new File(ancestor, \"src/google/protobuf\").exists()) {\n return new File(ancestor, \"src/google/protobuf/testdata\");\n }\n ancestor = ancestor.getParentFile();\n }\n\n throw new RuntimeException(\n \"Could not find golden files. This test must be run from within the \" +\n \"protobuf source package so that it can read test data files from the \" +\n \"C++ source tree: \" + initialPath);\n }", "private void createRequiredDirectory(String outdir, String className) throws IOException\r\n\t{\n\t\tString workingdirectory = System.getProperty(\"user.dir\");\r\n\t\t\r\n\t\t//used to create directory\r\n\t\tscreenshotDir = new File(workingdirectory +\"/custom-test-report\");\r\n\t\tscreenshotDir.mkdir();\r\n\t\t\r\n\t\tscreenshotDir = new File(workingdirectory +\"/custom-test-report/Failure_Screenshot\");\r\n\t\tscreenshotDir.mkdir();\r\n\t\t\r\n\t\tscreenshotDir = new File(workingdirectory + \"/custom-test-report\" + \"/\" + className);\r\n\t\tscreenshotDir.mkdir();\r\n\t}", "private static File getTestDataDir() {\n File ancestor = new File(\".\");\n try {\n ancestor = ancestor.getCanonicalFile();\n } catch (IOException e) {\n throw new RuntimeException(\n \"Couldn't get canonical name of working directory.\", e);\n }\n while (ancestor != null && ancestor.exists()) {\n if (new File(ancestor, \"src/google/protobuf\").exists()) {\n return new File(ancestor, \"src/google/protobuf/testdata\");\n }\n ancestor = ancestor.getParentFile();\n }\n\n throw new RuntimeException(\n \"Could not find golden files. This test must be run from within the \" +\n \"protobuf source package so that it can read test data files from the \" +\n \"C++ source tree.\");\n }", "@Override\n public MethodOutcome mkdirsRootOutcome() {\n return new MethodOutcome(MethodOutcome.Type.RETURNS_TRUE);\n }", "public boolean make() {\n File file = new File(parent);\n if(!file.exists())\n return file.mkdirs();\n return true;\n }", "void createIndexDir(String indexDirPath) throws IOException {\n File indexDir = new File(indexDirPath);\n if (!indexDir.exists())\n indexDir.mkdir();\n else {\n removeIndexDir(indexDirPath);\n indexDir.mkdir(); \n }\n }", "private static File createReserveDiskCacheDir(Context context) {\n\t\tFile cacheDir = StorageUtils.getCacheDirectory(context, false);\n\t\tFile individualDir = new File(cacheDir, \"lazy-cache\");\n\t\tif (individualDir.exists() || individualDir.mkdir()) {\n\t\t\tcacheDir = individualDir;\n\t\t}\n\t\treturn cacheDir;\n\t}", "public static boolean checkFileDirectory() {\n\t\ttry {\n\t\t\tfinal File dir = new File(FINAL_SAVE_MEDIA_PATH);\n\t\t\tif (!dir.exists()) {\n\t\t\t\tfinal boolean isMkdirs = dir.mkdirs();\n\t\t\t\treturn isMkdirs;\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn false;\n\t}" ]
[ "0.7180107", "0.7130218", "0.7025914", "0.6949223", "0.6929893", "0.6916693", "0.69085807", "0.6773511", "0.67468315", "0.67393565", "0.67259735", "0.6710807", "0.6704752", "0.6700187", "0.6686928", "0.66765475", "0.66733027", "0.66417366", "0.66330934", "0.66272306", "0.6604976", "0.65710676", "0.6537114", "0.6528673", "0.6517549", "0.6496838", "0.6471613", "0.646248", "0.6459555", "0.6416808", "0.6412114", "0.64070994", "0.64043397", "0.6404271", "0.640329", "0.63965416", "0.6377011", "0.6347885", "0.6333876", "0.6323578", "0.63127273", "0.6310917", "0.63107836", "0.62881064", "0.6282743", "0.62698394", "0.62696064", "0.6259319", "0.6200727", "0.61917925", "0.6185012", "0.61799455", "0.617993", "0.617571", "0.6170733", "0.6169786", "0.6166344", "0.61610264", "0.6160076", "0.6154946", "0.6152039", "0.61472887", "0.61471194", "0.61438894", "0.61392736", "0.6136726", "0.6136339", "0.613595", "0.61353314", "0.6131693", "0.61301863", "0.6125693", "0.6121043", "0.6112375", "0.61098427", "0.6107598", "0.6102901", "0.61002046", "0.6092169", "0.6091201", "0.6087765", "0.608712", "0.60830647", "0.6081503", "0.60803473", "0.60739446", "0.60580397", "0.60550773", "0.6046325", "0.6042139", "0.60354817", "0.6030772", "0.6025439", "0.60220987", "0.60174066", "0.60155606", "0.60137963", "0.60135823", "0.60119957", "0.6009879", "0.6007305" ]
0.0
-1
add all available move to moves checking all the combinations for x moves in any direction of direction_x and y moves in any direction of direction_x
private void availableMoveHelper(ArrayList<int[]> moves, int[] direction_x, int[] direction_y, int start_x, int start_y, Board board){ for(int x : direction_x){ for(int y : direction_y){ int check_x = start_x+x; int check_y = start_y+y; if(this.isValid(check_x, check_y, board)){ int[] cur_pos = {check_x, check_y}; moves.add(cur_pos); } } } return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void calculatePossibleMoves(Tile orig, List<Tile> availableSpots) {\n for (Tile spot : orig.getConnectedTiles()) {\n if (spot != null) {\n if (!availableSpots.contains(spot)) {\n availableSpots.add(spot);\n this.calculatePossibleMoves(spot, availableSpots);\n }\n }\n }\n }", "void updateAvailMovesInBoxForFirstMove(int x, int y, int num) {\n\t\tint counter = 0;\n\t\tint i = x/boxSize;\n\t\tint j = y/boxSize;\n\t\tfor (int k = boxSize * i; k < boxSize * i + boxSize; k++) {\n\t\t\tfor (int l = boxSize * j; l < boxSize * j + boxSize; l++) {\n\t\t\t\tif (availMoves[k][l][num-1] == true) {\n\t\t\t\t\tcounter++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// next we see if there is a horizontal/vertical line that contains all of them, if it does, we can remove them from the line in the other boxes.\n\t\tif (counter > 1) {\n\t\t\tint lineCounter;\n\t\t\t// see if all the the availMoves that contain num are vertical\n\t\t\tfor (int k = boxSize * i; k < boxSize * i + boxSize; k++) {\n\t\t\t\tlineCounter = 0;\n\t\t\t\tfor (int l = boxSize * j; l < boxSize * j + boxSize; l++) {\n\t\t\t\t\tif (availMoves[k][l][num-1] == true) {\n\t\t\t\t\t\tlineCounter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (lineCounter == counter) {\n\t\t\t\t\tupdateAvailMovesInLineInBoxVertical(num, k, j);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if(lineCounter > 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// see if all the the availMoves that contain num are horizontal\n\t\t\tfor (int l = boxSize * j; l < boxSize * j + boxSize; l++) {\n\t\t\t\tlineCounter = 0;\n\t\t\t\tfor (int k = boxSize * i; k < boxSize * i + boxSize; k++) {\n\t\t\t\t\tif (availMoves[k][l][num-1] == true) {\n\t\t\t\t\t\tlineCounter++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (lineCounter == counter) {\n\t\t\t\t\tupdateAvailMovesInLineInBoxHorizontal(num, l, i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse if(lineCounter > 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\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}", "void findSoloAvailMoves(int x, int y) {\n\t\tint counter;\n\t\tint toInsert = 0;\n\t\tfor(int i = 0; i < boardSize; i++) {\n\t\t\tfor (int j = 0; j < boardSize; j++) {\n\t\t\t\tcounter = 0;\n\t\t\t\tfor (int k = 0; k < boardSize; k++) {\n\t\t\t\t\tif (availMoves[i][j][k] == true) {\n\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\ttoInsert = k + 1;\n\t\t\t\t\t\tif (counter > 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}\n\t\t\t\tif(counter == 1) {\n\t\t\t\t\tinsertNumber(i, j, toInsert);\n\t\t\t\t}\n\t\t\t}\n\t\t}\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}", "@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 }", "List<Direction> getValidDirectionsForMovement();", "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 ArrayList<Coordinate> getPossibleMoveCoordinate() {\n ChessBoard board = this.getChessBoard(); // get chess board\n ArrayList<Coordinate> coords = new ArrayList<Coordinate>(); // create return ArrayList\n int x, y;\n /*\n several cases\n 2 3\n 1 4\n\n 5 8\n 6 7\n\n */\n // case1\n x = this.x_coordinate - 2;\n y = this.y_coordinate + 1;\n if(x >= 0 && y < board.getHeight()){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case2\n x = this.x_coordinate - 1;\n y = this.y_coordinate + 2;\n if(x >= 0 && y < board.getHeight()){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case3\n x = this.x_coordinate + 1;\n y = this.y_coordinate + 2;\n if(x < board.getWidth() && y < board.getHeight()){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case4\n x = this.x_coordinate + 2;\n y = this.y_coordinate + 1;\n if(x < board.getWidth() && y < board.getHeight()){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case5\n x = this.x_coordinate - 2;\n y = this.y_coordinate - 1;\n if(x >= 0 && y >= 0 ){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case6\n x = this.x_coordinate - 1;\n y = this.y_coordinate - 2;\n if(x >= 0 && y >= 0){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case7\n x = this.x_coordinate + 1;\n y = this.y_coordinate - 2;\n if(x < board.getWidth() && y >= 0){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n // case1\n x = this.x_coordinate + 2;\n y = this.y_coordinate - 1;\n if(x < board.getWidth() && y >= 0){\n addToCoordinatesIfValid(coords, x, y); // add to coords if the piece can move to that coordinate\n }\n\n\n return coords;\n }", "public static void searchAlgortihm(int x, int y)\n\t{\n\t\tint dx = x;\n\t\tint dy = y;\n\t\tint numMovements = 1; // variable to indicate the distance from the user\n\t\t\n\t\t//check starting position\n\t\tcheckLocation(dx,dy, x, y);\n\n\t\tint minCoords = MAX_COORDS;\n\t\tminCoords *= -1; // max negative value of the grid\n\n\t\t// while - will search through all coordinates until it finds 5 events \n\t\twhile(numMovements < (MAX_COORDS*2)+2 && (closestEvents.size() < 5))\n\t\t{\n\t\t\t//first loop - \n\t\t\tfor(int i = 1; i <= 4; i++)\n\t\t\t{\n\t\t\t\tif(i == 1){ // // moving south-west\n\t\t\t\t\tfor(int j = 0; j < numMovements; j++){\n\t\t\t\t\t\tdx = j-x;\n\t\t\t\t\t\tdx *= -1; // reverse sign\n\t\t\t\t\t\tdy = (numMovements-j)+y;\n\t\t\t\t\t\tif((dx >= minCoords) && (dy <= MAX_COORDS)) // only check the coordinates if they are on the grid\n\t\t\t\t\t\t\tcheckLocation(dx, dy, x, y);\n\t\t\t\t\t\t/*else\n\t\t\t\t\t\t\tSystem.out.println(\"1 out of bounds - \" + dx + \",\" + dy);*/\n\t\t\t\t\t}\n\t\t\t\t}else if(i == 2){ // moving south-east\n\t\t\t\t\tfor(int j = 0; j < numMovements; j++){\n\t\t\t\t\t\tdx = (numMovements-j)-x;\n\t\t\t\t\t\tdx *= -1; // change sign\n\t\t\t\t\t\tdy = j-y; \n\t\t\t\t\t\tdy *= -1; // change sign\n\t\t\t\t\t\tif((dx >= minCoords) && (dy >= minCoords))\n\t\t\t\t\t\t\tcheckLocation(dx, dy, x, y);\n\t\t\t\t\t\t/*else\n\t\t\t\t\t\t\tSystem.out.println(\"2 out of bounds - \" + dx + \",\" + dy);*/\n\t\t\t\t\t}\n\t\t\t\t}else if(i == 3){ // moving north-east\n\t\t\t\t\tfor(int j = 0; j < numMovements; j++){\n\t\t\t\t\t\tdx = j+x;\n\t\t\t\t\t\tdy = (numMovements-j)-y;\n\t\t\t\t\t\tdy *= -1;\n\t\t\t\t\t\tif((dx <= MAX_COORDS) && (dy >= minCoords))\n\t\t\t\t\t\t\tcheckLocation(dx, dy, x, y);\n\t\t\t\t\t\t/*else\n\t\t\t\t\t\t\tSystem.out.println(\"3 out of bounds - \" + dx + \",\" + dy);*/\n\t\t\t\t\t}\n\t\t\t\t}else if(i == 4){ // moving north-west\n\t\t\t\t\tfor(int j = 0; j < numMovements; j++){\n\t\t\t\t\t\tdx = (numMovements-j)+x;\n\t\t\t\t\t\tdy = j+y;\n\t\t\t\t\t\tif((dx <= MAX_COORDS) && (dy <= MAX_COORDS))\n\t\t\t\t\t\t\tcheckLocation(dx, dy, x, y);\n\t\t\t\t\t\t/*else\n\t\t\t\t\t\t\tSystem.out.println(\"4 out of bounds - \" + dx + \",\" + dy);*/\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t\t// increment the number of movements, from user coordinate\n\t\t\tnumMovements++;\n\n\t\t} // End of while\n\t}", "public void setValidMoves(){\r\n int row = (int)this.space.getX();\r\n int column = (int)this.space.getY();\r\n int max = puzzleSize-1;\r\n if (row < max)\r\n this.validMoves.add(new Point(row+1, column));\r\n if (row > 0)\r\n this.validMoves.add(new Point(row-1, column));\r\n if (column < max)\r\n this.validMoves.add(new Point(row, column+1));\r\n if (column > 0)\r\n this.validMoves.add(new Point(row, column-1));\r\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 }", "private boolean thereispath(Move m, Tile tile, Integer integer, Graph g, Board B) {\n\n boolean result = true;\n boolean result1 = true;\n\n int start_dest_C = tile.COLUMN;\n int start_dest_R = tile.ROW;\n\n int move_column = m.getX();\n int move_row = m.getY();\n\n int TEMP = 0;\n int TEMP_ID = 0;\n int TEMP_ID_F = tile.id;\n int TEMP_ID_FIRST = tile.id;\n\n int final_dest_R = (integer / B.width);\n int final_dest_C = (integer % B.width);\n\n //System.out.println(\"* \" + tile.toString() + \" \" + integer + \" \" + m.toString());\n\n // Y ROW - X COLUMN\n\n for (int i = 0; i != 2; i++) {\n\n TEMP_ID_FIRST = tile.id;\n\n // possibility 1\n if (i == 0) {\n\n\n // first move columns\n for (int c = 0; c != Math.abs(move_column) && result != false; c++) {\n\n if (c == 0) {\n TEMP_ID_FIRST = tile.id;\n\n } else {\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n }\n\n TEMP = move_column / Math.abs(move_column);\n\n //System.out.println(\"1C:\" + TEMP);\n\n //System.out.println(\" \" + TEMP_ID_FIRST + \" - > \" + (start_dest_C + TEMP));\n\n start_dest_C += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n //System.out.println(TEMP_ID_FIRST + \" = \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n // System.out.println(\"OK\");\n\n } else {\n\n result = false;\n\n // System.out.println(\"NOPE\");\n\n\n }\n }\n\n for (int r = 0; r != Math.abs(move_row) && result != false; r++) {\n\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n TEMP = move_row / Math.abs(move_row);\n\n //System.out.println(\"1R:\" + TEMP);\n\n //System.out.println(start_dest_R + \" - > \" + (start_dest_R + TEMP));\n\n start_dest_R += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n // System.out.println(TEMP_ID_FIRST + \" and \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n //System.out.println(\"OK\");\n\n\n } else {\n\n result = false;\n\n //System.out.println(\"NOPE\");\n\n\n }\n }\n\n if (result == true) {\n return true;\n }\n\n\n }\n\n TEMP_ID = 0;\n\n if (i == 1) {\n\n result = true;\n\n start_dest_C = tile.COLUMN;\n start_dest_R = tile.ROW;\n // first move row\n for (int r = 0; r != Math.abs(move_row) && result1 != false; r++) {\n\n if (r == 0) {\n TEMP_ID_FIRST = tile.id;\n\n } else {\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n }\n\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n TEMP = move_row / Math.abs(move_row);\n\n //System.out.println(\"1R:\" + TEMP);\n\n //System.out.println(start_dest_R + \" - > \" + (start_dest_R + TEMP));\n\n start_dest_R += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n\n //System.out.println(TEMP_ID_FIRST + \" = \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n //System.out.println(\"OK\");\n\n } else {\n\n //System.out.println(\"NOPE\");\n\n result = false;\n\n }\n\n\n }\n\n // first move columns\n for (int c = 0; c != Math.abs(move_column) && result1 != false; c++) {\n\n\n TEMP_ID_FIRST = B.a.get(start_dest_R).get(start_dest_C).id;\n\n TEMP = move_column / Math.abs(move_column);\n\n //System.out.println(\"1C:\" + TEMP);\n\n //System.out.println(\" \" + TEMP_ID_FIRST + \" - > \" + (start_dest_C + TEMP));\n\n start_dest_C += TEMP;\n\n TEMP_ID = B.a.get(start_dest_R).get(start_dest_C).id;\n\n //System.out.println(TEMP_ID_FIRST + \" and \" + TEMP_ID);\n\n if (g.adj.get(TEMP_ID_FIRST).contains(TEMP_ID)) {\n\n //System.out.println(\"OK\");\n\n } else {\n result = false;\n\n //System.out.println(\"NOPE\");\n\n\n }\n }\n\n if (result == false) {\n return false;\n\n }\n\n\n }\n\n\n }\n\n\n return true;\n }", "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);", "public void updatePossibleMovesOther(){\n\t\tif( hasMoved){\n\t\t\tpossibleMovesOther = null;\n\t\t\treturn;\n\t\t}\n\t\t// Get left castle updateMoves first\n\t\tchar[] temp = AlgebraicNotationHelper.getAlgebraicNotationLeftOf( startingFile, startingRank);\n\t\ttemp = AlgebraicNotationHelper.getAlgebraicNotationLeftOf( temp[0], temp[1]);\n\t\ttemp = AlgebraicNotationHelper.getAlgebraicNotationLeftOf( temp[0], temp[1]);\n\t\t// Should be b1 for light color King (or b8 for dark color King)\n\t\tAlgebraicNotation tempAN = new AlgebraicNotation( temp[0], temp[1]);\n\t\tpossibleMovesOther.add( tempAN);\n\t\t// Get right castle updateMoves next\n\t\ttemp = AlgebraicNotationHelper.getAlgebraicNotationRightOf( startingFile, startingRank);\n\t\ttemp = AlgebraicNotationHelper.getAlgebraicNotationRightOf( temp[0], temp[1]);\n\t\t// Should be g1 for light color King (or g8 for dark color King)\n\t\ttempAN = new AlgebraicNotation( temp[0], temp[1]);\n\t\tpossibleMovesOther.add( tempAN);\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 int possibleMoves(int i, int x, int y, int[][] board) {\n\t\tint canMove = 0;\n\n\t\tif (i == 12) {\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y > 0 && y <= 7) && (x > 1 && x <= 7))\n\t\t\t\t\t&& board[x - 2][y - 1] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x - 2, y - 1, board, StdDraw.BLACK);\n\t\t\t}\n\t\t\tif (((y > 0 && y <= 7) && (x > 1 && x <= 7))\n\t\t\t\t\t&& board[x - 2][y - 1] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x - 1.5, y - .5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x - 1.5, y - .5, .5, .5);\n\t\t\t\tboard[x - 2][y - 1] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y >= 0 && y < 7) && (x > 1 && x <= 7))\n\t\t\t\t\t&& board[x - 2][y + 1] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x - 2, y + 1, board, StdDraw.BLACK);\n\t\t\t}\n\n\t\t\tif (((y >= 0 && y < 7) && (x > 1 && x <= 7))\n\t\t\t\t\t&& board[x - 2][y + 1] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x - 1.5, y + 1.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x - 1.5, y + 1.5, .5, .5);\n\t\t\t\tboard[x - 2][y + 1] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y >= 0 && y < 6) && (x > 0 && x <= 7))\n\t\t\t\t\t&& board[x - 1][y + 2] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x - 1, y + 2, board, StdDraw.BLACK);\n\t\t\t}\n\t\t\tif (((y >= 0 && y < 6) && (x > 0 && x <= 7))\n\t\t\t\t\t&& board[x - 1][y + 2] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x - .5, y + 2.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x - .5, y + 2.5, .5, .5);\n\t\t\t\tboard[x - 1][y + 2] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y >= 0 && y < 6) && (x >= 0 && x < 7))\n\t\t\t\t\t&& board[x + 1][y + 2] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x + 1, y + 2, board, StdDraw.BLACK);\n\t\t\t}\n\t\t\tif (((y >= 0 && y < 6) && (x >= 0 && x < 7))\n\t\t\t\t\t&& board[x + 1][y + 2] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x + 1.5, y + 2.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x + 1.5, y + 2.5, .5, .5);\n\t\t\t\tboard[x + 1][y + 2] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y >= 0 && y < 7) && (x >= 0 && x < 6))\n\t\t\t\t\t&& board[x + 2][y + 1] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x + 2, y + 1, board, StdDraw.BLACK);\n\t\t\t}\n\t\t\tif (((y >= 0 && y < 7) && (x >= 0 && x < 6))\n\t\t\t\t\t&& board[x + 2][y + 1] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x + 2.5, y + 1.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x + 2.5, y + 1.5, .5, .5);\n\t\t\t\tboard[x + 2][y + 1] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y > 0 && y <= 7) && (x >= 0 && x < 6))\n\t\t\t\t\t&& board[x + 2][y - 1] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x + 2, y - 1, board, StdDraw.BLACK);\n\t\t\t}\n\t\t\tif (((y > 0 && y <= 7) && (x >= 0 && x < 6))\n\t\t\t\t\t&& board[x + 2][y - 1] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x + 2.5, y - .5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x + 2.5, y - .5, .5, .5);\n\t\t\t\tboard[x + 2][y - 1] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y > 1 && y <= 7) && (x >= 0 && x < 7))\n\t\t\t\t\t&& board[x + 1][y - 2] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x + 1, y - 2, board, StdDraw.BLACK);\n\t\t\t}\n\t\t\tif (((y > 1 && y <= 7) && (x >= 0 && x < 7))\n\t\t\t\t\t&& board[x + 1][y - 2] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x + 1.5, y - 1.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x + 1.5, y - 1.5, .5, .5);\n\t\t\t\tboard[x + 1][y - 2] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y > 1 && y <= 7) && (x > 0 && x <= 7))\n\t\t\t\t\t&& board[x - 1][y - 2] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x - 1, y - 2, board, StdDraw.BLACK);\n\t\t\t}\n\t\t\tif (((y > 1 && y <= 7) && (x > 0 && x <= 7))\n\t\t\t\t\t&& board[x - 1][y - 2] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x - .5, y - 1.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x - .5, y - 1.5, .5, .5);\n\t\t\t\tboard[x - 1][y - 2] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\n\t\t\tStdDraw.show(30);\n\t\t\treturn canMove;\n\t\t}\n\n\t\tif (i == 22) {\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y > 0 && y <= 7) && (x > 1 && x <= 7))\n\t\t\t\t\t&& board[x - 2][y - 1] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x - 2, y - 1, board, StdDraw.WHITE);\n\t\t\t}\n\t\t\tif (((y > 0 && y <= 7) && (x > 1 && x <= 7))\n\t\t\t\t\t&& board[x - 2][y - 1] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x - 1.5, y - .5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x - 1.5, y - .5, .5, .5);\n\t\t\t\tboard[x - 2][y - 1] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y >= 0 && y < 7) && (x > 1 && x <= 7))\n\t\t\t\t\t&& board[x - 2][y + 1] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x - 2, y + 1, board, StdDraw.WHITE);\n\t\t\t}\n\n\t\t\tif (((y >= 0 && y < 7) && (x > 1 && x <= 7))\n\t\t\t\t\t&& board[x - 2][y + 1] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x - 1.5, y + 1.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x - 1.5, y + 1.5, .5, .5);\n\t\t\t\tboard[x - 2][y + 1] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y >= 0 && y < 6) && (x > 0 && x <= 7))\n\t\t\t\t\t&& board[x - 1][y + 2] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x - 1, y + 2, board, StdDraw.WHITE);\n\t\t\t}\n\t\t\tif (((y >= 0 && y < 6) && (x > 0 && x <= 7))\n\t\t\t\t\t&& board[x - 1][y + 2] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x - .5, y + 2.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x - .5, y + 2.5, .5, .5);\n\t\t\t\tboard[x - 1][y + 2] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y >= 0 && y < 6) && (x >= 0 && x < 7))\n\t\t\t\t\t&& board[x + 1][y + 2] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x + 1, y + 2, board, StdDraw.WHITE);\n\t\t\t}\n\t\t\tif (((y >= 0 && y < 6) && (x >= 0 && x < 7))\n\t\t\t\t\t&& board[x + 1][y + 2] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x + 1.5, y + 2.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x + 1.5, y + 2.5, .5, .5);\n\t\t\t\tboard[x + 1][y + 2] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y >= 0 && y < 7) && (x >= 0 && x < 6))\n\t\t\t\t\t&& board[x + 2][y + 1] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x + 2, y + 1, board, StdDraw.WHITE);\n\t\t\t}\n\t\t\tif (((y >= 0 && y < 7) && (x >= 0 && x < 6))\n\t\t\t\t\t&& board[x + 2][y + 1] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x + 2.5, y + 1.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x + 2.5, y + 1.5, .5, .5);\n\t\t\t\tboard[x + 2][y + 1] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y > 0 && y <= 7) && (x >= 0 && x < 6))\n\t\t\t\t\t&& board[x + 2][y - 1] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x + 2, y - 1, board, StdDraw.WHITE);\n\t\t\t}\n\t\t\tif (((y > 0 && y <= 7) && (x >= 0 && x < 6))\n\t\t\t\t\t&& board[x + 2][y - 1] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x + 2.5, y - .5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x + 2.5, y - .5, .5, .5);\n\t\t\t\tboard[x + 2][y - 1] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y > 1 && y <= 7) && (x >= 0 && x < 7))\n\t\t\t\t\t&& board[x + 1][y - 2] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x + 1, y - 2, board, StdDraw.WHITE);\n\t\t\t}\n\t\t\tif (((y > 1 && y <= 7) && (x >= 0 && x < 7))\n\t\t\t\t\t&& board[x + 1][y - 2] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x + 1.5, y - 1.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x + 1.5, y - 1.5, .5, .5);\n\t\t\t\tboard[x + 1][y - 2] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\t\t\tStdDraw.setPenColor(Move);\n\t\t\tif (((y > 1 && y <= 7) && (x > 0 && x <= 7))\n\t\t\t\t\t&& board[x - 1][y - 2] > 3) {\n\t\t\t\tcanMove = canMove\n\t\t\t\t\t\t+ possibleAttacks(x - 1, y - 2, board, StdDraw.WHITE);\n\t\t\t}\n\t\t\tif (((y > 1 && y <= 7) && (x > 0 && x <= 7))\n\t\t\t\t\t&& board[x - 1][y - 2] < 3) {\n\t\t\t\tStdDraw.filledRectangle(x - .5, y - 1.5, .5, .5);\n\t\t\t\tStdDraw.setPenColor();\n\t\t\t\tStdDraw.rectangle(x - .5, y - 1.5, .5, .5);\n\t\t\t\tboard[x - 1][y - 2] = 0;\n\t\t\t\tcanMove++;\n\t\t\t}\n\n\t\t\tStdDraw.show(30);\n\t\t\treturn canMove;\n\t\t} else\n\t\t\treturn canMove;\n\t}", "public void calculateLegalMoves() {\n //Gets the row and column and call the checkDiagonalMoves method to find what are the piece's legal movements.\n int currentRow = this.getSquare().getRow();\n int currentCol = this.getSquare().getCol();\n checkDiagonalMoves(currentRow, currentCol);\n }", "public Boolean check(int x, int y, String direction, int points) {\r\n\t\tBoolean canPlace = true;\r\n\t\tif (direction.equals(\"horizontal\")) {\r\n\t\t\tif ((y + points) < 11) {\r\n\t\t\t\tfor (int j = 0; j < points; j++) {\r\n\t\t\t\t\tif (randomGrid[x][y + j] != 0 || adjacentShipCheck(x, y + j))\r\n\t\t\t\t\t\tcanPlace = false;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor (int j = 0; j < points; j++) {\r\n\t\t\t\t\tif (randomGrid[x][y - j] != 0 || adjacentShipCheck(x, y - j))\r\n\t\t\t\t\t\tcanPlace = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\r\n\t\t\tif ((x + points) < 9) {\r\n\t\t\t\tfor (int j = 0; j < points; j++) {\r\n\t\t\t\t\tif (randomGrid[x + j][y] != 0 || adjacentShipCheck(x + j, y))\r\n\t\t\t\t\t\tcanPlace = false;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tfor (int j = 0; j < points; j++) {\r\n\t\t\t\t\tif (randomGrid[x - j][y] != 0 || adjacentShipCheck(x - j, y))\r\n\t\t\t\t\t\tcanPlace = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn canPlace;\r\n\r\n\t}", "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 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 }", "@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 }", "private boolean expand(int x, int y, int direction, char[][] board, boolean opt[][]){\n\t\tint len = board.length;\n\t\tint wid = board[0].length;\n\t\tboolean exit = true;\n\t\tif(x >= len-1 || x <= 0 || y >= wid-1 || y <= 0){ return exit;}\n\t\tif(board[x][y] == 'O'){\n\t\t\topt[x][y] = false;\n\t\t\tswitch(direction){\n\t\t\tcase 1:{\n\t\t\t\tif(expand(x+1,y,1,board,opt) && expand(x,y-1,1,board,opt) && expand(x,y+1,1,board,opt)){\n\t\t\t\t\texit = false;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 2:{\n\t\t\t\tif(expand(x-1,y,2,board,opt) && expand(x+1,y,2,board,opt) && expand(x,y+1,2,board,opt)){\n\t\t\t\t\texit = false;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 3:{\n\t\t\t\tif(expand(x-1,y,3,board,opt) && expand(x+1,y,3,board,opt) && expand(x,y-1,3,board,opt)){\n\t\t\t\t\texit = false;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase 4:{\n\t\t\t\tif(expand(x-1,y,4,board,opt) && expand(x,y-1,4,board,opt) && expand(x,y+1,4,board,opt)){\n\t\t\t\t\texit = false;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn exit;\n\t}", "public ArrayList<Move> getPossibleMoves(int startx, int starty, Board b){//String startpos, Board b){\n\t\t//startpos is the position of the current piece,\n\t\t//so we know which one it is on the board\n\t\t\n\t\tArrayList<Move> moves = new ArrayList<Move>();\n\t\t\n\t\t\n\t\t\n\t\t//int startx = Main.converttoMove(String.valueOf(startpos.charAt(0)));\n\t\t//int starty = Integer.valueOf(String.valueOf(startpos.charAt(1)));\n\t\t\t\t\t\n\t\tPosition startpo = b.getElement(startx, starty);\n\t\tString startcol = startpo.getState().getColor();\n\t\tboolean color = true;//color: white is true, black if false\n\t\tif(startcol.equalsIgnoreCase(\"b\")) {\n\t\t\tcolor = false;\n\t\t}\n\t\t\n\t\t\n\t\t//go up and down\n\t\t//Number of spaces to move in X and Y direction\n //int numSpacesYUp = starty+1;//Not sure if this math is correct\n \n\t\tint numSpacesYUp = Math.abs(starty);\n int numSpacesYDown = Math.abs(8-(starty+1));//^\n\t\t\n \n //go left and right\n\t\tint numSpacesXLeft=Math.abs(startx);//TO DO: Add Math\n\t\t//int numSpacesXRight =Math.abs(8-(startx+1)); //old\n\t\tint numSpacesXRight =Math.abs(8-(startx+1));//new\n \n \n \n\t\t//go diagonal upper right\n \n\t\tint numtoTopRightCorner = Math.min(numSpacesXRight, numSpacesYUp);//the min of the distance from the current spot to the right edge and to the top edge\n for(int i = 1;i<=numtoTopRightCorner;i++) {\n \tint endx = startx+i;\n \tint endy = starty-(i);\n \t\n \t\tPosition endpo = b.getElement(endx, endy);\n \t\tif(endpo.getState() != null) {//theres a piece at the end loc\n \t\tString endcol = endpo.getState().getColor();\n \t\tboolean endcolor = true;//color: white is true, black if false\n \t\tif(endcol.equalsIgnoreCase(\"b\")) {\n \t\t\tendcolor = false;\n \t\t}\n \t\tMove m = new Move(startx, starty, endx, endy);\n \tif(color != endcolor) {\n \t\t//System.out.println(\"\");\n \t\tm.setPieceTaken(true);\n \t\tif(endpo.getState() instanceof King) {\n \t\t\tm.setCheck(true);\n \t\t}else {\n \t\t\tm.setCheck(false);\n \t\t}\n \t\tmoves.add(m);\n \t\t//break;//can't get any more in the upper right diag because there would be a piece blocking its way\n \t}else if(color == endcolor) {\n \t\t//we don't add the move, because its not possible :/\n \t\t//you cant move to a location where you already have a piece\n \t\t//break;\n \t}\n \tbreak;//can't get any more in the upper right diag because there would be a piece blocking its way\n \t\t}else {\n \t\t\tMove m = new Move(startx, starty, endx, endy);\n \t\t\tmoves.add(m);\n \t\t}\n }\n\t\t\n\t\t\n\t\t\n\t\t//go diagonal upper left\n\t\tint numtoTopLeftCorner = Math.min(numSpacesXLeft, numSpacesYUp);//the min of the distance from the current spot to the right edge and to the top edge\n for(int i = 1;i<=numtoTopLeftCorner;i++) {\n \tint endx = startx-(i);\n \tint endy = starty-(i);\n \t\n \t\tPosition endpo = b.getElement(endx, endy);\n \t\tif(endpo.getState() != null) {//theres a piece at the end loc\n \t\tString endcol = endpo.getState().getColor();\n \t\tboolean endcolor = true;//color: white is true, black if false\n \t\tif(endcol.equalsIgnoreCase(\"b\")) {\n \t\t\tendcolor = false;\n \t\t}\n \t\tMove m = new Move(startx, starty, endx, endy);\n \tif(color != endcolor) {\n \t\tm.setPieceTaken(true);\n \t\tif(endpo.getState() instanceof King) {\n \t\t\tm.setCheck(true);\n \t\t}else {\n \t\t\tm.setCheck(false);\n \t\t}\n \t\tmoves.add(m);\n \t\t//break;//can't get any more in the upper right diag because there would be a piece blocking its way\n \t}else if(color == endcolor) {\n \t\t//we don't add the move, because its not possible :/\n \t\t//you cant move to a location where you already have a piece\n \t\t//break;\n \t}\n \tbreak;//can't get any more in the upper right diag because there would be a piece blocking its way\n \t\t}else {\n \t\t\tMove m = new Move(startx, starty, endx, endy);\n \t\t\tmoves.add(m);\n \t\t}\n \t\n \t\n }\n \n \n \n\t\t//go diagonal lewer left\n\t\tint numtoLowerLeftCorner = Math.min(numSpacesXLeft, numSpacesYDown);//the min of the distance from the current spot to the right edge and to the top edge\n for(int i = 1;i<=numtoLowerLeftCorner;i++) {\n \tint endx = startx-(i);\n \tint endy = starty+(i);\n \t\n \t\tPosition endpo = b.getElement(endx, endy);\n \t\tif(endpo.getState() != null) {//theres a piece at the end loc\n \t\tString endcol = endpo.getState().getColor();\n \t\tboolean endcolor = true;//color: white is true, black if false\n \t\tif(endcol.equalsIgnoreCase(\"b\")) {\n \t\t\tendcolor = false;\n \t\t}\n \t\tMove m = new Move(startx, starty, endx, endy);\n \tif(color != endcolor) {\n \t\tm.setPieceTaken(true);\n \t\tif(endpo.getState() instanceof King) {\n \t\t\tm.setCheck(true);\n \t\t}else {\n \t\t\tm.setCheck(false);\n \t\t}\n \t\tmoves.add(m);\n \t\t//break;//can't get any more in the upper right diag because there would be a piece blocking its way\n \t}else if(color == endcolor) {\n \t\t//we don't add the move, because its not possible :/\n \t\t//you cant move to a location where you already have a piece\n \t\t//break;\n \t}\n \tbreak;//can't get any more in the upper right diag because there would be a piece blocking its way\n \t\t}else {\n \t\t\tMove m = new Move(startx, starty, endx, endy);\n \t\t\tmoves.add(m);\n \t\t}\n }\n \n\t\t//go diagonal lower right\n\t\tint numtoLowerRightCorner = Math.min(numSpacesXRight, numSpacesYDown);//the min of the distance from the current spot to the right edge and to the top edge\n for(int i = 1;i<=numtoLowerRightCorner;i++) {\n \tint endx = startx+(i);\n \tint endy = starty+(i);\n \t\n \t//System.out.println(\"num spaces x right:\" + numSpacesXRight);\n \t//System.out.println(\"num spaces y down:\" + numSpacesYDown);\n \t\n \t\tPosition endpo = b.getElement(endx, endy);\n \t\tif(endpo.getState() != null) {//theres a piece at the end loc\n \t\tString endcol = endpo.getState().getColor();\n \t\tboolean endcolor = true;//color: white is true, black if false\n \t\tif(endcol.equalsIgnoreCase(\"b\")) {\n \t\t\tendcolor = false;\n \t\t}\n \t\tMove m = new Move(startx, starty, endx, endy);\n \tif(color != endcolor) {\n \t\tm.setPieceTaken(true);\n \t\tif(endpo.getState() instanceof King) {\n \t\t\tm.setCheck(true);\n \t\t}else {\n \t\t\tm.setCheck(false);\n \t\t}\n \t\tmoves.add(m);\n \t\t//break;//can't get any more in the upper right diag because there would be a piece blocking its way\n \t}else if(color == endcolor) {\n \t\t//we don't add the move, because its not possible :/\n \t\t//you cant move to a location where you already have a piece\n \t\t//break;//should break cause you cant go more in that direction\n \t}\n \tbreak;//can't get any more in the lower right diag because there would be a piece blocking its way\n \t\t}else {\n \t\t\tMove m = new Move(startx, starty, endx, endy);\n \t\t\tmoves.add(m);\n \t\t}\n \t\n \t\n }\n\t\t\n\t\t\n\t\treturn moves;//Return all possible legal moves\n\t}", "void advancedAvailMovesLine(int num) {\n\t\t\n\t\t //vertically\n\t\tint counter;\n\t\tfor (int i = 0; i < boardSize; i++) {\n\t\t\tcounter = 0;\n\t\t\tint yPos = 0;\n\t\t\tfor (int j = 0; j < boardSize; j++) {\n\t\t\t\tif (availMoves[i][j][num-1] == true) {\n\t\t\t\t\tcounter++;\n\t\t\t\t\tyPos = j;\n\t\t\t\t\tif (counter > 1) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (counter == 1) {\n\t\t\t\tmoveQueue.add(new int[] {i, yPos, num});\n\t\t\t}\t\t\t\n\t\t}\n\t\t//horizontally\n\t\tfor (int i = 0; i < boardSize; i++) {\n\t\t\tcounter = 0;\n\t\t\tint xPos = 0;\n\t\t\tfor(int j = 0; j < boardSize; j++) {\n\t\t\t\tif (availMoves[j][i][num-1] == true) {\n\t\t\t\t\tcounter++;\n\t\t\t\t\txPos = j;\n\t\t\t\t\tif (counter > 1) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (counter == 1) {\n\t\t\t\tmoveQueue.add(new int[] {xPos, i, num});\n\t\t\t}\n\t\t}\n\t\t\n\t}", "void updateAvailMovesInLine(int x, int y, int num) {\n\t\tfor(int i = 0; i < boardSize; i++) {\n\t\t\tavailMoves[x][i][num-1] = false;\n\t\t\tavailMoves[i][y][num-1] = false;\n\t\t}\n\t}", "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}", "ArrayList<int[]> findValidMoves();", "private static boolean isMoveValid( int x, int y ){\n int path[] = new int[8];\n for( int distance = 1; distance < 8; distance ++ ){\n checkPath( path, 0, x + distance, y, distance );\n checkPath( path, 1, x + distance, y + distance, distance );\n checkPath( path, 2, x, y + distance, distance );\n checkPath( path, 3, x - distance, y, distance );\n checkPath( path, 4, x - distance, y - distance, distance );\n checkPath( path, 5, x, y - distance, distance );\n checkPath( path, 6, x + distance, y - distance, distance );\n checkPath( path, 7, x - distance, y + distance, distance );\n }\n for( int i = 0; i < 8; i++ ){\n if( path[ i ] > 1 ){\n return true;\n }\n }\n return false;\n }", "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 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}", "static void solveKTUtil(int x, int y, int movei,\n int sol[][], int xMove[],\n int yMove[], List<int[][]> result) {\n int k, next_x, next_y;\n if (movei == N * N){\n \tresult.add(copy(sol));\n return ;\n }\n\n /* Try all next moves from the current coordinate\n x, y */\n for (k = 0; k < 8; k++) {\n next_x = x + xMove[k];\n next_y = y + yMove[k];\n if (isSafe(next_x, next_y, sol)) {\n sol[next_x][next_y] = movei;\n solveKTUtil(next_x, next_y, movei + 1,\n sol, xMove, yMove, result);\n \n sol[next_x][next_y] = -1;// backtracking\n }\n }\n\n \n }", "public abstract HashSet<Location> getPossibleMovements(GameBoard board);", "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}", "@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}", "protected Set<ChessMove> getPossibleCastlingMoves(ChessModel model, Location location, Set<ChessMove> movesSoFar) {\n\t\tCastlingAvailability castlingAvailability = model.getCastlingAvailability();\n\t\tif ((location == E1) && (getColor() == White)) {\n\t\t\t// this is the white king in the starting position\n\t\t\tif (castlingAvailability.isWhiteCanCastleKingSide()) {\n\t\t\t\tif (model.isLocationEmpty(F1) && model.isLocationEmpty(G1)) {\n\t\t\t\t\tif (!isInCheckAtLocations(model, E1, F1, G1)) {\n\t\t\t\t\t\tChessMove move = new ChessMoveCastleKingSide(getPiece(), E1, G1);\n\t\t\t\t\t\tmovesSoFar.add(move);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (castlingAvailability.isWhiteCanCastleQueenSide()) {\n\t\t\t\tif (model.isLocationEmpty(B1) && model.isLocationEmpty(C1) && model.isLocationEmpty(D1)) {\n\t\t\t\t\tif (!isInCheckAtLocations(model, B1, C1, D1, E1)) {\n\t\t\t\t\t\tChessMove move = new ChessMoveCastleQueenSide(getPiece(), E1, C1);\n\t\t\t\t\t\tmovesSoFar.add(move);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ((location == E8) && (getColor() == Black)) {\n\t\t\t// this is the black king in the starting position\n\t\t\tif (castlingAvailability.isBlackCanCastleKingSide()) {\n\t\t\t\tif (model.isLocationEmpty(F8) && model.isLocationEmpty(G8)) {\n\t\t\t\t\tif (!isInCheckAtLocations(model, E8, F8, G8)) {\n\t\t\t\t\t\tChessMove move = new ChessMoveCastleKingSide(getPiece(), E8, G8);\n\t\t\t\t\t\tmovesSoFar.add(move);\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\tif (castlingAvailability.isBlackCanCastleQueenSide()) {\n\t\t\t\tif (model.isLocationEmpty(B8) && model.isLocationEmpty(C8) && model.isLocationEmpty(D8)) {\n\t\t\t\t\tif (!isInCheckAtLocations(model, B8, C8, D8, E8)) {\n\t\t\t\t\t\tChessMove move = new ChessMoveCastleQueenSide(getPiece(), E8, C8);\n\t\t\t\t\t\tmovesSoFar.add(move);\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\t\t\t}\t\t\t\n\t\t}\n\t\treturn movesSoFar;\n\t}", "private void updateMoveList(Move m) {\n \t//first check for castling move\n \tif(m.getSource().getName().equals(\"King\")) {\n \tint sx = m.getSource().getLocation().getX();\n \tint dx = m.getDest().getLocation().getX();\n \t\n \t//castle king side\n \tif(dx - sx == 2) {\n \t\tmoveList.add(\"0-0\");\n \t\treturn;\n \t}\n \t//castle queen side\n \telse if(sx - dx == 2) {\n \t\tmoveList.add(\"0-0-0\");\n \t\treturn;\n \t}\n \t}\n \t\n \t//now do normal checks for moves\n \t//if no piece, normal notation\n \tif(m.getDest().getName().equals(\"None\")) {\n \t\t\n \t\t//check for en passant\n \t\tif(m.getSource().getName().equals(\"Pawn\")) {\n \t\t\t\n \t\t\t//it's only en passant if the pawn moves diagonally to an empty square \n \t\t\tif(m.getSource().getLocation().getX() != m.getDest().getLocation().getX()) {\n \t\t\t\tmoveList.add(m.getSource().getLocation().getFile()+ \"x\" + m.getDest().getLocation().getNotation());\n \t\t\t\treturn;\n \t\t\t}\n \t\t}\n \t\t\n \t\tmoveList.add(m.getSource().getID() + m.getDest().getLocation().getNotation());\n \t}\n \t//add \"x\" for capturing\n \t//for pawn, it's a bit different\n \telse if(m.getSource().getName().equals(\"Pawn\")) {\n \t\tmoveList.add(m.getSource().getLocation().getFile()+ \"x\" + m.getDest().getLocation().getNotation());\n \t}\n \telse {\n \t\tmoveList.add(m.getSource().getID() + \"x\" + m.getDest().getLocation().getNotation());\n \t}\n }", "abstract public List<Move> getPossibleMoves();", "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 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 }", "protected int bestDirection(int _y, int _x)\n {\n int sX = -1, sY = -1;\n for (int i = 0; i < m; i++) {\n boolean breakable = false;\n for (int j = 0; j < n; j++) {\n if (map[i][j] == 'p' || map[i][j] == '5') {\n sX = i;\n sY = j;\n breakable = true;\n break;\n }\n }\n if(breakable) break;\n sX =0; sY = 0;\n }\n Pair s = new Pair(sX, sY);\n Queue<Pair> queue = new Queue<Pair>();\n int[][] distance = new int[m][n];\n for (int i = 0; i < m; i++)\n for (int j = 0; j < n; j++)\n distance[i][j] = -1;\n distance[sX][sY] = 0;\n queue.add(s);\n /*\n System.out.println(\"DEBUG TIME!!!!\");\n for(int i = 0; i < m; i++)\n {\n for(int j = 0; j < n; j++)\n System.out.print(map[i][j]);\n System.out.println();\n }\n System.out.println();\n */\n while (!queue.isEmpty())\n {\n Pair u = queue.remove();\n for (int i = 0; i < 4; i++)\n {\n int x = u.getX() + hX[i];\n int y = u.getY() + hY[i];\n if (!validate(x, y)) continue;\n if (distance[x][y] != -1) continue;\n if (!canGo.get(map[x][y])) continue;\n distance[x][y] = distance[u.getX()][u.getY()] + 1;\n queue.add(new Pair(x, y));\n }\n }\n\n //slove if this enemy in danger\n //System.out.println(_x + \" \" + _y);\n if (inDanger[_x][_y])\n {\n int direction = -1;\n boolean canAlive = false;\n int curDistance = dangerDistance[_x][_y];\n int distanceToBomber = m * n;\n if (curDistance == -1) return 0;\n for (int i = 0; i < 4; i++)\n {\n int x = _x + hX[i];\n int y = _y + hY[i];\n if (!validate(x, y)) continue;\n if (dangerDistance[x][y] == -1) continue;\n if (dangerDistance[x][y] < curDistance)\n {\n curDistance = dangerDistance[x][y];\n direction = i;\n distanceToBomber = distance[x][y];\n } else if (dangerDistance[x][y] == curDistance)\n {\n if (distanceToBomber == -1 || distanceToBomber > distance[x][y])\n {\n direction = i;\n distanceToBomber = distance[x][y];\n }\n }\n }\n if (direction == -1) direction = random.nextInt(4);\n allowSpeedUp = true;\n return direction;\n }\n // or not, it will try to catch bomber\n else\n {\n /*\n System.out.println(\"x = \" + _x + \"y = \" + _y);\n for(int i = 0; i < n; i++) System.out.printf(\"%2d \",i);\n System.out.println();\n for(int i = 0; i < m; i++)\n {\n for(int j = 0; j < n; j++)\n System.out.printf(\"%2d \",distance[i][j]);\n System.out.println();\n }\n System.out.println();\n System.out.println();\n */\n int direction = -1;\n int[] die = new int[4];\n for (int i = 0; i < 4; i++)\n die[i] = 0;\n int curDistance = distance[_x][_y];\n for (int i = 0; i < 4; i++)\n {\n int x = _x + hX[i];\n int y = _y + hY[i];\n if (!validate(x, y))\n {\n die[i] = 1;\n continue;\n }\n ;\n if (inDanger[x][y])\n {\n die[i] = 2;\n continue;\n }\n if (distance[x][y] == -1) continue;\n if (distance[x][y] < curDistance)\n {\n curDistance = distance[x][y];\n direction = i;\n }\n }\n if(curDistance < 4) allowSpeedUp = true;\n else allowSpeedUp = false; //TODO: TEST :))\n if (direction == -1)\n {\n for (int i = 0; i < 4; i++)\n if (die[i] == 0) return i;\n for (int i = 0; i < 4; i++)\n if (die[i] == 1) return i;\n return 0;\n } else return direction;\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 }", "void updateAvailMovesInBox(int x, int y, int num) {\n\t\t// xBox and yBox are used to find which box we are inside (so we can loop through the box)\n\t\tint xBox = (x/boxSize);\n\t\tint yBox = (y/boxSize);\n\t\tfor (int i = boxSize * xBox; i < boxSize * xBox + boxSize; i++) {\n\t\t\tfor (int j = boxSize * yBox; j < boxSize * yBox + boxSize; j++) {\n\t\t\t\tavailMoves[i][j][num-1] = false;\n\t\t\t}\n\t\t}\n\t}", "private Set<IntVector2D> canAttackFromDestination() {\n\t\tif(activePath == null || !pf.isValidPath(activePath))\n\t\t\treturn new HashSet<>();\n\t\tGameCharacter gc = getUnitAt(activePath.get(0)).getEnclosed();\n\t\tboolean ranged = gc.isRanged();\n\t\tboolean melee = gc.isMelee();\n\t\tAlignment atkSide = gc.getSide();\n\t\tSet<IntVector2D> attackable = new HashSet<>();\n\t\tint x = activePath.get(activePath.size() - 1).getX();\n\t\tint y = activePath.get(activePath.size() - 1).getY();\n\t\tif(ranged) {\n\t\t\tList<IntVector2D> arr = new LinkedList<>();\n\t\t\tarr.add(new IntVector2D(x + 2, y));\n\t\t\tarr.add(new IntVector2D(x - 2, y));\n\t\t\tarr.add(new IntVector2D(x, y + 2));\n\t\t\tarr.add(new IntVector2D(x, y - 2));\n\t\t\tarr.add(new IntVector2D(x + 1, y + 1));\n\t\t\tarr.add(new IntVector2D(x - 1, y + 1));\n\t\t\tarr.add(new IntVector2D(x + 1, y - 1));\n\t\t\tarr.add(new IntVector2D(x - 1, y - 1));\n\t\t\tattackable.addAll(arr.stream()\n\t\t\t\t\t.filter((vec) -> (\n\t\t\t\t\t\t\tisTileOnMap(vec) // not sure why this is necessary\n\t\t\t\t\t\t\t&& getTileAt(vec).isOccupied()\n\t\t\t\t\t\t\t&& Alignment.areOpposed(atkSide, getUnitAt(vec).getSide())))\n\t\t\t\t\t.collect(Collectors.toList()));\n\t\t}\n\t\tif(melee) {\n\t\t\tList<IntVector2D> arr = new LinkedList<>();\n\t\t\tarr.add(new IntVector2D(x + 1, y));\n\t\t\tarr.add(new IntVector2D(x - 1, y));\n\t\t\tarr.add(new IntVector2D(x, y + 1));\n\t\t\tarr.add(new IntVector2D(x, y - 1));\n\t\t\tattackable.addAll(arr.stream()\n\t\t\t\t\t.filter((vec) -> (\n\t\t\t\t\t\t\tisTileOnMap(vec) // not sure why this is necessary\n\t\t\t\t\t\t\t&& getTileAt(vec).isOccupied()\n\t\t\t\t\t\t\t&& Alignment.areOpposed(atkSide, getUnitAt(vec).getSide())))\n\t\t\t\t\t.collect(Collectors.toList()));\n\t\t}\n\t\treturn attackable;\n\t}", "private int getDist(int x, int y, int direction) {\n\t\tint Spaces = 0;\n\t\tif(direction == 0)\n\t\t{\n\t\t\t\n\t\t\tPoint nextPoint = new Point(x, y++);\n\t\t\twhile(totalMap.isFreeSpace(nextPoint) && totalMap.isInsideGrid(nextPoint.x, nextPoint.y))\n\t\t\t{\n\t\t\t\tSpaces++;\n\t\t\t\tnextPoint.setLocation(x, y++);\n\t\t\t}\n\t\t}\n\t\tif(direction == 1)\n\t\t{\n\t\t\tPoint nextPoint = new Point(x++, y);\n\t\t\twhile(totalMap.isFreeSpace(nextPoint) && totalMap.isInsideGrid(nextPoint.x, nextPoint.y))\n\t\t\t{\n\t\t\t\tSpaces++;\n\t\t\t\tnextPoint.setLocation(x++, y);\n\t\t\t}\n\t\t}\n\t\tif(direction == 2)\n\t\t{\n\t\t\tPoint nextPoint = new Point(x--, y);\n\t\t\twhile(totalMap.isFreeSpace(nextPoint) && totalMap.isInsideGrid(nextPoint.x, nextPoint.y))\n\t\t\t{\n\t\t\t\tSpaces++;\n\t\t\t\tnextPoint.setLocation(x--, y);\n\t\t\t}\n\t\t}\n\t\tif(direction == 3)\n\t\t{\n\t\t\tPoint nextPoint = new Point(x, y--);\n\t\t\twhile(totalMap.isFreeSpace(nextPoint) && totalMap.isInsideGrid(nextPoint.x, nextPoint.y))\n\t\t\t{\n\t\t\t\tSpaces++;\n\t\t\t\tnextPoint.setLocation(x, y--);\n\t\t\t}\n\t\t}\n\t\treturn Spaces;\n\t}", "private boolean makeMoveFromMinimax(Slot source, Slot dest, Slot[] intermediates) {\n boolean moveMade = false;\n String directionMoving;\n\n if (source.getRow() == dest.getRow()) {\n if (source.getColumn() - dest.getColumn() == -2) {\n directionMoving = \"right\";\n } else {\n directionMoving = \"left\";\n }\n } else {\n if (source.getRow() - dest.getRow() == -2) {\n directionMoving = \"down\";\n } else {\n directionMoving = \"up\";\n }\n }\n\n if (source.getColor() != dest.getColor() && dest.getColor() == Slot.EMPTY) {\n if (directionMoving.equals(\"right\")) {\n if (boardObject.getSlot(source.getRow(), source.getColumn() + 1).getColor() != Slot.EMPTY) {\n boardObject.getSlot(source.getRow(), source.getColumn() + 1).setColor(Slot.EMPTY);\n\n intermediates[0] = new Slot(source.getRow(), source.getColumn() + 1, Slot.EMPTY);\n\n moveMade = true;\n }\n } else if (directionMoving.equals(\"left\")) {\n if (boardObject.getSlot(source.getRow(), source.getColumn() - 1).getColor() != Slot.EMPTY) {\n boardObject.getSlot(source.getRow(), source.getColumn() - 1).setColor(Slot.EMPTY);\n\n intermediates[0] = new Slot(source.getRow(), source.getColumn() - 1, Slot.EMPTY);\n\n moveMade = true;\n }\n } else if (directionMoving.equals(\"up\")) {\n if (boardObject.getSlot(source.getRow() - 1, source.getColumn()).getColor() != Slot.EMPTY) {\n boardObject.getSlot(source.getRow() - 1, source.getColumn()).setColor(Slot.EMPTY);\n\n intermediates[0] = new Slot(source.getRow() - 1, source.getColumn(), Slot.EMPTY);\n\n moveMade = true;\n }\n } else {\n if (boardObject.getSlot(source.getRow() + 1, source.getColumn()).getColor() != Slot.EMPTY) {\n boardObject.getSlot(source.getRow() + 1, source.getColumn()).setColor(Slot.EMPTY);\n\n intermediates[0] = new Slot(source.getRow() + 1, source.getColumn(), Slot.EMPTY);\n\n moveMade = true;\n }\n }\n }\n\n return moveMade;\n }", "public void findTheWay(int x, int y) {\n\n Queue<Tile> elements = new LinkedList<Tile>();\n\n if (!getTile(x, y).canTileMove()) {\n System.out.println(\"Impossible to move\");\n return;\n }\n\n elements.add(getTile(x, y));\n getTile(x, y).setVisited(true);\n\n System.out.println(\"The starting tile is \" + getTile(x, y).getX() + \" \" + getTile(x, y).getY());\n\n while (!elements.isEmpty()) {\n Tile current = elements.poll();\n System.out.println(\"Current tile \" + current.getX() + \" \" + current.getY() + \" from the queue\");\n if (current.getX() == MAX && current.getY() == MAX) {\n System.out.println(\"Reached bottom right corner\");\n return;\n }\n\n for (int i = 0; i < ALLX.length; i++) {\n int newX = current.getX() + ALLX[i];\n int newY = current.getY() + ALLY[i];\n\n if (isInside(newX, newY)) {\n if (!getTile(newX, newY).isVisited()) {\n\n getTile(newX, newY).setVisited(true);\n System.out.println(\"Next added tile to the queue is \" + newX + \" \" + newY);\n\n elements.add(getTile(newX, newY));\n }\n }\n }\n }\n\n }", "public boolean legalMove(ArrayList<Point2D> inputMove,ArrayList<Object> Gamestate){\n FooHistory currentGameState = (FooHistory) Gamestate.get(0);\n ArrayList<Point2D> player1moves= currentGameState.getCurrentState().get(0);\n ArrayList<Point2D> player2moves= currentGameState.getCurrentState().get(1);\n //System.out.println(\"Player1 moves in FooRules: \"+ player1moves);\n \n if(inputMove.size()==1){\n for(ArrayList<Point2D> array: currentGameState.getCurrentState()){\n for(Point2D point:array){\n if(inputMove.get(0).getX()==point.getX() && inputMove.get(0).getY()==point.getY()){\n System.out.println(\"Ilegal Move\");\n return false;\n }\n }\n }\n return true;\n }\n else{//Deals with moving a piece to take pieces\n if(adjacent(inputMove.get(0),inputMove.get(1))){//Makes sure the two input moves are adjacent\n if(currentGameState.getTurnCount()%2==1){ //Player 1's turn\n for(Point2D point:player2moves){\n if(point.getX()==inputMove.get(1).getX() && point.getY()==inputMove.get(1).getY()){\n return true;\n }\n }\n }\n if(currentGameState.getTurnCount()%2==0){//Player 2's turn\n for(Point2D point:player1moves){\n if(point.getX()==inputMove.get(1).getX() && point.getY()==inputMove.get(1).getY()){\n return true;\n }\n }\n }\n }\n System.out.println(\"Ilegal Move\"); \n return false; \n }\n \n }", "public LinkedList<Pair<DirType, Location>> getMove(int curX, int curY) {\n // find the shortest path to each coin from this current position (we don't actually care about\n // coins that we don't have a path to)\n // then, find the shortest path from each of those coins to each other coin\n\n // then, we want all Hamiltonian paths (and all subpaths?) Traveling Salesman Problem\n // i.e. we care about paths for as long as the number of steps it takes to complete\n // is less than or equal to the number of turns we have remaining\n\n // convert the Location[][] we have into David and Austin's LocationsToNode\n LocationsToNode graph = new LocationsToNode(maze);\n // knownCoins are ONLY the coins we have paths to. we will calculate the\n // shortest paths later. there are repeat calculations below.\n LinkedList<Node> coins = bfsFindCoins(graph, curX, curY);\n for (Node coinFrom : coins) {\n Location coinFromLoc = graph.getLocation(coinFrom);\n LinkedList<LinkedList<Location>> pathsToOthers = new LinkedList<LinkedList<Location>>();\n for (Node coinTo : coins) {\n Location coinToLoc = graph.getLocation(coinTo);\n LinkedList<Location> path = getShortestPath(coinFrom, coinTo, graph);\n pathsToOthers.add(path);\n }\n paths.put(coinFromLoc,pathsToOthers);\n }\n\n // calculating all possible Hamiltonian paths....\n // this is A LOT of paths we're talking about\n // i.e. we want every path that visits every single coin\n // so if we know 20 coins, starting at point 1, we have 19 choices\n // for the second point, 18 for the third, and so on (this is on the order of\n // n! total paths without dynamic programming, and might be too much brute force)\n // https://en.wikipedia.org/wiki/Hamiltonian_path#Properties\n // https://en.wikipedia.org/wiki/Travelling_salesman_problem#Heuristic_and_approximation_algorithms\n // https://stackoverflow.com/questions/16555978/example-of-a-factorial-time-algorithm-o-n\n // then, we will decide which Hamiltonian is the best for the number of\n // moves we have available to us\n\n // instead, i am going to try only calculating the paths we can actually make with our current number\n // of turns because we want the most coins in the fewest turns\n\n // WE ONLY CARE ABOUT THE LONGEST (COIN) PATH WITH THE SAME NUMBER OF TURNS\n\n return new LinkedList<Pair<DirType, Location>>();\n }", "void advancedAvailMovesBox(int num) {\n\t\t\n\t\tint counter;\n\t\t// a and b are which box we are in\n\t\tfor (int a = 0; a < boxSize; a++) {\n\t\t\tfor (int b = 0; b < boxSize; b++) {\n\t\t\t\tcounter = 0;\n\t\t\t\tint xPos = 0;\n\t\t\t\tint yPos = 0;\n\t\t\t\t//boxSize * a or b gets us inside the box.\n\t\t\t\tfor (int i = boxSize * a; i < boxSize * a + boxSize; i++) {\n\t\t\t\t\tfor (int j = boxSize * b; j < boxSize * b + boxSize; j++) {\n\t\t\t\t\t\tif (availMoves[i][j][num-1] == true) {\n\t\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\t\txPos = i;\n\t\t\t\t\t\t\tyPos = j;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (counter > 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\tif (counter > 1) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (counter == 1) {\n\t\t\t\t\tmoveQueue.add(new int[] {xPos, yPos, num});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "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 }", "@Test\n public void testThatCorrectMovesAreFound() {\n Solver solver = new Solver();\n PuzzleState state = new PuzzleState(Arrays.asList(CANNIBAL, CANNIBAL),\n Arrays.asList(MISSIONARY, MISSIONARY, CANNIBAL, MISSIONARY), PuzzleState.Position.LEFT_BANK);\n\n // get available moves\n List<Move> moves = solver.getAvailableMoves(state);\n\n Move expectedMove = new Move(Move.Direction.LEFT_TO_RIGHT, Arrays.asList(CANNIBAL, CANNIBAL));\n assertEquals(\"Only two moves should be available!\", 2, moves.size());\n assertTrue(\"List of moves doesn't contain exptected move!\", moves.contains(expectedMove));\n }", "private void addPossibleMoves(int[][] boardStatus) {\n //Iterates through two dimensional array.\n for(int rows = 0; rows < boardStatus.length; rows++) {\n for(int cols = 0; cols < boardStatus[rows].length; cols++) {\n //If the spot is empty, a possible move is added.\n if(boardStatus[rows][cols] == 0) {\n moves.add(new Move(rows, cols));\n }\n }\n }\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 static void fillDistances(CellData[][] cells) {\n\t\tSet<Pair<Integer, Integer>> currentLayer = new HashSet<>();\n\t\tfor (int x = 0; x < cells.length; x++) {\n\t\t\tfor (int y = 0; y < cells[0].length; y++) {\n\t\t\t\tif (cells[x][y].getType() == TrackCell.PRE_START_LINE) {\n\t\t\t\t\tcells[x][y].offerDistanceToFinish(1);\n\t\t\t\t\tcurrentLayer.add(Pair.of(x, y));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint currentDistance = 1;\n\t\twhile (true) {\n\t\t\t// iterate over the current layer cells and fill in the next layer\n\t\t\tSet<Pair<Integer, Integer>> nextLayer = new HashSet<>();\n\t\t\tfor (Pair<Integer, Integer> curLayerCell : currentLayer) {\n\t\t\t\tint x = curLayerCell.getLeft();\n\t\t\t\tint y = curLayerCell.getRight();\n\t\t\t\tTrackCell from = cells[x][y].getType();\n\t\t\t\tif (isNavigableFrom(cells, x - 1, y, from)\n\t\t\t\t\t\t&& cells[x - 1][y]\n\t\t\t\t\t\t\t\t.offerDistanceToFinish(currentDistance + 1)) {\n\t\t\t\t\tnextLayer.add(Pair.of(x - 1, y));\n\t\t\t\t}\n\t\t\t\tif (isNavigableFrom(cells, x + 1, y, from)\n\t\t\t\t\t\t&& cells[x + 1][y]\n\t\t\t\t\t\t\t\t.offerDistanceToFinish(currentDistance + 1)) {\n\t\t\t\t\tnextLayer.add(Pair.of(x + 1, y));\n\t\t\t\t}\n\t\t\t\tif (isNavigableFrom(cells, x, y - 1, from)\n\t\t\t\t\t\t&& cells[x][y - 1]\n\t\t\t\t\t\t\t\t.offerDistanceToFinish(currentDistance + 1)) {\n\t\t\t\t\tnextLayer.add(Pair.of(x, y - 1));\n\t\t\t\t}\n\t\t\t\tif (isNavigableFrom(cells, x, y + 1, from)\n\t\t\t\t\t\t&& cells[x][y + 1]\n\t\t\t\t\t\t\t\t.offerDistanceToFinish(currentDistance + 1)) {\n\t\t\t\t\tnextLayer.add(Pair.of(x, y + 1));\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (nextLayer.isEmpty()) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcurrentLayer = nextLayer;\n\t\t\tcurrentDistance++;\n\t\t}\n\n\t}", "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}", "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 }", "@Override\n\tpublic void updatePosition()\n\t{\n\t\tif(!fired && !pathfinding)\n\t\t{\n\t\t\tif(x == destX && y == destY)\n\t\t\t{\n\t\t\t\tfired = true;\n\t\t\t\tvehicle.msgAnimationDestinationReached();\n\t\t\t\tcurrentDirection = MovementDirection.None;\n\t\t\t\t\n\t\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\tif(cIntersection == null)\n\t\t\t\t{\n\t\t\t\t\tif(city.permissions[current.y][current.x].tryAcquire() || true)\n\t\t\t\t\t{\n\t\t\t\t\t\tcity.permissions[current.y][current.x].release();\n\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\tif(nextIntersection == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!cIntersection.acquireIntersection())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcIntersection.releaseAll();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcIntersection.releaseIntersection();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(Pathfinder.isCrossWalk(current,city.getWalkingMap(), city.getDrivingMap()))\n\t\t\t\t{\n\t\t\t\t\tList<Gui> guiList = city.crosswalkPermissions.get(current.y).get(current.x);\n\t\t\t\t\tsynchronized(guiList)\n\t\t\t\t\t{\n\t\t\t\t\t\twhile(guiList.contains(this))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tguiList.remove(this);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(allowedToMove || drunk)\n\t\t\t{\n\t\t\t\tswitch(currentDirection)\n\t\t\t\t{\n\t\t\t\t\tcase Right:\n\t\t\t\t\t\tx++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Up:\n\t\t\t\t\t\ty--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Down:\n\t\t\t\t\t\ty++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Left:\n\t\t\t\t\t\tx--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(x % CityPanel.GRID_SIZE == 0 && y % CityPanel.GRID_SIZE == 0 && !moves.isEmpty())\n\t\t\t{\t\n\t\t\t\tif(allowedToMove || drunk)\n\t\t\t\t{\n\t\t\t\t\tcurrentDirection = moves.pop();\n\t\t\t\t\n\t\t\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\t\t\n\t\t\t\t\tif(current != next)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(cIntersection == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(city.permissions[current.y][current.x].tryAcquire() || true)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcity.permissions[current.y][current.x].release();\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{\n\t\t\t\t\t\t\tif(nextIntersection == null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(!cIntersection.acquireIntersection())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcIntersection.releaseAll();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcIntersection.releaseIntersection();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//**************************ADDED**************************//\n\t\t\t\t\t\tif(Pathfinder.isCrossWalk(current,city.getWalkingMap(), city.getDrivingMap()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tList<Gui> guiList = city.crosswalkPermissions.get(current.y).get(current.x);\n\t\t\t\t\t\t\tsynchronized(guiList)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\twhile(guiList.contains(this))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tguiList.remove(this);\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//**************************END ADDED**************************//\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tcurrent = next;\n\t\t\t\t\t\n\t\t\t\t\tswitch(currentDirection)\n\t\t\t\t\t{\n\t\t\t\t\tcase Down:next = new Point(current.x,current.y + 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Left:next = new Point(current.x - 1,current.y);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Right:next = new Point(current.x + 1,current.y);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Up:next = new Point(current.x,current.y - 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:next = current;\n\t\t\t\t\t\tbreak;\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\n\n\t\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\t\n\t\t\t\tif(nextIntersection == null)\n\t\t\t\t{\n\t\t\t\t\tif(city.permissions[next.y][next.x].tryAcquire())\n\t\t\t\t\t{\n\t\t\t\t\t\tallowedToMove = true;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tallowedToMove = false;\n\t\t\t\t\t\treturn;\n\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\tif(cIntersection == null)\n\t\t\t\t\t{\n\t\t\t\t\t\t//**************************ADDED**************************//\n\t\t\t\t\t\tList<Gui> guiList = city.crosswalkPermissions.get(next.y).get(next.x);\n\t\t\t\t\t\tsynchronized(guiList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(Pathfinder.isCrossWalk(next, city.getWalkingMap(), city.getDrivingMap()))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfor(Gui g : guiList)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif(g instanceof PassengerGui)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tallowedToMove = false;\n\t\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(nextIntersection.acquireIntersection())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tnextIntersection.acquireAll();\n\t\t\t\t\t\t\t\t\tallowedToMove = true;\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\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tallowedToMove = false;\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tguiList.add(this);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//**************************END ADDED**************************//\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tallowedToMove = true;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(!allowedToMove && drunk)\n\t\t{\n\t\t\tcity.addGui(new ExplosionGui(x,y));\n\t\t\tSystem.out.println(\"DESTROYING\");\n\t\t\tcity.removeGui(this);\n\t\t\tvehicle.stopThread();\n\t\t\tsetPresent(false);\n\t\t\t\n\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\n\t\t\tif(cIntersection == null)\n\t\t\t{\n\t\t\t\tif(city.permissions[current.y][current.x].tryAcquire() || true)\n\t\t\t\t{\n\t\t\t\t\tcity.permissions[current.y][current.x].release();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(nextIntersection == null)\n\t\t\t\t{\n\t\t\t\t\tif(!cIntersection.acquireIntersection())\n\t\t\t\t\t{\n\t\t\t\t\t\tcIntersection.releaseAll();\n\t\t\t\t\t}\n\t\t\t\t\tcIntersection.releaseIntersection();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private static int[] decideDirection(boolean[][] maze, int x, int y){\n if (Random.Int(4) == 0 && //1 in 4 chance\n checkValidMove(maze, x, y, new int[]{0, -1})){\n return new int[]{0, -1};\n }\n\n //attempts to move right\n if (Random.Int(3) == 0 && //1 in 3 chance\n checkValidMove(maze, x, y, new int[]{1, 0})){\n return new int[]{1, 0};\n }\n\n //attempts to move down\n if (Random.Int(2) == 0 && //1 in 2 chance\n checkValidMove(maze, x, y, new int[]{0, 1})){\n return new int[]{0, 1};\n }\n\n //attempts to move left\n if (\n checkValidMove(maze, x, y, new int[]{-1, 0})){\n return new int[]{-1, 0};\n }\n\n return null;\n }", "private void checkForConversions() {\n\n for(int r=0; r<COLUMN_ROW_COUNT; r++) {\n for(int c=0; c<COLUMN_ROW_COUNT; c++) {\n Piece p = cells[r][c];\n if(p == null) continue;\n\n if (p.getType().equals(Type.GUARD)) {\n int surroundingDragons = 0;\n Piece piece;\n\n if ((c - 1) >= 0) {\n piece = cells[r][c - 1];\n if (piece != null && piece.getType().equals(Type.DRAGON)) surroundingDragons++;\n }\n if ((r- 1) >= 0) {\n piece = cells[r- 1][c];\n if (piece != null && piece.getType().equals(Type.DRAGON)) surroundingDragons++;\n }\n if ((c + 1) < COLUMN_ROW_COUNT) {\n piece = cells[r][c + 1];\n if (piece != null && piece.getType().equals(Type.DRAGON)) surroundingDragons++;\n }\n if ((r+ 1) < COLUMN_ROW_COUNT) {\n piece = cells[r+ 1][c];\n if (piece != null && piece.getType().equals(Type.DRAGON)) surroundingDragons++;\n }\n\n if (surroundingDragons >= 3) {\n cells[r][c].changeType(Type.DRAGON);\n }\n }\n\n /*\n if(p.getType().equals(Type.KING)) {\n int blockedDirections = 0;\n Piece piece;\n\n if ((c - 1) >= 0) {\n piece = cells[r][c - 1];\n if (piece != null) {\n if (piece.getType().equals(Type.DRAGON)) {\n blockedDirections++;\n } else if (piece.getType().equals(Type.GUARD) && (c - 2) >= COLUMN_ROW_COUNT && cells[r][c-2] != null) {\n blockedDirections++;\n }\n }\n } else blockedDirections++;\n\n if ((r- 1) >= 0) {\n piece = cells[r- 1][c];\n if (piece != null) {\n if (piece.getType().equals(Type.DRAGON)) {\n blockedDirections++;\n } else if (piece.getType().equals(Type.GUARD) && (r - 2) >= COLUMN_ROW_COUNT && cells[r-2][c] != null) {\n blockedDirections++;\n }\n }\n } else blockedDirections++;\n\n if ((c + 1) < COLUMN_ROW_COUNT) {\n piece = cells[r][c+1];\n if (piece != null) {\n if (piece.getType().equals(Type.DRAGON)) {\n blockedDirections++;\n } else if (piece.getType().equals(Type.GUARD) && (c + 2) < COLUMN_ROW_COUNT && cells[r][c+2] != null) {\n blockedDirections++;\n }\n }\n } else blockedDirections++;\n\n if ((r+ 1) < COLUMN_ROW_COUNT) {\n piece = cells[r+1][c];\n if (piece != null) {\n if (piece.getType().equals(Type.DRAGON)) {\n blockedDirections++;\n } else if (piece.getType().equals(Type.GUARD) && (r + 2) < COLUMN_ROW_COUNT && cells[r+2][c] != null) {\n blockedDirections++;\n }\n }\n } else blockedDirections++;\n\n if(blockedDirections == 4) {\n //gameOver = true;\n }\n }*/\n }\n }\n }", "public HashSet<int[]> findTiles(int x, int y, Tile[][] board, HashSet<int[]> tilePositions){\n TileType tileType = board[x][y].getType();\n int tileOrientation = board[x][y].getOrientation();\n\n switch(tileType){\n case Crossway:\n switch(tileOrientation){\n case 0:\n //nach oben\n //sind wir in der obersten Zeile oder hat das Tile über diesem nach unten eine Wand oder wurde das Tile über diesem schon angeschaut?\n if(y!=0 && !neighbourHasWall(2, board[x][y-1]) && !tilePositionsContainsXY(x,y-1, tilePositions) ) {\n tilePositions.add(arrayOfXY(x,y-1));\n tilePositions.addAll(findTiles(x, y - 1, board, tilePositions));\n }\n //nach links\n if(x!=0 && !neighbourHasWall(1, board[x-1][y]) && !tilePositionsContainsXY(x-1,y, tilePositions)) {\n tilePositions.add(arrayOfXY(x - 1, y));\n tilePositions.addAll(findTiles(x - 1, y, board, tilePositions));\n }\n //nach rechts\n if(x!=6 && !neighbourHasWall(3, board[x+1][y]) && !tilePositionsContainsXY(x+1,y,tilePositions)) {\n tilePositions.add(arrayOfXY(x + 1, y));\n tilePositions.addAll(findTiles(x + 1, y, board, tilePositions));\n }\n break;\n case 1:\n //nach oben\n if(y!=0 && !neighbourHasWall(2, board[x][y-1]) && !tilePositionsContainsXY(x,y-1, tilePositions)) {\n tilePositions.add(arrayOfXY(x, y-1));\n tilePositions.addAll(findTiles(x, y - 1, board, tilePositions));\n }\n //nach unten\n if(y!=6 && !neighbourHasWall(0, board[x][y+1]) && !tilePositionsContainsXY(x,y+1, tilePositions)) {\n tilePositions.add(arrayOfXY(x, y+1));\n tilePositions.addAll(findTiles(x, y + 1, board, tilePositions));\n }\n //nach rechts\n if(x!=6 && !neighbourHasWall(3, board[x+1][y]) && !tilePositionsContainsXY(x+1,y,tilePositions)) {\n tilePositions.add(arrayOfXY(x+1, y));\n tilePositions.addAll(findTiles(x + 1, y, board, tilePositions));\n }\n break;\n case 2:\n //nach links\n if(x!=0 && !neighbourHasWall(1, board[x-1][y]) && !tilePositionsContainsXY(x-1, y, tilePositions)) {\n tilePositions.add(arrayOfXY(x-1, y));\n tilePositions.addAll(findTiles(x - 1, y, board, tilePositions));\n }\n //nach unten\n if(y!=6 && !neighbourHasWall(0, board[x][y+1]) && !tilePositionsContainsXY(x,y+1, tilePositions)) {\n tilePositions.add(arrayOfXY(x, y+1));\n tilePositions.addAll(findTiles(x, y + 1, board, tilePositions));\n }\n //nach rechts\n if(x!=6 && !neighbourHasWall(3, board[x+1][y]) && !tilePositionsContainsXY(x+1,y,tilePositions)) {\n tilePositions.add(arrayOfXY(x+1, y));\n tilePositions.addAll(findTiles(x + 1, y, board, tilePositions));\n }\n break;\n case 3:\n //nach links\n if(x!=0 && !neighbourHasWall(1, board[x-1][y]) && !tilePositionsContainsXY(x-1, y, tilePositions)) {\n tilePositions.add(arrayOfXY(x-1, y));\n tilePositions.addAll(findTiles(x - 1, y, board, tilePositions));\n }\n //nach unten\n if(y!=6 && !neighbourHasWall(0, board[x][y+1]) && !tilePositionsContainsXY(x,y+1, tilePositions)) {\n tilePositions.add(arrayOfXY(x, y+1));\n tilePositions.addAll(findTiles(x, y + 1, board, tilePositions));\n }\n //nach oben\n if(y!=0 && !neighbourHasWall(2, board[x][y-1]) && !tilePositionsContainsXY(x,y-1,tilePositions)) {\n tilePositions.add(arrayOfXY(x, y-1));\n tilePositions.addAll(findTiles(x, y - 1, board, tilePositions));\n }\n break;\n }\n break;\n case Way:\n if(tileOrientation == 0 || tileOrientation == 2){\n //nach links\n if(x!=0 && !neighbourHasWall(1, board[x-1][y]) && !tilePositionsContainsXY(x-1,y, tilePositions)) {\n tilePositions.add(arrayOfXY(x-1, y));\n tilePositions.addAll(findTiles(x - 1, y, board, tilePositions));\n }\n //nach rechts\n if(x!=6 && !neighbourHasWall(3, board[x+1][y]) && !tilePositionsContainsXY(x+1,y,tilePositions)) {\n tilePositions.add(arrayOfXY(x+1, y));\n tilePositions.addAll(findTiles(x + 1, y, board, tilePositions));\n }\n }\n else{\n //nach unten\n if(y!=6 && !neighbourHasWall(0, board[x][y+1]) && !tilePositionsContainsXY(x,y+1, tilePositions)) {\n tilePositions.add(arrayOfXY(x, y+1));\n tilePositions.addAll(findTiles(x, y + 1, board, tilePositions));\n }\n //nach oben\n if(y!=0 && !neighbourHasWall(2, board[x][y-1]) && !tilePositionsContainsXY(x,y-1,tilePositions)) {\n tilePositions.add(arrayOfXY(x, y-1));\n tilePositions.addAll(findTiles(x, y - 1, board, tilePositions));\n }\n }\n break;\n case Edge:\n switch(tileOrientation){\n case 0:\n //nach unten\n if(y!=6 && !neighbourHasWall(0, board[x][y+1]) && !tilePositionsContainsXY(x,y+1, tilePositions)) {\n tilePositions.add(arrayOfXY(x, y+1));\n tilePositions.addAll(findTiles(x, y + 1, board, tilePositions));\n }\n //nach rechts\n if(x!=6 && !neighbourHasWall(3, board[x+1][y]) && !tilePositionsContainsXY(x+1,y,tilePositions)) {\n tilePositions.add(arrayOfXY(x+1, y));\n tilePositions.addAll(findTiles(x + 1, y, board, tilePositions));\n }\n break;\n case 1:\n //nach links\n if(x!=0 && !neighbourHasWall(1, board[x-1][y]) && !tilePositionsContainsXY(x-1, y, tilePositions)) {\n tilePositions.add(arrayOfXY(x-1, y));\n tilePositions.addAll(findTiles(x - 1, y, board, tilePositions));\n }\n //nach unten\n if(y!=6 && !neighbourHasWall(0, board[x][y+1]) && !tilePositionsContainsXY(x,y+1, tilePositions)) {\n tilePositions.add(arrayOfXY(x, y+1));\n tilePositions.addAll(findTiles(x, y + 1, board, tilePositions));\n }\n break;\n case 2:\n //nach oben\n if(y!=0 && !neighbourHasWall(2, board[x][y-1]) && !tilePositionsContainsXY(x,y-1, tilePositions)) {\n tilePositions.add(arrayOfXY(x, y-1));\n tilePositions.addAll(findTiles(x, y - 1, board, tilePositions));\n }\n //nach links\n if(x!=0 && !neighbourHasWall(1, board[x-1][y]) && !tilePositionsContainsXY(x-1,y, tilePositions)) {\n tilePositions.add(arrayOfXY(x-1, y));\n tilePositions.addAll(findTiles(x - 1, y, board, tilePositions));\n }\n break;\n case 3:\n //nach oben\n if(y!=0 && !neighbourHasWall(2, board[x][y-1]) && !tilePositionsContainsXY(x,y-1, tilePositions)) {\n tilePositions.add(arrayOfXY(x, y-1));\n tilePositions.addAll(findTiles(x, y - 1, board, tilePositions));\n }\n //nach rechts\n if(x!=6 && !neighbourHasWall(3, board[x+1][y]) && !tilePositionsContainsXY(x+1, y, tilePositions)) {\n tilePositions.add(arrayOfXY(x+1, y));\n tilePositions.addAll(findTiles(x + 1, y, board, tilePositions));\n }\n }\n break;\n }\n return tilePositions;\n }", "boolean isAllOnDestination(){\n\n if(player.getCurrentX()-player.getDestinationX()!=0 || player.getCurrentY()-player.getDestinationY()!=0)\n return false;\n\n for(int i = 0; i < boxes.size(); i++){\n Box item = boxes.get(i);\n if(item.getCurrentX()-item.getDestinationX()!=0 || item.getCurrentY()-item.getDestinationY()!=0)\n return false;\n }\n return true;\n }", "private static List<Point> possibleNextPos(Point currPos, Point coord1, Point coord2, double buildingSideGrad, Point buildingCentre){\r\n\t\tvar coord1Lat = coord1.latitude();\r\n\t\tvar coord1Lon = coord1.longitude();\r\n\t\tvar coord2Lat = coord2.latitude();\r\n\t\tvar coord2Lon = coord2.longitude();\r\n\t\t\r\n\t\tvar currPosLon = currPos.longitude();\r\n\t\tvar currPosLat = currPos.latitude();\r\n\t\t\r\n\t\tvar buildingLon = buildingCentre.longitude();\r\n\t\tvar buildingLat = buildingCentre.latitude();\r\n\t\t\r\n\t\tvar dir1 = computeDir(coord1, coord2); //in the case that the drone is moving in the direction coord1 to coord2\r\n\t\tvar nextPosTemp1 = nextPos(dir1, currPos); //the temporary next position if the drone moves in dir1\r\n\t\t\r\n\t\tvar dir2 = computeDir(coord2, coord1); //in the case that the drone is moving in the direction coord2 to coord1\r\n\t\tvar nextPosTemp2 = nextPos(dir2, currPos); //the temporary next position if the drone moves in dir2 \r\n\t\t\r\n\t\tvar possibleNextPos = new ArrayList<Point>();\r\n\t\t\r\n\t\tif(Math.abs(buildingSideGrad)>=1) { //in this case, longitudes of building centre and drone current position are compared\r\n\t\t\t//coord1 to coord2 scenario\r\n\t\t\tif((coord1Lat>coord2Lat && buildingLon<currPosLon) || (coord1Lat<coord2Lat && buildingLon>currPosLon)) {\r\n\t\t\t\tdir1 = (dir1+10)%360; //angle increased such that drone doesn't fly over side of building\r\n\t\t\t\tnextPosTemp1 = nextPos(dir1, currPos);\r\n\t\t\t}\r\n\t\t\t//coord2 to coord1 scenario\r\n\t\t\tif((coord1Lat<coord2Lat && buildingLon<currPosLon) || (coord1Lat>coord2Lat && buildingLon>currPosLon)) {\r\n\t\t\t\tdir2 = (dir2+10)%360;\r\n\t\t\t\tnextPosTemp2 = nextPos(dir2, currPos);\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\telse { //in this case, latitudes of building centre and drone current position are compared\r\n\t\t\tif((coord1Lon>coord2Lon && buildingLat>currPosLat) || (coord1Lon<coord2Lon && buildingLat<currPosLat)) {\r\n\t\t\t\tdir1 = (dir1+10)%360; \r\n\t\t\t\tnextPosTemp1 = nextPos(dir1, currPos);\r\n\t\t\t}\r\n\r\n\t\t\tif((coord1Lon<coord2Lon && buildingLat>currPosLat) || (coord1Lon>coord2Lon && buildingLat<currPosLat)) {\r\n\t\t\t\tdir2 = (dir2+10)%360;\r\n\t\t\t\tnextPosTemp2 = nextPos(dir2, currPos);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tpossibleNextPos.add(nextPosTemp1);\r\n\t\tpossibleNextPos.add(nextPosTemp2);\r\n\t\t\r\n\t\treturn possibleNextPos;\r\n\t}", "public void findTour( int x, int y, int moves )\n {\n delay(50); //slow it down enough to be followable\n if (solved) System.exit(0);\n\n //primary base case: tour completed\n if (moves == (sideLength * sideLength)) {\n solved = true;\n }\n //other base case: stepped off board or onto visited cell\n if ( board[x][y] != 0 ) {\n return;\n }\n //otherwise, mark current location\n //and recursively generate tour possibilities from current pos\n else {\n board[x][y] = moves;\n System.out.println(this);\n delay(10); //uncomment to slow down enough to view\n\n /*======================================\n Recursively try to solve (find tour) from\n each of knight's available moves.\n . e . d .\n f . . . c\n . . @ . .\n g . . . b\n . h . a .\n ======================================*/\n // right and down\n findTour(x + 1, y + 2, moves + 1);\n // left and down\n findTour(x - 1, y + 2, moves + 1);\n // down and right\n findTour(x + 2, y + 1, moves + 1);\n // up and left\n findTour(x - 2, y - 1, moves + 1);\n // right and up\n findTour(x + 1, y - 2, moves + 1);\n // left and up\n findTour(x - 1, y - 2, moves + 1);\n // up and right\n findTour(x + 2, y - 1, moves + 1);\n // down and left\n findTour(x - 2, y + 1, moves + 1);\n\n //If made it this far, path did not lead to tour, so back up.\n board[x][y] = 0;\n System.out.println(this);\n }\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 void Move(){\n for(int i = 0; i < moveList.length; i++){\n playerString = \"\";\n switch(moveList[i]) {\n case 1: {\n //TODO: Visited points to others\n System.out.println(\"Moving up!\");\n //Logic for fitness score might need to be moved\n if(!(game.mazeArray[game.playerPosition.getPlayerY() -1][game.playerPosition.getPlayerX()] == 1)){\n playerString.concat(\"game.playerPosition.getPlayerY() - 1 + game.playerPosition.getPlayerX()\");\n if(vistedMoves.contains(playerString)){\n vistedPoints += 2;\n } else {\n freedomPoints += 5;\n vistedMoves.add(playerString);\n }\n } else {\n System.out.println(\"Stuck\");\n wallHugs += 10;\n }\n game.moveUp();\n if(game.checkWin()){\n freedomPoints += 200;\n }\n break;\n }\n case 2: {\n System.out.println(\"Moving left!\");\n if(!(game.mazeArray[game.playerPosition.getPlayerY()][game.playerPosition.getPlayerX() -1] == 1)){\n playerString.concat(\"game.playerPosition.getPlayerY() + game.playerPosition.getPlayerX() -1\");\n if(vistedMoves.contains(playerString)){\n vistedPoints += 2;\n } else {\n freedomPoints += 5;\n vistedMoves.add(playerString);\n }\n } else {\n System.out.println(\"Stuck\");\n wallHugs += 1;\n }\n game.moveLeft();\n if(game.checkWin()){\n freedomPoints += 200;\n }\n break;\n }\n case 3: {\n System.out.println(\"Moving right!\");\n if(!(game.mazeArray[game.playerPosition.getPlayerY()][game.playerPosition.getPlayerX() +1] == 1)){\n playerString.concat(\"game.playerPosition.getPlayerY() + game.playerPosition.getPlayerX() +1\");\n if(vistedMoves.contains(playerString)){\n vistedPoints += 2;\n } else {\n freedomPoints += 5;\n vistedMoves.add(playerString);\n }\n } else {\n System.out.println(\"Stuck\");\n wallHugs += 1;\n }\n game.moveRight();\n if(game.checkWin()){\n freedomPoints += 200;\n }\n break;\n }\n case 4: {\n System.out.println(\"Moving down!\");\n if(!(game.mazeArray[game.playerPosition.getPlayerY() +1][game.playerPosition.getPlayerX()] == 1)){\n playerString.concat(\"game.playerPosition.getPlayerY() + 1 + game.playerPosition.getPlayerX()\");\n if(vistedMoves.contains(playerString)){\n vistedPoints += 2;\n } else {\n freedomPoints += 5;\n vistedMoves.add(playerString);\n }\n freedomPoints += 1;\n } else {\n System.out.println(\"Stuck\");\n wallHugs += 1;\n }\n game.moveDown();\n if(game.checkWin()){\n freedomPoints += 200;\n }\n break;\n }\n default: {\n System.out.println(\"End of line\");\n break;\n //You shouldn't be here mate.\n }\n }\n }\n\n }", "private 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 }", "private static boolean anyObstacles(ArrayList<CharacterSprite> pieces, int[] position, int[] destination,\n moveMode mode, boolean inclusive) {\n switch (mode) {\n case X_AXIS:\n int h = destination[0] < position[0] ? -1 : 1;\n for (int i = position[0] + h; i != destination[0]; i += h) {\n for (CharacterSprite sprite : pieces) {\n if (sprite.isColliding(i * CharacterSprite.size, position[1] * CharacterSprite.size)) {\n return true;\n }\n }\n }\n break;\n\n case Y_AXIS:\n h = destination[1] < position[1] ? -1 : 1;\n for (int i = position[1] + h; i != destination[1]; i += h) {\n for (CharacterSprite sprite : pieces) {\n if (sprite.isColliding(position[0] * CharacterSprite.size, i * CharacterSprite.size)) {\n return true;\n }\n }\n }\n break;\n\n case DIAGONAL:\n int i = destination[0], j = destination[1];\n i += i > position[0] ? -1 : 1;\n j += j > position[1] ? -1 : 1;\n\n while (i != position[0]) {\n for (CharacterSprite sprite : pieces) {\n if (sprite.isColliding(i * CharacterSprite.size, j * CharacterSprite.size)) {\n return true;\n }\n }\n\n i += i > position[0] ? -1 : 1;\n j += j > position[1] ? -1 : 1;\n }\n break;\n\n default:\n return true;\n }\n\n if (inclusive) {\n for (CharacterSprite sprite : pieces) {\n if (sprite.isColliding(destination[0] * CharacterSprite.size, destination[1] * CharacterSprite.size)) {\n return true;\n }\n }\n }\n\n return false;\n }", "@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 synchronized void move(int direction){\n if (direction == 0){\n return;\n }\n if (this.movePossible(direction)){\n int[] columns = direction < 0 ? new int[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12} : new int[]{12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1};\n for (int i : columns){\n for (int j = 1; j < 25; j++){\n if (this.movable[i][j]){\n this.map[i + direction][j] = this.map[i][j];\n this.movable[i + direction][j] = this.movable[i][j];\n this.colors[i + direction][j] = this.colors[i][j];\n\n this.map[i][j] = false;\n this.movable[i][j] = false;\n this.colors[i][j] = null;\n }\n }\n }\n this.piecePositionX += direction;\n }\n repaint();\n }", "public void move() {\n if (!isCollision(xMove, 0))\n moveX();\n //else\n // adjustX(xMove);\n\n if (!isCollision(0, yMove))\n moveY();\n //else\n // adjustY(yMove);\n //check isCollision(gameObject) with calculating the position for next move\n\n }", "private void setAvailableFromLastMove(int large, int smallx) {\n clearAvailable();\n // Make all the tiles at the destination available\n if (large != -1) {\n\n\n for (int i = 0; i < 9; i++) {\n for (int dest = 0; dest < 9; dest++) {\n if (!phaseTwo) {\n if (!done) {\n if (i == large) {\n TileAssignment5 tile = mSmallTiles[large][dest];\n if ((tile.getOwner() == TileAssignment5.Owner.NOTCLICKED))\n addAvailable(tile);\n\n switch (smallx) {\n case 0:\n int a[] = adjacencyList.get(0);\n\n for (int x : a) {\n TileAssignment5 tile1 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile1)) {\n mAvailable.remove(tile1);\n //}\n }\n break;\n case 1:\n int a1[] = adjacencyList.get(1);\n\n for (int x : a1) {\n TileAssignment5 tile2 = mSmallTiles[large][x];\n // if(mAvailable.contains(tile2)) {\n mAvailable.remove(tile2);\n //}\n }\n break;\n case 2:\n int a2[] = adjacencyList.get(2);\n for (int x : a2) {\n TileAssignment5 tile3 = mSmallTiles[large][x];\n // if(mAvailable.contains(tile3)) {\n mAvailable.remove(tile3);\n // }\n }\n break;\n case 3:\n int a3[] = adjacencyList.get(3);\n for (int x : a3) {\n TileAssignment5 tile4 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile4)) {\n mAvailable.remove(tile4);\n // }\n }\n break;\n case 4:\n int a4[] = adjacencyList.get(4);\n for (int x : a4) {\n TileAssignment5 tile5 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile5)) {\n mAvailable.remove(tile5);//}\n\n }\n break;\n case 5:\n int a5[] = adjacencyList.get(5);\n for (int x : a5) {\n TileAssignment5 tile6 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile6)) {\n mAvailable.remove(tile6);//}\n\n }\n break;\n case 6:\n int a6[] = adjacencyList.get(6);\n for (int x : a6) {\n TileAssignment5 tile7 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile7)) {\n mAvailable.remove(tile7);//}\n\n }\n break;\n case 7:\n int a7[] = adjacencyList.get(7);\n for (int x : a7) {\n TileAssignment5 tile8 = mSmallTiles[large][x];\n // if(mAvailable.contains(tile8)) {\n mAvailable.remove(tile8);//}\n\n }\n break;\n case 8:\n int a8[] = adjacencyList.get(8);\n for (int x : a8) {\n TileAssignment5 tile9 = mSmallTiles[large][x];\n //if(mAvailable.contains(tile9)) {\n mAvailable.remove(tile9);//}\n\n }\n break;\n }\n\n } else {\n if (DoneTiles.contains(i)) {\n continue;\n }\n TileAssignment5 tile = mSmallTiles[i][dest];\n tile.setOwner(TileAssignment5.Owner.FREEZED);\n tile.updateDrawableState('a', 0);\n }\n } else { //OnDOnePressed\n if (DoneTiles.contains(i)) {\n continue;\n }\n\n // Log.d(\"Comes \", \"Hereeee\");\n if (i != large) {//Correct answer\n TileAssignment5 tile = mSmallTiles[i][dest];\n tile.setOwner(TileAssignment5.Owner.NOTCLICKED);\n addAvailable(tile);\n tile.updateDrawableState('a', 0);\n //done =false;\n }\n }\n\n\n }else {\n/*\n ileAssignment5 thistile = mSmallTiles[i][dest];\n if(((Button)thistile.getView()).getText().charAt(0)==' '){\n mAvailable.remove(thistile);\n thistile.updateDrawableState('a', 0);\n }\n*/\n\n\n if (i == large) {\n if (dest == smallx) {\n TileAssignment5 tile1 = mSmallTiles[large][dest];\n tile1.setOwner(TileAssignment5.Owner.CLICKED);\n if (mAvailable.contains(tile1)) {\n mAvailable.remove(tile1);\n }\n tile1.updateDrawableState('a', 0);\n\n } else {\n TileAssignment5 tile2 = mSmallTiles[large][dest];\n if (!(tile2.getOwner() == TileAssignment5.Owner.CLICKED)) {\n\n tile2.setOwner(TileAssignment5.Owner.FREEZED);\n }\n if (mAvailable.contains(tile2)) {\n mAvailable.remove(tile2);\n }\n tile2.updateDrawableState('a', 0);\n }\n\n\n } else {\n\n\n TileAssignment5 tile3 = mSmallTiles[i][dest];\n if (!(tile3.getOwner() == TileAssignment5.Owner.CLICKED)) {\n tile3.setOwner(TileAssignment5.Owner.NOTCLICKED);\n }\n // if(((((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(null))||((Button)mSmallTiles[i][dest].getView()).getText().toString().charAt(0)==' ')||(((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(\"\"))){\n\n if ((!mAvailable.contains(tile3))&&(tile3.getView().toString().charAt(0)!=' ')){\n mAvailable.add(tile3);\n }\n\n\n tile3.updateDrawableState('a', 0);\n\n\n\n TileAssignment5 tile = mSmallTiles[i][dest];\n if(((Button)mSmallTiles[i][dest].getView()).getText().toString().charAt(0)==' '){\n // Log.d(\"Yes \", \"it came\");\n if(mAvailable.contains(tile)){\n mAvailable.remove(tile);\n }\n\n }\n else{\n if(!mAvailable.contains(tile)){\n addAvailable(tile);}\n }\n\n\n\n\n\n\n\n\n\n /*\n\n\n\n\n\n\n ileAssignment5 tile = mSmallTiles[i][dest];\n ileAssignment5 tile = mSmallTiles[i][dest];\n try{\n if(((((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(null))||((Button)mSmallTiles[i][dest].getView()).getText().toString().charAt(0)==' ')||(((Button)mSmallTiles[i][dest].getView()).getText().toString().equals(\"\"))){\n // Log.d(\"Yes \", \"it came\");\n if(mAvailable.contains(tile)){\n mAvailable.remove(tile);\n }\n }\n else{\n if(!mAvailable.contains(tile)){\n addAvailable(tile);}\n }}catch (ArrayIndexOutOfBoundsException e){\n\n\n }catch ( StringIndexOutOfBoundsException e){\n\n }\n\n*/\n }\n\n }\n }\n }\n }\n // If there were none available, make all squares available\n if (mAvailable.isEmpty()&&large==-1) {\n setAllAvailable();\n }\n }", "void updateAvailMovesInLineInBox(int num) {\n\t\tint counter;\n\t\t//for loop through each box\n\t\t\n\t\tfor (int i = 0; i < boxSize; i++) {\n\t\t\tfor (int j = 0; j < boxSize; j++) {\n\t\t\t\t// here we count the amount/number of the inserted num inside the box\n\t\t\t\tcounter = 0;\n\t\t\t\tfor (int k = boxSize * i; k < boxSize * i + boxSize; k++) {\n\t\t\t\t\tfor (int l = boxSize * j; l < boxSize * j + boxSize; l++) {\n\t\t\t\t\t\tif (availMoves[k][l][num-1] == true) {\n\t\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// next we see if there is a horizontal/vertical line that contains all of them, if it does, we can remove them from the line in the other boxes.\n\t\t\t\tif (counter > 1) {\n\t\t\t\t\tint lineCounter;\n\t\t\t\t\t// see if all the the availMoves that contain num are vertical\n\t\t\t\t\tfor (int k = boxSize * i; k < boxSize * i + boxSize; k++) {\n\t\t\t\t\t\tlineCounter = 0;\n\t\t\t\t\t\tfor (int l = boxSize * j; l < boxSize * j + boxSize; l++) {\n\t\t\t\t\t\t\tif (availMoves[k][l][num-1] == true) {\n\t\t\t\t\t\t\t\tlineCounter++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (lineCounter == counter) {\n\t\t\t\t\t\t\tupdateAvailMovesInLineInBoxVertical(num, k, j);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(lineCounter > 0) {\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\t// see if all the the availMoves that contain num are horizontal\n\t\t\t\t\tfor (int l = boxSize * j; l < boxSize * j + boxSize; l++) {\n\t\t\t\t\t\tlineCounter = 0;\n\t\t\t\t\t\tfor (int k = boxSize * i; k < boxSize * i + boxSize; k++) {\n\t\t\t\t\t\t\tif (availMoves[k][l][num-1] == true) {\n\t\t\t\t\t\t\t\tlineCounter++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (lineCounter == counter) {\n\t\t\t\t\t\t\tupdateAvailMovesInLineInBoxHorizontal(num, l, i);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(lineCounter > 0) {\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\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic Lista<Coordenada> getNextMovements() {\n\n\t\tLista<Coordenada> lista = new Lista<Coordenada>();\n\n\t\taddCoordenada(posicion.up(), lista);\n\t\taddCoordenada(posicion.right(), lista);\n\t\taddCoordenada(posicion.down(), lista);\n\t\taddCoordenada(posicion.left(), lista);\n\t\taddCoordenada(posicion.diagonalUpRight(), lista);\n\t\taddCoordenada(posicion.diagonalUpLeft(), lista);\n\t\taddCoordenada(posicion.diagonalDownRight(), lista);\n\t\taddCoordenada(posicion.diagonalDownLeft(), lista);\n\n\t\treturn lista;\n\t}", "public void setupRecursive(int x, int y) {\n\t\tint[] xy = new int[2];\n\t\tint x2; int y2;\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\txy = util.getRoundSquare(x, y, i);\n\t\t\tx2 = xy[0]; y2 = xy[1];\n\t\t\tif (!util.wrongPosition(x2, y2)){\n\t\t\t\tif (gameBoard[x2][y2] != '-') {\n\t\t\t\t\tcheckMinesAround(x2, y2);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private Set<Coordinate> addNeighbours(boolean locked, int x, int y) {\n\t\treturn Arrays.asList(\n\t\t\taddNeighbour(locked,x-2,y), //vecino arriba\n\t\t\taddNeighbour(locked,x+2,y), //vecino abajo\n\t\t\taddNeighbour(locked,x,y-2), //vecino izquierda\n\t\t\taddNeighbour(locked,x,y+2)\t//vecino derecha\n\t\t).stream().filter(predicate->predicate!=null).collect(Collectors.toSet());\n\t}", "void removeFromAvailMoves(int x, int y) {\n\t\tfor (int i = 0; i < boardSize; i++) {\n\t\t\tavailMoves[x][y][i] = false;\n\t\t}\n\t}", "private static void solution() {\n for (int i = 0; i < n; i++) {\n Coord here = coords[i]; // start, end, dir, gen\n for (int j = 0; j < here.gen; j++) {\n // Rotate degree of 90.\n List<Pair> changed = rotate(here.coord, here.endPoint);\n boolean first = true;\n for(Pair p: changed){\n if(first) {\n here.endPoint = new Pair(p.x, p.y);\n first = false;\n }\n here.coord.add(new Pair(p.x, p.y));\n }\n }\n }\n // count the number of squares enclosing all angles with dragon curve\n for (int i = 0; i < n; i++) {\n for(Pair p: coords[i].coord)\n board[p.y][p.x] = true;\n }\n int cnt = 0;\n for (int i = 0; i < 100; i++)\n for (int j = 0; j < 100; j++)\n if(board[i][j] && board[i + 1][j] && board[i][j + 1] && board[i + 1][j + 1])\n cnt += 1;\n System.out.println(cnt);\n }", "public abstract ArrayList<Move> possibleMoves(Board board);", "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 }", "private ArrayList<int[][]> possiblePuzzleMoves(int[][] currentPuzzle) {\n ArrayList<int [][]> possibleMoves = new ArrayList<>();\n //find zero\n int zeroRow = 0;\n int zeroCol = 0;\n for(int i = 0; i < currentPuzzle.length; i++) {\n for (int j = 0; j < currentPuzzle[i].length; j++) {\n if(currentPuzzle[i][j] == 0) {\n zeroRow = i;\n zeroCol = j;\n break;\n }\n }\n }\n\n //check if zero isn't in top row\n if(zeroRow > 0) {\n int [][]newPuzzleConfig = copy(currentPuzzle);\n int tileAbove = newPuzzleConfig[zeroRow - 1][zeroCol];\n newPuzzleConfig[zeroRow - 1][zeroCol] = 0;\n newPuzzleConfig[zeroRow][zeroCol] = tileAbove;\n possibleMoves.add(newPuzzleConfig);\n }\n\n //check if zero isn't in bottom row\n if(zeroRow < 2) {\n int [][]newPuzzleConfig = copy(currentPuzzle);\n int tileBelow = newPuzzleConfig[zeroRow + 1][zeroCol];\n newPuzzleConfig[zeroRow + 1][zeroCol] = 0;\n newPuzzleConfig[zeroRow][zeroCol] = tileBelow;\n possibleMoves.add(newPuzzleConfig);\n\n }\n\n //check if zero isn't in left col\n if(zeroCol > 0) {\n int [][]newPuzzleConfig = copy(currentPuzzle);\n int tileToLeft = newPuzzleConfig[zeroRow][zeroCol-1];\n newPuzzleConfig[zeroRow][zeroCol-1] = 0;\n newPuzzleConfig[zeroRow][zeroCol] = tileToLeft;\n possibleMoves.add(newPuzzleConfig);\n }\n\n //check if zero isn't in right col\n if(zeroCol < 2) {\n int [][]newPuzzleConfig = copy(currentPuzzle);\n int tileToRight = newPuzzleConfig[zeroRow][zeroCol+1];\n newPuzzleConfig[zeroRow][zeroCol+1] = 0;\n newPuzzleConfig[zeroRow][zeroCol] = tileToRight;\n possibleMoves.add(newPuzzleConfig);\n }\n return possibleMoves;\n }", "public void MovesRemainingExists() {\n InsideMovesRemainingExists = 1;\n NoMovesRemaining = 1;\n Beginning:\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n previousX = i;\n previousY = j + 1;\n if ((i + 1) < 9) {\n ValidSwitch(i + 1, j + 1);\n if (NoMovesRemaining == 0) { //checks the candies to the right\n ResetState();\n break Beginning; //breaks the loop\n }\n }\n\n if ((i - 1) >= 0) {\n ValidSwitch(i - 1, j + 1);\n if (NoMovesRemaining == 0) { //checks the candies to the left\n ResetState();\n break Beginning;\n }\n }\n\n if ((j + 1) < 9) {\n ValidSwitch(i, j + 2);\n if (NoMovesRemaining == 0) { //checks the candies on the bottom\n ResetState();\n break Beginning;\n }\n }\n\n if ((j - 1) >= 0) {\n ValidSwitch(i, j);\n if (NoMovesRemaining == 0) { //checks the candies at the top\n ResetState();\n break Beginning;\n }\n }\n }\n\n }\n InsideMovesRemainingExists = 0;\n\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 ArrayList<ArrayList<Integer>> getValidMoves(Board b, int playerID) {\n\t\t// Array met mogelijke zetten\n\t\tArrayList<ArrayList<Integer>> validMoves = new ArrayList<ArrayList<Integer>>();\n\n\t\t// alle mogelijke zetten opslaan in arraylist\n\t\tint boardsize = b.getBoardSize();\n\t\tfor (int x = 0; x < boardsize; x++) {\n\t\t\tfor (int y = 0; y < boardsize; y++) {\n\n\t\t\t\t// check of het veld leeg is (volle vakken zijn nooit geldig)\n\t\t\t\tif (b.getPiece(y, x) == 0) {\n\t\t\t\t\tArrayList<Integer> tempList = new ArrayList<Integer>();\n\t\t\t\t\tArrayList<Integer> tempAdd = new ArrayList<Integer>();\n\t\t\t\t\t// check in elke richting of de zet geldig is:\n\t\t\t\t\t// noordwest\n\t\t\t\t\ttempAdd = checkDirection(x, y, -1, -1, playerID, b);\n\t\t\t\t\tif (tempAdd.isEmpty() == false) {\n\t\t\t\t\t\ttempList.addAll(tempAdd);\n\t\t\t\t\t}\n\t\t\t\t\t// noord\n\t\t\t\t\ttempAdd = checkDirection(x, y, 0, -1, playerID, b);\n\t\t\t\t\tif (tempAdd.isEmpty() == false) {\n\t\t\t\t\t\ttempList.addAll(tempAdd);\n\t\t\t\t\t}\n\t\t\t\t\t// noordoost\n\t\t\t\t\ttempAdd = checkDirection(x, y, 1, -1, playerID, b);\n\t\t\t\t\tif (tempAdd.isEmpty() == false) {\n\t\t\t\t\t\ttempList.addAll(tempAdd);\n\t\t\t\t\t}\n\t\t\t\t\t// oost\n\t\t\t\t\ttempAdd = checkDirection(x, y, 1, 0, playerID, b);\n\t\t\t\t\tif (tempAdd.isEmpty() == false) {\n\t\t\t\t\t\ttempList.addAll(tempAdd);\n\t\t\t\t\t}\n\t\t\t\t\t// zuidoost\n\t\t\t\t\ttempAdd = checkDirection(x, y, 1, 1, playerID, b);\n\t\t\t\t\tif (tempAdd.isEmpty() == false) {\n\t\t\t\t\t\ttempList.addAll(tempAdd);\n\t\t\t\t\t}\n\t\t\t\t\t// zuid\n\t\t\t\t\ttempAdd = checkDirection(x, y, 0, 1, playerID, b);\n\t\t\t\t\tif (tempAdd.isEmpty() == false) {\n\t\t\t\t\t\ttempList.addAll(tempAdd);\n\t\t\t\t\t}\n\t\t\t\t\t// zuidwest\n\t\t\t\t\ttempAdd = checkDirection(x, y, -1, 1, playerID, b);\n\t\t\t\t\tif (tempAdd.isEmpty() == false) {\n\t\t\t\t\t\ttempList.addAll(tempAdd);\n\t\t\t\t\t}\n\t\t\t\t\t// west\n\t\t\t\t\ttempAdd = checkDirection(x, y, -1, 0, playerID, b);\n\t\t\t\t\tif (tempAdd.isEmpty() == false) {\n\t\t\t\t\t\ttempList.addAll(tempAdd);\n\t\t\t\t\t}\n\t\t\t\t\t// Zo lang er 1 bracket beschikbaar is, wordt de zet toegevoegd aan validMoves\n\t\t\t\t\tif (tempList.isEmpty() == false) {\n\t\t\t\t\t\tvalidMoves.add(tempList);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn validMoves;\n\t}", "private static Collection<Move> calculateAttacksOnTile(int position, Collection<Move> moves) {\n\t\tfinal List<Move> attackMoves = new ArrayList<>();\n\t\tfor(final Move move : moves) {\n\t\t\tif(position == move.getDestinationCoordinate()) {\n\t\t\t\tattackMoves.add(move);\n\t\t\t}\n\t\t}\n\t\treturn ImmutableList.copyOf(attackMoves);\n\t}", "void goOverLines() {\n\t\t//checking every vertical line if there is some number that has only one number available\n\t\t//for every number\n\t\tfor (int i = 0; i < boardSize; i++) {\n\t\t\t//for every line\n\t\t\tfor (int j = 0; j < boardSize; j++) {\n\t\t\t\t//for every square\n\t\t\t\tint tempCounter = 0;\n\t\t\t\tint tempK = 0;\n\t\t\t\tfor (int k = 0; k < boardSize; k++) {\n\t\t\t\t\tif (availMoves[j][k][i] == true) {\n\t\t\t\t\t\ttempCounter++;\n\t\t\t\t\t\ttempK = k;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (tempCounter == 1) {\n\t\t\t\t\tmoveQueue.add(new int[] {j, tempK, (i + 1)});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t//checking every vertical line if there is some number that has only one number available\n\t\t//for every number\n\t\tfor (int i = 0; i < boardSize; i++) {\n\t\t\t//for every line\n\t\t\tfor (int j = 0; j < boardSize; j++) {\n\t\t\t\t//for every square\n\t\t\t\tint tempCounter = 0;\n\t\t\t\tint tempK = 0;\n\t\t\t\tfor (int k = 0; k < boardSize; k++) {\n\t\t\t\t\tif (availMoves[k][j][i] == true) {\n\t\t\t\t\t\ttempCounter++;\n\t\t\t\t\t\ttempK = k;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (tempCounter == 1) {\n\t\t\t\t\tmoveQueue.add(new int[] {tempK, j, (i + 1)});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!moveQueue.isEmpty()) {\n\t\t\tdoMove();\n\t\t}\n\t}", "public void setValidMoves(Board board, int x, int y, int playerType) {\n\t\tmoves.clear();\n\t\t// if this is pawn's first move, it can move two squares forward\n\t\tif (firstMove == true)\n\t\t{\n\t\t\t// white moves forward with y++\n\t\t\tif(this.getPlayer() == 1)\n\t\t\t{\n\t\t\t\tPoint firstMove = new Point(x + 0, y + 2);\n\t\t\t\tif (board.getPiece(x, y + 1) == null && board.getPiece(x, y + 2) == null)\n\t\t\t\t{\n\t\t\t\t\t\tmoves.add(firstMove);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// black moves forward with y--\n\t\t\telse\n\t\t\t{\n\t\t\t\tPoint firstMove = new Point(x + 0, y - 2);\n\t\t\t\tif (board.getPiece(x, y - 1) == null && board.getPiece(x, y - 2) == null)\n\t\t\t\t{\n\t\t\t\t\t\tmoves.add(firstMove);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tif (this.getPlayer() == 1)\n\t\t{\n\t\t\t// if a piece is occupying a square diagonal from pawn, it can capture\n\t\t\tif (x + 1 < 8 && y + 1 < 8 && x + 1 >= 0 && y + 1 >= 0)\n\t\t\t{\n\t\t\t\tPoint move = new Point(x + 1, y + 1);\n\t\t\t\tif (board.getPiece(x + 1, y + 1) != null)\n\t\t\t\t{\n\t\t\t\t\tif (board.getPiece(x+1,y+1).getPlayer() != this.getPlayer())\n\t\t\t\t\t{\n\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\tif (x - 1 < 8 && y + 1 < 8 && x - 1 >= 0 && y + 1 >= 0)\n\t\t\t{\n\t\t\t\tPoint move = new Point(x - 1, y + 1);\n\t\t\t\tif (board.getPiece(x - 1, y + 1) != null)\n\t\t\t\t{\n\t\t\t\t\tif (board.getPiece(x - 1, y + 1).getPlayer() != this.getPlayer())\n\t\t\t\t\t{\n\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\t\t// if no piece is in front of pawn, it can move forward one square\n\t\t\tif (x < 8 && y + 1 < 8 && x >= 0 && y + 1 >=0)\n\t\t\t{\n\t\t\t\tPoint move = new Point(x + 0, y + 1);\n\t\t\t\tif (board.getPiece(x, y + 1) == null)\n\t\t\t\t{\n\t\t\t\t\t\tmoves.add(move);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// if a piece is occupying a square diagonal from pawn, it can capture\n\t\t\tif (x + 1 < 8 && y - 1 < 8 && x + 1 >= 0 && y - 1 >= 0)\n\t\t\t{\n\t\t\t\tPoint move = new Point(x + 1, y - 1);\n\t\t\t\tif (board.getPiece(x + 1, y - 1) != null)\n\t\t\t\t{\n\t\t\t\t\tif (board.getPiece(x + 1,y - 1).getPlayer() != this.getPlayer())\n\t\t\t\t\t{\n\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\tif (x - 1 < 8 && y - 1 < 8 && x - 1 >= 0 && y - 1 >= 0)\n\t\t\t{\n\t\t\t\tPoint move = new Point(x - 1, y - 1);\n\t\t\t\tif (board.getPiece(x - 1, y - 1) != null)\n\t\t\t\t{\n\t\t\t\t\tif (board.getPiece(x - 1, y - 1).getPlayer() != this.getPlayer())\n\t\t\t\t\t{\n\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\t\t// if no piece is in front of pawn, it can move forward one square\n\t\t\tif (x < 8 && y - 1 < 8 && x >= 0 && y - 1 >=0)\n\t\t\t{\n\t\t\t\tPoint move = new Point(x + 0, y - 1);\n\t\t\t\tif (board.getPiece(x, y - 1) == null)\n\t\t\t\t{\n\t\t\t\t\t\tmoves.add(move);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "private boolean canCaptureSomewhere(int x, int y){\n\t\tfor (int i = -2; i <= 2; i=i+4){\n\t\t\tfor (int j = -2; j <= 2; j=j+4){\n\t\t\t\tif (!(x+i < 0 || x+i > N\t\t\n\t\t\t\t|| y+j < 0 || y+j > N)){\t\t//don't give validMove impossible final coordinates\n\t\t\t\t\tif (validMove(x, y, x+i, y+j)) return true;\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private void setValidMoves() {\n\t\tl.getValidMoves();\n\n\t\tif(l.upValid) {\t// Update upward movement\n\t\t\ttmp=layout_Circle[l.y-1][l.x];\n\t\t\ttmp.setFill(Paint.valueOf(\"Green\"));\n\t\t}\n\n\t\tif(l.leftValid) {\t// Update leftward movement\n\t\t\ttmp=layout_Circle[l.y][l.x-1];\n\t\t\ttmp.setFill(Paint.valueOf(\"Green\"));\n\t\t}\n\n\t\tif(l.rightValid) {\t// Update rightward movement\n\t\t\ttmp=layout_Circle[l.y][l.x+1];\n\t\t\ttmp.setFill(Paint.valueOf(\"Green\"));\n\t\t}\n\t}", "public void performMove() {\n\t\tfor (int x = 0; x <= size-1; x++)\n\t\t\tfor (int y = 0; y <= size-1; y++)\n\t\t\t\tlocalBoard[y][x] = 0;\n\t\t\n\t\t//reset the flag that indicates if a move has been found that decreases the heuristic\n\t\tfoundBetterMove = false;\n\t\t\n\t\t//fill in the appropriate heuristic values\n\t\tpopulateHillValues();\n\t\tArrayList<PotentialMove> myBestList = new ArrayList<PotentialMove>();\n\n\t\t//Find the square with the lowest heuristic value. this should really write the values to an array. \n\t\tint squareDifferential = -1;\n\t\t//String outValue = \"\";\n\t\tfor (int y = 0; y <= size-1; y++) {\n\t\t\tfor (int x = 0; x <= size-1; x++){\n\t\t\t\t//outValue = outValue + localBoard[y][x];\n\t\t\t\tif (squareDifferential < 0) //lowestSquareFound not found yet \n\t\t\t\t{\n\t\t\t\t\tif ((NQueens.queens[x] != y) && //set if the current square isn't already occupied by a queen\n\t\t\t\t\t\t\t(localBoard[NQueens.queens[x]][x] >= localBoard[y][x])) {\n\t\t\t\t\t\tif (localBoard[y][x] == localBoard[NQueens.queens[x]][x])\n\t\t\t\t\t\t\tmyBestList.add(new PotentialMove(x, y, true));\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tmyBestList.add(new PotentialMove(x, y, false));\n\t\t\t\t\t\tsquareDifferential = localBoard[NQueens.queens[x]][x] - localBoard[y][x];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if ((localBoard[NQueens.queens[x]][x] - localBoard[y][x]) > squareDifferential) { // find the square with the largest differential in value from the queen in the column\n\t\t\t\t\tmyBestList.clear();\n\t\t\t\t\tmyBestList.add(new PotentialMove(x, y, false));\n\t\t\t\t\tsquareDifferential = localBoard[NQueens.queens[x]][x] - localBoard[y][x];\n\t\t\t\t}\n\t\t\t\telse if (((localBoard[NQueens.queens[x]][x] - localBoard[y][x]) == squareDifferential) && // the differential is equal to the current best differential\n\t\t\t\t\t\t(NQueens.queens[x] != y)) { // and isn't already occupied by a queen\n\t\t\t\t\tmyBestList.add(new PotentialMove(x, y, true));\n\t\t\t\t}\n\t\t\t\t//else the square is higher, has a queen or isn't marginally better than the current queen's position in the row\n\t\t\t}\n\t\t\t//outValue = outValue + \"\\n\";\n\t\t}\n\t\t//JOptionPane.showMessageDialog(null, outValue);\n\t\t\n\t\tif (myBestList.isEmpty())\n\t\t\treturn;\n\t\t\n\t\tint listSize = myBestList.size();\n\t\tPotentialMove bestMove;\n\t\t\n\t\t//grab the non-Sideways moves first\n\t\tfor (int i = 0; i < listSize; i++) {\n\t\t\tif (!(myBestList.get(i).isSideways)) {\n\t\t\t\tbestMove = myBestList.get(i);\n\t\t\t\tfoundBetterMove = true;\n\t\t\t\tsidewaysMoves = 0;\n\t\t\t\tNQueens.queens[bestMove.xCoordinate] = bestMove.yCoordinate;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (sidewaysMoves > MAXSIDEWAYSMOVES) { // hit MAXSIDEWAYSMOVES consecutive sideways moves, mark as unsolvable\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//all available moves sideways moves, let's select one randomly\n\t\tRandom generator = new Random();\n\t\tint randomElement = generator.nextInt(listSize);\n\t\t\n\t\tbestMove = myBestList.get(randomElement);\n\t\tfoundBetterMove = true;\n\t\tsidewaysMoves++;\n\t\tNQueens.queens[bestMove.xCoordinate] = bestMove.yCoordinate;\n\t}", "public boolean move(Direction direction) throws InvalidPuzzle {\n\t\tint[] coordinate = this.findNumber(0);\n\t\tif (direction == Direction.Up) {\n\t\t\tif (coordinate[0] == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tint targetedNumber = this.getNumberAt(coordinate[0] - 1, coordinate[1]);\n\t\t\tthis.setNumberAt(coordinate[0] - 1, coordinate[1], 0);\n\t\t\tthis.setNumberAt(coordinate[0], coordinate[1], targetedNumber);\n\t\t}\n\t\telse if (direction == Direction.Down) {\n\t\t\tif (coordinate[0] == 3) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tint targetedNumber = this.getNumberAt(coordinate[0] + 1, coordinate[1]);\n\t\t\tthis.setNumberAt(coordinate[0] + 1, coordinate[1], 0);\n\t\t\tthis.setNumberAt(coordinate[0], coordinate[1], targetedNumber);\n\t\t}\n\t\t\n\t\telse if (direction == Direction.Left) {\n\t\t\tif (coordinate[1] == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tint targetedNumber = this.getNumberAt(coordinate[0], coordinate[1] - 1);\n\t\t\tthis.setNumberAt(coordinate[0], coordinate[1] - 1, 0);\n\t\t\tthis.setNumberAt(coordinate[0], coordinate[1], targetedNumber);\n\t\t}\n\t\t\n\t\telse if (direction == Direction.Right) {\n\t\t\tif (coordinate[1] == 3) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tint targetedNumber = this.getNumberAt(coordinate[0], coordinate[1] + 1);\n\t\t\tthis.setNumberAt(coordinate[0], coordinate[1] + 1, 0);\n\t\t\tthis.setNumberAt(coordinate[0], coordinate[1], targetedNumber);\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "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 static boolean makeHallway(int[][] board, int[] from, int[] to, float[] filled, Random random) {\n // ignore out of bounds attempts\n if (!(from[X] >= 0 && from[X] < board.length && from[Y] >= 0 && from[Y] < board[0].length)\n || !(to[X] >= 0 && to[X] < board.length && to[Y] >= 0 && to[Y] < board[0].length)) {\n return false;\n }\n\n int x1 = from[X];\n int x2 = to[X];\n int y1 = from[Y];\n int y2 = to[Y];\n\n board[x1][y1] = ROOM;\n board[x2][y2] = ROOM;\n\n filled[0] += 2;\n\n // keep track of directional motion\n int dirX, dirY;\n\n // find initial direction\n if (x2 > x1)\n dirX = 1; // east\n else\n dirX = -1; // west\n if (y2 > y1)\n dirY = 1; // north\n else\n dirY = -1; // south\n\n // move into random direction\n boolean firstHorizontal = random.nextBoolean();\n boolean secondHorizontal = random.nextBoolean();\n\n // making a corridor might take awhile, just continue this iterative\n // process\n while (true) {\n\n if (x1 != x2 && y1 != y2) {\n // adjust the first tile iterator\n if (firstHorizontal)\n x1 += dirX;\n else\n y1 += dirY;\n }\n\n if (x1 != x2 && y1 != y2)\n // still not equal\n {\n // adjust the second tile iterator\n if (secondHorizontal)\n x2 -= dirX;\n else\n y2 -= dirY;\n }\n\n if (board[x1][y1] == NULL) {\n board[x1][y1] = HALL;\n filled[0]++;\n }\n if (board[x2][y2] == NULL) {\n board[x2][y2] = HALL;\n filled[0]++;\n }\n // check once more if the iterators match after moving\n // if the iterators are on the same level, try connecting them\n if (x1 == x2) {\n while (y1 != y2) {\n // adjust y until we reach destination\n y1 += dirY;\n if (board[x1][y1] == NULL) {\n board[x1][y1] = HALL;\n filled[0]++;\n }\n }\n if (board[x1][y1] == NULL) {\n board[x1][y1] = HALL;\n filled[0]++;\n }\n // return that we've connected the hallway successfully\n return true;\n }\n // iterators are on the same level horizontally, so we must now\n // connect across\n if (y1 == y2) {\n while (x1 != x2) {\n // adjust y until we reach destination\n x1 += dirX;\n if (board[x1][y1] == NULL) {\n board[x1][y1] = HALL;\n filled[0]++;\n }\n }\n if (board[x1][y1] == NULL) {\n board[x1][y1] = HALL;\n filled[0]++;\n }\n return true;\n }\n }\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 boolean isValidMove(MapTile[][] scanMapTiles, String direction) {\n\tint centerIndex = (scanMap.getEdgeSize() - 1) / 2;\n\tint x = centerIndex, y = centerIndex;\n\n\tswitch (direction) {\n\tcase \"N\":\n\t\ty = y - 1;\n\t\tbreak;\n\tcase \"S\":\n\t\ty = y + 1;\n\t\tbreak;\n\tcase \"E\":\n\t\tx = x + 1;\n\t\tbreak;\n\tcase \"W\":\n\t\tx = x - 1;\n\t\tbreak;\n\t}\n\n\tif (scanMapTiles[x][y].getTerrain() == Terrain.SAND || scanMapTiles[x][y].getTerrain() == Terrain.NONE\n\t\t\t|| scanMapTiles[x][y].getHasRover() == true)\n\t\treturn false;\n\n\treturn true;\n}", "public void move(Cell[][] maze) {\n // check monster still alive or not\n if (!alive) {\n return;\n }\n //four directions: left, right, up, down\n int[][] dirs = {{0, -1}, {0, 1}, {-1, 0}, {1, 0}};\n // a list to store all valid directions to move\n List<int[]> validDir = new ArrayList<>();\n for (int[] dir : dirs) {\n int newRow = this.current_row + dir[0];\n int newCol = this.current_column + dir[1];\n // try finding a location where is not wall, not the previous location, not a place 3 sides surrounded by walls\n // and save it to valid directions list\n if (maze[newRow][newCol].getValue() != 1 && !(newRow == pre_row && newCol == pre_column)\n && validNextMove(newRow, newCol, maze)) {\n int[] newLocation = new int[]{newRow, newCol};\n validDir.add(newLocation);\n }\n }\n //If there is no valid move choice, the monster has to backtrack\n if (validDir.size() == 0) {\n this.current_row = this.pre_row;\n this.current_column = this.pre_column;\n this.pre_row = this.current_row;\n this.pre_column = this.current_column;\n } else {\n // randomly select a valid direction to move\n Random random = new Random();\n int ranNum = random.nextInt(validDir.size());\n int[] newLoc = validDir.get(ranNum);\n int newRow = newLoc[0];\n int newCol = newLoc[1];\n this.pre_row = this.current_row;\n this.pre_column = this.current_column;\n this.current_row = newRow;\n this.current_column = newCol;\n }\n }", "private void checkMove(Tile[][] chessBoard, int pawnX, int pawnY, int direction) {\r\n\t\tUnit unit = chessBoard[pawnX][pawnY+direction].getPiece();\r\n\t\tif (unit == null) {\r\n\t\t\tMoves move = new Moves(pawnX, pawnY+direction);\r\n\t\t\tinsertMove(move, moveList);\r\n\t\t}\r\n\t}", "public boolean move() {\n\t\tint nextDirection;\n\t\tint pacmanX = parent.getPacManX();\n\t\tint pacmanY = parent.getPacManY();\n\t\t\n\t\tint[] directionPriority = new int[4];\n\t\t/** The direction is added to the priority in order to achieve it once the move is chosen */\n\t\tdirectionPriority[0]=(pacmanX-pixelLocationX)*(10)*state+GameCharacter.RIGHT;\n\t\tdirectionPriority[1]=((pacmanX-pixelLocationX)*(-10)*state+GameCharacter.LEFT);\n\t\tdirectionPriority[2]=(pacmanY-pixelLocationY)*(10)*state+GameCharacter.DOWN;\n\t\tdirectionPriority[3]=((pacmanY-pixelLocationY)*(-10)*state+GameCharacter.UP);\n\t\tArrays.sort(directionPriority);\n\t\t\n\t\tint i=3;\n\t\t\n\t\tdo {\n\t\t\tnextDirection = directionPriority[i]%10;\n\t\t\tif (nextDirection < 0) {\n\t\t\t\tnextDirection += 10;\n\t\t\t}\n\t\t\tif(isLegalMove(nextDirection) && (Math.abs(nextDirection-currentDirection) != 2) || i==0) {\n\t\t\t\tsetDirection(nextDirection);\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\ti--;\n\t\t}\n\t\twhile (i>=0);\n\t\treturn super.move();\n\t}", "public void doneMove(int x, int y)\r\n\t{\r\n\t\t//Cannot update if we have no orders\r\n\t\tif(subOrders.size() == 0)\r\n\t\t\treturn;\r\n\t\t\r\n\t\t//Get the first move order\r\n\t\tint i = 0;\r\n\t\tSubOrder currentOrder = subOrders.get(i);\r\n\t\t\r\n\t\twhile(i < subOrders.size() && !currentOrder.isMove())\r\n\t\t\tcurrentOrder = subOrders.get(i++);\r\n\t\t\r\n\t\t//Doubles as a valid/invalid move order\r\n\t\tif(currentOrder.moveX == x && currentOrder.moveY == y)\r\n\t\t{\r\n\t\t\t//If this is a patrol loop\r\n\t\t\tif(this.stance.equals(STANCE_PATROL))\r\n\t\t\t{\r\n\t\t\t\tsubOrders.add(currentOrder); //Append to end\r\n\t\t\t\tsubOrders.remove(i);\t\t//Remove old order\r\n\t\t\t\tlog(\"Reached patrol point at [\"+x+\", \"+y+\"]\");\r\n\t\t\t\tbChanged = true;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tlog(\"Reached move point at [\"+x+\", \"+y+\"]\");\r\n\t\t\t\tsubOrders.remove(i);\t\t//Remove old order\r\n\t\t\t\tbChanged = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}" ]
[ "0.63341177", "0.632843", "0.6328174", "0.6283492", "0.62733054", "0.6268708", "0.6265706", "0.62650836", "0.61345", "0.61161554", "0.60775656", "0.60215616", "0.60141027", "0.60123366", "0.59679705", "0.59578323", "0.5954753", "0.5950584", "0.594763", "0.5937482", "0.592654", "0.59123933", "0.5903503", "0.58909625", "0.5888982", "0.58782566", "0.5856617", "0.583175", "0.5821165", "0.58190954", "0.58175474", "0.58044827", "0.5800322", "0.5786951", "0.5774469", "0.5773766", "0.5767734", "0.576283", "0.5758427", "0.575653", "0.5742382", "0.5725906", "0.5717407", "0.56982267", "0.5695456", "0.56939244", "0.5673666", "0.5670009", "0.56661004", "0.56504893", "0.5650453", "0.56452036", "0.563957", "0.56332576", "0.561546", "0.5601057", "0.55983", "0.5590512", "0.55880183", "0.5586022", "0.55839396", "0.55807894", "0.55781037", "0.55723614", "0.55673033", "0.5566235", "0.55533177", "0.5551512", "0.5549272", "0.55350995", "0.5533535", "0.55304724", "0.55293846", "0.5523591", "0.5522159", "0.5519883", "0.5504375", "0.5502649", "0.54986024", "0.5492409", "0.5492388", "0.54888254", "0.54799306", "0.54794985", "0.54784375", "0.5477791", "0.5474508", "0.5472595", "0.5449767", "0.5443047", "0.54426545", "0.54405344", "0.54385024", "0.54311436", "0.54294556", "0.54242206", "0.5422877", "0.54221684", "0.54216534", "0.54206216" ]
0.7742792
0
Constructor for a folder controller without filter and custom link model for editor
public FolderRunController(VFSContainer rootContainer, boolean displayWebDAVLink, UserRequest ureq, WindowControl wControl) { this(rootContainer, displayWebDAVLink, false, ureq, wControl, null, null, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public FolderRunController(VFSContainer rootContainer, boolean displayWebDAVLink, boolean displaySearch, UserRequest ureq, WindowControl wControl,\n VFSItemFilter filter, CustomLinkTreeModel customLinkTreeModel, Long courseNodeId) {\n\n super(ureq, wControl);\n\n folderContainer = this.createVelocityContainer(\"run\");\n editQuotaButton = LinkFactory.createButtonSmall(\"editQuota\", folderContainer, this);\n\n BusinessControl bc = getWindowControl().getBusinessControl();\n // --- subscription ---\n VFSSecurityCallback secCallback = VFSManager.findInheritedSecurityCallback(rootContainer);\n if (secCallback != null && secCallback instanceof Subscribed) {\n subsContext = ((Subscribed) secCallback).getSubscriptionContext();\n // if null, then no subscription is desired\n if (subsContext != null && (rootContainer instanceof OlatRelPathImpl)) {\n String data = ((OlatRelPathImpl) rootContainer).getRelPath();\n PublisherData pdata = new PublisherData(OresHelper.calculateTypeName(FolderModule.class), data);\n csController = new ContextualSubscriptionController(ureq, getWindowControl(), subsContext, pdata);\n\n folderContainer.put(\"subscription\", csController.getInitialComponent());\n }\n }\n\n if (!ureq.getUserSession().getRoles().isGuestOnly() && displaySearch) {\n SearchServiceUIFactory searchUIFactory = CoreSpringFactory.getBean(SearchServiceUIFactory.class);\n searchC = searchUIFactory.createInputController(ureq, wControl, DisplayOption.STANDARD, null);\n listenTo(searchC); // register for auto-dispose\n folderContainer.put(\"searchcomp\", searchC.getInitialComponent());\n }\n\n folderComponent = new FolderComponent(ureq, \"foldercomp\", rootContainer, filter, customLinkTreeModel, courseNodeId);\n folderComponent.addListener(this);\n folderContainer.put(\"foldercomp\", folderComponent);\n if (WebDAVManager.getInstance().isEnabled() && displayWebDAVLink)\n folderContainer.contextPut(\"webdavlink\", FolderManager.getWebDAVLink());\n\n selTree = new SelectionTree(\"seltree\", getTranslator());\n selTree.addListener(this);\n folderContainer.put(\"seltree\", selTree);\n\n // jump to either the forum or the folder if the business-launch-path says so.\n ContextEntry ce = bc.popLauncherContextEntry();\n if (ce != null) { // a context path is left for me\n if (log.isDebugEnabled())\n log.debug(\"businesscontrol (for further jumps) would be:\" + bc);\n OLATResourceable ores = ce.getOLATResourceable();\n if (log.isDebugEnabled())\n log.debug(\"OLATResourceable=\" + ores);\n String typeName = ores.getResourceableTypeName();\n // typeName format: 'path=/test1/test2/readme.txt'\n // First remove prefix 'path='\n String path = typeName.substring(\"path=\".length());\n if (path.endsWith(\":0\")) {\n path = path.substring(0, path.length() - 2);\n }\n activate(ureq, path);\n }\n\n enableDisableQuota(ureq);\n putInitialPanel(folderContainer);\n }", "protected Folder(){\n\t super(\"Folder\");\n\t }", "public Model(Controller controller)\r\n {\r\n // initialise instance variables\r\n setFiles(new ArrayList<>());\r\n setController(controller);\r\n }", "public DirectoryModel() {\r\n\tthis(null);\r\n }", "public FolderRunController(VFSContainer rootContainer, boolean displayWebDAVLink, boolean displaySearch, UserRequest ureq, WindowControl wControl) {\n this(rootContainer, displayWebDAVLink, displaySearch, ureq, wControl, null, null, null);\n }", "public ControlUrlControler() {\r\n\r\n }", "public FileManagerController() {\n fileSystemView = FileSystemView.getFileSystemView();\n desktop = Desktop.getDesktop();\n previewFactory = new PreviewFactory();\n initView();\n }", "public folderize() {\n }", "public AdminController(Admin a)\n {\n \tthis.adminModel=a;\t\n }", "protected DefaultLink() {\n }", "public GeneralListVueController() {\n\n\t}", "public CreateDocumentController() {\n }", "@Override\n public GitLabFolderAuthorization newInstance(StaplerRequest req, JSONObject formData) throws FormException {\n return new GitLabFolderAuthorization(aclFromPermissionTable(formData.getJSONObject(\"permissionTable\")));\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n try {\n model = Model.getInstance();\n setUpTableView();\n setUpIndicator();\n }\n catch (Exception ex) {\n Logger.getLogger(AssignFolderWindowController.class.getName()).log(Level.SEVERE, null, ex);\n EventLogger.log(EventLogger.Level.ERROR, \"An error occured: \" + ex.getMessage());\n }\n }", "public FolderNode() {\n\t\t\tthis(null, 5);\n\t\t}", "public ListaSEController() {\n }", "public Directory(String nm){\r\n\t\tsuper();\r\n\t}", "public ControllerImpl(Readable in, EnhancedImageModel model) {\n super(model);\n this.in = in;\n }", "public Tag(Folder linkedFolder) {\n this.folder = linkedFolder;\n }", "public FileController(Context context){\n this.context=context;\n }", "public FilmOverviewController() {\n }", "public Controller()\n\t{\n\n\t}", "public ControllerEnfermaria() {\n }", "protected FedoraContentModelHandler() {\r\n }", "public CTabFolder( final Composite parent, final int style ) {\n super( parent, checkStyle( style ) );\n super.setLayout( new CTabFolderLayout() );\n onBottom = ( super.getStyle() & SWT.BOTTOM ) != 0;\n single = ( super.getStyle() & SWT.SINGLE ) != 0;\n showClose = ( super.getStyle() & SWT.CLOSE ) != 0;\n borderRight = ( style & SWT.BORDER ) != 0 ? 1 : 0;\n borderLeft = borderRight;\n borderTop = onBottom ? borderLeft : 0;\n borderBottom = onBottom ? 0 : borderLeft;\n highlight_header = ( style & SWT.FLAT ) != 0 ? 1 : 3;\n highlight_margin = ( style & SWT.FLAT ) != 0 ? 0 : 2;\n updateTabHeight( false );\n resizeListener = new ControlAdapter() {\n public void controlResized( final ControlEvent event ) {\n onResize();\n }\n };\n addControlListener( resizeListener );\n registerDisposeListener();\n tabFolderAdapter = new CTabFolderAdapter();\n selectionGraphicsAdapter = new WidgetGraphicsAdapter();\n }", "private static JMenuItem getDirInEditor(){\n return new JMenuItem(NcStrGUILabel.DIR_IN_INDEX.getStr());\n }", "public FolderDiffForm() {\n initComponents();\n }", "public DirectoryListingScreen(){\r\n DIRECTORYLISTING_INSTANCE = this;\r\n }", "protected AbstractFolderIdWrapper() {\n\t}", "public MenuController() {\r\n\t \r\n\t }", "public EstructuraOrganicaController(){\r\n\t\tloadDefault();\r\n\t}", "public LinksBean() {\n }", "private Link() {\n }", "public Links() {\n }", "public Folder(String name){\n\t\tsuper();\n this.name = name;\n\t}", "private BlogManager(Controller c) {\r\n super();\r\n this.controller = c;\r\n this.init();\r\n }", "private StoreController(){}", "public Controller() {\n\t\tplaylist = new ArrayList<>();\n\t\tshowingMore = false;\n\t\tstage = Main.getStage();\n\t}", "public Controller() {\n super();\n }", "public Controller() {\n super();\n }", "public FilePanel() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "private BrowseIndex() {\n }", "private GitLabFolderAuthorization(GitLabFolderACL acl) {\n this.folderACL = acl;\n }", "public PSContentType(int typeId, String name, String label, \n String description, String editorUrl, boolean hideFromMenu, \n int objectType)\n {\n super(createKey(typeId));\n \n if (null == name || name.trim().length() == 0)\n throw new IllegalArgumentException(\"non-empty name must be supplied\");\n if (StringUtils.isBlank(label))\n {\n label = name;\n }\n if (null == editorUrl || editorUrl.trim().length() == 0)\n {\n throw new IllegalArgumentException(\n \"non-empty editorUrl must be supplied\");\n }\n else\n {\n //verify url format matches what we say below\n if (!verifyUrlFormat(editorUrl))\n {\n throw new IllegalArgumentException(\n \"incorrect editorUrl format, expected ../appname/resource, got \"\n + editorUrl);\n }\n }\n\n m_name = name;\n m_label = label;\n m_description = null == description ? \"\" : description;\n m_queryRequest = editorUrl.replace('\\\\', '/');\n m_hideFromMenu = hideFromMenu;\n m_objectType = objectType;\n }", "@Contract(pure = true)\n public FileActions(final MimaUserInterface mimaUI, final MimaEditorManager editorManager) {\n this.mimaUI = mimaUI;\n this.editorManager = editorManager;\n }", "public ActionFile() {\n }", "public Link() {\n }", "public CustomDirectoryFactory(){\n\t\tsuper();\n\t}", "public AnyUriPanel() {\r\n String[] entries = Util.addNoSelectionEntry(Configuration.getInstance().getAddressTypes());\r\n addressTypeModel = new DefaultComboBoxModel(entries);\r\n\r\n model = new AnyUriModel();\r\n initComponents();\r\n }", "public EpisodeController(){\n\t\t//intentionally empty, I think\n\t}", "public SearchedRecipeController() {\n }", "public Gallery() {\r\n }", "public Finder() {\n \n }", "public Controller()\r\n\t{\r\n\t\tview = new View();\r\n\t}", "public Controller() {\n\t\tthis(null);\n\t}", "public LicenciaController() {\n }", "public ProductCategoryController() {\n }", "private Directories() {\n\n\t}", "public CompositeController(IMusicModel model, CompositeView view) {\n this.model = model;\n this.view = view;\n }", "public PathTabView(){\n\t\t\n\t\t//PATH Index directory\n\t\tlblIndexerPath=new JLabel(\"Indexes destination : \");\n\t\ttxtIndexerPath=new JTextField();\n\t\ttxtIndexerPath.setPreferredSize(new Dimension(200,25));\n\t\ttxtIndexerPath.setText(Configuration.getInstance().getIndexPath());\n\t\tpanelIndexer=new JPanel();\n\t\tpanelIndexer.setBorder(BorderFactory.createTitledBorder(\"Indexation\"));\n\t\tbtnBrowserIndexer=new JButton(\"...\");\n\t\tbtnBrowserIndexer.addActionListener(new BrowserClickController(this,1));\n\t\tpanelIndexer.add(lblIndexerPath);\n\t\tpanelIndexer.add(txtIndexerPath);\n\t\tpanelIndexer.add(btnBrowserIndexer);\n\t\t\n\t\t//PATH Data directory\n\t\tlblDataPath=new JLabel(\"Datas directory : \");\n\t\ttxtDataPath=new JTextField();\n\t\ttxtDataPath.setPreferredSize(new Dimension(200,25));\n\t\ttxtDataPath.setText(Configuration.getInstance().getDataPath());\n\t\tpanelData=new JPanel();\n\t\tpanelData.setBorder(BorderFactory.createTitledBorder(\"Data\"));\n\t\tbtnBrowserData=new JButton(\"...\");\n\t\tbtnBrowserData.addActionListener(new BrowserClickController(this,2));\n\t\tpanelData.add(lblDataPath);\n\t\tpanelData.add(txtDataPath);\n\t\tpanelData.add(btnBrowserData);\n\t\t\n\t\t//Init button cancel & save\n\t\tbtnSubmit=new JButton(\"Save\");\n\t\tbtnSubmit.addActionListener(new SubmitPathClickController(this));\n\t\tbtnCancel=new JButton(\"Cancel\");\n\t\tbtnCancel.addActionListener(new CancelPathClickController(this));\n\t\t\n\t\tsplitPath=new JSplitPane(JSplitPane.VERTICAL_SPLIT,panelData,panelIndexer);\n\t\tpanelButton=new JPanel();\n\t\tpanelButton.add(btnSubmit);\n\t\tpanelButton.add(btnCancel);\n\t\t\n\t\tsplitMain=new JSplitPane(JSplitPane.VERTICAL_SPLIT,splitPath,panelButton);\n\t\t\n\t\tthis.add(splitMain);\n\t\trazTextPath();\n\t\tthis.setVisible(true);\n\t}", "public PlantillaController() {\n }", "public Controller() {\n\n lastSearches = new SearchHistory();\n\n }", "private NonGuiController(MusicEditorModel model0, ViewModel vm, NonGuiViewAdapter view) {\n model = requireNonNull(model0);\n this.vm = vm;\n this.view = view;\n }", "public IndependentPath() {\n initComponents();\n }", "public ExplorerManager() {\n init();\n }", "public Matricula_Controller(EntityManager entityManger) {\r\n super(entityManger);\r\n }", "public LinksResource() {\n }", "public LinkPanel(String id, String Label, IModel<I> model)\n {\n super(id, model);\n label = Label;\n }", "private LinkLayer() {\r\n }", "public Controller(MainFrame mainframe, TaskManager tm, LoadNetworkFileTaskFactory ldn, LoadTableFileTaskFactory ldt, LoadVizmapFileTaskFactory lds)\n\t{\n\t\tthis.mainframe = mainframe;\n\t\tthis.tm = tm;\n\t\tthis.ldn=ldn;\n\t\tthis.ldt=ldt;\n\t\tthis.lds = lds;\n\t}", "private Model(){}", "public CollectFolderExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public HrCmsMedia() {\n this(\"hr_cms_media\", null);\n }", "public interface FileView {\n\n /**\n * 设置标题\n * @param preText 前标题\n * @param nowText 现标题\n */\n void setTitle(String preText, String nowText);\n\n /**\n * 给列表设置适配器\n * @param adapter 适配器\n */\n void setAdapter(DocumentFileAdapter adapter);\n\n /**\n * 获取适配器\n * @return 适配器\n */\n DocumentFileAdapter getAdapter();\n\n /**\n * 设置刷新条\n * @param b 设置控制\n */\n void setRefreshing(boolean b);\n\n /**\n * 显示密码框\n */\n void showPasswordView();\n\n /**\n * u盘插入的操作\n * @param intent\n */\n void onUDiskInsert(Intent intent);\n\n /**\n * u盘移除的操作\n * @param intent\n */\n void onUDiskRemove(Intent intent);\n}", "public ProductOverviewController() {\n }", "public FileListFragment() {\n }", "static Controller makeController(MusicEditorModel model, ViewModel vm, NonGuiViewAdapter view) {\n return new NonGuiController(model, vm, view);\n }", "public Window_File_Editor(FileSystemDirectory rootName, MainWindow parent, List<FileSystemFile> file) {\n initComponents();\n root = rootName; \n this.parent = parent;\n files = file;\n setFileNames(files);\n }", "public TabFolder(Composite parent, int style) {\n super(parent, checkStyle(style));\n }", "public LinkBuilder() {\n }", "@Override\n public AbstractLink constructLink(String id) {\n return new ExternalLink(id, Model.of(WicketUtil.getContextPath() + \"/settings/system\"));\n }", "private PSContentTypeActionMenuHelper(){}", "public DocumentoVinculadoAction() {\n }", "public MainController(){\n allShelves = new List[2];\n allShelves[0] = new List<File>(); //Beachtet die unterschiedliche Instanziierung! Was bedeutet das?\n allShelves[1] = new List<>();\n createFiles();\n }", "public static <T> FolderPanel<T> create(String folder, Class<T> selectionType, Consumer<Lookup> customizeAction) {\n return create(folder, selectionType, \"\", customizeAction);\n }", "public ExternalFileMgrImpl()\r\n \t{\r\n \t\t\r\n \t}", "public FolderChooserPreference(Context context, AttributeSet attrs) {\n\t\tsuper(context, attrs);\n\t}", "public FolderItemProvider(AdapterFactory adapterFactory) {\r\n\t\tsuper(adapterFactory);\r\n\t}", "public GitDir(WebFile aGitDir) { _gdir = aGitDir; }", "public JdbNavTree(TreeModel treeModel) {\r\n super(treeModel);\r\n commonInit();\r\n }", "public ViewHome() {\n controller = new ControllerViewHome(this);\n initComponents();\n ImageIcon imagemDeFundo = new ImageIcon(getClass().getResource(\"/link.jpg\"));\n JLabel labelImg = new JLabel(\"\", imagemDeFundo, JLabel.CENTER);\n jPanel_container.add(labelImg, BorderLayout.CENTER);\n \n panelConfigLocalDiretorios = new PanelConfigLocalDiretorios();\n panelConfigServidoresFTPs = new PanelConfigServidoresFTPs();\n \n ScheduleEngine.prepararEIniciarScheduler();\n controller.rodarServicoEmBackGround();\n }", "public SearchableTreePanel() {\n super();\n initialize();\n }", "private void addFolder(){\n }", "public Admin() {\n\n\t}", "public Category() {\n\t\tsuper();\n\t\t/* Pour obtenir le chemin de fichier vers la catégorie */\n\t\tpath = \"src/\"+this.getClass().getPackage().getName().replace('.', '/');\n\t\twindowspath = \"src\\\\\"+this.getClass().getPackage().getName().replace('.', '\\\\');\n\t\t\n\t\timages = this.getPhotos();\n\t}", "public FileManager() {\n\t\t\n\t}", "public detalleInventarioController() {\n }", "public TipoInformazioniController() {\n\n\t}", "public Controller(Model model) {\n this.model = model; // Initializing the Model\n }", "public CrawlController(String storageFolder) throws Exception\n\t{\n\t\tthis(storageFolder, Configurations.getBooleanProperty(\"crawler.enable_resume\", true));\n\t}" ]
[ "0.65062547", "0.6417196", "0.62646836", "0.609172", "0.5828411", "0.57684606", "0.568672", "0.5685265", "0.5685154", "0.55619836", "0.5559189", "0.5558462", "0.5555603", "0.5528017", "0.5505438", "0.54977405", "0.5494695", "0.54744285", "0.54685116", "0.5457049", "0.54427993", "0.5399746", "0.5394422", "0.5374492", "0.5356814", "0.53480095", "0.53433824", "0.53383523", "0.53334725", "0.53322697", "0.5331905", "0.53174436", "0.52989554", "0.52986693", "0.52927965", "0.52846134", "0.5277527", "0.52707", "0.52560836", "0.52560836", "0.52461636", "0.523343", "0.5228164", "0.52210534", "0.52201456", "0.5211661", "0.51999897", "0.519795", "0.51942825", "0.51880157", "0.5173379", "0.5168947", "0.515849", "0.5151932", "0.5150258", "0.5143768", "0.5131347", "0.51258063", "0.51255065", "0.5124374", "0.5122127", "0.5116205", "0.5113581", "0.51102394", "0.5109744", "0.50956684", "0.5093614", "0.50870055", "0.5076409", "0.5069892", "0.5061777", "0.5061028", "0.5060806", "0.5059428", "0.5059122", "0.50547236", "0.50467074", "0.50455636", "0.50453544", "0.5037764", "0.5028969", "0.5014698", "0.50145805", "0.5012205", "0.5008937", "0.50078964", "0.5001336", "0.50005627", "0.49960756", "0.49924937", "0.497522", "0.49736333", "0.49707818", "0.49613002", "0.4957831", "0.4953575", "0.495214", "0.4949227", "0.49486443", "0.4945415" ]
0.5829698
4
Constructor for a folder controller without filter and custom link model for editor.
public FolderRunController(VFSContainer rootContainer, boolean displayWebDAVLink, boolean displaySearch, UserRequest ureq, WindowControl wControl) { this(rootContainer, displayWebDAVLink, displaySearch, ureq, wControl, null, null, null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected Folder(){\n\t super(\"Folder\");\n\t }", "public FolderRunController(VFSContainer rootContainer, boolean displayWebDAVLink, boolean displaySearch, UserRequest ureq, WindowControl wControl,\n VFSItemFilter filter, CustomLinkTreeModel customLinkTreeModel, Long courseNodeId) {\n\n super(ureq, wControl);\n\n folderContainer = this.createVelocityContainer(\"run\");\n editQuotaButton = LinkFactory.createButtonSmall(\"editQuota\", folderContainer, this);\n\n BusinessControl bc = getWindowControl().getBusinessControl();\n // --- subscription ---\n VFSSecurityCallback secCallback = VFSManager.findInheritedSecurityCallback(rootContainer);\n if (secCallback != null && secCallback instanceof Subscribed) {\n subsContext = ((Subscribed) secCallback).getSubscriptionContext();\n // if null, then no subscription is desired\n if (subsContext != null && (rootContainer instanceof OlatRelPathImpl)) {\n String data = ((OlatRelPathImpl) rootContainer).getRelPath();\n PublisherData pdata = new PublisherData(OresHelper.calculateTypeName(FolderModule.class), data);\n csController = new ContextualSubscriptionController(ureq, getWindowControl(), subsContext, pdata);\n\n folderContainer.put(\"subscription\", csController.getInitialComponent());\n }\n }\n\n if (!ureq.getUserSession().getRoles().isGuestOnly() && displaySearch) {\n SearchServiceUIFactory searchUIFactory = CoreSpringFactory.getBean(SearchServiceUIFactory.class);\n searchC = searchUIFactory.createInputController(ureq, wControl, DisplayOption.STANDARD, null);\n listenTo(searchC); // register for auto-dispose\n folderContainer.put(\"searchcomp\", searchC.getInitialComponent());\n }\n\n folderComponent = new FolderComponent(ureq, \"foldercomp\", rootContainer, filter, customLinkTreeModel, courseNodeId);\n folderComponent.addListener(this);\n folderContainer.put(\"foldercomp\", folderComponent);\n if (WebDAVManager.getInstance().isEnabled() && displayWebDAVLink)\n folderContainer.contextPut(\"webdavlink\", FolderManager.getWebDAVLink());\n\n selTree = new SelectionTree(\"seltree\", getTranslator());\n selTree.addListener(this);\n folderContainer.put(\"seltree\", selTree);\n\n // jump to either the forum or the folder if the business-launch-path says so.\n ContextEntry ce = bc.popLauncherContextEntry();\n if (ce != null) { // a context path is left for me\n if (log.isDebugEnabled())\n log.debug(\"businesscontrol (for further jumps) would be:\" + bc);\n OLATResourceable ores = ce.getOLATResourceable();\n if (log.isDebugEnabled())\n log.debug(\"OLATResourceable=\" + ores);\n String typeName = ores.getResourceableTypeName();\n // typeName format: 'path=/test1/test2/readme.txt'\n // First remove prefix 'path='\n String path = typeName.substring(\"path=\".length());\n if (path.endsWith(\":0\")) {\n path = path.substring(0, path.length() - 2);\n }\n activate(ureq, path);\n }\n\n enableDisableQuota(ureq);\n putInitialPanel(folderContainer);\n }", "public Model(Controller controller)\r\n {\r\n // initialise instance variables\r\n setFiles(new ArrayList<>());\r\n setController(controller);\r\n }", "public DirectoryModel() {\r\n\tthis(null);\r\n }", "public FolderRunController(VFSContainer rootContainer, boolean displayWebDAVLink, UserRequest ureq, WindowControl wControl) {\n this(rootContainer, displayWebDAVLink, false, ureq, wControl, null, null, null);\n }", "public FolderNode() {\n\t\t\tthis(null, 5);\n\t\t}", "public FileManagerController() {\n fileSystemView = FileSystemView.getFileSystemView();\n desktop = Desktop.getDesktop();\n previewFactory = new PreviewFactory();\n initView();\n }", "@Override\n public GitLabFolderAuthorization newInstance(StaplerRequest req, JSONObject formData) throws FormException {\n return new GitLabFolderAuthorization(aclFromPermissionTable(formData.getJSONObject(\"permissionTable\")));\n }", "public ControlUrlControler() {\r\n\r\n }", "public CTabFolder( final Composite parent, final int style ) {\n super( parent, checkStyle( style ) );\n super.setLayout( new CTabFolderLayout() );\n onBottom = ( super.getStyle() & SWT.BOTTOM ) != 0;\n single = ( super.getStyle() & SWT.SINGLE ) != 0;\n showClose = ( super.getStyle() & SWT.CLOSE ) != 0;\n borderRight = ( style & SWT.BORDER ) != 0 ? 1 : 0;\n borderLeft = borderRight;\n borderTop = onBottom ? borderLeft : 0;\n borderBottom = onBottom ? 0 : borderLeft;\n highlight_header = ( style & SWT.FLAT ) != 0 ? 1 : 3;\n highlight_margin = ( style & SWT.FLAT ) != 0 ? 0 : 2;\n updateTabHeight( false );\n resizeListener = new ControlAdapter() {\n public void controlResized( final ControlEvent event ) {\n onResize();\n }\n };\n addControlListener( resizeListener );\n registerDisposeListener();\n tabFolderAdapter = new CTabFolderAdapter();\n selectionGraphicsAdapter = new WidgetGraphicsAdapter();\n }", "public Directory(String nm){\r\n\t\tsuper();\r\n\t}", "public Controller() {\n\t\tthis(null);\n\t}", "protected AbstractFolderIdWrapper() {\n\t}", "public GeneralListVueController() {\n\n\t}", "public Controller()\n\t{\n\n\t}", "public Tag(Folder linkedFolder) {\n this.folder = linkedFolder;\n }", "public FilmOverviewController() {\n }", "public folderize() {\n }", "public Controller() {\n super();\n }", "public Controller() {\n super();\n }", "public ListaSEController() {\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n try {\n model = Model.getInstance();\n setUpTableView();\n setUpIndicator();\n }\n catch (Exception ex) {\n Logger.getLogger(AssignFolderWindowController.class.getName()).log(Level.SEVERE, null, ex);\n EventLogger.log(EventLogger.Level.ERROR, \"An error occured: \" + ex.getMessage());\n }\n }", "protected DefaultLink() {\n }", "public FolderDiffForm() {\n initComponents();\n }", "public ControllerImpl(Readable in, EnhancedImageModel model) {\n super(model);\n this.in = in;\n }", "@Contract(pure = true)\n public FileActions(final MimaUserInterface mimaUI, final MimaEditorManager editorManager) {\n this.mimaUI = mimaUI;\n this.editorManager = editorManager;\n }", "public DirectoryListingScreen(){\r\n DIRECTORYLISTING_INSTANCE = this;\r\n }", "public ControllerEnfermaria() {\n }", "public AdminController(Admin a)\n {\n \tthis.adminModel=a;\t\n }", "public CreateDocumentController() {\n }", "private NonGuiController(MusicEditorModel model0, ViewModel vm, NonGuiViewAdapter view) {\n model = requireNonNull(model0);\n this.vm = vm;\n this.view = view;\n }", "private GitLabFolderAuthorization(GitLabFolderACL acl) {\n this.folderACL = acl;\n }", "static Controller makeController(MusicEditorModel model, ViewModel vm, NonGuiViewAdapter view) {\n return new NonGuiController(model, vm, view);\n }", "public Folder(String name){\n\t\tsuper();\n this.name = name;\n\t}", "public Controller() {\n\t\tplaylist = new ArrayList<>();\n\t\tshowingMore = false;\n\t\tstage = Main.getStage();\n\t}", "public FileController(Context context){\n this.context=context;\n }", "protected FedoraContentModelHandler() {\r\n }", "public MenuController() {\r\n\t \r\n\t }", "private StoreController(){}", "public Controller()\r\n\t{\r\n\t\tview = new View();\r\n\t}", "public ExplorerManager() {\n init();\n }", "public CompositeController(IMusicModel model, CompositeView view) {\n this.model = model;\n this.view = view;\n }", "public EpisodeController(){\n\t\t//intentionally empty, I think\n\t}", "public PSContentType(int typeId, String name, String label, \n String description, String editorUrl, boolean hideFromMenu, \n int objectType)\n {\n super(createKey(typeId));\n \n if (null == name || name.trim().length() == 0)\n throw new IllegalArgumentException(\"non-empty name must be supplied\");\n if (StringUtils.isBlank(label))\n {\n label = name;\n }\n if (null == editorUrl || editorUrl.trim().length() == 0)\n {\n throw new IllegalArgumentException(\n \"non-empty editorUrl must be supplied\");\n }\n else\n {\n //verify url format matches what we say below\n if (!verifyUrlFormat(editorUrl))\n {\n throw new IllegalArgumentException(\n \"incorrect editorUrl format, expected ../appname/resource, got \"\n + editorUrl);\n }\n }\n\n m_name = name;\n m_label = label;\n m_description = null == description ? \"\" : description;\n m_queryRequest = editorUrl.replace('\\\\', '/');\n m_hideFromMenu = hideFromMenu;\n m_objectType = objectType;\n }", "@SuppressWarnings(\"unused\")\n\tprivate InboxControllerFactory() {\n\t\tsuper();\n\t}", "public TabFolder(Composite parent, int style) {\n super(parent, checkStyle(style));\n }", "public FilePanel() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public AnyUriPanel() {\r\n String[] entries = Util.addNoSelectionEntry(Configuration.getInstance().getAddressTypes());\r\n addressTypeModel = new DefaultComboBoxModel(entries);\r\n\r\n model = new AnyUriModel();\r\n initComponents();\r\n }", "public CustomDirectoryFactory(){\n\t\tsuper();\n\t}", "public static <T> FolderPanel<T> create(String folder, Class<T> selectionType, Consumer<Lookup> customizeAction) {\n return create(folder, selectionType, \"\", customizeAction);\n }", "public FolderItemProvider(AdapterFactory adapterFactory) {\r\n\t\tsuper(adapterFactory);\r\n\t}", "public HrCmsMedia() {\n this(\"hr_cms_media\", null);\n }", "public LinksBean() {\n }", "private BlogManager(Controller c) {\r\n super();\r\n this.controller = c;\r\n this.init();\r\n }", "public Controller() {\n this.model = new ModelFacade();\n this.view = new ViewFacade();\n }", "public Links() {\n }", "private Link() {\n }", "public CrawlController(String storageFolder) throws Exception\n\t{\n\t\tthis(storageFolder, Configurations.getBooleanProperty(\"crawler.enable_resume\", true));\n\t}", "public CollectFolderExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public Finder() {\n \n }", "private static JMenuItem getDirInEditor(){\n return new JMenuItem(NcStrGUILabel.DIR_IN_INDEX.getStr());\n }", "public EstructuraOrganicaController(){\r\n\t\tloadDefault();\r\n\t}", "public ExternalFileMgrImpl()\r\n \t{\r\n \t\t\r\n \t}", "private LinkLayer() {\r\n }", "private BrowseIndex() {\n }", "public FolderChooserPreference(Context context, AttributeSet attrs) {\n\t\tsuper(context, attrs);\n\t}", "public FileManager() {\n\t\t\n\t}", "public SearchedRecipeController() {\n }", "public ProductCategoryController() {\n }", "public ActionFile() {\n }", "public GitLabFolderAuthorization(int groupId) {\n // no permissions set\n this(new GitLabFolderACL(groupId));\n }", "public PlantillaController() {\n }", "public FileListFragment() {\n }", "public Link() {\n }", "public void newFolder ()\n {\n newNode(null);\n }", "public Gallery() {\r\n }", "private Model(){}", "public IndependentPath() {\n initComponents();\n }", "public Controller(MainFrame mainframe, TaskManager tm, LoadNetworkFileTaskFactory ldn, LoadTableFileTaskFactory ldt, LoadVizmapFileTaskFactory lds)\n\t{\n\t\tthis.mainframe = mainframe;\n\t\tthis.tm = tm;\n\t\tthis.ldn=ldn;\n\t\tthis.ldt=ldt;\n\t\tthis.lds = lds;\n\t}", "public Builder setFolderId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n folderId_ = value;\n onChanged();\n return this;\n }", "public LinkBuilder() {\n }", "public AbstractDocumentFolderServiceImpl(AlfrescoSession repositorySession)\r\n {\r\n super(repositorySession);\r\n this.cmisSession = ((AbstractAlfrescoSessionImpl) repositorySession).getCmisSession();\r\n }", "public DownloadInterface() {\n \n initComponents();\n \n }", "private Directories() {\n\n\t}", "public Builder(BoxFolder folder, BoxSession session) {\n mArgs.putString(ARG_ID, folder.getId());\n mArgs.putString(ARG_NAME, folder.getName());\n mArgs.putString(ARG_USER_ID, session.getUserId());\n setBoxItemFilter(new MediaItemFilter());\n }", "public Controller() {\n model = new Model();\n comboBox = new ChannelComboBox();\n initView();\n new ChannelWorker().execute();\n timer = new Timer();\n }", "public DirectoryModel(File path) {\r\n\tsetCurrentDirectory(path);\r\n\tif (isWindowsFileSystem()) {\r\n\t overrideTypes = new FileType[2];\r\n\t overrideTypes[0] = FileType.SharedFloppyDrive;\r\n\t overrideTypes[1] = FileType.SharedHardDrive;\r\n\t}\r\n }", "public CommonCommand(Controller controller) {\r\n\t\tsuper();\r\n\t\tthis.controller = controller;\r\n\t}", "public View(Controller controller) {\n this.controller = controller;\n jCheckBoxArrayList = new ArrayList<>();\n }", "public SearchableTreePanel() {\n super();\n initialize();\n }", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "public Matricula_Controller(EntityManager entityManger) {\r\n super(entityManger);\r\n }", "public ProductOverviewController() {\n }", "public UndoController() {\r\n \t}", "public Controller() {\n\n lastSearches = new SearchHistory();\n\n }", "public detalleInventarioController() {\n }", "public Controller(Model model) {\n this.model = model; // Initializing the Model\n }", "public LicenciaController() {\n }", "public DashboardController() {\n }", "public AnnotationPropertyFolderProvider() {\r\n }" ]
[ "0.65679634", "0.64876616", "0.62902087", "0.6253773", "0.59337974", "0.5816012", "0.5751649", "0.5657592", "0.56135744", "0.55845654", "0.5518267", "0.5511441", "0.55072004", "0.5468747", "0.5456878", "0.5427991", "0.5423787", "0.5386335", "0.5385718", "0.5385718", "0.53756475", "0.5371215", "0.536878", "0.53683436", "0.53607225", "0.53564495", "0.5352859", "0.5350804", "0.53502923", "0.5339615", "0.5320794", "0.53100985", "0.52910835", "0.528751", "0.52747154", "0.5259479", "0.52445585", "0.5243577", "0.5240376", "0.52267134", "0.52156425", "0.51977456", "0.5197267", "0.5192259", "0.5189785", "0.5187333", "0.517998", "0.51758504", "0.5168331", "0.5161506", "0.51568526", "0.5147251", "0.51372963", "0.5130689", "0.51147944", "0.5111997", "0.5108477", "0.51025546", "0.50981486", "0.5089543", "0.50870705", "0.50829303", "0.5082006", "0.5073279", "0.5072876", "0.5071924", "0.50640815", "0.5061788", "0.5050791", "0.50488544", "0.50480056", "0.5045386", "0.5043405", "0.5042227", "0.5041258", "0.50328565", "0.49917638", "0.4989163", "0.49851024", "0.49840966", "0.49794883", "0.49771142", "0.49753088", "0.49745536", "0.49727315", "0.4961227", "0.49609464", "0.495959", "0.49529624", "0.49528703", "0.4951878", "0.49507996", "0.49471036", "0.49452808", "0.49363726", "0.4935122", "0.4934962", "0.49334306", "0.4926218", "0.49231368" ]
0.5931336
5
Constructor for a folder controller with an optional file filter and an optional custom link model for editor. Use this one if you don't wan't to display all files in the file browser or if you want to use a custom link tree model in the editor.
public FolderRunController(VFSContainer rootContainer, boolean displayWebDAVLink, boolean displaySearch, UserRequest ureq, WindowControl wControl, VFSItemFilter filter, CustomLinkTreeModel customLinkTreeModel, Long courseNodeId) { super(ureq, wControl); folderContainer = this.createVelocityContainer("run"); editQuotaButton = LinkFactory.createButtonSmall("editQuota", folderContainer, this); BusinessControl bc = getWindowControl().getBusinessControl(); // --- subscription --- VFSSecurityCallback secCallback = VFSManager.findInheritedSecurityCallback(rootContainer); if (secCallback != null && secCallback instanceof Subscribed) { subsContext = ((Subscribed) secCallback).getSubscriptionContext(); // if null, then no subscription is desired if (subsContext != null && (rootContainer instanceof OlatRelPathImpl)) { String data = ((OlatRelPathImpl) rootContainer).getRelPath(); PublisherData pdata = new PublisherData(OresHelper.calculateTypeName(FolderModule.class), data); csController = new ContextualSubscriptionController(ureq, getWindowControl(), subsContext, pdata); folderContainer.put("subscription", csController.getInitialComponent()); } } if (!ureq.getUserSession().getRoles().isGuestOnly() && displaySearch) { SearchServiceUIFactory searchUIFactory = CoreSpringFactory.getBean(SearchServiceUIFactory.class); searchC = searchUIFactory.createInputController(ureq, wControl, DisplayOption.STANDARD, null); listenTo(searchC); // register for auto-dispose folderContainer.put("searchcomp", searchC.getInitialComponent()); } folderComponent = new FolderComponent(ureq, "foldercomp", rootContainer, filter, customLinkTreeModel, courseNodeId); folderComponent.addListener(this); folderContainer.put("foldercomp", folderComponent); if (WebDAVManager.getInstance().isEnabled() && displayWebDAVLink) folderContainer.contextPut("webdavlink", FolderManager.getWebDAVLink()); selTree = new SelectionTree("seltree", getTranslator()); selTree.addListener(this); folderContainer.put("seltree", selTree); // jump to either the forum or the folder if the business-launch-path says so. ContextEntry ce = bc.popLauncherContextEntry(); if (ce != null) { // a context path is left for me if (log.isDebugEnabled()) log.debug("businesscontrol (for further jumps) would be:" + bc); OLATResourceable ores = ce.getOLATResourceable(); if (log.isDebugEnabled()) log.debug("OLATResourceable=" + ores); String typeName = ores.getResourceableTypeName(); // typeName format: 'path=/test1/test2/readme.txt' // First remove prefix 'path=' String path = typeName.substring("path=".length()); if (path.endsWith(":0")) { path = path.substring(0, path.length() - 2); } activate(ureq, path); } enableDisableQuota(ureq); putInitialPanel(folderContainer); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected Folder(){\n\t super(\"Folder\");\n\t }", "public FolderRunController(VFSContainer rootContainer, boolean displayWebDAVLink, boolean displaySearch, UserRequest ureq, WindowControl wControl) {\n this(rootContainer, displayWebDAVLink, displaySearch, ureq, wControl, null, null, null);\n }", "public FolderRunController(VFSContainer rootContainer, boolean displayWebDAVLink, UserRequest ureq, WindowControl wControl) {\n this(rootContainer, displayWebDAVLink, false, ureq, wControl, null, null, null);\n }", "public Model(Controller controller)\r\n {\r\n // initialise instance variables\r\n setFiles(new ArrayList<>());\r\n setController(controller);\r\n }", "public FolderNode() {\n\t\t\tthis(null, 5);\n\t\t}", "public DirectoryModel() {\r\n\tthis(null);\r\n }", "public DirectoryFileFilter() {\n\t\tthis(true);\n\t}", "public FileManagerController() {\n fileSystemView = FileSystemView.getFileSystemView();\n desktop = Desktop.getDesktop();\n previewFactory = new PreviewFactory();\n initView();\n }", "public static <T> FolderPanel<T> create(String folder, Class<T> selectionType, Consumer<Lookup> customizeAction) {\n return create(folder, selectionType, \"\", customizeAction);\n }", "@Contract(pure = true)\n public FileActions(final MimaUserInterface mimaUI, final MimaEditorManager editorManager) {\n this.mimaUI = mimaUI;\n this.editorManager = editorManager;\n }", "public folderize() {\n }", "public interface FileObjectFilter {\n\n /** constant representing answer &quot;do not traverse the folder&quot; */\n public static final int DO_NOT_TRAVERSE = 0;\n /** constant representing answer &quot;traverse the folder&quot; */\n public static final int TRAVERSE = 1;\n /**\n * constant representing answer &quot;traverse the folder and all its direct\n * and indirect children (both files and subfolders)&quot;\n */\n public static final int TRAVERSE_ALL_SUBFOLDERS = 2;\n\n /**\n * Answers a question whether a given file should be searched.\n * The file must be a plain file (not folder).\n *\n * @return <code>true</code> if the given file should be searched;\n * <code>false</code> if not\n * @exception java.lang.IllegalArgumentException\n * if the passed <code>FileObject</code> is a folder\n */\n public boolean searchFile(FileObject file)\n throws IllegalArgumentException;\n\n /**\n * Answers a questions whether a given folder should be traversed\n * (its contents searched).\n * The passed argument must be a folder.\n *\n * @return one of constants {@link #DO_NOT_TRAVERSE},\n * {@link #TRAVERSE},\n * {@link #TRAVERSE_ALL_SUBFOLDERS};\n * if <code>TRAVERSE_ALL_SUBFOLDERS</code> is returned,\n * this filter will not be applied on the folder's children\n * (both direct and indirect, both files and folders)\n * @exception java.lang.IllegalArgumentException\n * if the passed <code>FileObject</code> is not a folder\n */\n public int traverseFolder(FileObject folder)\n throws IllegalArgumentException;\n\n}", "public CTabFolder( final Composite parent, final int style ) {\n super( parent, checkStyle( style ) );\n super.setLayout( new CTabFolderLayout() );\n onBottom = ( super.getStyle() & SWT.BOTTOM ) != 0;\n single = ( super.getStyle() & SWT.SINGLE ) != 0;\n showClose = ( super.getStyle() & SWT.CLOSE ) != 0;\n borderRight = ( style & SWT.BORDER ) != 0 ? 1 : 0;\n borderLeft = borderRight;\n borderTop = onBottom ? borderLeft : 0;\n borderBottom = onBottom ? 0 : borderLeft;\n highlight_header = ( style & SWT.FLAT ) != 0 ? 1 : 3;\n highlight_margin = ( style & SWT.FLAT ) != 0 ? 0 : 2;\n updateTabHeight( false );\n resizeListener = new ControlAdapter() {\n public void controlResized( final ControlEvent event ) {\n onResize();\n }\n };\n addControlListener( resizeListener );\n registerDisposeListener();\n tabFolderAdapter = new CTabFolderAdapter();\n selectionGraphicsAdapter = new WidgetGraphicsAdapter();\n }", "public FilePanel() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public FileObject folderId(UUID folderId) {\n this.folderId = folderId;\n return this;\n }", "private void actionAddFolder ()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\r\n\t\t\tJFileChooser folderChooser = new JFileChooser();\r\n\t\t\tfolderChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\r\n\r\n\t\t\tint isFolderSelected = folderChooser.showOpenDialog(folderChooser);\r\n\r\n\t\t\tif (isFolderSelected == JFileChooser.APPROVE_OPTION)\r\n\t\t\t{\r\n\t\t\t\tString folderPath = folderChooser.getSelectedFile().getPath();\r\n\r\n\t\t\t\tFile folderFileDescriptor = new File(folderPath);\r\n\t\t\t\tFile[] listFolderFiles = folderFileDescriptor.listFiles();\r\n\r\n\t\t\t\tString[] fileList = new String[listFolderFiles.length];\r\n\r\n\t\t\t\tfor (int i = 0; i < listFolderFiles.length; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tfileList[i] = listFolderFiles[i].getPath();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tDataController.scenarioOpenFolder(fileList);\r\n\r\n\t\t\t\thelperDisplayProjectFiles();\r\n\t\t\t\thelperDisplayInputImage();\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (ExceptionMessage e)\r\n\t\t{\r\n\t\t\tExceptionHandler.processException(e);\r\n\t\t}\r\n\t}", "public SimpleFileFilter() {\n\n this(null, false);\n }", "public Tag(Folder linkedFolder) {\n this.folder = linkedFolder;\n }", "public OrFileFilter()\n {\n // Nothing to do\n }", "public CollectFolderExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public Folder(String name){\n\t\tsuper();\n this.name = name;\n\t}", "private GitLabFolderAuthorization(GitLabFolderACL acl) {\n this.folderACL = acl;\n }", "@Override\n public GitLabFolderAuthorization newInstance(StaplerRequest req, JSONObject formData) throws FormException {\n return new GitLabFolderAuthorization(aclFromPermissionTable(formData.getJSONObject(\"permissionTable\")));\n }", "public FileFilter() {\n this.filterExpression = \"\";\n }", "public Directory(String nm){\r\n\t\tsuper();\r\n\t}", "@Override\n public void onPostFolderOpened(DocumentFile oldFolder, DocumentFile newFolder) {\n getList().scrollToPosition(0);\n buildBreadcrumbs(newFolder);\n setBackButtonHandlerEnabled(folderPathView.getBreadcrumbCount() > 1);\n getListAdapter().setInitiallySelectedItems(getContext()); // adapter needs to be populated for this to work.\n updateListOfFileExtensionsForAllVisibleFiles(getListAdapter().getFileExtsAndMimesInCurrentFolder());\n\n SortedSet<String> allFilters = getViewPrefs().getVisibleFileTypes();\n if(allFilters == null) {\n allFilters = new TreeSet<>();\n }\n allFilters.addAll(getViewPrefs().getFileTypesForVisibleMimes());\n allFilters.addAll(getViewPrefs().getAcceptableFileExts(getListAdapter().getFileExtsAndMimesInCurrentFolder()));\n\n getViewPrefs().getFileTypesForVisibleMimes();\n// fileExtFilters.setShowInactiveFilters(false);\n fileExtFilters.setAllFilters(allFilters);\n fileExtFilters.setActiveFilters(getListAdapter().getFileExtsInCurrentFolder());\n fileExtFilters.selectAll(true);\n }", "public Builder(BoxFolder folder, BoxSession session) {\n mArgs.putString(ARG_ID, folder.getId());\n mArgs.putString(ARG_NAME, folder.getName());\n mArgs.putString(ARG_USER_ID, session.getUserId());\n setBoxItemFilter(new MediaItemFilter());\n }", "public FileManager() {\n\t\t\n\t}", "public FolderDiffForm() {\n initComponents();\n }", "public FolderItemProvider(AdapterFactory adapterFactory) {\r\n\t\tsuper(adapterFactory);\r\n\t}", "private FileManager() {}", "public FilePane(DownloadProvider provider) {\n super();\n this.provider = provider;\n }", "public FileOpModel()\n\t{ \n\t\tthis(new ArrayList<>());\n\t}", "public Window_File_Editor(FileSystemDirectory rootName, MainWindow parent, List<FileSystemFile> file) {\n initComponents();\n root = rootName; \n this.parent = parent;\n files = file;\n setFileNames(files);\n }", "public static <T> FolderPanel<T> create(String folder, Class<T> selectionType) {\n return create(folder, selectionType, false);\n }", "public ActionFile() {\n }", "public FileListFragment() {\n }", "public FileNode() {\n\t}", "public static MenuItem createShowInLibraryMenuItem(SongManager model, Item selectedItem) {\n MenuItem showInExplorer = new MenuItem(SHOW_IN_LIBRARY);\n\n showInExplorer.setOnAction((event) -> {\n if (selectedItem != null) {\n File selectedFile = selectedItem.getFile();\n\n // Display in center panel\n if (!selectedFile.isDirectory()) {\n model.setM_selectedCenterFolder(selectedFile.getParentFile());\n } else {\n model.setM_selectedCenterFolder(selectedFile.getAbsoluteFile());\n }\n model.notifyCenterFolderObservers();\n }\n });\n\n return showInExplorer;\n }", "public Builder(String folderId, String userId) {\n mArgs.putString(ARG_ID, folderId);\n mArgs.putString(ARG_USER_ID, userId);\n setBoxItemFilter(new MediaItemFilter());\n }", "public CrawlController(String storageFolder) throws Exception\n\t{\n\t\tthis(storageFolder, Configurations.getBooleanProperty(\"crawler.enable_resume\", true));\n\t}", "public DirectoryModel(File path) {\r\n\tsetCurrentDirectory(path);\r\n\tif (isWindowsFileSystem()) {\r\n\t overrideTypes = new FileType[2];\r\n\t overrideTypes[0] = FileType.SharedFloppyDrive;\r\n\t overrideTypes[1] = FileType.SharedHardDrive;\r\n\t}\r\n }", "public SymbolManager(FileObject folder) {\r\n this.folder = folder;\r\n }", "public FileController(Context context){\n this.context=context;\n }", "public Builder setFolderId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n folderId_ = value;\n onChanged();\n return this;\n }", "public FolderChooserPreference(Context context, AttributeSet attrs) {\n\t\tsuper(context, attrs);\n\t}", "public Builder folder(String folder) {\n\t\t\tthis.folder = folder;\n\t\t\treturn this;\n\t\t}", "private void selectFolderBtnMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_selectFolderBtnMouseClicked\n if (workingDirectory == null)\n {\n workingDirectory = new File(\".\");\n }\n JFileChooser selectFolderUI = new JFileChooser();\n selectFolderUI.setCurrentDirectory(workingDirectory);\n selectFolderUI.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n int response = selectFolderUI.showOpenDialog(mainUI.this);\n if (response == JFileChooser.APPROVE_OPTION)\n {\n ArrayList<FileItem> fileList = new ArrayList<>();\n workingDirectory = selectFolderUI.getSelectedFile();\n ArrayList<File> files = \n new ArrayList<>(Arrays.asList(workingDirectory.listFiles()));\n \n for (File f : files)\n {\n if (!f.isDirectory())\n {\n FileItem fi = null;\n try {\n fi = new FileItem(f);\n } catch (IOException ex) {\n Logger.getLogger(mainUI.class.getName()).log(Level.SEVERE, null, ex);\n }\n fileList.add(fi);\n }\n }\n \n CSPB.testFiles = fileList;\n mainUI.this.refresh();\n } \n }", "private void setTree() throws IOException {\n TreeItem<File> root = new TreeItem<>();\n dirFolders.setRoot(buildTree(model.DirectoryManager.getTree(), root));\n dirFolders.setRoot(root.getChildren().get(0));\n\n // format cellFactory\n // we want to show file name in UI although treeView stores File object\n // Add directory logo if the file is a directory\n // Add photo thumbnail if the file is a photo\n dirFolders.setCellFactory(\n new Callback<TreeView<File>, TreeCell<File>>() {\n @Override\n public TreeCell<File> call(TreeView<File> param) {\n return new TreeCell<File>() {\n @Override\n protected void updateItem(File item, boolean empty) {\n super.updateItem(item, empty);\n if (item != null) {\n if (item.isDirectory()) {\n setGraphic(\n new ImageView(\n new Image(getClass().getResourceAsStream(\"/views/folder.png\"))));\n setDisclosureNode(null);\n File[] fileList = item.listFiles();\n if (fileList != null) {\n if (fileList.length == 0) {\n setDisable(true);\n }\n }\n } else {\n ImageView image = new ImageView(\"File:\" + item.getPath());\n image.setFitHeight(32);\n image.setFitWidth(36);\n setGraphic(image);\n }\n setText(item.getName());\n }\n }\n };\n }\n });\n\n // handle onClickAction\n dirFolders\n .getSelectionModel()\n .selectedItemProperty()\n .addListener(\n (observable, oldValue, newValue) -> {\n if (!dirFolders.getSelectionModel().getSelectedItem().getValue().isDirectory()) {\n model.User.setPhoto(\n model.PhotoManager.getPhoto(\n dirFolders.getSelectionModel().getSelectedItem().getValue().getPath()));\n try {\n loadNextScene(rootPane, \"/views/focusPhotoPane.fxml\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n } else {\n Stage curStage = (Stage) rootPane.getScene().getWindow();\n File selectedDirectory =\n dirFolders.getSelectionModel().getSelectedItem().getValue();\n if (selectedDirectory != null) {\n Directory dir =\n DirectoryManager.getCurrentDirectory(selectedDirectory.getPath());\n if (dir != null) {\n model.User.setGalleryPhotos(dir.getPhotos());\n fadeOutEvent();\n }\n } else {\n curStage.show();\n }\n }\n });\n }", "SubMenuItem(String directoryName) {\n super(directoryName, \"pieces/16/folder.png\");\n this.fileName = directoryName;\n this.extension = \"\";\n this.isDirectory = true;\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 }", "public GitLabFolderAuthorization(int groupId) {\n // no permissions set\n this(new GitLabFolderACL(groupId));\n }", "public FilmOverviewController() {\n }", "public KiemPropertyTypeWorkspaceFile() {\r\n super();\r\n this.filterNames = DEFAULT_FILTER_NAMES;\r\n this.filterExts = DEFAULT_FILTER_EXTS;\r\n }", "public EventFileManager(ReviewModel reviewModel) {\r\n\t\tthis.filePath = getSelectedFile();\r\n\t\tthis.reviewModel = reviewModel;\r\n\t}", "public interface FileView {\n\n /**\n * 设置标题\n * @param preText 前标题\n * @param nowText 现标题\n */\n void setTitle(String preText, String nowText);\n\n /**\n * 给列表设置适配器\n * @param adapter 适配器\n */\n void setAdapter(DocumentFileAdapter adapter);\n\n /**\n * 获取适配器\n * @return 适配器\n */\n DocumentFileAdapter getAdapter();\n\n /**\n * 设置刷新条\n * @param b 设置控制\n */\n void setRefreshing(boolean b);\n\n /**\n * 显示密码框\n */\n void showPasswordView();\n\n /**\n * u盘插入的操作\n * @param intent\n */\n void onUDiskInsert(Intent intent);\n\n /**\n * u盘移除的操作\n * @param intent\n */\n void onUDiskRemove(Intent intent);\n}", "public CustomDirectoryFactory(){\n\t\tsuper();\n\t}", "public DirectoryFileLocator(File dir) {\r\n directory = dir;\r\n }", "public FilePane() {\n this(null);\n }", "public TarArchive( File folder )\n {\n this.folder = folder;\n }", "public HrCmsMedia() {\n this(\"hr_cms_media\", null);\n }", "private static MenuItem createAddNewFolderMenuItem(SongManager model, Item selectedItem) {\n MenuItem createNewFolder = new MenuItem(CREATE_NEW_FOLDER);\n\n createNewFolder.setOnAction((event) -> {\n if (selectedItem != null) {\n File folderSelected = selectedItem.getFile();\n Path newPath = PromptUI.createNewFolder(folderSelected);\n\n if (newPath != null) {\n try {\n model.addNewFolder(newPath.toFile());\n } catch (IOException ex) {\n PromptUI.customPromptError(\"Create new folder\", null, \"Unable to create new folder \" + newPath);\n }\n }\n }\n });\n\n return createNewFolder;\n }", "@Override\n public void initialize(URL location, ResourceBundle resources) {\n // set treeView. Show all subdirectories and photos under every subdirectories.\n try {\n setTree();\n } catch (IOException e) {\n e.printStackTrace();\n }\n // set Gallery Display. Only show the photo directly under the selected directory.\n setGalleryDisplay();\n }", "public TabFolder(Composite parent, int style) {\n super(parent, checkStyle(style));\n }", "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 void addFolder(){\n }", "@ApiModelProperty(\n example = \"0f8ccf21-7267-4268-9167-a1e2c40c84c8\",\n value = \"Folder relation object's UUID\")\n /**\n * Folder relation object&#39;s UUID\n *\n * @return folderId UUID\n */\n public UUID getFolderId() {\n return folderId;\n }", "@Override\n\tpublic void setParrentFolder(String parrentFolder) {\n\t\t\n\t}", "public Directory() {\n files = new ArrayList<VipeFile>();\n sectors = new int[600];\n }", "public void newFolder ()\n {\n newNode(null);\n }", "@Override\n public void initialize(URL url, ResourceBundle rb) {\n try {\n model = Model.getInstance();\n setUpTableView();\n setUpIndicator();\n }\n catch (Exception ex) {\n Logger.getLogger(AssignFolderWindowController.class.getName()).log(Level.SEVERE, null, ex);\n EventLogger.log(EventLogger.Level.ERROR, \"An error occured: \" + ex.getMessage());\n }\n }", "public Directory(String name) {\n super(name);\n this.parent = null;\n }", "public DirectoryFileLocator() {\r\n this(System.getProperty(\"user.dir\"));\r\n }", "public SrcMlFolderReader(Context ctx) {\n this(ctx, new PositionalXmlReader());\n }", "public Controller() {\n\t\tthis(null);\n\t}", "public FileObject() {\n\t}", "public FileObject getFolder() {\r\n return folder;\r\n }", "public FilterChooser() {\n\n \tsuper();\n \tchooser = new JFileChooser();\n \tthis.setupListeners();\n \t\n \n }", "public ControllerImpl(Readable in, EnhancedImageModel model) {\n super(model);\n this.in = in;\n }", "public DirectoryListingScreen(){\r\n DIRECTORYLISTING_INSTANCE = this;\r\n }", "public Filehandler(Controller controller) {\n this.prefs = Preferences.userRoot().node(this.getClass().getName());\n this.controller = controller;\n }", "public CompositeController(IMusicModel model, CompositeView view) {\n this.model = model;\n this.view = view;\n }", "public ExternalFileMgrImpl()\r\n \t{\r\n \t\t\r\n \t}", "public Finder() {\n \n }", "protected FilterImpl() {\n this(SparkUtils.ALL_PATHS);\n }", "public FileChooserView(Frame owner) {\n super(owner, true);\n initComponents();\n fileChooser.addActionListener(this);\n }", "public FileBean() {}", "public Link buildForFilter() {\n isSubTreeFiltered = true;\n return new DefaultLink(this);\n }", "public Journal(String folder, String imageFileName, String editLogFileName) throws IOException {\n if (!folder.endsWith(Constants.PATH_SEPARATOR)) {\n folder += Constants.PATH_SEPARATOR;\n }\n mImagePath = folder + imageFileName;\n mEditLogPath = folder + editLogFileName;\n }", "public FileSelector(String[] types, int mode, FileChooser fileSelector){\n chooser = fileSelector;\n selectionMode = mode;\n label = new JTextField(\"Path\", 20);\n button = new CustomButton(\"Seleccionar\", Color.DARK_GRAY, Color.WHITE, Color.WHITE, Color.DARK_GRAY);\n fileChooser = new JFileChooser();\n fileTypes = types;\n }", "public AXLFileFilter(String[] filters) {\n\t this(filters, null);\n }", "public FileField addFileField(final String key, final String directory, final String[][] filters) {\n String label = key;\n FileField fileField = new FileField(getComposite(), _form, key, label, directory, filters, false);\n fileField.adapt(_formToolkit);\n _form.mapField(key, fileField);\n return fileField;\n }", "protected AbstractFolderIdWrapper() {\n\t}", "public Category() {\n\t\tsuper();\n\t\t/* Pour obtenir le chemin de fichier vers la catégorie */\n\t\tpath = \"src/\"+this.getClass().getPackage().getName().replace('.', '/');\n\t\twindowspath = \"src\\\\\"+this.getClass().getPackage().getName().replace('.', '\\\\');\n\t\t\n\t\timages = this.getPhotos();\n\t}", "public FileCreator() {\r\n initComponents();\r\n }", "public PSAaFolderDependent(PSLocator item, PSLocator srcFolder)\n {\n if (item == null)\n {\n throw new IllegalArgumentException(\"item must not be null\");\n }\n if (srcFolder == null)\n {\n throw new IllegalArgumentException(\"srcFolder must not be null\");\n }\n m_item = item;\n m_srcFolder = srcFolder;\n }", "public void init(){\n\t\tm_Folders = new ArrayList<Folder>();\n\t\n\t\tm_Folders.add(new Folder(\"Inbox\"));\n\t\tm_Folders.add(new Folder(\"Today\"));\n\t\tm_Folders.add(new Folder(\"Next\"));\n\t\tm_Folders.add(new Folder(\"Someday/Maybe\"));\t\t\n\t}", "public PSContentType(int typeId, String name, String label, \n String description, String editorUrl, boolean hideFromMenu, \n int objectType)\n {\n super(createKey(typeId));\n \n if (null == name || name.trim().length() == 0)\n throw new IllegalArgumentException(\"non-empty name must be supplied\");\n if (StringUtils.isBlank(label))\n {\n label = name;\n }\n if (null == editorUrl || editorUrl.trim().length() == 0)\n {\n throw new IllegalArgumentException(\n \"non-empty editorUrl must be supplied\");\n }\n else\n {\n //verify url format matches what we say below\n if (!verifyUrlFormat(editorUrl))\n {\n throw new IllegalArgumentException(\n \"incorrect editorUrl format, expected ../appname/resource, got \"\n + editorUrl);\n }\n }\n\n m_name = name;\n m_label = label;\n m_description = null == description ? \"\" : description;\n m_queryRequest = editorUrl.replace('\\\\', '/');\n m_hideFromMenu = hideFromMenu;\n m_objectType = objectType;\n }", "private NonGuiController(MusicEditorModel model0, ViewModel vm, NonGuiViewAdapter view) {\n model = requireNonNull(model0);\n this.vm = vm;\n this.view = view;\n }", "private DocumentFileArrayAdapter buildFolderRootsAdapter() {\n Map<String, DocumentFile> roots = null;\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n roots = buildDocFilesRootsMap();\n } else {\n roots = buildDocFilesRootsMapPreKitKat();\n }\n\n DocumentFileArrayAdapter adapter = new DocumentFileArrayAdapter(requireContext(), android.R.layout.simple_spinner_item, roots);\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n return adapter;\n }" ]
[ "0.6126168", "0.60133433", "0.5888688", "0.581972", "0.56900454", "0.55986893", "0.54856426", "0.54769677", "0.5463864", "0.54363614", "0.53648716", "0.5349223", "0.5314127", "0.52463883", "0.52192664", "0.5118095", "0.511562", "0.510074", "0.5084364", "0.5083974", "0.5078169", "0.50776", "0.50720227", "0.5057288", "0.50563776", "0.50108427", "0.5001704", "0.49863437", "0.49560133", "0.49418166", "0.49349135", "0.49247864", "0.49134558", "0.4909815", "0.49018136", "0.48934665", "0.48833817", "0.48596895", "0.48582453", "0.48574528", "0.48530513", "0.4842523", "0.4828262", "0.48155394", "0.48029608", "0.47419918", "0.47375712", "0.47215712", "0.47205225", "0.47199562", "0.47174495", "0.4708344", "0.47051427", "0.4704755", "0.47026804", "0.46912417", "0.46904558", "0.46858224", "0.46835372", "0.46835053", "0.46831092", "0.46744698", "0.46724766", "0.46610525", "0.4660462", "0.46602282", "0.46532103", "0.46279857", "0.46247673", "0.4621076", "0.4613637", "0.4609315", "0.46069598", "0.46042368", "0.4601686", "0.45813113", "0.45784792", "0.45769548", "0.45628908", "0.455742", "0.4551413", "0.45511866", "0.45492002", "0.4548957", "0.45484015", "0.45477784", "0.45424575", "0.45409134", "0.4539865", "0.4536383", "0.453316", "0.45259538", "0.4519913", "0.4517169", "0.45091406", "0.45075944", "0.4497861", "0.44927576", "0.44860658", "0.44858974" ]
0.6588566
0
ISSUE OLAT6899 (implemented this method)
private void checkFileSystemResource(UserRequest ureq) { if (FolderCommandStatus.STATUS_FAILED == FolderCommandHelper.sanityCheck(getWindowControl(), folderComponent)) { folderComponent.updateChildren(); } VFSItem item = VFSManager.resolveFile(folderComponent.getRootContainer(), ureq.getModuleURI()); if (FolderCommandStatus.STATUS_FAILED == FolderCommandHelper.sanityCheck2(getWindowControl(), folderComponent, ureq, item)) { folderComponent.setCurrentContainerPath(folderComponent.getCurrentContainerPath()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void mo51373a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "private void m50366E() {\n }", "public void mo12628c() {\n }", "protected boolean func_70814_o() { return true; }", "public void method_4270() {}", "public void mo38117a() {\n }", "protected boolean func_70041_e_() { return false; }", "public final void mo91715d() {\n }", "public void m9741j() throws cf {\r\n }", "public abstract void mo53562a(C18796a c18796a);", "public final void mo92082N() {\n }", "public abstract void mo70713b();", "public void mo1976s() throws cf {\r\n }", "private void m50367F() {\n }", "public void mo21787L() {\n }", "public abstract void mo27385c();", "public void m23075a() {\n }", "public void mo12930a() {\n }", "public final void mo11687c() {\n }", "public void mo6081a() {\n }", "public void mo1972o() throws cf {\r\n }", "protected void mo6255a() {\n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "public void mo21779D() {\n }", "public void mo9848a() {\n }", "public void mo21794S() {\n }", "public void mo21792Q() {\n }", "public final void mo92083O() {\n }", "public void mo21785J() {\n }", "public void mo21782G() {\n }", "public void mo1964g() throws cf {\r\n }", "public void mo115190b() {\n }", "public final void mo8775b() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo1531a() {\n }", "public abstract void mo6549b();", "void m5770d() throws C0841b;", "protected void method_2665() {\r\n super.method_2427(awt.field_4171);\r\n this.method_2440(true);\r\n this.method_2521(class_872.field_4244);\r\n }", "public void mo21793R() {\n }", "public boolean method_4088() {\n return false;\n }", "public void mo21791P() {\n }", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "public abstract void mo70702a(C30989b c30989b);", "void m5768b() throws C0841b;", "public void mo4359a() {\n }", "public void mo23813b() {\n }", "public boolean method_4093() {\n return false;\n }", "public void mo21781F() {\n }", "void m5771e() throws C0841b;", "public final void mo1285b() {\n }", "public boolean method_2453() {\r\n return false;\r\n }", "public abstract void mo56925d();", "public void mo21783H() {\n }", "public boolean method_208() {\r\n return false;\r\n }", "public synchronized void mo28699e() {\n if (mo27566d()) {\n throw new PooledByteBuffer.C3959a();\n }\n }", "public void mo21780E() {\n }", "public boolean method_2434() {\r\n return false;\r\n }", "public boolean method_4132() {\n return false;\n }", "public void mo21795T() {\n }", "public void mo21789N() {\n }", "public boolean method_216() {\r\n return false;\r\n }", "public void mo1944a() throws cf {\r\n }", "void m1864a() {\r\n }", "public void mo55254a() {\n }", "public void mo21825b() {\n }", "public void mo3376r() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private void level7() {\n }", "public void mo21878t() {\n }", "protected int mo3987c() {\n return -1;\n }", "private void kk12() {\n\n\t}", "public abstract void mo27464a();", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public boolean method_218() {\r\n return false;\r\n }", "public void mo1962e() throws cf {\r\n }", "public boolean method_210() {\r\n return false;\r\n }", "public void mo1966i() throws cf {\r\n }", "void m5769c() throws C0841b;", "public boolean method_3897() {\r\n return false;\r\n }", "public abstract long mo13681c();", "public final void mo12688e_() {\n }", "public abstract void mo27386d();", "public void mo21879u() {\n }", "public final void mo92084P() {\n }", "public abstract String mo13682d();", "public void mo21877s() {\n }", "public boolean method_4102() {\n return false;\n }", "public void mo1963f() throws cf {\r\n }", "public boolean method_108() {\r\n return false;\r\n }", "public void mo21784I() {\n }", "public void mo56167c() {\n }", "public abstract long mo9229aD();", "public void mo21786K() {\n }", "private void m11891e() {\n C4123a aVar = this.f10833z;\n if (aVar != null) {\n this.f10830w.mo10799a(aVar, new C4127c(this));\n }\n }" ]
[ "0.6516273", "0.64858717", "0.6303609", "0.6299263", "0.6070817", "0.6050737", "0.6036984", "0.60342354", "0.5934041", "0.58489984", "0.5845846", "0.57999593", "0.57937723", "0.5792218", "0.57830656", "0.57801753", "0.57620007", "0.5761659", "0.57606924", "0.57576233", "0.5756307", "0.57195574", "0.5718263", "0.5714943", "0.5707582", "0.5702338", "0.56950366", "0.5679762", "0.56749415", "0.56731397", "0.5667247", "0.56671983", "0.5655715", "0.5653028", "0.56500113", "0.56500113", "0.56500113", "0.56500113", "0.56500113", "0.56500113", "0.56500113", "0.56498075", "0.564434", "0.5642466", "0.56295997", "0.56225055", "0.5615517", "0.5615476", "0.5605155", "0.5597287", "0.5594202", "0.55915093", "0.55893743", "0.5583198", "0.55750954", "0.55626184", "0.55625254", "0.5550115", "0.55380136", "0.5523755", "0.55230224", "0.55144715", "0.5502658", "0.55010456", "0.54957163", "0.54925734", "0.54891086", "0.5480602", "0.54756826", "0.5464274", "0.5457714", "0.5455554", "0.5453318", "0.5453197", "0.54510975", "0.54504913", "0.5445676", "0.5443989", "0.5434328", "0.5430751", "0.54285777", "0.5426789", "0.54259044", "0.54248625", "0.5421063", "0.5417663", "0.5414392", "0.5407605", "0.54038703", "0.5403204", "0.5400795", "0.53993785", "0.53968513", "0.53897846", "0.53872454", "0.5380728", "0.5379853", "0.5377204", "0.5376646", "0.5376454", "0.5375564" ]
0.0
-1
Special treatment of forms with multiple submit actions.
private String getFormAction(UserRequest ureq) { // cannot avoid rawtype warning @SuppressWarnings("rawtypes") Enumeration params = ureq.getHttpReq().getParameterNames(); while (params.hasMoreElements()) { String key = (String) params.nextElement(); if (key.startsWith(ACTION_PRE)) { return key.substring(ACTION_PRE.length()); } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void Submit() {\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tbtnSubmit_click(e);\n\t\t\t}", "protected void onSubmitAction(IModel<StringWrapper> model, AjaxRequestTarget target, Form<?> form) {\n }", "protected abstract void onSubmit(AjaxRequestTarget target, Form form);", "@Override\n public void onClick(View view) {\n if ( checkValidation () )\n submitForm();\n \n }", "public WorkFlowResult processActionGradeSubmitAndEditAnotherVersion() {\n\tif (!AssignmentAuthoringBean.checkCsrf(csrfToken))\n return WorkFlowResult.INSTRUCTOR_FEEDBACK_FAILURE;\n\n WorkFlowResult saveResult = processActionGradeSubmit();\n if (WorkFlowResult.INSTRUCTOR_FEEDBACK_FAILURE.equals(saveResult)) {\n return WorkFlowResult.INSTRUCTOR_FEEDBACK_FAILURE;\n }\n WorkFlowResult togo = WorkFlowResult.INSTRUCTOR_FEEDBACK_SAVE_AND_EDIT_PREFIX;\n togo.setNextSubVersion(getNextVersionIdToEdit());\n return togo;\n }", "public void performSubmit(Action action) {\n performSubmit(action, true);\n }", "public void clickSubmitOnly() {\r\n\t\tutilities.clickOnElement(btnSubmit);\r\n\t}", "private String _getFormSubmitScript(UIComponent component,\n RenderingContext arc,\n String event,\n String detailItemId,\n String formName,\n String compId,\n boolean isImmediate)\n {\n // Check if PPR enabled, do a _submitPartialChange, else do a formSubmit.\n String onClickHandler = \"\";\n boolean pprEnabled =\n PartialPageUtils.supportsPartialRendering(arc);\n\n String validate = \"1\";\n if (isImmediate)\n {\n validate = \"0\";\n }\n\n if (pprEnabled)\n {\n StringBuilder onClickHandlerBuff =\n new StringBuilder(\"_submitPartialChange('\")\n .append(formName)\n .append(\"',\")\n .append(validate)\n .append(\", {event:'\")\n .append(event)\n .append(\"',source:'\")\n .append(compId)\n .append(\"',targetItem:'\")\n .append(detailItemId)\n .append(\"'});return false;\");\n\n onClickHandler = onClickHandlerBuff.toString(); \n }\n else\n {\n StringBuilder onClickHandlerBuff = new StringBuilder(\"submitForm('\")\n .append(formName)\n .append(\"',\")\n .append(validate)\n .append(\", {event:'\")\n .append(event)\n .append(\"',source:'\")\n .append(compId)\n .append(\"',targetItem:'\")\n .append(detailItemId)\n .append(\"'});return false;\");\n\n onClickHandler = onClickHandlerBuff.toString();\n }\n return onClickHandler;\n }", "public void submit() {\n driver.findElement(SUBMIT_SELECTOR).click();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tSubmit();\n\t\t\t\tfinish(); \n\t\t\t}", "private void onClickSaveButton() {\n // Validate and save form\n if (mDynamicForm.validate()) {\n triggerSubmitForm(mDynamicForm.getForm().getAction(), mDynamicForm.save());\n }\n }", "@Step\r\n\tpublic void clickSubmit() {\r\n\t\tLOGGER.info(\"Clicking submit\");\r\n\t\tspeedoSubmit.click();\r\n\t}", "public Browser submitForm(String name, Args values);", "public static void pressSubmit(){\n DriverManager.driver.findElement(Constans.SUBMIT_BUTTON_LOCATOR).click();\n }", "public void performSubmit() {\n\t\tgetWrappedElement().submit();\n\t}", "@Override\n\tpublic void submitForm(Context ctx) {\n\t\tUser loggedUser = ctx.sessionAttribute(\"loggedUser\");\n\t\tif (loggedUser == null) {\n\t\t\tctx.status(401);\n\t\t\treturn;\n\t\t}\n\t\tString username = ctx.pathParam(\"username\");\n\t\tif (!loggedUser.getUsername().equals(username)) {\n\t\t\tctx.status(403);\n\t\t\treturn;\n\t\t}\n\t\tForm form = ctx.bodyAsClass(Form.class);\n\t\tlog.debug(form);\n\t\tform = fs.submitForm(form);\n\t\tloggedUser.getForms().add(form);\n\t\tlog.debug(\"LoggedUser's Form: \" + loggedUser.getForms());\n\t\t// If loggedUser is a DepartmentHead, form goes straight to BenCo\n\t\tif(loggedUser.getType().equals(UserType.DEPARTMENT_HEAD)) {\n\t\t\tlog.debug(\"LoggedUser is a Department Head\");\n\t\t\tform.setSupervisorApproval(true);\n\t\t\tform.setDepartmentApproval(true);\n\t\t\tfs.updateForm(form);\n\t\t\tUser benco = us.getUser(\"sol\");\n\t\t\tbenco.getAwaitingApproval().add(form);\n\t\t\tus.updateUser(benco);\n\t\t\tus.submitForm(loggedUser);\n\t\t\tctx.json(form);\n\t\t\treturn;\n\t\t}\n\t\t// If FormSubmitter's supervisor is a DepartmentHead, supervisor approval is automatically true\n\t\telse if(loggedUser.getDepartmentHead().equals(loggedUser.getSupervisor())) {\n\t\t\tform.setSupervisorApproval(true);\n\t\t\tfs.updateForm(form);\n\t\t}\n\t\tUser supervisor = us.getUserByName(loggedUser.getSupervisor());\n\t\tsupervisor.getAwaitingApproval().add(form);\n\t\tus.updateUser(supervisor);\n\t\tlog.debug(loggedUser);\n\t\tus.submitForm(loggedUser);\n\t\tctx.json(form);\n\t}", "public abstract boolean handlePost(FORM form, BindException errors) throws Exception;", "@Override\r\n\tpublic ActionForward submit(ActionMapping mapping, BaseForm form,\r\n\t\t\tString operation, HttpServletRequest request,\r\n\t\t\tHttpServletResponse response) {\r\n\t\tAuditUtil.getInstance().writeLog(\r\n\t\t\t\tAuditUtil.FILE_TYPE_G4G,\r\n\t\t\t\tnew StringBuffer(this.getClass().getName()).append(\r\n\t\t\t\t\t\tG4GConstants.COLON_WITH_SPACES)\r\n\t\t\t\t\t\t.append(DataUtil.getCurrentMethod()).append(\r\n\t\t\t\t\t\t\t\tG4GConstants.DASHES).append(\r\n\t\t\t\t\t\t\t\tG4GConstants.SUBMIT_STARTS).toString());\r\n\t\treturn mapping.findForward(G4GConstants.HOMEPAGE);\r\n\t}", "protected abstract void onFormSubmit(DataAccessRule rule);", "public boolean submitPerformed(SubmitEvent e) throws Exception {\r\n\t\tif (e.getComponent() == _addButton)\r\n\t\t\ttryAdd();\r\n\t\telse if (e.getComponent() == _saveButton)\r\n\t\t\tdoSave();\r\n\t\telse if (e.getComponent() == _cancelButton) {\r\n\t\t\ttryCancel();\r\n\t\t} else if (e.getComponent() == _deleteButton) {\r\n\t\t\ttryDelete();\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public void onClick(ClickEvent event) {\r\n System.out.println(\"Submit Button geklickt\");\r\n handleEvent();\r\n }", "private void handleSubmitOnPre() {\n }", "public void clickSubmitButton(){\n actionsWithOurElements.clickOnElement(buttonSubmit);\n }", "@When(\"^Click's on Submit Button$\")\n\tpublic void click_s_on_Submit_Button() throws Throwable {\n\t\treviewPageObjects.clickonsubmit();\n\t}", "@Override\n\t\t\tpublic void onSubmitComplete(FormSubmitCompleteEvent event) {\n\n\t\t\t}", "protected boolean usesFakeFullSubmit()\n {\n return false;\n }", "public ActionForward multiUse(ActionMapping mapping, ActionForm form,\n \t\t\tHttpServletRequest request, HttpServletResponse response)\n \tthrows Exception {\n \t\t\n \t\treturn mapping.findForward(\"backToGeneExp\");\n }", "protected ActionForm processActionForm(HttpServletRequest request,\n HttpServletResponse response,\n ActionMapping mapping)\n {\n String scope = mapping.getScope();\n if(scope != null)\n {\n try\n {\n if(scope.equals(\"session\"))\n {\n OperationContext opCon = OperationContext.getOperationContext(request);\n if(opCon != null)\n {\n if(_log.isInfoEnabled())\n {\n _log.info(\"Looking for ActionForm in OperationContext[id=\" + opCon.getOperationContextId() + \"]\"); //20030124AH\n }\n ActionForm form = opCon.getActionForm();\n if(form != null)\n {\n if(_log.isInfoEnabled())\n {\n _log.info(\"Found ActionForm in OperationContext\"); //20030124AH\n }\n return form;\n }\n else\n {\n if(_log.isWarnEnabled())\n {\n _log.warn(\"No ActionForm found in OperationContext\"); //20030124AH\n }\n return null; //20030124AH\n }\n }\n }\n }\n catch(OperationException e)\n {\n // OperationExceptions here are normal when we forward from a completed operation\n // to the next action, so we ignore them.\n }\n catch(Throwable t)\n {\n if(_log.isErrorEnabled())\n {\n _log.error(\"Error caught in processActionForm() performing customised ActionForm handling\", t); //20030124AH\n }\n }\n }\n\n if(mapping instanceof GTActionMapping)\n { //20030124AH - Check the mapping to see if we should defer form creation or do it as normal\n if( ((GTActionMapping)mapping).isDeferFormCreation() )\n {\n if(_log.isInfoEnabled())\n {\n _log.info(\"Deferring ActionForm creation\");\n }\n return null;\n }\n }\n //...\n if(_log.isInfoEnabled())\n {\n _log.info(\"Delegating to superclass to obtain ActionForm\"); //20030124AH\n }\n ActionForm form = super.processActionForm(request, response, mapping);\n return form;\n }", "public void clickOnSubmit() {\r\n\r\n\t\treportStep(\"About to click on Submit button \", \"INFO\");\r\n\r\n\t\tif(clickAfterWait(submitButton)) {\r\n\r\n\t\t\treportStep(\"Successfully clicked on the Submit button \", \"PASS\");\r\n\r\n\t\t}else {\r\n\t\t\tclickAfterWait(submitButton);\r\n\t\t\treportStep(\"Failed to click on the Submit button \", \"INFO\");\r\n\r\n\t\t}\r\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n if (e.getSource() == submit) {\n int score = answerCheck();\n try {\n Submit submitButton = new Submit(userid, user.getText(), totalScore.getText(), score);\n setVisible(false);\n } catch (SQLException ex) {\n Logger.getLogger(Play.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "private void btnSubmit_click(ActionEvent e) {\n\t\tString stuAnswer = \"\";\r\n\t\tif (rdoItemA.isSelected()) {\r\n\t\t\tstuAnswer = \"A\";\r\n\t\t}\r\n\t\tif (rdoItemB.isSelected()) {\r\n\t\t\tstuAnswer = \"B\";\r\n\t\t}\r\n\t\tif (rdoItemC != null) {\r\n\t\t\tif (rdoItemC.isSelected()) {\r\n\t\t\t\tstuAnswer = \"C\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (rdoItemD != null) {\r\n\t\t\tif (rdoItemD.isSelected()) {\r\n\t\t\t\tstuAnswer = \"D\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!stuAnswer.isEmpty()) {\r\n\t\t\tExamItem bean = eiList.get(questionNO - 1);\r\n\r\n\t\t\tif (bean.getStuAnswer() == null || !bean.getStuAnswer().equalsIgnoreCase(stuAnswer)) {\r\n\t\t\t\tbean.setStuAnswer(stuAnswer);\r\n\t\t\t\tif (bean.getStdAnswer().equalsIgnoreCase(stuAnswer)) {\r\n\t\t\t\t\tbean.setMarkResult(1l);\r\n\t\t\t\t\tbean.setGainScore(bean.getStdScore());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbean.setMarkResult(0l);\r\n\t\t\t\t\tbean.setGainScore(0l);\r\n\t\t\t\t}\r\n\t\t\t\texamItemService.update(bean);\r\n\t\t\t}\r\n\t\t}\r\n\t\tLong result = examItemService.countNull(pk.longValue());\r\n\t\tString message = \"\";\r\n\t\tif ((questionNum - result) > 0) {\r\n\t\t\tmessage = \"还有\" + (questionNum - result) + \"道题未写,确认交卷?\";\r\n\t\t} else {\r\n\t\t\tmessage = \"确认交卷?\";\r\n\t\t}\r\n\t\tint option = JOptionPane.showConfirmDialog(null, message, \"系统提示\", JOptionPane.YES_NO_OPTION);\r\n\t\tif (option == JOptionPane.YES_OPTION) {\r\n\t\t\tLong trueItem = examItemService.countTrue(pk.longValue());\r\n\t\t\tLong totalScore = eiList.get(0).getStdScore() * trueItem;\r\n\t\t\tExam exam = examService.load(pk.longValue());\r\n\t\t\texam.setTotalScore(totalScore);\r\n\t\t\texamService.update(exam);\r\n\t\t\tJOptionPane.showMessageDialog(null, \"考试结束,\" + totalScore + \"分\");\r\n\t\t\tif (listFrm != null) {\r\n\t\t\t\tlistFrm.setVisible(true);\r\n\t\t\t\tthis.dispose();\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}", "@Override\n\tpublic void postRun(FormCheckerForm form) {\n\t}", "public boolean isForm();", "@SustainNonScreen\n public ActionForward onSubmit(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) {\n SecurityGroupsForm securityGroupsForm = (SecurityGroupsForm) form;\n saveOrUpdate(securityGroupsForm, request);\n return mapping.findForward(\"groupEdit\");\n }", "private void submitForm() {\n this.setDisable(true);\n clearErrorMessage();\n if(validateForm()) {\n CharSequence chars = passwordField.getCharacters();\n String username = usernameField.getText();\n this.controller.validateLoginCredentials(username, chars);\n }\n this.setDisable(false);\n }", "List<StatisticFormSubmit> selectStatisticFormSubmit( ResponseFilter filter, Plugin plugin );", "public static void click_SubmitButton() {\n\t\tboolean bstatus;\n\n\t\tbstatus = clickElement(btn_Submit);\n\t\tReporter.log(bstatus, \"Submit Button is clicked\", \"Submit Button not clicked\");\n\n\t\t\n\t}", "private void continueWithForm(final Events<Result> events) {\n\n\t\tif (registrar.getGroupFormInitialException() != null) {\n\t\t\tresult.setException(registrar.getGroupFormInitialException());\n\t\t\tevents.onFinished(getResult());\n\t\t\treturn;\n\t\t}\n\n\t\tform.setFormItems(registrar.getGroupFormInitial());\n\n\t\tif (!form.containsSubmitButton() && !form.containsOnlyTextItems()) {\n\t\t\tPerunException ex = PerunException.createNew(\"0\", \"FormWrongFormedException\", \"Group registration form is wrongly formed.\");\n\t\t\tresult.setException(ex);\n\t\t\tevents.onError(ex);\n\t\t\treturn;\n\t\t}\n\n\t\tform.setApp(Application.createNew(registrar.getVo(), registrar.getGroup(), Application.ApplicationType.INITIAL,\n\t\t\t\tgetFedInfo(localPP, Window.Location.getParameter(\"targetnew\")), localPP.getActor(), localPP.getExtSource(), localPP.getExtSourceType(), localPP.getExtSourceLoa(), localPP.getUser()));\n\n\t\tform.setOnSubmitEvent(getOnSubmitEvent(events));\n\n\t\tform.performAutoSubmit();\n\n\t}", "private void btnSubmit_click(ActionEvent e) {\n\t\tString subjectName=txtSubjectName.getText();\n\t\tString STATUS=txtSTATUS.getText();\n\n\t\t//为空判断\n\t\tif(SysFun.isNullOrEmpty(subjectName)) {\n\t\t\tlblMsg.setText(\"提示:用户名不得为空!\");\n\t\t\treturn;\n\t\t}\n\t\tif(STATUS==null || STATUS.isEmpty()) {\n\t\t\tlblMsg.setText(\"提示:教室号不得为空!\");\n\t\t\treturn;\n\t\t}\n\t\t\n//\t\tLong or=0L;\n//\t\tif(rdoNo.isSelected()) {\n//\t\t\tor=0L;\n//\t\t}else if(rdoYes.isSelected()) {\n//\t\t\tor=1L;\n//\t\t}\n\n\t\tSubject item=subjectService.loadByName(subjectName);\n\t\t\n\t\tif(item!=null) {\n\t\t\tlblMsg.setText(\"提示:该管理员账号已存在!\");\n\t\t\treturn;\n\t\t}\n\t\tSubject bean=new Subject();\n\t\tbean.setSubjectName(subjectName);\n\t\tbean.setSTATUS(STATUS);\n\t\t\n\t\tLong result=0L;\n\t\tString errMsg=null;\n\t\ttry {\n\t\tresult=subjectService.insert(bean);\n\t\t}catch(Exception ex) {\n\t\t\terrMsg=ex.getMessage();\n\t\t}\n\t\t\n\t\tif(result>0) {\n\t\t\tJOptionPane.showMessageDialog(null, \"添加成功!\");\n\t\t\tif(subjectListFrm!=null) {\n\t\t\t\tsubjectListFrm.btnReset_click(null);\n\t\t\t\tsubjectListFrm.setVisible(true);\n\t\t\t}\n\t\t\tthis.dispose();\n\t\t}else {\n\t\t\tJOptionPane.showMessageDialog(null, \"添加失败!\");\n\t\t}\n\n\t\t\n\t\tif(subjectListFrm!=null) {\n\t\t\tsubjectListFrm.btnReset_click(null); \n\t\t\tsubjectListFrm.setVisible(true);\n\t\t}\n\t\tthis.dispose();\n\t}", "void associateResponseWithFormSubmit( int nIdResponse, int nIdFormSubmit, Plugin plugin );", "public void dispatchSubmit(Action action) {\n this.handler.sendMessage(this.handler.obtainMessage(1, action));\n }", "public static Result submit() {\n Pallet pallet = palletForm.bindFromRequest().get();\n SetOfArticle sOA = setOfArticleForm.bindFromRequest().get();\n pallet.setTimeEntrance(new Date());\n sOA.setPallet(pallet);\n Ebean.beginTransaction();\n try {\n pallet.getTag1().save();\n pallet.getTag2().save();\n pallet.save();\n sOA.save();\n Ebean.commitTransaction();\n } catch (PersistenceException e) {\n flash(\"danger\", \"Pallet couldn't be created.\");\n return badRequest(newForm.render(palletForm, setOfArticleForm));\n } finally {\n Ebean.endTransaction();\n }\n flash(\"success\", \"Pallet with IDs: \" + pallet.getTag1().getId()+ \", \" + pallet.getTag2().getId() +\n \" and \" + sOA.getAmount() + \" pieces of \" +\n Article.find.byId(sOA.getArticle().getId()).getName() + \" added to database!\");\n return redirect(controllers.routes.PalletView.list());\n }", "@Override\n\tprotected final void onSubmit()\n\t{\n\t}", "public void submitText() {\r\n \t\tthis.dialog.clickOK();\r\n \t}", "@Override\n\tpublic String getSubmitArgs() {\n\t\treturn model.getSubmitArgs();\n\t}", "private void submitBtnClicked() {\n\n clearIncomplete(locationComboBox);\n clearIncomplete(avTypeComboBox);\n clearIncomplete(avDate);\n clearIncomplete(avDesc);\n clearIncomplete(avEmployeeComboBox);\n\n if (locationComboBox.getValue() == null\n || !locationComboBox.getItems().contains(locationComboBox.getValue())\n || avTypeComboBox.getValue() == null\n || avDesc.getText().equals(\"\")\n || avDate.getValue() == null\n || (Settings.getSettings().getCurrentPermissions() == 3\n && ((avEmployeeComboBox.getValue() == null)\n || !avEmployeeComboBox.getItems().contains(avEmployeeComboBox.getValue())))) {\n if (locationComboBox.getValue() == null\n || !locationComboBox.getItems().contains(locationComboBox.getValue())) {\n incomplete(locationComboBox);\n }\n if (avTypeComboBox.getValue() == null) {\n incomplete(avTypeComboBox);\n }\n if (avDesc.getText().equals(\"\")) {\n incomplete(avDesc);\n }\n if (avDate.getValue() == null) {\n incomplete(avDate);\n incomplete(avDate);\n }\n if (avEmployeeComboBox.getValue() == null\n || !avEmployeeComboBox.getItems().contains(avEmployeeComboBox.getValue())) {\n incomplete(avEmployeeComboBox);\n }\n nonCompleteForm(stackPane);\n } else {\n Service service = new Service(DataOperations.generateUniqueID(\"AV\"), \"Audio Visual\");\n\n service.setCategory((String) avTypeComboBox.getValue());\n service.setLocation(locationComboBox.getValue().toString());\n service.setDate(avDate.getValue().toString());\n service.setDescription(avDesc.getText());\n service.setRequester(settings.getCurrentUsername());\n if (settings.getCurrentPermissions() == 3) {\n service.setEmployee((String) avEmployeeComboBox.getValue());\n } else {\n service.setEmployee(\"admin\");\n }\n\n try {\n DataOperations.saveService(service);\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n\n submittedPopUp(stackPane);\n parent.loadCenterSubPage(\"ServiceRequestNavigator.fxml\");\n clearButton();\n }\n }", "public abstract FullResponse onServeFormParams(Map<String, List<String>> formParams);", "public void submit()\n\t{\n\t\tString trackCsv = trackCsvInput.getText();\n\t\tString trackName = trackNameInput.getText();\n\t\t\n\t\tRadioButton selectedButton = (RadioButton) toggleColors.getSelectedToggle();\n\t\tString color = selectedButton.getText().toUpperCase();\n\t\t\n\t\tif (addTrack(trackName, trackCsv, color)) \n\t\t{\n\t\t\tStage currStage = (Stage) trackCsvInput.getScene().getWindow();\n\t\t\tcurrStage.close();\n\t\t\tCTC.ctcController.displayTrack();\n\t\t\tCTC.ctcController.displayLegend();\n\t\t}\n\t\telse\n\t\t\terrorMessage.setVisible(true);\n\t}", "@Test\n public void test011() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n ActionExpression actionExpression0 = new ActionExpression(\"'tj#~9z\");\n Form form0 = new Form(errorPage0, \"'tj#~9z\", actionExpression0);\n Submit submit0 = (Submit)form0.submit(\"'tj#~9z\");\n Form form1 = form0.id(\"'tj#~9z\");\n }", "public String submitText();", "private void submit_attendance() {\n }", "void store( FormSubmit formResponse, Plugin plugin );", "public void saveForm(ActionEvent event) throws SQLException, ParseException {\n actionItemClass obj = new actionItemClass();\n obj.saveForm(this);\n }", "abstract public void dispatch(final String serializedForm);", "protected GuiTestObject nextsubmit() \n\t{\n\t\treturn new GuiTestObject(\n getMappedTestObject(\"nextsubmit\"));\n\t}", "FormSubmit load( int nIdFormResponse, Plugin plugin );", "@Then(\"user clicks submit button\")\n\tpublic void user_clicks_submit_button(){\n\t\t driver.findElement(By.name(\"sub\")).click();\n\t\t driver.findElement(By.xpath(\"//a[@href='addcustomerpage.php']\")).click();\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n try {\r\n HttpSession session = request.getSession();\r\n String admin = session.getAttribute(\"admin\").toString();\r\n String referer = request.getHeader(\"Referer\");\r\n \r\n String question = request.getParameter(\"question\").trim();\r\n String answer = request.getParameter(\"answer\").toString();\r\n answer = answer.replaceAll(\"\\n\",\"<br />\");\r\n String action = request.getParameter(\"action\");\r\n if(action.equals(\"edit\")){\r\n int faqID = Integer.parseInt(request.getParameter(\"faqID\"));\r\n Faqs faqEdit = faqsFacade.find(faqID);\r\n \r\n faqEdit.setAnswer(answer);\r\n faqEdit.setQuestion(question);\r\n faqsFacade.edit(faqEdit);\r\n request.setAttribute(\"redirectMessage\", \"FAQs edited successful!\");\r\n }else if(action.equals(\"insert\")){\r\n Faqs faqInsert = new Faqs();\r\n faqInsert.setAnswer(answer);\r\n faqInsert.setQuestion(question);\r\n faqsFacade.create(faqInsert);\r\n request.setAttribute(\"redirectMessage\", \"FAQs insert successful!\");\r\n }\r\n request.setAttribute(\"redirectLink\", referer);\r\n request.getRequestDispatcher(\"../redirect.jsp\").forward(request, response);\r\n } catch (NumberFormatException | ServletException | IOException e) {\r\n response.sendRedirect(\"login.jsp\");\r\n return; // <--- Here.\r\n }\r\n processRequest(request, response);\r\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n if (request.getParameter(\"btnChooseEmployee\") != null){\n saveEverything(request);\n \n }else if (request.getParameter(\"btnRemoveSkill\") != null)\n {\n removeSkillFromEmployee(request);\n saveEverything(request);\n \n }else if(request.getParameter(\"btnAddSkill\") != null){\n addSkillForEmployee(request);\n saveEverything(request);\n }else{\n buildAndSaveEmployeeList(request);\n resetSkillLists(request);\n } \n\n getServletContext().getRequestDispatcher(\"/ManageEmployeeSkills.jsp\").forward(request,response); \n }", "private void submit() {\r\n\t\tassignTracked();\r\n\t\tBkitPoma.startLoading(constants.BkitPoma_startLoading_wating());\r\n\t\tpostSubmit();\r\n\t}", "@FXML\n private void _submitAnswer(ActionEvent _event) {\n Game currentGame = GameFactory.getCurrentGameInstance();\n currentGame.processAnswer(_answerInput.getText());\n Map<String, Object> data = currentGame.createMap();\n updateView(data);\n this._answerInput.setText(\"\");\n if (!currentGame.gameOver) {\n this._submitBtn.setDisable(true);\n this._nxtQuestion.setDisable(false);\n } else {\n this._submitBtn.setDisable(true);\n this._nxtQuestion.setDisable(true);\n }\n }", "public void selectSubmitButton() {\n\t\tel = Browser.getDriver().findElement(element_submit_button);\n\t\tuihelper.click(el);\n\t}", "protected ActionForward performAction(ActionMapping \t\tmapping,\n\t\t\t\t\t\t\t\t\t\t ActionForm\t\t\tform,\n\t\t\t\t\t\t\t\t\t\t HttpServletRequest\trequest,\n\t\t\t\t\t\t\t\t\t\t HttpServletResponse\tresponse)\n\t\tthrows Exception \n\t{\n\t\tString forward = \"success\";\n\t\trequest.setAttribute(ALLOW_EDITS_KEY, \"false\");\n\t\t\n\t\tHttpSession session = request.getSession();\n\t\tArrayList selectedTestIds = new ArrayList();\n\t\tsession.setAttribute(\"selectedTestIds\", selectedTestIds);\n\n\t\tBaseActionForm dynaForm = (BaseActionForm) form;\n\n\t\t// Initialize the form.\n\t\tdynaForm.initialize(mapping);\n\t\t\n\t\tPropertyUtils.setProperty(dynaForm, \"currentDate\", DateUtil.getCurrentDateAsText());\n\t\tPropertyUtils.setProperty(dynaForm, \"sampleTypes\", DisplayListService.getList(ListType.SAMPLE_TYPE_ACTIVE));\n\t\tPropertyUtils.setProperty(dynaForm, \"sampleSources\", DisplayListService.getList(ListType.SAMPLE_SOURCE));\n\t\tPropertyUtils.setProperty(dynaForm, \"initConditionFormErrorsList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_INIT_COND_FORM_ERRORS));\n\t\tPropertyUtils.setProperty(dynaForm, \"initConditionLabelErrorsList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_INIT_COND_LABEL_ERRORS));\n\t\tPropertyUtils.setProperty(dynaForm, \"initConditionMiscList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_INIT_COND_MISC));\n\t\tPropertyUtils.setProperty(dynaForm, \"rejectionReasonFormErrorsList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_REJECTION_FORM_ERRORS));\n\t\tPropertyUtils.setProperty(dynaForm, \"rejectionReasonLabelErrorsList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_REJECTION_LABEL_ERRORS));\n\t\tPropertyUtils.setProperty(dynaForm, \"rejectionReasonMiscList\", DisplayListService.getList(ListType.SAMPLE_ENTRY_REJECTION_MISC));\n PropertyUtils.setProperty(dynaForm, \"genderList\", DisplayListService.getList(ListType.GENDERS));\n PropertyUtils.setProperty(dynaForm, \"cityList\", DisplayListService.getList(ListType.CITY));\n PropertyUtils.setProperty(dynaForm, \"districtList\", DisplayListService.getList(ListType.DISTRICT));\n PropertyUtils.setProperty(dynaForm, \"departmentList\", DisplayListService.getList(ListType.DEPARTMENT));\n PropertyUtils.setProperty(dynaForm, \"patientTypeList\", DisplayListService.getList(ListType.PATIENT_TYPE));\n\n // for backwards compatibility with non-modal version of sample entry\n\t\tPropertyUtils.setProperty(dynaForm, \"initialSampleConditionList\", DisplayListService.getList(ListType.INITIAL_SAMPLE_CONDITION));\n\t\tPropertyUtils.setProperty(dynaForm, \"testSectionList\", DisplayListService.getList(ListType.TEST_SECTION));\n\n\t\tSample\tsample\t= new Sample();\n\n\t\t// Set received date and entered date to today's date\n\t\tDate today = Calendar.getInstance().getTime();\n\t\tString dateAsText = DateUtil.formatDateAsText(today);\n\n\t\tSystemConfiguration sysConfig = SystemConfiguration.getInstance();\n\t\t\n\t\tsample.setReceivedDateForDisplay(dateAsText);\n\t\tsample.setEnteredDateForDisplay(dateAsText);\n\t\tsample.setReferredCultureFlag(sysConfig.getQuickEntryDefaultReferredCultureFlag());\n\t\tsample.setStickerReceivedFlag(sysConfig.getQuickEntryDefaultStickerReceivedFlag());\n\t\t\n\t\t// default nextItemSequence to 1 (for clinical - always 1)\n\t\tsample.setNextItemSequence(sysConfig.getQuickEntryDefaultNextItemSequence());\n\n\t\t// revision is set to 0 on insert\n\t\tsample.setRevision(sysConfig.getQuickEntryDefaultRevision());\n\n\t\tsample.setCollectionTimeForDisplay(sysConfig.getQuickEntryDefaultCollectionTimeForDisplay());\n\n\t\tif (sample.getId() != null && !sample.getId().equals(\"0\"))\n\t\t{\n\t\t\trequest.setAttribute(ID, sample.getId());\n\t\t}\n\n\t\t// populate form from valueholder\n\t\tPropertyUtils.copyProperties(form, sample);\n\n\t\tPropertyUtils.setProperty(form, \"currentDate\",\t\tdateAsText);\n\t\trequest.setAttribute(\"menuDefinition\", \"BatchEntryDefinition\");\n\t\treturn mapping.findForward(forward);\n\t}", "protected void submitAction() {\n\t\ttry {\n\t\t\tString username = userField.getText();\n\t\t\tAbstractAgent loggedClient = parent.getAgent().login(username, new String(passField.getPassword()));\n\t\t\tif (loggedClient instanceof AdminMS) {\n\t\t\t\tAdminUI adminUI = new AdminUI((AdminMS) loggedClient);\n\t\t\t\tparent.setVisible(false);\n\t\t\t\tadminUI.run();\n\t\t\t} else if (loggedClient instanceof IUser) {\n\t\t\t\tUserUI userUI = new UserUI((IUser) loggedClient);\n\t\t\t\tparent.setVisible(false);\n\t\t\t\tuserUI.run();\n\t\t\t}\n\t\t\tif (loggedClient != null)\n\t\t\t\tparent.dispose();\n\t\t} catch (LoginException e) {\n\t\t\tmessageLabel.setText(e.getMessage());\n\t\t} catch (RemoteException e) {\n\t\t\tJOptionPane.showMessageDialog(parent, e);\n\t\t}\n\t}", "public void submitFeedback()\r\n {\n if(mechanicList.getValue() == null && ratingButtons.getValue() == null){\r\n MainLayout.displayInformationPrompt(\"Missing Information! You Must Include Both Mechanic Name AND Desired Rating.\");\r\n } else if(mechanicList.getValue() == null){\r\n MainLayout.displayInformationPrompt(\"Missing Information! You Must Include Mechanic Name.\");\r\n } else if(ratingButtons.getValue() == null){\r\n MainLayout.displayInformationPrompt(\"Missing Information! You Must Include Desired Rating.\");\r\n } else {\r\n feedbackController.submitFeedback(mechanicList.getValue(), feedbackMsgField.getValue(), Integer.parseInt(ratingButtons.getValue()));\r\n feedbackController.updateMechanicStars(mechanicList.getValue());\r\n MainLayout.displayInformationPrompt(\"Review Submitted! Thanks For Your feedback!\");\r\n }\r\n }", "public boolean submitForm (Form aForm) throws Exception {\n try {\n this.fireWorkInProgressEvent(true);\n return (boolean) CMSFormServices.getCurrent().submitForm(aForm);\n } catch (DowntimeException ex) {\n LoggingServices.getCurrent().logMsg(getClass().getName(),\"submitForm\",\n \"Primary Implementation for CMSFormServices failed, going Off-Line...\",\n \"See Exception\", LoggingServices.MAJOR, ex);\n offLineMode();\n setOffLineMode();\n return (boolean) CMSFormServices.getCurrent().submitForm(aForm);\n } finally {\n this.fireWorkInProgressEvent(false);\n }\n }", "@Override\n public void onClick(View v) {\n if(checkEmptyFields()){\n //submit not successful\n }else {\n //add to database\n Toast.makeText(getApplicationContext(), \"Submit Successful\", Toast.LENGTH_SHORT).show();\n }\n }", "public static void form_Save_And_New() throws InterruptedException {\n\t\tAndroidLocators.resourceId(\"in.spoors.effortplus:id/saveForm\").click();\n\t\tCommonUtils.alertContentXpath();\n\t\tif (AndroidLocators.findElements_With_ResourceId(\"new UiSelector().resourceId(\\\"in.spoors.effortplus:id/formSaveAndNewButton\\\")\")\n\t\t\t\t.size() > 0) {\n\t\t\tAndroidLocators.resourceId(\"in.spoors.effortplus:id/formSaveAndNewButton\").click();\n\t\t\tCommonUtils.interruptSyncAndLetmeWork();\n\t\t\tCommonUtils.waitForElementVisibility(\"//*[@resource-id='in.spoors.effortplus:id/saveForm']\");\n\t\t}\n\t}", "public SelenideElement submitButton() {\n return formPageRoot().$(By.xpath (\"//button[@type='submit']\")); \n }", "protected void doPost(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\r\n\t\tString action = req.getParameter(\"action\");\r\n\t\tif (action.equalsIgnoreCase(\"delete\")) {\r\n\t\t\tdoDelete(req, resp);\r\n\t\t\treturn;\r\n\t\t} else if (action.equalsIgnoreCase(\"put\")) {\r\n\t\t\tdoPut(req, resp);\r\n\t\t\treturn;\r\n\t\t}\r\n\t}", "public MainPage submitForm() {\n LOGGER.info(\"Clicked the button 'LOGIN'\");\n clickOnElement(loginButtonLocator);\n return MainPage.Instance;\n }", "@FXML\n\t private void loadsubmit(ActionEvent event) {\n\t \t if (!isReadyForSubmission) {\n\t Alert alert = new Alert(Alert.AlertType.ERROR);\n\t alert.setTitle(\"Failed\");\n\t alert.setHeaderText(null);\n\t alert.setContentText(\"Please select a book to submit\");\n\t alert.showAndWait();\n\t return;\n\t }\n\n\t Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n\t alert.setTitle(\"Confirm Submission Operation\");\n\t alert.setHeaderText(null);\n\t alert.setContentText(\"Are you sure want to return the book ?\");\n\n\t Optional<ButtonType> response = alert.showAndWait();\n\t if (response.get() == ButtonType.OK) {\n\t String id = Bookid.getText();\n\t String ac1 = \"DELETE FROM ISSUE_LMS WHERE BOOKID = '\" + id + \"'\";\n\t String ac2 = \"UPDATE BOOK_LMS SET ISAVAIL = TRUE WHERE ID = '\" + id + \"'\";\n\n\t if (dbhandler.execAction(ac1) && dbhandler.execAction(ac2)) {\n\t Alert alert1 = new Alert(Alert.AlertType.INFORMATION);\n\t alert1.setTitle(\"Success\");\n\t alert1.setHeaderText(null);\n\t alert1.setContentText(\"Book Has Been Submitted\");\n\t alert1.showAndWait();\n\t } else {\n\t Alert alert1 = new Alert(Alert.AlertType.ERROR);\n\t alert1.setTitle(\"Failed\");\n\t alert1.setHeaderText(null);\n\t alert1.setContentText(\"Submission Has Been Failed\");\n\t alert1.showAndWait();\n\t }\n\t } else {\n\t Alert alert1 = new Alert(Alert.AlertType.INFORMATION);\n\t alert1.setTitle(\"Cancelled\");\n\t alert1.setHeaderText(null);\n\t alert1.setContentText(\"Submission Operation cancelled\");\n\t alert1.showAndWait();\n\t }\n\t }", "@Override\n\t\t\tpublic void onPreSubmit() {\n\t\t\t}", "@Override\n\t\t\tpublic void onPreSubmit() {\n\t\t\t}", "public ActionForward perform(\n\t\tActionMapping mapping,\n\t\tActionForm form,\n\t\tHttpServletRequest request,\n\t\tHttpServletResponse response) {\n\t\t\n\t\tLocale locale = getLocale(request);\n\t\tMessageResources messages = getResources();\n\t\tString action = request.getParameter(\"FormAction\");\n\t\tUserLogin ul = (UserLogin)request.getSession().getAttribute(Constants.USERLOGIN_KEY);\n\t\tif(action == null) action = \"QueryForList\";\n\t\t\n\t\tif (action.equals(\"QueryForList\")) {\n\t\t\tList result = findQueryResult(request);\n\t\t\trequest.setAttribute(\"QryList\", result);\n\t\t} \n\t\t\n\t\tif (action.equals(\"PAConfirm\")) {\n\t\t\tString chk[] =request.getParameterValues(\"chk\");\n\t\t\tTransactionServices ts = new TransactionServices();\t\t\t\t\t\t\t\t\n\n\t\t\tif (chk != null) {\n\t\t\t\ttry {\n\t\t\t\t\tnet.sf.hibernate.Session hs =Hibernate2Session.currentSession();\n\t\t\t\t\tTransaction tx = hs.beginTransaction();\n\t\t\t\t\tint RowSize = java.lang.reflect.Array.getLength(chk);\n\t\t\t\t\tfor (int i = 0; i < RowSize; i++) {\n\t\t\t\t\t\tProjectCostMaster pcm = (ProjectCostMaster)hs.load(ProjectCostMaster.class, new Integer(chk[i]));\n\t\t\t\t\t\tif (pcm.getPAConfirm() == null) {\n\t\t\t\t\t\t\tpcm.setPAConfirm(UtilDateTime.nowTimestamp());\n\t\t\t\t\t\t\ths.update(pcm);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tts.insert(pcm, ul);\n\t\t\t\t\t}\n\t\t\t\t\ttx.commit();\n\t\t\t\t\ths.flush();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tList result = findQueryResult(request);\n\t\t\trequest.setAttribute(\"QryList\", result);\n\t\t}\n\t\tif (action.equals(\"PAUNConfirm\")) {\n\t\t\tString chk[] =request.getParameterValues(\"chk\");\n\t\t\tTransactionServices ts = new TransactionServices();\t\t\t\t\t\t\t\t\n\n\t\t\tif (chk != null) {\n\t\t\t\ttry {\n\t\t\t\t\tnet.sf.hibernate.Session hs =Hibernate2Session.currentSession();\n\t\t\t\t\tTransaction tx = hs.beginTransaction();\n\t\t\t\t\tint RowSize = java.lang.reflect.Array.getLength(chk);\n\t\t\t\t\tfor (int i = 0; i < RowSize; i++) {\n\t\t\t\t\t\tProjectCostMaster pcm = (ProjectCostMaster)hs.load(ProjectCostMaster.class, new Integer(chk[i]));\n\t\t\t\t\t\tif (pcm.getPAConfirm() != null) {\n\t\t\t\t\t\t\tpcm.setPAConfirm(null);\n\t\t\t\t\t\t\ths.update(pcm);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tts.remove(pcm);\n\t\t\t\t\t}\n\t\t\t\t\ttx.commit();\n\t\t\t\t\ths.flush();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tList result = findQueryResult(request);\n\t\t\trequest.setAttribute(\"QryList\", result);\n\t\t}\n\t\tif (action.equals(\"Confirm\")) {\n\t\t\tString chk[] =request.getParameterValues(\"chk\");\n\t\t\tTransactionServices ts = new TransactionServices();\t\t\t\t\t\t\t\t\n\n\t\t\tif (chk != null) {\n\t\t\t\ttry {\n\t\t\t\t\tnet.sf.hibernate.Session hs =Hibernate2Session.currentSession();\n\t\t\t\t\tTransaction tx = hs.beginTransaction();\n\t\t\t\t\tint RowSize = java.lang.reflect.Array.getLength(chk);\n\t\t\t\t\tfor (int i = 0; i < RowSize; i++) {\n\t\t\t\t\t\tProjectCostMaster pcm = (ProjectCostMaster)hs.load(ProjectCostMaster.class, new Integer(chk[i]));\n\t\t\t\t\t\tif (pcm.getApprovalDate() == null) {\n\t\t\t\t\t\t\tpcm.setApprovalDate(UtilDateTime.nowTimestamp());\n\t\t\t\t\t\t\tpcm.setPayStatus(\"confirmed\");\n\t\t\t\t\t\t\ths.update(pcm);\n\t\t\t\t\t\t}\n\t\t\t\t//\t\tts.remove(pcm);\n\t\t\t\t\t}\n\t\t\t\t\ttx.commit();\n\t\t\t\t\ths.flush();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tList result = findQueryResult(request);\n\t\t\trequest.setAttribute(\"QryList\", result);\n\t\t}\n\t\tif (action.equals(\"PostToFA\")) {\n\t\t\tString chk[] =request.getParameterValues(\"chk\");\n\t\t\tif (chk != null) {\n\t\t\t\ttry {\n\t\t\t\t\tnet.sf.hibernate.Session hs =Hibernate2Session.currentSession();\n\t//\t\t\t\tTransaction tx = hs.beginTransaction();\n\t\t\t\t\tint RowSize = java.lang.reflect.Array.getLength(chk);\n\t\t\t\t\tfor (int i = 0; i < RowSize; i++) {\n\t\t\t\t\t\tProjectCostMaster pcm = (ProjectCostMaster)hs.load(ProjectCostMaster.class, new Integer(chk[i]));\n\t\t\t\t\t\tProjectAirFareCost pac = (ProjectAirFareCost)hs.load(ProjectAirFareCost.class, new Integer(chk[i]));\n\t\t\t\t\t//\tif(pac.getReturnDate()!=null){\n\t\t\t\t\t\t\tpcm.setPayStatus(\"Posted\");\n\t\t\t\t\t\t\ths.save(pcm);\n\t\t\t\t\t//\t}\n\t\t\t\t\t}\n\t\t//\t\t\ttx.commit();\n\t\t\t\t\ths.flush();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\tList result = findQueryResult(request);\n\t\t\trequest.setAttribute(\"QryList\", result);\n\t\t}\n\t\tif (action.equals(\"ExcelPrint\")) {\n\t\t\tString chk[] =request.getParameterValues(\"chk\");\n\t\t\t\n\t\t\tif (chk != null) {\n\t\t\t\ttry {\n//\t\t\t\t\tGet Excel Template Path =============================================\n\t\t\t\t\tnet.sf.hibernate.Session hs =Hibernate2Session.currentSession();\n\t\t\t\t\t\n\t\t\t\t\tString TemplatePath = GetTemplateFolder();\n\t\t\t\t\tif (TemplatePath == null) return null;\n\t\t\t\t\t\n\t\t\t\t\tint RowSize = java.lang.reflect.Array.getLength(chk);\n\t\t\t\t\t\n\t\t\t\t\t//Start to output the excel file\n\t\t\t\t\tresponse.reset();\n\t\t\t\t\tresponse.setHeader(\"Content-Disposition\", \"attachment;filename=\\\"\"+ SaveToFileName + \"\\\"\");\n\t\t\t\t\tresponse.setContentType(\"application/octet-stream\");\n\t\t\t\t\t\n\t\t\t\t\t//Use POI to read the selected Excel Spreadsheet\n\t\t\t\t\tHSSFWorkbook wb = new HSSFWorkbook(new FileInputStream(TemplatePath+\"\\\\\"+ExcelTemplate));\n\t\t\t\t\t//Select the first worksheet\n\t\t\t\t\tHSSFSheet sheet = wb.getSheet(FormSheetName);\n\t\t\t\t\t\n\t\t\t\t\tDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH);\n\t\t\t\t\tString status =\"\";\n\t\t\t\t\t\t\t\t\n\t\t\t\t\tHSSFCell cell = null;\n\t\t\t\t\t\t\t\n\t\t\t\t\t//List\n\t\t\t\t\tHSSFCellStyle boldTextStyle = sheet.getRow(ListStartRow).getCell((short)0).getCellStyle();\n\t\t\t\t\tHSSFCellStyle dateStyle = sheet.getRow(1).getCell((short)7).getCellStyle();\n\t\t\t\t\tHSSFCellStyle numberFormatStyle = sheet.getRow(ListStartRow).getCell((short)6).getCellStyle();\n\t\t\t\t\t\n\t\t\t\t\tint ExcelRow = ListStartRow;\n\t\t\t\t\t\n\t\t\t\t\tHSSFRow HRow = null;\n\t\t\t\t\tHRow = sheet.createRow(1);\n\t\t\t\t\tcell = HRow.createCell((short)7);\n\t\t\t\t\tcell.setCellValue(new Date());\n\t\t\t\t\tcell.setCellStyle(dateStyle);\n\t\t\t\t\t\n\t\t\t\t\t//in order to make groups\n\t\t\t\t\t\n\t\t\t\t\tshort cellNumber = 0;\n\t\t\t\t\t\n\t\t\t\t\t//write the titles\n\t\t\t\t\tHRow = sheet.createRow(titleRow);\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Ticket Code\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Project ID\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Staff Name\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Description\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Bill To\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Create Date\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Flight No.\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Paid By\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Flight Date\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Confirm Date\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Price\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\tcell.setCellValue(\"Vendor\");\n\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\n\n\t\t\t\t\t\n\t\t\t\t\t//write contents\n\t\t\t\t\tfor (int i = 0; i < RowSize; i++) {\n\t\t\t\t\tProjectCostMaster pcm = (ProjectCostMaster)hs.load(ProjectCostMaster.class, new Integer(chk[i]));\n\t\t\t\t\tProjectAirFareCost pac = (ProjectAirFareCost)hs.load(ProjectAirFareCost.class, new Integer(chk[i]));\n\n\t\t\t\t\t\tcellNumber = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tHRow = sheet.createRow(ExcelRow);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getFormCode());\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getProjectMaster()==null ? \"\" : pcm.getProjectMaster().getProjId());\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getUserLogin().getName());\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t cell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getPayType()== null? pcm.getProjectMaster().getProjName() : pcm.getPayType());\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getProjectMaster().getBillTo() == null ? \"\" : pcm.getProjectMaster().getBillTo().getDescription());\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(df.format(pcm.getCreatedate()));\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getRefno());\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getClaimType().equals(\"CN\") ? \"Company\" : \"Customer\");\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(df.format(pcm.getCostdate()));\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getApprovalDate()==null? \"\" : df.format(pcm.getApprovalDate()));\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getTotalvalue());\n\t\t\t\t\t\t\tcell.setCellStyle(numberFormatStyle);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcell = HRow.createCell(cellNumber++);\n\t\t\t\t\t\t\tcell.setEncoding(HSSFCell.ENCODING_UTF_16);//设置cell编码解决中文高位字节截断\n\t\t\t\t\t\t\tcell.setCellValue(pcm.getVendor()==null?\"\":pcm.getVendor().getDescription());\n\t\t\t\t\t\t\tcell.setCellStyle(boldTextStyle);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tpcm.setExportDate(UtilDateTime.nowTimestamp());\n\t\t\t\t\t\t\tExcelRow++;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t//\twriteExportDate(sr);\n\t\t\t\t//\twriteExportDate(sr);\n\t\t\t\t\t//写入Excel工作表\n\t\t\t\t\twb.write(response.getOutputStream());\n\t\t\t\t\t//关闭Excel工作薄对象\n\t\t\t\t\tresponse.getOutputStream().close();\n\t\t\t\t\tresponse.setStatus( HttpServletResponse.SC_OK );\n\t\t\t\t\tresponse.flushBuffer();\n//------------------------------------------\t\t\t\t\t\n\t\t\t\t\t\n\t//\t\t\t\tTransaction tx = hs.beginTransaction();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\ths.flush();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t//\tList result = findQueryResult(request);\n\t\t//\trequest.setAttribute(\"QryList\", result);\n\t\t}\n\t\treturn (mapping.findForward(\"success\"));\n\t}", "@Test(timeout = 4000)\n public void test267() throws Throwable {\n Submit submit0 = new Submit((Component) null, \".\\\"=_m?KP<D\\\"\", \"I&{b+CI\");\n ActionExpression actionExpression0 = submit0.action(\"\");\n assertFalse(actionExpression0.isSubmissible());\n }", "protected void processAction(Event e) {\n\n\t\t// First check to see if the fields are empty.\n\t\tif (typeNameTF.getText().isEmpty() || unitsTF.getText().isEmpty() || unitMeasureTF.getText().isEmpty()\n\t\t\t\t|| validityDaysTF.getText().isEmpty() || reorderPointTF.getText().isEmpty()\n\t\t\t\t|| notesTF.getText().isEmpty())\n\t\t\tmessageLBL.setText(\"All Item Type data must be filled\");\n\t\telse if(!isInt(unitsTF.getText())) {\n\t\t\tmessageLBL.setText(\"Units must be an integer.\");\n\t\t}\n\t\telse if(!isInt(validityDaysTF.getText())) {\n\t\t\tmessageLBL.setText(\"Validity days must be an integer.\");\n\t\t}\n\t\telse if(!isInt(reorderPointTF.getText())) {\n\t\t\tmessageLBL.setText(\"Reorder point must be an integer.\");\n\t\t}\n\t\t// Then check to see if it is the submit button.\n\t\telse if (e.getSource() == submitBTN)\n\t\t\taddInventoryItemType();\n\t}", "@Override\r\n \tpublic ActionForward executeSecureAction(ActionMapping mapping, ActionForm form,\r\n \t\t\tHttpServletRequest request, HttpServletResponse response) throws IOException,\r\n \t\t\tServletException\r\n \t{\r\n \t\tsaveActionErrors(form, request);\r\n \t\t// //Gets the value of the operation parameter.\r\n \t\t// String operation = request.getParameter(Constants.OPERATION);\r\n \t\t//\r\n \t\t// //Sets the operation attribute to be used in the Add/Edit Institute\r\n \t\t// Page.\r\n \t\t// request.setAttribute(Constants.OPERATION, operation);\r\n \t\ttry\r\n \t\t{\r\n \t\t\tfinal IFactory factory = AbstractFactoryConfig.getInstance().getBizLogicFactory();\r\n \t\t\tfinal IBizLogic bizLogic = factory.getBizLogic(Constants.DEFAULT_BIZ_LOGIC);\r\n \r\n \t\t\t// ************* ForwardTo implementation *************\r\n \t\t\t// forwarded from Specimen page\r\n \t\t\tfinal HashMap forwardToHashMap = (HashMap) request.getAttribute(\"forwardToHashMap\");\r\n \t\t\tString specimenId = null;\r\n \t\t\tString specimenLabel = null;\r\n \t\t\tString specimenClass = null;\r\n \t\t\t// -------------Mandar 04-July-06 QuickEvents start\r\n \t\t\tString fromQuickEvent = (String) request.getAttribute(\"isQuickEvent\");\r\n \t\t\tif (fromQuickEvent == null)\r\n \t\t\t{\r\n \t\t\t\tfromQuickEvent = request.getParameter(\"isQuickEvent\");\r\n \t\t\t}\r\n \t\t\tString eventSelected = \"\";\r\n \t\t\tif (fromQuickEvent != null)\r\n \t\t\t{\r\n \t\t\t\tspecimenId = (String) request.getAttribute(Constants.SPECIMEN_ID);\r\n \t\t\t\teventSelected = (String) request.getAttribute(Constants.EVENT_SELECTED);\r\n \t\t\t\tif (eventSelected == null && forwardToHashMap != null)\r\n \t\t\t\t{\r\n \t\t\t\t\tspecimenClass = (String) forwardToHashMap.get(\"specimenClass\");\r\n \t\t\t\t\tspecimenId = (String) forwardToHashMap.get(\"specimenId\");\r\n \t\t\t\t\tif (specimenClass.equalsIgnoreCase(\"Tissue\"))\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\teventSelected = Constants.EVENT_PARAMETERS[14];\r\n \t\t\t\t\t}\r\n \t\t\t\t\telse if (specimenClass.equalsIgnoreCase(\"Molecular\"))\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\teventSelected = Constants.EVENT_PARAMETERS[9];\r\n \t\t\t\t\t}\r\n \t\t\t\t\telse if (specimenClass.equalsIgnoreCase(\"Cell\"))\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\teventSelected = Constants.EVENT_PARAMETERS[1];\r\n \t\t\t\t\t}\r\n \t\t\t\t\telse if (specimenClass.equalsIgnoreCase(\"Fluid\"))\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\teventSelected = Constants.EVENT_PARAMETERS[7];\r\n \t\t\t\t\t}\r\n \r\n \t\t\t\t}\r\n \t\t\t\trequest.setAttribute(Constants.EVENT_SELECTED, eventSelected);\r\n \t\t\t\t// System.out.println(\"::::::::::::::\\n\\n\\n\\n\"+form.getClass().\r\n \t\t\t\t// getName() );\r\n \t\t\t\tListSpecimenEventParametersForm eventForm = (ListSpecimenEventParametersForm) form;\r\n \t\t\t\tif (eventForm == null)\r\n \t\t\t\t{\r\n \t\t\t\t\teventForm = new ListSpecimenEventParametersForm();\r\n \t\t\t\t}\r\n \t\t\t\teventForm.setSpecimenEventParameter(eventSelected);\r\n \t\t\t\teventForm.setSpecimenId(specimenId.trim());\r\n \r\n \t\t\t}\r\n \t\t\t// -------------Mandar 04-July-06 QuickEvents end\r\n \t\t\tif (forwardToHashMap != null)\r\n \t\t\t{\r\n \t\t\t\t// Fetching SpecimenId from HashMap generated by\r\n \t\t\t\t// ForwardToProcessor\r\n \t\t\t\tspecimenId = (String) forwardToHashMap.get(\"specimenId\");\r\n \t\t\t\tspecimenLabel = (String) forwardToHashMap.get(Constants.SPECIMEN_LABEL);\r\n \t\t\t\tLogger.out.debug(\"SpecimenID found in \" + \"forwardToHashMap========>>>>>>\"\r\n \t\t\t\t\t\t+ specimenId);\r\n \t\t\t}\r\n \t\t\t// ************* ForwardTo implementation *************\r\n \r\n \t\t\t// If new SpecimenEvent is added, specimenId in forwardToHashMap\r\n \t\t\t// will be null, following code handles that case\r\n \t\t\tif (specimenId == null)\r\n \t\t\t{\r\n \t\t\t\tfinal String eventId = request.getParameter(\"eventId\");\r\n \r\n \t\t\t\t// Added by Vijay Pande. While cliking on events tab both\r\n \t\t\t\t// specimenId and eventId are getting null. Since there was no\r\n \t\t\t\t// check on eventId it was throwing error for following retrieve\r\n \t\t\t\t// call.\r\n \t\t\t\t// Null check is added for eventId. Fix for bug Id: 4731\r\n \t\t\t\tif (eventId != null)\r\n \t\t\t\t{\r\n \t\t\t\t\tLogger.out.debug(\"Event ID added===>\" + eventId);\r\n \t\t\t\t\t// Retrieving list of SpecimenEvents for added\r\n \t\t\t\t\t// SpecimenEventId\r\n \t\t\t\t\tfinal Object object = bizLogic.retrieve(\r\n \t\t\t\t\t\t\tSpecimenEventParameters.class.getName(), new Long(eventId));\r\n \r\n \t\t\t\t\tif (object != null)\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\t// Getting object of specimenEventParameters from the\r\n \t\t\t\t\t\t// list of SepcimenEvents\r\n \t\t\t\t\t\tfinal SpecimenEventParameters specimenEventParameters = (SpecimenEventParameters) object;\r\n \r\n \t\t\t\t\t\t// getting SpecimenId of SpecimenEventParameters\r\n \t\t\t\t\t\tfinal AbstractSpecimen specimen = specimenEventParameters.getSpecimen();\r\n \t\t\t\t\t\tspecimenId = specimen.getId().toString();\r\n \t\t\t\t\t\t// specimenLabel = specimen.getLabel();\r\n \t\t\t\t\t\tLogger.out.debug(\"Specimen of Event Added====>\"\r\n \t\t\t\t\t\t\t\t+ (specimenEventParameters.getSpecimen()).getId());\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 (specimenId == null)\r\n \t\t\t{\r\n \t\t\t\tspecimenId = request.getParameter(Constants.SPECIMEN_ID);\r\n \t\t\t\tspecimenLabel = request.getParameter(Constants.SPECIMEN_LABEL);\r\n \t\t\t}\r\n \t\t\tif (specimenId == null)\r\n \t\t\t{\r\n \t\t\t\tspecimenId = (String) request.getAttribute(Constants.SPECIMEN_ID);\r\n \t\t\t}\r\n \r\n \t\t\trequest.setAttribute(Constants.SPECIMEN_ID, specimenId);\r\n \r\n \t\t\tfinal Object object = bizLogic.retrieve(Specimen.class.getName(), new Long(specimenId));\r\n \r\n \t\t\tif (object != null)\r\n \t\t\t{\r\n \t\t\t\tfinal Specimen specimen = (Specimen) object;\r\n \t\t\t\tif (specimenLabel == null)\r\n \t\t\t\t{\r\n \t\t\t\t\tspecimenLabel = specimen.getLabel();\r\n \t\t\t\t}\r\n \t\t\t\t// Setting Specimen Event Parameters' Grid\r\n \r\n \t\t\t\t// Ashish - 4/6/07 --- Since lazy=true, retriving the events\r\n \t\t\t\t// collection.\r\n \t\t\t\tfinal Collection<SpecimenEventParameters> specimenEventCollection = this\r\n \t\t\t\t\t\t.getSpecimenEventParametersColl(specimenId, bizLogic);\r\n \t\t\t\tfinal Collection<ActionApplication> dynamicEventCollection = this\r\n \t\t\t\t\t\t.getDynamicEventColl(specimenId, bizLogic);\r\n \t\t\t\t/**\r\n \t\t\t\t * Name: Chetan Patil Reviewer: Sachin Lale Bug ID: Bug#4180\r\n \t\t\t\t * Patch ID: Bug#4180_1 Description: The values of event\r\n \t\t\t\t * parameter is stored in a Map and in turn the Map is stored in\r\n \t\t\t\t * a List. This is then sorted chronologically, using a date\r\n \t\t\t\t * value form the Map. After sorting the List of Map is\r\n \t\t\t\t * converted into the List of List, which is used on the UI for\r\n \t\t\t\t * displaying values form List on the grid.\r\n \t\t\t\t */\r\n \t\t\t\tif (dynamicEventCollection != null)\r\n \t\t\t\t{\r\n \t\t\t\t\tfinal List<Map<String, Object>> gridData = new ArrayList<Map<String, Object>>();\r\n \r\n \t\t\t\t\tfor (final ActionApplication actionApp : dynamicEventCollection)\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\tfinal Map<String, Object> rowDataMap = new HashMap<String, Object>();\r\n \t\t\t\t\t\tif (actionApp != null)\r\n \t\t\t\t\t\t{\r\n \t\t\t\t\t\t\t//final String[] events = EventsUtil\r\n \t\t\t\t\t\t\t//\t\t.getEvent(eventParameters);\r\n \t\t\t\t\t\t\tlong contId = actionApp.getApplicationRecordEntry().getFormContext()\r\n \t\t\t\t\t\t\t\t\t.getContainerId();\r\n \t\t\t\t\t\t\tList contList = AppUtility\r\n \t\t\t\t\t\t\t\t\t.executeSQLQuery(\"select caption from dyextn_container where identifier=\"\r\n \t\t\t\t\t\t\t\t\t\t\t+ contId);\r\n \t\t\t\t\t\t\tString container = (String) ((List) contList.get(0)).get(0);\r\n \t\t\t\t\t\t\t//final Object container =bizLogic.retrieve(Container.class.getName(),new Long(contId));\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.ID, String.valueOf(actionApp.getId()));\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.EVENT_NAME,\r\n \t\t\t\t\t\t\t\t\tedu.wustl.cab2b.common.util.Utility\r\n \t\t\t\t\t\t\t\t\t\t\t.getFormattedString(container));\r\n \r\n \t\t\t\t\t\t\t// Ashish - 4/6/07 - retrieving User\r\n \t\t\t\t\t\t\t// User user = eventParameters.getUser();\r\n \t\t\t\t\t\t\tfinal User user = this.getUser(actionApp.getId(), bizLogic);\r\n \r\n \t\t\t\t\t\t\trowDataMap.put(Constants.USER_NAME, user.getLastName() + \"&#44; \"\r\n \t\t\t\t\t\t\t\t\t+ user.getFirstName());\r\n \r\n \t\t\t\t\t\t\t// rowDataMap.put(Constants.EVENT_DATE,\r\n \t\t\t\t\t\t\t// Utility.parseDateToString\r\n \t\t\t\t\t\t\t// (eventParameters.getTimestamp(),\r\n \t\t\t\t\t\t\t// Constants.TIMESTAMP_PATTERN)); // Sri: Changed\r\n \t\t\t\t\t\t\t// format for bug #463\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.EVENT_DATE, actionApp.getTimestamp());\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.PAGE_OF, \"pageOfDynamicEvent\");// pageOf\r\n \t\t\t\t\t\t\trowDataMap.put(Constants.SPECIMEN_ID, request\r\n \t\t\t\t\t\t\t\t\t.getAttribute(Constants.SPECIMEN_ID));// pageOf\r\n \t\t\t\t\t\t\tgridData.add(rowDataMap);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \r\n \t\t\t\t\tfinal List<List<String>> gridDataList = this.getSortedGridDataList(gridData);\r\n \t\t\t\t\tfinal String[] columnList1 = Constants.EVENT_PARAMETERS_COLUMNS;\r\n \t\t\t\t\tfinal List<String> columnList = new ArrayList<String>();\r\n \t\t\t\t\tfor (final String element : columnList1)\r\n \t\t\t\t\t{\r\n \t\t\t\t\t\tcolumnList.add(element);\r\n \t\t\t\t\t}\r\n \t\t\t\t\tAppUtility.setGridData(gridDataList, columnList, request);\r\n \t\t\t\t\trequest.setAttribute(\r\n \t\t\t\t\t\t\tedu.wustl.simplequery.global.Constants.SPREADSHEET_DATA_LIST,\r\n \t\t\t\t\t\t\tgridDataList);\r\n \t\t\t\t\tfinal Integer identifierFieldIndex = new Integer(0);\r\n \t\t\t\t\trequest.setAttribute(\"identifierFieldIndex\", identifierFieldIndex.intValue());\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tif (request.getAttribute(Constants.SPECIMEN_LABEL) == null)\r\n \t\t\t{\r\n \t\t\t\trequest.setAttribute(Constants.SPECIMEN_LABEL, specimenLabel);\r\n \t\t\t}\r\n \t\t\trequest.setAttribute(Constants.EVENT_PARAMETERS_LIST, new SOPBizLogic()\r\n \t\t\t\t\t.getAllSOPEventFormNames(dynamicEventMap));\r\n \t\t\trequest.getSession().setAttribute(\"dynamicEventMap\", dynamicEventMap);\r\n \r\n \t\t}\r\n \t\tcatch (final Exception e)\r\n \t\t{\r\n \t\t\tthis.logger.error(e.getMessage(), e);\r\n \t\t}\r\n \t\trequest.setAttribute(Constants.MENU_SELECTED, new String(\"15\"));\r\n \t\tString pageOf = (String) request.getParameter(Constants.PAGE_OF);\r\n \t\tif (pageOf == null)\r\n \t\t\tpageOf = (String) request.getAttribute(Constants.PAGE_OF);\r\n \t\trequest.setAttribute(Constants.PAGE_OF, pageOf);\r\n \r\n \t\tif (pageOf.equals(Constants.PAGE_OF_LIST_SPECIMEN_EVENT_PARAMETERS_CP_QUERY))\r\n \t\t{\r\n \t\t\trequest.getSession().setAttribute(\"CPQuery\", \"CPQuery\");\r\n \t\t}\r\n \t\telse\r\n \t\t{\r\n \t\t\tif (request.getSession().getAttribute(\"CPQuery\") != null)\r\n \t\t\t{\r\n \t\t\t\trequest.getSession().removeAttribute(\"CPQuery\");\r\n \t\t\t}\r\n \t\t}\r\n \t\tLong specimenRecEntryEntityId = null;\r\n \t\ttry\r\n \t\t{\r\n \t\t\tif (CatissueCoreCacheManager.getInstance().getObjectFromCache(\r\n \t\t\t\t\tAnnotationConstants.SPECIMEN_REC_ENTRY_ENTITY_ID) != null)\r\n \t\t\t{\r\n \t\t\t\tspecimenRecEntryEntityId = (Long) CatissueCoreCacheManager.getInstance()\r\n \t\t\t\t\t\t.getObjectFromCache(AnnotationConstants.SPECIMEN_REC_ENTRY_ENTITY_ID);\r\n \t\t\t}\r\n \t\t\telse\r\n \t\t\t{\r\n \t\t\t\tspecimenRecEntryEntityId = AnnotationUtil\r\n \t\t\t\t\t\t.getEntityId(AnnotationConstants.ENTITY_NAME_SPECIMEN_REC_ENTRY);\r\n \t\t\t\tCatissueCoreCacheManager.getInstance().addObjectToCache(\r\n \t\t\t\t\t\tAnnotationConstants.SPECIMEN_REC_ENTRY_ENTITY_ID, specimenRecEntryEntityId);\r\n \t\t\t}\r\n \r\n \t\t}\r\n \t\tcatch (final Exception e)\r\n \t\t{\r\n \t\t\tthis.logger.error(e.getMessage(), e);\r\n \t\t}\r\n \t\t// request.setAttribute(\"specimenEntityId\", specimenEntityId);\r\n \t\trequest.setAttribute(AnnotationConstants.SPECIMEN_REC_ENTRY_ENTITY_ID,\r\n \t\t\t\tspecimenRecEntryEntityId);\r\n \t\treturn mapping.findForward(request.getParameter(Constants.PAGE_OF));\r\n \t}", "public int doEndTag() throws JspException \n\t{\n\t\twrite(FORM_END);\n\t\treturn EVAL_PAGE;\n\t}", "public void submit_intsatpos(View button) {\n }", "@Override\r\n\tprotected String doExecute(ActionForm form, HttpServletRequest request,\r\n\t\t\tHttpServletResponse response, ActionMapping mapping)\r\n\t\t\tthrows Exception {\n\t\treturn null;\r\n\t}", "public void submitorder( ){\r\n\r\n\t\tclass Local {};\r\n\t\tReporter.log(\"TestStepComponent\"+Local.class.getEnclosingMethod().getName());\r\n\t\tReporter.log(\"TestStepInput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepOutput:-\"+\"NA\");\r\n\t\tReporter.log(\"TestStepExpectedResult:- submit order link is clicked entered\");\r\n\t\ttry{\r\n\r\n\t\t\twaitforElementVisible(locator_split(\"submitorder\"));\r\n\t\t\tclick(locator_split(\"submitorder\"));\r\n\t\t\twaitForPageToLoad(20);\r\n\t\t\tSystem.out.println(\"submit link clicked\");\r\n\t\t\tReporter.log(\"PASS_MESSAGE:-submit link clicked \");\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tReporter.log(\"FAIL_MESSAGE:- unable to click submit button\" );\r\n\r\n\t\t}\r\n\t}", "public abstract void onSubmit(String text);", "private void addSubmitListener() {\n\t\tview.addSubmitListener(new SubmitListener());\n\t}", "@POST\n public synchronized void doSubmit(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {\n getACL().checkPermission(getPermission());\n\n MultipartFormDataParser parser = new MultipartFormDataParser(req);\n\n Map<SvnInfo,String> newTags = new HashMap<>();\n\n int i=-1;\n for (SvnInfo e : tags.keySet()) {\n i++;\n if(tags.size()>1 && parser.get(\"tag\"+i)==null)\n continue; // when tags.size()==1, UI won't show the checkbox.\n newTags.put(e,parser.get(\"name\" + i));\n }\n\n String credentialsId = parser.get(\"_.credentialsId\");\n StandardCredentials upc = null;\n if (credentialsId != null) {\n Item context = req.findAncestorObject(Item.class);\n final List<Authentication> authentications = new ArrayList<>(2);\n authentications.add(Jenkins.getAuthentication());\n if (context.hasPermission(Item.CONFIGURE)) { // TODO should this check EXTENDED_READ?\n authentications.add(ACL.SYSTEM);\n }\n for (Authentication a : authentications) {\n upc = CredentialsMatchers.firstOrNull(CredentialsProvider.lookupCredentials(StandardCredentials.class,\n context,\n a,\n Collections.emptyList()),\n CredentialsMatchers.allOf(CredentialsMatchers.withId(credentialsId), CredentialsMatchers.anyOf(\n CredentialsMatchers.instanceOf(StandardUsernamePasswordCredentials.class),\n CredentialsMatchers.instanceOf(StandardCertificateCredentials.class),\n CredentialsMatchers.instanceOf(SSHUserPrivateKey.class)\n )\n )\n );\n if (upc != null) {\n break;\n }\n }\n }\n new TagWorkerThread(newTags,upc,parser.get(\"comment\")).start();\n\n rsp.sendRedirect(\".\");\n }", "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 }", "private void submitForm() {\n final Dialog dialog = new Dialog(context);\n\t\t dialog.setContentView(R.layout.dialogbox);\n\t\t dialog.setTitle(\"Sucess!\");\n\t\t dialog.setCancelable(false);\n\t dialog.setCanceledOnTouchOutside(false);\n\t\t TextView txt = (TextView) dialog.findViewById(R.id.errorlog);\n\t\t txt.setText(\"Registration Successfull.\");\n\t\t Button dialogButton = (Button) dialog.findViewById(R.id.release);\n\t\t dialogButton.setOnClickListener(new OnClickListener() {\n\t\t\t public void onClick(View vd) {\n\t\t\t\t change.setEnabled(true);\n\t\t\t\t dialog.dismiss();\n\t\t\n\t\t}\n\t\t});\n\t\t dialog.show();\n}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\n\t\tPrintWriter out = resp.getWriter();\n\t\tresp.setContentType(\"text/html\");\n\t\tEnumeration<String> parametrNames = req.getParameterNames();\n\n\t\twhile (parametrNames.hasMoreElements()) {\n\t\t\tString parameterName = parametrNames.nextElement();\n\n\t\t\tif (\"subjects\".equals(parameterName)) {\n\t\t\t\tString paramValueArr[] = req.getParameterValues(parameterName);\n\n\t\t\t\tString vals = String.join(\",\", paramValueArr);\n\n\t\t\t\tout.println(\"<b>\" + parameterName + \"</b>--\" + vals + \"<br/>\");\n\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\tString paramValue = req.getParameter(parameterName);\n\n\t\t\tout.println(\"<b>\" + parameterName + \"</b>--\" + paramValue + \"<br/>\");\n\t\t}\n\t\t\n\t\tSimpleDateFormat ft = \n\t\t\t new SimpleDateFormat (\"E yyyy.MM.dd 'at' hh:mm:ss.S a zzz\");\n\t\t\n\t\tout.println(\"<b>Form submitted at: </b>\"+ft.format(new Date()));\n\n\t}", "@Override\n\tprotected String processSubmit(HttpServletRequest req, HttpServletResponse res) throws Exception {\n\t\treturn null;\n\t}", "@WebElementLocator(webDesktop = \"//input[@type='submit']\",webPhone = \"//input[@type='submit']\")\n private static WebElement buttonSubmit() {\n return getDriver().findElement(By.xpath(new WebElementLocatorFactory().getLocator(LoginPage.class, \"buttonSubmit\")));\n }", "private void submitForm() {\n if (!validateName()) {\n return;\n }\n\n if (!validateEmail()) {\n return;\n }\n\n if (!validatePassword()) {\n return;\n }\n\n// Toast.makeText(getApplicationContext(), \"Thank You!\", Toast.LENGTH_SHORT).show();\n}", "private void onClickSignIn(){\n if(checkValidation()){\n //if Validation is ok\n submitForm();\n }\n else{\n //Something went wrong...\n Toast.makeText(LauncherActivity.this, \"Form contains error!\", Toast.LENGTH_LONG).show();\n }\n }", "FormSubmit findFormSubmitFromResponseId( int nIdResponse, Plugin plugin );", "private void submitForm() {\n // Build list params\n List<NameValuePair> list = new ArrayList<>();\n list.add(new BasicNameValuePair(\"tag\", AppConfig.TAG_LOGIN));\n list.add(new BasicNameValuePair(\"username\", editTextLogin.getText().toString()));\n list.add(new BasicNameValuePair(\"password\", editTextPassword.getText().toString()));\n\n ConnectionTask connectionTask = new ConnectionTask(this, list);\n connectionTask.execute();\n }", "@Override\n\tpublic ActionForward doExecute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception {\n\t\tString action = request.getParameter(\"action1\");\n\t\tif (action == null) action = LIST;\n\t\tif (log.isDebugEnabled()) log.debug(\"action:\" + action);\n\t\tActionForward forward = null;\n\t\tUserDefinedQueryForm theForm = (UserDefinedQueryForm) form;\n\t\ttry {\n\t\t\tif (LIST.equalsIgnoreCase(action)) forward = listAdvanceBacth(mapping, theForm, request, response); // 打开复杂查询列表页面\n\t\t\telse if (\"LISTSIMPLE\".equalsIgnoreCase(action)) forward = listSimpleBacth(mapping, theForm, request, response); // 打开简单查询列表页面\n\t\t\telse if (\"SHOWQUERY\".equalsIgnoreCase(action)) forward = queryAdvance(mapping, theForm, request, response);\n\t\t\telse if (\"SHOWSIMPLE\".equalsIgnoreCase(action)) forward = querySimple(mapping, theForm, request, response);\n\t\t\telse if (\"VALID\".equalsIgnoreCase(action)) forward = validate(mapping, theForm, request, response);\n\t\t\telse if (\"PREVIEWSQL\".equalsIgnoreCase(action)) forward = getSQLForPreview(mapping, theForm, request, response);\n\t\t\telse if (\"VALIDSIMPLE\".equalsIgnoreCase(action)) forward = validateSimple(mapping, theForm, request, response);\n\t\t\telse if (\"ADVANCEOVERVIEW\".equalsIgnoreCase(action)) forward = queryAdvanceOverview(mapping, theForm, request, response);\n\t\t\telse if (\"SIMPLEOVERVIEW\".equalsIgnoreCase(action)) forward = querySimpleOverview(mapping, theForm, request, response);\n\t\t\telse if (\"SAVERESULT\".equalsIgnoreCase(action)) forward = saveResult(mapping, theForm, request, response);\n\t\t\telse if (\"SHOWEXPORTEXCEL\".equalsIgnoreCase(action)) forward = showExportExcel(mapping, theForm, request, response);\n\t\t\telse if (\"EXPORTEXCEL\".equalsIgnoreCase(action)) forward = exportExcel(mapping, theForm, request, response);\n\t\t\telse {\n\t\t\t\trequest.setAttribute(\"err\", new WebException(\"找不到该action方法:\" + action));\n\t\t\t\tforward = mapping.findForward(ERROR);// 找不到合适的action\n\t\t\t}\n\n\t\t\t// else if(\"SAVEPARAM\".equalsIgnoreCase(action))\n\t\t\t// forward=saveQueryParam(mapping, theForm, request, response);\n\t\t\t// //保存查询条件到个人空间\n\t\t}\n\t\tcatch (Exception e) {// 其他系统出错\n\t\t\trequest.setAttribute(\"err\", e);\n\t\t\tforward = mapping.findForward(ERROR);\n\t\t}\n\t\treturn forward;\n\t}", "default T submitted() {\n\t\treturn null;\n\t}", "public void setSubmit(String submit) {\n this.submit = submit;\n }", "public Page submitForm(HtmlPage page, String formName) throws Exception {\n HtmlForm form = page.getFormByName(formName);\n return this.submit(form);\n }", "public Page submitForm(HtmlPage page, String formName) throws Exception {\n HtmlForm form = page.getFormByName(formName);\n return this.submit(form);\n }", "public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)\r\n {\r\n super.processFormRequest(pageContext, webBean);\r\n }" ]
[ "0.62268746", "0.620842", "0.61730975", "0.60581434", "0.6056579", "0.60513455", "0.5917207", "0.5915395", "0.5880971", "0.5870653", "0.5829244", "0.57977176", "0.57242763", "0.5681519", "0.56622213", "0.5596626", "0.55583555", "0.5552459", "0.555244", "0.5535296", "0.5532861", "0.5532334", "0.55308324", "0.5497692", "0.54728395", "0.54579985", "0.5457638", "0.54572654", "0.54354155", "0.53512555", "0.5346933", "0.53458697", "0.5334712", "0.5331777", "0.5331546", "0.53314954", "0.5302279", "0.528229", "0.5268278", "0.5261399", "0.5254811", "0.5244869", "0.5225609", "0.5214411", "0.5196084", "0.5181986", "0.517711", "0.51674736", "0.51505136", "0.51483", "0.51421106", "0.5136419", "0.513201", "0.51209784", "0.5107826", "0.51056445", "0.50909525", "0.5079245", "0.5075685", "0.50740194", "0.506972", "0.506326", "0.5055035", "0.5044329", "0.50398284", "0.50392455", "0.5031156", "0.50306773", "0.50300246", "0.5029702", "0.5028971", "0.50285566", "0.502733", "0.5011769", "0.5011769", "0.5010633", "0.50012314", "0.49988464", "0.49932644", "0.49931088", "0.49804392", "0.49775925", "0.49650833", "0.495975", "0.49527118", "0.49517485", "0.49298072", "0.49282116", "0.4927916", "0.4909903", "0.49046615", "0.49023613", "0.48852447", "0.4884123", "0.48798725", "0.48742107", "0.48688525", "0.48576683", "0.48501295", "0.48501295", "0.48485112" ]
0.0
-1
TODO Autogenerated method stub
@Override public int getCustomerIdCustomerDistribution(int CostomerorId) { List<?> resultList = null; String sql1= "SELECT DISTINCT company_id FROM companiesusers where user_id='"+CostomerorId+"'"; resultList= dao.executeSQLQuery(sql1); Object l = resultList.get(0); int Customer_ID = Integer.valueOf(String.valueOf(l)); return Customer_ID; }
{ "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
Constructor that initializes all the fields of interest.
public AcronymData( String sf, List< AcronymExpansion > lfs ) { super(); this.sf = sf; this.lfs = lfs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void initializeFields() {\n\n\t}", "@Override public void init()\n\t\t{\n\t\t}", "private void init() {\n FieldWrapper id = new FieldWrapper();\n id.fieldDescription = new HashMap<String, Object>();\n id.fieldDescription.put(\"fullName\", \"Id\");\n id.fieldDescription.put(\"type\", \"Text\");\n\n FieldWrapper name = new FieldWrapper();\n name.fieldDescription = new HashMap<String, Object>();\n name.fieldDescription.put(\"fullName\", \"Name\");\n\n FieldWrapper createdBy = new FieldWrapper();\n createdBy.fieldDescription = new HashMap<String, Object>();\n createdBy.fieldDescription.put(\"fullName\", \"CreatedBy\");\n createdBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper lastModifiedBy = new FieldWrapper();\n lastModifiedBy.fieldDescription = new HashMap<String, Object>();\n lastModifiedBy.fieldDescription.put(\"fullName\", \"LastModifiedBy\");\n lastModifiedBy.fieldDescription.put(\"type\", \"Lookup\");\n\n FieldWrapper owner = new FieldWrapper();\n owner.fieldDescription = new HashMap<String, Object>();\n owner.fieldDescription.put(\"fullName\", \"Owner\");\n owner.fieldDescription.put(\"type\", \"Lookup\");\n\n fieldDescribe = new HashMap<String, FieldWrapper>();\n\n fieldDescribe.put((String) id.fieldDescription.get(\"fullName\"), id);\n fieldDescribe.put((String) name.fieldDescription.get(\"fullName\"), name);\n fieldDescribe.put((String) createdBy.fieldDescription.get(\"fullName\"), createdBy);\n fieldDescribe.put((String) lastModifiedBy.fieldDescription.get(\"fullName\"), lastModifiedBy);\n fieldDescribe.put((String) owner.fieldDescription.get(\"fullName\"), owner);\n }", "Constructor() {\r\n\t\t \r\n\t }", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private TigerData() {\n initFields();\n }", "public void init() {\n \n }", "public void init() {\r\n\t\t// to override\r\n\t}", "public void initialize()\n {\n }", "protected void init() {\n super.init();\n uriExpr = null;\n uri = null;\n nameExpr = null;\n name = null;\n qname = null;\n attrExpr = null;\n attr = null;\n emptyExpr = null;\n empty = false;\n }", "@Override\n protected void init() {\n }", "@Override\n public void init() {\n }", "protected void initialize() {\n \t\n }", "@objid (\"4bb3363c-38e1-48f1-9894-6dceea1f8d66\")\n public void init() {\n }", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "public void init() {\n\t\t}", "public Constructor(){\n\t\t\n\t}", "private Request() {\n initFields();\n }", "private void initialize()\n {\n aggregatedFields = new Fields(fieldToAggregator.keySet());\n }", "public Field() {\r\n\t}", "@Override\n public void init() {}", "protected void initialize() {}", "protected void initialize() {}", "protected void init() {\n // to override and use this method\n }", "@Override\n\tpublic void init()\n\t{\n\n\t}", "protected void init() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "public void initialize() {\n\n fechaDeLaVisita.set(LocalDate.now());\n\n if (medico.get() != null) {\n medico.get().clear();\n } else {\n medico.set(new Medico());\n }\n\n turnoVisita.set(\"\");\n visitaAcompanadaSN.set(false);\n lugarVisita.set(\"\");\n if (causa.get() != null) {\n causa.get().clear();\n } else {\n causa.set(new Causa());\n }\n\n if (promocion.get() != null) {\n promocion.get().clear();\n } else {\n promocion.set(new Promocion());\n }\n\n observacion.set(\"\");\n persistida.set(false);\n persistidoGraf.set(MaterialDesignIcon.SYNC_PROBLEM.graphic());\n\n fechaCreacion.set(LocalDateTime.now());\n\n }", "private void initFields() {\n\n tipPercent = 0.0;\n noPersons = 1;\n totalPay = 0.0;\n totalTip = 0.0;\n totalPerPerson = 0.0;\n\n }", "private void init() {\n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private FundInfo() {\n initFields();\n }", "public FieldScrapper() \r\n {\r\n }", "public void init() {\r\n\r\n\t}", "@Override\n public void init() {\n\n super.init();\n\n }", "@Override\n public void init() {\n }", "protected void init() {\n setUUIDString();\n setNoteCreatedAt();\n setNoteUpdatedAt();\n setCreator(ParseUser.getCurrentUser());\n addAuthor(ParseUser.getCurrentUser());\n setACL(new ParseACL(ParseUser.getCurrentUser()));\n }", "private void init() {\n\n\t}", "public void initialize() {\n // empty for now\n }", "public void initialize(){\n\t\t//TODO: put initialization code here\n\t\tsuper.initialize();\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}", "public InitialData(){}", "@Override\n public void initialize() {\n \n }", "@Override\n\t\tprotected void initialise() {\n\n\t\t}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n public void initialize() {\n }", "@Override\n\tpublic void init() {\n\t}", "@Override\n void init() {\n }", "@Override\r\n\tprotected void init() {\n\t\tupdateValues();\r\n\t}", "protected void initialize() {\r\n }", "protected void initialize() {\r\n }", "public void init() {\n\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "protected void init() {\n\t}", "protected void init() {\n\t}", "public void init() {\n }", "public void init() {\n }", "public void init() {\n }", "public void init() {\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "public void init() {\n\t\t\n\t}", "public AirField() {\n\n\t}", "public Field(){\n\n // this(\"\",\"\",\"\",\"\",\"\");\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }" ]
[ "0.7349124", "0.73166907", "0.725653", "0.72478336", "0.7219402", "0.7206356", "0.7148521", "0.710388", "0.70930225", "0.7041319", "0.70057225", "0.69995844", "0.69920874", "0.6990103", "0.6988649", "0.6984672", "0.6984489", "0.69724894", "0.69724894", "0.69724894", "0.69661784", "0.69658595", "0.6965832", "0.69508576", "0.69442284", "0.6919209", "0.68989426", "0.68989426", "0.6886981", "0.6881653", "0.68784016", "0.68742687", "0.68738014", "0.686539", "0.68521506", "0.6847636", "0.6847636", "0.6847636", "0.6844899", "0.6844899", "0.6844899", "0.6844899", "0.6842235", "0.6841924", "0.6813223", "0.6812218", "0.68094254", "0.6808683", "0.6801761", "0.6800269", "0.67948395", "0.67941856", "0.67941856", "0.67941856", "0.67941856", "0.67941856", "0.6787237", "0.67862815", "0.67862236", "0.67854756", "0.67854756", "0.67854756", "0.67807573", "0.67807573", "0.67807573", "0.6776164", "0.67611974", "0.6751034", "0.6748908", "0.6748908", "0.67392987", "0.6734728", "0.6734728", "0.67278063", "0.67278063", "0.672486", "0.672486", "0.672486", "0.672486", "0.6717538", "0.6713739", "0.6705422", "0.6704113", "0.6702423", "0.6702423", "0.6702423", "0.6702423", "0.6702423", "0.6702423", "0.6702423", "0.6702423", "0.6702423", "0.6702423", "0.6702423", "0.6702423", "0.6702423", "0.6702423", "0.6702423", "0.6702423", "0.6702423", "0.6702423" ]
0.0
-1
Constructor that initialises an AcronymExpansion object from its parameters.
public AcronymExpansion( String lf, int freq, int since ) { this.lf = lf; this.freq = freq; this.since = since; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public\n AcronymData( String sf, List< AcronymExpansion > lfs )\n {\n super();\n\n this.sf = sf;\n this.lfs = lfs;\n }", "private VersionExpansionParser(String expansion) {\n\n this.expansionString = expansion;\n\n }", "void setAcronym(String v) {\n if (v == null) {\n throw new IllegalArgumentException(\"Acronym is missing\");\n }\n acronym = v;\n }", "public Abbreviations() {\n this.abbreviations = new HashMap<>();\n }", "private BUR(final String name, final String desc, final String acronym)\r\n {\r\n super(name, desc, acronym);\r\n }", "public String getAcronym();", "Alphabet() {\n this(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\");\n }", "Alphabet() {\n this(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\");\n }", "Alphabet() {\n this(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\");\n }", "public Almacen(){}", "public Armor(String _name){\n super();\n // sets owner = _owner\n // sets posX = _posX\n // sets posY = _posY\n // sets itemIntValue = _itemIntValue\n name = _name; \n }", "public String getAcronym() {\n return acronym;\n }", "AlphabetNameReference createAlphabetNameReference();", "public void extracAcronyms() {\n\t\tExtractAbbrev extractAbbrv = new ExtractAbbrev();\n\t\tthis.abbreviations = extractAbbrv.extractAbbrPairs(this.supportDocument);\t\t\t\n\t\t\n\t\tboolean acronym = true;\n\t\t\n\t\tfor (int j = 0; j < this.name.length(); j++) {\n\t\t\tif (Character.isLowerCase(this.name.charAt(j))) {\n\t\t\t\tacronym = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (acronym) {\n\t\t\t for (Abbreviations abbreviation : this.abbreviations) {\t\t\t\t\t\n\t\t\t\tif (abbreviation.getShortForm().equalsIgnoreCase(this.name)) {\n\t\t\t\t\tthis.alternative_names.add(abbreviation.getLongForm());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public Argonian()\n\t{\n\t\tthis.race = \"Argonian\";\n\t}", "private void initialiseAcronymList(ArrayList<String> pAcronymList) {\n\t\tthis.acronymList = new HashSet<String>(pAcronymList);\t\t\n\t}", "public Astromech(String name1, int hp) {\r\n\t\tsuper(name1, hp, 1);\r\n\r\n\t}", "public Alien(String name, String planet) {\n this(name, rnd.nextDouble() * 500, rnd.nextInt(26), planet);\n }", "public Publication(String title, int year)\n {\n // this is the constructor that iniates the variables \n name = title;\n yr = year;\n }", "public Absence() {\n this(DSL.name(\"Absence\"), null);\n }", "public Definition(String declaredName, PhotranTokenRef tokenRef, Classification classification, Visibility visibility, Type type)\n {\n this.classification = classification;\n \tthis.tokenRef = tokenRef;\n \tthis.declaredName = declaredName;\n \tthis.canonicalizedName = canonicalize(declaredName);\n this.visibility = visibility; //Visibility.INHERIT_FROM_SCOPE;\n this.type = type;\n this.arraySpec = null;\n }", "public Achterbahn() {\n }", "public Construct() {\n\tprefixes = new StringBuilder();\n\tvariables = new StringBuilder();\n\twheres = new StringBuilder();\n }", "public CitronellaAnt(){\n\t\tsuper(\"Citronella Ant\", AntCost.CITRONELLA_ANT);\n\t\tsuper.setLife(20);\n\t}", "public Skill(String skillName, double skillDamage, int skillManaCost, double skillHeal){\n name = skillName;\n damage = skillDamage;\n manaCost = skillManaCost;\n heal = skillHeal;\n//sets up skills to return as their name.\n }", "public Archer(String archerName) {\n\tname = archerName;\n\thealth = 100;\n\tstrength = 100;\n\tdefense = 20;\n\tattack = 2.5;\n }", "private ARXOrderedString(){\r\n this(\"Default\");\r\n }", "public Attraction(String englishName, String pinyinName, String admissionFees,\n String operatingHours, String attractionWebsite, String englishAddress,\n String pinyinAddress, String englishDescription) {\n mEnglishName = englishName;\n mPinyinName = pinyinName;\n\n mAdmissionFees = admissionFees;\n mOperatingHours = operatingHours;\n mAttractionWebsite = attractionWebsite;\n\n mEnglishAddress = englishAddress;\n mPinyinAddress = pinyinAddress;\n\n mEnglishDescription = englishDescription;\n\n }", "protected Persona (String nombre,String apellido, String fechaNac){\r\n this.nombre = nombre;\r\n this.apellido = apellido;\r\n this.fechaNac = fechaNac;\r\n }", "public EmployeeLookup() {\r\n\t\tfill();\r\n\t\tinitialize();\r\n\t\t//AutoCompleteDecorator.decorate(el);\r\n\t}", "public Bazooka() throws IllegalNameException {\r\n\t}", "private AutoCompleteGalRequest() {\n this((String) null);\n }", "public Aliases( ) {\n\t}", "public Terms() {}", "public ExamMB() {\n }", "public Athlete()\r\n{\r\n this.def = \"An athlete is said to be running when he/she is accelerating in a certain direction during which his legs and the rest of his body are moving\";\r\n}", "public NamedEntity() { this(\"\", \"\"); }", "private AcquisitionParameters(ControlVocabularyManager cvManager) {\n\t\tsuper(cvManager);\n\t\tString[] parentAccessionsTMP = { \"MS:1000441\", \"MS:1000480\", \"MS:1000487\", \"MS:1000481\",\n\t\t\t\t\"MS:1000027\", \"MS:1000482\", ACQUISITION_PARAMETER_ACCESSION };\n\t\tthis.parentAccessions = parentAccessionsTMP;\n\t\tString[] explicitAccessionsTMP = { \"MS:1000032\" };\n\t\tthis.explicitAccessions = explicitAccessionsTMP;\n\n\t}", "public Asiento() {\n\t\tthis(\"asiento\", null);\n\t}", "private Glossary() {\n\n }", "public Autocomplete(Term[] terms)\n {\n this.terms = terms;\n Arrays.sort(terms); //uses Term.compareTo(that) -- Comparable\n // for all other classes, the terms is already sorted lexicographically\n\n }", "public EasytaxTaxations() {\n this(\"easytax_taxations\", null);\n }", "AExpArgs createAExpArgs();", "public Artista(String nombreArtista) {\n this.nombreArtista = nombreArtista;\n }", "private Sequence() {\n this(\"<Sequence>\", null, null);\n }", "public Aanbieder() {\r\n\t\t}", "public Aritmetica(){ }", "public Aso() {\n\t\tName = \"Aso\";\n\t\ttartossag = 3;\n\t}", "public EmpName() {\n\t\tsuper(\"Aditi\",\"Tyagi\");\n\t\t//this(10);\n\t\tSystem.out.println(\"Employee name is Vipin\");\n\t\t\n\t}", "public Absence(Name alias) {\n this(alias, ABSENCE);\n }", "Sorcerer (String cName){\n name = cName;\n hp = 20;\n mana = 100; \n strength = 2;\n vitality = 4;\n energy = 10;\n }", "public DeptAwardsTransAMImpl() {\n }", "public Sequence(String title) { this(title, new Vector<Step>(), \"\"); }", "public AccessSqlParser ()\n\t{\n\t}", "public LocaleAieon( String name ) \r\n\t{\r\n\t\tsuper( name, S_LOCALE );\r\n\t\tLocale locale = Locale.getDefault();\r\n\t\tsuper.set( S_LOCALE, locale.getLanguage() );\r\n\t\tsuper.set( Attributes.COUNTRY.name(), locale.getCountry() );\r\n\t\tsuper.set( Attributes.VARIANT.name(), locale.getVariant() );\r\n\t}", "public QLearnAgent() {\n\t\tthis(name);\t\n\t}", "public NamedEntity(String name, String abbrev) {\n this.name= name;\n this.abbrev = abbrev;\n }", "public static void constructor1_name_initialize()\r\n\t{\r\n\t\tString name = \"Dennis\";\r\n\t\tString college = \"Red River College\";\r\n\t\tdouble standardAptitudeTestScore = 222;\r\n\t\tdouble gradePointAverage = 2.2;\r\n\r\n\t\tUndergraduateApplicant target = new UndergraduateApplicant(name, college, standardAptitudeTestScore, gradePointAverage);\r\n\r\n\t\tString expected = name;\r\n\t\tString actual = target.getName();\r\n\r\n\t\tSystem.out.printf(\"Expected: %s%nActual: %s%n%n\", expected, actual);\r\n\t}", "public CampLease( ) {}", "public Kitten(String s, int a)\n {\n // initialise instance variables\n super(s, a);\n }", "public AI(String n) {//constructor for super class\n super(n);\n }", "public Employee(String Name) {\r\n this.Name = Name;\r\n }", "public NFA() {\n\t\tstates = new TreeSet<NFAState>();\n\t\tabc = new TreeSet<Character>();\n\t}", "public Artist(String firstName, String lastName, Date firstRelease) {\n this.firstName = firstName;\n this.lastName = lastName;\n this.firstRelease = firstRelease;\n }", "public AssassinNode(String name) \r\n {\r\n this(name, null);\r\n }", "public Mannschaft() {\n }", "public Employee(String nama, int usia) {\r\n // Constructor digunakan untuk inisialisasi value, yang di inisiate saat melakukan instantiation\r\n this.nama = nama;\r\n this.usia = usia;\r\n }", "private Instantiation(){}", "public Manager(String name, LocalDate dateOfBirth, String nationality,\n\t\t\tString tactics) throws NullPointerException, IllegalArgumentException {\n\t\tsuper(name, dateOfBirth, nationality);\n\t\tif (tactics == null) {\n\t\t\tthrow new NullPointerException(\"Tactics must not be null!\");\n\t\t}\n\t\tif (tactics.isBlank()) {\n\t\t\tthrow new IllegalArgumentException(\"Tactics must not be an empty string!\");\n\t\t}\n\t\t\n\t\tthis.tactics = tactics;\n\t}", "public Alphabet()\n {\n \tthis.growing = true;\n this.map = new TObjectIntHashMap<T>();\n this.entries = new ArrayList<T>();\n }", "public GradeBook2( String name )\n {\n courseName = name; // initializes courseName\n }", "public DessertItem() {\n this(\"\");\n }", "public Hazmat() {\n }", "public Program3 (String empName) {\r\n\t\tname = empName;\r\n\t}", "public ParseAce_old ()\n{\n initialize ();\n}", "public Autocomplete(Term[] terms) {\r\n if (terms == null) {\r\n throw new java.lang.NullPointerException();\r\n }\r\n this.queries = terms;\r\n Arrays.sort(queries);\r\n }", "public Employee()\n\t{\n\t\tthis(\"(2)Invoke Employee's overload constructor\");\n\t\tSystem.out.println(\"(3)Employee's no-arg constructor is invoked\");\n\t}", "public Championship() {\n }", "@FunctionalInterface\n private interface AbilityConstructor<A extends Ability> {\n /**\n * Creates a new ability instance from the given values.\n */\n A create(\n String name,\n AbilityType abilityType,\n int level,\n int manaCost,\n ExpandableCloud effectCloud,\n boolean canBeCloudBoosted,\n int castDist,\n List<Class<? extends Unit>> affectedUnitTypes,\n boolean appliesToAllied,\n boolean appliesToFoe,\n String description,\n List<AbilityEffect> effects);\n }", "@Override\r\n\tpublic char getAcronym() {\r\n\t\treturn 'M';\r\n\t}", "public NameParser()\n {\n this(null);\n }", "public Employee(){\r\n this(\"\", \"\", \"\", 0, \"\", 0.0);\r\n }", "public Alphabet(Alphabet o) {\n slexic = new HashMap<String, Integer>(o.slexic);\n slexicinv = new ArrayList<String>(o.slexicinv);\n spair = new HashMap<IntegerPair, Integer>(o.spair);\n spairinv = new ArrayList<IntegerPair>(o.spairinv);\n \t cast00 = cast(0, 0);\n Alphabet.debuggingInstance = this;\n }", "public AssassinManager(List<String> names) {\n if (names == null || names.size() == 0) {\n throw new IllegalArgumentException();\n }\n for (int i = names.size() - 1; i >= 0; i--) {\n poolFront = new AssassinNode(names.get(i), poolFront);\n }\n gYardFront = null;\n }", "public AssignmentCategory(String ac) {\n categoryName = ac;\n }", "public Meny(String title){\n \tthis.title = title;\n }", "public NAFReader() {\n super(\"Hamamatsu Aquacosmos\", \"naf\");\n domains = new String[] {FormatTools.LM_DOMAIN};\n }", "public Articulo(int num,String des) \n\t{\n\t\tnumero_articulo=num;\n\t\tdescripcion=des;\n\t\t\n\t}", "public Army(int i,String a){\n\t\tswitch(a){\n\t\t\tcase(\"Soldier\"):\t\t\n\t\t\t\tfor(int n=0;n<i;n++)\n\t\t\t\t\tarmy.add(new Soldier());\n\t\t\t\tbreak;\n\t\t\tcase(\"Goblin\"):\n\t\t\t\tfor(int n=0;n<i;n++)\n\t\t\t\t\tarmy.add(new Goblin());\n\t\t\t\tbreak;\n\t\t\tcase(\"Orc\"):\n\t\t\t\tfor(int n=0;n<i;n++)\n\t\t\t\t\tarmy.add(new Orc());\n\t\t\t\tbreak;\n\t\t\tcase(\"Ogre\"):\n\t\t\t\tfor(int n=0;n<i;n++)\n\t\t\t\t\tarmy.add(new Ogre());\n\t\t\t\tbreak;\n\t\t\tcase(\"Greenskins\"):\n\t\t\t\tfor(int n=0;n<5;n++)\n\t\t\t\t\tarmy.add(new Ogre());\n\t\t\t\tfor(int n=0;n<20;n++)\n\t\t\t\t\tarmy.add(new Orc());\n\t\t\t\tfor(int n=0;n<75;n++)\n\t\t\t\t\tarmy.add(new Goblin());\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tfor(int n=0;n<i;n++)\n\t\t\t\t\tarmy.add(new Soldier());\n\t\t\t\tbreak;\n\t\t}\n\t}", "public SeqArg(Argument a1, Argument a2){\n this.a1 = a1;\n this.a2 = a2;\n }", "public AirlineCompany() {\n\t}", "public Skill() {\n\t\tsuper();\n\t}", "public Ani(Object theTarget, float theDuration, float theDelay, String theFieldName, float theEnd, Easing theEasing) {\n\t\tsuper(papplet(), defaultAutostartMode, theTarget, theDuration, theDelay, theFieldName, theEnd, theEasing, defaultTimeMode, theTarget, defaultCallback);\n\t}", "public AceDocument (String textFileName, String APFfileName) {\n\t\ttry {\n\t\t// initialize APF reader\n\t\tif (builder == null) {\n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\t\t\tfactory.setValidating(false);\n\t\t\tbuilder = factory.newDocumentBuilder();\n\t\t\t}\n\t\t\tanalyzeDocument (textFileName, APFfileName);\n\t\t} catch (SAXException e) {\n\t\t\tSystem.err.println (\"AceDocument: Exception in initializing APF reader: \" + e);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println (\"AceDocument: Exception in initializing APF reader: \" + e);\n\t\t} catch (ParserConfigurationException e) {\n\t\t\tSystem.err.println (\"AceDocument: Exception in initializing APF reader: \" + e);\n\t\t}\n\t}", "public aed(World paramaqu)\r\n/* 9: */ {\r\n/* 10: 24 */ super(paramaqu);\r\n/* 11: */ }", "public Parameters() {\n\t}", "ClassAcft initClassAcft(ClassAcft iClassAcft)\n {\n iClassAcft.updateElementValue(\"ClassAcft\");\n return iClassAcft;\n }", "public Skill() {\n shortName = new SimpleStringProperty(\"\");\n description = new SimpleStringProperty(\"\");\n }", "public CapitalAccount(\n \t\t\tIObjectKey objectKey, \n \t\t\tMap extensions, \n \t\t\tIObjectKey parent,\n \t\t\tString name,\n \t\t\tIListManager subAccounts,\n \t\t\tString abbreviation,\n \t\t\tString comment) {\n \t\tsuper(objectKey, extensions, parent, name, subAccounts);\n \t\t\n this.abbreviation = abbreviation;\n this.comment = comment;\n \t}", "public Employee(String inName, double inSalary)\n\t{\n\t\tname = inName;\n\t\tsalary = inSalary;\n\t}" ]
[ "0.65859956", "0.60644424", "0.5837043", "0.5712467", "0.5696095", "0.55140215", "0.54177946", "0.54177946", "0.54177946", "0.5397571", "0.53642434", "0.53522646", "0.532392", "0.52770525", "0.5235553", "0.52306294", "0.516207", "0.50914985", "0.5078045", "0.50579137", "0.50565344", "0.50348127", "0.5019946", "0.49976414", "0.49885622", "0.49873936", "0.49636498", "0.49559048", "0.49555036", "0.49416363", "0.49305624", "0.49282563", "0.49212942", "0.4919028", "0.49126884", "0.4910661", "0.4910567", "0.4900457", "0.48995262", "0.4888289", "0.4884179", "0.48680246", "0.48627397", "0.48604083", "0.48509693", "0.48481774", "0.4844219", "0.4842581", "0.48168567", "0.4796728", "0.4783796", "0.47806504", "0.47749907", "0.47579947", "0.47527075", "0.4750202", "0.47459224", "0.47372773", "0.47333032", "0.4728476", "0.47262496", "0.4723315", "0.47222883", "0.47208664", "0.47179013", "0.47146803", "0.47116065", "0.47059923", "0.47022814", "0.46981078", "0.46892455", "0.46827835", "0.468055", "0.4673485", "0.46698192", "0.4668514", "0.4665622", "0.46639287", "0.46593446", "0.4659217", "0.46539018", "0.4649891", "0.46439746", "0.46430087", "0.46354687", "0.46251902", "0.46218586", "0.46111932", "0.4607714", "0.46069765", "0.46067643", "0.46048313", "0.46032122", "0.45831463", "0.45820197", "0.45757854", "0.45721114", "0.45682934", "0.45663124", "0.4565587" ]
0.64781064
1
/ Getters and setters to access AcronymExpansion.
public String getLf() { return lf; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getAcronym() {\n return acronym;\n }", "public String getAcronym();", "void setAcronym(String v) {\n if (v == null) {\n throw new IllegalArgumentException(\"Acronym is missing\");\n }\n acronym = v;\n }", "@Override\r\n\tpublic char getAcronym() {\r\n\t\treturn 'M';\r\n\t}", "public void extracAcronyms() {\n\t\tExtractAbbrev extractAbbrv = new ExtractAbbrev();\n\t\tthis.abbreviations = extractAbbrv.extractAbbrPairs(this.supportDocument);\t\t\t\n\t\t\n\t\tboolean acronym = true;\n\t\t\n\t\tfor (int j = 0; j < this.name.length(); j++) {\n\t\t\tif (Character.isLowerCase(this.name.charAt(j))) {\n\t\t\t\tacronym = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (acronym) {\n\t\t\t for (Abbreviations abbreviation : this.abbreviations) {\t\t\t\t\t\n\t\t\t\tif (abbreviation.getShortForm().equalsIgnoreCase(this.name)) {\n\t\t\t\t\tthis.alternative_names.add(abbreviation.getLongForm());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public AcronymTagger getAcronymTagger() {\n return acronymTagger;\n }", "public\n AcronymExpansion( String lf,\n int freq,\n int since )\n {\n this.lf = lf;\n this.freq = freq;\n this.since = since;\n }", "public\n AcronymData( String sf, List< AcronymExpansion > lfs )\n {\n super();\n\n this.sf = sf;\n this.lfs = lfs;\n }", "public Abbreviations() {\n this.abbreviations = new HashMap<>();\n }", "public String getPatronymic() {\n return patronymic;\n }", "public String getAbbreviation() {\n\t\treturn abbreviation;\n\t}", "AlphabetNameReference createAlphabetNameReference();", "public String acronym(String phrase) {\n /*StringBuilder acronymFeed = new StringBuilder(\"\");\n String wordHolder = \"\";\n int spaceIndex;\n char firstLetter;\n do{\n spaceIndex = phrase.indexOf(\" \");\n wordHolder = phrase.substring(0,spaceIndex);\n acronymFeed.append(wordHolder.charAt(0));\n phrase = phrase.replaceFirst(wordHolder, \"\");\n } while (spaceIndex != -1 && wordHolder != \"\" && phrase != \"\");\n \n \n \n \n \n String acronymResult = acronymFeed.toString().toUpperCase();\n return acronymResult;\n */\n \n char[] letters = phrase.toCharArray();\n String firstLetters = \"\";\n firstLetters += String.valueOf(letters[0]);\n for (int i = 1; i < phrase.length();i++){\n if (letters[i-1] == ' '){\n firstLetters += String.valueOf(letters[i]);\n }\n }\n firstLetters = firstLetters.toUpperCase();\n return firstLetters;\n }", "String getAbbr();", "public String acronym(String phrase) {\n\t\t\n\t\t//Initialize a character array with length equal to the input string\n\t\t//Convert the input string into array format\n\t\tchar[] phraseArray = new char[phrase.length()]; \t\n\t\tphraseArray = phrase.toCharArray(); \n\t\t\n\t\t//Initialize the string for the acronym\n\t\t//Append the first character of the phrase to our acronym\n\t\tString acronym = \"\"; \n\t\tacronym = acronym + phraseArray[0]; \t\n\t\t\n\t\t//Parse the phrase array\n\t\t//Checks for spaces or dashes\n\t\t//Append the character after a space or dash, capitalized\n\t\tfor(int i = 1; i < phrase.length(); i++) {\t\t\n\t\t\tif(phraseArray[i] == ' ' || phraseArray[i] == '-') {\t\n\t\t\t\tacronym = acronym + Character.toUpperCase(phraseArray[i+1]);\n\t\t\t}\n\t\t}\n\t\treturn acronym;\n\t}", "@Override\r\n\tpublic String toString() {\r\n\t\treturn abbrv;\r\n\t}", "public String acronym(String phrase) {\n\t\t// TODO Write an implementation for this method declaration\n\t\tString acronymString = \"\";\n\t\tfor(int i = 0; i < phrase.length(); i++) {\n\t\t\tif(i == 0) {\n\t\t\t\tif(Character.isUpperCase(phrase.charAt(i))) {\n\t\t\t\t\tacronymString = acronymString + phrase.charAt(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(i > 0){\n\t\t\t\tif(Character.isUpperCase(phrase.charAt(i)) && phrase.charAt(i-1) == ' ') {\n\t\t\t\t\tacronymString = acronymString + phrase.charAt(i);\n\t\t\t\t}\n\t\t\t\telse if(Character.isLowerCase(phrase.charAt(i)) && phrase.charAt(i-1) == ' ') {\n\t\t\t\t\tacronymString = acronymString + Character.toUpperCase(phrase.charAt(i));\n\t\t\t\t}\n\t\t\t\telse if(Character.isLowerCase(phrase.charAt(i)) && phrase.charAt(i-1) == '-') {\n\t\t\t\t\tacronymString = acronymString + Character.toUpperCase(phrase.charAt(i));\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\t//System.out.println(acronymString);\n\t\t\n\t\t\n\t\t\n\t\treturn acronymString;\n\t}", "public String getPlot_acronym() {\n return plot_acronym;\n }", "public String toString(){\n\t\tString abbrv = this.name().substring(0,1);\t\t\n\t\treturn abbrv;\n\t}", "Alphabet alphabet() {\n return _alphabet;\n }", "@Override\n\tpublic String beforeSetting(String acronym) {\n\t\tacronym = this.upperCaseModifier.beforeSetting(acronym);\n\t\t\n\t\treturn idService.getUriForAcronym(acronym);\n\t}", "public String getName()\r\n {\n return \"arctan\";\r\n }", "public String getAsNameAbbreviated(String itemName);", "public String getAbbreviationLetter() {\n\t\treturn pieceLetter;\n\t}", "public String getAnfitrion() {\r\n\t\treturn anfitrion;\r\n\t}", "@Override\n public void buildArma() {\n this.personaje.setArma(new Arma(\"Lanza\", 'A', 9));\n }", "String getQualifiedName();", "public AlienArmy getAlienArmy() {\r\n return army;\r\n }", "public String getAlias();", "public String getAlias();", "Exp getQualifierExp();", "public abstract java.lang.String getAcma_descripcion();", "public QualifiedNameElements getQualifiedNameAccess() {\n\t\treturn pQualifiedName;\n\t}", "public QualifiedNameElements getQualifiedNameAccess() {\n\t\treturn pQualifiedName;\n\t}", "public void setExpanded(String expanded)\r\n {\r\n this.expanded = expanded;\r\n }", "public String acronym(String phrase) {\n String accrStr = phrase.replaceAll(\"\\\\B.|\\\\P{L}\", \"\").toUpperCase();\n return accrStr;\n }", "public void setAcronymTagger(AcronymTagger acronymTagger) {\n this.acronymTagger = acronymTagger;\n }", "public String getQualifiedName();", "private String createAcronym(String phrase) {\n String[] words = phrase.split(\"\\\\W+|(?<=\\\\p{Lower})(?=\\\\p{Upper})|(?<=\\\\p{Upper})(?=\\\\p{Upper}\\\\p{Lower})\");\n StringBuffer acronym = new StringBuffer();\n for (int i = 0; i < words.length; i++) {\n acronym.append(words[i].substring(0,1).toUpperCase());\n }\n return acronym.toString();\n }", "public static String acronym(String phrase) {\n\t\tString[] arrPhrase = phrase.split(\" \", 0);\n\t\treturn arrPhrase[2];\n\t}", "IAccessPackageCatalogReferenceRequest expand(final String value);", "@Override\r\n\tpublic UserType getByAcronym(char acronym) {\r\n\t\tQuery query = sessionFactory.getCurrentSession().createQuery(\"FROM UserType WHERE Acronym =:acronym \"); \r\n\t\tquery.setParameter(\"acronym\", acronym);\r\n\t\t\r\n\t\treturn (UserType) query.getSingleResult();\r\n\t}", "public abstract String getQualifiedName();", "public String getName()\r\n {\n return \"arctan2\";\r\n }", "public boolean isAcronym(String word) {\n\t\tif (word.length() < 3) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tif (word.indexOf(\" \") == -1) {\n\t\t\t\tfor (int i = 0; i < word.length(); i++) {\n\t\t\t\t\tif (Character.isDigit(word.charAt(i))) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// if all upper case\n\t\t\tif (Character.isUpperCase(word.charAt(1))) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t// if there is a number in the word\n\n\t\treturn false;\n\t}", "public java.lang.CharSequence getAlias() {\n return alias;\n }", "public Almacen(){}", "public void setCraftingExp(int exp)\n\t{\n\t\tm_skillCraftExp = exp;\n\t}", "private void initialiseAcronymList(ArrayList<String> pAcronymList) {\n\t\tthis.acronymList = new HashSet<String>(pAcronymList);\t\t\n\t}", "public CitronellaAnt(){\n\t\tsuper(\"Citronella Ant\", AntCost.CITRONELLA_ANT);\n\t\tsuper.setLife(20);\n\t}", "public java.lang.CharSequence getAlias() {\n return alias;\n }", "@Override\n public String toString()\n {\n return sAbbr + \",\" + sName;\n }", "public String getAwardName() {\n return awardName;\n }", "Alphabet() {\n this(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\");\n }", "Alphabet() {\n this(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\");\n }", "Alphabet() {\n this(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\");\n }", "@Test\n\tpublic void verifyAcronymCamelCaseScoring() {\n\t\tStringScore stringScore = new StringScore(StringScoreRanking.standardContiguousSequenceRanking(), StringScoreRanking.standardAcronymRanking(), StringScoreRanking.standardNonContiguousSequenceRanking());\n\t\t\n\t\tScore score = stringScore.scoreAsAcronym(\"abc\", \"abcDefGhiJkl\");\n\t\tAssert.assertEquals(0, score.rank);\n\t\t\n\t\tscore = stringScore.scoreAsAcronym(\"ad\", \"abcDefGhiJkl\");\n\t\tAssert.assertEquals(4, score.rank);\n\t\t\n\t\tscore = stringScore.scoreAsAcronym(\"aj\", \"abcDef GhiJkl\");\n\t\tAssert.assertEquals(4, score.rank);\n\t\t\n\t\tscore = stringScore.scoreAsAcronym(\"adz\", \"abcDefGhiJklmn\");\n\t\tAssert.assertEquals(0, score.rank);\n\t\t\n\t\tscore = stringScore.scoreAsAcronym(\"dgj\", \"abcDefGhiJklmn\");\n\t\tAssert.assertEquals(3, score.rank);\n\t\t\n\t\tscore = stringScore.scoreAsAcronym(\"dj\", \"abcDefGhiJklmn\");\n\t\tAssert.assertEquals(3, score.rank);\n\t\t\n\t\tscore = stringScore.scoreAsAcronym(\"ax\", \"abcDefGhiJklmnMopXyz\");\n\t\tAssert.assertEquals(4, score.rank);\n\t}", "public String acronym(String phrase) {\n\t\tString[] p = phrase.split(\"[\\\\W\\\\s]\");\n\t\tString returner = \"\";\n\t\tfor (String s : p) {\n\t\t\tif (!s.isEmpty())\n\t\t\t\treturner = returner + s.charAt(0);\n\t\t}\n\t\treturn returner.toUpperCase();\n\t}", "public abstract String getShortName();", "public abstract String getShortName();", "public abstract String getShortName();", "public String getAliasintroduce() {\n return aliasintroduce;\n }", "public abstract void setAcma_descripcion(\n\t\tjava.lang.String newAcma_descripcion);", "public String getAesthetic() {\n return aesthetic;\n }", "private boolean isAbbreviation(String word) {\n\n boolean abbr = true;\n String[] parts = word.split(\"\\\\.\");\n for (String part : parts) {\n if (part.length() > 1 || !Pattern.matches(\"[a-zA-Z]\", part)) {\n abbr = false;\n break;\n }\n }\n return abbr;\n }", "public AccessSymbol(AccessExpression ae) {\n base = parse(ae.getLHS());\n //member = ((Identifier)ae.getRHS()).getSymbol();\n member = SymbolTools.getSymbolOf(ae.getRHS());\n // This modification is not necessary for a valid access expression but\n // points-to analysis sometimes passes an expression normalized to some\n // form not conforming C standard (for internal use).\n // This is converted to invisible symbol.\n if (ae.getOperator() == AccessOperator.POINTER_ACCESS) {\n if (ae.getLHS() instanceof UnaryExpression &&\n ((UnaryExpression)ae.getLHS()).getOperator() ==\n UnaryOperator.ADDRESS_OF) {\n ;\n } else {\n base = new DerefSymbol(base);\n }\n }\n buildName();\n }", "public int acab()\n\t\t{\n\t\t\treturn this.acabe;\n\t\t}", "private BUR(final String name, final String desc, final String acronym)\r\n {\r\n super(name, desc, acronym);\r\n }", "public BasicAttributesGrammarAccess.FQNElements getFQNAccess() {\n\t\treturn gaBasicAttributes.getFQNAccess();\n\t}", "public Name getAlias() {\n\t\treturn getSingleName();\n\t}", "private List<String> build() {\n List<String> ags = new ArrayList<>();\n ags.add(\"European Union Chromosome 3 Arabidopsis Sequencing Consortium\");\n ags.add(\"Institute for Genomic Research\");\n ags.add(\"Kazusa DNA Research Institute\");\n return ags;\n }", "public String getAutor(){\n return autorsText;\n }", "public String getAcronimo() {\n return acronimo;\n }", "Cmd(final String abbr) {\n this.abbr = abbr;\n }", "public Artista(String nombreArtista) {\n this.nombreArtista = nombreArtista;\n }", "public void setPlot_acronym(String plot_acronym) {\n this.plot_acronym = plot_acronym;\n }", "public void setPatronymic(String patronymic) {\n this.patronymic = patronymic;\n }", "public String getAccession() {\n return accession;\n }", "MnemonicNameReference createMnemonicNameReference();", "public abstract java.lang.String getApellido();", "public Arma obtenerArma() {\n\t\treturn arma;\n\t}", "public String getAzione() {\n return azione;\n }", "public void editAbbreviation(String name, String abbreviation) {\n if (isAbbreviationEditableAndRemovable.get()) {\n Abbreviation abbreviationObject = new Abbreviation(name, abbreviation);\n AbbreviationViewModel abbViewModel = new AbbreviationViewModel(abbreviationObject);\n if (abbreviations.contains(abbViewModel)) {\n if (!abbViewModel.equals(currentAbbreviation.get())) {\n dialogService.showErrorDialogAndWait(Localization.lang(\"Duplicated Journal Abbreviation\"), Localization.lang(\"Abbreviation %s for journal %s already defined.\", abbreviation, name));\n } else {\n setCurrentAbbreviationNameAndAbbreviationIfValid(name, abbreviation);\n }\n } else {\n setCurrentAbbreviationNameAndAbbreviationIfValid(name, abbreviation);\n }\n }\n }", "public String getShortName() { return shortName; }", "protected String expand(String str, Object action, boolean encode) {\n if (action != null) {\n return expressionEvaluator.expand(str, action, encode);\n }\n\n return str;\n }", "public NameKey toNameKey() {\n if (this.scientificNameAuthorship == null)\n return this;\n Set<NameFlag> fl = this.flags;\n if (fl != null && fl.contains(NameFlag.AUTONYM)) {\n fl = new HashSet<>(this.flags);\n fl.remove(NameFlag.AUTONYM);\n fl = fl.isEmpty() ? null : fl;\n\n }\n return new NameKey(this.analyser, this.code, this.scientificName, null, this.rank, this.type, fl);\n }", "public Armor(String _name){\n super();\n // sets owner = _owner\n // sets posX = _posX\n // sets posY = _posY\n // sets itemIntValue = _itemIntValue\n name = _name; \n }", "@Override\n public String getDescription() {\n return \"Alias assignment\";\n }", "public EmployeeLookup() {\r\n\t\tfill();\r\n\t\tinitialize();\r\n\t\t//AutoCompleteDecorator.decorate(el);\r\n\t}", "public FQNElements getFQNAccess() {\r\n\t\treturn pFQN;\r\n\t}", "public String getName(){return this.aName;}", "public List<NodeExpansionDescription<T, A>> nextExpansion() {\r\n\t\tif (!this.initialized) {\r\n\t\t\ttry {\r\n\t\t\t\tinitGraph();\r\n\t\t\t} catch (Throwable e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\treturn lastExpansion;\r\n\t\t} else\r\n\t\t\tstep();\r\n\t\treturn lastExpansion;\r\n\t}", "public final ManchesterOWLSyntaxAutoComplete.axiom_return axiom() {\n ManchesterOWLSyntaxAutoComplete.axiom_return retval = new ManchesterOWLSyntaxAutoComplete.axiom_return();\n retval.start = input.LT(1);\n ManchesterOWLSyntaxTree p = null;\n ManchesterOWLSyntaxTree anotherProperty = null;\n ManchesterOWLSyntaxTree subject = null;\n ManchesterOWLSyntaxTree anotherIndividual = null;\n ManchesterOWLSyntaxAutoComplete.expression_return superClass = null;\n ManchesterOWLSyntaxAutoComplete.expression_return rhs = null;\n ManchesterOWLSyntaxAutoComplete.unary_return superProperty = null;\n ManchesterOWLSyntaxAutoComplete.unary_return object = null;\n ManchesterOWLSyntaxAutoComplete.expression_return domain = null;\n ManchesterOWLSyntaxAutoComplete.expression_return range = null;\n ManchesterOWLSyntaxAutoComplete.axiom_return a = null;\n try {\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:284:1:\n // ( ^( SUB_CLASS_AXIOM ^( EXPRESSION subClass= expression ) ^(\n // EXPRESSION superClass= expression ) ) | ^( EQUIVALENT_TO_AXIOM ^(\n // EXPRESSION lhs= expression ) ^( EXPRESSION rhs= expression ) ) |\n // ^( INVERSE_OF ^( EXPRESSION p= IDENTIFIER ) ^( EXPRESSION\n // anotherProperty= IDENTIFIER ) ) | ^( DISJOINT_WITH_AXIOM ^(\n // EXPRESSION lhs= expression ) ^( EXPRESSION rhs= expression ) ) |\n // ^( SUB_PROPERTY_AXIOM ^( EXPRESSION subProperty= expression ) ^(\n // EXPRESSION superProperty= unary ) ) | ^( ROLE_ASSERTION ^(\n // EXPRESSION subject= IDENTIFIER ) ^( EXPRESSION predicate=\n // propertyExpression ) ^( EXPRESSION object= unary ) ) | ^(\n // TYPE_ASSERTION ^( EXPRESSION description= expression ) ^(\n // EXPRESSION subject= IDENTIFIER ) ) | ^( DOMAIN ^( EXPRESSION p=\n // IDENTIFIER ) ^( EXPRESSION domain= expression ) ) | ^( RANGE ^(\n // EXPRESSION p= IDENTIFIER ) ^( EXPRESSION range= expression ) ) |\n // ^( SAME_AS_AXIOM ^( EXPRESSION anIndividual= IDENTIFIER ) ^(\n // EXPRESSION anotherIndividual= IDENTIFIER ) ) | ^(\n // DIFFERENT_FROM_AXIOM ^( EXPRESSION anIndividual= IDENTIFIER ) ^(\n // EXPRESSION anotherIndividual= IDENTIFIER ) ) | ^( UNARY_AXIOM\n // FUNCTIONAL ^( EXPRESSION p= IDENTIFIER ) ) | ^( UNARY_AXIOM\n // INVERSE_FUNCTIONAL ^( EXPRESSION p= IDENTIFIER ) ) | ^(\n // UNARY_AXIOM IRREFLEXIVE ^( EXPRESSION p= IDENTIFIER ) ) | ^(\n // UNARY_AXIOM REFLEXIVE ^( EXPRESSION p= IDENTIFIER ) ) | ^(\n // UNARY_AXIOM SYMMETRIC ^( EXPRESSION p= IDENTIFIER ) ) | ^(\n // UNARY_AXIOM TRANSITIVE ^( EXPRESSION p= IDENTIFIER ) ) | ^(\n // NEGATED_ASSERTION a= axiom ) )\n int alt16 = 18;\n alt16 = dfa16.predict(input);\n switch (alt16) {\n case 1:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:285:3:\n // ^( SUB_CLASS_AXIOM ^( EXPRESSION subClass= expression ) ^(\n // EXPRESSION superClass= expression ) )\n {\n match(input, SUB_CLASS_AXIOM, FOLLOW_SUB_CLASS_AXIOM_in_axiom936);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom940);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom947);\n expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom952);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom959);\n superClass = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n superClass.node.getCompletions());\n } else {\n retval.completions = new ArrayList<>(\n AutoCompleteStrings\n .getStandaloneExpressionCompletions(superClass.node\n .getEvalType()));\n }\n }\n }\n break;\n case 2:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:293:5:\n // ^( EQUIVALENT_TO_AXIOM ^( EXPRESSION lhs= expression ) ^(\n // EXPRESSION rhs= expression ) )\n {\n match(input, EQUIVALENT_TO_AXIOM,\n FOLLOW_EQUIVALENT_TO_AXIOM_in_axiom972);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom975);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom981);\n expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom985);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom992);\n rhs = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n rhs.node.getCompletions());\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 3:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:301:4:\n // ^( INVERSE_OF ^( EXPRESSION p= IDENTIFIER ) ^( EXPRESSION\n // anotherProperty= IDENTIFIER ) )\n {\n match(input, INVERSE_OF, FOLLOW_INVERSE_OF_in_axiom1007);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1010);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1016);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1020);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n anotherProperty = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1026);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = anotherProperty.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 4:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:309:5:\n // ^( DISJOINT_WITH_AXIOM ^( EXPRESSION lhs= expression ) ^(\n // EXPRESSION rhs= expression ) )\n {\n match(input, DISJOINT_WITH_AXIOM,\n FOLLOW_DISJOINT_WITH_AXIOM_in_axiom1038);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1041);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom1048);\n expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1052);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom1058);\n rhs = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n rhs.node.getCompletions());\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 5:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:316:4:\n // ^( SUB_PROPERTY_AXIOM ^( EXPRESSION subProperty= expression )\n // ^( EXPRESSION superProperty= unary ) )\n {\n match(input, SUB_PROPERTY_AXIOM,\n FOLLOW_SUB_PROPERTY_AXIOM_in_axiom1070);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1073);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom1080);\n expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1084);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_unary_in_axiom1090);\n superProperty = unary();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n superProperty.node.getCompletions());\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 6:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:324:4:\n // ^( ROLE_ASSERTION ^( EXPRESSION subject= IDENTIFIER ) ^(\n // EXPRESSION predicate= propertyExpression ) ^( EXPRESSION\n // object= unary ) )\n {\n match(input, ROLE_ASSERTION, FOLLOW_ROLE_ASSERTION_in_axiom1104);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1107);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n subject = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1114);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1118);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_propertyExpression_in_axiom1125);\n propertyExpression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1129);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_unary_in_axiom1135);\n object = unary();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n object.node.getCompletions());\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 7:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:331:5:\n // ^( TYPE_ASSERTION ^( EXPRESSION description= expression ) ^(\n // EXPRESSION subject= IDENTIFIER ) )\n {\n match(input, TYPE_ASSERTION, FOLLOW_TYPE_ASSERTION_in_axiom1145);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1148);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom1155);\n expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1159);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n subject = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1165);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = subject.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 8:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:339:4:\n // ^( DOMAIN ^( EXPRESSION p= IDENTIFIER ) ^( EXPRESSION domain=\n // expression ) )\n {\n match(input, DOMAIN, FOLLOW_DOMAIN_in_axiom1177);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1180);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1186);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1190);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom1196);\n domain = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n domain.node.getCompletions());\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 9:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:347:5:\n // ^( RANGE ^( EXPRESSION p= IDENTIFIER ) ^( EXPRESSION range=\n // expression ) )\n {\n match(input, RANGE, FOLLOW_RANGE_in_axiom1209);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1212);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1218);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1222);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_expression_in_axiom1228);\n range = expression();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = new ArrayList<>(\n range.node.getCompletions());\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 10:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:355:6:\n // ^( SAME_AS_AXIOM ^( EXPRESSION anIndividual= IDENTIFIER ) ^(\n // EXPRESSION anotherIndividual= IDENTIFIER ) )\n {\n match(input, SAME_AS_AXIOM, FOLLOW_SAME_AS_AXIOM_in_axiom1243);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1246);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, IDENTIFIER, FOLLOW_IDENTIFIER_in_axiom1251);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1255);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n anotherIndividual = (ManchesterOWLSyntaxTree) match(input,\n IDENTIFIER, FOLLOW_IDENTIFIER_in_axiom1261);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = anotherIndividual.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 11:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:363:7:\n // ^( DIFFERENT_FROM_AXIOM ^( EXPRESSION anIndividual=\n // IDENTIFIER ) ^( EXPRESSION anotherIndividual= IDENTIFIER ) )\n {\n match(input, DIFFERENT_FROM_AXIOM,\n FOLLOW_DIFFERENT_FROM_AXIOM_in_axiom1277);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1280);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, IDENTIFIER, FOLLOW_IDENTIFIER_in_axiom1285);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1289);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n anotherIndividual = (ManchesterOWLSyntaxTree) match(input,\n IDENTIFIER, FOLLOW_IDENTIFIER_in_axiom1295);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = anotherIndividual.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 12:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:371:5:\n // ^( UNARY_AXIOM FUNCTIONAL ^( EXPRESSION p= IDENTIFIER ) )\n {\n match(input, UNARY_AXIOM, FOLLOW_UNARY_AXIOM_in_axiom1309);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, FUNCTIONAL, FOLLOW_FUNCTIONAL_in_axiom1311);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1314);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1320);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = p.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 13:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:379:5:\n // ^( UNARY_AXIOM INVERSE_FUNCTIONAL ^( EXPRESSION p= IDENTIFIER\n // ) )\n {\n match(input, UNARY_AXIOM, FOLLOW_UNARY_AXIOM_in_axiom1333);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, INVERSE_FUNCTIONAL,\n FOLLOW_INVERSE_FUNCTIONAL_in_axiom1335);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1338);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1344);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = p.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 14:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:387:7:\n // ^( UNARY_AXIOM IRREFLEXIVE ^( EXPRESSION p= IDENTIFIER ) )\n {\n match(input, UNARY_AXIOM, FOLLOW_UNARY_AXIOM_in_axiom1360);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, IRREFLEXIVE, FOLLOW_IRREFLEXIVE_in_axiom1362);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1365);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1371);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = p.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 15:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:395:6:\n // ^( UNARY_AXIOM REFLEXIVE ^( EXPRESSION p= IDENTIFIER ) )\n {\n match(input, UNARY_AXIOM, FOLLOW_UNARY_AXIOM_in_axiom1386);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, REFLEXIVE, FOLLOW_REFLEXIVE_in_axiom1388);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1391);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1397);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = p.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 16:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:403:6:\n // ^( UNARY_AXIOM SYMMETRIC ^( EXPRESSION p= IDENTIFIER ) )\n {\n match(input, UNARY_AXIOM, FOLLOW_UNARY_AXIOM_in_axiom1412);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, SYMMETRIC, FOLLOW_SYMMETRIC_in_axiom1414);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1417);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1423);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = p.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 17:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:411:7:\n // ^( UNARY_AXIOM TRANSITIVE ^( EXPRESSION p= IDENTIFIER ) )\n {\n match(input, UNARY_AXIOM, FOLLOW_UNARY_AXIOM_in_axiom1440);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n match(input, TRANSITIVE, FOLLOW_TRANSITIVE_in_axiom1442);\n if (state.failed) {\n return retval;\n }\n match(input, EXPRESSION, FOLLOW_EXPRESSION_in_axiom1445);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n p = (ManchesterOWLSyntaxTree) match(input, IDENTIFIER,\n FOLLOW_IDENTIFIER_in_axiom1451);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = p.getCompletions();\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n case 18:\n // /Users/luigi/Documents/workspace/Parsers/src/ManchesterOWLSyntaxAutoComplete.g:419:6:\n // ^( NEGATED_ASSERTION a= axiom )\n {\n match(input, NEGATED_ASSERTION, FOLLOW_NEGATED_ASSERTION_in_axiom1466);\n if (state.failed) {\n return retval;\n }\n match(input, Token.DOWN, null);\n if (state.failed) {\n return retval;\n }\n pushFollow(FOLLOW_axiom_in_axiom1471);\n a = axiom();\n state._fsp--;\n if (state.failed) {\n return retval;\n }\n match(input, Token.UP, null);\n if (state.failed) {\n return retval;\n }\n if (state.backtracking == 1) {\n if (!isNewWord()) {\n retval.completions = a.completions;\n } else {\n retval.completions = Collections.<String> emptyList();\n }\n }\n }\n break;\n }\n if (state.backtracking == 1 && retval.completions != null) {\n ((ManchesterOWLSyntaxTree) retval.start)\n .setCompletions(retval.completions);\n }\n } catch (@SuppressWarnings(\"unused\") RecognitionException | RewriteEmptyStreamException exception) {}\n return retval;\n }", "@AutoEscape\n public String getName();", "public interface Alphabet {\n\n\n Pair transcriptChar(char character);\n\n List<Pair> transcriptWord(String word);\n\n Pair[] getAlphabet();\n}", "String getShortName();", "public void getAssignment() {\n \n }", "public String getDESC_ARAB() {\r\n return DESC_ARAB;\r\n }", "@Override\n\tpublic String getAuthority() {\n\t\treturn name;\n\t}", "@Override\n\tpublic String getAuthority() {\n\t\treturn name;\n\t}", "@Override\n\tpublic String getAuthority() {\n\t\treturn name;\n\t}" ]
[ "0.75659174", "0.7522655", "0.68429637", "0.65276855", "0.6282281", "0.6153687", "0.6117691", "0.58999413", "0.58976406", "0.57221544", "0.5705191", "0.55846924", "0.55061156", "0.5500733", "0.5402748", "0.5354003", "0.53216535", "0.51670474", "0.5130964", "0.5085256", "0.50501424", "0.50326854", "0.49770722", "0.49437097", "0.49304906", "0.49057823", "0.49049595", "0.48761898", "0.48566526", "0.48566526", "0.48557588", "0.48540878", "0.4837373", "0.4837373", "0.4835959", "0.48131174", "0.4812809", "0.4812372", "0.48097423", "0.47929806", "0.47900513", "0.47714624", "0.47475708", "0.47472838", "0.47232592", "0.4711527", "0.47019115", "0.4695177", "0.46943805", "0.4657409", "0.46539983", "0.46512327", "0.46219912", "0.4618994", "0.4618994", "0.4618994", "0.46177545", "0.4609921", "0.4598937", "0.4598937", "0.4598937", "0.4591928", "0.45912167", "0.45825374", "0.4573543", "0.45670286", "0.4565326", "0.45651326", "0.45615914", "0.45573318", "0.4554294", "0.45506686", "0.45495963", "0.45473826", "0.45457962", "0.45410693", "0.45284426", "0.45197675", "0.45166555", "0.45156243", "0.45147237", "0.4508906", "0.4505703", "0.4493461", "0.44912767", "0.44818118", "0.44736844", "0.44727495", "0.4470673", "0.44672003", "0.44640157", "0.4457894", "0.4452701", "0.4448037", "0.44468018", "0.44407782", "0.44390884", "0.44335774", "0.44295424", "0.44295424", "0.44295424" ]
0.0
-1
Main Method deals with the user and then passes the input to calculator
public static void main(String[] args) { runTests(); Scanner scan = new Scanner(System.in); System.out.println("Hello, I am a calculator."); while(true){ System.out.println(" Please enter a math problem to begin."); String formula = scan.nextLine(); if (formula.toLowerCase().equals("stop")) { System.out.println("Stopping"); break; } else if(formula.equals("Exit") || formula.equals("exit")) { System.out.println("Exiting"); break; } Calculator calc = new Calculator(); String result = calc.computeResult(formula); if(result == "paren"){ System.out.println("You have unfinished parentheses. Please try your equation again"); } else { int resultAsNum = Integer.parseInt(result); System.out.println("Result = " + resultAsNum); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n Calculator calc=new Calculator();\r\n double operand1,operand2,result=0;\r\n operand1=calc.getOperand1();\r\n operand2=calc.getOperand2();\r\n String op;\r\n op=calc.getOperator();\r\n try\r\n {\r\n \r\n switch(op)\r\n {\r\n case \"+\": Add add=new Add();\r\n result=add.doOperation(operand1, operand2);\r\n break;\r\n case \"-\": Subract sub=new Subract();\r\n result=sub.doOperation(operand1, operand2);\r\n break;\r\n case \"*\": Multiply mul=new Multiply();\r\n result=mul.doOperation(operand1, operand2);\r\n break;\r\n case \"/\": Division div =new Division();\r\n if(operand2==0)\r\n {\r\n \tthrow new ArithmeticException();\r\n }\r\n result=div.doOperation(operand1, operand2);\r\n break;\r\n default: throw new Exception(\"Invalid operation\");\r\n }\r\n \r\n\t }\r\n catch(ArithmeticException e)\r\n {\r\n \t System.out.println(e);\r\n \t \r\n }\r\n \r\n catch(Exception e)\r\n {\r\n \t System.out.println(e);\r\n \t \r\n } \r\n finally\r\n {\r\n \t System.exit(0);\r\n }\r\n System.out.print(result);\r\n \r\n}", "public static void main(String[] args){\n\t\tSimpleCalculator calc = new SimpleCalculator();\n\t\tboolean a=true;\n\t\tdouble number = 0.0;\n\t\tString checker = \"\";\n\t\twhile(a){\n\t\t\tSystem.out.println(\"Result: \" + number);\n\t\t\tSystem.out.println(\"Enter an operation or 'q' to end the program.\");\n\t\t\tScanner scan = new Scanner(System.in);\n\t\t\ttry{\n\t\t\t\tchecker= scan.next();\n\t\t\t\tif (checker.equals(\"q\")){\n\t\t\t\t\ta=false;\n\t\t\t\t}\n\t\t\t\telse if (!checker.equals(\"+\")&& !checker.equals(\"-\")&& !checker.equals(\"*\") && !checker.equals(\"/\")&&\n\t\t\t\t\t\t!checker.equals(\"%\")){\n\t\t\t\t\tthrow new UnknownOperatorException();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(UnknownOperatorException e){\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t\tif(a&&(checker.equals(\"+\")|| checker.equals(\"-\")|| checker.equals(\"*\") || checker.equals(\"/\")||\n\t\t\t\t\tchecker.equals(\"%\"))){\n\t\t\t\ttry{\n\t\t\t\t\tSystem.out.println(\"Please enter a number: \");\n\t\t\t\t\tnumber= scan.nextDouble();\n\t\t\t\t\tif (checker.equals(\"/\")&&(number==0)){\n\t\t\t\t\t\tthrow new ArithmeticException();\n\t\t\t\t\t}\n\t\t\t\t\tcalc.calcSetter(number, checker);\n\t\t\t\t\tnumber =calc.CalcLogic();\n\t\t\t\t}\n\t\t\t\tcatch(InputMismatchException exceptionObj){\n\t\t\t\t\tSystem.out.println(\"That is not a number! Please try again!\");\n\t\t\t\t\tScanner scan2 = new Scanner(System.in);\n\t\t\t\t\tnumber = scan2.nextDouble();\n\t\t\t\t}\n\t\t\t\tcatch(ArithmeticException e){\n\t\t\t\t\tSystem.out.println(\"Cannot divide by zero!\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tExForMath mathobj = new ExForMath();\r\n\t\t\r\n\t\tScanner userinput=new Scanner(System.in);\r\n\t\t\r\n\t\tSystem.out.println(\"Welcome to Java Calculator\");\r\n\t\tSystem.out.println(\"==========================\");\r\n\t\tSystem.out.println(\"Enter first number:\");\r\n\t\t\r\n\t\tint num1=userinput.nextInt();\r\n\t\t\r\n\t\tSystem.out.println(\"Enter second number:\");\r\n\t\t\r\n\t\tint num2=userinput.nextInt();\r\n\t\t\r\n\t\tSystem.out.println(\"Enter the operation that you want to use(+,-,x,/):\");\r\n\t\t\r\n\t\tString operation = userinput.next();\r\n\t\t\r\n\t\tif (operation.equals(\"+\"))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The answer is \" +mathobj.add(num1, num2));\r\n\t\t}\t\r\n\t\t\r\n\t\tif (operation.equals(\"-\"))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The answer is \" +mathobj.subtract(num1, num2));\r\n\t\t}\r\n\t\t\r\n\t\tif (operation.equals(\"x\"))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The answer is \" +mathobj.multiply(num1, num2));\r\n\t\t}\r\n\t\t\r\n\t\tif (operation.equals(\"/\"))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The answer is \" +mathobj.divide(num1, num2));\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Welcome to the calculator. What operation would you like to do?(+,-,*,/)\");\n\t\tString answer = input.next();\n\t\t\n\t\tif (answer.equals(\"add\") || answer.equals(\"Add\") || answer.equals(\"+\")) \n\t\t\t\t{\n\t\t\t\tSystem.out.println(\"What numbers would you like to add?\");\n\t\t\t\tSystem.out.println(\"Type your first number\");\n\t\t\t\tfloat add1 = input.nextFloat();\n\t\t\t\tSystem.out.println(\"Type the second number you want to add\");\n\t\t\t\tfloat add2 = input.nextFloat();\n\t\t\t\t\n\t\t\t\tfloat addanswer = add1 + add2;\n\t\t\t\tSystem.out.println(addanswer);\n\t\t\t\t}\n\t\telse if(answer.equals(\"minus\") || answer.equals(\"-\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"What numbers would you like to subtract?\");\n\t\t\t\tSystem.out.println(\"Type your first number\");\n\t\t\t\tfloat sub1 = input.nextFloat();\n\t\t\t\tSystem.out.println(\"Type the second number\");\n\t\t\t\tfloat sub2 = input.nextFloat();\n\t\t\t\t\t\n\t\t\t\tfloat subanswer = sub1 - sub2;\n\t\t\t\tSystem.out.println(subanswer);\n\t\t\t}\n\t\telse if(answer.equals(\"multiply\") || answer.equals(\"x\") || answer.equals(\"*\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"What numbers would you like to multiply?\");\n\t\t\t\tSystem.out.println(\"Type your first number\");\n\t\t\t\tfloat mul1 = input.nextFloat();\n\t\t\t\tSystem.out.println(\"Type the second number\");\n\t\t\t\tfloat mul2 = input.nextFloat();\n\t\t\t\t\n\t\t\t\tfloat mulanswer = mul1 * mul2;\n\t\t\t\tSystem.out.println(mulanswer);\n\t\t\t}\n\t\telse if(answer.equals(\"divide\") || answer.equals(\"/\"))\n\t\t\t{\n\t\t\t\tSystem.out.println(\"What numbers would you like to divide?\");\n\t\t\t\tSystem.out.println(\"Type your first number\");\n\t\t\t\tfloat div1 = input.nextFloat();\n\t\t\t\tSystem.out.println(\"Type the second number\");\n\t\t\t\tfloat div2 = input.nextFloat();\n\t\t\t\t\n\t\t\t\tfloat divanswer = div1 / div2;\n\t\t\t\tSystem.out.println(divanswer);\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Please try again.\");\n\t\t\t}\n\t\tinput.close();\n\t\t}", "public static void main(String[] args) {\n while (true) {\n System.out.println(\"1. Normal Calculator\");\n System.out.println(\"2. BMI Calculator\");\n System.out.println(\"3. Exit\");\n System.out.print(\"Enter your choice: \");\n int choice = CheckInput.checkInputIntLimit(1, 3);\n\n switch (choice) {\n case 1:\n NomalCal nc = new NomalCal();\n double memory = 0,\n number;\n System.out.print(\"Enter number: \");\n number = CheckInputNumber.checkInputDouble();\n memory = nc.addCal(number);\n while (true) {\n\n System.out.print(\"Enter operator: \");\n String operator = CheckInputOperator.checkInputOperator();\n\n if (operator.equalsIgnoreCase(\"+\")) {\n System.out.print(\"Enter number: \");\n number = CheckInputNumber.checkInputDouble();\n memory = nc.addCal(number);\n System.out.println(\"Memory: \" + memory);\n }\n if (operator.equalsIgnoreCase(\"-\")) {\n System.out.print(\"Enter number: \");\n number = CheckInputNumber.checkInputDouble();\n memory = nc.subCal(number);\n System.out.println(\"Memory: \" + memory);\n }\n if (operator.equalsIgnoreCase(\"*\")) {\n System.out.print(\"Enter number: \");\n number = CheckInputNumber.checkInputDouble();\n memory = nc.mulCal(number);\n System.out.println(\"Memory: \" + memory);\n }\n if (operator.equalsIgnoreCase(\"/\")) {\n System.out.print(\"Enter number: \");\n number = CheckInputNumber.checkInputDouble();\n memory = nc.divCal(number);\n System.out.println(\"Memory: \" + memory);\n }\n if (operator.equalsIgnoreCase(\"^\")) {\n System.out.print(\"Enter number: \");\n number = CheckInputNumber.checkInputDouble();\n memory = nc.powCal(number);\n System.out.println(\"Memory: \" + memory);\n }\n if (operator.equalsIgnoreCase(\"=\")) {\n System.out.println(\"Result: \" + memory);\n return;\n }\n }\n case 2:\n IBMCal.BMICalculator();\n break;\n case 3:\n return;\n }\n }\n\n }", "public static void main(String[] args)\r\n\t{\n\t\tdouble num1;\r\n\t\tdouble num2;\r\n\t\t\r\n\t\t// Define a new variable that holds the character that represents the operator\r\n\t\tchar operator;\r\n\t\t\r\n\t\tdouble answer = 0.0;\r\n\t\t\r\n\t\t// Declare a new Scanner object called eval and set it to take in to the console input\r\n\t\tScanner eval = new Scanner(System.in);\r\n\t\t\r\n\t\t// Prompt the user for the 1st number\r\n\t\tSystem.out.println(\"Enter the 1st number: \");\r\n\t\t// Set num1 to the next double value the user enters\r\n\t\tnum1 = eval.nextDouble();\r\n\t\t\r\n\t\t// Prompt the user for the operator\r\n\t\tSystem.out.println(\"Enter the operator: \");\r\n\t\t// Set operator to the character the user wants\r\n\t\toperator = eval.next().charAt(0);\r\n\t\t\t\t\r\n\t\t// Prompt the user for the 2nd number\r\n\t\tSystem.out.println(\"Enter the 2nd number: \");\r\n\t\t// Set num2 to the next double value the user enters\r\n\t\tnum2 = eval.nextDouble();\r\n\t\t\r\n\t\t\t\t\r\n\t\t// Close the eval to prevent memory leakage\r\n\t\teval.close();\r\n\t\t\r\n\t\t// Take different actions depending on the operator passed to the function\r\n\t\tswitch(operator)\r\n\t\t{\r\n\t\t\t// If the operator is a +\r\n\t\t\tcase '+':\r\n\t\t\t\tanswer = num1 + num2;\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\t// If the operator is a -\r\n\t\t\tcase '-':\r\n\t\t\t\tanswer = num1 - num2;\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t// If the operator is a *\r\n\t\t\tcase '*':\r\n\t\t\t\tanswer = num1 * num2;\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t// If the operator is a /\r\n\t\t\tcase '/':\r\n\t\t\t\tanswer = num1 / num2;\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\t// Output the 2 values, the operator and result to the user\r\n\t\tSystem.out.println(\"Answer: \" + num1 + \" \" + operator + \" \" + num2 + \" = \" + answer);\r\n\t}", "public static void main(String[] args) {\n\n\t\t// initiating the scanner\n\t\tScanner operation = new Scanner(System.in);\n\n\t\t// creating object for calc\n\t\tCalc calc = new Calc();\n\t\tboolean isProceed = true;\n\t\twhile (isProceed) {\n\t\t\t// getting the first variable value\n\t\t\tSystem.out.println(\"Enter an integer\");\n\t\t\tint a = operation.nextInt();\n\t\t\tcalc.setA(a);\n\n\t\t\t// getting the second variable value\n\t\t\tSystem.out.println(\"Enter next integer\");\n\t\t\tint b = operation.nextInt();\n\t\t\tcalc.setB(b);\n\n\t\t\t// getting the operator value\n\t\t\tSystem.out.println(\"Enter type of operation. It should be only + or - or * or /\");\n\t\t\tString c = operation.next();\n\n\t\t\tswitch (c) {\n\t\t\tcase \"+\":\n\t\t\t\tcalc.add(a, b);\n\t\t\t\tbreak;\n\t\t\tcase \"-\":\n\t\t\t\tcalc.sub();\n\t\t\t\tbreak;\n\t\t\tcase \"*\":\n\t\t\t\tcalc.mult();\n\t\t\t\tbreak;\n\t\t\tcase \"/\":\n\t\t\t\tcalc.div();\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"No operation is matching. Please reenter values\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\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\t\n\t\t\t// getting user consent to proceed\n\t\t\tSystem.out.println(\"You want to make an other calculation ? Y / N\");\n\t\t\tString proceedBool = operation.next();\n\t\t\tif(proceedBool.equalsIgnoreCase(\"y\")) {\n\t\t\t\tisProceed = true;\n\t\t\t} else {\n\t\t\t\tisProceed = false;\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n\n System.out.println(\"------------------------------------\");\n //making a simple console calculator\n Scanner sc = new Scanner(System.in);\n double x, y;\n double result = 0;\n\n System.out.println(\"1. Addition\");\n System.out.println(\"2. Subtraction\");\n System.out.println(\"3. Multiplying\");\n System.out.println(\"4. Division\"); //HW\n System.out.print(\"Enter the operation: \");\n int operation = sc.nextInt();\n\n System.out.print(\"Enter first number: \");\n x = sc.nextInt();\n System.out.print(\"Enter second number: \");\n y = sc.nextInt();\n\n //simple\n if (operation == 1) {\n result = x + y;\n } else if (operation == 2) {\n result = x - y;\n } else if (operation == 3) {\n result = x * y;\n } else if (operation == 4 && y != 0) {\n result = x / y;\n } else {\n System.out.println(\"Wrong operation!\");\n }\n \n System.out.println(\"Result: \" + result);\n }", "public static void main(String[] args) {\n\t\tScanner input=new Scanner(System.in);\n\t\tdouble a,b,result;\n\t\tchar operation;\n\t\tSystem.out.println(\"PLease enter a first number\");\n\t\ta=input.nextDouble();\n\t\tSystem.out.println(\"Please enter a second number\");\n\t\tb=input.nextDouble();\n\t\tSystem.out.println(\"PLease tell us what kind of operation you want to use (+,-,*,/)\");\n\t\toperation=input.next().charAt(0);\n\t\t\n\t\tswitch(operation) {\n\t\t case '+':\n\t\t \tresult=a+b;\n\t\t \tbreak;\n\t\t case '-':\n\t\t \tresult=a-b;\n\t\t \tbreak;\n\t\t case'*':\n\t\t \tresult=a*b;\n\t\t \tbreak;\n\t\t case '/':\n\t\t \tresult=a/b;\n\t\t \tbreak;\n\t\t \tdefault:\n\t\t \t\tresult=0;\n\t\t \t\tSystem.out.println(\"Invalid input\");\n\t\t}System.out.println(\"The result is \"+ a+ operation+b+\"=\"+ result);\n \n\t\t\n\t\t\n\t\t\n\t}", "public abstract void execute(InputCalc input, Calculator calculator);", "public void calculate() {\n\n InputHelper inputHelper = new InputHelper();\n String firstNumber = inputHelper.getInput(\"Write first number: \");\n String secondNumber = inputHelper.getInput(\"Write second number: \");\n String action = inputHelper.getInput(\"What action you want to do ( + - * /): \");\n\n while (!firstNumber.equals(\"0\") || !secondNumber.equals(\"0\") || !action.equals(\"0\")) {\n try {\n switch (action) {\n case \"+\":\n System.out.println(\"The result is: \" + (Double.valueOf(firstNumber) + Double.valueOf(secondNumber)));\n break;\n case \"-\":\n System.out.println(\"The result is: \" + (Double.valueOf(firstNumber) - Double.valueOf(secondNumber)));\n break;\n case \"*\":\n System.out.println(\"The result is: \" + (Double.valueOf(firstNumber) * Double.valueOf(secondNumber)));\n break;\n case \"/\":\n System.out.println(\"The result is: \" + (Double.valueOf(firstNumber) / Double.valueOf(secondNumber)));\n break;\n default:\n System.out.println(\"You've entered a wrong action!\");\n }\n } catch (NumberFormatException e) {\n System.out.println(\"You've entered not a number!\");\n }\n\n firstNumber = inputHelper.getInput(\"Write first number: \");\n secondNumber = inputHelper.getInput(\"Write second number: \");\n action = inputHelper.getInput(\"What action you want to do ( + - * /): \");\n\n }\n }", "public static void main(String[] args)\n {\n// Here we declare necessary variables and initialize the scanner:\n double firstNumber, secondNumber, total;\n String operator;\n Scanner myScanner = new Scanner(System.in); //This statement initializes a scanner called my scanner, and enables it to accept input from the user.\n//\n//\n//\n// Here we ask the user to input the numbers and operator.\nSystem.out.println(\"What is the first number?\");\nfirstNumber = myScanner.nextDouble(); //This statement assigns the number that the user inputs to the variable firstNumber.\nSystem.out.println(\"What is the second number?\");\nsecondNumber = myScanner.nextDouble(); //This statement assigns the number that the user inputs to the variable secondNumber.\nSystem.out.println(\"What operator would you like to use (choose between +,-,*,/?\");\noperator = myScanner.next(); //This statement assigns the string that the user inputs to the variable operator.\n//\n//\n//\n// Here we start the switch statement:\n switch (operator) //This tells the computer what to do for each of the 4 possible operators, and if the operator that was inputted isn't one of those for, it tells the user that it can't perform the operation.\n {\n case \"+\": //This case assigns total the value of the sum, and then prints that out.\n {\n total=firstNumber+secondNumber;\n System.out.println(\"The total is: \" + total);\n break;\n }\n case \"-\": //This case assigns total the value of the difference, and then prints that out.\n {\n total=firstNumber-secondNumber;\n System.out.println(\"The total is: \" + total);\n break;\n }\n case \"*\": //This case assigns total the value of the multiplication, and then prints that out.\n {\n total=firstNumber*secondNumber;\n System.out.println(\"The total is: \" + total);\n break;\n } \n case \"/\": //This case assigns total the value of the division, and then prints that out.\n {\n total=firstNumber/secondNumber;\n System.out.println(\"The total is: \" + total);\n break;\n }\n default: //This case prints out that the user did not select an appropriate operator.\n {\n System.out.println(\"Illegal Operator.\");\n break;\n }\n \n }\n }", "view2() {\n Scanner input = new Scanner(System.in);\n Scanner StringInput = new Scanner(System.in);\n System.out.println(\"Calculator\");\n System.out.println(\"Enter the numbers you would like to operate on in order.\");\n System.out.print(\"Enter the first number: \");\n float first = StringInput.nextInt();\n System.out.print(\"which operation would you like to perform? ( Enter +, -, *, or / ) \");\n String operator = input.nextLine();\n System.out.print(\"Enter the second number: \");\n float second = input.nextInt();\n\n setFirstNumber(first);\n setOperator(operator);\n setSecondNumber(second);\n input.close();\n }", "public static void main(String[] args) {\n\t\tScanner num= new Scanner(System.in);\n\t\tSystem.out.println(\"Enter Your First Number=\");\n\t\tint a =num.nextInt();\n\t\t\n//\t\tSystem.out.println(\"Yoour Number is =\"+a);\n\t\tSystem.out.println(\"Enter Your Second Number=\");\n\t\tint b =num.nextInt();\n\t\tSystem.out.println(\"Enter Your Operation=\");\n\t\tnum.nextLine();\n\t\tchar operation=num.nextLine().charAt(0);\n\t\tint result=0;\n\t\t\n\t\tswitch(operation) {\n\t\tcase '+':\n\t\t\tresult =a+b;\n\t\t\tbreak;\n\t\tcase '-':\n\t\t\tresult =a-b;\n\t\t\tbreak;\n\t\tcase '*':\n\t\t\tresult =a*b;\n\t\t\tbreak;\n\t\tcase '/':\n\t\t\tresult =a/b;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Enter Value Are Invalid\");\n\t\t}\n\t\tSystem.out.println(\"Answer For Your Operation \"+ result);\n\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t}", "public static void main(String[] args) {\n\t\tScanner input=new Scanner (System.in);\n\t\tint n1, n2,result;\n\t\tchar operator;\n\t\t\t\t\t\n\t\t\t\n\t\tSystem.out.println(\"Please enter first numbers:\");\n\t\t\n\t\tn1=input.nextInt();\n\t\t\n\n\t\tSystem.out.println(\"Please enter first number: \");\t\t\n\t\tn2=input.nextInt();\n\t\t\n\t\tSystem.out.println(\"Please enter one of the operators that you want to do with these two numbers: +,-,* or /: \");\n\t\t\n\t\toperator=input.next().charAt(0);\n\t\t\n\t\tresult=0;\n\t\t\n\t\tswitch (operator) {\n\t\tcase '+':\n\t\t\tresult=n1+n2;\n\t\t\tbreak;\n\t\t\t\n\t\tcase '-':\n\t\t\tresult=n1-n2;\n\t\t\tbreak;\n\t\t\t\n\t\tcase '*':\n\t\t\tresult=n1*n2;\n\t\t\tbreak;\n\t\t\t\n\t\tcase '/':\n\t\t result=n1/n2;\n\t\t break;\n\t\tdefault:\n\t\t System.out.println(\"You have enetered the wrong operator\");\n\t\t \n\t\t}\n\t\t// if the result was not calculated I do not want to see below message\n\t\tif (result!=0) {\n\t\t\tSystem.out.println(\"The result of your operation is \"+result);\n\t\t\t\t\n\t\t}\n\t\t\n\t\t\t\n\t\t}", "public static void main(String[] args) {\n\t\tCalculatorScanner calculatorScanner = new CalculatorScanner();\n\t\tScanner scanner = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter 2 numbers:- \");\n\t\tint num1 = scanner.nextInt();\n\t\tint num2 = scanner.nextInt();\n\t\tint add = calculatorScanner.addition(num1, num2);\n\t\tint subtraction = calculatorScanner.subtraction(num1, num2);\n\t\tint multiplication = calculatorScanner.multiplication(num1, num2);\n\t\tint division = calculatorScanner.division(num1, num2);\n\t\tcalculatorScanner.printTotalAnswer(add, subtraction, multiplication, division);\n\t\tscanner.close();\n\t}", "public static void main(String[] args) \r\n {\r\n \tScanner input = new Scanner(System.in); \r\n \tSystem.out.println(\"Input your expression of fractions.\"); //prompts user input \r\n \tString inputString = input.nextLine();\r\n // TODO: Read the input from the user and call produceAnswer with an equation\r\n //user input\r\n \twhile (inputString.equals(\"quit\") == false) {\r\n \t\tString answer = produceAnswer(inputString);\r\n \t\tSystem.out.println(answer);\r\n \t\tSystem.out.println(\"Input your expression.\");\r\n \t\tinputString = input.nextLine(); \r\n \t}\r\n \tinput.close();\r\n }", "public static void main(String[] args) {\r\n //UserFriendlyCalculator\r\n /*\r\n Ahmad Elmasri\r\n 01/03/2017\r\n Version 0.1\r\n This is a simple calculator with a GUI and runs one of two \r\n calculations with code set in place to catch invalid input\r\n */\r\n \r\n //CODE\r\n \r\n //Panel objects\r\n JFrame calculator = new JFrame(\"Calculator\");\r\n JPanel panel = new JPanel();//holds all interactive elements\r\n \r\n //Button Objects\r\n JButton submitNameButton = new JButton(\"Submit\");\r\n JButton startButton = new JButton();\r\n JButton squarePyramidProblem = new JButton(\"Square Based \"\r\n + \"Pyramid Area and Volume\");\r\n JButton submitAnswer = new JButton(\"Submit Answer\");\r\n JButton quadraticFormula = new JButton(\"Quadratic Roots Calculator\");\r\n \r\n //Label objects. User output and information\r\n JLabel intro = new JLabel(\"Hi there! I'm a simple calculator!\");\r\n JLabel nameAsker= new JLabel(\"What is your name?\");\r\n JTextField inputField = new JTextField();//Where user puts in answers\r\n JLabel noNameMessage = new JLabel(\"Hey there, you don't have a name!\");\r\n JLabel anyMessage = new JLabel();//all purpose messenger\r\n JLabel formulaViewer = new JLabel();\r\n JLabel userGuide = new JLabel(\"Press Submit after typing your name.\");\r\n \r\n \r\n //Initializing the GUI's traits and making it visible\r\n calculator.setVisible(true);\r\n panel.setLayout(null);//Ensures layout is coder influenced and not default\r\n calculator.setSize(500,500);\r\n \r\n //Setting the size and location of the buttons\r\n startButton.setBounds(50,50,50,50);\r\n squarePyramidProblem.setBounds(100,200,300,25);\r\n submitAnswer.setBounds(100,200,200,25);\r\n submitNameButton.setBounds(100,200,100,100);\r\n quadraticFormula.setBounds(100,225,300,25);\r\n \r\n \r\n //Setting size and location of labels and the textfield \r\n intro.setBounds(100,-200,200,500);\r\n formulaViewer.setBounds(100,75,500,500);\r\n nameAsker.setBounds(100,-425,200,1000);\r\n noNameMessage.setBounds(100,-85,200,500);// first 2 are xy, second 2 are size in xy\r\n inputField.setBounds(100,100,200,25);\r\n userGuide.setBounds(100,120,300,50);\r\n \r\n \r\n \r\n //Adds objects to the panel\r\n calculator.add(panel);\r\n panel.add(formulaViewer);\r\n panel.add(inputField);\r\n panel.add(nameAsker);//makes it interactive w/ users & coders\r\n panel.add(submitNameButton);\r\n panel.add(intro);\r\n panel.add(startButton);\r\n panel.add(squarePyramidProblem);\r\n panel.add(submitAnswer);\r\n panel.add(anyMessage);\r\n panel.add(noNameMessage);\r\n panel.add(userGuide);\r\n panel.add(quadraticFormula);\r\n \r\n //sets which objects are seen at the start screen\r\n squarePyramidProblem.setVisible(false);\r\n submitAnswer.setVisible(false);\r\n panel.setVisible(true);\r\n submitNameButton.setVisible(true);\r\n intro.setVisible(true);\r\n nameAsker.setVisible(true);\r\n inputField.setVisible(true);\r\n startButton.setVisible(false);//makes it invisible\r\n noNameMessage.setVisible(false);\r\n userGuide.setVisible(true);\r\n quadraticFormula.setVisible(false);\r\n \r\n//============================================================================== \r\n submitNameButton.addActionListener(new ActionListener(){ \r\n @Override\r\n public void actionPerformed(java.awt.event.ActionEvent e) { \r\n String name = inputField.getText(); \r\n //checks if there is no user input\r\n if(name.isEmpty()){\r\n \r\n // No name entered\r\n panel.repaint();\r\n calculator.repaint();//updates the screen (needs to be done periodically)\r\n anyMessage.setVisible(false);\r\n noNameMessage.setVisible(true);\r\n \r\n \r\n //name entered \r\n }else{\r\n //Starts the program and opens up the main menu for users\r\n nameAsker.setVisible(false);\r\n anyMessage.setText(\"Hello there, \" + name +\"!\" );\r\n userGuide.setText(\"Press the Start button to get started\");\r\n anyMessage.setBounds(100,-100,500,500);\r\n userGuide.setBounds(100,50,300,50);\r\n panel.repaint();\r\n calculator.repaint();\r\n noNameMessage.setVisible(false);\r\n anyMessage.setVisible(true);\r\n startButton.setText(\"Start\");\r\n startButton.setBounds(100,175,100,25);\r\n startButton.setVisible(true);\r\n submitNameButton.setVisible(false);\r\n intro.setVisible(false);\r\n \r\n }\r\n } \r\n }); \r\n \r\n//============================================================================== \r\n //start button is pressed\r\n startButton.addActionListener(new ActionListener(){\r\n @Override\r\n public void actionPerformed(java.awt.event.ActionEvent d) {\r\n anyMessage.setText(\"What kind of problem do you want to solve?\");\r\n formulaViewer.setVisible(false);\r\n submitAnswer.setVisible(false);\r\n squarePyramidProblem.setVisible(true);\r\n quadraticFormula.setVisible(true);\r\n calculator.repaint();\r\n panel.repaint();\r\n anyMessage.setVisible(true);\r\n numberOfClicks = \"Zero\";\r\n inputField.setText(\"\");\r\n userGuide.setText(\"Press a button to choose your problem\");\r\n //moves on to the main menu and shows options\r\n }\r\n });\r\n \r\n //============================================================================= \r\n //The square pyramid button is pressed\r\n squarePyramidProblem.addActionListener(new ActionListener(){\r\n @Override\r\n public void actionPerformed(java.awt.event.ActionEvent d) {\r\n anyMessage.setVisible(true);\r\n submitAnswer.setVisible(true);\r\n squarePyramidProblem.setVisible(false);\r\n quadraticFormula.setVisible(false);\r\n formulaViewer.setText(\"Volume Formula :(l\\u00B2*h)/3\" \r\n + \"\\n Area Formula: a\\u00B2 + 2(a)*\\u221A((a\\u00B2/4) + h\\u00B2)\");\r\n formulaViewer.setVisible(true);\r\n anyMessage.setText(\"What is the base length?\");\r\n calculator.repaint();\r\n panel.repaint();\r\n inputField.setText(\"\");\r\n userGuide.setText(\"Press the start button at anytime to go back\");\r\n problemType = \"Pyramid\";//changes the problem type to something else\r\n \r\n }\r\n });\r\n \r\n//==============================================================================\r\n //user submits their answer\r\n submitAnswer.addActionListener(new ActionListener(){\r\n @Override\r\n public void actionPerformed(java.awt.event.ActionEvent d) {\r\n //initializes the format and prepares objects for later use\r\n NumberFormat decimal = NumberFormat.getNumberInstance(); \r\n decimal.setMinimumFractionDigits( 3 );\r\n decimal.setMaximumFractionDigits( 3 );\r\n calculator.repaint();\r\n panel.repaint();\r\n anyMessage.setVisible(true);\r\n submitAnswer.setVisible(true);\r\n //The user selected pyramids \r\n if(problemType.equals(\"Pyramid\")){\r\n if(numberOfClicks.equals(\"Zero\")){\r\n while(true){\r\n try{\r\n //gets the values and stores them in the static double\r\n base = Double.parseDouble(inputField.getText());\r\n inputField.setText(\"\");\r\n numberOfClicks = \"One\";\r\n anyMessage.setText(\"What is the base height?\");\r\n break;\r\n \r\n }catch(Exception e){\r\n //not a number\r\n anyMessage.setText(\"No or not a number, try again\");\r\n break;\r\n }\r\n } \r\n //Second run to get the height\r\n }else if(numberOfClicks.equals(\"One\")){\r\n while(true){\r\n try{\r\n height = Double.parseDouble(inputField.getText());\r\n volume = (Math.pow(base, 2)*height) / 3;\r\n inputField.setText(\"\");\r\n area = Math.pow(base, 2) + (2*base)* \r\n ( Math.sqrt( Math.pow(base, 2)/4 + Math.pow(height, 2)) );\r\n anyMessage.setText(\"Your volume is \" + decimal.format(volume) \r\n + \"m\\u00B3\" + \" and your area is\" + decimal.format(area)\r\n + \"m\\u00B2\");\r\n break;//everything is formatted and outputted then printed\r\n \r\n }catch(Exception e){\r\n anyMessage.setText(\"No input or not a number, try again \");\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n \r\n \r\n // if the user selects quadratic it begins the a value collection\r\n else if(problemType.equals(\"Quadratic\")){\r\n if(numberOfClicks.equals(\"Zero\")){\r\n while(true){\r\n try{\r\n aValue = Double.parseDouble(inputField.getText());\r\n inputField.setText(\"\");\r\n numberOfClicks = \"One\";\r\n anyMessage.setText(\"What is the b value?\");\r\n break;\r\n \r\n }catch(Exception e){\r\n anyMessage.setText(\"No input or not a number, try again\");\r\n break;\r\n }\r\n } \r\n //second run for the b value\r\n }else if(numberOfClicks.equals(\"One\")){\r\n while(true){\r\n try{\r\n bValue = Double.parseDouble(inputField.getText());\r\n inputField.setText(\"\");\r\n numberOfClicks = \"Two\";\r\n anyMessage.setText(\"What is the c value?\");\r\n break;\r\n \r\n }catch(Exception e){\r\n anyMessage.setText(\"No input or not a number, try again\");\r\n break;\r\n }\r\n }\r\n }else if(numberOfClicks.equals(\"Two\")){\r\n while(true){\r\n cValue = Double.parseDouble(inputField.getText()); \r\n try{\r\n double discriminant = (Math.pow(bValue, 2) - 4*aValue*cValue);\r\n \r\n if( discriminant > 0){\r\n quadraticResult1 = (-bValue + Math.sqrt((Math.pow(bValue, 2)\r\n + (-4* aValue * cValue)))) / (2 * aValue);\r\n quadraticResult2 = (-bValue - Math.sqrt((Math.pow(bValue, 2) \r\n + (-4* aValue * cValue)))) / (2 * aValue);\r\n smallerRoot = Math.min(quadraticResult1, quadraticResult2);\r\n largerRoot = Math.max(quadraticResult1, quadraticResult2);\r\n anyMessage.setText(\"Root 1 is \" + decimal.format(smallerRoot)\r\n + \"and Root 2 is \" + decimal.format(largerRoot) );\r\n break;\r\n \r\n }else if( discriminant == 0){\r\n quadraticResult1 = (-bValue + Math.sqrt((Math.pow(bValue, 2)\r\n + (-4* aValue * cValue)))) / (2 * aValue);\r\n anyMessage.setText(\"The only root is \" + quadraticResult1);\r\n break;\r\n \r\n }else{\r\n anyMessage.setText(\"Sorry, no real roots. Try again\");\r\n break;\r\n }\r\n \r\n }catch(Exception e){\r\n anyMessage.setText(\"No input or not a number, try again \");\r\n break;\r\n }\r\n }\r\n }\r\n \r\n \r\n \r\n \r\n \r\n }\r\n }\r\n });\r\n//==============================================================================\r\n//the quadratic button\r\nquadraticFormula.addActionListener(new ActionListener(){ \r\n @Override\r\n public void actionPerformed(java.awt.event.ActionEvent e) { \r\n calculator.repaint();\r\n panel.repaint();\r\n anyMessage.setVisible(true);\r\n submitAnswer.setVisible(true);\r\n quadraticFormula.setVisible(false);\r\n squarePyramidProblem.setVisible(false);\r\n formulaViewer.setText(\"Quadratic Formula :-b + \" \r\n + \"\\u221A(b\\u00B2 + 4(a)(c))/2\");\r\n formulaViewer.setVisible(true);\r\n anyMessage.setText(\"What is the a value?\");\r\n inputField.setText(\"\");\r\n userGuide.setText(\"Press the start button at anytime to go back\");\r\n calculator.repaint();\r\n panel.repaint();\r\n problemType = \"Quadratic\";//changes to quadratic mode which has other roles\r\n\r\n } \r\n }); \r\n \r\n \r\n \r\n \r\n\r\n \r\n }", "public static void main(String[] args) {\n new Calculator();\n }", "public static void main(String[] args) {\n double cost;\n double diameter;\n double unitCost;\n\n//----Get data\n System.out.print(\"What size pizza : \");\n diameter = keyboard.nextDouble();\n System.out.print(\"What does it cost : \");\n cost = keyboard.nextDouble();\n\n//----Perform computation\n unitCost = computeUnitCost(diameter,cost);\n\n//----Display the diameter, the total cost, and the unit cost\n System.out.println(\"Diameter is \" + diameter);\n System.out.println(\"Total cost is \" + cost);\n System.out.println(\"Unit cost is \" + unitCost);\n\n }", "public static void main(String[] args) \r\n {\r\n // TODO: Read the input from the user and call produceAnswer with an equation\r\n \tScanner in = new Scanner(System.in);\r\n \tString problem = in.nextLine();\r\n \tin.close();\r\n \tSystem.out.printf(\"Result: %s\" , produceAnswer(problem));\r\n }", "public static void main(String[] args) {\n\t\tString one = JOptionPane.showInputDialog(\"Pick a number.\");\r\n\t\tint uno = Integer.parseInt(one);\r\n\t\tString two = JOptionPane.showInputDialog(\"Pick another number.\");\r\n\t\tint dos = Integer.parseInt(two);\r\n\t\t// 2. Customize pop-up to support add/subtract/multiply/divide operations.\r\n\t\tint operation = JOptionPane.showOptionDialog(null, \"Pick an operation.\", \"Operations\", 0,\r\n\t\t\t\tJOptionPane.INFORMATION_MESSAGE, null, new String[] { \"add\", \"subtract\", \"multiply\", \"divide\" },\r\n\t\t\t\tnull);\r\n\r\n\t\t// 5. Call the methods created in steps 3 and 4 to perform the appropriate operation.\r\n\t\tif(operation == 0) {\t\r\n\t\t\tadd(uno, dos);\r\n\t\t}\r\n\t\tif(operation == 1) {\t\r\n\t\t\tsubtract(uno, dos);\r\n\t\t}\r\n\t\tif(operation == 2) {\t\r\n\t\t\tmultiply(uno, dos);\r\n\t\t}\r\n\t\tif(operation == 3) {\t\r\n\t\t\tdivide(uno, dos);\r\n\t\t}\r\n\t\t// 6. Wrap steps 1, 2 and 5 in a for loop to repeat calculator operations\r\n\t}", "public void go() {\n Counter counter = new Counter();\n UserInput userInput = new UserInput();\n System.out.println(\"Input the x: \");\n int x = userInput.lengthInput();\n mainLogger.info(\"The user has entered {} as x\", x);\n mainLogger.info(\"Answer of the equation is: {}\", counter.wholeAnswer(x));\n }", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tSystem.out.println(\"Enter first Value: \");\n\t\tdouble a = scan.nextDouble();\n\t\tSystem.out.println(\"Enter second Value: \");\n\t\tdouble b = scan.nextDouble();\n\t\tSystem.out.println(\"Enter operation you would like to perform (Example +, - , *, /): \");\n\t\tString s = scan.next();\n\t\tscan.close();\n\t\tdouble ans;\n\t\t\n\t\tif(s.equals(\"+\")){\n\t\t\tans = a+b;\n\t\t}\n\t\telse if(s.equals(\"-\")){\n\t\t\tans = a-b;\n\t\t}\n\t\telse if(s.equals(\"*\")){\n\t\t\tans = a*b;\n\t\t}\n\t\telse if(s.equals(\"/\")){\n\t\t\tans = a/b;\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Invalid Operation\");\n\t\t\tans = 0;\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tSystem.out.printf(\"%.3f %s %.3f = %.3f\",a,s,b,ans);\n\n\n\n\n\t}", "public static void main(String[] args) {\nScanner scan = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Enter first number:\");\n\t\t\n\t\tdouble num1 = scan.nextDouble();\n\t\t \n\t\tSystem.out.println(\"Enter second number:\");\n\t\t\n\t\tdouble num2 = scan.nextDouble();\n\t\t \n\t\tSystem.out.println(\"Select operator: +, -, *, /, %\");\n\t\tString operator = scan.next();\n\t\t \n\t\t switch(operator) {\n\t\t \n\t\t case (\"+\"):\n\t\t\t System.out.println(\"result: \" +(num1+num2));\n\t\t break;\n\t\t case (\"-\"):\n\t\t\t System.out.println(\"result: \" +(num1-num2));\n\t\t break;\n\t\t case (\"*\"):\n\t\t\t System.out.println(\"result: \" +(num1*num2));\n\t\t break;\n\t\t case (\"/\"):\n\t\t\t System.out.println(\"result: \" + (num1/num2));\n\t\t break;\n\t\t case (\"%\"):\n\t\t\t System.out.println(\"result: \" + (num1%num2));\n\t\t break;\n\t\t default:\n\t\t\t System.out.println(\"impossible\");\n\t\t \n\t\t }\n\t\t \n\t\t \n\t}", "public static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tint x ,y ;\n\t\tSystem.out.println(\"enter your first value\");\n\t\tx= s.nextInt();\n\t\tSystem.out.println(\"enter second value\");\n y = s.nextInt();\n \n// int result = (x + y);\n// System.out.println(\"This is result :\" + result);\n \n System.out.println(\"enter the operator\");\n String operation = s.next();\n \n if(operation.equals(\"+\")) {\n \tSystem.out.println(\"this is the addidtion result \" + (x + y));\n }\n else if(operation.equals(\"-\")) {\n \tSystem.out.println(\"this is the substraction result \" + (x - y));\n }\n else if(operation.equals(\"*\")) {\n \tSystem.out.println(\"this is the multiplication result \" + (x * y));\n }\n else if(operation.equals(\"/\")) {\n \tSystem.out.println(\"this is the division result \" + (x / y));\n }\n else {\n \tSystem.out.println(\"please enter the correct operation\");\n }\n\t}", "public static void main(String[] args) {\n Calculator result = new Calculator();\n\n // Perform operations on the object and print the calculations with the result\n System.out.println(\"1 + 1 = \" + result.add(1, 1));\n System.out.println(\"23 - 52 = \" + result.subtract(23, 52));\n System.out.println(\"34 * 2 = \" + result.multiply(34, 2));\n System.out.println(\"12 / 3 = \" + result.divide(12, 3));\n System.out.println(\"12 / 7 = \" + result.divide(12, 7));\n System.out.println(\"3.4 + 2.3 = \" + result.add(3.4, 2.3));\n System.out.println(\"6.7 * 4.4 = \" + result.add(6.7, 4.4));\n System.out.println(\"5.5 - 0.5 = \" + result.subtract(5.5,0.5));\n System.out.println(\"10.8 / 2.2 = \" + result.divide(10.8, 2.2));\n }", "public void takeInput() {\n\t\tboolean flag = true;\n\t\tMain test = new Main();\n\t\twhile(flag) {\n\t\t\tLOGGER.info(\"Enter an option 1.Calculate Simple Interest 2.Calculate Compound Interest 3.exit\");\n\t\t\tint val = sc.nextInt();\n\t\t\tswitch(val) {\n\t\t\tcase 1:\n\t\t\t\ttest.takeInputForSimpleInterest();\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\ttest.takeInputForCompoundInterest();\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tflag = false;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tLOGGER.info(\"Enter valid input\");\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\n\t\t Calculator myCalculator = new Calculator();\n\t\t\n\t\t System.out.println(myCalculator.add(5, 7));\n\t\t \n\t\t System.out.println(myCalculator.subtract(45, 11));\n\t\t \n\t\t \n\t}", "private static void executeProgram() throws IllegalArgumentException {\n\t\twhile(true) {\n\t\t\tcalculateRoot();\n\t\t\tsc = new Scanner(System.in);\n\t\t\tSystem.out.print(\"Do you want to enter another equation? :\");\n\t\t\tString answer = sc.next();\n\t\t\tif(answer.equalsIgnoreCase(\"no\")) {\n\t\t\t\tSystem.out.println(\"Good bye!!!\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n Scanner scn =new Scanner(System.in);\n boolean b=true;\n while(b)\n {\n \n char ch=scn.next().charAt(0);\n \n if(ch=='+'||ch=='-'||ch=='*'||ch=='/'||ch=='%')\n {\n\t int N1 =scn.nextInt();\n\t int N2 =scn.nextInt();\n\t calculator(ch,N1,N2);\n }\n else if(ch!='X'&&ch=='x')\n\t {System.out.println(\"try again\");}\n else\n\tbreak;\n }\n }", "public static void main(String[] args) {\n\t Scanner s = new Scanner(System.in);\n \tSystem.out.println(\"Welcome to the Frac Calc Calculator\");\n \tSystem.out.print(\"Enter an expression: \");\n \tString expression = s.nextLine();\n \twhile(!expression.equalsIgnoreCase(\"quit\")) {\n \tSystem.out.println(produceAnswer(expression));\n \tSystem.out.print(\"Enter an expression: \");\n \texpression = s.nextLine();\n \t}\n\n }", "public static void main(String[] args) {\n\n\t\t// Check number of strings passed\n\t\tif (args.length != 3) {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"Usage: java Calculator operand1 operator operand2\");\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\t// The result of the operation\n\t\tint result = 0;\n\n\t\t// Determine the operator\n\t\tswitch (args[1].charAt(0)) {\n\t\tcase '+': result = Integer.parseInt(args[0]) +\n\t\t\t\tInteger.parseInt(args[2]);\n\t\tbreak;\n\t\tcase '-': result = Integer.parseInt(args[0]) -\n\t\t\t\tInteger.parseInt(args[2]);\n\t\tbreak;\n\t\tcase '.': result = Integer.parseInt(args[0]) *\n\t\t\t\tInteger.parseInt(args[2]);\n\t\tbreak;\n\t\tcase '/': result = Integer.parseInt(args[0]) /\n\t\t\t\tInteger.parseInt(args[2]);\n\t\t}\n\n\t\t// Display result\n\t\tSystem.out.println(args[0] + ' ' + args[1] + ' ' + args[2] + \" = \" + result);\n\n\n\n\n\t}", "public static void handleUserInput(EquationManipulator manipulator) {\n Scanner input = new Scanner(System.in);\n \n while(true) {\n // Gets the arguments from the equation\n String[] equation = buildEquation(manipulator);\n \n // Perform the operation on the equation\n handleArguments(equation, manipulator);\n \n // See if the user wants to continue\n System.out.print(\"Would you like to continue? (y to continue, any other letter to exit): \");\n if (!input.nextLine().trim().equalsIgnoreCase(\"y\")) {\n quitProgram(input);\n }\n \n // Adds seperation between text\n System.out.println(\"\");\n }\n }", "public static void main(String[] args) {\n\n sc = new Scanner(System.in);\n int a = 0;\n int b = 0;\n int c = 0;\n String d = \"\";\n\n while (true) {\n System.out.println(\"What do you want to calculate?\"\n + \"\\n1: Modulo\"\n + \"\\n2: Euklid\"\n + \"\\n3: \"\n );\n\n int input = sc.nextInt();\n\n switch (input)\n {\n case 1:\n System.out.println(\"Modulo Operation Active\");\n System.out.print(\"Please enter a: \");\n a = sc.nextInt();\n System.out.print(\"Please enter b: \");\n b = sc.nextInt();\n\n // For at find sfd af to tal.\n sfd(a, b);\n break;\n case 2:\n System.out.println(\"Euklids algoritme Active\\n\");\n System.out.print(\"Please enter a: \");\n a = sc.nextInt();\n System.out.print(\"Please enter b: \");\n b = sc.nextInt();\n System.out.print(\"Hvad sfd skal være lig: \");\n c = sc.nextInt();\n euklid(a, b, c);\n break;\n case 3:\n\n default:\n System.out.println(\"This is not a calculator \\n\");\n break;\n }\n\n }\n\n }", "public static void main(String[] args) {\n\t\tMagicCalculator magic = new MagicCalculator();\n\t\t\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.println(\"Pick a number\");\n\t\tint number = Integer.parseInt(input.nextLine());\n\t\tSystem.out.println(\"Pick another number\");\n\t\tint number2 = Integer.parseInt(input.nextLine());\n\t\tinput.close();\n\t\t\n\t\t//Uses classes inherited from parent class Calculator\n\t\tmagic.Add(number, number2);\n\t\tmagic.Subtract(number, number2);\n\t\tmagic.Multiplication(number, number2);\n\t\tmagic.Division(number, number2);\n\t\t\n\t\tmagic.SquareRoot(number);\n\t\tmagic.SquareRoot(number2);\n\t\t\n\t\t//Uses its own classes\n\t\tmagic.FindSine(number, number2);\n\t\tmagic.FindCosine(number, number2);\n\t\tmagic.FindTangent(number, number2);\n\t\t\n\t\tmagic.FindFactorial(number);\n\t\t//magic.FindFactorial(number2);\n\t\t\n\t\t\n\t}", "public static void operations() {\n System.out.println(\"Enter two numbers\");\n double a = getNumber();\n double b = getNumber();\n\n System.out.println(\"Enter operations (as one string)\");\n String input = scanner.nextLine();\n\n if (input.contains(\"+\")) {\n System.out.println(\"Sum: \" + sum(a, b));\n }\n if (input.contains(\"-\")) {\n System.out.println(\"Difference: \" + diff(a, b));\n }\n if (input.contains(\"*\")) {\n System.out.println(\"Product: \" + multi(a, b));\n }\n if (input.contains(\"/\")) {\n System.out.println(\"Fraction: \" + div(a, b));\n }\n }", "public static void main(String[] args) {\n \n /**\n * Creates scanner object.\n */\n Scanner scan = new Scanner(System.in);\n \n /**\n * Prompts for first input.\n */\n System.out.println(\"Enter your first number\");\n \n /**\n * Reads and stores user's first input.\n */\n double input1 = scan.nextDouble();\n \n /**\n * Prompts for user's second input.\n */\n System.out.println(\"Enter your second number\");\n \n /**\n * Reads and stores user's second input.\n */\n double input2 = scan.nextDouble();\n \n /**\n * Prints sum of inputs.\n */\n System.out.println(\"The sum of your numbers is: \" \n + (input1 + input2));\n \n /**\n * Prints difference of inputs.\n */\n System.out.println(\"The difference of your numbers is: \" \n + (input1 - input2));\n \n /**\n * Prints quotient of inputs.\n */\n System.out.println(\"The quotient of your numbers is: \" \n + (input1 / input2));\n \n /**\n * Prints product of inputs.\n */\n System.out.println(\"The product of your number is: \" \n + (input1 * input2));\n \n /**\n * Indicates that the program ran correctly.\n */\n System.out.println(\"Question three was called and ran sucessfully.\");\n \n /**\n * Closes Scanner.\n */\n scan.close();\n }", "public static void main(String[] args) throws IOException {\n String result;\n\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n String expression;\n do {\n // display prompt\n System.out.print(\"> \");\n // read input\n expression = in.readLine();\n // terminate if input empty\n if (!expression.equals(\"\")) {\n try {\n Differentiator diff = new Differentiator();\n result = diff.evaluate(expression, \"x\");\n System.out.println(result);\n } catch (RuntimeException re) {\n System.err.println(\"Error: \" + re.getMessage());\n } \n }\n } while (!expression.equals(\"\"));\n }", "public static void main(String[] args) {\n\t\tCalculator calculator =new Calculator();\n\n\t\tint add=calculator.add(10, 20);\n\t\tint sub=calculator.sub(10, 20);\n\t\tint mul=calculator.mul(10, 20);\n\t\tdouble div=calculator.div(10, 20);\n\t\t\n\t\tcalculator.displaySum(add, sub, mul, div);\n\t}", "public static void main(String[] args) {\n\n Locale.setDefault(Locale.US); //1\n Scanner sc = new Scanner(System.in); //1\n\n Calculator_Membros_Estaticos2 calc = new Calculator_Membros_Estaticos2(); //2\n System.out.print(\"Enter radius: \"); //3\n\n double radius = sc.nextDouble(); //4\n double c = calc.circumference(radius); //5\n double v = calc.volume(radius); //5\n\n System.out.printf(\"Circumference: %.2f%n\", c); //6\n System.out.printf(\"Volume: %.2f%n\", v); //6\n System.out.printf(\"PI value: %.2f%n\", calc.PI); //6\n\n sc.close();\n }", "public static void main(String[] args) {\n\n Scanner input = new Scanner(System.in);\n System.out.print(\"What is the first number? \");\n String num1Str = input.nextLine();\n System.out.print(\"What is the second number? \");\n String num2Str = input.nextLine();\n int num1Int = Integer.parseInt(num1Str);\n int num2Int = Integer.parseInt(num2Str);\n int sum = num1Int + num2Int;\n int difference = num1Int - num2Int;\n int product = num1Int * num2Int;\n double quotient = (double)num1Int / num2Int;\n System.out.printf(\"%d + %d = %d\\n%d - %d = %d\\n%d * %d = %d\\n%d / %d = %.2f\\n\", num1Int, num2Int, sum, num1Int, num2Int, difference, num1Int, num2Int, product, num1Int, num2Int, quotient );\n }", "public void start() {\r\n\t\tboolean running = true;\r\n\t\twhile(running) {\r\n\t\t\t// Storage variable for user input\r\n\t\t\tString userInput = null;\r\n\t\t\tString[] systemOutput = null;\r\n\t\t\t\r\n\t\t\t// Check first input\r\n\t\t\tuserInput = getUserFirstInput(input);\r\n\t\t\t\r\n\t\t\t// If first prompt is valid, process accordingly\r\n\t\t\tif(userInput != null) {\r\n\t\t\t\tswitch(userInput) {\r\n\t\t\t\t\tcase \"0\": \r\n\t\t\t\t\t\tSystem.out.println(\"Thanks for using!\");\r\n\t\t\t\t\t\trunning = false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tcase \"1\":\r\n\t\t\t\t\t\tsystemOutput = processor.calculateData(\"1\", null);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"2\":\r\n\t\t\t\t\t\tuserInput = getUserPartialOrFull(input);\r\n\t\t\t\t\t\tsystemOutput = processor.calculateData(\"2\", userInput);\r\n\t\t\t\t\t\tbreak;\r\n\r\n\t\t\t\t\tcase \"3\":\r\n\t\t\t\t\t\tuserInput = getUserZipCode(input);\r\n\t\t\t\t\t\tsystemOutput = processor.calculateData(\"3\", userInput);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tcase \"4\":\r\n\t\t\t\t\t\tuserInput = getUserZipCode(input);\r\n\t\t\t\t\t\tsystemOutput = processor.calculateData(\"4\", userInput);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tcase \"5\":\r\n\t\t\t\t\t\tuserInput = getUserZipCode(input);\r\n\t\t\t\t\t\tsystemOutput = processor.calculateData(\"5\", userInput);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tcase \"6\":\r\n\t\t\t\t\t\tsystemOutput = processor.calculateData(\"6\", null);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Print the output\r\n\t\t\t\tif(systemOutput != null) {\r\n\t\t\t\t\tSystem.out.println(\" \");\r\n\t\t\t\t\tSystem.out.println(\"BEGIN OUTPUT\");\r\n\t\t\t\t\tfor(String str : systemOutput) {\r\n\t\t\t\t\t\tSystem.out.println(str);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tSystem.out.println(\"END OUTPUT\");\r\n\t\t\t\t} \r\n\t\t\t}\r\n\t\t}\r\n\t\tinput.close();\r\n\t}", "public static void main(String[] args) {\r\n\t\tSystem.out.println(\"Testing Calculator\");\r\n\t\ttestConstructors();\r\n\t\ttestSetters();\r\n\t\ttestGetters();\r\n\t\ttestToString();\r\n\t}", "public static void main(String[] args) {\n intro();\n Scanner input = new Scanner(System.in);\n while( exit != true) {\n System.out.println(\"_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\");\n System.out.print(\"Please enter an operation ( +, -, /, *, = or Q to quit.) : \");\n String operator = input.nextLine();\n operator = getOperation(operator);\n if (operator.equals(\"Q\") || operator.equals(\"q\")) {\n exit = true;\n break;\n }\n int flag;\n if (operator.equals(\"+\")) {\n flag = 1;\n }\n else if (operator.equals(\"-\")) {\n flag = 2;\n }\n else if (operator.equals(\"/\")) {\n flag = 3;\n }\n else if (operator.equals(\"*\")) {\n flag = 4;\n }\n else {\n flag = 5;\n }\n System.out.print(\"Please enter a fraction (a/b) or integer (a): \");\n String fr1 = input.nextLine();\n Fraction f1 = getFraaction(fr1);\n System.out.print(\"Please enter a fraction (a/b) or integer (a): \");\n String fr2 = input.nextLine();\n Fraction f2 = getFraaction(fr2);\n Fraction fr3;\n switch (flag) {\n case 1: {\n fr3 = f1.add(f2);\n System.out.println(fr1.toString() + \" \" + operator + \" \" + fr2.toString() + \" = \" + fr3.toString());\n break;\n }\n case 2: {\n fr3 = f1.subtract(f2);\n System.out.println(fr1.toString() + \" \" + operator + \" \" + fr2.toString() + \" = \" + fr3.toString());\n break;\n }\n case 3: {\n fr3 = f1.divide(f2);\n System.out.println(fr1.toString() + \" \" + operator + \" \" + fr2.toString() + \" = \" + fr3.toString());\n break;\n }\n case 4: {\n fr3 = f1.multiply(f2);\n System.out.println(fr1.toString() + \" \" + operator + \" \" + fr2.toString() + \" = \" + fr3.toString());\n break;\n }\n case 5: {\n boolean bol = f1.equals(f2);\n System.out.println(fr1.toString() + \" \" + operator + \" \" + fr2.toString() + \" is \" + bol);\n break;\n }\n }\n }\n\n }", "public static void main(String[] args) {\n\t\tOhmsLaw ohmsCalc = new OhmsLaw();\n\t\t\n\t\t// Store user options in a local variable named \"options\"\n\t\tString options = ohmsCalc.displayUserOptions();\n\t\t\n\t\t// Make a prompt with user options to get input from the user\n\t\tint choice = (int) ohmsCalc.getCalcInput(options);\n\t\t\n\t\t// While the user choice is not 0 (exit), run the OhmsLaw calc method using their choice as input.\n\t\t// Then, get the next choice and repeat.\n\t\twhile(choice != 0) {\n\t\t\tohmsCalc.calc(choice);\n\t\t\tJOptionPane.showMessageDialog(null, ohmsCalc.displayResults());\n\t\t\tchoice = (int) ohmsCalc.getCalcInput(options);\n\t\t}\n\t}", "public static void main(String[] args) {\n\n Scanner scanner = new Scanner(System.in);\n\n System.out.println(\"Input first number: \");\n int inputNumber1 = scanner.nextInt();\n\n System.out.println(\"Input second number: \");\n int inputNumber2 = scanner.nextInt();\n\n System.out.println(inputNumber1 + \" x \" + inputNumber2 + \" = \" + inputNumber1 * inputNumber2);\n\n\n // 1.5 Write a Java program that takes a number as input and prints its multiplication table upto 10.\n\n System.out.println(\"Input a number: \");\n int number1 = scanner.nextInt();\n\n for (int i = 0; i < 10; i++) {\n System.out.println(number1 + \" x \" + (i + 1) + \" = \" + (number1 * (i + 1)));\n }\n\n // 1.6 print the area and perimeter of a circle.\n\n double radius = 7.5;\n\n double perimeter = 2 * Math.PI * radius;\n double area = Math.PI * radius * radius;\n\n System.out.println(\"Perimeter is = \" + perimeter);\n System.out.println(\"Area is = \" + area);\n\n // 1.7 Write a Java program to convert temperature from Fahrenheit to Celsius degree.\n\n System.out.println(\"Input a degree in Fahrenheit:\");\n\n double fahrenheit = scanner.nextDouble();\n\n double celsius = ((fahrenheit - 32) * 5 / 9);\n\n System.out.println(fahrenheit + \" degree Fahrenheit is equal to \" + celsius + \" in Celsius\");\n\n // 1.8 Write a Java program that reads a number in inches, converts it to meters.\n\n System.out.println(\"Input a value for inch: \");\n\n double inch = scanner.nextDouble();\n double meters = inch * 0.0254;\n\n System.out.println(inch + \" inch is \" + meters + \" meters\");\n\n // 1.9 Write a Java program to get a number from the user and print whether it is positive or negative.\n\n System.out.print(\"Input a number: \");\n\n int num = scanner.nextInt();\n\n if (num > 0) {\n System.out.println(\"Number is positive\");\n } else if (num < 0) {\n System.out.println(\"Number is negative\");\n } else {\n System.out.println(\"Number is zero\");\n }\n\n // 1.10 Take three numbers from the user and print the greatest number.\n\n System.out.print(\"Input the 1st number: \");\n int num1 = scanner.nextInt();\n\n System.out.println(\"Input the 2nd number: \");\n int num2 = scanner.nextInt();\n\n System.out.println(\"Input the 3rd number: \");\n int num3 = scanner.nextInt();\n\n if ((num1 > num2) && (num1 > num3))\n System.out.println(\"The greatest: \" + num1);\n\n if ((num2 > num1) && (num2 > num3))\n System.out.println(\"The greatest: \" + num2);\n\n if ((num3 > num1) && (num3 > num2))\n System.out.println(\"The greatest: \" + num3);\n\n // 1.11 Write a program in Java to input 5 numbers from the keyboard and find their sum and average.\n\n System.out.println(\"Input the 5 numbers : \");\n\n int num5, sum = 0;\n\n for (int i = 0; i < 5; i++) {\n num5 = scanner.nextInt();\n sum = sum + num5;\n }\n\n int average = sum / 5;\n System.out.println(\"The sum of 5 no is : \" + sum + \"\\nThe Average is : \" + average);\n\n // 1.12 Write a program Check Whether Number is Even or Odd\n\n System.out.println(\"Input: \");\n int num6 = scanner.nextInt();\n\n System.out.println(\"Input: \");\n int num7 = scanner.nextInt();\n\n if (num6 % 2 == 0) {\n System.out.println(\"Even\");\n }\n if (num7 % 2 == 0) {\n System.out.println(\"Even\");\n } else {\n System.out.println(\"Odd\");\n }\n }", "public void main()throws IOException\n {\n BufferedReader br= new BufferedReader( new InputStreamReader(System.in));\n System.out.println(\" 1>. Enter plus symbol for addition \");\n System.out.println(\" 2>. Enter minus symbol for substraction \");\n System.out.println(\" 3>. Enter star symbol for multiplication \");\n System.out.println(\" 4>. Enter backslash symbol for division \");\n System.out.println(\" 5>. Enter percentage symbol for remainder \");\n System.out.println(\" Enter the user choice \");\n String s;\n s=br.readLine();\n char ch=s.charAt(0);\n double n1,n2;\n switch(ch)\n {\n case '+':\n n1=Double.parseDouble(br.readLine());\n n2=Double.parseDouble(br.readLine());\n double add=n1+n2;\n System.out.println(\" The total of the two is \"+add);\n break;\n case '-':\n n1=Double.parseDouble(br.readLine());\n n2=Double.parseDouble(br.readLine());\n double sub=n1-n2;\n System.out.println(\" The difference of the two is \"+sub);\n break;\n case '*':\n n1=Double.parseDouble(br.readLine());\n n2=Double.parseDouble(br.readLine());\n double mul=n1*n2;\n System.out.println(\" The product of the two is \"+mul);\n break;\n case '/':\n n1=Double.parseDouble(br.readLine());\n n2=Double.parseDouble(br.readLine());\n double div=n1/n2;\n System.out.println(\" The quotient of the two is \"+div);\n break;\n case '%':\n n1=Double.parseDouble(br.readLine());\n n2=Double.parseDouble(br.readLine());\n double rem=n1%n2;\n System.out.println(\" The remainder of the two is \"+rem);\n break;\n default:\n System.out.println(\" Wrong Choice\");\n break;\n }\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Adding: 10+20 = \" + Calculator.add(10, 20));\n\t\tSystem.out.println(\"Subtracting: 20-10 = \" + Calculator.subtract(20, 10));\n\t\tSystem.out.println(\"Multiplying: 2*10 = \"+ Calculator.multiply(2, 10));\n\t\tSystem.out.println(\"Dividing: 10 / 2 = \" + Calculator.divide(10, 2));\n\t\tSystem.out.println(\"Square root of 64 = \" + MagicCalculator.squareRoot(64));\n\t\tSystem.out.println(\"Sine of 0 = \" + MagicCalculator.sin(0));\n\t\tSystem.out.println(\"Cosine of 0 = \" + MagicCalculator.cos(0));\n\t\tSystem.out.println(\"Tangent of 0 = \" + MagicCalculator.tan(0));\n\t\tSystem.out.println(\"5! = \" + MagicCalculator.factorial(5));\n\t}", "public static void main(String[] args) {\r\n\r\n\t\tScanner sc = new Scanner(System.in);\r\n\r\n\t\t//welcomes user to the math tutor\r\n\t\tSystem.out.println(\"Hi, I am Pi, your personal math tutor. Today we will be practicing basic arthmetics\");\r\n\t\tSystem.out.println(\"What is your name?\");\r\n\t\tString name = sc.nextLine();\r\n\r\n\t\t//generates the numbers\r\n\t\tint firstDigit = (int)(Math.random()*10)+1;\r\n\t\tint secondDigit = (int)(Math.random()*10)+1;\r\n\t\tint operator = (int)(Math.random()*4)+1;\r\n\t\tdouble answer;\r\n\r\n\t\t//assigns operator\r\n\t\tswitch (operator) \r\n\t\t{ \r\n\t\tcase 1: System.out.println(name + \" What is \" + firstDigit + \"+\" + secondDigit + \"?\");\r\n\t\t\tdouble userAnswerA = sc.nextInt();\r\n\t\t\tdouble correctAnswerA = firstDigit + secondDigit;\r\n\r\n\t\t//checks the user's answer\r\n\t\tif (userAnswerA == correctAnswerA)\r\n\t\t\tSystem.out.println (\"Good job! You got the right answer!\");\r\n\t\telse\t\r\n\t\t\tSystem.out.println(\"Sorry that's the wrong answer. You should have gotten \" + correctAnswerA + \".\");\r\n\t\tbreak;\r\n\r\n\t\tcase 2: System.out.println(name + \" What is \" + firstDigit + \"-\" + secondDigit + \"?\"); \r\n\t\t\tdouble userAnswerS = sc.nextInt();\r\n\t\t\tdouble correctAnswerS = firstDigit - secondDigit;\r\n\r\n\t\t//checks the user's answer\r\n\t\tif (userAnswerS == correctAnswerS)\r\n\t\t\tSystem.out.println (\"Good job! You got the right answer!\");\r\n\t\telse\t\r\n\t\t\tSystem.out.println(\"Sorry that's the wrong answer. You should have gotten \" + correctAnswerS + \".\");\r\n\t\tbreak;\r\n\r\n\t\tcase 3: System.out.println(name + \" What is \" + firstDigit + \"/\" + secondDigit + \"?\"); \r\n\t\t\tdouble userAnswerD = sc.nextInt();\r\n\t\t\tdouble correctAnswerD = firstDigit / secondDigit;\r\n\r\n\t\t//checks the user's answer\r\n\t\tif (userAnswerD == correctAnswerD)\r\n\t\t\tSystem.out.println (\"Good job! You got the right answer!\");\r\n\t\telse\t\r\n\t\t\tSystem.out.println(\"Sorry that's the wrong answer. You should have gotten \" + correctAnswerD + \".\");\r\n\t\tbreak;\r\n\t\tcase 4: System.out.println(name + \" What is \" + firstDigit + \"*\" + secondDigit + \"?\");\r\n\t\t\tdouble userAnswerM = sc.nextInt();\r\n\t\t\tdouble correctAnswerM = firstDigit * secondDigit;\r\n\r\n\t\t//checks the user's answer\r\n\t\tif (userAnswerM == correctAnswerM)\r\n\t\t\tSystem.out.println (\"Good job! You got the right answer!\");\r\n\t\telse\t\r\n\t\t\tSystem.out.println(\"Sorry that's the wrong answer. You should have gotten \" + correctAnswerM + \".\");\r\n\t\tbreak;\r\n\t\t}\r\n\r\n\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tMyCalc cal = new MyCalc();\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tSystem.out.println(\"두 정수를 입력하세요.\");\n\t\tSystem.out.print(\"a > \");\n\t\tint a = Integer.parseInt(scan.nextLine());\n\t\tSystem.out.print(\"b > \");\n\t\tint b = Integer.parseInt(scan.nextLine());\n\n\t\tSystem.out.println(a + \" + \" + b + \" = \" + cal.add(a, b));\n\t\tSystem.out.println(a + \" - \" + b + \" = \" + cal.sub(a, b));\n\t\tSystem.out.println(a + \" * \" + b + \" = \" + cal.mul(a, b));\n\t}", "public static void main(String[] args) {\n\t\tScanner teclado = new Scanner(System.in);\n\t\tint radio;\n\t\tint base;\n\t\tint altura;\n\t\tint lado;\n\t\tString op;\n\t\tdo {\n\t\t\tSystem.out.println(\"De estas figuras (Círculo, cuadrado o triángulo), ¿Que área quieres calcular?: \");\n\t\t\top = teclado.nextLine();\n\t\t\tif (op.equals(\"Circulo\") || op.equals(\"Cuadrado\") || op.equals(\"Triangulo\")) {\n\t\t\t\t\n\t\t\t}else {\n\t\t\t\tSystem.out.println(\"Error\");\n\t\t\t}\n\t\t} while (!op.equals(\"Circulo\") && !op.equals(\"Cuadrado\") && !op.equals(\"Triangulo\"));\n\t\tif (op.equals(\"Circulo\")) {\n\t\t\tSystem.out.println(\"Dime el radio\");\n\t\t\tradio = teclado.nextInt();\n\t\t\tCirculo(op, radio);\n\t\t}else if (op.equals(\"Cuadrado\")) {\n\t\t\tSystem.out.println(\"Dime un lado\");\n\t\t\tlado = teclado.nextInt();\n\t\t\tCuadrado(op,lado);\n\t\t}else {\n\t\t\tSystem.out.println(\"Dime la altura\");\n\t\taltura = teclado.nextInt();\n\t\tSystem.out.println(\"Dime la base\");\n\t\tbase = teclado.nextInt();\n\t\tTriangulo(op,base,altura);\n\t\t}\n\t\tteclado.close();\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\tCalculatorC calc=new CalculatorC();\n\t\t\n\t\tcalc.add(20, 30);\n\t\tInhertCalculatorP\tcalcp=new InhertCalculatorP();\n\t\tint result=calc.add(10,30);\n\tSystem.out.println(result);\n\t\n\t}", "public void executeTask11 () {\n double r = UserInput.input(\"Input rsdius:\");\n\n //Methods which take one parameter - radius of circle and returns perimeter and lenth:\n double l = CircleCalculator.calculateLength(r);\n double s = CircleCalculator.calculateArea(r);\n\n //Print to the console finaly results:\n Printer.print(\"Circle with r = \" + r + \": \");\n Printer.print(\"L = \" + l);\n Printer.print(\"S = \" + s);\n }", "public static void main(String[] args) {\n EquationManipulator manipulator = new EquationManipulator();\n \n if (args.length == 3) {\n // arguments were passed in from the command line\n System.out.println(\"It looks like you passed in some arguments. Let me fetch those for you.\");\n checkPassedInArguments(args, manipulator);\n } else if (args.length != 0) {\n // User passed in an incorrect number of arguments\n printErrorMessage();\n handleUserInput(manipulator);\n } else { \n // User did not pass in any arguments\n handleUserInput(manipulator);\n }\n\n }", "public static void main (String args[]) {\r\n\t\t\r\n\t\tCalculator calc = new Calculator();\r\n\t\tcalc.add();\r\n\t\tcalc.div();\r\n\t\tcalc.mul();\r\n\t\tcalc.sub();\r\n\t\t\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tint a=0, b=0, res=0;\n\t\tString sel=null;\n\t\tScanner entrada= new Scanner(System.in);\n System.out.println(\"Selecciona la opcion:\\n \");\n System.out.println(\"+: Suma\"\n \t\t + \"\\n-: Resta\"\n \t\t + \"\\n*: Multiplicacion\"\n \t\t + \"\\n/: Division\");\n sel=entrada.next();\n switch(sel){ //creo suma con el Scanner, luego copio esto mismo para la resta,mult y div\n \t case \"+\":\n \t\t System.out.println(\"Ha seleccionado suma\\n Ingrese los valores\");\n \t\t System.out.println(\"Ingrese el primer numero:\");\n \t\t a=entrada.nextInt();\n \t\t System.out.println(\"Ingrese el segundo numero: \");\n \t\t b=entrada.nextInt();\n \t\t res=a+b;\n \t\t System.out.println(a+\"+\"+b+\"=\"+res);\n \t\t \t\t break;\n \t case \"-\":\n \t\t System.out.println(\"Ha seleccionado resta\\n Ingrese los valores\");\n \t\t System.out.println(\"Ingrese el primer numero:\");\n \t\t a=entrada.nextInt();\n \t\t System.out.println(\"Ingrese el segundo numero: \");\n \t\t b=entrada.nextInt();\n \t\t res=a-b;\n \t\t System.out.println(a+\"-\"+b+\"=\"+res);\n \t\t \t\t break;\n \t case \"*\":\n \t\t System.out.println(\"Ha seleccionado multiplicacion\\n Ingrese los valores\");\n \t\t System.out.println(\"Ingrese el primer numero:\");\n \t\t a=entrada.nextInt();\n \t\t System.out.println(\"Ingrese el segundo numero: \");\n \t\t b=entrada.nextInt();\n \t\t res=a*b;\n \t\t System.out.println(a+\"*\"+b+\"=\"+res);\n \t\t \t\t break;\n \t case \"/\":\n \t\t System.out.println(\"Ha seleccionado division\\n Ingrese los valores\");\n \t\t System.out.println(\"Ingrese el primer numero:\");\n \t\t a=entrada.nextInt();\n \t\t System.out.println(\"Ingrese el segundo numero: \");\n \t\t b=entrada.nextInt();\n \t\t res=a/b;\n \t\t System.out.println(a+\"/\"+b+\"=\"+res);\n \t\t \t\t break;\n \t\t \t\t default:\n \t\t \t\t\t System.out.println(\"Esa opcion no existe\");\n }\n \n\t}", "private void run()\n {\n\tString[] info = null;\n\tnumber = new Stack<String>();\n\totherNumber = new Stack<String>();\n\tScanner scan = new Scanner(System.in);\n\twhile(scan.hasNext())\n\t{\n\t info = scan.nextLine().trim().split(\"\\\\s+\");\n\t if(info.length == 2)\n\t {\n\t\tnum1 = isValid(info[0]);\n\t\tnum2 = isValid(info[1]);\n\t\tif(num1 != null && num2 != null)\n\t\t{\n\t\t generateLists();\n\t\t addition();\n\t\t outputData();\n\t\t clear();\n\t\t}\n\t\telse error();\n\t }\n\t else error();\n\t}\n }", "public static void getInput() {\n\t\tselectOption();\n\t\tsc = new Scanner(System.in);\n\t userInput2 = sc.nextInt();\n\t \n\t switch (userInput2) {\n\t \tcase 1: System.out.print(\"Enter the number for the factorial function: \");\n\t \t\t\tsc = new Scanner(System.in);\n\t\t\t\t userInput2 = sc.nextInt();\n\t\t\t\t System.out.println(\"The factorial of \" + userInput2 + \" is \" + factorial(userInput2));\n\t\t\t\t getInput();\n\t\t \t\tbreak;\n\t \tcase 2: System.out.print(\"Enter the Fibonacci position: \");\n\t\t\t\t\tsc = new Scanner(System.in);\n\t\t\t\t userInput2 = sc.nextInt();\n\t\t\t\t System.out.println(\"The fibonacci number at position \" + userInput2 + \" is \" + fib(userInput2));\n\t\t\t\t getInput();\n\t\t \t\tbreak;\n\t \tcase 3: System.out.print(\"Enter the first number: \");\n\t\t\t\t\tsc = new Scanner(System.in);\n\t\t\t\t userInput2 = sc.nextInt();\n\t\t\t\t System.out.print(\"Enter the second number: \");\n\t\t\t\t sc = new Scanner(System.in);\n\t\t\t\t userInput3 = sc.nextInt();\n\t\t\t\t System.out.println(\"The GCD of the numbers \" + userInput2 + \" and \" + userInput3 + \" is \" + GCD(userInput2, userInput3));\n\t\t\t\t getInput();\n\t\t \t\tbreak;\n\t \tcase 4: System.out.print(\"Enter n: \");\n\t\t\t\t\tsc = new Scanner(System.in);\n\t\t\t\t userInput2 = sc.nextInt();\n\t\t\t\t System.out.print(\"Enter r: \");\n\t\t\t\t sc = new Scanner(System.in);\n\t\t\t\t userInput3 = sc.nextInt();\n\t\t\t\t System.out.println(userInput2 + \" choose \" + userInput3 + \" is \" + choose(userInput2, userInput3));\n\t\t\t\t getInput();\n\t\t \t\tbreak;\n\t \tcase 5: System.out.print(\"Enter n: \");\n\t\t\t\t\tsc = new Scanner(System.in);\n\t\t\t\t userInput2 = sc.nextInt();\n\t\t\t\t System.out.print(\"Enter k: \");\n\t\t\t\t sc = new Scanner(System.in);\n\t\t\t\t userInput3 = sc.nextInt();\n\t\t\t\t System.out.println(\"The Josephus of \" + userInput2 + \" and \" + userInput3 + \" is \" + josephus(userInput2, userInput3));\n\t\t\t\t getInput();\n\t\t \t\tbreak;\n\t \tcase 6: System.out.println(\"Ending program...\");\n \t\t\t\tSystem.exit(0);\n \t\t\t\tbreak;\n \t\tdefault: System.out.println(\"\\nPlease enter number between 1 and 6\\n\");\n\t \t\t\tgetInput();\n\t \t\t\tbreak;\n\t }\t\n\t}", "public static void main(String[] args) {\n CalculatorServiceImplementation someService = new CalculatorServiceImplementation();\n\n Calculator myCalculator = new Calculator(someService);\n\n System.out.println(myCalculator.add(8, 7));\n System.out.println(myCalculator.subtract(8, 7));\n System.out.println(myCalculator.multiply(8, 7));\n\n }", "public static void main (String args[]){\r\n\t\tCalculator s = new Calculator();\r\n\t\ts.launchFrame();\r\n\t}", "public static void main(String args[]) {\n\t\t\tAddingMachine MyCalculator = new AddingMachine();\n\t\t\t\n\t\t\t//operations\n\t\t\tMyCalculator.add(4);\n\t\t\tMyCalculator.subtract(2);\n\t\t\tMyCalculator.add(5);\n\t\t\t\n\t\t\t//Print out the string value and the total\n\t\t\tSystem.out.println(MyCalculator.toString());\n\t\t\tSystem.out.println(\"Total: \" + MyCalculator.getTotal());\n\t\t\t\n\n\t\t\t\n\n\t\t\t\n\t\t\t\n\t\t\t\n\t }", "public static void main (String[] args){\n\tScanner in = new Scanner(System.in);\n\t\n\tSystem.out.print(\"Enter the first number: \");\n\tint n1 = in.nextInt();\n\t\n\tSystem.out.print(\"Enter the second numer: \");\n\tint n2 = in.nextInt();\n\t\n\tint ans = n1 + n2;\n\tSystem.out.printf(\"%d + %d = %d\\n\", n1, n2, ans);\n\t\n\tans = n1 - n2;\n\tSystem.out.printf(\"%d - %d = %d\\n\", n1, n2, ans);\n\t\n\tans = n1 * n2;\n\tSystem.out.printf(\"%d * %d = %d\\n\", n1, n2, ans);\n\t\n\tans = n1 / n2;\n\tSystem.out.printf(\"%d / %d = %d\\n\", n1, n2, ans);\n\t\n\tin.close();\n\t\t\n\t}", "public static void main(String [] args) {\n for(;;){\n System.out.println(\"These program solve for simultaneous 2 variable X and Y,\");\n System.out.println(\"Area and Perimeter of a circle,\");\n System.out.println(\"and Sum of Arithmathic Progression\" );\n System.out.println (\"select out the options\");\n System.out.println(\"1:Simultanous\\n2:Area and perimeter of a circle\\n3:Sum of an Arithmetic Progression \");\n System.out.print(\"option: \");\n Scanner input =new Scanner(System.in);// to select input for option\\\\\n Mathequation math=new Mathequation();\n int option;//option input \n try { //catching wrong input and Wrong arithmetic expression such as String and undefine value\n option=input.nextInt();//input for the option\n switch(option){//checking over option inputted\n case 1:math.simultaneous();\n break;\n case 2:math.area();\n break;\n case 3:math.sumOfAP();\n break;\n default:\n System.out.print(\"your input doesn't not match the option\"); }}\n catch(InputMismatchException | ArithmeticException ar){//catching wrong input and catching undefined value\n System.out.println(\"your input is incorrect retry again\"); \n } \n System.out.print(\"Enter 'N' to end the program: \");\n String arr = input.next();\n if(arr.equals(\"N\")){\n break;\n }\n \n }\n \n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);//sc is a point of contact for console\n\t\t\n\t\tSystem.out.println(\"enter num1:\");\n\t\tint n1 = sc.nextInt();\n\t\t\n\t\tSystem.out.println(\"enter num2:\");\n\t\tint n2 = sc.nextInt();\n\t\t\n\t\t//perform operations\n\t\tint sum = n1 + n2;\n\t\tint sub = n1 - n2;\n\t\tint mul = n1 * n2;\n\t\tint div = n1 / n2;\n\t\t\n\t\tSystem.out.println(\"sum =\" +sum);\n\t\tSystem.out.println(\"sub =\" +sub);\n\t\tSystem.out.println(\"mul =\" +mul);\n\t\tSystem.out.println(\"div =\" +div);\n\t\t\n}", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\t// create an BasePlusCommEmployee object and assign it to employee\n\t\tBasePlusCommEmployee employee = new BasePlusCommEmployee();\n\n\t\t// prompt user\n\t\tSystem.out.println(\"Please enter the employee ID:\");\n\t\tint employeeId = Integer.parseInt(input.nextLine()); // read a line of text\n\t\temployee.setEmployeeID(employeeId);\n\n\t\tSystem.out.println(\"Please enter the name:\");\n\t\tString employeeName = input.nextLine(); // read a line of text\n\t\temployee.setName(employeeName);\n\n\t\tSystem.out.println(\"Please enter the base salary:\");\n\t\tint employeeSalary = Integer.parseInt(input.nextLine()); // read a line of text\n\t\temployee.setBaseSalary(employeeSalary);\n\n\t\tSystem.out.println(\"Please enter the commission rate:\");\n\t\tdouble employeeCmRate = Double.parseDouble(input.nextLine()); // read a line of text\n\t\temployee.setCommissionRate(employeeCmRate);\n\n\t\tSystem.out.println(\"Please enter the total sales:\");\n\t\tdouble employeeSale = Double.parseDouble(input.nextLine()); // read a line of text\n\t\temployee.setTotalSales(employeeSale);\n\n\t\tSystem.out.println(); // outputs a blank line\n\n\t\t//display\n\t\temployee.getEmployeeInfo();\n\t\t\n\t}", "public static void main(String[] args) {\n\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner reader = new Scanner(System.in);\n System.out.print(\"Informe dois números: \");\n\n double primeiro = reader.nextDouble();\n double segundo = reader.nextDouble();\n System.out.print(\"Informe um operador (+, -, *, /): \");\n char operador = reader.next().charAt(0);\n double resultado;\n switch(operador)\n {\n case '+':\n resultado = primeiro + segundo;\n break;\n case '-':\n resultado = primeiro - segundo;\n break;\n case '*':\n resultado = primeiro * segundo;\n break;\n case '/':\n resultado = primeiro / segundo;\n break;\n\n default:\n System.out.printf(\"Erro! operador não está correto\");\n return;\n }\n System.out.printf(\"%.1f %c %.1f = %.1f\", primeiro, operador, segundo, resultado);\n }", "public void executeTask10 () {\n double a = UserInput.input(\"Input a:\");\n double b = UserInput.input(\"Input b:\");\n\n //Methods which take TWO parameters - sides of rectangle and returns perimeter and area:\n double s = RectangleCalculator.calculateArea(a, b);\n double p = RectangleCalculator.calculatePerimeter(a, b);\n\n //Print to the console finaly results:\n Printer.print(\"Square with a = \" + a + \" and b = \" + b + \": \");\n Printer.print(\"S = \" + s);\n Printer.print(\"P = \" + p);\n }", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n // Objects of polynomial class (Linked list) to store expressions.\n Polynomial polynomial = new Polynomial();\n Polynomial polynomial1 = new Polynomial();\n\n // input expression in the form of string.\n String equation1 = scan.nextLine();\n String equation2 = scan.nextLine();\n\n // stringToLinkedList method to convert given string to linked list of polynomial.\n polynomial.stringToLinkedList(equation1);\n polynomial1.stringToLinkedList(equation2);\n\n // resultantPolynomial to store addition of two expressions in linked list of polynomial type.\n Polynomial resultantPolynomial = new Polynomial();\n resultantPolynomial.addPolynomial(polynomial, polynomial1);\n\n // Display polynomial equation on console.\n resultantPolynomial.display();\n }", "public static void main(String[] args) {\n\t\t\t\t\t\t\r\n\t\tint num1 = 100;\r\n\t\tint num2 = 50;\r\n\t\t\r\n\t\tCalcOperation calc = new CalcOperation();\r\n\t\t\r\n\t\tSystem.out.println(\"Addition of \"+num1+\" and \"+num2+\" is: \"+calc.addition(num1, num2));\r\n\t\tSystem.out.println(\"Subraction of \"+num1+\" and \"+num2+\" is: \"+calc.subraction(num1, num2));\r\n\t\tSystem.out.println(\"Multiplication of \"+num1+\" and \"+num2+\" is: \"+calc.multipliation(num1, num2));\r\n\t\tSystem.out.println(\"Division of \"+num1+\" and \"+num2+\" is: \"+calc.division(num1, num2));\r\n\t}", "public static void main(String[] args) {\n\t\tCalculator calculator = new Calculator();\n\t\tint result = calculator.add(4).add(5).subtract(3).out();\n\t\tif(calculator.isError)\n\t\t\tSystem.out.println(\"0으로 나눌 수 없습니다.\");\n\t\telse\n\t\t\tSystem.out.print(result);\n\t}", "public static void main(String[] args) {\n Scanner userInput = new Scanner(System.in);\n boolean quit =false;\n Bank bank = new Bank(\"Dummy\");\n while(!quit){\n System.out.println(\"Please provide the input now\");\n switch (userInput.nextInt()){\n case 1:\n printInstructions();\n break;\n case 2:\n System.out.println(\"Good Please provide the name of the bank\");\n bank = startBank();\n break;\n case 3:\n startBranch(bank);\n break;\n case 4:\n bank.addCustomer();\n break;\n case 5:\n bank.customerTransaction();\n break;\n case 6:\n bank.updateTransaction();\n break;\n case 7:\n getBankDetail(bank);\n break;\n case 8:\n bank.getBalancePerBranch();\n break;\n case 9:\n quit = true;\n System.out.println(\"quitting the applicaiton\");\n break;\n default:\n System.out.println(\"Please give correct input\");\n }\n\n }\n }", "public static void main(String[] args) {\n Scanner sc=new Scanner(System.in);\n System.out.println(\"Enter a chemical equation\");\n String e=sc.nextLine();\n e=e.trim();\n String E=e;\n StringHandling obj=new StringHandling(E);\n obj.removeSpaces();\n obj.display();\n obj.balance();\n \n obj.display();\n obj.findReactants();\n obj.findProducts();\n \n \n }", "private static void takeInput() throws IOException {\n\n System.out.println(\"Enter number 1\");\n BufferedReader br= new BufferedReader(new InputStreamReader(System.in));\n String number1=br.readLine();\n System.out.println(\"Enter number 2\");\n String number2=br.readLine();\n System.out.println(\"Operation\");\n String op=br.readLine();\n //WhiteHatHacker processes the input\n WhiteHatHacker hack=new WhiteHatHacker(number1,number2,op);\n hack.processInput();\n }", "public static void main(String[] args) {\n System.out.println(\"Nombre d'arguments : \" + args.length);\n for(int i = 0; i < args.length; i++) {\n System.out.println(\"Argument \" + i + \" : \" + args[i]);\n }\n \n if(args.length > 2) {\n float res = 0;\n \n switch(args[1]) {\n case \"+\":\n res = Float.parseFloat(args[0]) + Float.parseFloat(args[2]);\n System.out.println(\"Résultat : \" + args[0] + \" \" + args[1] + \" \" + args[2] + \" = \" + res);\n break;\n case \"-\":\n res = Float.parseFloat(args[0]) - Float.parseFloat(args[2]);\n System.out.println(\"Résultat : \" + args[0] + \" \" + args[1] + \" \" + args[2] + \" = \" + res);\n break;\n case \"x\":\n res = Float.parseFloat(args[0]) * Float.parseFloat(args[2]);\n System.out.println(\"Résultat : \" + args[0] + \" \" + args[1] + \" \" + args[2] + \" = \" + res);\n break;\n case \"/\":\n res = Float.parseFloat(args[0]) / Float.parseFloat(args[2]);\n System.out.println(\"Résultat : \" + args[0] + \" \" + args[1] + \" \" + args[2] + \" = \" + res);\n break;\n default:\n res = Float.parseFloat(args[0]) + Float.parseFloat(args[2]);\n System.out.println(\"Résultat : \" + args[0] + \" + \" + args[2] + \" = \" + res);\n }\n } else {\n System.out.println(\"Pas assez d'arguments pour effectuer un calcul.\");\n }\n \n \n /*\n //Exo 3\n //A.\n int i = 1294;\n String str = Integer.toString(i);\n System.out.println(i);\n \n //B.\n int j = 0;\n if(args.length != 0) j = Integer.parseInt(args[0]);\n \n //C.\n float f = 0;\n if(args.length != 0) f = Float.parseFloat(args[0]);\n \n //D.\n System.out.println(\"Entrez un nom de ville : \");\n */\n \n Scanner sc1 = new Scanner(System.in);\n \n /*\n String str1 = sc1.nextLine();\n System.out.println(str1.toUpperCase());\n \n //E.\n System.out.println(\"Entrez une chaîne s1 : \");\n String s1 = sc1.nextLine();\n String s2 = sc1.nextLine();\n if(s1.charAt(0) == s2.charAt(0)) System.out.println(\"Ces deux chaînes commencent par le même caractère : \" + s1.charAt(0));\n else System.out.println(\"Ces deux chaînes ne commencent pas par le même caractère !\");\n \n //F.\n System.out.println(\"s1 == s2 renvoie : \" + (s1 == s2));\n System.out.println(\"s1.equals(s2) renvoie : \" + s1.equals(s2));\n System.out.println(\"s1.compareTo(s2) renvoie : \" + s1.compareTo(s2));\n System.out.println(\"s1.compareToIgnoreCase(s2) renvoie : \" + s1.compareToIgnoreCase(s2));\n \n //G.\n if(s1.startsWith(s2)) System.out.println(\"s1 commence par s2\");\n else System.out.println(\"s1 ne commence pas par s2\");\n \n if(s1.endsWith(s2)) System.out.println(\"s1 finit par s2\");\n else System.out.println(\"s1 ne finit pas par s2\");\n \n if(s1.contains(s2)) System.out.println(\"s1 contient s2\");\n else System.out.println(\"s1 ne contient pas s2\");\n \n //H.\n if(s1.contains(s2)) System.out.println(\"s1 sans s2 : \" + s1.replace(s2, \"\"));\n else System.out.println(\"s1 ne contient pas s2 : opération impossible !\");\n \n //I.\n s1 = s1.intern();\n s2 = s2.intern();\n System.out.println(\"s1.equals(s2) apprès intern() : \" + s1.equals(s2));\n System.out.println(\"s1 == s2 apprès intern() : \" + (s1 == s2));\n */\n \n /*\n //Exo 4\n System.out.println(\"Combien de nombres aléatoires voulez-vous : \");\n int nbNombres = sc1.nextInt();\n int[] n = new int[nbNombres];\n for(int b = 0; b < nbNombres; b++) {\n n[b] = (int) (Math.random() * 1000);\n }\n \n System.out.println(\"Etude de 100 000 nombres aléatoires compris entre 1 et \" + nbNombres + \" : \");\n \n double sum = 0;\n double q = 0;\n double m;\n double et;\n \n for(int b = 0; b < nbNombres; b++) {\n sum += n[b];\n q += n[b] * n[b];\n }\n \n m = sum / nbNombres;\n et = q / nbNombres - m * m;\n et = Math.sqrt(et);\n System.out.println(\"Moyenne : \" + m);\n System.out.println(\"Ecart-type : \" + et);\n */\n \n /*\n //Exo 5\n System.out.println(\"Entrez le nombre dont vous voulez avoir la factorielle : \");\n int nb = sc1.nextInt();\n Fact fact = new Fact(nb);\n */\n \n //Exo 6\n //Chrono chr = new Chrono();\n }", "public static void main(String[] args) {\n\t\t\n\t\tString cadena = JOptionPane.showInputDialog(null, \"Escriba un numero para la operacion, \\n\"\n\t\t\t\t+ \"1: Sumar \\n\"\n\t\t\t\t+ \"2: Restar \\n\"\n\t\t\t\t+ \"3: Multiplciar \\n\"\n\t\t\t\t+ \"4: Dividir\");\n\t\tint resp = Integer.parseInt(cadena);\n\t\tCalculadoraImplService servicio = new CalculadoraImplService();\n\t\tCalculadoraImpl calImpl = servicio.getCalculadoraImplPort();\n\t\tJOptionPane.showMessageDialog(null, \"Su respuesta es: \" + calImpl.calcular(resp, 15, 10));\n\t}", "public static void main(String[] args) {\n System.out.println(\"Welcome to the Paint Estimator!\");\n\n Estimator estimator = new Estimator();\n estimator.getSquareFeet();\n estimator.getPaintPrice();\n estimator.calculatePaintAndLabor();\n\n estimator.INPUT.close(); //close scanner\n\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"Please enter value1: \");\r\n\t\tSystem.out.println(\"Please enter value2: \");\r\n\t\tint value1 = scanning();\r\n\t\tint value2 = scanning();\r\n\t\tint sum = calcsum(value1, value2, \"+\");\r\n\t\tSystem.out.print(sum);\r\n\t}", "public static void main (String[] args) {\n Scanner s = new Scanner(System.in);\n String input = s.nextLine();\n int result = Integer.parseInt(input);\n System.out.println(SimpleAdding(result));\n }", "public static void main(String[] args) {\n\t\tcalculator c=new calculator();\n\t\tc.calculate(2, 3);\n\t\tscientific_calculator sc=new scientific_calculator();\n\t\tsc.calculate(2, 3);\n\t\thybrid_calculator hc=new hybrid_calculator();\n\t\thc.calculate(2, 3);\n\n\t}", "public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tdouble firstNumber, secondNumber;\n\t\tchar operant;\n\t\tboolean calulateIsStillOn = true;\n\t\t// String end;\n\n\t\twhile (calulateIsStillOn) {\n\n\t\t\tSystem.out.println(\"Unesite prvi broj: \");\n\t\t\tfirstNumber = sc.nextDouble();\n\n\t\t\tif (firstNumber == 0) {\n\t\t\t\tSystem.out.println(\"Kraj programa !\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println(\"Unesite drugi broj: \");\n\t\t\tsecondNumber = sc.nextDouble();\n\n\t\t\tSystem.out.println(\"Unesite operaciju: \");\n\t\t\tsc.nextLine();\n\t\t\toperant = sc.nextLine().charAt(0);\n\n\t\t\tswitch (operant) {\n\t\t\tcase '+':\n\t\t\t\tSystem.out.println(\"Zbir brojeva \" + firstNumber + \" i \" + secondNumber + \" je \"\n\t\t\t\t\t\t+ (firstNumber + secondNumber) + '\\n' + \"Ukucaj nulu za prekid programa\" + \"\\n\\n\");\n\t\t\t\tbreak;\n\t\t\tcase '/':\n\t\t\t\tif (firstNumber != 0 & secondNumber != 0) {\n\t\t\t\t\tSystem.out.println(\"Kolicnik brojeva \" + firstNumber + \" i \" + secondNumber + \"jednako je \"\n\t\t\t\t\t\t\t+ (firstNumber / secondNumber) + '\\n' + \"Ukucaj nulu za prekid programa\" + \"\\n\\n\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Deljenje nulom nije dozvoljeno\" + '\\n' + \"Ukucaj nulu za prekid programa\" + \"\\n\\n\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase '-':\n\t\t\t\tSystem.out.println(\"Razlika brojeva \" + firstNumber + \" i \" + secondNumber + \"jednako je \"\n\t\t\t\t\t\t+ (firstNumber - secondNumber) + '\\n' + \"Ukucaj nulu za prekid programa\" + \"\\n\\n\");\n\t\t\t\tbreak;\n\t\t\tcase '*':\n\t\t\t\tSystem.out.println(\"Proizvod brojeva \" + firstNumber + \" i \" + secondNumber + \"jednako je \"\n\t\t\t\t\t\t+ (firstNumber * secondNumber) + '\\n' + \"Ukucaj nulu za prekid programa\" + \"\\n\\n\");\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Nekorektan unos !!\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\n\t}", "public static void main(String[] args) {\n\t\tMyCalculator Mycalculator = new MyCalculator();\n\n added a line in feature 1\n\n\n\n\n\n\t\t// multiply 2 numners\n\t\tint int1 = 5;\n\t\tint int2 = 10;\n\t\tint prod = Mycalculator.Mult(int1, int2);\n\t\tSystem.out.println(\"Product of \" + int1 + \" and \" + int2 + \" is \" + prod);\n\n\t\t// add to numbers\n\t\tint1 = 5;\n\t\tint2 = 10;\n\t\tint sum = Mycalculator.Sum(int1, int2);\n\t\tSystem.out.println(\"Sum of \" + int1 + \" and \" + int2+ \" is \" + sum);\n\n\t\t// calculate quotient\n\t\tdouble d1 = 5;\n\t\tdouble d2 = 10;\n\t\tdouble q = Mycalculator.Quot(d1, d2);\n\t\tSystem.out.println(\"quotient of \" + d1 + \" and \" + d2 + \" is \" + q);\n\n\n\t\t// calculate hypotenuse\n\t\tdouble side1 = 3.0;\n\t\tdouble side2 = 4.0;\n\t\tdouble hypot = Mycalculator.Hypot(side1, side2);\n\t\tSystem.out.println(\"hypot of \" + side1 + \" and \" + side2 + \" is \" + hypot);\n\n\n\t\t// get a random number betewwn 1 and 10\n\t\tint rnd = Mycalculator.Random();\n\t\tSystem.out.println(\"random numner = \" + rnd);\n\n\t\t// calculate square root\n\t\tint1 = 9;\n\t\tdouble sr = Mycalculator.SquareRoot(int1);\n\t\tSystem.out.println(\"square root of \" + int1 +\" is \" + sr);\n\n\t}", "public static void main(String [] args)\n {\n //create Scanner to obtain input from command window\n Scanner input = new Scanner(System.in);\n \n double item1 = 239.99;// item 1 price \n double item2 = 129.75;// item 2 price\n double item3 = 99.95;// item 3 price\n double item4 = 350.89;// item 4 price\n int a;// number of item1\n int b;// number of item2\n int c;// number of item3\n int d;// number of item4\n double comm = .09;// commision rate\n double total;// total sales\n \n // # of item 1 \n System.out.print(\"Number of item 1 sold: \"); //prompt\n a = input.nextInt(); \n \n // # of item 2 \n System.out.print(\"Number of item 2 sold: \"); //prompt\n b = input.nextInt(); \n \n // # of item 3\n System.out.print(\"Number of item 3 sold: \"); //prompt\n c = input.nextInt(); \n \n // # of item 4 \n System.out.print(\"Number of item 4 sold: \"); //prompt\n d = input.nextInt(); \n \n // total of all items sold\n total = a * item1 + b * item2\n + c * item3 + d * item4;\n \n // displays total of sales done by sales person\n System.out.printf(\" Total Sales: %.2f\" , ( double ) total );\n \n // displays Earnings of Salesperson for the week\n System.out.printf( \"\\n Total weeks pay: %.2f \" , ( double ) total * comm + 200 );\n \n input.close();\n }", "public static void main(String[] args) {\n\n Scanner tc = new Scanner(System.in);\n\n double a, b, c = 0;\n String soma = \"+\";\n String subtração = \"-\";\n String multiplicação = \"*\";\n String divisão = \"/\";\n String potência = \"^\";\n String raiz = \"~\";\n String operação = \"\";\n System.out.println(\"Qual operação deseja fazer ?\");\n operação = tc.nextLine();\n System.out.println(\"insira um numero ó mortal\");\n a = tc.nextDouble();\n System.out.println(\"insira um numero ó mortal\");\n b = tc.nextDouble();\n ;\n if (operação == null ? soma == null : operação.equals(soma)) {\n c = a + b;\n System.out.println(\"o resultado é \" + c);\n } else if (operação == null ? subtração == null : operação.equals(subtração)) {\n c = a - b;\n System.out.println(\"o resultado é \" + c);\n } else if (operação == null ? multiplicação == null : operação.equals(multiplicação)) {\n c = a * b;\n System.out.println(\"o resultado é \" + c);\n }\n else \n c = a/b;\n \n System.out.println(\"o resultado é \" + c);\n }", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\r\n\t\tdouble op, km, ms;\r\n\t\tdo {\r\n\t\t\tSystem.out.println(\"1 - km/h -> m/s\");\r\n\t\t\tSystem.out.println(\"2 - m/s -> km/h\");\r\n\t\t\tSystem.out.println(\"3 - Encerrar\");\r\n\t\t\top = in.nextDouble();\r\n\t\t\tif(op==1) {\r\n\t\t\t\tSystem.out.println(\"Informe um valor em KM/H\");\r\n\t\t\t\tkm = in.nextDouble();\r\n\t\t\t\tms = km / 3.6;\r\n\t\t\t\tSystem.out.println(ms + \" m/s\");\r\n\t\t\t} else if(op==2) {\r\n\t\t\t\tSystem.out.println(\"Informe um valor em M/S\");\r\n\t\t\t\tms= in.nextDouble();\r\n\t\t\t\tkm = ms * 3.6;\r\n\t\t\t\tSystem.out.println(km + \" KM/H\");\r\n\t\t\t} else if(op==3) {\r\n\t\t\t\tSystem.out.println(\"Programa finalizado\");\r\n\t\t\t}else {\r\n\t\t\t\tSystem.out.println(\"Opção inválida\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}while(op!=3);\r\n\t\tin.close();\r\n\t\t}", "public static void main(String[] args) throws IOException{\n\tif (args.length!=1) {\n\t System.err.println(\"\\n\");\n\t System.err.println(\"Simple calculator\\n\");\n\t System.err.println(\"=================\\n\\n\");\n\t System.err.println(\"Please give as input argument a filename\\n\");\n\t System.exit(-1);\n\t}\n\tString filename=args[0];\n\n\t// open the input file\n\tCharStream input = CharStreams.fromFileName(filename);\n\t //new ANTLRFileStream (filename); // depricated\n\t\n\t// create a lexer/scanner\n\tsimpleCalcLexer lex = new simpleCalcLexer(input);\n\t\n\t// get the stream of tokens from the scanner\n\tCommonTokenStream tokens = new CommonTokenStream(lex);\n\t\n\t// create a parser\n\tsimpleCalcParser parser = new simpleCalcParser(tokens);\n\t\n\t// and parse anything from the grammar for \"start\"\n\tParseTree parseTree = parser.start();\n\n\t// Construct an interpreter and run it on the parse tree\n\tInterpreter interpreter = new Interpreter();\n\n\tDouble result=interpreter.visit(parseTree);\n\tSystem.out.println(\"The result is: \"+result);\n }", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\n\t\tSystem.out.println(\"Input 3 Numbers\");\n\t\tint a = input.nextInt();\n\t\tint b = input.nextInt();\n\t\tint c = input.nextInt();\n\n\t\tint method;\n\n\t\tmethod = Product(a,b,c);\n\t\tSystem.out.println(\"The product is: \" + method);\n\n\t\tSystem.out.println(\"\\nInclude two more numbers\");\n\t\tint o = input.nextInt();\n\t\tint p = input.nextInt();\n\n\t\tint method2;\n\t\tmethod2 = SumTwo(a,b);\n\t\tSystem.out.println(\"\\nThe Sum of these numbers are: \" + method2);\n\n\t\tint method3;\n\t\tSystem.out.println(\"\\nEnter one more number:\");\n\t\tmethod3 = input.nextInt();\n\t\tdouble avg = AverageInt(method3);\n\t\tSystem.out.println(\"The average between number\" + method3 + \" and avg is: \" + avg);\n\n\t}", "public static void main(String...strings) {\n\t\tboolean exitTriggered = false;\n\t\tScanner myKeyb= new Scanner(System.in);\n\t\tString fractionHolder = \"\";\n\t\tint choice=0;\n\t\tFraction fr1 =null,fr2=null;\n\t\twhile(!exitTriggered) {\n\t\t\tSystem.out.println(\"1-Enter one Fraction\\n2-Enter two Fractions\\n3-Exit\\n\");\n\t\t\t choice =myKeyb.nextInt();\n\t\t\t myKeyb.nextLine();\n\t\t\tif(choice ==3)\n\t\t\t\treturn;\n\t\t\tif (choice ==2) {\n\t\t\t\tSystem.out.println(\"\\nEnter Fraction 1:\\n\");\n\t\t\t\ttry {\n\t\t\t\tfractionHolder = myKeyb.nextLine();\n\t\t\t\tfr1 = new Fraction(Integer.parseInt(fractionHolder.substring(0,fractionHolder.indexOf(\"/\") )), Integer.parseInt(fractionHolder.substring(fractionHolder.indexOf(\"/\")+1)));\n\t\t\t\t}\n\t\t\t\tcatch(Exception e) {\n\t\t\t\t\tSystem.out.println(\"An error has occured ... Exiting\"); return;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"\\nEnter Fraction 2:\\n\");\n\t\t\t\ttry {\n\t\t\t\tfractionHolder = myKeyb.nextLine();\n\t\t\t\tfr2 = new Fraction(Integer.parseInt(fractionHolder.substring(0,fractionHolder.indexOf(\"/\") )), Integer.parseInt(fractionHolder.substring(fractionHolder.indexOf(\"/\")+1)));\n\t\t\t\t}\n\t\t\t\tcatch(Exception e) {\n\t\t\t\t\tSystem.out.println(\"An error has occured ... Exiting\"); return;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"1-Display\\n2-Add\\n3-Subtract\\n4-Multiply\\n5-Devide\\n6-Exit\");\n\t\t\t\tchoice =myKeyb.nextInt();\n\t\t\t\tmyKeyb.nextLine();\n\t\t\t\tif(choice ==6) return;\n\t\t\t\tif(choice ==1) System.out.println(fr1+\" \"+fr2);\n\t\t\t\tif(choice ==2) System.out.println(fr1.add(fr2));\n\t\t\t\tif(choice ==3) System.out.println(fr2.subtract(fr2));\n\t\t\t\tif(choice ==4) System.out.println(fr1.multiply(fr2));\n\t\t\t\tif(choice ==5) System.out.println(fr1.devide(fr2));\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tif (choice ==1) {\n\t\t\t\tSystem.out.println(\"\\nEnter one Fraction:\\n\");\n\t\t\t\ttry {\n\t\t\t\tfractionHolder = myKeyb.nextLine();\n\t\t\t\tfr1 = new Fraction(Integer.parseInt(fractionHolder.substring(0,fractionHolder.indexOf(\"/\") )), Integer.parseInt(fractionHolder.substring(fractionHolder.indexOf(\"/\")+1)));\n\t\t\t\t}\n\t\t\t\tcatch(Exception e) {\n\t\t\t\t\tSystem.out.println(\"An error has occured ... Exiting\"); return;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"1-Display Fraction\\n2-Exit\");\n\t\t\t\tchoice =myKeyb.nextInt();\n\t\t\t\tmyKeyb.nextLine();\n\t\t\t\tif(choice ==2) return;\n\t\t\t\tif(choice ==1) System.out.println(fr1);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "public static void main(String[] args)\n\t {\n\t Calculator calculator = new Calculator();\n\t calculator.setVisible(true);\n\t calculator.setSize(400,310);\n\t calculator.setLocation(200,150); \n\t }", "public static void main(String[] args) {\n\t\tall_prices = new Vector<Company>();\n\t\tScanner in; String fileName;\n\t\tBoolean correctRead = false;\n\t\twhile(!correctRead) { //reads in txt filename with operators from system input\n\t\t\tin = new Scanner(System.in);\n\t\t\tSystem.out.print(\"Enter the file name: \");\n\t\t\tfileName = in.nextLine();\n\t\t\tcorrectRead = operate(fileName);\n\t\t}\n\t\tcorrectRead = false;\n\t\twhile(!correctRead) { //reads phone number from system input\n\t\t\ttry{\n\t\t\t\tin = new Scanner(System.in);\n\t\t\t\tSystem.out.print(\"Enter the phone number: \");\n\t\t\t\tinput_num = in.nextLong();\n\t\t\t\tcorrectRead = true;\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(e.getMessage() + \" Please enter a valid phone number.\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tCompany result = best_price(input_num);\n\t\tif (result.getMatching_price() == Double.MAX_VALUE) {\n\t\t\tfinal_operator_name = \"\";\n\t\t\tfinal_operator_price = -1;\n\t\t\tSystem.out.println(\"No phone operator can provide services for this phone number.\");\n\t\t} else {\n\t\t\tfinal_operator_name = result.getName();\n\t\t\tfinal_operator_price = result.getMatching_price();\n\t\t\tSystem.out.println(\"The lowest price you have to pay is $\"+final_operator_price+\"/min with \"+\n\t\t\t\t\tfinal_operator_name+\".\");\n\t\t}\n\t}", "public static void main(String[] args) {\n int restingHeartRate = readFromUser(\"What is your resting heart rate?\");\n int age = readFromUser(\"What is your age?\");\n\n TargetCalculator userTarget = new TargetCalculator(restingHeartRate,age);\n }", "public static void main(String[] args) {\n\t\tScanner teclado = new Scanner(System.in);\r\n\r\n\t\twhile (true) {\r\n\t\t\tSystem.out.println(\"CALCULADORA\");\r\n\t\t\tSystem.out.println(\"1.- SUMA.\");\r\n\t\t\tSystem.out.println(\"2.- RESTA.\");\r\n\t\t\tSystem.out.println(\"3.- MULTIPLICACION\");\r\n\t\t\tSystem.out.println(\"4.- DIVISION\");\r\n\t\t\tSystem.out.println(\"5.- RAIZ CUADRADA\");\r\n\t\t\tSystem.out.println(\"6.- AREA DE UN CÍRCULO\");\r\n\t\t\tSystem.out.println(\"7.- AREA DE UN TRIANGULO\");\r\n\t\t\tSystem.out.println(\"0.- SALIR\");\r\n\t\t\tSystem.out.println(\"INTRODUZCA OPCION\");\r\n\r\n\t\t\tint opcion = teclado.nextInt();\r\n\t\t\tSystem.out.println(\"Introduzca valor a:\");\r\n\t\t\tint a = teclado.nextInt();\r\n\t\t\tSystem.out.println(\"Introduzca valor b:\");\r\n\t\t\tint b = teclado.nextInt();\r\n\r\n\t\t\tswitch (opcion) {\r\n\t\t\tcase 1:\r\n\t\t\t\tSystem.out.println(\"SUMA:\");\r\n\t\t\t\tSystem.out.println(OperacionesBasicas.suma(a, b));\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tSystem.out.println(\"RESTA:\");\r\n\t\t\t\tSystem.out.println(OperacionesBasicas.resta(a, b));\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\tSystem.out.println(\"MULTIPLICACION:\");\r\n\t\t\t\tSystem.out.println(OperacionesBasicas.multiplicacion(a, b));\r\n\t\t\t\tbreak;\r\n\t\t\tcase 4:\r\n\t\t\t\tSystem.out.println(\"DIVISION:\");\r\n\t\t\t\tSystem.out.println(OperacionesBasicas.division(a, b));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 5:\r\n\t\t\t\tSystem.out.println(\"RAIZ CUADRADA\");\r\n\t\t\t\tSystem.out.println(OperacionesBasicas.raizCuadrada(a));\r\n\t\t\t\tbreak;\r\n\t\t\tcase 6:\r\n\t\t\t\tSystem.out.println(\"ÁREA DE UN CÍRCULO:\");\r\n\t\t\t\tSystem.out.println(OperacionesBasicas.areaCirculo(a, b));\r\n\t\t\t\tbreak;\r\n\t\t\tcase 7:\r\n\t\t\t\tSystem.out.println(\"AREA DEL TRIANGULO\");\r\n\t\t\t\tSystem.out.println(OperacionesBasicas.areatri(a, b));\r\n\t\t\t\tbreak;\r\n\t\t\tcase 0:\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "public static void main( String[] args )\n {\n Calculator calculator = new Calculator(2.2f);\n// Calculator calculator2 = new Calculator(3f);\n// calculator.name = \"calc\";\n// //System.out.println(Calculator.name);\n// calculator.add(5f);\n// System.out.println(calculator2.name);\n// System.out.println(calculator.getTotal());\n// calculator2.subtract(2f);\n// System.out.println(calculator2.getTotal());\n//\n// calculator.add(5f).subtract(1f).add(2.5f);\n// System.out.println(calculator.getTotal());\n\n for (int i = 0; i < 10; i++) {\n calculator.add(i);\n System.out.println(calculator.getTotal());\n }\n }", "public Calculator()\r\n {\r\n //Creating Choice group list\r\n options = new ChoiceGroup(\"Main Form\",Choice.EXCLUSIVE);\r\n options.append(\"ADDITION\",null);\r\n options.append(\"SUBTRACTION\",null);\r\n options.append(\"MULTIPLICATION\",null);\r\n options.append(\"DIVISION\",null);\r\n \r\n display = Display.getDisplay(this);\r\n \r\n //Creating Forms\r\n main = new Form(\"MAIN FORM\");\r\n ChoiceGroupAppend=main.append(options);\r\n operation = new Form(\"OPERATION\");\r\n \r\n //Initializing different command buttons \r\n exit = new Command(\"EXIT\",Command.EXIT,0);\r\n select = new Command(\"SELECT\",Command.OK,0);\r\n back = new Command(\"BACK\",Command.BACK,0);\r\n result = new Command(\"RESULT\",Command.OK,0);\r\n clear = new Command(\"CLEAR\",Command.OK,0);\r\n //Adding command buttons to different forms\r\n main.addCommand(exit);\r\n main.addCommand(select);\r\n operation.addCommand(result);\r\n operation.addCommand(back);\r\n operation.addCommand(clear);\r\n main.setCommandListener(this);\r\n operation.setCommandListener(this);\r\n \r\n display.setCurrent(main);\r\n }", "public static void main(String[] args) \r\n\t{\n\t\t\tSystem.out.printf( \"%s\\n%s\\n\",\"5+2\",\"5+9\" ); \r\n\t\t\tScanner input = new Scanner( System.in ); // takes input\r\n\t\t\t\r\n\t\t\tint sum1; // user input of sum1\r\n\t\t\tint sum2; // user input of sum2\r\n\t\t\tint number1; // sum of first eq\r\n\t\t\tint number2; // sum of second eq\r\n\t\t\t\r\n\t\t\tnumber1 = 7; //true sum\r\n\t\t\tnumber2 = 14; //true sum\r\n\t\t\t\r\n\t\tCase1:\r\n\t\t\tSystem.out.print( \"Enter first sum: \" );\r\n\t\t\tsum1 = input.nextInt();\r\n\t\t\tif ( number1 == sum1 )\r\n\t\t\t\tSystem.out.printf(\"That is correct\\n\"+\"%d == %d\\n\", number1, sum1 );\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.print( \"Incorrect, please try again\\n\" );\r\n\t\t\t}\r\n\t\tCase2:\r\n\t\t\tSystem.out.print( \"Enter second sum: \" );\r\n\t\t\tsum2 = input.nextInt();\r\n\t\t\tif ( number2 == sum2 )\r\n\t\t\t\tSystem.out.printf(\"That is correct\\n\"+\"%d == %d\\n\", number2, sum2 );\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.print( \"Incorrect, please try again\\n\" );\r\n\t\t\t}\r\n\t\t\t}", "public static void main(String[] args) {\n\t\t// Starting the execution of the application.\n\t\t// System.in denotes the standard input (i.e., keyboard).\n\t\tScanner input = new Scanner(System.in);\n\t\t\n\t\t// Start the actual application code here.\n\t\t\n\t\t/*\n\t\t * Calculate the first circle.\n\t\t */\n\t\t// Step 1: Prompt user for the radius of the 1st circle.\n\t\tSystem.out.println(\"Enter the radius of the 1st circle:\");\n\t\t// Declare a variable to store the user input.\n\t\t// Step 2: Read a floating-point number from the user.\n\t\tdouble radius1 = input.nextDouble();\n\t\t// Step 3: Compute the area of the input circle accordingly.\n\t\tdouble area1 = 3.14 * radius1 * radius1;\n\t\tString area1s = String.format(\"%.2f\", area1);\n\t\t// Step 4: Output the result back to the user.\n\t\tSystem.out.println(\"Area of circle is: \" +area1s);\n\t\t\n\t\t/*\n\t\t * Calculate the second circle.\n\t\t */\n\t\t// Step 1: Prompt user for the radius of the 2nd circle.\n\t\tSystem.out.println(\"Enter the radius of the 2nd circle:\");\n\t\t// Declare a variable to store the user input.\n\t\t// Step 2: Read a floating-point number from the user.\n\t\tdouble radius2 = input.nextDouble();\n\t\t// Step 3: Compute the area of the input circle accordingly.\n\t\tdouble area2 = 3.14 * radius2 * radius2;\n\t\tString area2s = String.format(\"%.2f\", area2);\n\t\t// Step 4: Output the result back to the user.\n\t\tSystem.out.println(\"Area of circle is: \" +area2s);\n\t\t\n\t\t// end of the application code.\n\t\t\n\t\tinput.close();\n\t}", "@When(\"^User adds two integers and selects Enter$\")\r\n public void user_adds_two_integers_and_selects_enter() throws Throwable {\n \tdivideClass divideInts = new divideClass(); // declaring the object\r\n \tdivideInts.main(new String[]{\"divideSum\"});// calling the method. {\r\n \t}", "public static void main(String args[])\r\n {\r\n System.out.println(\"Enter two fractions, a numerator, and a denominator\"\r\n + \", separated by new lines.\");\r\n Scanner stdin = new Scanner(System.in);\r\n Fraction f1 = new Fraction(stdin.nextLine());\r\n Fraction f2 = new Fraction(stdin.nextLine());\r\n int numerator = Integer.parseInt(stdin.nextLine());\r\n int denominator = Integer.parseInt(stdin.nextLine());\r\n \r\n Fraction f4 = new Fraction(f1.toString());\r\n Fraction f5 = new Fraction(f1.toString());\r\n f1.add(f2);\r\n System.out.println(\"First two fractions added gives: \" + f1.toString());\r\n f4.subtract(f2);\r\n System.out.println(\"First two fractions subtracted gives: \" + \r\n f4.toString());\r\n f5.multiply(f2);\r\n System.out.println(\"First two fractions multiplied gives: \" + \r\n f5.toString());\r\n f2.setNumerator(numerator);\r\n f2.setDenominator(denominator);\r\n System.out.println(\"Inputted numerator and denominator gives: (\" + \r\n f2.getNumerator() + \"/\" + f2.getDenominator() + \")\\n\");\r\n \r\n System.out.println(\"end of testbed\");\r\n }", "public static void main(String[] args) {\n\t\tnew Calc();\n\t}", "public static void main(String[] args) {\n\t\tScanner keyboard = new Scanner(System.in);\r\n\t\tDecimalFormat f = new DecimalFormat(\"#0.00\");\r\n\t\t\r\n\t\t//instantiate object\r\n\t\tP6 total = new P6();\r\n\t\t\r\n\t\t//get input for the variables\r\n\t\tSystem.out.println(\"Enter the weight of the package you are sending: \");\r\n\t\ttotal.setWeight(keyboard.nextDouble());\r\n\t\tSystem.out.println(\"Enter the distance you are shipping the item: \");\r\n\t\ttotal.setMiles(keyboard.nextDouble());\r\n\t\t\r\n\t\t//display output\r\n\t\tSystem.out.println(\"The total cost of the shipment is $\" + f.format(total.CalculateCharges()));\r\n\t\t\r\n\t\tkeyboard.close();\r\n\t}" ]
[ "0.7317997", "0.7315513", "0.72664356", "0.7265855", "0.7249422", "0.71873087", "0.7098547", "0.7097521", "0.70871675", "0.7082267", "0.707698", "0.69979954", "0.69906425", "0.69877625", "0.6969975", "0.6958036", "0.6934311", "0.68931407", "0.68838996", "0.6863338", "0.6810972", "0.6797026", "0.6793032", "0.6771811", "0.6755403", "0.67201394", "0.6716087", "0.67158264", "0.66733545", "0.6652679", "0.6650967", "0.6633463", "0.6629452", "0.66163784", "0.6601043", "0.6590466", "0.65806454", "0.6566957", "0.6495492", "0.6493485", "0.6482998", "0.6479866", "0.646993", "0.646684", "0.6456807", "0.643906", "0.64365923", "0.6432912", "0.6417901", "0.6411436", "0.6407771", "0.6393869", "0.63853455", "0.6379865", "0.6377645", "0.63619685", "0.63535005", "0.63506633", "0.6343683", "0.6342592", "0.634068", "0.6333148", "0.62937933", "0.62798417", "0.6273234", "0.62694764", "0.6266277", "0.62626034", "0.6261278", "0.6260265", "0.62485325", "0.62445337", "0.62438047", "0.624327", "0.6238566", "0.6234249", "0.62317765", "0.62242144", "0.62235415", "0.6219395", "0.62186897", "0.6212273", "0.62106764", "0.6209916", "0.62071824", "0.6202781", "0.61980397", "0.6191396", "0.6190866", "0.61873436", "0.61811215", "0.6180339", "0.6177688", "0.6175496", "0.6174775", "0.61743474", "0.6172842", "0.6168348", "0.61682874", "0.61599904" ]
0.7251913
4
Test the calculator class
public static void runTests() { Result result = JUnitCore.runClasses(TestCalculator.class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n void testCalculations() {\n double addition = calculator.add(10, 2);\n double subtraction = calculator.sub(10, 2);\n double multiplication = calculator.mul(10, 2);\n double division = calculator.div(10, 2);\n\n //Then\n assertEquals(12, addition);\n assertEquals(8, subtraction);\n assertEquals(20, multiplication);\n assertEquals(5, division);\n }", "@Test\r\n\tpublic void testCalculator() {\n\t\tCalculator calc = new Calculator();\r\n\t\tassertNotNull(calc);\r\n\t\t// testing the initial local variable\r\n\t\tassertEquals(0, calc.getTotal());\r\n\t\t// testing the strHistory\r\n\t\tString expected = \"0\";\r\n\t\tassertEquals(expected, calc.getHistory());\r\n\t}", "@Test\n\t@Category (WrongPlace.class)\n\t// long running test in the unit test section\n\tpublic void orderOfOperations() {\n\t\tCalculator c = new Calculator();\n\t\tc.press(\"1\");\n\t\tc.press(\"+\");\n\t\tc.press(\"2\");\n\t\tc.press(\"*\");\n\t\tc.press(\"4\");\n\t\tc.press(\"=\");\n\t\tString result = c.getDisplay();\n\t\tassertEquals(result, \"9\");\n\t}", "@Test\n\tvoid testBasicCalculatorII() {\n\t\tassertEquals(7, new BasicCalculatorII().calculate(\"3+2*2\"));\n\t\tassertEquals(1, new BasicCalculatorII().calculate(\" 3/2 \"));\n\t\tassertEquals(5, new BasicCalculatorII().calculate(\" 3+5 / 2 \"));\n\t}", "public static void main(String[] args) {\r\n\t\tSystem.out.println(\"Testing Calculator\");\r\n\t\ttestConstructors();\r\n\t\ttestSetters();\r\n\t\ttestGetters();\r\n\t\ttestToString();\r\n\t}", "@Test\n public void testSum() {\n Calculator calculator = new Calculator();\n \n int sumResult = calculator.sum(5, 7);\n \n Assert.assertEquals(12, sumResult);\n }", "public static void main(String[] args) {\n Calculator calc=new Calculator();\r\n double operand1,operand2,result=0;\r\n operand1=calc.getOperand1();\r\n operand2=calc.getOperand2();\r\n String op;\r\n op=calc.getOperator();\r\n try\r\n {\r\n \r\n switch(op)\r\n {\r\n case \"+\": Add add=new Add();\r\n result=add.doOperation(operand1, operand2);\r\n break;\r\n case \"-\": Subract sub=new Subract();\r\n result=sub.doOperation(operand1, operand2);\r\n break;\r\n case \"*\": Multiply mul=new Multiply();\r\n result=mul.doOperation(operand1, operand2);\r\n break;\r\n case \"/\": Division div =new Division();\r\n if(operand2==0)\r\n {\r\n \tthrow new ArithmeticException();\r\n }\r\n result=div.doOperation(operand1, operand2);\r\n break;\r\n default: throw new Exception(\"Invalid operation\");\r\n }\r\n \r\n\t }\r\n catch(ArithmeticException e)\r\n {\r\n \t System.out.println(e);\r\n \t \r\n }\r\n \r\n catch(Exception e)\r\n {\r\n \t System.out.println(e);\r\n \t \r\n } \r\n finally\r\n {\r\n \t System.exit(0);\r\n }\r\n System.out.print(result);\r\n \r\n}", "@Test\n public void testDigits() {\n final String result = calc.type(\"1 + 2 - 3\")\n .press_equalBtn()\n .result();\n\n Assert.assertEquals(result, \"0\");\n }", "@Test\n\tpublic void calculateTest(){\n\t\tAssertions.assertThat(calculate(\"5*5\")).isEqualTo(25);\n\t}", "@Test\n public void myfirstTest(){\n this.driver.findElement(By.id(\"com.android.calculator2:id/digit_5\")).click();\n // press +\n this.driver.findElement(By.id(\"com.android.calculator2:id/op_add\")).click();\n // press 5\n this.driver.findElement(By.id(\"com.android.calculator2:id/digit_2\")).click();\n // press =\n this.driver.findElement(By.id(\"com.android.calculator2:id/eq\")).click();\n\n // verificacion 7\n String actualResult=this.driver.findElement(By.id(\"com.android.calculator2:id/formula\")).getText();\n String expectedResult=\"8\";\n\n Assert.assertEquals(\"ERROR ! La suma es incorrecta\",expectedResult,actualResult);\n\n }", "public Calculator() {\r\n\t\tthis.operator = new Addition();\r\n\t}", "public boolean testParser() {\n boolean succeeded = true;\n\n // Test addition expression\n Double resultAddition = this.mockCalculator.x(\"12 + 5\");\n Double expectedAddition = new Double(17);\n \n if (!resultAddition.equals(expectedAddition)) {\n succeeded = false;\n System.out.println(\"[FAIL] Basic parsing fails to add.\");\n } else {\n System.out.println(\"[ OK ] Parser adds correctly.\");\n }\n\n // Test multiplication expression\n Double resultMulti = this.mockCalculator.x(\"12 x 5\");\n Double expectedMulti = new Double(60);\n \n if (!resultMulti.equals(expectedMulti)) {\n succeeded = false;\n System.out.println(\"[FAIL] Basic parsing multiply to add.\");\n } else {\n System.out.println(\"[ OK ] Parser multiplies correctly.\");\n }\n \n // Test invalid expression\n Double resultInvalid = this.mockCalculator.x(\"12 [ 5\");\n \n if (null != resultInvalid) {\n succeeded = false;\n System.out.println(\"[FAIL] Parser does not return null for operators which are not supported.\");\n } else {\n System.out.println(\"[ OK ] Parser returns null for operators which are not supported.\");\n }\n\n return succeeded;\n }", "@Test\n public void multiplyBy9_checkTotal_shouldBe0() {\n Calculator calculator = new Calculator();\n\n // Act - multiply by 9\n calculator.multiplyBy(9);\n\n // Assert - check that the new total is 0\n Assert.assertEquals(0, calculator.getTotal());\n }", "@Test\n public void addTest() {\n double expected = 5.5;\n double actual = calculatorApp.add();\n Assert.assertThat(\"Addition function in CalculatorApp: Expected != Real\", actual, is(expected));\n }", "@Test\n public void testCalculerMontantService() {\n double expResult = 0.0;\n double result = CalculAgricole.calculerMontantServices();\n assertEquals(\"Montant pour las droits du passage n'était pas correct.\", expResult, result, 0);\n }", "@Test\n\tpublic void test_StringCalculator_WhenOneNumberIsGiven_Then_ReturnSameNumber() {\n\t\tAssert.assertEquals(1,calc.Add(\"1\"));\n\t}", "@Test\n public void whenTryExecuteAdditionShouldCheckThatIsWorkCorrect() {\n String[] answer = new String[]{\"1.0\", \"y\"};\n StubIO stubIO = new StubIO(answer);\n MenuCalculator menuCalculator = new MenuCalculator(new Calculator(), stubIO, actions);\n menuCalculator.fillActions();\n String expected = \"0.0 + 1.0 = 1.0\\n\";\n final int command = 0;\n\n menuCalculator.select(command);\n\n assertThat(stubIO.getOut(), is(expected));\n }", "public Calculator() {\r\n\t\tsuper();\r\n\t}", "@Test\n public void testAdd() {\n System.out.println(\"testing add\");\n Arithmetic arithmetic = new Arithmetic(); \n \n assertEquals(\"unexpected result of addition\", 8, arithmetic.add(3,5));\n assertEquals(\"unexpected result of addition\", 6, arithmetic.add(0,6));\n assertEquals(\"unexpected result of addition\", -14, arithmetic.add(0,-14));\n assertEquals(\"unexpected result of addition\", 0, arithmetic.add(-5,5));\n assertEquals(\"unexpected result of addition\", -6, arithmetic.add(-12,6));\n \n }", "@Test public void operationTest(){\n assertEquals(calculator.squareOf(8),64);\n assertEquals(calculator.elementOf(9),3);\n assertEquals(calculator.factorial(5),120);\n assertEquals(calculator.isPrimeNumber(2),true);\n assertEquals(calculator.isPrimeNumber(13),true);\n assertEquals(calculator.isPrimeNumber(9),false);\n // assertNotEquals(calculator.factorial(4),10);\n }", "private static void testToString() {\r\n\t\tSystem.out.println(\"\\n----------\\nTesting toString();\");\r\n\t\tString equation = \"(5*5*2*2)-(2*5)-(5*2*(2+3+4))\";\r\n\t\tCalculator calc = new Calculator(equation);\r\n\t\tString result = calc.toString();\r\n\t\tString expected = \"(5*5*2*2)-(2*5)-(5*2*(2+3+4)) = 0\";\r\n\t\tprintTest(true, \"testing toString() with valid equation \" + equation, result, expected);\r\n\t\t\r\n\t\tequation = \"0 + 12345\";\r\n\t\tcalc.setEquationString(equation);\r\n\t\texpected = \"0 + 12345 = 12345\";\r\n\t\tresult= calc.toString();\r\n\t\tprintTest(true, \"Testing getResult() with equation \" + equation, result, expected);\r\n\t\t\r\n\t\tequation = \"1/0\";\r\n\t\tcalc.setEquationString(equation);\r\n\t\texpected = \"1/0 = Java.lang.ArithmeticException: / by zero\";\r\n\t\tresult= calc.toString();\r\n\t\tprintTest(true, \"Testing getResult() with equation \" + equation, result, expected);\r\n\t\t\r\n\t\tequation = \"5++5\";\r\n\t\tcalc.setEquationString(equation);\r\n\t\texpected = \"5++5 = Error: cannot have two adjacent signs\";\r\n\t\tresult= calc.toString();\r\n\t\tprintTest(true, \"Testing getResult() with equation \" + equation, result, expected);\r\n\t\t\r\n\t\tequation = \"5+7)\";\r\n\t\tcalc.setEquationString(equation);\r\n\t\texpected = \"5+7) = java.util.EmptyStackException Make sure all parenthesis have a matching pair\";\r\n\t\tresult= calc.toString();\r\n\t\tprintTest(true, \"Testing getResult() with equation \" + equation, result, expected);\r\n\t\t\r\n\t\tequation = \"(5+7\";\r\n\t\tcalc.setEquationString(equation);\r\n\t\texpected = \"(5+7 = java.util.EmptyStackException Make sure all parenthesis have a matching pair\";\r\n\t\tresult= calc.toString();\r\n\t\tprintTest(true, \"Testing getResult() with equation \" + equation, result, expected);\r\n\t\t\r\n\t\tequation = \"x\";\r\n\t\tcalc.setEquationString(equation);\r\n\t\texpected = \"x = Error: Invalid character entered\";\r\n\t\tresult= calc.toString();\r\n\t\tprintTest(true, \"Testing getResult() with equation \" + equation, result, expected);\r\n\t}", "public Calculator()\n {\n \n }", "@Test\r\n\tpublic void testParseOperator() {\r\n\r\n\t\t// find the number of operators in the input\r\n\r\n\t\tint add = 0;\r\n\t\tint minus = 0;\r\n\t\tint multiply = 0;\r\n\t\tint divide = 0;\r\n\t\tString input = \"a = 5\\nb = a - 1\\nc = a + (b / 2 * 4)\";\r\n\t\tfor (int i = 0; i < input.length(); i++) {\r\n\t\t\tif (input.charAt(i) == '+')\r\n\t\t\t\tadd++;\r\n\t\t\tif (input.charAt(i) == '-')\r\n\t\t\t\tminus++;\r\n\t\t\tif (input.charAt(i) == '*')\r\n\t\t\t\tmultiply++;\r\n\t\t\tif (input.charAt(i) == '/')\r\n\t\t\t\tdivide++;\r\n\t\t}\r\n\r\n\t\t// Enter the code\r\n\r\n\t\tdriver.findElement(By.name(\"code[code]\")).sendKeys(input);\r\n\r\n\t\t// Look for the \"Parse\" button and click\r\n\r\n\t\tdriver.findElements(By.name(\"commit\")).get(1).click();\r\n\r\n\t\t// Check that there contains corresponding quantity of operators\r\n\r\n\t\ttry {\r\n\t\t\tWebElement code = driver.findElement(By.tagName(\"code\"));\r\n\t\t\tString res = code.getText();\r\n\t\t\tint add1 = 0, minus1 = 0, multiply1 = 0, divide1 = 0;\r\n\t\t\tfor (int i = 0; i < res.length(); i++) {\r\n\t\t\t\tif (res.charAt(i) == '+')\r\n\t\t\t\t\tadd1++;\r\n\t\t\t\tif (res.charAt(i) == '-')\r\n\t\t\t\t\tminus1++;\r\n\t\t\t\tif (res.charAt(i) == '*')\r\n\t\t\t\t\tmultiply1++;\r\n\t\t\t\tif (res.charAt(i) == '/')\r\n\t\t\t\t\tdivide1++;\r\n\t\t\t}\r\n\t\t\tassertEquals(add, add1);\r\n\t\t\tassertEquals(minus, minus1);\r\n\t\t\tassertEquals(multiply, multiply1);\r\n\t\t\tassertEquals(divide, divide1);\r\n\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\tfail();\r\n\t\t}\r\n\t}", "public abstract void execute(InputCalc input, Calculator calculator);", "public Calculator()\r\n {\r\n //Creating Choice group list\r\n options = new ChoiceGroup(\"Main Form\",Choice.EXCLUSIVE);\r\n options.append(\"ADDITION\",null);\r\n options.append(\"SUBTRACTION\",null);\r\n options.append(\"MULTIPLICATION\",null);\r\n options.append(\"DIVISION\",null);\r\n \r\n display = Display.getDisplay(this);\r\n \r\n //Creating Forms\r\n main = new Form(\"MAIN FORM\");\r\n ChoiceGroupAppend=main.append(options);\r\n operation = new Form(\"OPERATION\");\r\n \r\n //Initializing different command buttons \r\n exit = new Command(\"EXIT\",Command.EXIT,0);\r\n select = new Command(\"SELECT\",Command.OK,0);\r\n back = new Command(\"BACK\",Command.BACK,0);\r\n result = new Command(\"RESULT\",Command.OK,0);\r\n clear = new Command(\"CLEAR\",Command.OK,0);\r\n //Adding command buttons to different forms\r\n main.addCommand(exit);\r\n main.addCommand(select);\r\n operation.addCommand(result);\r\n operation.addCommand(back);\r\n operation.addCommand(clear);\r\n main.setCommandListener(this);\r\n operation.setCommandListener(this);\r\n \r\n display.setCurrent(main);\r\n }", "private void operation(char operator){\n if(initialised == false){\n calc.setNum1(Double.parseDouble(txtBox.getText()));\n operatorPressed = true;\n } else { \n calc.setNum2(Double.parseDouble(txtBox.getText()));\n Decimal();\n calc.setNum1(calc.getAnswer());\n txtBox.setText(Double.toString(calc.getAnswer()));\n }\n \n calc.setOperator(operator);\n\n operatorPressed = true;\n initialised = true;\n \n }", "private Calculator() {\n }", "@Test\r\n\tpublic void testSum() { //testing the adding method\r\n\t\tnum1 = 2; \r\n\t\tnum2 = 8;\r\n\t\tresult = calculate.sum(num1, num2); //result stores the method of add\r\n\t\texpected = 10;\r\n\t\t\r\n\t\tassertEquals(expected,result); //compares add to the expected, if no match then error \r\n\t}", "@Test\r\n\t\tpublic void testCompileAllOperators() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tdriver.findElement(By.id(\"code_code\")).sendKeys(\"a = 6\\nb = 6\\nc = a + (b * 4)\\nd = c / 3\");;\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tWebElement submitButton = driver.findElement(By.xpath(\"(//input[@name='commit'])[3]\"));\r\n\t\t\tsubmitButton.click();\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tWebElement e = driver.findElement(By.tagName(\"code\"));\r\n\t\t\t\tString elementText = e.getText();\r\n\t\t\t\tassertTrue(elementText.contains(\"opt_plus\") && elementText.contains(\"opt_div\") && elementText.contains(\"opt_mult\") &! elementText.contains(\"opt_minus\"));\r\n\t\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\t\tfail();\r\n\t\t\t}\r\n\t\t}", "@Test\n public void test01(){\n Object result = FelEngine.instance.eval(\"5000*12+7500\");\n System.out.println(result);\n }", "public static void main(String[] args) {\n Calculator result = new Calculator();\n\n // Perform operations on the object and print the calculations with the result\n System.out.println(\"1 + 1 = \" + result.add(1, 1));\n System.out.println(\"23 - 52 = \" + result.subtract(23, 52));\n System.out.println(\"34 * 2 = \" + result.multiply(34, 2));\n System.out.println(\"12 / 3 = \" + result.divide(12, 3));\n System.out.println(\"12 / 7 = \" + result.divide(12, 7));\n System.out.println(\"3.4 + 2.3 = \" + result.add(3.4, 2.3));\n System.out.println(\"6.7 * 4.4 = \" + result.add(6.7, 4.4));\n System.out.println(\"5.5 - 0.5 = \" + result.subtract(5.5,0.5));\n System.out.println(\"10.8 / 2.2 = \" + result.divide(10.8, 2.2));\n }", "@Test\n public void testCal(){\n Stack<Double> stack = new Stack<>();\n Double num = 3.14;\n stack.push(num);\n operator = new UndoOperator();\n Stack<String> historyStack = new Stack<>();\n historyStack.push(num.toString());\n try {\n operator.cal(stack,historyStack);\n }catch (Exception e){\n Assert.fail(\"No exception should be thrown.\");\n }\n Assert.assertEquals(0,stack.size());\n Assert.assertEquals(0,historyStack.size());\n\n //test \"+\"\n Double result = 100.00;\n stack.clear();\n stack.push(result);\n operator = new UndoOperator();\n Double secOperand = 5.00;\n historyStack.clear();\n historyStack.push(secOperand.toString());\n historyStack.push(OperatorType.PLUS.getName());\n try {\n operator.calculate(stack,historyStack);\n }catch (Exception e){\n Assert.fail(\"No exception should be thrown.\");\n }\n Assert.assertEquals(secOperand,stack.pop(),0.0000001);\n Assert.assertEquals(result-secOperand,stack.pop(),0.0000001);\n\n //test \"-\"\n result = 100.00;\n stack.clear();\n stack.push(result);\n operator = new UndoOperator();\n secOperand = 5.00;\n historyStack.clear();\n historyStack.push(secOperand.toString());\n historyStack.push(OperatorType.MINUS.getName());\n try {\n operator.calculate(stack,historyStack);\n }catch (Exception e){\n Assert.fail(\"No exception should be thrown.\");\n }\n Assert.assertEquals(secOperand,stack.pop(),0.0000001);\n Assert.assertEquals(result+secOperand,stack.pop(),0.0000001);\n\n //test \"*\"\n result = 100.00;\n stack.clear();\n stack.push(result);\n operator = new UndoOperator();\n secOperand = 5.00;\n historyStack.clear();\n historyStack.push(secOperand.toString());\n historyStack.push(OperatorType.MULTIPLY.getName());\n try {\n operator.calculate(stack,historyStack);\n }catch (Exception e){\n Assert.fail(\"No exception should be thrown.\");\n }\n Assert.assertEquals(secOperand,stack.pop(),0.0000001);\n Assert.assertEquals(result/secOperand,stack.pop(),0.0000001);\n\n //test \"/\"\n result = 100.00;\n stack.clear();\n stack.push(result);\n operator = new UndoOperator();\n secOperand = 5.00;\n historyStack.clear();\n historyStack.push(secOperand.toString());\n historyStack.push(OperatorType.DIVIDE.getName());\n try {\n operator.calculate(stack,historyStack);\n }catch (Exception e){\n Assert.fail(\"No exception should be thrown.\");\n }\n Assert.assertEquals(secOperand,stack.pop(),0.0000001);\n Assert.assertEquals(result*secOperand,stack.pop(),0.0000001);\n\n //test \"sqrt\"\n result = 100.00;\n stack.clear();\n stack.push(result);\n operator = new UndoOperator();\n historyStack.clear();\n secOperand = 5.00;\n historyStack.push(secOperand.toString());\n historyStack.push(OperatorType.SQRT.getName());\n try {\n operator.calculate(stack,historyStack);\n }catch (Exception e){\n Assert.fail(\"No exception should be thrown.\");\n }\n Assert.assertEquals(result*result,stack.pop(),0.0000001);\n }", "private static void equationsTest() {\n }", "@Test\n public void testCrazyCalculator() {\n CrazyCalculator calculator = new CrazyCalculator();\n List<String> lines = new ArrayList<>();\n lines.add(\"1\");\n lines.add(\"\");\n lines.add(\"+@1L\");\n lines.add(\"-+3R\");\n lines.add(\"*-2R\");\n lines.add(\"//2R\");\n lines.add(\"1@1\");\n lines.add(\"5@5+4\");\n lines.add(\"2@3-12/6/5+3\");\n lines.add(\"-1+3\");\n lines.add(\"-1--3\");\n calculator.setLines(lines);\n calculator.processLines();\n List<String> results = calculator.getResults();\n assertEquals(\"should be 5\", 5, results.size());\n assertEquals(\"should be 2\", 2, Integer.parseInt(results.get(0)));\n assertEquals(\"should be 6\", 6, Integer.parseInt(results.get(1)));\n assertEquals(\"should be 14\", 14, Integer.parseInt(results.get(2)));\n assertEquals(\"should be -4\", -4, Integer.parseInt(results.get(3)));\n assertEquals(\"should be 3\", 3, Integer.parseInt(results.get(4)));\n }", "public Calculator () {\n\t\ttotal = 0; // not needed - included for clarity\n\t\thistory = \"0\";\n\t}", "public TestArithmetic()\n {\n }", "@Test(priority=3)\n\n\tpublic void multiplicationTest() {\n\n\t\tandroidCalculator = new AndroidCalculator(driver);\n\n\t\tandroidCalculator.inputLeftAndRightFields(\"20\", \"10\");\n\t\tandroidCalculator.multiplication();;\n\n\t\tAssert.assertEquals(androidCalculator.verifyResult(), 20*10);\n\t}", "@Test(priority=2)\n\n\tpublic void subtractionTest() {\n\n\t\tandroidCalculator = new AndroidCalculator(driver);\n\n\t\tandroidCalculator.inputLeftAndRightFields(\"20\", \"10\");\n\t\tandroidCalculator.subtraction();\n\n\t\tAssert.assertEquals(androidCalculator.verifyResult(), 20+10);\n\t}", "@Test\n void operations() {\n HotelOperation.scanner = new Scanner(\"1 2 3 4 5 -1\");\n Receptionist res = new Receptionist();\n assertEquals(1,res.Operations());\n assertEquals(2,res.Operations());\n assertEquals(3,res.Operations());\n assertEquals(4,res.Operations());\n assertEquals(5,res.Operations());\n\n }", "@Test //This is integration test\r\n\tpublic void testCalculatePrice01() throws Exception\r\n\t{\n\t\tImportInformation information = new ImportInformation();\r\n\t\tinformation.importMenu(\"Food_Data_Test1\");\r\n\t\tinformation.importUserInput();\t\r\n\t\tCalculation calcPrice = new Calculation();\r\n\t\tcalcPrice.calculatePrice(information.getMenu(),information.getUserInput());\r\n\t\t// compare the object itself and its side effects instead of String output, the string output can be done in main.\r\n\t\tArrayList<Food> exspectedFoodList = new ArrayList<Food>();\r\n\t\tArrayList<Combination> exspectedCombinationList = new ArrayList<Combination>();\r\n\t\tassertEquals(exspectedCombinationList, calcPrice.getResult());\r\n\t}", "@Test\n public void testPerform(){\n //test basic cases from main activity\n\n perform(\"0.1+2-3×4÷5×(6-7-8+9)%\");\n onView(withId(R.id.textView3)).check(matches(withText(\"0.1+2-3×4÷5×(6-7-8+9)%\")));\n onView(withId(R.id.result)).perform(click());\n onView(withId(R.id.textView5)).check(matches(withText(\"Result: \"+\"2.1\")));\n onView(withId(R.id.lac)).perform(click());\n\n //test if function and variable buttons work or not.\n perform(\"xyzgπe,log(cos(sin(tan(log(pow(\");\n onView(withId(R.id.textView3)).check(matches(withText(\"xyzgπe,log(cos(sin(tan(log(pow(\")));\n\n //Test if backspace work or not. (the whole function like 'log(' will be deleted)\n onView(withId(R.id.lback)).perform(click());\n onView(withId(R.id.textView3)).check(matches(withText(\"xyzgπe,log(cos(sin(tan(log(\")));\n onView(withId(R.id.lac)).perform(click());\n onView(withId(R.id.textView3)).check(matches(withText(\"0\")));\n }", "public static void main( String[] args )\n {\n Calculator calculator = new Calculator(2.2f);\n// Calculator calculator2 = new Calculator(3f);\n// calculator.name = \"calc\";\n// //System.out.println(Calculator.name);\n// calculator.add(5f);\n// System.out.println(calculator2.name);\n// System.out.println(calculator.getTotal());\n// calculator2.subtract(2f);\n// System.out.println(calculator2.getTotal());\n//\n// calculator.add(5f).subtract(1f).add(2.5f);\n// System.out.println(calculator.getTotal());\n\n for (int i = 0; i < 10; i++) {\n calculator.add(i);\n System.out.println(calculator.getTotal());\n }\n }", "@Given(\"^I have a calculator$\")\n public void initializeCalculator() throws Throwable {\n calculator = new Calculator();\n }", "public static void main(String[] args){\n\t\tSimpleCalculator calc = new SimpleCalculator();\n\t\tboolean a=true;\n\t\tdouble number = 0.0;\n\t\tString checker = \"\";\n\t\twhile(a){\n\t\t\tSystem.out.println(\"Result: \" + number);\n\t\t\tSystem.out.println(\"Enter an operation or 'q' to end the program.\");\n\t\t\tScanner scan = new Scanner(System.in);\n\t\t\ttry{\n\t\t\t\tchecker= scan.next();\n\t\t\t\tif (checker.equals(\"q\")){\n\t\t\t\t\ta=false;\n\t\t\t\t}\n\t\t\t\telse if (!checker.equals(\"+\")&& !checker.equals(\"-\")&& !checker.equals(\"*\") && !checker.equals(\"/\")&&\n\t\t\t\t\t\t!checker.equals(\"%\")){\n\t\t\t\t\tthrow new UnknownOperatorException();\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch(UnknownOperatorException e){\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t\tif(a&&(checker.equals(\"+\")|| checker.equals(\"-\")|| checker.equals(\"*\") || checker.equals(\"/\")||\n\t\t\t\t\tchecker.equals(\"%\"))){\n\t\t\t\ttry{\n\t\t\t\t\tSystem.out.println(\"Please enter a number: \");\n\t\t\t\t\tnumber= scan.nextDouble();\n\t\t\t\t\tif (checker.equals(\"/\")&&(number==0)){\n\t\t\t\t\t\tthrow new ArithmeticException();\n\t\t\t\t\t}\n\t\t\t\t\tcalc.calcSetter(number, checker);\n\t\t\t\t\tnumber =calc.CalcLogic();\n\t\t\t\t}\n\t\t\t\tcatch(InputMismatchException exceptionObj){\n\t\t\t\t\tSystem.out.println(\"That is not a number! Please try again!\");\n\t\t\t\t\tScanner scan2 = new Scanner(System.in);\n\t\t\t\t\tnumber = scan2.nextDouble();\n\t\t\t\t}\n\t\t\t\tcatch(ArithmeticException e){\n\t\t\t\t\tSystem.out.println(\"Cannot divide by zero!\");\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "public Calculator() {\n initComponents();\n setResizable(false);\n \n NumListener numListener = new Calculator.NumListener();\n numButton0.addActionListener(numListener);\n numButton1.addActionListener(numListener);\n numButton2.addActionListener(numListener);\n numButton3.addActionListener(numListener);\n numButton4.addActionListener(numListener);\n numButton5.addActionListener(numListener);\n numButton6.addActionListener(numListener);\n numButton7.addActionListener(numListener);\n numButton8.addActionListener(numListener);\n numButton9.addActionListener(numListener);\n pointButton.addActionListener(numListener);\n \n OpListener opListener = new Calculator.OpListener();\n plusButton.addActionListener(opListener);\n minButton.addActionListener(opListener);\n multButton.addActionListener(opListener);\n divButton.addActionListener(opListener);\n sqrtButton.addActionListener(opListener);\n eqButton.addActionListener(opListener);\n signButton.addActionListener(opListener);\n \n ClearListener clearListener = new ClearListener();\n cButton.addActionListener(clearListener);\n ceButton.addActionListener(clearListener);\n }", "public Calculator () {\r\n\t\ttotal = 0; // not needed - included for clarity\r\n\t}", "@Test\n\tvoid divide() {\n\t\tfloat result = calculator.divide(12, 4);\n\t\tassertEquals(3,result);\n\t}", "public interface Calculator {\n //add method\n double add(double x, double y);\n\n //subtract method\n double subtract(double x, double y);\n\n //mulpiply method\n double multiply(double x, double y);\n\n //Divide method\n double divide(double x, double y) throws IllegalArgumentException;\n}", "@Test\n public void testAddition() {\n Addition add = new Addition();\n assertEquals(\"Addition Failed!\", summation, add.AddOperation(v1, v2));\n System.out.println(\"Test for \" + v1 + \" and \" + v2 + \" has been passed!\\n\");\n }", "private double operation(char operand, double num1, double num2){\r\n\t\t\tdouble result;\r\n\t\t\tCalculatorImpl ci = new CalculatorImpl();\r\n\t\t\tswitch(operand){\r\n\t\t\tcase PLUS : result = ci.getAddition(num1, num2);break;\r\n\t\t\tcase MINUS : result = ci.getSubtraction(num1, num2);break;\r\n\t\t\tcase MULTI : result = ci.getMultification(num1, num2);break;\r\n\t\t\tcase DIVIDE : result = ci.getDivision(num1, num2);break;\r\n\t\t\tdefault : result=0.0;break;\r\n\t\t\t}\r\n\t\t\treturn result;\r\n\t\t}", "@Test\n void scCreation() {\n StandardCalc sc = new StandardCalc();\n }", "public interface CalculatorService {\n\n\tpublic double add(double arg1, double arg2); \n\tpublic double sub(double arg1, double arg2); \n\tpublic double div(double arg1, double arg2);\n\tpublic double mult(double arg1, double arg2);\n}", "@Test\r\n\tpublic void testCompileOperator() {\r\n\r\n\t\t// Enter the code\r\n\r\n\t\tdriver.findElement(By.name(\"code[code]\")).sendKeys(\"a = 5\\nb = a - 1\\nc = a + (b / 2 * 4)\");\r\n\r\n\t\t// Look for the \"Compile\" button and click\r\n\r\n\t\tdriver.findElements(By.name(\"commit\")).get(2).click();\r\n\r\n\t\t// Check that there contains the word \"opt_plus\", \"opt_minus\",\r\n\t\t// \"opt_mult\" and \"opt_div\"\r\n\r\n\t\ttry {\r\n\t\t\tWebElement code = driver.findElement(By.tagName(\"code\"));\r\n\t\t\tassertTrue(code.getText().contains(\"opt_plus\"));\r\n\t\t\tassertTrue(code.getText().contains(\"opt_minus\"));\r\n\t\t\tassertTrue(code.getText().contains(\"opt_mult\"));\r\n\t\t\tassertTrue(code.getText().contains(\"opt_div\"));\r\n\t\t} catch (NoSuchElementException nseex) {\r\n\t\t\tfail();\r\n\t\t}\r\n\t}", "public interface CalcModel {\n\t/**\n\t * Adds a listener to the model.\n\t * \n\t * @param l\n\t * listener to ad\n\t */\n\tvoid addCalcValueListener(CalcValueListener l);\n\n\t/**\n\t * Removes a listener from the model.\n\t * \n\t * @param l\n\t * listener to remove\n\t */\n\tvoid removeCalcValueListener(CalcValueListener l);\n\n\t/**\n\t * Returns a string representation of the current value in the calculator.\n\t * \n\t * @return string representation of the current value\n\t */\n\tString toString();\n\n\t/**\n\t * Returns a current value in calculator.\n\t * \n\t * @return current value in calculator\n\t */\n\tdouble getValue();\n\n\t/**\n\t * Sets the current value of the calculator to the given one.\n\t * \n\t * @param value\n\t * value to set\n\t */\n\tvoid setValue(double value);\n\n\t/**\n\t * Clears the current value in the calculator (sets it to 0).\n\t */\n\tvoid clear();\n\n\t/**\n\t * Clears the current value (sets it to 0), clears the active operand and clears\n\t * the pending binary operator.\n\t */\n\tvoid clearAll();\n\n\t/**\n\t * Swaps the sign of the current value in the calculator.\n\t */\n\tvoid swapSign();\n\n\t/**\n\t * Inserts a decimal point into the current number if one already doesn't exist.\n\t */\n\tvoid insertDecimalPoint();\n\n\t/**\n\t * Inserts a digit into the current number at the right most position.\n\t * \n\t * @param digit\n\t * new digit to be inserted\n\t */\n\tvoid insertDigit(int digit);\n\n\t/**\n\t * Checks if the active operand is set.\n\t * \n\t * @return true if active operand is set, false otherwise\n\t */\n\tboolean isActiveOperandSet();\n\n\t/**\n\t * Returns the active operand if it is set.\n\t * \n\t * @return active operand\n\t * @throws IllegalStateException\n\t * if active operand isn't set\n\t */\n\tdouble getActiveOperand();\n\n\t/**\n\t * Sets the active operand.\n\t * \n\t * @param activeOperand\n\t * a value to set as an active operand\n\t */\n\tvoid setActiveOperand(double activeOperand);\n\n\t/**\n\t * Clears the active operand.\n\t */\n\tvoid clearActiveOperand();\n\n\t/**\n\t * Returns pending binary operation.\n\t * \n\t * @return pending binary operation or null if it is not set\n\t */\n\tDoubleBinaryOperator getPendingBinaryOperation();\n\n\t/**\n\t * Sets pending binary operation.\n\t * \n\t * @param op\n\t * binary operator to set\n\t */\n\tvoid setPendingBinaryOperation(DoubleBinaryOperator op);\n}", "public Calculator() {\n initComponents();\n \n }", "@Test\n public void add5_checkTotal_shouldBe5() {\n Calculator calculator = new Calculator();\n\n // Act - add 5\n calculator.add(5);\n\n // Assert - check that the new total is 5\n Assert.assertEquals(5, calculator.getTotal());\n }", "public Calculator () {\r\n\t\ttotal = 0; // not needed - included for clarity\r\n\t\thistory = \"\" + 0;\r\n\t}", "@Test\r\n\tpublic void testArithmeticOperators() throws Exception {\r\n\t\tfinal String module = \"-------------- MODULE Testing ----------------\\n\"\r\n\t\t\t\t+ \"EXTENDS Naturals \\n\"\r\n\t\t\t\t+ \"ASSUME 1 + 2 = 4-1 /\\\\ 1 * 2 = 4 \\\\div 2 /\\\\ 1 ^ 1 = 1 \\n\"\r\n\t\t\t\t+ \"=================================\";\r\n\t\tStringBuilder sb = TestUtil.translateString(module);\r\n\t\tfinal String expected = \"MACHINE Testing\\n\"\r\n\t\t\t\t+ \"PROPERTIES 1 + 2 = 4 - 1 & 1 * 2 = 4 / 2 & 1 ** 1 = 1 \\n\"\r\n\t\t\t\t+ \"END\";\r\n\t\tassertEquals(TestUtil.getTreeAsString(expected), TestUtil.getTreeAsString(sb.toString()));\r\n\t}", "@Test\n void testWhiteSpace() {\n assertEquals(1, Calculator.calculate(\" 5 - 4\"));\n }", "public static int calculator(int num1, int num2, String operator) {\n\n int result = 0;\n if (operator.equals(\"+\")) {\n result = num1 + num2;\n\n } else if (operator.equals(\"-\")) {\n result = num1 - num2;\n\n } else if (operator.equals(\"/\")) {\n if (num1 != 0 && num2 == 0) {\n System.out.println(\"the operation is not possible because one number if zero\");\n throw new IllegalArgumentException(\"error: you tried to divide by 0\");\n }\n result = num1 / num2;\n\n } else if (operator.equals(\"*\")) {\n result = num1 * num2;\n\n } else {\n throw new IllegalArgumentException(\"error: unknown operator: \" + operator);\n }\n\n return result;\n }", "@Test\r\n public void testAddition() {\n }", "@Test\n\tvoid givenTwoIntegers_WhenSum_ThenCorrectResult() {\n\t\tapplication.numberOneTextField.setText(\"5\");\n\t\tapplication.numberTwoTextField.setText(\"7\");\n\t\tString expectedResult = \"12\";\n\t\t\n\t\t// When operation is sum\n\t\tapplication.operationButton.doClick();\n\t\t\n\t\t// Then result is 12\n\t\tString actualResult = application.resultTextField.getText();\n\t\tassertEquals(expectedResult, actualResult);\n\t}", "static void testCaculator(){\n }", "public void Calculation(){\n if(Symbol.equals(\"+\"))\n {\n AnswerHalf = AnswerHalf + ButtonValue;\n }\n else if(Symbol.equals(\"-\"))\n {\n AnswerHalf = AnswerHalf - ButtonValue;\n }\n else if(Symbol.equals(\"*\"))\n {\n AnswerHalf = AnswerHalf * ButtonValue;\n }\n else if(Symbol.equals(\"/\"))\n {\n AnswerHalf = AnswerHalf/ButtonValue;\n }\n printAnswer = Double.toString(AnswerHalf);\n AfterEqual = 1;\n SymbolMark = 0;\n c = 0;\n AfterAnswer = 0;\n TFCalcBox.setText(printAnswer);\n }", "@Test\n public void testCalcularValorDeVenda() {\n System.out.println(\"CalcularValorDeVenda\");\n Telemovel instance = new Telemovel(\"Samsung Galaxy S20\",1500);\n double expResult = 1545;\n double result = instance.CalcularValorDeVenda();\n assertEquals(expResult, result, 0.0);\n \n }", "public static void main(String[] args) {\n new Calculator();\n }", "@Test\n public void pruebaCalculCamiseta() {\n System.out.println(\"prueba Calcul Camiseta\");\n Camiseta camisetaTest = new Camiseta(1);\n assertEquals(190, (camisetaTest.calculCamiseta(1)),0) ;\n \n Camiseta camisetaTestDos = new Camiseta(2);\n assertEquals(1481.2, (camisetaTestDos.calculCamiseta(7)),0) ;\n \n Camiseta camisetaTestTres = new Camiseta(3);\n assertEquals(1178, (camisetaTestTres.calculCamiseta(4)),0) ;\n \n \n }", "public void operation() {\n\t\t\n\t\tswitch(calculation){\n\t\t\tcase 1:\n\t\t\t\ttotal = num + Double.parseDouble(textField.getText());\n\t\t\t\ttextField.setText(Double.toString(total));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 2:\n\t\t\t\ttotal = num - Double.parseDouble(textField.getText());\n\t\t\t\ttextField.setText(Double.toString(total));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 3:\n\t\t\t\ttotal = num * Double.parseDouble(textField.getText());\n\t\t\t\ttextField.setText(Double.toString(total));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 4:\n\t\t\t\ttotal = num / (Double.parseDouble(textField.getText()));\n\t\t\t\ttextField.setText(Double.toString(total));\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t}\n\t}", "public boolean testAdd() {\n boolean succeeded = true;\n\n // Test positive addition\n this.mockCalculator.x = new Double(10);\n \n Double resultPositive = this.mockCalculator.x(new Double(5));\n Double expectedPositive = new Double(15);\n\n if (!resultPositive.equals(expectedPositive)) {\n succeeded = false;\n System.out.println(\"[FAIL] Calculator adds incorrectly\");\n } else {\n System.out.println(\"[ OK ] Calculator can add positive numbers\");\n }\n\n // Test negative addition\n this.mockCalculator.x = new Double(-10);\n \n Double resultNegative = this.mockCalculator.x(new Double(-5));\n Double expectedNegative = new Double(-15);\n \n if (!resultNegative.equals(expectedNegative)) {\n succeeded = false;\n System.out.println(\"[FAIL] Calculator adds with negative numbers incorrectly\");\n } else {\n System.out.println(\"[ OK ] Calculator can add a negative number\");\n }\n\n return succeeded;\n }", "@Test\n\tvoid testAddFloat() {\n\t\tfloat result = calculator.add(3.4F,1F);\n\t\tassertEquals(4.4,result,0.0000009536732);//delta\n\t}", "public boolean formResult()\r\n {\r\n if (operator.equals(\"+\") && validOperands())\r\n {\r\n add();\r\n }\r\n else if (operator.equals(\"-\") && validOperands())\r\n {\r\n subtract();\r\n }\r\n else if (operator.equals(\"\\u00D7\") && validOperands())\r\n {\r\n multiply();\r\n }\r\n else if (operator.equals(\"\\u00F7\") && validOperands())\r\n {\r\n String[] test = rightOperand.split(\"\\\\+|-\");\r\n \r\n if (test[0].equals(\"0\")) {\r\n clear();\r\n return false;\r\n }\r\n divide();\r\n }\r\n return true;\r\n }", "@Test\n public void shouldMulTwoNumbers()\n {\n assertEquals(\"2 * 3 should be 6\", 6, Multiplication.mul(2, 3));\n }", "@Test\n public void subtract4_checkTotal_shouldBeMinus4() {\n Calculator calculator = new Calculator();\n\n // Act - subtract 4\n calculator.subtract(4);\n\n // Assert - check that the new total is -4\n Assert.assertEquals(-4, calculator.getTotal());\n }", "@FXML\n private void handleBtnOperators(ActionEvent event) {\n if (testForNewNumber) {\n testForNewNumber = false;\n }\n //TODO DONE erst null-prüfen, dann Inhalt\n //TODO DONE nach Fehlermeldung muss weitergerechnet werden können (9/0 -> Fehlermeldung)\n try {\n if ((txtFldDisplay.getText() != null) && (txtFldDisplay.getText() != \" \")) {\n if (myResult.getOperator() != null && myResult.getOperator() != \"=\") {\n myResult.setNumber2(Double.valueOf(txtFldDisplay.getText()));\n\n myResult.setNumber1(myResult.operateNumbers());\n myResult.setNumber2(0.0);\n } //TODO DONE nur spezielle Exception abfangen\n else {\n myResult.setNumber1(Double.valueOf(txtFldDisplay.getText()));\n }\n }\n\n myResult.setOperator(((Button) event.getSource()).getText());\n txtFldDisplay.setText(\" \");\n } catch (ArithmeticException e) {\n txtFldDisplay.setText(\"ArithmeticException: \" + e);\n myResult.setNumber1(0.0);\n myResult.setNumber2(0.0);\n testForNewNumber = true;\n myResult.setOperator(\"=\");\n\n }\n }", "@Test\n\tpublic void test_StringCalculator_WhenTwoDigitsNumbersUsed_Then_ReturnValidSum() {\n\t\tAssert.assertEquals(24,calc.Add(\"12,12\"));\n\t}", "public CalculatorUtil(){\n value = \"\";\n decimalUsed = false;\n arr = new String[20];\n tail = 0;\n }", "public static void operations() {\n System.out.println(\"Enter two numbers\");\n double a = getNumber();\n double b = getNumber();\n\n System.out.println(\"Enter operations (as one string)\");\n String input = scanner.nextLine();\n\n if (input.contains(\"+\")) {\n System.out.println(\"Sum: \" + sum(a, b));\n }\n if (input.contains(\"-\")) {\n System.out.println(\"Difference: \" + diff(a, b));\n }\n if (input.contains(\"*\")) {\n System.out.println(\"Product: \" + multi(a, b));\n }\n if (input.contains(\"/\")) {\n System.out.println(\"Fraction: \" + div(a, b));\n }\n }", "@Test\n public void whenTryExecuteMultiplyShouldCheckThatIsWorkCorrect() {\n String[] answer = new String[]{\"2\", \"2\", \"y\"};\n StubIO stubIO = new StubIO(answer);\n MenuCalculator menuCalculator = new MenuCalculator(new Calculator(), stubIO, actions);\n menuCalculator.fillActions();\n String expected = String.format(\"%s + %s = %s\\n%s * %s = %s\\n\",\n 0.0, 2.0, 2.0, 2.0, 2.0, 4.0);\n final int firstCommand = 0;\n final int secondCommand = 2;\n\n menuCalculator.select(firstCommand);\n menuCalculator.select(secondCommand);\n\n assertThat(stubIO.getOut(), is(expected));\n }", "@Override\n\tpublic void calcul() {\n\t\tif(this.operateur.equals(\"\"))\n\t\t\tthis.result = Double.parseDouble(this.operande);\n\t\telse {\n\t\t\tif(!this.operande.equals(\"\")) {\n\t\t\t\tif(this.operateur.equals(\"+\")) {\n\t\t\t\t\tthis.result += Double.parseDouble(this.operande);\n\t\t\t\t}\n\t\t\t\tif(this.operande.equals(\"-\")) {\n\t\t\t\t\tthis.result -= Double.parseDouble(this.operande);\n\t\t\t\t}\n\t\t\t\tif(this.operateur.equals(\"*\"))\n\t\t\t\t\tthis.result *= Double.parseDouble(this.operande); \n\t\t\t\tif(this.operateur.equals(\"/\")){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tthis.result /= Double.parseDouble(this.operande);\n\t\t\t\t\t}catch(ArithmeticException e){\n\t\t\t\t\t\tthis.result = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.operande = \"\";\n\t\tnotifyObserver(String.valueOf(this.result));\n\t}", "@Test\n\tpublic void simple() throws Exception {\n\t\tEvalImpl t = new EvalImpl();\n\t\tassertEquals(3.0, t.eval(\"1 + 2\"), 0d);\n\t}", "@Test\n\tpublic void test_StringCalculator_WhenMultipleDigitsUsed_ThenReturmSum() {\n\t\tAssert.assertEquals(10, calc.Add(\"1,2,3,2,2\"));\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tExForMath mathobj = new ExForMath();\r\n\t\t\r\n\t\tScanner userinput=new Scanner(System.in);\r\n\t\t\r\n\t\tSystem.out.println(\"Welcome to Java Calculator\");\r\n\t\tSystem.out.println(\"==========================\");\r\n\t\tSystem.out.println(\"Enter first number:\");\r\n\t\t\r\n\t\tint num1=userinput.nextInt();\r\n\t\t\r\n\t\tSystem.out.println(\"Enter second number:\");\r\n\t\t\r\n\t\tint num2=userinput.nextInt();\r\n\t\t\r\n\t\tSystem.out.println(\"Enter the operation that you want to use(+,-,x,/):\");\r\n\t\t\r\n\t\tString operation = userinput.next();\r\n\t\t\r\n\t\tif (operation.equals(\"+\"))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The answer is \" +mathobj.add(num1, num2));\r\n\t\t}\t\r\n\t\t\r\n\t\tif (operation.equals(\"-\"))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The answer is \" +mathobj.subtract(num1, num2));\r\n\t\t}\r\n\t\t\r\n\t\tif (operation.equals(\"x\"))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The answer is \" +mathobj.multiply(num1, num2));\r\n\t\t}\r\n\t\t\r\n\t\tif (operation.equals(\"/\"))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"The answer is \" +mathobj.divide(num1, num2));\r\n\t\t}\r\n\r\n\t}", "@Test\r\n\tpublic void testCalculate() throws Exception {\r\n\r\n\t\tMap<String, Order> o = new LinkedHashMap<String, Order>();\r\n\r\n\t\tOrder order1 = new Order();\r\n\t\torder1.add(new OrderLine(new Item(\"chocolate bar\", (float) 0.85), 1));\r\n\t\to.put(\"Order 1\", order1);\r\n\r\n\t\tOrder order2 = new Order();\r\n\t\torder2.add(new OrderLine(new Item(\"box of imported chocolates\", (float) 11.25), 1));\r\n\t\to.put(\"Order 2\", order2);\r\n\r\n\t\tOrder order3 = new Order();\r\n\t\torder3.add(new OrderLine(new Item(\"imported bottle of perfume\", (float) 47.50), 1));\r\n\t\to.put(\"Order 3\", order3);\r\n\r\n\t\tcalculator.calculate(o);\r\n\t}", "public interface Calculator extends CalculatorEventContainer, HistoryControl<CalculatorHistoryState> {\n\n void init();\n\n /*\n **********************************************************************\n *\n * CALCULATIONS\n *\n **********************************************************************\n */\n\n void evaluate();\n\n void evaluate(@NotNull Long sequenceId);\n\n void simplify();\n\n @NotNull\n CalculatorEventData evaluate(@NotNull JsclOperation operation,\n @NotNull String expression);\n\n @NotNull\n CalculatorEventData evaluate(@NotNull JsclOperation operation,\n @NotNull String expression,\n @NotNull Long sequenceId);\n\n /*\n **********************************************************************\n *\n * CONVERSION\n *\n **********************************************************************\n */\n\n boolean isConversionPossible(@NotNull Generic generic, @NotNull NumeralBase from, @NotNull NumeralBase to);\n\n @NotNull\n CalculatorEventData convert(@NotNull Generic generic, @NotNull NumeralBase to);\n\n /*\n **********************************************************************\n *\n * EVENTS\n *\n **********************************************************************\n */\n @NotNull\n CalculatorEventData fireCalculatorEvent(@NotNull CalculatorEventType calculatorEventType, @Nullable Object data);\n\n @NotNull\n CalculatorEventData fireCalculatorEvent(@NotNull CalculatorEventType calculatorEventType, @Nullable Object data, @NotNull Object source);\n\n @NotNull\n CalculatorEventData fireCalculatorEvent(@NotNull CalculatorEventType calculatorEventType, @Nullable Object data, @NotNull Long sequenceId);\n\n\t@NotNull\n\tPreparedExpression prepareExpression(@NotNull String expression) throws CalculatorParseException;\n}", "@Test\n\tpublic void testMultiplica2Enteros() {\n\t\tdouble resultado= Producto.multiplica2enteros(10, 10);\n\t\tdouble esperado= 100;\n\t\t\n\t\tassertEquals(esperado, resultado);\n\t}", "public static void main(String[] args) {\n\n System.out.println(\"------------------------------------\");\n //making a simple console calculator\n Scanner sc = new Scanner(System.in);\n double x, y;\n double result = 0;\n\n System.out.println(\"1. Addition\");\n System.out.println(\"2. Subtraction\");\n System.out.println(\"3. Multiplying\");\n System.out.println(\"4. Division\"); //HW\n System.out.print(\"Enter the operation: \");\n int operation = sc.nextInt();\n\n System.out.print(\"Enter first number: \");\n x = sc.nextInt();\n System.out.print(\"Enter second number: \");\n y = sc.nextInt();\n\n //simple\n if (operation == 1) {\n result = x + y;\n } else if (operation == 2) {\n result = x - y;\n } else if (operation == 3) {\n result = x * y;\n } else if (operation == 4 && y != 0) {\n result = x / y;\n } else {\n System.out.println(\"Wrong operation!\");\n }\n \n System.out.println(\"Result: \" + result);\n }", "public void control()\n {\n if(this.listOperator.contains(this.operator))\n {\n\n if(this.operator.equals(\"=\")) // If the operator is \"=\"\n {\n // We ask to the model to display the result\n this.calc.getResult();\n }\n else // Else, we give the operator to the model\n {\n this.calc.setOperator(this.operator);\n }\n }\n \n // If the number is ok\n if(this.number.matches(\"^[0-9.]+$\"))\n {\n this.calc.setNumber(this.number);\n }\n\n this.operator = \"\";\n this.number = \"\";\n }", "@Test\n\tpublic void testAddition() {\n\t assertEquals(\"4 + 5 must be 9\", 9, this.tester.addTwoNumbers(4, 5));\n\t }", "@Test\n\tvoid testAdd() {\n\t\tint result = calculator.add(1,3);//act\n\t\tassertEquals(4,result);//assert//customized the failed message \"Test failed\"\n\t}", "@Test\n void scEvaluate() {\n StandardCalc sc = new StandardCalc();\n String expression = (\"( 5 * ( 6 + 7 ) ) - 2\");\n float result = 0f;\n try {\n result = sc.evaluate(expression);\n } catch (InvalidExpressionException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n assertEquals(result, 63);\n }", "@Test\n public void testCalculate() throws Exception {\n Writer writer = new Writer();\n File file = new File(\"/home/spec/HomeWork/semestr2/homework5/hw5_task1/src/arithmeticTree/input.txt\");\n writer.writeTextToFile(\"(* (+ (* (+ 10 15) 2) 50) (- (+ 5 5) (/ 8 4)))\");\n ArithmeticTree tree = new ArithmeticTree(file);\n assertEquals(800, tree.calculate());\n writer.writeTextToFile(\"(* (+ 1 1) 2)\");\n tree = new ArithmeticTree(file);\n assertEquals(4, tree.calculate());\n writer.writeTextToFile(\"(+ (/ 100 20) (/ 100500 (/ 400 4))\");\n tree = new ArithmeticTree(file);\n assertEquals(1010, tree.calculate());\n }", "public static void main(String[] args) {\n\n\t\t// Check number of strings passed\n\t\tif (args.length != 3) {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"Usage: java Calculator operand1 operator operand2\");\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\t// The result of the operation\n\t\tint result = 0;\n\n\t\t// Determine the operator\n\t\tswitch (args[1].charAt(0)) {\n\t\tcase '+': result = Integer.parseInt(args[0]) +\n\t\t\t\tInteger.parseInt(args[2]);\n\t\tbreak;\n\t\tcase '-': result = Integer.parseInt(args[0]) -\n\t\t\t\tInteger.parseInt(args[2]);\n\t\tbreak;\n\t\tcase '.': result = Integer.parseInt(args[0]) *\n\t\t\t\tInteger.parseInt(args[2]);\n\t\tbreak;\n\t\tcase '/': result = Integer.parseInt(args[0]) /\n\t\t\t\tInteger.parseInt(args[2]);\n\t\t}\n\n\t\t// Display result\n\t\tSystem.out.println(args[0] + ' ' + args[1] + ' ' + args[2] + \" = \" + result);\n\n\n\n\n\t}", "public static void main(String[] args) {\n\t\n\t\t Calculator myCalculator = new Calculator();\n\t\t\n\t\t System.out.println(myCalculator.add(5, 7));\n\t\t \n\t\t System.out.println(myCalculator.subtract(45, 11));\n\t\t \n\t\t \n\t}", "private static void testSetters() {\r\n\t\tSystem.out.println(\"\\n----------\\nTesting setEquationString()\");\r\n\t\tCalculator calc = new Calculator();\r\n\t\tString calcString = \"\";\r\n\t\ttry {\r\n\t\t\tcalcString = calc.getEquationString();\r\n\t\t}catch (Exception e) {\r\n\t\t\tcalcString = e.toString();\r\n\t\t}\r\n\t\tprintTest(false, \"Calling empty constructor\", calcString, \"java.lang.SecurityException: Calculator is not properly initialized.\");\r\n\t\t\r\n\t\tcalc.setEquationString(\"(5*5*2*2)-(2*5)-(5*2*(2+3+4))\");\r\n\t\tprintTest(true, \"setting equationString to (5*5*2*2)-(2*5)-(5*2*(2+3+4))\", calc.getEquationString(), \"(5*5*2*2)-(2*5)-(5*2*(2+3+4))\");\r\n\t}", "public int operation(int number1,int number2,String operator)", "public Calculator( String toParse )\r\n\t{\r\n\t\tequationString = \ttoParse;\r\n\t\tinitialized = \t\ttrue;\r\n\t}", "@Test(priority=4)\n\n\tpublic void divisionTest() {\n\n\t\tandroidCalculator = new AndroidCalculator(driver);\n\n\t\tandroidCalculator.inputLeftAndRightFields(\"20\", \"10\");\n\t\tandroidCalculator.division();\n\n\t\tAssert.assertEquals(androidCalculator.verifyResult(), 20/10);\n\t}", "@Test\n public void testDivideWithRemainder() {\n System.out.println(\"divideWithRemainder\");\n int a = 0;\n Calculator instance = new Calculator();\n int expResult = 0;\n int result = instance.divideWithRemainder(a);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public void actionPerformed(ActionEvent e) {\n if (_startNumber) { // Error: needed number, not operator\n //... In this state we're expecting a number, but got an operator.\n actionClear();\n _display.setText(\"ERROR - No operator\");\n } else {\n //... We're expecting an operator.\n _startNumber = true; // Next thing must be a number\n try {\n // Get value from display field, convert, do prev op\n // If this is the first op, _previousOp will be =.\n String displayText = _display.getText();\n \n if (_previousOp.equals(\"=\")) {\n _logic.setTotal(displayText);\n } else if (_previousOp.equals(\"+\")) {\n _logic.add(displayText);\n } else if (_previousOp.equals(\"-\")) {\n _logic.subtract(displayText);\n } else if (_previousOp.equals(\"*\")) {\n _logic.multiply(displayText);\n } else if (_previousOp.equals(\"/\")) {\n _logic.divide(displayText);\n } else if (_previousOp.equals(\"AND\")) {\n _logic.and(displayText);\n } else if (_previousOp.equals(\"OR\")) {\n _logic.or(displayText);\n } else if (_previousOp.equals(\"XOR\")) {\n _logic.xor(displayText);\n } else if (_previousOp.equals(\"NOR\")) {\n _logic.nor(displayText);\n } else if (_previousOp.equals(\"NAND\")) {\n _logic.nand(displayText);\n }\n \n _display.setText(\"\" + _logic.getTotalString());\n \n } catch (NumberFormatException ex) {\n actionClear();\n _display.setText(\"Error\");\n }\n \n //... set _previousOp for the next operator.\n _previousOp = e.getActionCommand();\n }//endif _startNumber\n }", "public interface ICalculator {\n String add(String num1, String num2);\n}" ]
[ "0.773926", "0.7714007", "0.7268784", "0.72357774", "0.7072081", "0.7013514", "0.69922036", "0.69623727", "0.69127214", "0.6875183", "0.6702622", "0.6673031", "0.6640333", "0.6624947", "0.6611172", "0.65983874", "0.6561454", "0.65502", "0.65389585", "0.6511362", "0.6509231", "0.65043175", "0.65039176", "0.6486311", "0.64783305", "0.6473979", "0.64311224", "0.6422278", "0.6411261", "0.6398743", "0.6364173", "0.63582593", "0.63527656", "0.6329955", "0.63045996", "0.6304249", "0.6300042", "0.62967527", "0.6270769", "0.6257777", "0.62571007", "0.6247301", "0.62458885", "0.6238012", "0.6228394", "0.6169285", "0.6165286", "0.61538935", "0.61517465", "0.61470646", "0.6145292", "0.6137479", "0.61322886", "0.61290044", "0.6123372", "0.61191636", "0.61139065", "0.6109803", "0.6087173", "0.60783464", "0.6054622", "0.60542184", "0.60522896", "0.6042328", "0.6041979", "0.6041547", "0.60352826", "0.603438", "0.60340255", "0.60324365", "0.6029807", "0.6023094", "0.6020658", "0.60205597", "0.6016311", "0.6015426", "0.6014585", "0.6012117", "0.6011209", "0.6006577", "0.6004651", "0.60021013", "0.599693", "0.5982582", "0.5970708", "0.59534204", "0.5945559", "0.5935212", "0.5935133", "0.5934374", "0.5933846", "0.5926139", "0.5924194", "0.5923924", "0.59225166", "0.59124404", "0.5905618", "0.59047985", "0.5896344", "0.58865666" ]
0.6130971
53
Listen for Camunda events "create a task" and check if configured external task topic is registered. If is registered then fetch and lock the external task and call the registered method.
protected void onTaskEvent(final String processDefinitionKey, final FlowElement bpmnElement) { final String topic = getTopic(bpmnElement); if (topic == null) { return; // an activity which has not an external task implementation } final String key = getInternalKey(processDefinitionKey, topic); if (!registrations.containsKey(key)) { return; // a topic not yet registered } /* * Fetch and lock needs to be done in a separate transaction. Additionally at * the moment of task creation the External Task is not yet visible to other * threads and we need wait for the current transaction to complete. */ doAfterTransaction(() -> processAsynchronously(() -> fetchAndLockExternalTasks(key))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Task createTask();", "Task createTask();", "Task createTask();", "void onTaskStart();", "void startTask( org.openxdata.server.admin.model.TaskDef task, AsyncCallback<java.lang.Boolean> callback );", "public void startTaskTriggerCheckerThread() {\n new Thread(new Runnable() {\n @Override\n public void run() {\n canRunEnqueueTaskThread.set(true);\n while(canRunEnqueueTaskThread.get()) {\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n if(taskEnqueued.get() || canRunTaskThread.get()) { //do not enqueue the task if an instance of that task is already enqueued or running.\n continue;\n //log(PrioritizedReactiveTask.this.getClass().getSimpleName() + \" already in queue or is currently executing\");\n } else if(shouldTaskActivate()) {\n System.out.println(\"Thread \" + Thread.currentThread().getId() + \" enqueued task: \" + this.getClass().getSimpleName());\n taskQueue.add(PrioritizedReactiveTask.this);\n activeTasks.add(PrioritizedReactiveTask.this);\n taskEnqueued.set(true);\n try {\n Thread.sleep(5000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }\n }\n }).start();\n }", "@Override\n public <T> void onCreate(Task<T> task) {\n\n final String taskId = task.getTaskId();\n\n if (!StringUtils.isEmpty(taskId)) {\n if (inProgressQueue.containsKey(taskId)) {\n// task.setSkipExecution(true);\n } else {\n inProgressQueue.put(taskId, task);\n// task.setSkipExecution(false);\n }\n } else {\n logger.warn(\"Task Id can not be null for qnqueing task\");\n }\n }", "protected abstract void createTasks();", "private void registerDestroyTask() {\n if (this.shutdownTask == null) {\n // Register a task to destroy the activity context on shutdown\n this.shutdownTask = ShutdownHook.addTask(() -> {\n synchronized (this.buildDestroyMonitor) {\n doDestroy();\n removeDestroyTask();\n }\n });\n }\n }", "@Override\n public void taskStarting() {\n\n }", "public void startTask() {\n\t}", "TaskDependency createTaskDependency();", "@Override\n\tpublic ITaskInstance createTaskInstance(WorkflowSession workflowSession,\n\t\t\tRuntimeContext rtCtx, IToken token,\n\t\t\tIProcessInstance processInstance, Task task, Activity activity) {\n\t\treturn null;\n\t}", "TaskFactory getTaskFactory();", "Map<String, Object> forceStartTaskInstance(User loginUser, int queueId);", "public TaskProvider getTaskProvider();", "void registerTasks(Object taskClassObject);", "boolean hasTask();", "@PostConstruct\n public void setUpTasks() {\n final Iterable<Task> findAll = taskService.findAll();\n if (findAll != null) {\n findAll.forEach(task -> {\n\n final RunnableTask runnableTask = new RunnableTask(task.getId(), runTaskService);\n\n if (task.getCronExpression() != null) {\n log.info(\"Adding cron schedule for {} : {}\", task.getId(), task.getCronExpression());\n threadPoolTaskScheduler.schedule(runnableTask, new CronTrigger(task.getCronExpression()));\n }\n else if (task.getDelayPeriod() > 0) {\n log.info(\"Adding periodic schedule for {} : {}\", task.getId(), task.getDelayPeriod());\n threadPoolTaskScheduler.schedule(runnableTask, new PeriodicTrigger(task.getDelayPeriod()));\n }\n else {\n log.error(\"Invalid task {}\", task.getId());\n }\n\n });\n }\n }", "protected void setupTask(Task task) {\n }", "void onServiceBegin(int taskCode);", "java.util.concurrent.Future<CreateEventIntegrationResult> createEventIntegrationAsync(CreateEventIntegrationRequest createEventIntegrationRequest);", "public abstract AbstractTask createTask(String repositoryUrl, String id, String summary);", "@EventListener(condition = \"#event.domainObject.new\")\n\tpublic void onApplicationEventNewTaskStartline(DomainObjectStoreEvent<Task> event) {\n\t\tfinal Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\n\t\tfinal CustomUserDetails principal = ((CustomUserDetails) authentication.getPrincipal());\n\t\tTask domainObject = event.getDomainObject();\n\t\tLocalDateTime lDT = LocalDateTime.now();\n\t\tdomainObject.setStartline(lDT);\n\t\tdomainObject.setChangedDate(lDT);\n\t\tdomainObject.setAuthor(principal.getUser());\n\t\tdomainObject.setLastEditor(principal.getUser());\n\t\tif (domainObject.getDeadline().isBefore(lDT))\n\t\t\tthrow new IllegalArgumentException(\"Дата дедлайна должна быть позднее сегодняшнего дня\");\n\t}", "private void newTask()\n {\n \t//TODO add alarm\n \tTask task = new Task(taskName.getText().toString(), taskDetails.getText().toString());\n \tdb.createTask(task);\n \t//TODO Tie notification to an alarm\n \t//Create notification\n \tIntent notifyIntent = new Intent(this, TaskNotification.class);\n \tnotifyIntent.putExtra(\"title\", task.name); //add title name\n \tnotifyIntent.putExtra(\"id\", (int) task.id); //add id\n \tstartActivity(notifyIntent); //create the intent\n \t\n \trefreshData();\n }", "@Override\r\n\tpublic void PreExecute(TaskConfig config){\n\t}", "private <E, F extends ITaskObject> IStatusTask createInitTask(F taskObject) {\n ITaskObjectManager<E, F> taskObjectManager = getTaskManagerConfiguration().getTaskObjectManagerRegistry().getTaskObjectManager(taskObject);\n Class<F> taskObjectClass = taskObjectManager.getTaskObjectClass();\n\n E currentStatus = taskObjectManager.getInitialStatus(taskObject);\n\n // Create a first task, it does nothing\n return getTaskManagerConfiguration().getTaskFactory().newStatusTask(null, taskObjectClass, currentStatus);\n }", "private void registerTaskInstances() {\n\t\t// For all tasks from DB\n\t\tfor (TaskFromDBTrigger trigger : tasksList) {\n\t\t\tif (trigger.isValid()) {\n\t\t\t\ttrigger.initTrigger();\n\t\t\t} else {\n\t\t\t\tlog.error(\"Invalid task from db with ID: \" + trigger.getTaskId());\n\t\t\t}\n\t\t}\n\t}", "abstract boolean shouldTaskActivate();", "void onTaskPrepare();", "public interface TaskCallback extends RunningTaskCallback {\r\n\r\n\r\n /**\r\n * Calling when the task is preparing to start .\r\n */\r\n void onTaskStart();\r\n\r\n @Override\r\n void onTaskRunning(PreTaskResult preTaskResult, int numerator, int denominator);\r\n\r\n /**\r\n * Calling while the task is completed.\r\n *\r\n * @param taskResult TaskResult bean\r\n */\r\n void onTaskCompleted(TaskResult taskResult);\r\n}", "@Override\n protected void onStart() {\n super.onStart();\n ReadTask task = new ReadTask();\n //task.execute(\"http://10.0.2.2:61902/api/GetTicket/GetComments/?ticketId=\" + ticket.getTicketId());\n task.execute(\"http://ticketapp.shiftbook.dk/api/GetTicket/GetComments/?ticketId=\" + flightTickets.getTicketId());\n }", "public interface VendorSubscriptionTask {\n\n /**\n * Subscribe to receive vendor data\n * @param subscriptionId the subscription identifier\n * @param configuration the vendor subscription configuration\n */\n void subscribe(Long subscriptionId, ApplicationProperties.VendorConfiguration configuration);\n\n /**\n * Destroy subscription\n * @param subscriptionId the subscription identifier\n */\n void destroy(Long subscriptionId);\n\n /**\n * Check whether task can process subscription\n * @param type the vendor subscription type\n\n * @return <code>true</code> returns <code>true</code> if task\n * supports the indicated {@link VendorSubscriptionType} object.\n */\n boolean supports(VendorSubscriptionType type);\n}", "public void taskStarted(BuildEvent event) {\n }", "public void handleCreateTask(SelectEvent event) {\n\t}", "public interface ITaskHandler {\n\n\t/**\n\t * It is called in a separate thread to handle the task.\n\t * Parameters are thoes given in the addTask()\n\t * This method should not been called directly.\n\t * \n\t * @param pTaskType\n\t * @param pParam\n\t * @throws IllegalArgumentException\n\t */\n\tvoid handleTask(ITaskType pTaskType, Object pParam) throws IllegalArgumentException;\n}", "public void createTask() {\n \tSystem.out.println(\"Inside createTask()\");\n \tTask task = Helper.inputTask(\"Please enter task details\");\n \t\n \ttoDoList.add(task);\n \tSystem.out.println(toDoList);\n }", "int createParentTask();", "private void registerCallHomeJob() {\n String callHomeQuarzExpression = CallHomeJob.buildRandomQuartzExp();\n TaskBase callHomeJob = TaskUtils.createCronTask(\n CallHomeJob.class,\n callHomeQuarzExpression\n );\n log.debug(\"Scheduling CallHomeJob to run at '{}'\", callHomeQuarzExpression);\n taskService.startTask(callHomeJob, false);\n }", "private void m1557a(Task task) {\n synchronized (f1826f) {\n if (f1827g == null) {\n f1827g = new SideChannelManager(this.f1828d.getApplicationContext());\n }\n f1827g.queueTask(task);\n }\n }", "public Task getCreationTask() throws ProcessManagerException {\r\n try {\r\n Task creationTask = Workflow.getTaskManager().getCreationTask(\r\n currentUser, currentRole, processModel);\r\n \r\n return creationTask;\r\n } catch (WorkflowException e) {\r\n throw new ProcessManagerException(\"SessionController\",\r\n \"processManager.CREATION_TASK_UNAVAILABLE\", e);\r\n }\r\n }", "public synchronized void registerTask(TaskMonitor taskMonitor) {\n Executor executor = threadToTaskMap.get(taskMonitor.getThreadId());\n if (executor == null) {\n executor = new Executor();\n threadToTaskMap.put(taskMonitor.getThreadId(), executor);\n }\n if (!executor.includes(taskMonitor.getTaskId()))\n executor.add(taskMonitor.getTaskId());\n taskMonitorList.add(taskMonitor);\n }", "@Override\n public boolean act(Task task) throws RuntimeException {\n return this.subscribe(task);\n }", "@Override\n\tpublic void addTask(Task task) {\n\t\t\n\t}", "@Override\n public void execute() {\n eslClient.getEventNotificationService().register(newEventNotificationConfig(URL)\n .forEvent(EVENT1)\n .forEvent(EVENT2)\n .forEvent(EVENT3));\n\n // Get the registered event notifications\n eventNotificationConfig = eslClient.getEventNotificationService().getEventNotificationConfig();\n }", "public void newTask() {\r\n\r\n todoTaskGui(\"Create\", null);\r\n }", "@Override\n\tpublic void addTask(ISimpleTask task) {\n\t\ttry {\n\t\t\tqueue.put(task);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public synchronized void registerTask(TaskMonitor taskMonitor) {\n logger.info(\"[WORKER-MONITOR] - RegisterTask to taskMonitorList, current task id: \" + taskMonitor.getTaskId());\n\n Executor executor = threadToTaskMap.get(taskMonitor.getThreadId());\n if (executor == null) {\n executor = new Executor();\n // add taskMonitor <threadID, <id -> taskId list> to threadToTaskMap\n threadToTaskMap.put(taskMonitor.getThreadId(), executor);\n }\n\n // add new task id in a thread [beginTask -> endTask]\n if (!executor.includes(taskMonitor.getTaskId())) {\n executor.add(taskMonitor.getTaskId());\n }\n\n // add to taskMonitorList\n taskMonitorList.add(taskMonitor);\n\n // 2018-07-23 annotated for simple logs\n /*\n logger.info(\"----------Output threadToTaskMap----------\");\n for (long threadId : threadToTaskMap.keySet()) {\n logger.debug(\"- \" + threadId + \": \" + threadToTaskMap.get(threadId));\n }\n logger.info(\"----------Output taskMoniterList----------\");\n for (TaskMonitor monitor : taskMonitorList) {\n logger.debug(\"ThreadId: \" + monitor.getThreadId() + \" TaskId: \" + monitor.getTaskId());\n }\n logger.info(\"------------------------------------------\");\n */\n }", "@Override\n public void activateTask(@NonNull String taskId) {\n }", "private void handleActionOnce() {\n // TODO: Handle action\n try {\n Executors.newScheduledThreadPool(1).submit(new NewsReceiveTask(getApplicationContext() , true));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Test\n public void testDelegateTaskReadyByPotentialOwner() throws HTException {\n\n Task t = createTask_TwoPotentialOwners();\n Assert.assertEquals(Status.READY, t.getStatus());\n\n this.services.delegateTask(t.getId(), \"user1\", \"user2\");\n t = this.services.getTaskInfo(t.getId());\n\n Assert.assertEquals(Status.RESERVED, t.getStatus());\n Assert.assertEquals(\"user2\", t.getActualOwner().getName());\n }", "@Override\n\tpublic void preExecuteTask(Task t,Map context) {\n\t\tlog.info(\"Task Id:\"+t.getTaskId()+\"--Task Name:\"+t.getTaskName()+\"--Task begin execute!\");\n\t}", "public interface TaskCallBack {\n\n void notifyTaskTheResultOfcallService(TaskEntity entity);\n}", "void notifyMessage(Task task);", "private void setupCheckLockTimerTask(String processName, LocalDateTime until, LockRestorer lockerRestorer,\n LocalDateTime now, String unlockKey) {\n if (lockerRestorer != null) {\n final long delayTime = getDelayTimeInMilliseconds(now, until);\n final long renewTime = Duration.between(now, until).toMillis();\n processMap.put(processName + unlockKey, lockerRestorer);\n final CheckLockTimerTask timerTask = new CheckLockTimerTask(this, processName, unlockKey, renewTime);\n if (scheduledExecutorService == null) {\n final Map<String, ScheduledExecutorService> scheduledExecutors = applicationContext.getBeansOfType(ScheduledExecutorService.class);\n if (scheduledExecutors.size() > 0) {\n if (scheduledExecutors.size() == 1) {\n scheduledExecutorService = scheduledExecutors.values().iterator().next();\n } else {\n scheduledExecutorService = scheduledExecutors.get(preferredScheduledExecutorService);\n }\n }\n Assert.notNull(scheduledExecutorService, \"Scheduled executor service not found!\");\n }\n scheduledExecutorService.scheduleAtFixedRate(timerTask, delayTime, renewTime, TimeUnit.MILLISECONDS);\n }\n }", "void addTask(Task task);", "@FXML\n void addTaskClicked(ActionEvent event)\n {\n createTask();\n }", "public interface EventListener {\n\n\t/**\n\t * Called when a task event has occurred.\n\t * \n\t * @param event\n\t * the task event which has occurred\n\t */\n\tvoid eventOccurred(AbstractTaskEvent event);\n}", "private void registersHeartbeatJob() {\n TaskBase heartbeatJob = TaskUtils.createRepeatingTask(HeartbeatJob.class,\n TimeUnit.SECONDS.toMillis(ConstantValues.haHeartbeatIntervalSecs.getLong()),\n TimeUnit.SECONDS.toMillis(ConstantValues.haHeartbeatIntervalSecs.getLong()));\n taskService.startTask(heartbeatJob, false);\n }", "protected void startTask(final HeadlessJsTaskConfig taskConfig) {\n final ReactInstanceManager reactInstanceManager =\n getReactNativeHost().getReactInstanceManager();\n ReactContext reactContext = reactInstanceManager.getCurrentReactContext();\n if (reactContext == null) {\n reactInstanceManager\n .addReactInstanceEventListener(new ReactInstanceManager.ReactInstanceEventListener() {\n @Override\n public void onReactContextInitialized(ReactContext reactContext) {\n invokeStartTask(reactContext, taskConfig);\n reactInstanceManager.removeReactInstanceEventListener(this);\n }\n });\n if (!reactInstanceManager.hasStartedCreatingInitialContext()) {\n reactInstanceManager.createReactContextInBackground();\n }\n } else {\n invokeStartTask(reactContext, taskConfig);\n }\n }", "public void checkTask(String task){\r\n\t\t\r\n\t}", "protected Task<Void> createTask() {\n\n\t\t\treturn new Task<Void>() {\n\n\t\t\t\tprotected Void call() {\n\t\t\t\t\t_button.setDisable(true);\n\t\t\t\t\tTaskScheduler.executeAlgorithm(_digraph);\n\n\t\t\t\t\treturn null;\n\n\n\t\t\t\t}\n\t\t\t};\n\t\t}", "public synchronized void registerScheduledTask(ParallelTask<?> task) throws QueryEvaluationException {\r\n\t\tif (done) {\r\n\t\t\tthrow new QueryEvaluationException(\"Query is aborted or closed, cannot accept new tasks\");\r\n\t\t}\r\n\t\tscheduledSubtasks.add(task);\r\n\t}", "public void testSingleTask()\n throws Exception {\n checkNumPersistedTasks(0);\n \n // Schedule a single-execution task\n TestTask task = new TestTask();\n long now = System.currentTimeMillis();\n task.setExecTime(new Date(now + 1000));\n Mailbox mbox = TestUtil.getMailbox(USER_NAME);\n task.setMailboxId(mbox.getId());\n ScheduledTaskManager.schedule(task);\n \n // Make sure the task is persisted\n checkNumPersistedTasks(1);\n Thread.sleep(1250);\n \n assertEquals(\"TestTask was not called\", 1, task.getNumCalls());\n checkNumPersistedTasks(0);\n }", "public AddTopicTask(\n// Context context, ContentResolver cr,\n// Uri uriFile, String comment, String eventId, String topicId,\n Topic topic,\n TaskCallBack cb){\n\n// this.context = context;\n// this.socoApp = (SocoApp) context;\n// this.requestURL = UrlUtil.getTopicUrl();\n\n// this.cr = cr;\n// this.uriFile = uriFile;\n// this.comment = comment;\n// this.eventId = eventId;\n// this.topicId = topicId;\n// this.topicTitle = topicTitle;\n// this.topicDesc = topicDesc;\n this.topic = topic;\n this.callback = cb;\n }", "void startReportingTask();", "public String createTaskDefinition(TaskDefinition tasDef) throws DaoRepositoryException;", "@RequestMapping(method = RequestMethod.POST, value = \"/add-task\",consumes = MediaType.APPLICATION_JSON_VALUE,headers = {\r\n \"content-type=application/json\" })\r\n\tpublic Task addTask(@RequestBody Task task) {\r\n\t\tinvokeNotification();\r\n\t\treturn task;\r\n\r\n\t}", "Callable<E> getTask();", "public AnemoCheckTask() {\n }", "public ActionForward registerTask( ActionMapping mapping, ActionForm form, HttpServletRequest request,\r\n HttpServletResponse response )\r\n throws IOException, ServletException\r\n {\r\n WatchedTask batch = new StrutsWatchedTask();\r\n batch.init( form, request );\r\n Object taskId = WatchedTaskManager.getInstance( request ).regTask( batch );\r\n\r\n sendAjaxResponse( taskId.toString(), batch, response );\r\n return null;\r\n }", "@Override\n public boolean subscribe(Task data) {\n return true;\n }", "public void addTask(Task task) {\n\t\tSystem.out.println(\"Inside createTask()\");\n\t\t\n\t\ttoDoList.add(task);\n\t\tdisplay();\n\t}", "public interface TaskProcessFactory {\n\n TaskProcessor createTaskProcessor(String domain);\n}", "public void start() { \t\n try {\n \tTask task = new FileTask(fileScanner);\n \tTaskDescription taskDescription = new TaskDescription();\n \ttaskDescription.setName(name + \"-FILE-EP\");\n \ttaskDescription.setTaskGroup(\"FILE-EP\");\n \ttaskDescription.setInterval(interval);\n \ttaskDescription.setIntervalInMs(true);\n \ttaskDescription.addResource(TaskDescription.INSTANCE, task);\n \ttaskDescription.addResource(TaskDescription.CLASSNAME, task.getClass().getName());\n \tstartUpController = new StartUpController();\n \tstartUpController.setTaskDescription(taskDescription);\n \tstartUpController.init(synapseEnvironment);\n\n } catch (Exception e) {\n log.error(\"Could not start File Processor. Error starting up scheduler. Error: \" + e.getLocalizedMessage());\n }\n }", "int insertTask(TaskInfo taskInfo);", "@Override\n public CreateWirelessGatewayTaskResult createWirelessGatewayTask(CreateWirelessGatewayTaskRequest request) {\n request = beforeClientExecution(request);\n return executeCreateWirelessGatewayTask(request);\n }", "public interface TaskBase {\n\t/**\n\t * @return Returns the name of the task\n\t */\n\tpublic String GetName();\n\n\t/**\n\t * Called upon entering autonomous mode\n\t */\n\tpublic void Initialize();\n\n\t/**\n\t * Called every autonomous update\n\t * \n\t * @return Return task result enum\n\t */\n\tpublic TaskReturnType Run();\n\n}", "@Override\n public void run() {\n if (needRefreshRegistration(registrationUri, resolvedDeployment)) {\n sendRegistrationEvent(resolvedDeployment);\n }\n }", "public static void activateFixedTaskScheduling(Week week, FixedTask taskToPut){\n Putter.putTask(week, taskToPut);\n }", "public interface SingletonTask extends Task {\n}", "public WatchListMonitorTask()\r\n {\r\n debug(\"WatchListMonitorTask() - Constructor \");\r\n }", "@Override\n protected DefaultProcessorTask newProcessorTask(boolean initialize){ \n ProcessorBlockingTask task = new ProcessorBlockingTask(initialize);\n configureProcessorTask(task);\n task.setMaxKeepAliveRequests(getMaxKeepAliveRequests());\n if (secure){\n task.setSSLImplementation(sslImplementation);\n }\n return task; \n }", "boolean addTask(Task newTask);", "public boolean checkTaskExist(CaptureTask task) {\n\t\treturn false;\r\n\t}", "String addTask(Task task);", "private void HandleAysncFromOnCreate(){\n HandleOnCreate create = new HandleOnCreate();\n\n ArrayList<String> GlobalVariables = create.GetGlobalVariables(refact);\n\n for(String variable : GlobalVariables){\n String [] var_list = variable.trim().split(\"\\\\s+\");\n String var = var_list[var_list.length-1];\n cachedGlobalVariables.put(variable, var);\n }\n\n String className = create.GetNameOfAsyncTaskFunction(asyncCached.get(\"extends AsyncTask\"));\n\n //remove any instances associated with async task\n refact = create.HandleInstanceOfAsyncTask(refact, className);\n\n //prompt user\n System.out.println(\"(2) Reformatting the activity onCreate() function\\n\");\n DisplaySleep();\n\n }", "@EventListener(condition = \"!#event.domainObject.new\")\n\tpublic void onApplicationEventLookForUpdate(DomainObjectStoreEvent<Task> event) {\n\t\tEditeTask editeTask = new EditeTask();\n\t\tediteTask.setId(UUID.randomUUID().toString());\n\t\tTask task = event.getDomainObject();\n\n\t\tfinal Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\n\t\tfinal CustomUserDetails principal = ((CustomUserDetails) authentication.getPrincipal());\n\t\tUser cs = principal.getUser();\n\t\tif (cs.getIsAdmin()) {\n\t\t\treturn;\n\t\t}\n\n\t\tSet<String> set = task.getDirtyAttributes();\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tIterator iterator1 = set.iterator();\n\t\tList<String> list = new ArrayList<>();\n\t\twhile (iterator1.hasNext()) {\n\t\t\tlist.add((String) iterator1.next());\n\t\t}\n\n\t\tif (list.size() == 1 && list.contains(\"status\")) {\n\t\t\treturn;\n\t\t}\n\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tIterator iterator = set.iterator();\n\t\twhile (iterator.hasNext()) {\n\t\t\tString temp = (String) iterator.next();\n\t\t\tswitch (temp) {\n\t\t\tcase \"description\":\n\t\t\t\tediteTask.setDescription((String) task.getCurrentValue(temp).get(0));\n\t\t\t\tbreak;\n\t\t\tcase \"deadline\":\n\t\t\t\tediteTask.setDeadline((LocalDateTime) task.getCurrentValue(temp).get(0));\n\t\t\t\tbreak;\n\t\t\tcase \"type\":\n\t\t\t\tediteTask.setType((TaskType) task.getCurrentValue(temp).get(0));\n\t\t\t\tbreak;\n\t\t\tcase \"project\":\n\t\t\t\tediteTask.setProject((Project) task.getCurrentValue(temp).get(0));\n\t\t\t\tbreak;\n\t\t\tcase \"taskPerformer\":\n\t\t\t\tediteTask.setTaskPerformer((User) task.getCurrentValue(temp).get(0));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tediteTask.setTaskId(task.getId());\n\t\tediteTaskRepository.save(editeTask);\n\t\tif (!cs.getIsAdmin()) {\n\t\t\ttask.setIsCheck(false);\n\t\t\ttask.setStatus(Status.CLOSED);\n\t\t} else {\n\t\t\ttask.setIsCheck(true);\n\t\t}\n\t}", "public void startTaskRunnerThread() {\n canRunTaskThread.set(true);\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n log(\"Starting task: \" + getClassName());\n task();\n } catch (InterruptedException e) {\n e.printStackTrace();\n } finally {\n log(\"Finished task: \" + getClassName());\n canRunTaskThread.set(false);\n }\n }\n }).start();\n }", "@Override\n public void onTaskLoaded(Task task) {\n if(mCachedTasks == null) {\n mCachedTasks = new HashMap<String, Task>();\n }\n mCachedTasks.put(task.getId(),task);\n callBack.onTaskLoaded(task);\n\n }", "public void setupTask() {\n\t\tif (!hasInternetConnection()) {\n\t\t\tdlgNoInet.show();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tsetupMessageHandler();\n\t\t\n\t\t// Activate text box if user is logged in.\n\t\tString userid = checkLogin();\n\t\tLog.d(\"TIMER\", \"User logged in: \" + userid);\n\t\tif (userid != null && userid.length() > 0 && etMessage != null) {\n\t\t\tsetupSendMessageListener();\n\t\t\tetMessage.setEnabled(true);\n\t\t\thideVirtualKeyboard();\n\t\t}\n\t\t\n\t\t// Setup the message cursor object.\n\t\tsetupMessageCursor();\n\n\t\t// Start message listener if base url is set.\n\t\tstartMessageListener();\n\t}", "void onIssueCreatedEvent(T event);", "private static void addTask() {\n Task task = new Task();\n System.out.println(\"Podaj tytuł zadania\");\n task.setTitle(scanner.nextLine());\n System.out.println(\"Podaj datę wykonania zadania (yyyy-mm-dd)\");\n\n while (true) {\n try {\n LocalDate parse = LocalDate.parse(scanner.nextLine(), DateTimeFormatter.ISO_LOCAL_DATE);\n task.setExecuteDate(parse);\n break;\n } catch (DateTimeParseException e) {\n System.out.println(\"Nieprawidłowy format daty. Spróbuj YYYY-MM-DD\");\n }\n }\n\n task.setCreationDate(LocalDate.now());\n\n queue.offer(task);\n System.out.println(\"tutuaj\");\n }", "public interface OnTaskClickedListener {\n\n void taskOpened(int taskId);\n}", "public static void launchTask(Task tsk)\n {\n getInstance().doExecute(tsk);\n }", "public void addTaskListener(TaskListener task){\n initListener();\n listeners.add(task);\n }", "@BearerAuth\n @HttpRequestHandler(paths = \"/api/v2/service/create\", methods = \"POST\")\n private void handleCreateRequest(@NonNull HttpContext context, @NonNull @RequestBody Document body) {\n var configuration = body.readObject(\"serviceConfiguration\", ServiceConfiguration.class);\n if (configuration == null) {\n // check for a provided service task\n var serviceTask = body.readObject(\"task\", ServiceTask.class);\n if (serviceTask != null) {\n configuration = ServiceConfiguration.builder(serviceTask).build();\n } else {\n // fallback to a service task name which has to exist\n var serviceTaskName = body.getString(\"serviceTaskName\");\n if (serviceTaskName != null) {\n var task = this.serviceTaskProvider.serviceTask(serviceTaskName);\n if (task != null) {\n configuration = ServiceConfiguration.builder(task).build();\n } else {\n // we got a task but it does not exist\n this.badRequest(context)\n .body(this.failure().append(\"reason\", \"Provided task is unknown\").toString())\n .context()\n .closeAfter(true)\n .cancelNext(true);\n return;\n }\n } else {\n this.sendInvalidServiceConfigurationResponse(context);\n return;\n }\n }\n }\n\n var createResult = this.serviceFactory.createCloudService(configuration);\n var start = body.getBoolean(\"start\", false);\n if (start && createResult.state() == ServiceCreateResult.State.CREATED) {\n createResult.serviceInfo().provider().start();\n }\n\n this.ok(context)\n .body(this.success().append(\"result\", createResult).toString())\n .context()\n .closeAfter(true)\n .cancelNext(true);\n }", "@Override\n public void onTaskLoaded(Task task) {\n if(mCachedTasks == null) {\n mCachedTasks = new HashMap<String, Task>();\n mCachedTasks.put(task.getId(),task);\n callBack.onTaskLoaded(task);\n }\n }", "@Test\n public void testStartTaskReadyByPotentialOwner() throws HTException {\n\n Task t = createTask_TwoPotentialOwners();\n this.services.startTask(t.getId(), \"user1\");\n \n org.junit.Assert.assertEquals(\"user1\", t.getActualOwner().getName());\n org.junit.Assert.assertEquals(Status.IN_PROGRESS, t.getStatus());\n }", "@Override\n public void onInitializeTasks() {\n }" ]
[ "0.57907057", "0.57907057", "0.57907057", "0.5662524", "0.564398", "0.56352556", "0.554131", "0.540853", "0.54034513", "0.53979695", "0.536918", "0.5365689", "0.5359947", "0.53410333", "0.53395396", "0.5280404", "0.5190614", "0.51887786", "0.5182885", "0.5165455", "0.5144992", "0.51349026", "0.5121389", "0.50768673", "0.5072599", "0.5062232", "0.5061419", "0.5042325", "0.5028945", "0.50245786", "0.501191", "0.5000846", "0.4995704", "0.49867746", "0.49759328", "0.49757418", "0.49700093", "0.49591836", "0.4951474", "0.4945267", "0.4927162", "0.4923162", "0.4922837", "0.49061924", "0.49014205", "0.48834327", "0.48728552", "0.48657948", "0.48630333", "0.48609686", "0.4855484", "0.48536247", "0.48423547", "0.48369345", "0.48329479", "0.48319882", "0.48315796", "0.48258412", "0.48219493", "0.48177803", "0.48161823", "0.48143357", "0.4807073", "0.4801691", "0.48013318", "0.47942996", "0.4783747", "0.47822616", "0.47782004", "0.47763553", "0.47732124", "0.47719002", "0.4767428", "0.47589916", "0.47585103", "0.47584185", "0.47569147", "0.47563103", "0.47556022", "0.47521093", "0.47512382", "0.47504163", "0.4744512", "0.4736072", "0.47340727", "0.4733522", "0.47319984", "0.47235078", "0.47216257", "0.46986207", "0.46985433", "0.46984297", "0.46906334", "0.4687216", "0.46822795", "0.4665774", "0.46644875", "0.46535674", "0.46467942", "0.4640213" ]
0.5865319
0
/ Fetch and lock any external tasks available usually only the current one if called in the context of a task event processing.
protected void fetchAndLockExternalTasks(final String key) { final String topic = getTopicFromInternalKey(key); final String processDefinitionKey = getProcessDefinitionKeyFromInternalKey(key); final ExternalTaskSyncProcessingRegistrationImpl<?> registration = registrations.get(key); final List<LockedExternalTask> externalTasks = getExternalTaskService() .fetchAndLock(Integer.MAX_VALUE, getWorkerId()) .topic(topic, registration.getLockTimeout()) .processDefinitionKey(processDefinitionKey) .variables(registration.getVariablesToFetch()) .execute(); if ((externalTasks == null) || externalTasks.isEmpty()) { return; } /* * Processing each task needs to be done in a separate transaction because * completing the external task might be faster than committing the transaction * of "fetchAndLock". Additionally at the moment of task locking this status * is not yet visible to other threads and we need wait for the current * transaction to complete. */ doAfterTransaction(() -> externalTasks.forEach(task -> processAsynchronously(() -> runRegisteredProcessor( task.getProcessDefinitionKey(), task.getTopicName(), task.getId(), task.getBusinessKey(), task.getProcessInstanceId(), task.getActivityId(), task.getExecutionId(), task.getLockExpirationTime(), task.getVariables(), task.getRetries())))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void requestExtraSync()\n {\n executor.requestExtraSync();\n }", "public void acquireDeferredLock() {\r\n return;\r\n }", "final Runnable pollLocalTask() {\n return locallyDeqTask();\n }", "Thread getLocker();", "public void doIdleTasks();", "Task poll();", "public interface TaskManager {\n\t/**\n\t * @return all the tasks that have to be executed\n\t */\n\tvoid getTasks();\n}", "void lock();", "@Override\r\n\t\tpublic void run() {\n\t\t\tsynchronized (holder.lock1) {\r\n\t\t\t\tSystem.out.println(\"+++Task3 get lock ->\"+Thread.currentThread().getName());\r\n\t\t\t\tSystem.out.println(\"+++Lock1 ready to notify\");\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(3000);\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\tholder.lock1.notify();\r\n\t\t\t\tSystem.out.println(\"+++Lock1 notified,ready to Exit,Lock1 release\");\r\n\t\t\t}\r\n\t\t}", "public void myTasks() {\n mMyTasks = true;\n onResume();\n }", "@Override\n\tpublic synchronized void waitAllTasks() throws ExecutionException, InterruptedException {\n\t\twaitTasks(key -> true);\n\t}", "private void reacquireLocks() {\n getCommander().requestLockOn( getPart() );\n for ( Long id : expansions ) {\n try {\n ModelObject expanded = getQueryService().find( ModelObject.class, id );\n if ( !( expanded instanceof Segment || expanded instanceof Plan ) )\n getCommander().requestLockOn( expanded );\n } catch ( NotFoundException e ) {\n LOG.warn( \"Expanded model object not found at: \" + id );\n }\n }\n }", "@Override\r\n\t\tpublic void run() {\n\t\t\tSystem.out.println(\"***ready to get lock1\");\r\n\t\t\tsynchronized (holder.lock1) {\r\n\t\t\t\tnew Thread(new Task3(holder)).start();\r\n\t\t\t\tSystem.out.println(\"***get lock ->\"+Thread.currentThread().getName());\r\n\t\t\t\ttry {\r\n\t\t\t\t\tSystem.out.println(\"***Lock1 ready to wait\");\r\n\t\t\t\t\tholder.lock1.wait();\r\n\t\t\t\t\tSystem.out.println(\"***Lock1 get,ready to Exit\");\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}\r\n\t\t}", "@Override\n public void getTasks(@NonNull final LoadTasksCallback callback) {\n if(mCachedTasks != null && !mCacheIsDirty) {\n callback.onTasksLoaded(new ArrayList<Task>(mCachedTasks.values()));\n return;\n }\n if(mCacheIsDirty) {\n // If cache is dirty fetch data from the remote source again\n getTaskFromRemoteDataSource(callback);\n } else {\n // Query the Local Storage is available . If not query the network\n mTasksLocalDataSource.getTasks(new LoadTasksCallback() {\n @Override\n public void onTasksLoaded(List<Task> tasks) {\n refreshCache(tasks);\n callback.onTasksLoaded(new ArrayList<Task>(mCachedTasks.values()));\n }\n\n @Override\n public void onDataNotAvailable() {\n getTaskFromRemoteDataSource(callback);\n }\n });\n }\n\n }", "public TaskProvider getTaskProvider();", "int activeTasks();", "WorkingTask getWorkingTask();", "public void updateTask() {}", "public static ScheduledTaskLock getTaskLock(ScheduledTask task){\r\n\t\treturn task.lock;\r\n\t}", "private void startAppLockWorker() {\n\n OneTimeWorkRequest oneTimeWorkRequest = new OneTimeWorkRequest.Builder(AppLockWorker.class).build();\n WorkManager.getInstance(getApplicationContext()).enqueueUniqueWork(Constants.APPLOCKWORK, ExistingWorkPolicy.REPLACE,oneTimeWorkRequest);\n }", "@Override\n public SyncObjectState call() {\n\n SyncObjectState callState = SyncObjectState.STARTED;\n \n \n long remainingSleep = task.getSleepUntil() - System.currentTimeMillis();\n if (remainingSleep > 0) {\n try {\n Thread.sleep(remainingSleep);\n } catch (InterruptedException ex) {\n logger.warn(buildStandardLogMessage(null, \" Interrupted task-remaining-sleep\"));\n }\n }\n\n // TODO: consider replacing Lock with with IMap, for the automatic GC\n // see https://groups.google.com/forum/#!topic/hzProcessingClient/9YFGh3xwe8I\n Lock hzPidLock = hzProcessingClient.getLock(task.getPid());\n \n // this section must be thread-safe otherwise, we may skip unlocking a lock.\n // see http://docs.hazelcast.org/docs/3.5/manual/html/lock.html\n try {\n logger.info(buildStandardLogMessage(null, \" Locking task, attempt \" + task.getLockAttempt()));\n \n if (hzPidLock.tryLock(1, TimeUnit.SECONDS)) {\n // got lock\n try {\n logger.info(buildStandardLogMessage(null, \" Processing SyncObject\"));\n SystemMetadata mnSystemMetadata = retrieveMNSystemMetadata();\n logger.debug(task.taskLabel() + \" MN system metadata retrieved...\");\n\n processTask(mnSystemMetadata);\n callState = SyncObjectState.SUCCESS;\n \n } catch (RetryableException ex) {\n if (task.getAttempt() < 20) {\n callState = SyncObjectState.RETRY;\n \n logger.warn(buildStandardLogMessage(ex, \" RetryableException raised on attempt \"\n + task.getAttempt() + \" of 20. Sleeping and requeueing.\"));\n\n task.setAttempt(task.getAttempt() + 1);\n task.setSleepUntil(System.currentTimeMillis() + 5000L);\n\n hzProcessingClient.getQueue(synchronizationObjectQueue).put(task);\n \n } else {\n logger.error(buildStandardLogMessage(ex,\" Exceeded retry limit.\"\n + \" Unable to process the SyncObject. Converting to UnrecoverableException\"),ex);\n throw new UnrecoverableException(task.getPid() + \": retry limits reached without success.\",\n ex.getCause());\n }\n } finally {\n hzPidLock.unlock();\n logger.info(buildStandardLogMessage(null, \" Unlocked Pid.\"));\n }\n } else {\n // lock-retry handling\n if (task.getLockAttempt() < 100) {\n callState = SyncObjectState.RETRY;\n \n logger.warn(buildStandardLogMessage(null,\n \" Cannot lock Pid! Requeueing the task. Attempt \" + task.getLockAttempt()));\n\n task.setLockAttempt(task.getLockAttempt() + 1);\n task.setSleepUntil(System.currentTimeMillis() + 1000L);\n hzProcessingClient.getQueue(synchronizationObjectQueue).put(task);\n \n } else {\n callState = SyncObjectState.FAILED;\n \n String message = \"Cannot lock Pid! Reached Max attempts (100), abandoning processing of this pid.\";\n logger.error(buildStandardLogMessage(null, message));\n throw new SynchronizationFailed(\"5000\",message);\n }\n }\n } catch (SynchronizationFailed e) {\n callState = SyncObjectState.FAILED;\n \n logger.error(buildStandardLogMessage(e.getCause(),\"SynchronizationFailed: \" + e.getMessage()),e);\n SyncFailedTask syncFailedTask = new SyncFailedTask(nodeCommunications, task);\n syncFailedTask.submitSynchronizationFailed(e);\n\n } catch (UnrecoverableException e) {\n callState = SyncObjectState.FAILED;\n // this is the proper location to decide whether or not to notify the MemberNode\n // (these are exceptions caused by internal problems)\n \n // in all cases, we need to log\n logger.error(buildStandardLogMessage(e.getCause(),\"UnrecoverableException: \" + e.getMessage()),e);\n \n // report to MN, for now\n\n SyncFailedTask syncFailedTask = new SyncFailedTask(nodeCommunications, task);\n if (e.getCause() instanceof BaseException)\n syncFailedTask.submitSynchronizationFailed(task.getPid(), null,(BaseException) e.getCause());\n \n else \n syncFailedTask.submitSynchronizationFailed(task.getPid(), null,\n new ServiceFailure(\"5000\", this.buildStandardLogMessage(e.getCause(), null)));\n\n\n \n } catch (InterruptedException e) {\n callState = SyncObjectState.FAILED;\n // was handled as Exception before I split this out\n // don't know if we need to handle it any differently,\n logger.error(buildStandardLogMessage(e, \"Interrupted: \" + e.getMessage()), e);\n\n } catch (Exception e) {\n callState = SyncObjectState.FAILED;\n logger.error(this.buildStandardLogMessage(e,e.getMessage()),e);\n\n } finally {\n logger.info(buildStandardLogMessage(null, \" exiting with callState: \" + callState));\n// XXX: Hold until 2.4, because it depends on an update to d1_cn_common\n// MetricLogEntry metricLogEntry = new MetricLogEntry(MetricEvent.SYNCHRONIZATION_TASK_EXECUTION);\n// metricLogEntry.setNodeId(TypeFactory.buildNodeReference(task.getNodeId()));\n// metricLogEntry.setPid(TypeFactory.buildIdentifier(task.getPid()));\n// metricLogEntry.setMessage(\"status=\" + callState);\n// MetricLogClientFactory.getMetricLogClient().logMetricEvent(metricLogEntry);\n }\n return callState;\n }", "ManagementLockObject refresh();", "public void runPendingTasks() {\n/* */ try {\n/* 578 */ this.loop.runTasks();\n/* 579 */ } catch (Exception e) {\n/* 580 */ recordException(e);\n/* */ } \n/* */ \n/* */ try {\n/* 584 */ this.loop.runScheduledTasks();\n/* 585 */ } catch (Exception e) {\n/* 586 */ recordException(e);\n/* */ } \n/* */ }", "public Lock getLock();", "public void doAllTasks() throws Exception {\n final GenericInitializer<E,T> initializer = config.getInitializer();\n final TaskFactory<E,T,GenericInitializer<E,T>> initTaskFac = config.getInitFactory();\n final ObjectCache<GenericInitializer<E,T>> initCache = new ObjectCache<>(2*threads,initializer);\n \n final long sT = System.currentTimeMillis();\n List<Task<T>> initTasks = comm.getInitialTasks(maxTasks,myID);\n final long mT = System.currentTimeMillis();\n initFetchTimeMS += mT-sT;\n initChunksGotten++;\n \n do{\n noInits = initTasks.size();\n if(noInits == 0){\n // nothing to be done, kinda weird.\n System.out.println(\"WARNING: No tasks gotten for threading backend \" + myID + \" continuing but wondering...\");\n break;\n }\n // kind of subptimal but we need to get the ID offset\n currIDStart = (int) initTasks.get(0).getDummyAnswer(myID).getResult().getID();\n \n if(DEBUG){System.out.println(\"DEBUG: Starting with ID \" + currIDStart + \" we have \" + initTasks.size() + \" tasks to init.\");}\n\n final long tOff = System.currentTimeMillis();\n doXXX(threads, initTaskFac, initCache, initTasks);\n final long tMid = System.currentTimeMillis();\n initWorkTimeMS += (tMid-tOff);\n \n final boolean doneYet = synchronizePools(true);\n if(!doneYet){\n initTasks = comm.getInitialTasks(maxTasks,myID);\n initChunksGotten++;\n } else {\n initTasks.clear(); // not strictly necessary, I think\n }\n final long tEnd = System.currentTimeMillis();\n initFetchTimeMS += (tEnd-tMid);\n \n } while(!initTasks.isEmpty());\n \n // merge pools, technically this should have happened before already. However, this does not hurt and synchronizes even further.\n synchronizePools(false);\n \n ISINIT = false;\n \n // then do globopt tasks (setup task factory and cachers)\n final GenericGlobalOptimization<E,T> globopt = config.getGlobalOptimization();\n final ObjectCache<GenericGlobalOptimization<E,T>> globCache = new ObjectCache<>(2*threads,globopt);\n TaskFactory<E,T,GenericGlobalOptimization<E,T>> globTasks = new GlobTaskFactory<>();\n\n while(!comm.isEverythingDone()){\n \n final long tOff = System.currentTimeMillis();\n doXXX(threads, globTasks, globCache, (int) currIDStart, (int) tasksGotten);\n final long tMid = System.currentTimeMillis();\n optWorkTimeMS += (tMid-tOff);\n \n final boolean done = synchronizePools(false);\n final long tEnd = System.currentTimeMillis();\n optFetchTimeMS += (tEnd-tMid);\n \n if(done) {break;}\n }\n }", "public void acquire(boolean forMerge) {\r\n return;\r\n }", "@Override\r\n public List getExecutingTask() {\n return null;\r\n }", "void refreshTaskInformation();", "protected abstract Version executeTaskLocal(Version theTask);", "final Runnable pollTask() {\n Runnable t = locallyDeqTask();\n if (t == null && (t = scan()) != null)\n ++stealCount;\n return t;\n }", "@Override\n\tpublic List<Task> getTasks() {\n\t\treturn details.getPendingTasks();\n\t}", "List<ReadOnlyTask> getTaskList();", "List<ReadOnlyTask> getTaskList();", "public interface AbstractTask extends KeyProvider<TaskKey> {\r\n\r\n boolean isBlocking();\r\n}", "ManagementLockObject refresh(Context context);", "private static void m200a() {\r\n Object obj = AuthTask.f155a;\r\n synchronized (obj) {\r\n try {\r\n obj.notify();\r\n } catch (Exception e) {\r\n }\r\n }\r\n }", "public void lock() {\n\n }", "public void performOtherTasks() {\n\t\t\tSystem.out.println(\"performing tasks other than servicing\");\n\t\t\t// do whatever you want to do in the servicing package\n\t\t}", "ManagementLockObject apply();", "public void startTask() {\n\t}", "public abstract void collectLocks(HashMap threadList);", "void getTasks( AsyncCallback<java.util.List<org.openxdata.server.admin.model.TaskDef>> callback );", "@Override\n protected void onResume() {\n super.onResume();\n\n // Don't retrieve tasks if it's still running\n if (mTaskRetriever != null) {\n return;\n }\n\n // get tasks\n mTaskRetriever = new TaskRetriever();\n mTaskRetriever.execute((Void) null);\n }", "void lockGranted(LockHandle lockHandle);", "public void startTaskTriggerCheckerThread() {\n new Thread(new Runnable() {\n @Override\n public void run() {\n canRunEnqueueTaskThread.set(true);\n while(canRunEnqueueTaskThread.get()) {\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n if(taskEnqueued.get() || canRunTaskThread.get()) { //do not enqueue the task if an instance of that task is already enqueued or running.\n continue;\n //log(PrioritizedReactiveTask.this.getClass().getSimpleName() + \" already in queue or is currently executing\");\n } else if(shouldTaskActivate()) {\n System.out.println(\"Thread \" + Thread.currentThread().getId() + \" enqueued task: \" + this.getClass().getSimpleName());\n taskQueue.add(PrioritizedReactiveTask.this);\n activeTasks.add(PrioritizedReactiveTask.this);\n taskEnqueued.set(true);\n try {\n Thread.sleep(5000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }\n }\n }).start();\n }", "void doWork(AbstractTaskList list);", "Map<String, Object> forceStartTaskInstance(User loginUser, int queueId);", "private void withLock(Lock lock, Runnable task) {\n withLock(lock, () -> {\n task.run();\n return null;\n });\n }", "private void execLocked(Runnable l) {\n Lock rl = lock.readLock();\n rl.lock();\n try {\n l.run();\n } finally {\n rl.unlock();\n }\n }", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tboolean bok = checkMinPath();\n\t\t\t\t\t\t\tif (bok) {\n\t\t\t\t\t\t\t\tcanRun = true;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif (exitWhenGetNotLock) {// 获取不到锁,直接不执行,return\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\twhile (true) {\n\t\t\t\t\t\t\t\tif (canRun) {\n\t\t\t\t\t\t\t\t\tboolean bok1 = checkMinPath();\n\t\t\t\t\t\t\t\t\tif (bok1) {// 获取所成功\n\t\t\t\t\t\t\t\t\t\tgetLockSuccess();\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 {\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"同步等待...\");\n\t\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (KeeperException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "boolean isBlockedBy(Task otherTask);", "protected void lock() {\n semaphore = new Semaphore(0);\n try {\n semaphore.acquire();\n }\n catch(InterruptedException e) {\n System.out.println(\"Trouble for request of semaphore acquirement\");\n e.printStackTrace();\n }\n }", "public void acquire() {\r\n return;\r\n }", "Lock getComponentAccessTokenLock();", "public List<Task> loadDependentTasks(Task task) {\n\t\treturn null;\r\n\t}", "public ArrayList<Task> getAllTasks() {\n \treturn this.taskBuffer.getAllContents();\n }", "private void loadTasks() {\n try {\n List<Task> tasks = Reader.readTasks(new File(TASKS_FILE));\n for (Task t1 : tasks) {\n todoList.addTask(t1);\n }\n } catch (IOException e) {\n System.err.println(\"No file exists\");\n }\n }", "@Override\n\t\tprotected Void doInBackground(Void... params)\n\t\t{\n\t\t\t//Get the current thread's token\n\t\t\tsynchronized (this)\n\t\t\t{\n\t\t\t\tMyApplication app = (MyApplication) getApplication();\n\t\t\t\twhile(app.getSyncStatus());\n\n\t\t\t}\n\t\t\treturn null;\n\t\t}", "private void safeWaitTasks(Set<Future<?>> activeTasks, CompletionService<?> completionService)\n throws IOException {\n // Wait until backup tasks are completed.\n while (activeTasks.size() > 0) {\n try {\n Future<?> resultFuture = completionService.take();\n activeTasks.remove(resultFuture);\n resultFuture.get();\n } catch (InterruptedException ie) {\n // Cancel pending tasks.\n activeTasks.forEach((future) -> future.cancel(true));\n // Continue interrupt chain.\n Thread.currentThread().interrupt();\n throw new RuntimeException(\"Thread interrupted while waiting for backup threads.\", ie);\n } catch (ExecutionException ee) {\n // Cancel pending tasks.\n activeTasks.forEach((future) -> future.cancel(true));\n // Throw.\n Throwable cause = ee.getCause();\n if (cause instanceof IOException) {\n throw (IOException) cause;\n } else {\n throw new IOException(cause);\n }\n }\n }\n }", "private void m1557a(Task task) {\n synchronized (f1826f) {\n if (f1827g == null) {\n f1827g = new SideChannelManager(this.f1828d.getApplicationContext());\n }\n f1827g.queueTask(task);\n }\n }", "public abstract ReentrantLock getLock();", "void lock(String resourceName) throws InterruptedException;", "public long runScheduledPendingTasks() {\n/* */ try {\n/* 597 */ return this.loop.runScheduledTasks();\n/* 598 */ } catch (Exception e) {\n/* 599 */ recordException(e);\n/* 600 */ return this.loop.nextScheduledTask();\n/* */ } \n/* */ }", "public List<TaskDescription> getActiveTasks();", "public void lock() {\r\n super.lock();\r\n }", "Set<Task> getDependentTasks();", "public abstract SystemTask getTask(Project project);", "Set<SoftLock> collectAllSoftLocksForTransactionID(TransactionID transactionID);", "@Override\n public void run()\n {\n active = true;\n try\n {\n try\n {\n lock.acquire();\n }\n catch (InterruptedException e)\n {\n return;\n }\n guardedRun();\n }\n finally\n {\n lock.release();\n }\n }", "public void lock() {\n super.lock();\n }", "public void lock() {\n super.lock();\n }", "public void lock() {\n super.lock();\n }", "private void tryDoingTasksInQueue() {\n var list = queue.exceptionsList;\n var t2 = new Thread(() -> {\n Retry.Operation op = (list1) -> {\n if (!list1.isEmpty()) {\n LOG.warn(\"Error in accessing queue db to do tasks, trying again..\");\n throw list1.remove(0);\n }\n doTasksInQueue();\n };\n Retry.HandleErrorIssue<QueueTask> handleError = (o, err) -> {\n };\n var r = new Retry<>(op, handleError, numOfRetries, retryDuration,\n e -> DatabaseUnavailableException.class.isAssignableFrom(e.getClass()));\n try {\n r.perform(list, null);\n } catch (Exception e1) {\n e1.printStackTrace();\n }\n });\n t2.start();\n }", "@Override\r\n\tpublic ArrayList<Task> getAllTasks() {\n\t\treturn null;\r\n\t}", "synchronized void askForCritical() {\n\nSC=true;\n\nwhile(!Jeton){\n\ttry{\nthis.wait();\n\t}catch( InterruptedException ie ){\n\t\t\n\t}\n}\n}", "public Task getTask(Integer tid);", "abstract void doTaskOnRun();", "ManagementLockObject apply(Context context);", "protected void checkDeadLock()\r\n/* 303: */ {\r\n/* 304:389 */ EventExecutor e = executor();\r\n/* 305:390 */ if ((e != null) && (e.inEventLoop())) {\r\n/* 306:391 */ throw new BlockingOperationException(toString());\r\n/* 307: */ }\r\n/* 308: */ }", "private void runScheduleTasks() {\r\n // To minimize the time the lock is held, make a copy of the array\r\n // with the tasks while holding the lock then release the lock and\r\n // execute the tasks\r\n List<Runnable> tasksCopy;\r\n synchronized (taskLock) {\r\n if (tasks.isEmpty()) { return; } \r\n tasksCopy = tasks;\r\n tasks = new ArrayList<Runnable>(4);\r\n }\r\n for (Runnable task : tasksCopy) {\r\n task.run();\r\n } \r\n }", "public void fetch(TaskMonitor aTM) throws Exception\n{\n // Do fetch\n Git git = getGit();\n FetchCommand fetch = git.fetch();\n if(getCD()!=null) fetch.setCredentialsProvider(getCD());\n if(aTM!=null) fetch.setProgressMonitor(getProgressMonitor(aTM));\n fetch.call();\n \n // Refresh files\n //getRootDir().refresh();\n}", "public interface Executor {\n void setTask(Task task);\n Task getTask();\n void startTask();\n}", "@Override\r\n\tpublic void doTask() {\n\t}", "public static boolean addressNonWaiting(){\n boolean addressedSomething = false;\n for(int i = 0 ; i < taskPointers.length; i ++){\n int pointerIndex = taskPointers[i];\n Task currTask = taskList.get(i);\n\n if(currTask.terminateTime == - 1 && (currTask.isAborted == false) && Collections.disjoint(waitingList, currTask.instructionList)){\n // see if we can allocate resources\n\n\n Instruction currInstruction = currTask.instructionList.get(pointerIndex);\n Type instructionType = currInstruction.instructionType;\n int resourceType = currInstruction.resourceType;\n\n if(instructionType == Type.initiate){\n currTask.startTime = time;\n addressedSomething = true;\n //System.out.println(\"Task \" + currTask.taskNumber + \" was initiated\");\n }else if(instructionType == Type.request){\n if(request(currInstruction)){\n addressedSomething = true;\n //System.out.println(\"Task \" + currTask.taskNumber + \" had its request completed\");\n }else{\n //System.out.println(\"Task \" + currTask.taskNumber + \" could not be completed\");\n }\n }// when it is time to add the waitingInstructions what you should do is something along the lines of\n else if(instructionType == Type.compute){\n int numberCycles = currInstruction.numberCycles;\n if(currTask.computeTime == 0){\n currTask.computeTime = currInstruction.numberCycles;\n }\n currTask.computeTime -= 1;\n\n //System.out.println(\"Task \" + currTask.taskNumber + \" computes \" + (currInstruction.numberCycles - currTask.computeTime));\n\n addressedSomething = true;\n }else if(instructionType == Type.release){\n int amountReleased = currInstruction.resourceAmount;\n release(resourceType, amountReleased, currTask);\n //System.out.println(\"Task \" + currTask.taskNumber + \" released its resources\");\n addressedSomething = true;\n }else{ // if its terminate\n currTask.terminateTime = time;\n // System.out.println(\"Task \" + currTask.taskNumber + \" terminates at time t = \" + time);\n terminatedCount ++;\n releaseAll(currTask);\n addressedSomething = true;\n }\n if(currTask.computeTime == 0){\n taskPointers[i] ++;\n }\n }\n\n }\n return addressedSomething;\n }", "void onTaskStart();", "private DispatchTask next()\n {\n synchronized (m_lock)\n {\n while (null == m_runnable)\n {\n if (m_released)\n {\n return null;\n }\n\n try\n {\n m_lock.wait();\n } catch (InterruptedException e)\n {\n // Not needed\n }\n }\n\n return m_runnable;\n }\n }", "public interface SingletonTask extends Task {\n}", "private void waitForBackgroupTasks() {\n this.objectStore.getAllObjectIDs();\n this.objectStore.getAllEvictableObjectIDs();\n this.objectStore.getAllMapTypeObjectIDs();\n }", "@Override\r\n\tprotected void onResume() {\n\t\tsuper.onResume();\r\n\t\tif (wl != null && !wl.isHeld())\r\n\t\t\twl.acquire();\r\n\t}", "boolean updateActiveTask(Task task);", "TaskFactory getTaskFactory();", "public void lock(int key);", "public static Task getCurrentTask(Fiber paramFiber)\n/* 194 */ throws Pausable { return null; }", "void downgradeToReadLocks();", "void lock(String name) {\n execute(name, connection -> doLock(name, connection));\n }", "private void queueTask(Version theTask) {\n\tsynchronized(_taskQueue) {\n\t _taskQueue.add(theTask);\n\t}\n }", "@MainThread\n void fetchImmediatelyIfNeeded();", "TaskList getList();", "@Override\n protected void acquire(TransactionLocks locks) throws IOException {\n if (unresolvedBlockIds != null && unresolvedBlockIds.length != 0) {\n long[] inodeIdsForURBlks = INodeUtil.resolveINodesFromBlockIds(unresolvedBlockIds);\n blockIds = ArrayUtils.addAll(blockIds, unresolvedBlockIds);\n inodeIds = ArrayUtils.addAll(inodeIds, inodeIdsForURBlks);\n }\n \n blocks.addAll(acquireLockList(DEFAULT_LOCK_TYPE,\n BlockInfoContiguous.Finder.ByBlockIdsAndINodeIds, blockIds, inodeIds));\n }", "@Override\n public void addTasksToRun() {\n //gets the tasks that are ready for execution from the list with new tasks\n List<Task> collect = tasks.stream().filter((task) -> (task.getDate() == TIME))\n .collect(Collectors.toList());\n //sort the tasks inserted. The sort is based in \"priority\" value for all the tasks.\n collect.sort(new Comparator<Task>() {\n @Override\n public int compare(Task o1, Task o2) {\n return o1.getPriority() - o2.getPriority();\n }\n });\n //Change the status of tasks for READY\n collect.stream().forEach((task) -> {\n task.setStatus(Task.STATUS_READY);\n });\n //Adds the tasks to the queue of execution\n tasksScheduler.addAll(collect);\n\n //Removes it from list of new tasks\n tasks.removeAll(collect);\n }" ]
[ "0.5763012", "0.5738082", "0.5694092", "0.5688409", "0.56249493", "0.55770916", "0.54829884", "0.5464126", "0.5462928", "0.5462897", "0.5450895", "0.5435722", "0.54274917", "0.53986466", "0.5382111", "0.5341005", "0.52744055", "0.5273055", "0.5273035", "0.52728045", "0.52663815", "0.52566856", "0.525277", "0.522774", "0.5224858", "0.5208806", "0.51929885", "0.51908356", "0.51901984", "0.51894677", "0.51766473", "0.51715153", "0.51715153", "0.51679844", "0.5156219", "0.5135917", "0.5132022", "0.5123613", "0.5107799", "0.50996333", "0.50770026", "0.5069886", "0.50680923", "0.5067344", "0.5062177", "0.50448644", "0.5031655", "0.50285864", "0.5027488", "0.50127506", "0.5007346", "0.49964955", "0.4992743", "0.4991871", "0.49821284", "0.498155", "0.49785757", "0.49766448", "0.49733365", "0.497132", "0.49665722", "0.49645454", "0.4959076", "0.4946597", "0.4944574", "0.4942412", "0.4941301", "0.493899", "0.49374905", "0.49310678", "0.49310678", "0.49310678", "0.49301732", "0.49253824", "0.49214038", "0.49212846", "0.4916286", "0.4915842", "0.49063623", "0.49026886", "0.48990908", "0.48987776", "0.48986438", "0.48957175", "0.48927394", "0.4891309", "0.48821", "0.48812726", "0.48765713", "0.4876288", "0.48728842", "0.48639682", "0.48613325", "0.48550352", "0.48519593", "0.4848137", "0.4842849", "0.48402146", "0.48272246", "0.48272225" ]
0.7514898
0
Call by Camunda's Job Executor once a async processor times out
@Override public void execute(final AsyncProcessorTimeoutJobHandlerConfiguration configuration, final ExecutionEntity execution, final CommandContext commandContext, final String tenantId) { final String externalTaskId = configuration.getExternalTaskId(); final ExternalTask externalTask = getExternalTaskService() .createExternalTaskQuery() .externalTaskId(externalTaskId) .locked() .singleResult(); // already completed or not yet locked if (externalTask == null) { return; } // timeout timer belongs to expired external task execution if (!externalTask.getLockExpirationTime().equals(configuration.getLockTimeout())) { return; } // external task lock already expired - ignore timer if (externalTask.getLockExpirationTime().before(new Date())) { return; } final String key = getInternalKey(externalTask.getProcessDefinitionKey(), externalTask.getTopicName()); final ExternalTaskAsyncProcessingRegistrationImpl<?, ?> registration = (ExternalTaskAsyncProcessingRegistrationImpl<?, ?>) registrations .get(key); getExternalTaskService() .handleFailure(externalTaskId, getWorkerId(), registration.getResponseTimeoutExpiredMessage(), 0, 0l); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void handleTimeoutTask();", "@Override\n protected void handleExecuteTimeoutException(final TimeoutException timeoutEx) {\n officeProcessManager.restartDueToTaskTimeout();\n }", "private void setupTimeoutJob() {\n eventLoopGroup.scheduleAtFixedRate(() -> {\n\n /*\n * We cannot wait for the request infinitely, but we also cannot remove the object\n * from the queue - FIXME in case of situation when queue of waiting objects grow to X we have to\n * brake connection.\n */\n\n Iterator<RedisQueryRequest> iterator = queue.iterator();\n int i = 0;\n long timeNow = System.currentTimeMillis();\n /*\n * we are tracking 'i' because we want to do only some work, not all the work.\n * we cannot take too much time in timeout checking.\n */\n\n while (iterator.hasNext() && i < 100) {\n RedisQueryRequest current = iterator.next();\n if (current.isTimeouted()) {\n //already been here.\n continue;\n }\n long whenRequestStarted = current.getRequestTimeStart();\n long requestTimeUntilNow = timeNow - whenRequestStarted;\n if (requestTimeUntilNow >= 1000) {\n LOG.error(\"Timeouted request detected\");\n current.markTimeouted();\n current.getCompletableFuture().completeExceptionally(new TimeoutException(\"Timeout occurred.\"));\n }\n\n i++;\n }\n\n }, 100, 100, TimeUnit.MILLISECONDS);\n }", "<T> T endProcess(AsyncResult<T> asyncResult) throws ExecutionException, InterruptedException;", "@Override\n public void timeout(CellPath path)\n {\n retry(task, SMALL_DELAY);\n }", "public void handleTimeout();", "@Override\n public void timeout(CellPath path) {\n retry(task, SMALL_DELAY);\n }", "@Override\n public void onTimeout(TimeValue timeout) {\n run();\n }", "protected void onTimeout() {\n }", "@Scheduled(cron = \"0 2 2 ? * THU,SUN\")\n @Async\n protected void powerBallResultJob() throws IOException {\n\n LotteryResult result = americanaService.updatePowerBallResult(null);\n String res = result == null ? \"failed\" : result.toString();\n String msj = \"updatePowerBallResult job executed with result: \".concat(res);\n if (res.equals(\"failed\")) {\n LOGGER.error(msj);\n } else {\n LOGGER.info(msj);\n }\n\n }", "Future<T> onTimeout(Consumer<Throwable> timeoutHandler);", "public abstract void onTimeout();", "@Scheduled(cron = \"0 1 4 ? * WED,SAT\")\n @Async\n protected void mega_millions_result_job() throws IOException {\n\n LotteryResult result = americanaService.updateMegaMillionsResult(null);\n String res = result == null ? \"failed\" : result.toString();\n String msj = \"updateMegaMillionsResult job executed with result: \".concat(res);\n if (res.equals(\"failed\")) {\n LOGGER.error(msj);\n } else {\n LOGGER.info(msj);\n }\n\n }", "default boolean pollOnExecutionFailed() {\n return false;\n }", "protected void onQueued() {}", "void timeout(ServiceExecutionEvent e) {\n }", "@Scheduled(cron = \"0 5 21 ? * MON,TUE,WED,THU,FRI,SAT\")\n @Scheduled(cron = \"0 5 18 ? * SUN\")\n @Async\n protected void updateLotoPoolResults() throws IOException {\n LotteryResult lotteryResult = leidsaService.updateLotoPoolResults(null);\n String result = lotteryResult == null ? \"failed\" : lotteryResult.toString();\n String msj = \"updateLotoPoolResults job executed with result: \".concat(result);\n if (result.equals(\"failed\")) {\n LOGGER.error(msj);\n } else {\n LOGGER.info(msj);\n }\n }", "@Override\n protected void checkCanceled() {\n long l = System.currentTimeMillis();\n if (l >= myTime) {\n throw new ProcessCanceledException();\n }\n }", "public synchronized void execute() {\n\t\tthis.timeoutFuture = SCHEDULER.schedule(this::processTimeout, 5, TimeUnit.SECONDS);\n\t\tthis.statuses.put(this.localNode.getInfo(), NodeStatus.Unasked);\n\t\tcheckFinishAndProcess();\n\t}", "@Override\r\n\t\t\t\tpublic void onTimeout(AsyncEvent event) throws IOException {\n\t\t\t\t\tprintln(\"[MyAsyncServlet] Timeout\");\r\n\t\t\t\t}", "@Test\r\n void timeoutNotExceeded() {\n assertTimeout(ofMinutes(2), () -> {\r\n // Perform task that takes less than 2 minutes.\r\n });\r\n }", "@Override\n\tprotected void executeInternal(JobExecutionContext context,\n\t\t\tInteger channelId, Integer applicationId)\n\t\t\tthrows JobExecutionException {\n\t\t\n\t\t\n\t\tTaskManager taskManager = SpringUtil.getBean(TaskManager.class);\n\t\t\n\t\t//TODO 这里没法确定channel code,所以没法通过common notify packet方式生成task\n\t\t//不是很好\n\t\t//个人觉得没必要再单独生成一个额外的扫尾task,可以直接在扫尾的cron job中执行\n\t\tTask task = SpringUtil.getBean(SaoweiTask.class);\n\t\t//TODO 上下文的处理,系统级task上下文,这里暂时塞0吧,没啥关系\n\t\tChannelService channelService = SpringUtil.getBean(ChannelService.class);\n\t\tApplicationService applicationService = SpringUtil.getBean(ApplicationService.class);\n\t\tChannel channel = channelService.getChannelByCode(\"SYSTEM\");\n\t\tList<Application> applications = applicationService.getApplicationsByChannelId(channel.getId());\n\t\tApplication application = applications.get(0);\n\t\tTaskTemplateService templateService = SpringUtil.getBean(TaskTemplateService.class);\n\t\tTaskTemplate template = templateService.getTaskTemplateByTypeAndSubType(\"SYSTEM\", \"saowei\");\n\t\ttry {\n\t\t\ttask.setDataId(String.valueOf(System.nanoTime()));\n\t\t\ttask.setData(\"\");\n\t\t\ttask.setTemplate(template);\n\t\t\t\n\t\t\ttask.getContext().setChannelCode(channel.getCode());\n\t\t\ttask.getContext().setChannelId(channel.getId());\n\t\t\ttask.getContext().setApplicationCode(application.getCode());\n\t\t\ttask.getContext().setApplicationId(application.getId());\n\t\t\ttask.getContext().setStoreId(application.getStoreId());\n\t\t\t\n\t\t\tif (context.getMergedJobDataMap().containsKey(Constant.SCHEDULE_PARAM_TASK_RERUN_DELAY)) {\n\t\t\t\tString taskRerunDelay = (String)context.getMergedJobDataMap().get(Constant.SCHEDULE_PARAM_TASK_RERUN_DELAY);\n\t\t\t\ttask.getContext().put(Constant.SCHEDULE_PARAM_TASK_RERUN_DELAY, taskRerunDelay);\n\t\t\t}\n\t\t\t\n\t\t\ttaskManager.executeTask(task);\n\t\t} catch (TaskException e) {\n\t\t\t//e.printStackTrace();\n\t\t\tLOGGER.error(\"扫尾job运行失败\", e);\n\t\t\tthrow new JobExecutionException(e);\n\t\t}\n\t}", "private void scheduleJob() {\n Log.d(TAG, \"Long lived task is done.\");\n }", "@Test(timeout=10000)\n public void testCancelJob() throws Exception {\n CommonClientTests.testCancelJob(client);\n }", "public void forceTimeout() {\n getTimeoutScheduler().forceExecute();\n }", "CompletableFuture<CalculationResult> goInfiniteAsync();", "@Asynchronous\n @TransactionTimeout(value = 30000, unit = TimeUnit.SECONDS) \n public void executeTask(Timer timer)\n {\n try\n {\n \t//setType(\"SCP_TO_SAP\");\n run();\t\n }\n catch(Exception e)\n {\n \tString msg = MessageFormatorUtil.getParameterizedStringFromException(e);\n \tlogger.log(Level.SEVERE, \"Exception occured in CustomerLoadingJob#executeTask for Timer: \"+timer.getInfo()+\", Task: \"+this.processId + \"(\" + this.jobName +\")\" +\", Reason for failure: \"+msg, e);\n }\n }", "@Override\n protected void onFailure(Throwable e) {\n // terminate thread\n terminate(false);\n }", "void taskFinished(Throwable t);", "void handleSubchannelTerminated() {\n executorPool.returnObject(executor);\n terminatedLatch.countDown();\n }", "void Ending(long t) //to be called after each second, decrements\r\n {\n boolean check = false;\r\n for (int i = 0; i < numProcessors; i++) {\r\n\r\n //move deadlines of migrating tasks\r\n Job temp = servers[i].migratingPool.front;\r\n\r\n while (temp != null) {\r\n temp.deadline--;\r\n temp = temp.next;\r\n\r\n }\r\n //fixed tasks\r\n temp = servers[i].pool.front;\r\n while (temp != null) {\r\n temp.deadline--;\r\n temp = temp.next;\r\n\r\n }\r\n\r\n if (servers[i].checkDeadlineEDFOS(t) == true) { //if something empties\r\n check = true; //call event later\r\n }\r\n\r\n }//end of server num looop\r\n\r\n if (check == true) {\r\n event(t);\r\n }\r\n\r\n }", "public void await() {\n for (final Future<Void> future : futures) {\n try {\n future.get();\n } catch (final Throwable e) {\n LOGGER.error(\"Scheduled blob storage job threw an exception.\", e);\n }\n }\n futures.clear();\n }", "private void handleLostExecutor(Protos.SchedulerTask task)\n {\n SchedulerNode.State state = this.app.getState(task.getNodeId());\n\n //dont deliver the failure if it was already sent in some form\n if( state.equals(SchedulerNode.State.FAILED)\n || state.equals(SchedulerNode.State.FINISHED)\n || state.equals(SchedulerNode.State.KILLED))\n {\n return;\n }\n\n //this.app.nodeFailed(this, task.getNodeId());\n }", "@Scheduled(cron = \"0 5 19 ? * 1-7\")\n @Async\n protected void updateMegaChanceResults() throws IOException {\n LotteryResult lotteryResult = lotekaService.updateMegaChanceResults(null);\n String result = lotteryResult == null ? \"failed\" : lotteryResult.toString();\n String msj = \"updateMegaChanceResults job executed with result: \".concat(result);\n if (result.equals(\"failed\")) {\n LOGGER.error(msj);\n } else {\n LOGGER.info(msj);\n }\n }", "@Scheduled(cron = \"0 5 13 ? * TUE,FRI\")\n @Async\n protected void updateLotoRealResults() throws IOException {\n LotteryResult lotteryResult = realService.updateLotoRealResults(null);\n String result = lotteryResult == null ? \"failed\" : lotteryResult.toString();\n String msj = \"updateLotoRealResults job executed with result: \".concat(result);\n if (result.equals(\"failed\")) {\n LOGGER.error(msj);\n } else {\n LOGGER.info(msj);\n }\n }", "private void onComplete(int duration) {\n\t\t\n\t\tservice = Executors.newSingleThreadExecutor();\n\n\t\ttry {\n\t\t Runnable r = new Runnable() {\n\t\t @Override\n\t\t public void run() {\n\t\t // Database task\n\t\t \tcontrollerVars.setPlays(false);\n\t\t }\n\t\t };\n\t\t Future<?> f = service.submit(r);\n\n\t\t f.get(duration, TimeUnit.MILLISECONDS); // attempt the task for two minutes\n\t\t}\n\t\tcatch (final InterruptedException e) {\n\t\t // The thread was interrupted during sleep, wait or join\n\t\t}\n\t\tcatch (final TimeoutException e) {\n\t\t // Took too long!\n\t\t}\n\t\tcatch (final ExecutionException e) {\n\t\t // An exception from within the Runnable task\n\t\t}\n\t\tfinally {\n\t\t service.shutdown();\n\t\t}\t\t\n\t}", "@Override\r\n protected Object doInBackground() throws Exception {\n try {\r\n Thread.sleep(5500);\r\n\r\n } catch (Exception e) {}\r\n return null;\r\n }", "@Test\n public void shouldReturnTotalNumberOfRequestsAs5ForFailAsync() {\n AsyncHelloWorldService helloWorldService = mock(AsyncHelloWorldService.class);\n ScheduledExecutorService scheduler = Executors.newSingleThreadScheduledExecutor();\n\n CompletableFuture<String> failedFuture = new CompletableFuture<>();\n failedFuture.completeExceptionally(new HelloWorldException());\n given(helloWorldService.returnHelloWorld()).willReturn(failedFuture);\n\n Retry retry = Retry.of(\"metrics\", RetryConfig.<String>custom()\n .retryExceptions(Exception.class)\n .maxAttempts(5)\n .failAfterMaxAttempts(true)\n .build());\n\n Supplier<CompletionStage<String>> supplier = Retry.decorateCompletionStage(retry, scheduler, helloWorldService::returnHelloWorld);\n\n assertThat(supplier.get())\n .failsWithin(5, TimeUnit.SECONDS)\n .withThrowableOfType(ExecutionException.class)\n .havingCause();\n\n assertThat(retry.getMetrics().getNumberOfTotalCalls()).isEqualTo(5);\n }", "@Override\n\tpublic void onTaskFail() {\n\t\t\n\t}", "@Scheduled(cron = \"0 15 22 ? * 1-7\")\n @Async\n protected void updateFloridaNigthResults() throws IOException {\n LotteryResult lotteryResult = americanaService.updateFloridaNight(null);\n String result = lotteryResult == null ? \"failed\" : lotteryResult.toString();\n String msj = \"floridaNoche job executed with result: \".concat(result);\n if (result.equals(\"failed\")) {\n LOGGER.error(msj);\n } else {\n LOGGER.info(msj);\n }\n }", "@Scheduled(cron = \"0 0 15 ? * 1-7\")\n @Async\n protected void updateGanaMasResults() throws IOException {\n LotteryResult lotteryResult = nacionalService.updateGanaMasResults(null);\n String result = lotteryResult == null ? \"failed\" : lotteryResult.toString();\n String msj = \"updateGanaMasResults job executed with result: \".concat(result);\n if (result.equals(\"failed\")) {\n LOGGER.error(msj);\n } else {\n LOGGER.info(msj);\n }\n }", "java.util.concurrent.Future<CancelJobRunResult> cancelJobRunAsync(CancelJobRunRequest cancelJobRunRequest);", "public void onTimeout();", "public boolean interrupt() throws Exception{\n if (processorTask.isError()) return true; // if error was detected on prev phase - skip execution\n\n if ( asyncFilters == null || asyncFilters.size() == 0 ) {\n execute();\n return false;\n } else {\n asyncHandler.addToInterruptedQueue(asyncProcessorTask); \n return invokeFilters();\n }\n }", "private void reStartTimeout() {\n cancelTask();\n startTimeout();\n }", "public boolean postExecute() throws Exception{\n if (!commitResponsePhase.getAndSet(true)){\n processorTask.postResponse();\n processorTask.postProcess();\n processorTask.terminateProcess();\n\n // De-reference so under stress we don't have a simili leak.\n processorTask = null;\n return false;\n }\n return false;\n }", "@Scheduled(cron = \"0 5 13 ? * 1-7\")\n @Async\n protected void updateQuinielaRealResults() throws IOException {\n LotteryResult lotteryResult = realService.updateQuinielaRealResults(null);\n String result = lotteryResult == null ? \"failed\" : lotteryResult.toString();\n String msj = \"updateQuinielaRealResults job executed with result: \".concat(result);\n if (result.equals(\"failed\")) {\n LOGGER.error(msj);\n } else {\n LOGGER.info(msj);\n }\n }", "@Override\n public void operationComplete(Future<Void> future) throws Exception{\n if(!future.isSuccess()){\n olapFuture.fail(future.cause());\n olapFuture.signal();\n }\n }", "@Test\r\n public void test_stop() throws InterruptedException {\r\n final CountDownLatch expectedTimeoutReceivedLatch = new CountDownLatch(1);\r\n final CountDownLatch timeoutWhichShouldNeverBeReceivedLatch = new CountDownLatch(2);\r\n final IExpiryAction<Long> timeoutAction = new IExpiryAction<Long>() {\r\n @Override\r\n public void onTimeout(final Long payload) {\r\n //\r\n // count-down our latches. The first latch only requires one\r\n // invocation, the second expects two (though the second should\r\n // never be received)\r\n //\r\n expectedTimeoutReceivedLatch.countDown();\r\n timeoutWhichShouldNeverBeReceivedLatch.countDown();\r\n }\r\n };\r\n\r\n final int taskTimeout = 100;\r\n final ExpiryViceroy<Long> timeoutManager = ExpiryViceroy.start(timeoutAction, taskTimeout,\r\n TimeUnit.MILLISECONDS);\r\n\r\n //\r\n // ensure it's running - add a task which will expire\r\n //\r\n timeoutManager.onStartTask(Long.valueOf(1));\r\n final boolean timeoutReached = expectedTimeoutReceivedLatch.await(1, TimeUnit.SECONDS);\r\n Assert.assertTrue(\"timeout reached\", timeoutReached);\r\n\r\n //\r\n // now kill the timeout manager ...\r\n //\r\n timeoutManager.stop();\r\n\r\n //\r\n // ... and submit another task.\r\n //\r\n timeoutManager.onStartTask(Long.valueOf(2));\r\n final boolean timeoutNeverReceived = timeoutWhichShouldNeverBeReceivedLatch.await(taskTimeout + 100,\r\n TimeUnit.MILLISECONDS);\r\n Assert.assertFalse(\"a second timeout should never have been called\", timeoutNeverReceived);\r\n }", "@Test\n public void testPoll2() {\n \tBoundedCompletionService<String> ecs = new BoundedCompletionService<String>(\n new ExecutorCompletionService<String>(e));\n try {\n Assert.assertNull(ecs.poll());\n Callable<String> c = new StringTask();\n ecs.submit(c);\n Future<String> f = ecs.poll(SHORT_DELAY_MS, TimeUnit.MILLISECONDS);\n if (f != null) Assert.assertTrue(f.isDone());\n } catch (Exception ex) {\n unexpectedException();\n }\n }", "@Test\n public void testPoll1() {\n \tBoundedCompletionService<String> ecs = new BoundedCompletionService<String>(\n new ExecutorCompletionService<String>(e));\n try {\n Assert.assertNull(ecs.poll());\n Callable<String> c = new StringTask();\n ecs.submit(c);\n Thread.sleep(SHORT_DELAY_MS);\n for (;;) {\n Future<String> f = ecs.poll();\n if (f != null) {\n Assert.assertTrue(f.isDone());\n break;\n }\n }\n } catch (Exception ex) {\n unexpectedException();\n }\n }", "public abstract Task onDeath() throws Exception;", "@SuppressWarnings(\"unused\")\n @CalledByNative\n private void onCanceled() {\n postTaskToExecutor(new Runnable() {\n @Override\n public void run() {\n try {\n mCallback.onCanceled(CronetBidirectionalStream.this, mResponseInfo);\n } catch (Exception e) {\n Log.e(CronetUrlRequestContext.LOG_TAG, \"Exception in onCanceled method\", e);\n }\n mInflightDoneCallbackCount.decrement();\n }\n });\n }", "protected void handleCompletedTask(Future<Task> task)\n {\n m_RunningTasks.remove(task);\n\n }", "private void stopPulling() {\n\n // un register this task\n eventDispatcher.unRegister(this);\n\n // tell the container to send response\n asyncContext.complete();\n\n // cancel data changed listening\n if (pullingTimeoutFuture != null){\n pullingTimeoutFuture.cancel(false);\n }\n }", "@Override\n public <V> HugeTask<V> waitUntilTaskCompleted(Id id)\n throws TimeoutException {\n long timeout = this.graph.configuration()\n .get(CoreOptions.TASK_WAIT_TIMEOUT);\n return this.waitUntilTaskCompleted(id, timeout, 1L);\n }", "@Scheduled(cron = \"0 35 19 ? * 1-7\")\n @Async\n protected void updateNewYork730Results() throws IOException {\n LotteryResult lotteryResult = americanaService.updateNewYork730Results(null);\n String result = lotteryResult == null ? \"failed\" : lotteryResult.toString();\n String msj = \"updateNewYork730Results job executed with result: \".concat(result);\n if (result.equals(\"failed\")) {\n LOGGER.error(msj);\n } else {\n LOGGER.info(msj);\n }\n }", "public ChannelProgressivePromise awaitUninterruptibly()\r\n/* 113: */ {\r\n/* 114:144 */ super.awaitUninterruptibly();\r\n/* 115:145 */ return this;\r\n/* 116: */ }", "@GET\n @ApiOperation(\"Wait for a process to finish\")\n @Produces(MediaType.APPLICATION_JSON)\n @javax.ws.rs.Path(\"/{id}/waitForCompletion\")\n public ProcessEntry waitForCompletion(@ApiParam @PathParam(\"id\") UUID instanceId,\n @ApiParam @QueryParam(\"timeout\") @DefaultValue(\"-1\") long timeout) {\n\n log.info(\"waitForCompletion ['{}', {}] -> waiting...\", instanceId, timeout);\n\n long t1 = System.currentTimeMillis();\n\n ProcessEntry r;\n while (true) {\n r = get(instanceId);\n\n ProcessStatus s = r.status();\n if (s == ProcessStatus.FINISHED ||\n s == ProcessStatus.FAILED ||\n s == ProcessStatus.CANCELLED ||\n s == ProcessStatus.TIMED_OUT) {\n return r;\n }\n\n if (timeout > 0) {\n long t2 = System.currentTimeMillis();\n if (t2 - t1 >= timeout) {\n log.warn(\"waitForCompletion ['{}', {}] -> timeout, last status: {}\", instanceId, timeout, s);\n throw new ConcordApplicationException(Response.status(Status.REQUEST_TIMEOUT).entity(r).build());\n }\n }\n\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) { // NOSONAR\n throw new ConcordApplicationException(Response.status(Status.INTERNAL_SERVER_ERROR)\n .entity(\"Request was interrputed\")\n .build());\n }\n }\n }", "@Override\n public void onFailure(IMqttToken asyncActionToken, Throwable exception) {\n }", "public abstract void processJob() throws Exception;", "@Override\n\t\t\tpublic void doTimeOutWork() {\n\t\t\t\tthis.exit();\n\t\t\t}", "@Override\n\t\t\tpublic void doTimeOutWork() {\n\t\t\t\tthis.exit();\n\t\t\t}", "@Test\n public void testTaskNeedingOtherTasksToCheckIfDoneWithTimeout() throws InterruptedException, TaskException {\n final ScheduledPoolingTask<Integer> scheduledPoolingTask = this.createFakeScheduledPoolingTask(1, 1, 7, 8, 100);\n\n final Task<Integer> simpleTask = this.createFakeSimpleTask(2);\n\n final TaskDependingOnOtherTasksExample task = new TaskDependingOnOtherTasksExample.Builder()\n .willTake(2)\n .withTimeout(10)\n .withDependingTask(simpleTask)\n .withDependingTask(scheduledPoolingTask)\n .build();\n\n task.execute();\n\n assertTrue(\"The task should be finished ok\", task.isDone());\n\n assertTrue(\"The simple should be finished NO ok\", simpleTask.isDone());\n assertTrue(\"The scheduled should be finished ok\", !scheduledPoolingTask.isDone());\n\n assertTrue(\"The task should be finished ok\", task.getResult()==0);\n assertTrue(\"The simpleTask should be finished ok\", simpleTask.getResult()==0);\n assertTrue(\"The scheduledPoolingTask should be finished ok\", scheduledPoolingTask.getResult()==1);\n\n\n }", "@Scheduled(cron = \"0 0 15 ? * SUN,MON,TUE,WED,THU,FRI,SAT\")\n @Async\n protected void updateJuegaMasGanaMasResults() throws IOException {\n LotteryResult lotteryResult = nacionalService.updateJuegaMasGanaMasResults(null);\n String result = lotteryResult == null ? \"failed\" : lotteryResult.toString();\n String msj = \"updateJuegaMasGanaMasResults job executed with result: \".concat(result);\n if (result.equals(\"failed\")) {\n LOGGER.error(msj);\n } else {\n LOGGER.info(msj);\n }\n\n }", "@Override\n public void unsubscribe() {\n try {\n assert future != null;\n future.get(5, TimeUnit.SECONDS); //wait for all the scheduled values fired\n } catch (Exception e) {\n Throwables.propagate(e); //just hide the checked exception\n }\n }", "@Override\n public void close() throws Exception {\n log.info(\"Shutting down task replicator...\");\n while (running) {\n Thread.sleep(300L);\n }\n }", "@Test\n public void testInvokeEffectorStartFailing_MethodInDynamicTask() {\n Task<Void> task = app.getExecutionContext().submit(Tasks.<Void>builder().dynamic(true).body(new Callable<Void>() {\n @Override public Void call() throws Exception {\n testInvokeEffectorStartFailing_Method();\n return null;\n }\n }).build());\n \n assertTaskSucceeds(task);\n assertTaskHasFailedChild(task);\n }", "void loadJobDetails() {\n if (!enabled.get()) {\n LOGGER.info(\"Skip loading scheduled jobs\");\n return;\n }\n loadJobsInCurrentChunk()\n .filter(j -> !scheduler.scheduled(j.getId()).isPresent())//not consider already scheduled jobs\n .flatMapRsPublisher(t -> ErrorHandling.skipErrorPublisher(scheduler::schedule, t))\n .forEach(a -> LOGGER.debug(\"Loaded and scheduled job {}\", a))\n .run()\n .whenComplete((v, t) -> Optional.ofNullable(t)\n .map(ex -> {\n LOGGER.error(\"Error Loading scheduled jobs!\", ex);\n return null;\n })\n .orElseGet(() -> {\n LOGGER.info(\"Loading scheduled jobs completed !\");\n return null;\n }));\n }", "public CompletableFuture<Void> unregisterEventProcessor() {\n TRACE_LOGGER.info(this.hostContext.withHost(\"Stopping event processing\"));\n\n if (this.unregistered == null) {\n // PartitionManager is created in constructor. If this object exists, then\n // this.partitionManager is not null.\n this.unregistered = this.partitionManager.stopPartitions();\n\n // If we own the executor, stop it also.\n // Owned executor is also created in constructor.\n if (this.weOwnExecutor) {\n this.unregistered = this.unregistered.thenRunAsync(() ->\n {\n // IMPORTANT: run this last stage in the default threadpool!\n // If a task running in a threadpool waits for that threadpool to terminate, it's going to wait a long time...\n\n // It is OK to call shutdown() here even if threads are still running.\n // Shutdown() causes the executor to stop accepting new tasks, but existing tasks will\n // run to completion. The pool will terminate when all existing tasks finish.\n // By this point all new tasks generated by the shutdown have been submitted.\n this.executorService.shutdown();\n\n try {\n this.executorService.awaitTermination(10, TimeUnit.MINUTES);\n } catch (InterruptedException e) {\n throw new CompletionException(e);\n }\n }, ForkJoinPool.commonPool());\n }\n }\n\n return this.unregistered;\n }", "@Override\n protected void callCorps() throws Exception {\n\n ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean();\n long[] idThread = threadMXBean.findDeadlockedThreads();\n\n\n if (idThread != null) {\n for (int i = 0; i < idThread.length; i++) {\n long l = idThread[i];\n logger.error(\"Il semble qu'il y ait un deadLock Thread ID : \" + l);\n\n }\n }\n }", "protected void afterJobExecution() {\n\t}", "public void onFailure(Throwable caught) {\n if (attempt > 20) {\n fail();\n }\n \n int token = getToken();\n log(\"onFailure: attempt = \" + attempt + \", token = \" + token\n + \", caught = \" + caught);\n new Timer() {\n @Override\n public void run() {\n runAsync1(attempt + 1);\n }\n }.schedule(100);\n }", "int hardTimeout();", "@Override\n public void onFailure(IMqttToken asyncActionToken,\n Throwable exception) {\n }", "@Override\n public void onFailure(IMqttToken asyncActionToken,\n Throwable exception) {\n\n }", "@Override\n public void shutdown() throws ExecutionException, InterruptedException {\n // When we close this service we need to shutdown our executor!\n threadPoolExecutorService.shutdown();\n if (!threadPoolExecutorService.awaitTermination(SHUTDOWN_TIME, TimeUnit.SECONDS)) {\n LOG.error(\"SfcOfFlowProgrammerImpl Executor did not terminate in the specified time.\");\n List<Runnable> droppedTasks = threadPoolExecutorService.shutdownNow();\n LOG.error(\"SfcOfFlowProgrammerImpl Executor was abruptly shut down. [{}] tasks will not be executed.\",\n droppedTasks.size());\n }\n }", "@Override\n public void timeout(CellPath path) {\n fail(task, CacheException.TIMEOUT,\n \"No reply from \" + path);\n }", "@Scheduled(cron = \"0 05 12 ? * 1-7\")\n @Async\n protected void updateLaPrimeraQuinelaResults() throws IOException {\n LotteryResult lotteryResult = laPrimeraService.updateLaPrimeraQuinielaResults(null);\n String result = lotteryResult == null ? \"failed\" : lotteryResult.toString();\n String msj = \"updateLaPrimeraQuinelaResults job executed with result: \".concat(result);\n if (result.equals(\"failed\")) {\n LOGGER.error(msj);\n } else {\n LOGGER.info(msj);\n }\n }", "@Override\r\n public void handleMessage(Message msg) {\n mThreadPool.execute(getTask());\r\n try {\r\n mSemaphoreThreadPool.acquire();\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n }", "@Test\n public void testJobOverviewHandler() throws Exception {\n // this only works if there is no active job at this point\n assertTrue(getRunningJobs(CLUSTER.getClusterClient()).isEmpty());\n\n // Create a task\n final JobVertex sender = new JobVertex(\"Sender\");\n sender.setParallelism(2);\n sender.setInvokableClass(BlockingInvokable.class);\n\n final JobGraph jobGraph = JobGraphTestUtils.streamingJobGraph(sender);\n\n ClusterClient<?> clusterClient = CLUSTER.getClusterClient();\n clusterClient.submitJob(jobGraph).get();\n\n // wait for job to show up\n while (getRunningJobs(CLUSTER.getClusterClient()).isEmpty()) {\n Thread.sleep(10);\n }\n\n // wait for tasks to be properly running\n BlockingInvokable.latch.await();\n\n final Duration testTimeout = Duration.ofMinutes(2);\n\n String json =\n TestBaseUtils.getFromHTTP(\"http://localhost:\" + getRestPort() + \"/jobs/overview\");\n\n ObjectMapper mapper = new ObjectMapper();\n JsonNode parsed = mapper.readTree(json);\n ArrayNode jsonJobs = (ArrayNode) parsed.get(\"jobs\");\n assertEquals(1, jsonJobs.size());\n assertThat(\"Duration must be positive\", jsonJobs.get(0).get(\"duration\").asInt() > 0);\n\n clusterClient.cancel(jobGraph.getJobID()).get();\n\n // ensure cancellation is finished\n while (!getRunningJobs(CLUSTER.getClusterClient()).isEmpty()) {\n Thread.sleep(20);\n }\n\n BlockingInvokable.reset();\n }", "@Test\r\n public void test_callbackInvokedWhenATaskExpires() throws InterruptedException {\r\n final List<String> timeouts = new ArrayList<String>();\r\n final IExpiryAction<String> action = new IExpiryAction<String>() {\r\n @Override\r\n public void onTimeout(final String payload) {\r\n timeouts.add(payload);\r\n }\r\n };\r\n final int taskTimeout = 100;\r\n final ExpiryViceroy<String> viceroy = ExpiryViceroy.start(action, taskTimeout, TimeUnit.MILLISECONDS);\r\n\r\n //\r\n // start/complete a load of tasks which won't expire,\r\n // unless for some reason the code below manages to take longer\r\n // than a second to complete!\r\n //\r\n final long start = System.currentTimeMillis();\r\n final Collection<Delayed> tasks = new ArrayList<Delayed>();\r\n for (int i = 10; --i >= 0;) {\r\n final Delayed task = viceroy.onStartTask(\"Task \" + i);\r\n tasks.add(task);\r\n }\r\n for (final Delayed task : tasks) {\r\n viceroy.onTaskComplete(task);\r\n }\r\n final long duration = System.currentTimeMillis() - start;\r\n\r\n if (duration >= taskTimeout) {\r\n final String errorFormat = \"PRECONDITION FAILED: The test code was expected to take less than %dms, but it took %dms\";\r\n final String message = String.format(errorFormat, Long.valueOf(taskTimeout), Long.valueOf(duration));\r\n Assert.assertTrue(message, duration < taskTimeout);\r\n }\r\n Assert.assertTrue(\"No tasks should've timed out\", timeouts.isEmpty());\r\n\r\n //\r\n // now start a task which will expire\r\n //\r\n final String timeoutPayload = \"this will timeout!\";\r\n final Delayed task = viceroy.onStartTask(timeoutPayload);\r\n\r\n Thread.sleep(taskTimeout * 2); // allow it to time-out\r\n\r\n // confirm the task complete, but it's too late.\r\n viceroy.onTaskComplete(task);\r\n\r\n Assert.assertEquals(\"A timeout was expected\", Integer.valueOf(1), Integer.valueOf(timeouts.size()));\r\n Assert.assertEquals(timeoutPayload, timeouts.get(0));\r\n\r\n viceroy.stop();\r\n }", "private void handleRefreshTimeout(Intent intent) {\n\tif(LOG_INFO) Log.i(TAG, \" handleRefreshTimeout \" + intent.toUri(0));\n String responseId = intent.getStringExtra(EXTRA_REQUEST_ID);\n String[] responseIdSplit = responseId.split(COLON);\n String type = responseIdSplit[0];\n PublisherManager pubMgr = PublisherManager.getPublisherManager(this, type);\n if(pubMgr != null)\n pubMgr.handleRefreshTimeout(intent);\n }", "@Test\n public void shouldReturnTotalNumberOfRequestsAs3ForFailAsync() {\n AsyncHelloWorldService helloWorldService = mock(AsyncHelloWorldService.class);\n ScheduledExecutorService scheduler = Executors.newSingleThreadScheduledExecutor();\n\n CompletableFuture<String> failedFuture = new CompletableFuture<>();\n failedFuture.completeExceptionally(new HelloWorldException());\n given(helloWorldService.returnHelloWorld())\n .willReturn(failedFuture)\n .willReturn(completedFuture(\"Success\"));\n\n Retry retry = Retry.of(\"metrics\", RetryConfig.<String>custom()\n .retryExceptions(Exception.class)\n .maxAttempts(5)\n .failAfterMaxAttempts(true)\n .build());\n\n Supplier<CompletionStage<String>> supplier = Retry.decorateCompletionStage(retry, scheduler, helloWorldService::returnHelloWorld);\n\n String result = awaitResult(supplier.get(), 5);\n\n assertThat(retry.getMetrics().getNumberOfTotalCalls()).isEqualTo(2);\n assertThat(result).isEqualTo(\"Success\");\n }", "AgentPolicyBuilder setParallelCallbackTimeoutMs(long timeoutMs);", "public void testHttpFailureRetries() {\n delayTestFinish(RUNASYNC_TIMEOUT);\n runAsync1(0);\n }", "boolean isDone(long number) throws NoSuchJobException;", "protected int maxTimeout() { return 15*1000*1000; }", "@Override\n\tpublic void waitTimedOut() {\n\t\t\n\t\tif( busylinetimer == null )\n\t\t\treturn;\n\t\t\n\t\tbusylinetimer.stop();\n\t\tbusylinetimer = null;\n\t\t\n\t\tlog.info(\"linea ocupada por mas de 120 segundos, iniciando proceso para colgar llamada.......\");\n\t\t\n\t\tnew CellPhoneHandUpCall(modem,false);\n\t}", "void cancelDataflow(TimelyResultProcessor resultProcessor, String queryId);", "public void taskComplete() {\n mTasksLeft--;\n if ((mTasksLeft==0) & mHasCloRequest){\n onAllTasksCompleted();\n }\n }", "@Override\n public SyncObjectState call() {\n\n SyncObjectState callState = SyncObjectState.STARTED;\n \n \n long remainingSleep = task.getSleepUntil() - System.currentTimeMillis();\n if (remainingSleep > 0) {\n try {\n Thread.sleep(remainingSleep);\n } catch (InterruptedException ex) {\n logger.warn(buildStandardLogMessage(null, \" Interrupted task-remaining-sleep\"));\n }\n }\n\n // TODO: consider replacing Lock with with IMap, for the automatic GC\n // see https://groups.google.com/forum/#!topic/hzProcessingClient/9YFGh3xwe8I\n Lock hzPidLock = hzProcessingClient.getLock(task.getPid());\n \n // this section must be thread-safe otherwise, we may skip unlocking a lock.\n // see http://docs.hazelcast.org/docs/3.5/manual/html/lock.html\n try {\n logger.info(buildStandardLogMessage(null, \" Locking task, attempt \" + task.getLockAttempt()));\n \n if (hzPidLock.tryLock(1, TimeUnit.SECONDS)) {\n // got lock\n try {\n logger.info(buildStandardLogMessage(null, \" Processing SyncObject\"));\n SystemMetadata mnSystemMetadata = retrieveMNSystemMetadata();\n logger.debug(task.taskLabel() + \" MN system metadata retrieved...\");\n\n processTask(mnSystemMetadata);\n callState = SyncObjectState.SUCCESS;\n \n } catch (RetryableException ex) {\n if (task.getAttempt() < 20) {\n callState = SyncObjectState.RETRY;\n \n logger.warn(buildStandardLogMessage(ex, \" RetryableException raised on attempt \"\n + task.getAttempt() + \" of 20. Sleeping and requeueing.\"));\n\n task.setAttempt(task.getAttempt() + 1);\n task.setSleepUntil(System.currentTimeMillis() + 5000L);\n\n hzProcessingClient.getQueue(synchronizationObjectQueue).put(task);\n \n } else {\n logger.error(buildStandardLogMessage(ex,\" Exceeded retry limit.\"\n + \" Unable to process the SyncObject. Converting to UnrecoverableException\"),ex);\n throw new UnrecoverableException(task.getPid() + \": retry limits reached without success.\",\n ex.getCause());\n }\n } finally {\n hzPidLock.unlock();\n logger.info(buildStandardLogMessage(null, \" Unlocked Pid.\"));\n }\n } else {\n // lock-retry handling\n if (task.getLockAttempt() < 100) {\n callState = SyncObjectState.RETRY;\n \n logger.warn(buildStandardLogMessage(null,\n \" Cannot lock Pid! Requeueing the task. Attempt \" + task.getLockAttempt()));\n\n task.setLockAttempt(task.getLockAttempt() + 1);\n task.setSleepUntil(System.currentTimeMillis() + 1000L);\n hzProcessingClient.getQueue(synchronizationObjectQueue).put(task);\n \n } else {\n callState = SyncObjectState.FAILED;\n \n String message = \"Cannot lock Pid! Reached Max attempts (100), abandoning processing of this pid.\";\n logger.error(buildStandardLogMessage(null, message));\n throw new SynchronizationFailed(\"5000\",message);\n }\n }\n } catch (SynchronizationFailed e) {\n callState = SyncObjectState.FAILED;\n \n logger.error(buildStandardLogMessage(e.getCause(),\"SynchronizationFailed: \" + e.getMessage()),e);\n SyncFailedTask syncFailedTask = new SyncFailedTask(nodeCommunications, task);\n syncFailedTask.submitSynchronizationFailed(e);\n\n } catch (UnrecoverableException e) {\n callState = SyncObjectState.FAILED;\n // this is the proper location to decide whether or not to notify the MemberNode\n // (these are exceptions caused by internal problems)\n \n // in all cases, we need to log\n logger.error(buildStandardLogMessage(e.getCause(),\"UnrecoverableException: \" + e.getMessage()),e);\n \n // report to MN, for now\n\n SyncFailedTask syncFailedTask = new SyncFailedTask(nodeCommunications, task);\n if (e.getCause() instanceof BaseException)\n syncFailedTask.submitSynchronizationFailed(task.getPid(), null,(BaseException) e.getCause());\n \n else \n syncFailedTask.submitSynchronizationFailed(task.getPid(), null,\n new ServiceFailure(\"5000\", this.buildStandardLogMessage(e.getCause(), null)));\n\n\n \n } catch (InterruptedException e) {\n callState = SyncObjectState.FAILED;\n // was handled as Exception before I split this out\n // don't know if we need to handle it any differently,\n logger.error(buildStandardLogMessage(e, \"Interrupted: \" + e.getMessage()), e);\n\n } catch (Exception e) {\n callState = SyncObjectState.FAILED;\n logger.error(this.buildStandardLogMessage(e,e.getMessage()),e);\n\n } finally {\n logger.info(buildStandardLogMessage(null, \" exiting with callState: \" + callState));\n// XXX: Hold until 2.4, because it depends on an update to d1_cn_common\n// MetricLogEntry metricLogEntry = new MetricLogEntry(MetricEvent.SYNCHRONIZATION_TASK_EXECUTION);\n// metricLogEntry.setNodeId(TypeFactory.buildNodeReference(task.getNodeId()));\n// metricLogEntry.setPid(TypeFactory.buildIdentifier(task.getPid()));\n// metricLogEntry.setMessage(\"status=\" + callState);\n// MetricLogClientFactory.getMetricLogClient().logMetricEvent(metricLogEntry);\n }\n return callState;\n }", "void executeAsync(long delayMs, Runnable task);", "protected abstract long waitOnQueue();", "@Override\n public void onFailure(IMqttToken asyncActionToken,\n Throwable exception) {\n }", "@Override\n public void onFailure(IMqttToken asyncActionToken,\n Throwable exception) {\n }", "@Override\n public void onFailure(IMqttToken asyncActionToken,\n Throwable exception) {\n }", "@Override\n public void onFailure(IMqttToken asyncActionToken,\n Throwable exception) {\n }", "public void afterExecute(Runnable runnable, Throwable th) {\n Task task = (Task) runnable;\n task.setFinished(true);\n task.setError(th);\n getQueue().recycleBlockedQueue();\n super.afterExecute(runnable, th);\n }", "public void testThread() {\n ExecutorService executor = Executors.newSingleThreadExecutor();\n // result of the thread\n Future<String> future = null;\n\n future = executor.submit(new TestTask());\n try {\n String result = future.get(2000, TimeUnit.MILLISECONDS);\n System.out.println(result);\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (ExecutionException e) {\n e.printStackTrace();\n } catch (TimeoutException e) {\n System.out.println(\"the execution was terminated after 5 s\");\n boolean cancelled = future.cancel(true);\n System.out.println(cancelled);\n\n\n }\n\n try {\n System.out.println(\"attempt to shutdown executor\");\n executor.shutdown();\n executor.awaitTermination(5, TimeUnit.SECONDS);\n }\n catch (InterruptedException e) {\n System.err.println(\"tasks interrupted\");\n }\n finally {\n if (!executor.isTerminated()) {\n System.err.println(\"cancel non-finished tasks\");\n }\n executor.shutdownNow();\n System.out.println(\"shutdown finished\");\n }\n\n }" ]
[ "0.67577577", "0.60412526", "0.58513635", "0.57576454", "0.5721326", "0.5686809", "0.56752783", "0.56066537", "0.55408895", "0.54884905", "0.5431239", "0.54281336", "0.5395267", "0.53628284", "0.5361915", "0.534412", "0.5341606", "0.53317547", "0.5323514", "0.52879894", "0.52768636", "0.5240724", "0.52350223", "0.5232069", "0.5209911", "0.5208565", "0.52054226", "0.51956034", "0.51940566", "0.5193928", "0.51931125", "0.5160007", "0.5158997", "0.51561326", "0.51450044", "0.51441085", "0.51356846", "0.51173216", "0.5116789", "0.5114587", "0.5101515", "0.51002306", "0.5078682", "0.50779444", "0.50658804", "0.5058409", "0.50520325", "0.5048901", "0.50398475", "0.50393045", "0.5032892", "0.5018129", "0.50084466", "0.5001378", "0.49971077", "0.49837345", "0.49829838", "0.49780682", "0.4968922", "0.49591848", "0.49588716", "0.49587348", "0.49587348", "0.4954464", "0.49487257", "0.4936948", "0.49348992", "0.49337265", "0.49205753", "0.49191436", "0.49175906", "0.49170706", "0.49142846", "0.49139467", "0.49122623", "0.49082696", "0.4902497", "0.49008787", "0.489963", "0.48959196", "0.48878002", "0.48866254", "0.488542", "0.48761985", "0.48716715", "0.48652515", "0.4863533", "0.4862463", "0.4861547", "0.48610616", "0.4857456", "0.48573238", "0.48572865", "0.4856931", "0.48569044", "0.48569044", "0.48569044", "0.48569044", "0.48548126", "0.48545074" ]
0.5414489
12
The DomQuery path relative from the recordelement to the element that contains a record identifier value.
public String getIdPath() { if (null != this.idPath) { return this.idPath; } ValueExpression _ve = getValueExpression("idPath"); if (_ve != null) { return (String) _ve.getValue(getFacesContext().getELContext()); } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getXpath() { \n\t\treturn getXpathElement().getValue();\n\t}", "public StringDt getPathElement() { \n\t\tif (myPath == null) {\n\t\t\tmyPath = new StringDt();\n\t\t}\n\t\treturn myPath;\n\t}", "java.lang.String getXpath();", "public StringDt getXpathElement() { \n\t\tif (myXpath == null) {\n\t\t\tmyXpath = new StringDt();\n\t\t}\n\t\treturn myXpath;\n\t}", "public String getXPath() {\n\t\treturn this.builder.toString();\n\t}", "public String getPath() { \n\t\treturn getPathElement().getValue();\n\t}", "public String getXPath();", "public String getMatchingElementXPath()\n\t{\n\t\treturn this.matchingElementXPath;\n\t}", "String getXPath();", "public static String nodePath(Node n)\n {\n // abort early\n if (null == n)\n return null;\n\n // declarations\n Node parent = null;\n Stack<Node> hierarchy = new Stack<Node>();\n StringBuffer buffer = new StringBuffer('/');\n\n // push element on stack\n hierarchy.push(n);\n\n switch (n.getNodeType()) {\n case Node.ATTRIBUTE_NODE:\n parent = ((Attr) n).getOwnerElement();\n break;\n case Node.COMMENT_NODE:\n case Node.ELEMENT_NODE:\n case Node.DOCUMENT_NODE:\n parent = n.getParentNode();\n break;\n default:\n throw new IllegalStateException(\"Unexpected Node type\" + n.getNodeType());\n }\n\n while (null != parent && parent.getNodeType() != Node.DOCUMENT_NODE) {\n // push on stack\n hierarchy.push(parent);\n\n // get parent of parent\n parent = parent.getParentNode();\n }\n\n // construct xpath\n Object obj = null;\n while (!hierarchy.isEmpty() && null != (obj = hierarchy.pop())) {\n Node node = (Node) obj;\n boolean handled = false;\n\n if (node.getNodeType() == Node.ELEMENT_NODE)\n {\n Element e = (Element) node;\n\n // is this the root element?\n if (buffer.length() == 1)\n {\n // root element - simply append element name\n buffer.append(node.getNodeName());\n }\n else\n {\n // child element - append slash and element name\n buffer.append(\"/\");\n buffer.append(node.getNodeName());\n\n if (node.hasAttributes())\n {\n // see if the element has a name or id attribute\n if (e.hasAttribute(\"id\"))\n {\n // id attribute found - use that\n buffer.append(\"[@id='\" + e.getAttribute(\"id\") + \"']\");\n handled = true;\n }\n else if (e.hasAttribute(\"name\"))\n {\n // name attribute found - use that\n buffer.append(\"[@name='\" + e.getAttribute(\"name\") + \"']\");\n handled = true;\n }\n }\n\n if (!handled)\n {\n // no known attribute we could use - get sibling index\n int prev_siblings = 1;\n Node prev_sibling = node.getPreviousSibling();\n while (null != prev_sibling)\n {\n if (prev_sibling.getNodeType() == node.getNodeType())\n {\n if (prev_sibling.getNodeName().equalsIgnoreCase(\n node.getNodeName()))\n {\n prev_siblings++;\n }\n }\n prev_sibling = prev_sibling.getPreviousSibling();\n }\n buffer.append(\"[\" + prev_siblings + \"]\");\n }\n }\n }\n else if (node.getNodeType() == Node.ATTRIBUTE_NODE)\n {\n buffer.append(\"/@\");\n buffer.append(node.getNodeName());\n }\n }\n // return buffer\n return buffer.toString();\n }", "public String getPath() throws Exception {\n\t\t/*\n\t\t * return \"/news-oppsRecord\" + doc.selectSingleNode\n\t\t * (\"/metadataFieldInfo/field/@path\").getText();\n\t\t */\n\t\treturn doc.selectSingleNode(\"/metadataFieldInfo/field/@path\").getText();\n\t}", "org.apache.xmlbeans.impl.xb.xsdschema.SelectorDocument.Selector.Xpath xgetXpath();", "java.lang.String getQueryId();", "public String getXPath() {\n return xPathStr;\n }", "public XPathExpr getXPathExpr()\n {try{__CLR4_0_68g8gl1l0dv4j.R.inc(311);\n __CLR4_0_68g8gl1l0dv4j.R.inc(312);return getXPathExpr( true );\n }finally{__CLR4_0_68g8gl1l0dv4j.R.flushNeeded();}}", "protected void deriveMatchingElementXPath()\n\t{\n\t\tString pcXPath = getParentContainerXPath();\n\t\tString base = pcXPath.substring(0, pcXPath.indexOf(\"[\"));\n\t\t\n\t\tStringBuffer sb = new StringBuffer();\n\t\tsb.append(base);\n\t\tsb.append(\"[\");\n\t\t\n\t\tif (getAttributeMatchExpression().equals(TaskExprType.STARTS_WITH))\n\t\t{\n\t\t\tsb.append(\"starts-with(\");\n\t\t}\n\t\telse if (getAttributeMatchExpression().equals(TaskExprType.CONTAINS))\n\t\t{\n\t\t\tsb.append(\"contains(\");\n\t\t}\n\n\t\tsb.append(getMatchingAttributeName());\n\t\tsb.append(\",'\");\n\t\tsb.append(getMatchingAttributeValue());\n\t\tsb.append(\"')]\");\n\t\t\n\t\t/*\n\t\t * Should look like this:\n\t\t * setMatchingElementXPath(\"//body/div/div[starts-with(@class,'Heading1')]\");\n\t\t */\n\t\tsetMatchingElementXPath(sb.toString());\n\t}", "public String getElementId();", "public final int[] xmlPath ()\r\n {\r\n return _value.path();\r\n }", "public final String attributeNameRef ()\r\n {\r\n return _value.xmlTreePath().attribute();\r\n }", "public String getRecordPath() {\n return recordPath;\n }", "private String getElementRefExt(Node elementRefNode, XmlProcessor simpleXmlProcessor)\n\t\t\tthrows XPathExpressionException {\n\t\tString extension = \"\";\n\t\tif (elementRefNode.hasChildNodes()) {\n\t\t\tNode childNode = elementRefNode.getFirstChild();\n\t\t\tif (\"attribute\".equals(childNode.getNodeName())) {\n\t\t\t\textension = childNode.getAttributes().getNamedItem(ATTR_UUID).getNodeValue();\n\t\t\t}\n\t\t} else {\n\t\t\tString id = elementRefNode.getAttributes().getNamedItem(ID).getNodeValue();\n\t\t\tNode qdmNode = simpleXmlProcessor.findNode(simpleXmlProcessor.getOriginalDoc(),\n\t\t\t\t\t\"/measure/elementLookUp/qdm[@uuid='\" + id + \"']\");\n\t\t\tif (qdmNode != null) {\n\t\t\t\tString dataType = qdmNode.getAttributes().getNamedItem(DATATYPE).getNodeValue();\n\t\t\t\tString qdmName = qdmNode.getAttributes().getNamedItem(NAME).getNodeValue();\n\t\t\t\textension = qdmName + \"_\" + dataType;\n\t\t\t\tif (qdmNode.getAttributes().getNamedItem(INSTANCE) != null) {\n\t\t\t\t\textension = qdmNode.getAttributes().getNamedItem(INSTANCE).getNodeValue() + \"_\" + extension;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn StringUtils.deleteWhitespace(extension);\n\t}", "public String getProductURLXPath();", "public String nodePath() {\r\n String path;\r\n if (this.parent == null) {\r\n path = \"(\" + this.nodeType + \"|\" + this.dataType + \"|\" + this.data + \")\";\r\n } else {\r\n path = this.parent.nodePath() + \" (\" + this.nodeType + \"|\" + this.dataType + \"|\" + this.data + \")\";\r\n }\r\n return path;\r\n }", "public RelativePathExpr getRelativePath() {\r\n\t\treturn this.relativePathExpr;\r\n\t}", "public MedicalRecordDO[] getMedicalRecordPath(Integer uid);", "public String getXPath() {\n/* 114 */ return this.xPath;\n/* */ }", "public String toLocalPath() {\n\n String parentPath = parent.toLocalPath();\n return StringUtils.isBlank(parentPath)\n ? element.getElement()\n : new StringBuilder()\n .append(parentPath)\n .append('.')\n .append(element.getElement())\n .toString();\n }", "private String getFieldUsingXPath(String xpathQuery) {\n\t\tif (logger.isLoggable(Level.FINEST)) {\n\t\t\tlogger.entering(sourceClass, \"getFieldUsingXPath\");\n\t\t}\n\t\tString result = null;\n\t\ttry {\n\t\t\tresult = DOMUtil.value(this.data, xpathQuery, NamespacesConnections.nameSpaceCtx);\n\t\t} catch (XMLException e) {\n\t\t\tlogger.log(Level.SEVERE, Messages.MessageGenericError + \"getFieldUsingXPath\");\n\t\t}\n\t\tif (logger.isLoggable(Level.FINEST)) {\n\t\t\tlogger.exiting(sourceClass, \"getFieldUsingXPath\");\n\t\t}\n\t\treturn result;\n\t}", "protected String getQueryIdentifier() {\n \t\treturn null;\n \t}", "public String getPathExpression() {\n return getProperty(PATH_EXPRESSION);\n }", "public String getElementReferenceIdentifier() {\n return this.toString();\n }", "public String getPath()\n {\n StringBuilder buff = new StringBuilder();\n Resource r = this;\n while(r != null)\n {\n if(r.getId() != 1)\n {\n buff.insert(0, r.getName());\n }\n r = r.getParent();\n if(r != null || this.getId() == 1)\n {\n buff.insert(0, '/');\n }\n }\n return buff.toString();\n }", "public java.lang.String getRefID()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(REFID$4, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public String getHierarchicalPath() {\r\n \t\tStringBuilder builder = new StringBuilder();\r\n \t\tfor (String id : hierarchicalId) {\r\n \t\t\tbuilder.append('/');\r\n \t\t\tbuilder.append(id);\r\n \t\t}\r\n \r\n \t\treturn builder.toString();\r\n \t}", "@PublicAtsApi\n public String getRootElementXPath() {\n\n return this.root.getUniquePath();\n }", "public String getQueryKey()\n {\n if (getPrimaryKey() == null)\n {\n return \"\";\n }\n else\n {\n return getPrimaryKey().toString();\n }\n }", "public String getElementId() {\n return elementId;\n }", "public String getXMLquery() {\n return localQuerytool.getXML();\n }", "org.apache.drill.exec.proto.UserBitShared.QueryId getQueryId();", "org.apache.drill.exec.proto.UserBitShared.QueryId getQueryId();", "public String getPath()\n {\n \tif (_nodeVRL==null)\n \t\treturn null;\n \t\n return _nodeVRL.getPath();\n }", "public org.apache.xmlbeans.XmlString xgetRefID()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(REFID$4, 0);\n return target;\n }\n }", "public String toString() {\n String id = element.getAttributeNS(null, \"id\");\n return element.getTagName() + (id.equals(\"\") ? \"\" : \"#\" + id) + \".\"\n + (attributeNamespaceURI == null || attributeNamespaceURI.equals(\"\") ? \"\" : attributeNamespaceURI + \":\")\n + attributeLocalName + \" = \" + expression;\n }", "public String getStringID() {\r\n\t\treturn uri.getPath();\r\n\t}", "Elem getQualifiedElem();", "private String getOffsetRecordId() throws Exception {\n String id = null;\n Iterable<String> rids = datasource.getRecordids();\n int itCount = 0;\n boolean startFound = false;\n for (String rid : rids) {\n if (rid.equals(recordid)) {\n startFound = true;\n }\n if (startFound) {\n itCount++;\n if (itCount >= iteration) {\n id = rid;\n break;\n }\n }\n }\n if (id == null) {\n throw new Exception(\"No offset record id found\");\n }\n return id;\n }", "public String getPath() \r\n\t{\r\n\t\tStringBuilder pathBuilder = new StringBuilder();\r\n\t\tfor(Cell c: path)\r\n\t\t\tpathBuilder.append(\" (\" + c.getRow() + ',' + c.getColumn() + ')');\r\n\t\t\r\n\t\treturn pathBuilder.toString();\r\n\t}", "public String getPath() {\n\t\treturn getString(\"path\");\n\t}", "public String getBindingItemIdPath(){\n return pathBindingSetItemId;\n }", "public java.lang.String getIdentifier()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(IDENTIFIER$0, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "private static String sEnterSelectRootXpath(String sWhichField) {\n\t\tString sReturn = \"unset\"; \n\t\tswitch (sWhichField) {\n\t\tcase \"Content Type\": //content type on the create content modal\n\t\t\tsReturn = \"//*[text()[contains(.,\\\"\" + sWhichField + \"\\\")]]/ancestor::mat-form-field\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tsReturn = \"//*[text()[contains(.,\\\"\" + sWhichField + \"\\\")]]/ancestor::iti-form-field\";\t\t\t\n\t\t}\n\t\t\n\t\treturn sReturn;\n\t}", "@DialogField(fieldLabel = \"Property Relative Path\",\n fieldDescription = \"Relative path from nodes being searched to the node where their tag property is stored. For example, if searching for dam:Assets, you would set this field to 'jcr:content/metadata'. Leave blank to search for tags on result nodes themselves.\")\n @TextField\n public Optional<String> getRelativePath() {\n return get(PARAM_RELATIVE_PATH, String.class);\n }", "ELEMENTIDENTIFIER getIdentifier();", "private String getPathToMetricsResults() {\n\t\treturn pathToMetricsResults.getText();\n\t}", "public String getQuery()\n\t{\n\t\tVRL loc=getLocation();\n\t\t\n\t\tif (loc==null)\n\t\t\treturn null;\n\t\t\n\t\treturn loc.getQuery();\n\t}", "public int getQueryId();", "public static WebElement getObject(String xpathKey){\n\t\tString strXpath = xpathKey;\n\t\t\n\t\tif(strXpath.startsWith(\"//\")){\n\t\t\t\n\t\t\treturn driver.findElement(By.xpath((xpathKey).trim()));\n\t\t\n\t\t}else{\n\t\t\t\n\t\t\treturn driver.findElement(By.id((xpathKey).trim()));\n\t\t}\n\t}", "public String getRelPath () throws java.io.IOException, com.linar.jintegra.AutomationException;", "String getElementNameById(Integer elementId);", "public String getQualifiedName() {\n if (probe.getHost() != null) {\n return probe.getHost().getName() + \"/\" + getName();\n } else {\n return \"/\" + getName();\n }\n }", "public ElementDefinitionDt setPath(StringDt theValue) {\n\t\tmyPath = theValue;\n\t\treturn this;\n\t}", "public String getSearchPath() {\n String path = null;\n if (parent != null) {\n path = parent.getSearchPath();\n path = String.format(\"%s/%s\", path, name);\n } else {\n path = String.format(\"%s\", name);\n }\n return path;\n }", "Object getElementID(String elementName) throws Exception;", "String getChildId();", "public String getRecordId() {\n return recordId;\n }", "public String getIdNode() {\r\n String idNode = null;\r\n idNode = this.getParam(ESCOConstantes.ID_NODE);\r\n // Add the root element if not present\r\n if (null != idNode && !idNode.startsWith(ESCOConstantes.STEM_NAME_SEPARATOR)) {\r\n idNode = ESCOConstantes.STEM_NAME_SEPARATOR + idNode;\r\n }\r\n\r\n return idNode;\r\n }", "public jkt.hrms.masters.business.PrjQueryEntry getQueryEntry () {\n\t\treturn queryEntry;\n\t}", "private WebElement getXpath(String xpathInfo) {\n\t\tWebElement element = null;\n\t\t// WebDriverWait wait = new WebDriverWait(driver, 60);\n\t\telement = SearchTest.wait.until(visibilityOfElementLocated(By.xpath(xpathInfo)));\n\t\treturn element;\n\t}", "protected String getQueryAttributeValue(XDIMEContextInternal context, \n XDIMEAttributes attributes) throws XDIMEException {\n String query = attributes.getValue(\"\",\"query\");\n \n if (query != null) {\n query = rewriteURLWithPageURLRewriter(context, query, PageURLType.WIDGET);\n }\n \n return query;\n }", "public String getELEMENT_ID() {\r\n return ELEMENT_ID;\r\n }", "@Override\r\n\tprotected String getPath() {\n\t\treturn \"/product/detail.do?param=\";\r\n\t}", "protected Identifier parseDatasetIdentifier( Element element, String xPathQuery )\n throws XMLParsingException,\n InvalidCapabilitiesException {\n\n Element identifierElement = (Element) XMLTools.getRequiredNode( element, xPathQuery, nsContext );\n\n String value = XMLTools.getStringValue( identifierElement ).trim();\n if ( \"\".equals( value ) ) {\n throw new InvalidCapabilitiesException( Messages.getMessage( \"WPVS_NO_VALID_IDENTIFIER\", \"dataset\" ) );\n }\n URI codeSpace = XMLTools.getNodeAsURI( identifierElement, \"@codeSpace\", nsContext, null );\n Identifier id = new Identifier( value, codeSpace );\n if ( datasetIdentifiers.contains( id.toString() ) ) {\n throw new InvalidCapabilitiesException( Messages.getMessage( \"WPVS_NO_UNIQUE_IDENTIFIER\",\n \"datasets\",\n id.toString() ) );\n\n }\n datasetIdentifiers.add( id.toString() );\n\n return id;\n }", "public String getQualifiedName() {\n if(probe.getHost() != null) {\n return probe.getHost().getName() + \"/\" + getName();\n } else {\n return \"/\" + getName();\n }\n }", "private Node generateElementRefHQMF(Node elementRefNode, Node parentNode, String clauseName)\n\t\t\tthrows XPathExpressionException {\n\t\tXmlProcessor hqmfXmlProcessor = measureExport.getHQMFXmlProcessor();\n\t\tNode node = null;\n\t\tString ext = getElementRefExt(elementRefNode, measureExport.getSimpleXMLProcessor());\n\t\tString root = elementRefNode.getAttributes().getNamedItem(ID).getNodeValue();\n\t\tString localVariableName = clauseName;\n\t\tNode idNodeQDM = hqmfXmlProcessor.findNode(hqmfXmlProcessor.getOriginalDoc(),\n\t\t\t\t\"//entry/*/id[@root='\" + root + \"'][@extension=\\\"\" + ext + \"\\\"]\");\n\t\tif (idNodeQDM != null) {\n\t\t\tNode entryElem = idNodeQDM.getParentNode().getParentNode().cloneNode(true);\n\t\t\tNode newIdNode = getTagFromEntry(entryElem, ID);\n\n\t\t\tif (newIdNode == null) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tString idroot = \"0\";\n\t\t\tNode parNode = elementRefNode.getParentNode();\n\t\t\tif (parNode != null && SUB_TREE.equals(parNode.getNodeName())) {\n\t\t\t\tidroot = parNode.getAttributes().getNamedItem(UUID).getNodeValue();\n\t\t\t\t// Added logic to show qdm_variable in extension if clause is of qdm variable\n\t\t\t\t// type.\n\t\t\t\tString isQdmVariable = parNode.getAttributes().getNamedItem(QDM_VARIABLE).getNodeValue();\n\t\t\t\tif (isQdmVariable.equalsIgnoreCase(TRUE)) {\n\t\t\t\t\tString occText = null;\n\t\t\t\t\t// Handled Occurrence Of QDM Variable.\n\t\t\t\t\tif (parNode.getAttributes().getNamedItem(INSTANCE_OF) != null) {\n\t\t\t\t\t\toccText = \"occ\" + parNode.getAttributes().getNamedItem(INSTANCE).getNodeValue() + \"of_\";\n\t\t\t\t\t}\n\t\t\t\t\tif (occText != null) {\n\t\t\t\t\t\text = occText + \"qdm_var_\" + ext;\n\t\t\t\t\t} else {\n\t\t\t\t\t\text = \"qdm_var_\" + ext;\n\t\t\t\t\t\tlocalVariableName = \"qdm_var_\" + localVariableName;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlocalVariableName = localVariableName + \"_\" + UUIDUtilClient.uuid(5);\n\t\t\t\tlocalVariableName = StringUtils.deleteWhitespace(localVariableName);\n\t\t\t\t((Element) newIdNode).setAttribute(ROOT, idroot);\n\t\t\t\t((Element) newIdNode).setAttribute(EXTENSION, ext);\n\t\t\t\tNode localVariableNode = entryElem.getFirstChild();\n\t\t\t\tif (localVariableNode.getAttributes().getNamedItem(\"value\") != null) {\n\t\t\t\t\tlocalVariableNode.getAttributes().getNamedItem(\"value\").setNodeValue(localVariableName);\n\t\t\t\t}\n\n\t\t\t\tparentNode.appendChild(entryElem);\n\t\t\t\tnode = entryElem;\n\t\t\t} else {\n\t\t\t\t// if the the parentNode for ElementRef is other than SubTreeNode\n\t\t\t\tElement excerptElement = null;\n\t\t\t\tNode subTreeParentNode = checkIfSubTree(parNode);\n\t\t\t\tif (subTreeParentNode != null) {\n\t\t\t\t\troot = subTreeParentNode.getAttributes().getNamedItem(UUID).getNodeValue();\n\t\t\t\t\tif (subTreeParentNode.getAttributes().getNamedItem(QDM_VARIABLE) != null) {\n\t\t\t\t\t\tString isQdmVariable = subTreeParentNode.getAttributes().getNamedItem(QDM_VARIABLE)\n\t\t\t\t\t\t\t\t.getNodeValue();\n\t\t\t\t\t\tif (TRUE.equalsIgnoreCase(isQdmVariable)) {\n\t\t\t\t\t\t\tString occText = null;\n\t\t\t\t\t\t\t// Handled Occurrence Of QDM Variable.\n\t\t\t\t\t\t\tif (subTreeParentNode.getAttributes().getNamedItem(INSTANCE_OF) != null) {\n\t\t\t\t\t\t\t\toccText = \"occ\"\n\t\t\t\t\t\t\t\t\t\t+ subTreeParentNode.getAttributes().getNamedItem(\"instance\").getNodeValue()\n\t\t\t\t\t\t\t\t\t\t+ \"of_\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (occText != null) {\n\t\t\t\t\t\t\t\text = occText + \"qdm_var_\" + ext;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\text = \"qdm_var_\" + ext;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\troot = UUIDUtilClient.uuid();\n\t\t\t\t}\n\n\t\t\t\tNode entryNodeForElementRef = idNodeQDM.getParentNode().getParentNode();\n\t\t\t\tNode clonedEntryNodeForElementRef = entryNodeForElementRef.cloneNode(true);\n\t\t\t\tNodeList idChildNodeList = ((Element) clonedEntryNodeForElementRef).getElementsByTagName(ID);\n\t\t\t\tif (idChildNodeList != null && idChildNodeList.getLength() > 0) {\n\t\t\t\t\tNode idChildNode = idChildNodeList.item(0);\n\t\t\t\t\tidChildNode.getAttributes().getNamedItem(EXTENSION).setNodeValue(ext);\n\t\t\t\t\tidChildNode.getAttributes().getNamedItem(ROOT).setNodeValue(root);\n\t\t\t\t}\n\n\t\t\t\tNode firstChild = clonedEntryNodeForElementRef.getFirstChild();\n\t\t\t\tif (LOCAL_VARIABLE_NAME.equals(firstChild.getNodeName())) {\n\t\t\t\t\tfirstChild = firstChild.getNextSibling();\n\t\t\t\t}\n\t\t\t\t// Added logic to show qdm_variable in extension if clause is of qdm variable\n\t\t\t\t// type.\n\t\t\t\tif (FUNCTIONAL_OP.equals(parNode.getNodeName())) {\n\t\t\t\t\texcerptElement = generateExcerptEntryForFunctionalNode(parNode, elementRefNode, hqmfXmlProcessor,\n\t\t\t\t\t\t\tclonedEntryNodeForElementRef);\n\t\t\t\t}\n\n\t\t\t\tif (excerptElement != null) {\n\t\t\t\t\n\t\t\t\t\tfirstChild.appendChild(excerptElement);\n\t\t\t\t}\n\t\t\t\tparentNode.appendChild(clonedEntryNodeForElementRef);\n\t\t\t\tnode = clonedEntryNodeForElementRef;\n\n\t\t\t}\n\t\t\tupdateLocalVar(node, ext);\n\t\t}\n\n\t\treturn node;\n\t}", "protected abstract int[] getPathElements();", "public String getDocumentRootXPath()\n\t{\n\t\treturn this.documentRootXPath;\n\t}", "public String getPath() {\n \tStringBuilder path = new StringBuilder();\n \tint s = this.getSelectedIndex();\n \tif (s <= 0 ) s = 0;\n \tJPiereIADTabpanel p = tabPanelList.get(s);\n \tfor (int i = 0; i <= s; i++) {\n \t\tString n = null;\n \t\tif (i == s)\n \t\t\tn = p.getTitle();\n \t\telse {\n \t\t\tJPiereIADTabpanel t = tabPanelList.get(i);\n \t\t\tif (t.getTabLevel() < p.getTabLevel())\n \t\t\t\tn = t.getTitle();\n \t\t}\n \t\tif (n != null) {\n \t\t\tif (path.length() > 0) {\n \t\t\t\tpath.append(\" > \");\n \t\t\t}\n \t\t\tpath.append(n);\n \t\t}\n \t}\n\n \treturn path.toString();\n }", "public String dependencyByScreenElementId()\r\n {\r\n try\r\n {\r\n\t if(!NumberUtil.isEmptyDecimal(dynamicScreenCO.getScreenIdValue())\r\n\t\t && !NumberUtil.isEmptyDecimal(dynamicScreenCO.getElementIdValue()))\r\n\t {\r\n\t SessionCO sessionCO = returnSessionObject();\r\n\t DynCommonLookupSC criteria = new DynCommonLookupSC();\r\n\t criteria.setElementId(dynamicScreenCO.getElementIdValue());\r\n\t criteria.setScreenId(dynamicScreenCO.getScreenIdValue());\r\n\t criteria.setLovTypeId(DynamicScreenConstant.LOV_ELEMENT_TYPE);\r\n\t criteria.setPreferredLanguage(sessionCO.getLanguage());\r\n\t dynamicScreenCO = dynamicScreenBO.dependencyByScreenElementId(criteria);\r\n\t }\r\n }\r\n catch(Exception ex)\r\n {\r\n\t dynamicScreenCO.setElementIdValue(null);\r\n\t handleException(ex,null,null);\r\n }\r\n NumberUtil.resetEmptyValues(dynamicScreenCO);\r\n return SUCCESS;\r\n }", "String getElementQName(Object element);", "org.apache.xmlbeans.XmlString xgetId();", "public UriDt getUrlElement() { \n\t\tif (myUrl == null) {\n\t\t\tmyUrl = new UriDt();\n\t\t}\n\t\treturn myUrl;\n\t}", "public UriDt getUrlElement() { \n\t\tif (myUrl == null) {\n\t\t\tmyUrl = new UriDt();\n\t\t}\n\t\treturn myUrl;\n\t}", "public UriDt getUrlElement() { \n\t\tif (myUrl == null) {\n\t\t\tmyUrl = new UriDt();\n\t\t}\n\t\treturn myUrl;\n\t}", "RelatingBuildingElementType getRelatingBuildingElement();", "public String getURI() {\n if (filePath == null) {\n return null;\n }\n int ind = filePath.lastIndexOf(\"/\");\n if (ind != -1) {\n //int ind2 = filePath.substring(0, ind-1).lastIndexOf(\"/\");\n //if (ind2 != -1)\n // return filePath.substring(ind2+1, filePath.length());\n return filePath.substring(ind+1, filePath.length());\n }\n\n return new File(filePath).getName();\n }", "public XPath getValue()\n {\n return m_valueExpr;\n }", "public String getAssocIdInExpr(String prefix);", "public java.lang.String getQedDfilename () {\n\t\treturn qedDfilename;\n\t}", "public DevicePath getDevicePath(Device device);", "public String getIdFromHrefValue(final String val) {\r\n String result = null;\r\n // FIXME it's no objid pattern\r\n Pattern PATTERN_OBJID_ATTRIBUTE = Pattern.compile(\".*\\\\/([^\\\"\\\\/]*)\");\r\n\r\n Matcher m1 = PATTERN_OBJID_ATTRIBUTE.matcher(val);\r\n if (m1.find()) {\r\n result = m1.group(1);\r\n }\r\n return result;\r\n }", "Object getElementById(Object contextNode, String elementId);", "public Record getComponentIdAndBaseId(Record record);", "String getIdNode2();", "public String getQualifiedId()\n {\n return null;\n }", "private String getRelativePath(Path reference, Path child) {\n String output;\n String sval = child.toString(); \n final int index = sval.indexOf(reference.toString());\n if(index != -1) {\n output = sval.substring(index);\n }else{\n output = null;\n }\nLog.getInstance().log(Level.FINER, \"Path: {0}, relative: {1}\", this.getClass(), child, output); \n return output;\n }", "public abstract XPathExpression getExpression();", "public final String getPath() {\n\t\treturn this.path.toString();\n\t}", "public Rule idExpr()\n \t{\n \t\treturn firstOf(idExprReq(), id());\n \t}", "protected String getXpath(String attribute) {\n\t\tString template = this.getClass().getAnnotation(Decoder.class).value().name();\n\t\treturn PathCorrelator.getXpath(template, attribute, defaultNs.getURI());\n\t}", "@XmlElement\n public String getErpRefId() {\n return erpRefId;\n }" ]
[ "0.59084386", "0.58214384", "0.58074903", "0.57114995", "0.5578162", "0.55265164", "0.5460741", "0.544423", "0.54314166", "0.5422687", "0.5422428", "0.5414134", "0.5337783", "0.533049", "0.5311801", "0.52659166", "0.5250176", "0.52352655", "0.5203987", "0.51854587", "0.512808", "0.5122692", "0.5109103", "0.5084389", "0.5083453", "0.5073744", "0.5071774", "0.5069961", "0.5024978", "0.50002813", "0.49884006", "0.4886101", "0.48747268", "0.48422852", "0.4824524", "0.48210716", "0.48031747", "0.47939673", "0.4778288", "0.4778288", "0.47756118", "0.4768513", "0.4742021", "0.4724418", "0.47138482", "0.47097015", "0.47037333", "0.4686976", "0.46843946", "0.46602458", "0.4642167", "0.4642146", "0.4631545", "0.46249348", "0.46187392", "0.4613929", "0.46106923", "0.46006814", "0.45935127", "0.45897716", "0.45737955", "0.456925", "0.45676017", "0.45662877", "0.45544234", "0.45502424", "0.45475057", "0.45444033", "0.45423567", "0.45374972", "0.45302945", "0.45226014", "0.4517923", "0.45087063", "0.4506368", "0.45057514", "0.45055613", "0.45051587", "0.4492712", "0.4479618", "0.44746006", "0.44746006", "0.44746006", "0.44640478", "0.4458736", "0.44570473", "0.44546577", "0.444946", "0.44447404", "0.4444554", "0.4444278", "0.4443857", "0.443601", "0.44298342", "0.4420224", "0.44195145", "0.44194052", "0.44148198", "0.44092107", "0.44032833" ]
0.59810317
0
Set the value of the idPath property.
public void setIdPath(String idPath) { this.idPath = idPath; this.handleConfig("idPath", idPath); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setPath(String path)\n {\n try\n {\n // Tokenize the path\n pathArray = getPathResolved(path);\n \n // Set path property\n this.path = path;\n }\n catch (NumberFormatException nfe)\n {\n // Reset path property\n this.path = \"\";\n }\n }", "public void setPath(int path){\n\t\tthis.path = path;\n\t}", "public final XmlAttributeInfo setXmlPath (int[] path)\r\n {\r\n _value.setPath(path);\r\n return this;\r\n }", "void setPath(String path);", "public void setPath(String path);", "@Override\r\n\tpublic void setId(final K id) {\n\t\tsuper.setId(id);\r\n\t}", "public void setId(java.lang.String value) {\n this.id = value;\n }", "public void setId(java.lang.String value) {\n this.id = value;\n }", "public void setId(java.lang.String value) {\n this.id = value;\n }", "public static void setPath (int equipID[]){\n\t\tfor (int i = 0; i < equipID.length; i++){\n\t\t\tpath[i] = Integer.toString(equipID[i]);\n\t\t}\n\t}", "public void setId(String id) {\n }", "public void setID(String s) {\r\n\t\tthis.idNode = s;\r\n\t}", "public void setId(Object id) {\n this.id = id;\n }", "public void setId(Object id) {\n this.id = id;\n }", "public void setPath(String path)\r\n/* 21: */ {\r\n/* 22:53 */ this.path = path;\r\n/* 23: */ }", "private void setID(gw.pl.persistence.core.Key value) {\n __getInternalInterface().setFieldValue(ID_PROP.get(), value);\n }", "private void setID(gw.pl.persistence.core.Key value) {\n __getInternalInterface().setFieldValue(ID_PROP.get(), value);\n }", "private void setID(gw.pl.persistence.core.Key value) {\n __getInternalInterface().setFieldValue(ID_PROP.get(), value);\n }", "public void setID(String value) {\r\n \t\t_id = value;\r\n \r\n \t}", "public void setIdDireccion(String idDireccion) {\r\n\t\tthis.idDireccion = idDireccion;\r\n\t}", "@Override\r\n\tpublic void setId(String id) {\n\t\t\r\n\t}", "public void setId(String id) {\r\n\t\tsId = id;\r\n\t}", "private void setId(int value) {\n \n id_ = value;\n }", "public void setId(String value) {\n \tif (value==null)\n \t\tthis.id = \"\";\n \telse\n \t\tthis.id = value;\n }", "@Override\n void setPath(String sessionId, String path) {\n if (sessionsInfoManager.getPath(sessionId).isEmpty())\n {\n sessionsInfoManager.setPath(sessionId, path);\n }\n }", "@Override\r\n\t\tpublic void setId(String id)\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}", "public void setPath(Path path) {\n this.path = path;\n }", "void setId(java.lang.String id);", "final public void setId(int idp) {\n\t\tid = idp;\n\t\tidSet = true;\n\t}", "@JsProperty(name = \"id\")\n public native void setId(String value);", "public void setId (String id)\n {\n _id = id;\n }", "public void setID(gw.pl.persistence.core.Key value) {\n __getInternalInterface().setFieldValue(ID_PROP.get(), value);\n }", "public void setID(gw.pl.persistence.core.Key value) {\n __getInternalInterface().setFieldValue(ID_PROP.get(), value);\n }", "public void setID(gw.pl.persistence.core.Key value) {\n __getInternalInterface().setFieldValue(ID_PROP.get(), value);\n }", "public void setId(String value) {\n setAttributeInternal(ID, value);\n }", "public void setId(String value) {\n setAttributeInternal(ID, value);\n }", "public void setId(ID id)\n {\n this.id = id;\n }", "public void setId(ID id){\r\n\t\tthis.id = id;\r\n\t}", "public final native void setId(int id) /*-{\n\t\tthis.id = id;\n\t}-*/;", "private void setId(int value) {\n \n id_ = value;\n }", "public void setId(String id) {\n this.ide = id;\n //System.out.println(\"linkyhandler setid \" + ide);\n }", "public void setId(String id)\r\n/* 19: */ {\r\n/* 20:17 */ this.id = id;\r\n/* 21: */ }", "public void setId(int value) {\r\n this.id = value;\r\n }", "public void setId(String id);", "public void setId(String id);", "public void setId(String id) {\n\t\t_id = id;\n\t}", "@Override\r\n\tpublic void setID(String id) {\n\t\tsuper.id=id;\r\n\t}", "@Override\r\n\tpublic void setId(String id) {\n\t\tthis.id = id;\r\n\t}", "public void addPathId(long id) {\n synchronized (pathsToBeTraversed) {\n pathsToBeTraversed.add(id);\n }\n }", "void setId(String id);", "void setId(String id);", "void setId(String id);", "public void setId (String id);", "public void setId(final String id);", "public void setId(final String id);", "void setID(java.lang.String id);", "public void setId(String id){\r\n\t\tthis.id = id;\r\n\t}", "@Override\n\tpublic void setId(String id)\n\t{\n\t\t\n\t}", "public void setId(String id) {\r\n this.id = id;\r\n }", "public void setId( String id ) {\n\t\t_id = id;\n\t}", "public void setId(String id) {\n _id = id;\n }", "public void setId(String id) {\r\n this.id = id;\r\n }", "public void setId(String id) {\r\n \t\tthis.id = id;\r\n \t}", "public void setId(String id)\n\t{\n\t\tm_sID=id;\t\n\t}", "@Override\n\tpublic void setId(String id) {\n\t\tthis.id = id;\n\t}", "public void setPath(String path){\n mPath = path;\n }", "public void setId(String id)\n {\n this.id = id;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "@Override\n public void setId(int pintId) {\n this.intDynaGraphId = pintId;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(String id) {\n this.id = id;\n }", "void setId(final String id);", "public void setId (String id) {\n this.id = id;\n }", "public void setId (String id) {\n this.id = id;\n }", "public void setId (String id) {\n this.id = id;\n }", "public void setID(int value) {\n this.id = value;\n }", "public void setId(String id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(String id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(String id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(String id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }" ]
[ "0.6722523", "0.6698633", "0.65574396", "0.6483086", "0.6422922", "0.6299272", "0.6283867", "0.6283867", "0.6283867", "0.6282176", "0.6267779", "0.6254481", "0.62485975", "0.62485975", "0.62421954", "0.6235351", "0.6235351", "0.6235351", "0.6231369", "0.62262", "0.6216508", "0.62149954", "0.6204975", "0.61830777", "0.61792856", "0.6175873", "0.61686534", "0.61644024", "0.6159097", "0.6158809", "0.6158797", "0.61552405", "0.61552405", "0.61552405", "0.61497986", "0.61497986", "0.6149005", "0.61489147", "0.61472696", "0.61409855", "0.613798", "0.61274385", "0.61250097", "0.61199254", "0.61199254", "0.611861", "0.61146003", "0.6113104", "0.6108859", "0.6102547", "0.6102547", "0.6102547", "0.61011636", "0.6098577", "0.6098577", "0.60985446", "0.60981226", "0.60977626", "0.60897106", "0.60819846", "0.6081058", "0.6069942", "0.60646784", "0.6060181", "0.6058447", "0.6055907", "0.60542244", "0.6054056", "0.6054056", "0.6054056", "0.6054056", "0.6054056", "0.6054056", "0.6054056", "0.6054056", "0.6054056", "0.6049109", "0.60408944", "0.60408944", "0.60408944", "0.60408944", "0.60408944", "0.60408944", "0.60408944", "0.60394984", "0.60375655", "0.60238636", "0.602352", "0.602352", "0.6022446", "0.6018538", "0.6015711", "0.6015711", "0.6015711", "0.6015711", "0.60153043", "0.60153043", "0.60153043", "0.60153043", "0.60153043" ]
0.85469705
0
The DomQuery path to the repeated element whichcontains record information.
public String getRecord() { if (null != this.record) { return this.record; } ValueExpression _ve = getValueExpression("record"); if (_ve != null) { return (String) _ve.getValue(getFacesContext().getELContext()); } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public StringDt getPathElement() { \n\t\tif (myPath == null) {\n\t\t\tmyPath = new StringDt();\n\t\t}\n\t\treturn myPath;\n\t}", "public String getPath() throws Exception {\n\t\t/*\n\t\t * return \"/news-oppsRecord\" + doc.selectSingleNode\n\t\t * (\"/metadataFieldInfo/field/@path\").getText();\n\t\t */\n\t\treturn doc.selectSingleNode(\"/metadataFieldInfo/field/@path\").getText();\n\t}", "public String getXpath() { \n\t\treturn getXpathElement().getValue();\n\t}", "public StringDt getXpathElement() { \n\t\tif (myXpath == null) {\n\t\t\tmyXpath = new StringDt();\n\t\t}\n\t\treturn myXpath;\n\t}", "public String getPath() { \n\t\treturn getPathElement().getValue();\n\t}", "public String getXPath() {\n\t\treturn this.builder.toString();\n\t}", "protected void deriveMatchingElementXPath()\n\t{\n\t\tString pcXPath = getParentContainerXPath();\n\t\tString base = pcXPath.substring(0, pcXPath.indexOf(\"[\"));\n\t\t\n\t\tStringBuffer sb = new StringBuffer();\n\t\tsb.append(base);\n\t\tsb.append(\"[\");\n\t\t\n\t\tif (getAttributeMatchExpression().equals(TaskExprType.STARTS_WITH))\n\t\t{\n\t\t\tsb.append(\"starts-with(\");\n\t\t}\n\t\telse if (getAttributeMatchExpression().equals(TaskExprType.CONTAINS))\n\t\t{\n\t\t\tsb.append(\"contains(\");\n\t\t}\n\n\t\tsb.append(getMatchingAttributeName());\n\t\tsb.append(\",'\");\n\t\tsb.append(getMatchingAttributeValue());\n\t\tsb.append(\"')]\");\n\t\t\n\t\t/*\n\t\t * Should look like this:\n\t\t * setMatchingElementXPath(\"//body/div/div[starts-with(@class,'Heading1')]\");\n\t\t */\n\t\tsetMatchingElementXPath(sb.toString());\n\t}", "public String getElementId();", "java.lang.String getXpath();", "public String getMatchingElementXPath()\n\t{\n\t\treturn this.matchingElementXPath;\n\t}", "public UriDt getUrlElement() { \n\t\tif (myUrl == null) {\n\t\t\tmyUrl = new UriDt();\n\t\t}\n\t\treturn myUrl;\n\t}", "public UriDt getUrlElement() { \n\t\tif (myUrl == null) {\n\t\t\tmyUrl = new UriDt();\n\t\t}\n\t\treturn myUrl;\n\t}", "public UriDt getUrlElement() { \n\t\tif (myUrl == null) {\n\t\t\tmyUrl = new UriDt();\n\t\t}\n\t\treturn myUrl;\n\t}", "org.apache.xmlbeans.impl.xb.xsdschema.SelectorDocument.Selector.Xpath xgetXpath();", "public String getRecordPath() {\n return recordPath;\n }", "public Vector<PathElement> generateAccessPath()\n\t{\n\t if ( null == this.parent )\n {\n return new Vector<PathElement>();\n }\n else if ( this.isNary() )\n {\n checkPrecondition(this.parent != null, \"N-ary node with no parent\");\n return this.parent.generateAccessPath();\n }\n else\n {\n Vector<PathElement> path = parent.generateAccessPath();\n PathElement own_element = new PathElement(this.operator, this.paramState, this.positionInParent);\n path.add(own_element);\n return path;\n }\n\t}", "public SeleniumQueryObject last() {\n\t\treturn LastFunction.last(this, this.elements);\n\t}", "public final int[] xmlPath ()\r\n {\r\n return _value.path();\r\n }", "@Override\n\tpublic String toString() {\n\t\treturn this.element +\" \"+duplicateCount+\" \"+probeCount;\n\t}", "protected abstract int[] getPathElements();", "public XPathExpr getXPathExpr()\n {try{__CLR4_0_68g8gl1l0dv4j.R.inc(311);\n __CLR4_0_68g8gl1l0dv4j.R.inc(312);return getXPathExpr( true );\n }finally{__CLR4_0_68g8gl1l0dv4j.R.flushNeeded();}}", "public String getXPath();", "public String toLocalPath() {\n\n String parentPath = parent.toLocalPath();\n return StringUtils.isBlank(parentPath)\n ? element.getElement()\n : new StringBuilder()\n .append(parentPath)\n .append('.')\n .append(element.getElement())\n .toString();\n }", "public QueryElements getQueryAccess() {\n\t\treturn pQuery;\n\t}", "public String getIdPath() {\n\t\tif (null != this.idPath) {\n\t\t\treturn this.idPath;\n\t\t}\n\t\tValueExpression _ve = getValueExpression(\"idPath\");\n\t\tif (_ve != null) {\n\t\t\treturn (String) _ve.getValue(getFacesContext().getELContext());\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public String toString() {\n String id = element.getAttributeNS(null, \"id\");\n return element.getTagName() + (id.equals(\"\") ? \"\" : \"#\" + id) + \".\"\n + (attributeNamespaceURI == null || attributeNamespaceURI.equals(\"\") ? \"\" : attributeNamespaceURI + \":\")\n + attributeLocalName + \" = \" + expression;\n }", "public String getAppendedPath() {\n return appendedPath;\n }", "public static String getNewPath() {\n return homePath + Integer.toString(++elementCounter) + \".ser\";\n }", "private String getElementRefExt(Node elementRefNode, XmlProcessor simpleXmlProcessor)\n\t\t\tthrows XPathExpressionException {\n\t\tString extension = \"\";\n\t\tif (elementRefNode.hasChildNodes()) {\n\t\t\tNode childNode = elementRefNode.getFirstChild();\n\t\t\tif (\"attribute\".equals(childNode.getNodeName())) {\n\t\t\t\textension = childNode.getAttributes().getNamedItem(ATTR_UUID).getNodeValue();\n\t\t\t}\n\t\t} else {\n\t\t\tString id = elementRefNode.getAttributes().getNamedItem(ID).getNodeValue();\n\t\t\tNode qdmNode = simpleXmlProcessor.findNode(simpleXmlProcessor.getOriginalDoc(),\n\t\t\t\t\t\"/measure/elementLookUp/qdm[@uuid='\" + id + \"']\");\n\t\t\tif (qdmNode != null) {\n\t\t\t\tString dataType = qdmNode.getAttributes().getNamedItem(DATATYPE).getNodeValue();\n\t\t\t\tString qdmName = qdmNode.getAttributes().getNamedItem(NAME).getNodeValue();\n\t\t\t\textension = qdmName + \"_\" + dataType;\n\t\t\t\tif (qdmNode.getAttributes().getNamedItem(INSTANCE) != null) {\n\t\t\t\t\textension = qdmNode.getAttributes().getNamedItem(INSTANCE).getNodeValue() + \"_\" + extension;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn StringUtils.deleteWhitespace(extension);\n\t}", "Elem getQualifiedElem();", "public String getIdenticalPath() {\n return ipath;\n }", "public String getElementReferenceIdentifier() {\n return this.toString();\n }", "public String toString()\n {\n return elementName;\n }", "String getXPath();", "protected String getGroupPath() {\n return panelXpath + groupPath;\n }", "public RDFList path(RDFList exp) {\r\n RDFList ll = new RDFList(exp.head(), exp.getList());\r\n Expression re = list();\r\n\r\n for (Expression ee : exp.getList()){\r\n Triple t = createPath(exp.head(), re, ee);\r\n ll.add(t);\r\n }\r\n \r\n return ll;\r\n }", "@PublicAtsApi\n public String getRootElementXPath() {\n\n return this.root.getUniquePath();\n }", "@Property Element getDocumentElement();", "public void addQueryElement(QueryElement element);", "public String nodePath() {\r\n String path;\r\n if (this.parent == null) {\r\n path = \"(\" + this.nodeType + \"|\" + this.dataType + \"|\" + this.data + \")\";\r\n } else {\r\n path = this.parent.nodePath() + \" (\" + this.nodeType + \"|\" + this.dataType + \"|\" + this.data + \")\";\r\n }\r\n return path;\r\n }", "public String getHierarchicalPath() {\r\n \t\tStringBuilder builder = new StringBuilder();\r\n \t\tfor (String id : hierarchicalId) {\r\n \t\t\tbuilder.append('/');\r\n \t\t\tbuilder.append(id);\r\n \t\t}\r\n \r\n \t\treturn builder.toString();\r\n \t}", "@Override\n\t\tpublic String toString() {\n\t\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\t\tif (prev != null) {\n\t\t\t\tstringBuilder.append(prev.elementE);\n\t\t\t}else {\n\t\t\t\tstringBuilder.append(\"null\");\n\t\t\t}\n\t\t\tstringBuilder.append(\"_\").append(elementE).append(\"_\");\n\t\t\tif (next != null) {\n\t\t\t\tstringBuilder.append(next.elementE);\n\t\t\t}else {\n\t\t\t\tstringBuilder.append(\"null\");\n\t\t\t}\n\t\t\treturn stringBuilder.toString();\n\t\t}", "public RelativePathExpr getRelativePath() {\r\n\t\treturn this.relativePathExpr;\r\n\t}", "public String getElementId() {\n return elementId;\n }", "public RepeatElements getRepeatAccess() {\n\t\treturn (pRepeat != null) ? pRepeat : (pRepeat = new RepeatElements());\n\t}", "java.lang.String getQueryId();", "public String getXMLquery() {\n return localQuerytool.getXML();\n }", "public String getXPath() {\n return xPathStr;\n }", "public String getProductURLXPath();", "private Node generateCritRefElementRef(Node outboundRelElem, Node elementRefNode, XmlProcessor hqmfXmlProcessor)\n\t\t\tthrows XPathExpressionException {\n\t\tString ext = getElementRefExt(elementRefNode, measureExport.getSimpleXMLProcessor());\n\t\tString root = elementRefNode.getAttributes().getNamedItem(ID).getNodeValue();\n\t\tNode idNodeQDM = hqmfXmlProcessor.findNode(hqmfXmlProcessor.getOriginalDoc(),\n\t\t\t\t\"//entry/*/id[@root=\\\"\" + root + \"\\\"][@extension=\\\"\" + ext + \"\\\"]\");\n\t\tif (idNodeQDM != null) {\n\t\t\tNode parent = idNodeQDM.getParentNode();\n\t\t\tif (parent != null) {\n\t\t\t\tNamedNodeMap attribMap = parent.getAttributes();\n\t\t\t\tString classCode = attribMap.getNamedItem(CLASS_CODE).getNodeValue();\n\t\t\t\tString moodCode = attribMap.getNamedItem(MOOD_CODE).getNodeValue();\n\n\t\t\t\t// create criteriaRef\n\t\t\t\tElement criteriaReference = hqmfXmlProcessor.getOriginalDoc().createElement(CRITERIA_REFERENCE);\n\t\t\t\tcriteriaReference.setAttribute(CLASS_CODE, classCode);\n\t\t\t\tcriteriaReference.setAttribute(MOOD_CODE, moodCode);\n\n\t\t\t\tElement id = hqmfXmlProcessor.getOriginalDoc().createElement(ID);\n\t\t\t\tid.setAttribute(ROOT, root);\n\t\t\t\tid.setAttribute(EXTENSION, ext);\n\n\t\t\t\tcriteriaReference.appendChild(id);\n\t\t\t\toutboundRelElem.appendChild(criteriaReference);\n\t\t\t\t// return <entry> element\n\t\t\t\treturn parent.getParentNode();\n\t\t\t}\n\t\t} else {\n\t\t\t// check if this is a measurement period\n\t\t\tString displayName = elementRefNode.getAttributes().getNamedItem(DISPLAY_NAME).getNodeValue();\n\t\t\tif (\"Measurement Period : Timing Element\".equals(displayName)) {\n\t\t\t\t// create criteriaRef\n\t\t\t\tElement criteriaReference = hqmfXmlProcessor.getOriginalDoc().createElement(CRITERIA_REFERENCE);\n\t\t\t\tcriteriaReference.setAttribute(CLASS_CODE, \"OBS\");\n\t\t\t\tcriteriaReference.setAttribute(MOOD_CODE, \"EVN\");\n\n\t\t\t\tElement id = hqmfXmlProcessor.getOriginalDoc().createElement(ID);\n\t\t\t\tid.setAttribute(ROOT, elementRefNode.getAttributes().getNamedItem(ID).getNodeValue());\n\t\t\t\tid.setAttribute(EXTENSION, \"measureperiod\");\n\n\t\t\t\tcriteriaReference.appendChild(id);\n\t\t\t\toutboundRelElem.appendChild(criteriaReference);\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public String getPath()\n {\n StringBuilder buff = new StringBuilder();\n Resource r = this;\n while(r != null)\n {\n if(r.getId() != 1)\n {\n buff.insert(0, r.getName());\n }\n r = r.getParent();\n if(r != null || this.getId() == 1)\n {\n buff.insert(0, '/');\n }\n }\n return buff.toString();\n }", "public String getELEMENT_ID() {\r\n return ELEMENT_ID;\r\n }", "public RTWElementRef lastAsElement();", "public String getPathExpression() {\n return getProperty(PATH_EXPRESSION);\n }", "protected StringBuilder toStringBuilder() {\r\n StringBuilder sb;\r\n if (this.parent == null) {\r\n sb = new StringBuilder(PATH_SEP_CHAR);\r\n } else {\r\n sb = this.parent.get().toStringBuilder();\r\n }\r\n return sb.append(PATH_SEP_CHAR).append(this.localName);\r\n }", "public MedicalRecordDO[] getMedicalRecordPath(Integer uid);", "public String getPath(){\n\t\t\treturn this.path;\n\t\t}", "@Override\n\t@XmlTransient\n\tpublic Path getPath() {\n\t\treturn path;\n\t}", "private Node generateElementRefHQMF(Node elementRefNode, Node parentNode, String clauseName)\n\t\t\tthrows XPathExpressionException {\n\t\tXmlProcessor hqmfXmlProcessor = measureExport.getHQMFXmlProcessor();\n\t\tNode node = null;\n\t\tString ext = getElementRefExt(elementRefNode, measureExport.getSimpleXMLProcessor());\n\t\tString root = elementRefNode.getAttributes().getNamedItem(ID).getNodeValue();\n\t\tString localVariableName = clauseName;\n\t\tNode idNodeQDM = hqmfXmlProcessor.findNode(hqmfXmlProcessor.getOriginalDoc(),\n\t\t\t\t\"//entry/*/id[@root='\" + root + \"'][@extension=\\\"\" + ext + \"\\\"]\");\n\t\tif (idNodeQDM != null) {\n\t\t\tNode entryElem = idNodeQDM.getParentNode().getParentNode().cloneNode(true);\n\t\t\tNode newIdNode = getTagFromEntry(entryElem, ID);\n\n\t\t\tif (newIdNode == null) {\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\tString idroot = \"0\";\n\t\t\tNode parNode = elementRefNode.getParentNode();\n\t\t\tif (parNode != null && SUB_TREE.equals(parNode.getNodeName())) {\n\t\t\t\tidroot = parNode.getAttributes().getNamedItem(UUID).getNodeValue();\n\t\t\t\t// Added logic to show qdm_variable in extension if clause is of qdm variable\n\t\t\t\t// type.\n\t\t\t\tString isQdmVariable = parNode.getAttributes().getNamedItem(QDM_VARIABLE).getNodeValue();\n\t\t\t\tif (isQdmVariable.equalsIgnoreCase(TRUE)) {\n\t\t\t\t\tString occText = null;\n\t\t\t\t\t// Handled Occurrence Of QDM Variable.\n\t\t\t\t\tif (parNode.getAttributes().getNamedItem(INSTANCE_OF) != null) {\n\t\t\t\t\t\toccText = \"occ\" + parNode.getAttributes().getNamedItem(INSTANCE).getNodeValue() + \"of_\";\n\t\t\t\t\t}\n\t\t\t\t\tif (occText != null) {\n\t\t\t\t\t\text = occText + \"qdm_var_\" + ext;\n\t\t\t\t\t} else {\n\t\t\t\t\t\text = \"qdm_var_\" + ext;\n\t\t\t\t\t\tlocalVariableName = \"qdm_var_\" + localVariableName;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlocalVariableName = localVariableName + \"_\" + UUIDUtilClient.uuid(5);\n\t\t\t\tlocalVariableName = StringUtils.deleteWhitespace(localVariableName);\n\t\t\t\t((Element) newIdNode).setAttribute(ROOT, idroot);\n\t\t\t\t((Element) newIdNode).setAttribute(EXTENSION, ext);\n\t\t\t\tNode localVariableNode = entryElem.getFirstChild();\n\t\t\t\tif (localVariableNode.getAttributes().getNamedItem(\"value\") != null) {\n\t\t\t\t\tlocalVariableNode.getAttributes().getNamedItem(\"value\").setNodeValue(localVariableName);\n\t\t\t\t}\n\n\t\t\t\tparentNode.appendChild(entryElem);\n\t\t\t\tnode = entryElem;\n\t\t\t} else {\n\t\t\t\t// if the the parentNode for ElementRef is other than SubTreeNode\n\t\t\t\tElement excerptElement = null;\n\t\t\t\tNode subTreeParentNode = checkIfSubTree(parNode);\n\t\t\t\tif (subTreeParentNode != null) {\n\t\t\t\t\troot = subTreeParentNode.getAttributes().getNamedItem(UUID).getNodeValue();\n\t\t\t\t\tif (subTreeParentNode.getAttributes().getNamedItem(QDM_VARIABLE) != null) {\n\t\t\t\t\t\tString isQdmVariable = subTreeParentNode.getAttributes().getNamedItem(QDM_VARIABLE)\n\t\t\t\t\t\t\t\t.getNodeValue();\n\t\t\t\t\t\tif (TRUE.equalsIgnoreCase(isQdmVariable)) {\n\t\t\t\t\t\t\tString occText = null;\n\t\t\t\t\t\t\t// Handled Occurrence Of QDM Variable.\n\t\t\t\t\t\t\tif (subTreeParentNode.getAttributes().getNamedItem(INSTANCE_OF) != null) {\n\t\t\t\t\t\t\t\toccText = \"occ\"\n\t\t\t\t\t\t\t\t\t\t+ subTreeParentNode.getAttributes().getNamedItem(\"instance\").getNodeValue()\n\t\t\t\t\t\t\t\t\t\t+ \"of_\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (occText != null) {\n\t\t\t\t\t\t\t\text = occText + \"qdm_var_\" + ext;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\text = \"qdm_var_\" + ext;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\troot = UUIDUtilClient.uuid();\n\t\t\t\t}\n\n\t\t\t\tNode entryNodeForElementRef = idNodeQDM.getParentNode().getParentNode();\n\t\t\t\tNode clonedEntryNodeForElementRef = entryNodeForElementRef.cloneNode(true);\n\t\t\t\tNodeList idChildNodeList = ((Element) clonedEntryNodeForElementRef).getElementsByTagName(ID);\n\t\t\t\tif (idChildNodeList != null && idChildNodeList.getLength() > 0) {\n\t\t\t\t\tNode idChildNode = idChildNodeList.item(0);\n\t\t\t\t\tidChildNode.getAttributes().getNamedItem(EXTENSION).setNodeValue(ext);\n\t\t\t\t\tidChildNode.getAttributes().getNamedItem(ROOT).setNodeValue(root);\n\t\t\t\t}\n\n\t\t\t\tNode firstChild = clonedEntryNodeForElementRef.getFirstChild();\n\t\t\t\tif (LOCAL_VARIABLE_NAME.equals(firstChild.getNodeName())) {\n\t\t\t\t\tfirstChild = firstChild.getNextSibling();\n\t\t\t\t}\n\t\t\t\t// Added logic to show qdm_variable in extension if clause is of qdm variable\n\t\t\t\t// type.\n\t\t\t\tif (FUNCTIONAL_OP.equals(parNode.getNodeName())) {\n\t\t\t\t\texcerptElement = generateExcerptEntryForFunctionalNode(parNode, elementRefNode, hqmfXmlProcessor,\n\t\t\t\t\t\t\tclonedEntryNodeForElementRef);\n\t\t\t\t}\n\n\t\t\t\tif (excerptElement != null) {\n\t\t\t\t\n\t\t\t\t\tfirstChild.appendChild(excerptElement);\n\t\t\t\t}\n\t\t\t\tparentNode.appendChild(clonedEntryNodeForElementRef);\n\t\t\t\tnode = clonedEntryNodeForElementRef;\n\n\t\t\t}\n\t\t\tupdateLocalVar(node, ext);\n\t\t}\n\n\t\treturn node;\n\t}", "public static String nodePath(Node n)\n {\n // abort early\n if (null == n)\n return null;\n\n // declarations\n Node parent = null;\n Stack<Node> hierarchy = new Stack<Node>();\n StringBuffer buffer = new StringBuffer('/');\n\n // push element on stack\n hierarchy.push(n);\n\n switch (n.getNodeType()) {\n case Node.ATTRIBUTE_NODE:\n parent = ((Attr) n).getOwnerElement();\n break;\n case Node.COMMENT_NODE:\n case Node.ELEMENT_NODE:\n case Node.DOCUMENT_NODE:\n parent = n.getParentNode();\n break;\n default:\n throw new IllegalStateException(\"Unexpected Node type\" + n.getNodeType());\n }\n\n while (null != parent && parent.getNodeType() != Node.DOCUMENT_NODE) {\n // push on stack\n hierarchy.push(parent);\n\n // get parent of parent\n parent = parent.getParentNode();\n }\n\n // construct xpath\n Object obj = null;\n while (!hierarchy.isEmpty() && null != (obj = hierarchy.pop())) {\n Node node = (Node) obj;\n boolean handled = false;\n\n if (node.getNodeType() == Node.ELEMENT_NODE)\n {\n Element e = (Element) node;\n\n // is this the root element?\n if (buffer.length() == 1)\n {\n // root element - simply append element name\n buffer.append(node.getNodeName());\n }\n else\n {\n // child element - append slash and element name\n buffer.append(\"/\");\n buffer.append(node.getNodeName());\n\n if (node.hasAttributes())\n {\n // see if the element has a name or id attribute\n if (e.hasAttribute(\"id\"))\n {\n // id attribute found - use that\n buffer.append(\"[@id='\" + e.getAttribute(\"id\") + \"']\");\n handled = true;\n }\n else if (e.hasAttribute(\"name\"))\n {\n // name attribute found - use that\n buffer.append(\"[@name='\" + e.getAttribute(\"name\") + \"']\");\n handled = true;\n }\n }\n\n if (!handled)\n {\n // no known attribute we could use - get sibling index\n int prev_siblings = 1;\n Node prev_sibling = node.getPreviousSibling();\n while (null != prev_sibling)\n {\n if (prev_sibling.getNodeType() == node.getNodeType())\n {\n if (prev_sibling.getNodeName().equalsIgnoreCase(\n node.getNodeName()))\n {\n prev_siblings++;\n }\n }\n prev_sibling = prev_sibling.getPreviousSibling();\n }\n buffer.append(\"[\" + prev_siblings + \"]\");\n }\n }\n }\n else if (node.getNodeType() == Node.ATTRIBUTE_NODE)\n {\n buffer.append(\"/@\");\n buffer.append(node.getNodeName());\n }\n }\n // return buffer\n return buffer.toString();\n }", "@Override\n\tpublic Set<String> getQueryElementNames() {\n\t\treturn null;\n\t}", "private static String sEnterSelectRootXpath(String sWhichField) {\n\t\tString sReturn = \"unset\"; \n\t\tswitch (sWhichField) {\n\t\tcase \"Content Type\": //content type on the create content modal\n\t\t\tsReturn = \"//*[text()[contains(.,\\\"\" + sWhichField + \"\\\")]]/ancestor::mat-form-field\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tsReturn = \"//*[text()[contains(.,\\\"\" + sWhichField + \"\\\")]]/ancestor::iti-form-field\";\t\t\t\n\t\t}\n\t\t\n\t\treturn sReturn;\n\t}", "public String dependencyByScreenElementId()\r\n {\r\n try\r\n {\r\n\t if(!NumberUtil.isEmptyDecimal(dynamicScreenCO.getScreenIdValue())\r\n\t\t && !NumberUtil.isEmptyDecimal(dynamicScreenCO.getElementIdValue()))\r\n\t {\r\n\t SessionCO sessionCO = returnSessionObject();\r\n\t DynCommonLookupSC criteria = new DynCommonLookupSC();\r\n\t criteria.setElementId(dynamicScreenCO.getElementIdValue());\r\n\t criteria.setScreenId(dynamicScreenCO.getScreenIdValue());\r\n\t criteria.setLovTypeId(DynamicScreenConstant.LOV_ELEMENT_TYPE);\r\n\t criteria.setPreferredLanguage(sessionCO.getLanguage());\r\n\t dynamicScreenCO = dynamicScreenBO.dependencyByScreenElementId(criteria);\r\n\t }\r\n }\r\n catch(Exception ex)\r\n {\r\n\t dynamicScreenCO.setElementIdValue(null);\r\n\t handleException(ex,null,null);\r\n }\r\n NumberUtil.resetEmptyValues(dynamicScreenCO);\r\n return SUCCESS;\r\n }", "public XPath getFrom()\n {\n return m_fromMatchPattern;\n }", "public String getPath() \r\n\t{\r\n\t\tStringBuilder pathBuilder = new StringBuilder();\r\n\t\tfor(Cell c: path)\r\n\t\t\tpathBuilder.append(\" (\" + c.getRow() + ',' + c.getColumn() + ')');\r\n\t\t\r\n\t\treturn pathBuilder.toString();\r\n\t}", "public int path(){\n\t\treturn this.path;\n\t}", "private Element traverse_learningpath(Element element) {\n \ttry {\n\t \tString userid = profile.getAttributeValue(\"personal\", \"id\");\n\t \tString course = profile.getAttributeValue(\"personal\", \"course\");\n\t \tArrayList<ArrayList<String>> path = WOWContextListener.getInstance().getTriUMServer().\n \t\t\tgetCommunicateService().getQueryDelegator().\n \t\t\tlearningPathQuery(userid, course);\n\n\t \tElement div = doc.createElement(\"div\");\n\t \tif(path.size() == 0) div.appendChild(doc.createTextNode(\"No result!\"));\n\t \t\n\t\t\tfor(int i = path.size() - 1; i >= 0; i--) {\n\t\t\t\tArrayList<String> concepts = path.get(i);\n\t\t\t\t\n\t\t\t\tif(concepts.size() > 1) div.appendChild(doc.createTextNode(\"(\"));\n\t\t\t\tfor(int j = 0; j < concepts.size(); j++) {\n\t\t\t\t\tdiv.appendChild(LinkAdaptation.createLink(concepts.get(j), profile, \"MAINVIEW\", doc));\n\t\t\t\t\tif(j < concepts.size() - 1) div.appendChild(doc.createTextNode(\", \"));\n\t\t\t\t}\n\t\t\t\tif(concepts.size() > 1) div.appendChild(doc.createTextNode(\")\"));\n\t\t\t\t\n\t\t\t\tif(i > 0) div.appendChild(doc.createTextNode(\" => \"));\n\t\t\t}\n\t \treturn (Element)replaceNode(element, div);\n\t\t\t\n \t}\n \tcatch(Throwable e) {\n \t\te.printStackTrace();\n \t\treturn (Element)replaceNode(element, createErrorElement(\"No result!\"));\n \t}\n }", "public SoPath getPath() {\n\t\t return path; \n\t}", "String getElem();", "public String elementName() {\n return _element;\n }", "public String elementName() {\n return _element;\n }", "public String getXPath() {\n/* 114 */ return this.xPath;\n/* */ }", "public String getPath() {\n \tStringBuilder path = new StringBuilder();\n \tint s = this.getSelectedIndex();\n \tif (s <= 0 ) s = 0;\n \tJPiereIADTabpanel p = tabPanelList.get(s);\n \tfor (int i = 0; i <= s; i++) {\n \t\tString n = null;\n \t\tif (i == s)\n \t\t\tn = p.getTitle();\n \t\telse {\n \t\t\tJPiereIADTabpanel t = tabPanelList.get(i);\n \t\t\tif (t.getTabLevel() < p.getTabLevel())\n \t\t\t\tn = t.getTitle();\n \t\t}\n \t\tif (n != null) {\n \t\t\tif (path.length() > 0) {\n \t\t\t\tpath.append(\" > \");\n \t\t\t}\n \t\t\tpath.append(n);\n \t\t}\n \t}\n\n \treturn path.toString();\n }", "private String getPathToMetricsResults() {\n\t\treturn pathToMetricsResults.getText();\n\t}", "public AnnotatedElement getQualifiedElement()\n/* */ {\n/* 241 */ return this.qualifiedElement;\n/* */ }", "@Override\n public String getElementId()\n {\n return null;\n }", "public String getElementName()\n {\n return ELEMENT_NAME;\n }", "public AbstractPathElement<V, E> getPrevPathElement()\r\n/* */ {\r\n/* 188 */ return this.prevPathElement;\r\n/* */ }", "public QNameElements getQNameAccess() {\n\t\treturn pQName;\n\t}", "public String getQualifiedName() {\n if (probe.getHost() != null) {\n return probe.getHost().getName() + \"/\" + getName();\n } else {\n return \"/\" + getName();\n }\n }", "public jkt.hrms.masters.business.PrjQueryEntry getQueryEntry () {\n\t\treturn queryEntry;\n\t}", "public QualifiedNameElements getQualifiedNameAccess() {\n\t\treturn pQualifiedName;\n\t}", "public QualifiedNameElements getQualifiedNameAccess() {\n\t\treturn pQualifiedName;\n\t}", "public String getPath() {\n\t\treturn getString(\"path\");\n\t}", "public int getQueryId();", "public com.sforce.soap.enterprise.QueryResult getDuplicateRecordItems() {\r\n return duplicateRecordItems;\r\n }", "int placePathFollowingElement(String elementName, PathList pathList);", "public String getPath() {\n\t\treturn this.path;\n\t}", "public IDREFElements getIDREFAccess() {\n\t\treturn pIDREF;\n\t}", "public String getPath() {\n return this.path;\n }", "public String getPath() {\n return this.path;\n }", "public String getPath() {\n return this.path;\n }", "public String getPath() {\n return this.path;\n }", "public String getPath() {\n return this.path;\n }", "public String getPath() {\n return this.path;\n }", "public String getPath() {\n return this.path;\n }", "public String getPath() {\n return this.path;\n }", "public String getPath() {\n return this.path;\n }", "public String getPath() {\n return this.path;\n }", "public String getPath() {\n return this.path;\n }", "public String getPath() {\n return this.path;\n }" ]
[ "0.5381393", "0.5324266", "0.5227182", "0.51436865", "0.50704396", "0.50648814", "0.49796855", "0.4897287", "0.48715135", "0.48607168", "0.48159325", "0.48159325", "0.48159325", "0.48024845", "0.47932732", "0.4719699", "0.4705023", "0.47041905", "0.47022805", "0.46871537", "0.46853486", "0.46648866", "0.46546257", "0.4650469", "0.4645674", "0.4626931", "0.4613944", "0.45918912", "0.45872596", "0.4584642", "0.4570891", "0.456732", "0.4567179", "0.4564385", "0.4559498", "0.45310512", "0.45259255", "0.45206708", "0.45177254", "0.4506246", "0.44769394", "0.44647455", "0.444968", "0.44496763", "0.4446907", "0.4443844", "0.44389474", "0.443669", "0.44293404", "0.4417085", "0.43979108", "0.43949395", "0.43889844", "0.43886518", "0.43830386", "0.4378734", "0.43783036", "0.4377236", "0.43694952", "0.436857", "0.43521294", "0.43516377", "0.43442884", "0.43407252", "0.4339428", "0.4334517", "0.43180454", "0.43115672", "0.43035236", "0.42879054", "0.42879054", "0.4285838", "0.42813239", "0.427317", "0.4267539", "0.42652482", "0.42612872", "0.4249871", "0.42405358", "0.42380637", "0.42373538", "0.42116565", "0.42116565", "0.4208552", "0.42025152", "0.4202299", "0.41970673", "0.4197034", "0.4193564", "0.41891328", "0.41891328", "0.41891328", "0.41891328", "0.41891328", "0.41891328", "0.41891328", "0.41891328", "0.41891328", "0.41891328", "0.41891328", "0.41891328" ]
0.0
-1
Set the value of the record property.
public void setRecord(String record) { this.record = record; this.handleConfig("record", record); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setRecord(Record record) {\n this.record = record;\n }", "public void setRecord(final ORecordInternal<?> iRecord) {\r\n\t\t// SAVES THE RECORD\r\n\t\tthis.record = iRecord;\r\n\t}", "public void SetRecord(int index, Record rec){\n\t}", "public void setCurrentRecord(final Record record) {\n mCurrentRecord = record;\n saveCurrentRecord();\n }", "public void setRecordValue(String RecordValue) {\n this.RecordValue = RecordValue;\n }", "public void setRecord(int value){\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this.getContext());\n SharedPreferences.Editor editor = prefs.edit(); editor.putInt(\"record\", value);\n editor.commit();\n }", "public void setCurrentRecord(Integer value) {\n this.currentRecord = value;\n }", "public void setValue(T r) {\n\t\tthis.r = r;\n\t\t// needToNotify = false;\n\t\tmController.onRecordModified(this);\n\t}", "public JbootVoModel set(Record record) {\n super.putAll(record.getColumns());\n return this;\n }", "public void setRecordNum(java.lang.Integer value) {\n this.recordNum = value;\n }", "public com.dj.model.avro.LargeObjectAvro.Builder setRecordNum(java.lang.Integer value) {\n validate(fields()[1], value);\n this.recordNum = value;\n fieldSetFlags()[1] = true;\n return this;\n }", "public void setRecordHandler(RecordHandler recordHandler) {\n \t this.recordHandler = recordHandler;\n }", "public void setRecordData(org.afscme.enterprise.common.RecordData recordData) {\n this.recordData = recordData;\n }", "public void setAudioRecord(Object audioRecord) {\n this.audioRecord = audioRecord;\n }", "public synchronized void setRecording(boolean recording)\n {\n synchronized (recordingLock) {\n this.recording = recording;\n }\n }", "public void setValue(IveObject val){\r\n\tvalue = val;\r\n\tnotifyFromAttr();\r\n }", "public void updateRecord(String idProperty, String idValue,\n String property, String newValue) throws IOException;", "@Override\n public ReplicateRecord record (DomainRecord record) {\n this.record = record;\n return this;\n }", "public void setHealthrecord(String healthrecord) {\r\n this.healthrecord = healthrecord;\r\n }", "public void updateRecord(Record object);", "public void setRecord3(int value){\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this.getContext());\n SharedPreferences.Editor editor = prefs.edit(); editor.putInt(\"record3\", value);\n editor.commit();\n }", "@Override\n\t\t\tpublic void setPropertyValue(Object value) {\n\t\t\t\t\n\t\t\t}", "public void setValue(Object value) { this.value = value; }", "@Override\n public void setValue(Object val)\n {\n value = val;\n }", "public void setRecordPath(String recordPath) {\n this.recordPath = recordPath;\n }", "public void setValue(final Object value) { _value = value; }", "public void setValue(Object val);", "@Override\n public void set(Object bean, Object value) throws IOException {\n _propertyMutator.longSetter(bean, ((Number) value).longValue());\n }", "public void setFlag(RecordFlagEnum flag);", "public void setRecord2(int value){\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this.getContext());\n SharedPreferences.Editor editor = prefs.edit(); editor.putInt(\"record2\", value);\n editor.commit();\n }", "private MadisRecord setRecordTime(MadisRecord rec) {\n try {\n rec.setDataTime(new DataTime(rec.getTimeObs()));\n return rec;\n } catch (Exception e) {\n statusHandler.handle(Priority.ERROR, \"Can't set Madis Record URI! \"\n + rec.getStationId(), e);\n }\n\n return null;\n }", "public void setRecordId(Integer recordId) {\n this.recordId = recordId;\n }", "public void setData(InputRecord record)\n throws SQLException\n {\n super.setData(record);\n try\n {\n long resourceClassId = record.getLong(\"resource_class_id\");\n resourceClass = coral.getSchema().getResourceClass(resourceClassId);\n if(!record.isNull(\"parent\"))\n {\n parentId = record.getLong(\"parent\");\n }\n long creatorId = record.getLong(\"created_by\");\n creator = coral.getSecurity().getSubject(creatorId);\n created = record.getDate(\"creation_time\");\n long ownerId = record.getLong(\"owned_by\");\n owner = coral.getSecurity().getSubject(ownerId);\n long modifierId = record.getLong(\"modified_by\");\n modifier = coral.getSecurity().getSubject(modifierId);\n modified = record.getDate(\"modification_time\");\n }\n catch(EntityDoesNotExistException e)\n {\n throw new SQLException(\"Failed to load Resource #\"+id, e);\n }\n }", "@Override\n\t\tpublic void setProperty(String key, Object value) {\n\n\t\t}", "@Accessor(qualifier = \"report\", type = Accessor.Type.SETTER)\n\tpublic void setReport(final ReportModel value)\n\t{\n\t\tgetPersistenceContext().setPropertyValue(REPORT, value);\n\t}", "public void setValue(Object value);", "public abstract void setPropertyValue(String propertyName, Object value)\n throws ModelException;", "public String getRecordValue() {\n return this.RecordValue;\n }", "public void setValue(Object value) {\n this.value = value;\n }", "public void setRecordDate(Date recordDate) {\n this.recordDate = recordDate;\n }", "public void setProperty(String name,Object value);", "public void setRecordId(String recordId) {\n this.recordId = recordId == null ? null : recordId.trim();\n }", "void setValue(Object value);", "final public void setValue(Object value)\n {\n setProperty(VALUE_KEY, (value));\n }", "protected void setRecordInterval(Interval recordInterval) {\n this.recordInterval = recordInterval;\n }", "void setTaskmonitorrecord(noNamespace.TaskmonitorrecordDocument.Taskmonitorrecord taskmonitorrecord);", "public void setRecordFile(String file);", "public void setProperty(String property) {\n }", "public void setProperty( String key, Object value );", "public void setProperty(String key, Object value);", "void setUnmarshalRecord(UNMARSHAL_RECORD unmarshalRecord);", "void setValue4Po(String poFieldName, Object val);", "public void setProp(String key, String value){\t\t\n \t\t//Check which of property to set & set it accordingly\n \t\tif(key.equals(\"UMPD.latestReport\")){\n \t\t\tthis.setLatestReport(value);\n<<<<<<< HEAD\n\t\t} \n=======\n \t\t\treturn;\n \t\t} \n \t\tif (key.equals(\"UMPD.latestVideo\")) {\n \t\t\tthis.setLastestVideo(value);\n \t\t\treturn;\n \t\t}\n>>>>>>> 45a14c6cf04ac0844f8d8b43422597ae953e0c42\n \t}\n //-----------------------------------------------------------------------------\n \t/**\n \t * @return - a list of <code>FieldAndval</code> objects representing the set \n \t * properties\n \t */\n \tpublic ArrayList<FieldAndVal> getSetPropsList(){\n \t\tcreateSetPropsList();\n \t\treturn setPropsList;\n \t}\n //-----------------------------------------------------------------------------\n \t/**\n \t * \n \t */\n \tprivate void createSetPropsList(){\n \t\tif((this.latestReport).length()>0){\n \t\t\tsetPropsList.add(new FieldAndVal(\"UMPD.latestReport\", this.latestReport));\n \t\t}\n \t}\n //-----------------------------------------------------------------------------\n \t/**\n \t * @return lastestVideo - \n \t */\n \tpublic String getLastestVideo() {\n \t\treturn lastestVideo;\n \t}", "public void setData(T val) {\r\n\t\tthis.val = val;\r\n\t}", "public abstract void setValue(Context c, Object v) throws PropertyException;", "public void setValue(Object value) {\n setValue(value.toString());\n }", "public void setRecordReader(RecordReader recordReader) {\n this.recordReader = recordReader;\n }", "public void set(int propID, Object obj) throws SL_Exception\n {\n switch(propID)\n {\n case PRESQL_ID:\n setPreSQL((String)obj);\n return;\n case POSTSQL_ID:\n setPostSQL((String)obj);\n return;\n case ROWOFFSET_ID:\n setRowOffSet((java.lang.Integer)obj);\n return;\n case ROWLIMIT_ID:\n setRowLimit((java.lang.Integer)obj);\n return;\n default:\n super.set(propID, obj);\n return;\n }\n\n }", "public boolean set(int propId, double value)\n {\n \n boolean retVal = set_0(nativeObj, propId, value);\n \n return retVal;\n }", "public void setValue(String value) {\n set (value);\n }", "public void setValue(Object value)\r\n\t{\r\n\t\tm_value = value;\r\n\t}", "@Override\n\tpublic void setValue(Object value) {\n\t\t\n\t}", "public void setFieldValue(LVValue name,LVValue value) throws LRException\n\t{\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\ttry\n\t\t{\n\t\t\tclearStatus();\n\t\t\tLDBRecord record=myData.record;\n\t\t\tif (record!=null)\n\t\t\t{\n\t\t\t\tString fieldName=name.getStringValue();\n\t\t\t\tObject nValue=new Object();\n\t\t\t\tswitch (record.getFieldSpec(fieldName).getType())\n\t\t\t\t{\n\t\t\t\t\tcase LDBFieldSpec.BYTE:\n\t\t\t\t\t\tnValue=new Byte((byte)value.getIntegerValue());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase LDBFieldSpec.INT:\n\t\t\t\t\t\tnValue=new Integer(value.getIntegerValue());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase LDBFieldSpec.LONG:\n\t\t\t\t\t\tnValue=new Long(value.getNumericValue());\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase LDBFieldSpec.CHAR:\n\t\t\t\t\t\tnValue=value.getStringValue();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase LDBFieldSpec.BINARY:\n\t\t\t\t\t\tnValue=value.getBinaryValue();\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\trecord.setValue(background.getClient(),fieldName,nValue);\n\t\t\t}\n\t\t}\n\t\tcatch (LDBException e) { setStatus(e); }\n\t}", "void setProperty(String key, Object value);", "public void setValue(Object value)\r\n {\r\n m_value = value;\r\n }", "@Override\n public void set(DP value) {\n if (value == null || \"\".equals(value)) {\n isValid.set(true);\n source.set(null);\n return;\n }\n final SP parsed;\n try {\n parsed = formatter.parse(value);\n } catch (Exception e) {\n isValid.set(false);\n // we failed to parse the value, but still treat this as touching the source property\n source.setTouched(true);\n return;\n }\n isValid.set(true);\n source.set(parsed);\n }", "public void setRecordCount(Integer value) {\n this.recordCount = value;\n }", "void set(long newValue);", "public void setValue(String fieldName, Object value) {\n try {\n Field field = FieldUtils.getField(object.getClass(), fieldName, true);\n if (field != null) {\n FieldUtils.writeField(field, object, value, true);\n } else {\n logger.error(\"Unable to set value on field because the field does not exits on class: \" + object.getClass());\n }\n } catch (IllegalAccessException e) {\n logger.error(e);\n }\n }", "public void setRecordCount(int value) {\n this.recordCount = value;\n }", "public void setRecordFile(String recordFile) {\n this.recordFile = recordFile;\n }", "@Update({\n \"update spec_value\",\n \"set spec_id = #{specId,jdbcType=INTEGER},\",\n \"value = #{value,jdbcType=VARCHAR},\",\n \"orders = #{orders,jdbcType=INTEGER}\",\n \"where id = #{id,jdbcType=INTEGER}\"\n })\n int updateByPrimaryKey(SpecValuePO record);", "@Override\n public void setField (String fieldToModify, String value, Double duration) {\n\n }", "public void setValue(Object value, String parentLogDomain, boolean waitUntilUpdated) \n\t\t\tthrows AdaptorException {\n\t\tLogger LOG = getLogger(parentLogDomain);\n\t\tLOG.debug(\"Setting value of property \" + getStandardID() + \" to \" + value + \"...\");\n\t\tsetValue(value);\n\t\tupdate(parentLogDomain, waitUntilUpdated);\n\t}", "public static void setRecordingDate( Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(model, instanceResource, RECORDINGDATE, value);\r\n\t}", "public <T> void setProperty(String field, T value) {\n try {\n Field f = this.getClass().getDeclaredField(field); \n f.set(this, value);\n } catch (NoSuchFieldException ex) {\n System.out.println(\"Field no found...\");\n System.out.println(ex.getMessage());\n\n } catch (IllegalAccessException ex) {\n System.out.println(ex.getMessage());\n }\n }", "@Test\n public void test_setTelephone() {\n String value = \"new_value\";\n instance.setTelephone(value);\n\n assertEquals(\"'setTelephone' should be correct.\",\n value, TestsHelper.getField(instance, \"telephone\"));\n }", "public void setValue(S s) { value = s; }", "public void setRecordStatus(Integer recordStatus) {\n this.recordStatus = recordStatus;\n }", "public void setRecordStatus(Integer recordStatus) {\n this.recordStatus = recordStatus;\n }", "@RdfProperty(\"http://www.coadunation.net/schema/rdf/1.0/base#IdValue\")\n public abstract void setValue(String value);", "public void setRecordingDate( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), RECORDINGDATE, value);\r\n\t}", "public void setRecordId(RecordId rid) {\n\t\trecordId = rid;\n\n\t}", "public void setValue(Object obj) throws AspException\n {\n throw new AspException(\"Modification of read-only variable\");\n }", "public void elSetValue(Object bean, Object value, boolean populate, boolean reference);", "public void setVadRecorder(){\n }", "public void setValue(Entity value) {\r\n\t\t\tthis.value = value;\r\n\t\t}", "private void guardaRecord() {\n // Guardamos el record\n SharedPreferences datos = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor miEditor = datos.edit();\n miEditor.putInt(\"RECORD\", record);\n miEditor.apply();\n }", "public void setProperty(String property) {\n \t\t_property = property;\n \t}", "public void setValue (V v) {\n value = v;\n }", "public void setValue(V newValue) {\n this.value = newValue;\n }", "@Override\n\tpublic void setProperty(String name, Object value)\n\t{\n\t\tsuper.setProperty(name, value);\n\n\t\tprocessProperty(name, value);\n\t}", "@Override\n\tpublic void setProperty(String name, Object value)\n\t{\n\t\tsuper.setProperty(name, value);\n\n\t\tprocessProperty(name, value);\n\t}", "private SetProperty(Builder builder) {\n super(builder);\n }", "void setProperty(String attribute, String value);", "public void setEmployee(String employee)\r\n/* 43: */ {\r\n/* 44:47 */ this.employee = employee;\r\n/* 45: */ }", "@Override\r\n\tpublic void setProperty(Properties prop) {\n\t}", "void setValue(Object object, Object value);", "public static void setRecordingDate(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.String value) {\r\n\t\tBase.set(model, instanceResource, RECORDINGDATE, value);\r\n\t}", "public void setRecordName(String recordName) {\n \t\tthis.recordName = recordName;\n \t}" ]
[ "0.76860374", "0.68386626", "0.65444696", "0.65301144", "0.6492677", "0.6443248", "0.6375923", "0.63284355", "0.63105994", "0.6135533", "0.6088649", "0.6039952", "0.59947497", "0.5957199", "0.59295356", "0.59170866", "0.5851235", "0.57779455", "0.5716958", "0.57139015", "0.5708294", "0.57035905", "0.56778485", "0.5662872", "0.56548125", "0.56228036", "0.5612233", "0.5595599", "0.55947465", "0.55624455", "0.55482394", "0.5539317", "0.55389607", "0.5528564", "0.55146116", "0.5510273", "0.54967666", "0.5494167", "0.548733", "0.5466703", "0.5460816", "0.54548585", "0.5434952", "0.5433599", "0.542909", "0.5427487", "0.54270875", "0.54147893", "0.539904", "0.53976446", "0.53942335", "0.53866476", "0.53676647", "0.53535414", "0.5352443", "0.53401756", "0.5319235", "0.53183043", "0.5311461", "0.5297677", "0.5293912", "0.5290958", "0.52906257", "0.5285839", "0.52827966", "0.5282698", "0.5276498", "0.52750635", "0.5274003", "0.5272767", "0.5261345", "0.52522314", "0.52502257", "0.52495503", "0.52486587", "0.52447903", "0.5244621", "0.5241551", "0.5223105", "0.5223105", "0.5215948", "0.52129614", "0.5203203", "0.5202141", "0.52014345", "0.52003974", "0.52003145", "0.5198236", "0.51944983", "0.51928574", "0.5189589", "0.5184329", "0.5184329", "0.5176463", "0.5165789", "0.51641554", "0.51584196", "0.51531565", "0.51512975", "0.5149372" ]
0.75064516
1
The DomQuery path to the success attribute usedby forms.
public String getSuccessProperty() { if (null != this.successProperty) { return this.successProperty; } ValueExpression _ve = getValueExpression("successProperty"); if (_ve != null) { return (String) _ve.getValue(getFacesContext().getELContext()); } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getXpath();", "public String getXpath() { \n\t\treturn getXpathElement().getValue();\n\t}", "public String getXPath() {\n\t\treturn this.builder.toString();\n\t}", "public String getXMLquery() {\n return localQuerytool.getXML();\n }", "public final String attributeNameRef ()\r\n {\r\n return _value.xmlTreePath().attribute();\r\n }", "@Test public void pathToMap() {\n query(\"<a/>[./name()]\", \"<a/>\");\n }", "private String getPathToMetricsResults() {\n\t\treturn pathToMetricsResults.getText();\n\t}", "public String getModuleGeneratedXMLPath() {\n\t\treturn mModuleGeneratedXMLPath;\n\t}", "String getXPath();", "public String getPath() { \n\t\treturn getPathElement().getValue();\n\t}", "public String getXPath();", "public String getNameLocator()\r\n\t{\r\n driver.findElement(By.name(\"fname\"));\r\n fName=driver.findElement(By.xpath(\"//input[@placeholder='Firstname']\")).getAttribute(\"placeholder\");\r\n return fName;\r\n\t}", "public String getProductURLXPath();", "private String doUsedIn(SlingHttpServletRequest request) {\n String usedin[] = request.getParameterValues(\"usedin\");\n if (usedin != null && usedin.length > 0) {\n StringBuilder sb = new StringBuilder();\n\n for (String u : usedin) {\n sb.append(\"jcr:contains(@sakai:linkpaths,\\\"\").append(u).append(\"\\\") or \");\n }\n\n String usedinClause = sb.toString();\n int i = usedinClause.lastIndexOf(\" or \");\n if (i > -1) {\n usedinClause = usedinClause.substring(0, i);\n }\n if (usedinClause.length() > 0) {\n usedinClause = \" and (\" + usedinClause + \")\";\n return usedinClause;\n }\n }\n return \"\";\n }", "protected String getGroupPath() {\n return panelXpath + groupPath;\n }", "public GraphPath getResultPath() {\n return null;\r\n }", "@Deprecated\n public String getPathTestResults() {\n\n return pathTestResults;\n }", "public String getStatUse() {\n return statUse.formatRatio(statUse.getRatio());\n }", "public String getAttributeFileLibPath();", "public final int[] xmlPath ()\r\n {\r\n return _value.path();\r\n }", "public String getXPath() {\n/* 114 */ return this.xPath;\n/* */ }", "protected StringBuilder toStringBuilder() {\r\n StringBuilder sb;\r\n if (this.parent == null) {\r\n sb = new StringBuilder(PATH_SEP_CHAR);\r\n } else {\r\n sb = this.parent.get().toStringBuilder();\r\n }\r\n return sb.append(PATH_SEP_CHAR).append(this.localName);\r\n }", "public String getMatchingElementXPath()\n\t{\n\t\treturn this.matchingElementXPath;\n\t}", "public static String nodePath(Node n)\n {\n // abort early\n if (null == n)\n return null;\n\n // declarations\n Node parent = null;\n Stack<Node> hierarchy = new Stack<Node>();\n StringBuffer buffer = new StringBuffer('/');\n\n // push element on stack\n hierarchy.push(n);\n\n switch (n.getNodeType()) {\n case Node.ATTRIBUTE_NODE:\n parent = ((Attr) n).getOwnerElement();\n break;\n case Node.COMMENT_NODE:\n case Node.ELEMENT_NODE:\n case Node.DOCUMENT_NODE:\n parent = n.getParentNode();\n break;\n default:\n throw new IllegalStateException(\"Unexpected Node type\" + n.getNodeType());\n }\n\n while (null != parent && parent.getNodeType() != Node.DOCUMENT_NODE) {\n // push on stack\n hierarchy.push(parent);\n\n // get parent of parent\n parent = parent.getParentNode();\n }\n\n // construct xpath\n Object obj = null;\n while (!hierarchy.isEmpty() && null != (obj = hierarchy.pop())) {\n Node node = (Node) obj;\n boolean handled = false;\n\n if (node.getNodeType() == Node.ELEMENT_NODE)\n {\n Element e = (Element) node;\n\n // is this the root element?\n if (buffer.length() == 1)\n {\n // root element - simply append element name\n buffer.append(node.getNodeName());\n }\n else\n {\n // child element - append slash and element name\n buffer.append(\"/\");\n buffer.append(node.getNodeName());\n\n if (node.hasAttributes())\n {\n // see if the element has a name or id attribute\n if (e.hasAttribute(\"id\"))\n {\n // id attribute found - use that\n buffer.append(\"[@id='\" + e.getAttribute(\"id\") + \"']\");\n handled = true;\n }\n else if (e.hasAttribute(\"name\"))\n {\n // name attribute found - use that\n buffer.append(\"[@name='\" + e.getAttribute(\"name\") + \"']\");\n handled = true;\n }\n }\n\n if (!handled)\n {\n // no known attribute we could use - get sibling index\n int prev_siblings = 1;\n Node prev_sibling = node.getPreviousSibling();\n while (null != prev_sibling)\n {\n if (prev_sibling.getNodeType() == node.getNodeType())\n {\n if (prev_sibling.getNodeName().equalsIgnoreCase(\n node.getNodeName()))\n {\n prev_siblings++;\n }\n }\n prev_sibling = prev_sibling.getPreviousSibling();\n }\n buffer.append(\"[\" + prev_siblings + \"]\");\n }\n }\n }\n else if (node.getNodeType() == Node.ATTRIBUTE_NODE)\n {\n buffer.append(\"/@\");\n buffer.append(node.getNodeName());\n }\n }\n // return buffer\n return buffer.toString();\n }", "protected void deriveMatchingElementXPath()\n\t{\n\t\tString pcXPath = getParentContainerXPath();\n\t\tString base = pcXPath.substring(0, pcXPath.indexOf(\"[\"));\n\t\t\n\t\tStringBuffer sb = new StringBuffer();\n\t\tsb.append(base);\n\t\tsb.append(\"[\");\n\t\t\n\t\tif (getAttributeMatchExpression().equals(TaskExprType.STARTS_WITH))\n\t\t{\n\t\t\tsb.append(\"starts-with(\");\n\t\t}\n\t\telse if (getAttributeMatchExpression().equals(TaskExprType.CONTAINS))\n\t\t{\n\t\t\tsb.append(\"contains(\");\n\t\t}\n\n\t\tsb.append(getMatchingAttributeName());\n\t\tsb.append(\",'\");\n\t\tsb.append(getMatchingAttributeValue());\n\t\tsb.append(\"')]\");\n\t\t\n\t\t/*\n\t\t * Should look like this:\n\t\t * setMatchingElementXPath(\"//body/div/div[starts-with(@class,'Heading1')]\");\n\t\t */\n\t\tsetMatchingElementXPath(sb.toString());\n\t}", "@Override\n public String getLocationName() {\n\n final String locationName = getElement(getDriver(), By.className(SAVINGS_LOCATION),\n TINY_TIMEOUT).getText();\n setLogString(\"Savings Location Name :\" + locationName, true);\n return locationName;\n }", "@DSComment(\"Package priviledge\")\n @DSBan(DSCat.DEFAULT_MODIFIER)\n @DSSource({DSSourceKind.SENSITIVE_UNCATEGORIZED})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.414 -0500\", hash_original_method = \"33259345EBD99FFF49F4E1AAD2529013\", hash_generated_method = \"296CADF2DCFE4D340DC221E4F2AE1D69\")\n \nString [] processName (String qName, boolean isAttribute)\n {\n String name[];\n Hashtable table;\n\n // detect errors in call sequence\n declsOK = false;\n\n // Select the appropriate table.\n if (isAttribute) {\n table = attributeNameTable;\n } else {\n table = elementNameTable;\n }\n\n // Start by looking in the cache, and\n // return immediately if the name\n // is already known in this content\n name = (String[])table.get(qName);\n if (name != null) {\n return name;\n }\n\n // We haven't seen this name in this\n // context before. Maybe in the parent\n // context, but we can't assume prefix\n // bindings are the same.\n name = new String[3];\n name[2] = qName.intern();\n int index = qName.indexOf(':');\n\n // No prefix.\n if (index == -1) {\n if (isAttribute) {\n if (qName == \"xmlns\" && namespaceDeclUris)\n name[0] = NSDECL;\n else\n name[0] = \"\";\n } else if (defaultNS == null) {\n name[0] = \"\";\n } else {\n name[0] = defaultNS;\n }\n name[1] = name[2];\n }\n\n // Prefix\n else {\n String prefix = qName.substring(0, index);\n String local = qName.substring(index+1);\n String uri;\n if (\"\".equals(prefix)) {\n uri = defaultNS;\n } else {\n uri = (String)prefixTable.get(prefix);\n }\n if (uri == null\n || (!isAttribute && \"xmlns\".equals (prefix))) {\n return null;\n }\n name[0] = uri;\n name[1] = local.intern();\n }\n\n // Save in the cache for future use.\n // (Could be shared with parent context...)\n table.put(name[2], name);\n return name;\n }", "default String getAliasPrefix() {\n\t\treturn getDataSet() + \"_\";\n\t}", "public String getXPath() {\n return xPathStr;\n }", "public String getpathOutput() {\r\n\t\treturn pathOutput;\r\n\t}", "protected String path() {\n return path(getName());\n }", "public String nodePath() {\r\n String path;\r\n if (this.parent == null) {\r\n path = \"(\" + this.nodeType + \"|\" + this.dataType + \"|\" + this.data + \")\";\r\n } else {\r\n path = this.parent.nodePath() + \" (\" + this.nodeType + \"|\" + this.dataType + \"|\" + this.data + \")\";\r\n }\r\n return path;\r\n }", "public XPath getFrom()\n {\n return m_fromMatchPattern;\n }", "public StringBuilder getDemandSearchURLForDemandId() {\n\t\tStringBuilder url = new StringBuilder(configs.getBillingServiceHost());\n\t\turl.append(configs.getDemandSearchEndPoint());\n\t\turl.append(\"?\");\n\t\turl.append(\"tenantId=\");\n\t\turl.append(\"{1}\");\n\t\turl.append(\"&\");\n\t\turl.append(\"businessService=\");\n\t\turl.append(\"{2}\");\n\t\turl.append(\"&\");\n\t\turl.append(\"consumerCode=\");\n\t\turl.append(\"{3}\");\n\t\turl.append(\"&\");\n\t\turl.append(\"isPaymentCompleted=false\");\n\t\treturn url;\n\t}", "private boolean comparePathAttribute(String value, List<String> includePaths) {\n\t\treturn false;\r\n\t}", "private static String sEnterSelectRootXpath(String sWhichField) {\n\t\tString sReturn = \"unset\"; \n\t\tswitch (sWhichField) {\n\t\tcase \"Content Type\": //content type on the create content modal\n\t\t\tsReturn = \"//*[text()[contains(.,\\\"\" + sWhichField + \"\\\")]]/ancestor::mat-form-field\";\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tsReturn = \"//*[text()[contains(.,\\\"\" + sWhichField + \"\\\")]]/ancestor::iti-form-field\";\t\t\t\n\t\t}\n\t\t\n\t\treturn sReturn;\n\t}", "public SoPath getPath() {\n\t\t return path; \n\t}", "public String getAppendedPath() {\n return appendedPath;\n }", "private String getPathToSampleSummary() {\n\t\treturn pathToSampleSummary.getText();\n\t}", "@ModelAttribute(\"successURL\")\n\tpublic String getSuccessUrl(@RequestParam(required=false, value=\"successURL\") String successUrl) {\n\t\tif (StringUtils.isBlank(successUrl)) {\n\t\t\tsuccessUrl=\"mdrtbEditPatient.form\";\n\t\t}\n\t\t\n\t\treturn successUrl;\n\t}", "public String getPath() throws Exception {\n\t\t/*\n\t\t * return \"/news-oppsRecord\" + doc.selectSingleNode\n\t\t * (\"/metadataFieldInfo/field/@path\").getText();\n\t\t */\n\t\treturn doc.selectSingleNode(\"/metadataFieldInfo/field/@path\").getText();\n\t}", "public String getInputPath2() {\n\t\treturn inputPath2;\n\t}", "private String getResourcePath() {\n\t\tString reqResource = getRequest().getResourceRef().getPath();\n\t\treqResource = actualPath(reqResource, 1);\n\t\tLOGGERS.info(\"reqResourcePath---->\" + reqResource);\n\t\treturn reqResource;\n\t}", "public StringDt getXpathElement() { \n\t\tif (myXpath == null) {\n\t\t\tmyXpath = new StringDt();\n\t\t}\n\t\treturn myXpath;\n\t}", "void addIdentifiersToXPath(StringBuffer out, \n\t\tElement el2, Map<Namespace, String> ns2Prefix) {\n\tAttributeUniqenessAnalyser anal = new AttributeUniqenessAnalyser();\n\tAttDataObj uniqueAttr = anal.getUniqueAttributeForElement(el2);\n\tif(uniqueAttr!=null){\n\t\tout.append(\"[@\");\n\t\tout.append(getAttStrForAtt(uniqueAttr.att)).append(\"='\");\n\t\tString val = el2.getAttribute(uniqueAttr.name, uniqueAttr.ns).getValue();\n\t\tout.append(escape(val)).append(\"']\");\n\t\t\n\t}else {\n\t\tint indx =anal.getIndexForElementAmongstSiblings(el2);\n\t\tif(indx!=-1)\n\t\tout.append(\"[\").append(indx)\n\t\t.append(\"]\");\n\t}\n}", "public static By getContactNameInLLInfo(String partNum){\n\t\t return By.xpath(\"//p[contains(.,'Insight Part #: \"+partNum+\"')]/following::div[@class='row expanded is-collapse-child'][1]//input[@name='licenseInformation.CONTACT_NAME']\");\n\t }", "@ZAttr(id=775)\n public String getDomainAliasTargetId() {\n return getAttr(Provisioning.A_zimbraDomainAliasTargetId, null);\n }", "public String getPathFileOut() {\r\n\t\treturn pathFileOut;\r\n\t}", "public String getPathName() {\n\t\treturn pathName;\n\t}", "public String getPath()\r\n/* 26: */ {\r\n/* 27:57 */ return this.path;\r\n/* 28: */ }", "public StringDt getPathElement() { \n\t\tif (myPath == null) {\n\t\t\tmyPath = new StringDt();\n\t\t}\n\t\treturn myPath;\n\t}", "URL getWuicXmlPath() {\n return wuicXmlPath;\n }", "public String getDescendencyPath() {\n if (isLeaf()) {\n return getName();\n }\n else {\n return getName() + \".\" + getChild().getDescendencyPath();\n }\n }", "public String getPath(){\n\t\t\treturn this.path;\n\t\t}", "org.apache.xmlbeans.impl.xb.xsdschema.SelectorDocument.Selector.Xpath xgetXpath();", "public HashSet<String> getUsefulAttributes() {\n\t\t \n\t\tHashSet<String> attr = new HashSet<>();\n\t\tQuery firstQ = this.rset.get(1); // get first query on rewriting set 'rset'.\n\t\t\n\t\tGrouping gPart = firstQ.getQueryTriple()._1();\n\t attr.addAll(gPart.getUsefulAttributes());\n\t \n\t Measuring mPart = firstQ.getQueryTriple()._2();\n\t attr.addAll(mPart.getMeasuringAttributes());\n\t \n\t\treturn attr;\n\t}", "public String getIdenticalPath() {\n return ipath;\n }", "public String getXslFile() {\n return directory_path2;\n }", "public String getPath() {\n\t\treturn getString(\"path\");\n\t}", "public java.lang.String getPath1() {\n return path1;\n }", "public String getOutputPath () \n\t{\n\t\treturn outputPathTextField.getText();\n\t}", "public String getPathName();", "private String getFieldUsingXPath(String xpathQuery) {\n\t\tif (logger.isLoggable(Level.FINEST)) {\n\t\t\tlogger.entering(sourceClass, \"getFieldUsingXPath\");\n\t\t}\n\t\tString result = null;\n\t\ttry {\n\t\t\tresult = DOMUtil.value(this.data, xpathQuery, NamespacesConnections.nameSpaceCtx);\n\t\t} catch (XMLException e) {\n\t\t\tlogger.log(Level.SEVERE, Messages.MessageGenericError + \"getFieldUsingXPath\");\n\t\t}\n\t\tif (logger.isLoggable(Level.FINEST)) {\n\t\t\tlogger.exiting(sourceClass, \"getFieldUsingXPath\");\n\t\t}\n\t\treturn result;\n\t}", "public String getResultPath() {\n\t\tString append = (DBCatalog.getCatalog().inputPath.contains(\"/\") ? \"/sortResult\" : \"\\\\sortResult\");\n\t\treturn tempsubdir + append;\n\t}", "String getPathName();", "String getPathName();", "public String getPathName()\n {\n return getString(\"PathName\");\n }", "public java.lang.String getPathNameA() {\n String result = getNameA();\n Namespace container = this.getNamespace();\n while ( container != null ) {\n result = container.getNameA() + \"::\" + result;\n container = container.getNamespace();\n }\n return result;\n }", "@Override \n public String getPathInfo() {\n if (pathInfo != null) {\n return pathInfo;\n }\n \n StringBuilder buffer = new StringBuilder();\n if (getRequestURIWithoutQuery().length() > 0) {\n if (getScriptName().length() > 0 && getRequestURIWithoutQuery().indexOf(getScriptName()) == 0) {\n buffer.append(getRequestURIWithoutQuery().substring(getScriptName().length()));\n } else {\n buffer.append(getRequestURIWithoutQuery());\n }\n } else {\n buffer.append(getServletPath());\n if (super.getPathInfo() != null) {\n buffer.append(super.getPathInfo());\n }\n }\n return pathInfo = buffer.toString();\n }", "public String destinationAttributeName() {\n return this.destinationAttributeName;\n }", "private String solutionPath(State goal)\n\t{\n\t\t// TODO \n\t\t\n\t\treturn null; \n\t}", "@DSSource({DSSourceKind.FILE_INFORMATION})\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.376 -0500\", hash_original_method = \"AC6673E983BE229DBE393CCBB4A72E75\", hash_generated_method = \"03FD0CE5F473571E708DB9317FA1B856\")\n \npublic String getURI (String prefix)\n {\n return currentContext.getURI(prefix);\n }", "public String getRelativeflag() {\n return (String)getAttributeInternal(RELATIVEFLAG);\n }", "public String getQualifiedName() {\n if (probe.getHost() != null) {\n return probe.getHost().getName() + \"/\" + getName();\n } else {\n return \"/\" + getName();\n }\n }", "String getQualifiedName();", "public String qualifiedDocName() { return \"\"; }", "public java.lang.String getAccession()\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(ACCESSION$2, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }", "public java.lang.String getRequires()\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(REQUIRES$28);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }", "public String getPrefix() { return \"linknode\"; }", "private String getElementRefExt(Node elementRefNode, XmlProcessor simpleXmlProcessor)\n\t\t\tthrows XPathExpressionException {\n\t\tString extension = \"\";\n\t\tif (elementRefNode.hasChildNodes()) {\n\t\t\tNode childNode = elementRefNode.getFirstChild();\n\t\t\tif (\"attribute\".equals(childNode.getNodeName())) {\n\t\t\t\textension = childNode.getAttributes().getNamedItem(ATTR_UUID).getNodeValue();\n\t\t\t}\n\t\t} else {\n\t\t\tString id = elementRefNode.getAttributes().getNamedItem(ID).getNodeValue();\n\t\t\tNode qdmNode = simpleXmlProcessor.findNode(simpleXmlProcessor.getOriginalDoc(),\n\t\t\t\t\t\"/measure/elementLookUp/qdm[@uuid='\" + id + \"']\");\n\t\t\tif (qdmNode != null) {\n\t\t\t\tString dataType = qdmNode.getAttributes().getNamedItem(DATATYPE).getNodeValue();\n\t\t\t\tString qdmName = qdmNode.getAttributes().getNamedItem(NAME).getNodeValue();\n\t\t\t\textension = qdmName + \"_\" + dataType;\n\t\t\t\tif (qdmNode.getAttributes().getNamedItem(INSTANCE) != null) {\n\t\t\t\t\textension = qdmNode.getAttributes().getNamedItem(INSTANCE).getNodeValue() + \"_\" + extension;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn StringUtils.deleteWhitespace(extension);\n\t}", "public String path() {\n return this.path;\n }", "public String path() {\n return this.path;\n }", "public static NamedNodeMap checkStepName(String stepName, NodeList result) {\r\n \tNamedNodeMap nnm=null;\r\n \tfor(int i=0;i<result.getLength();i++) {\r\n \t\tnnm=result.item(i).getAttributes();\r\n \t\tfor(int j=0;j<nnm.getLength();j++) {\r\n \t\t\t\r\n \t\t}\r\n \t}\r\n \treturn nnm;\r\n }", "@Override\n\t@XmlTransient\n\tpublic Path getPath() {\n\t\treturn path;\n\t}", "java.lang.String getAttribute();", "public int path(){\n\t\treturn this.path;\n\t}", "public String getPathname() {return this.pathname;}", "public String toLocalPath() {\n\n String parentPath = parent.toLocalPath();\n return StringUtils.isBlank(parentPath)\n ? element.getElement()\n : new StringBuilder()\n .append(parentPath)\n .append('.')\n .append(element.getElement())\n .toString();\n }", "public String getDataPath() {\n\t\treturn \"data\";\r\n\t}", "public String customPath() {\n return this.customPath;\n }", "String getAttribute();", "@Override\n public StringBuilder toString(StringBuilder sb) {\n super.toString(sb);\n sb.append(\" Alias: \").append(name).append(\"\\n\");\n return sb;\n }", "@Override\n public StringBuilder toString(StringBuilder sb) {\n super.toString(sb);\n sb.append(\" Alias: \").append(name).append(\"\\n\");\n return sb;\n }", "public abstract String getConfigElementName();", "String getPath() {\r\n\t\treturn path;\r\n\t}", "@Override\n\tpublic String alias() {\n\t\treturn toString();\n\t}", "@PublicAtsApi\n public String getRootElementXPath() {\n\n return this.root.getUniquePath();\n }", "protected String getPath ()\n\t{\n\t\treturn path;\n\t}", "private Predicate<String> paths() {\r\n\t\t// Match all paths except /error\r\n\t\treturn Predicates.and(PathSelectors.regex(\"/.*\"), Predicates.not(PathSelectors.regex(\"/error.*\")));\r\n\t}", "protected void setupRequestPathExp(StringBuilder sb, RomanticTransaction tx) {\n final String requestPath = tx.getRequestPath();\n if (requestPath != null) {\n sb.append(\", \").append(requestPath);\n }\n }", "public String domAttributeName() {\n return this.domAttributeName;\n }" ]
[ "0.5009124", "0.49349982", "0.4768785", "0.4759581", "0.47481984", "0.46854618", "0.46762338", "0.4599682", "0.45246553", "0.45000958", "0.44749805", "0.4466716", "0.446219", "0.444673", "0.44395685", "0.44286463", "0.44184795", "0.4388816", "0.43867823", "0.4362172", "0.43520328", "0.43509486", "0.43365014", "0.43320945", "0.43289104", "0.43218088", "0.43197104", "0.4319011", "0.43109176", "0.4289983", "0.42829186", "0.4272248", "0.42573166", "0.42515948", "0.4242172", "0.42414454", "0.4227451", "0.42260337", "0.42167482", "0.42126483", "0.42084876", "0.41851464", "0.41842937", "0.41583508", "0.41577247", "0.4142586", "0.41318658", "0.41290775", "0.4112549", "0.4112294", "0.41113928", "0.4098389", "0.40971678", "0.4093676", "0.40882844", "0.40869296", "0.40841904", "0.4075863", "0.40719357", "0.40684977", "0.40674847", "0.40671808", "0.40598464", "0.4059706", "0.40562457", "0.40562457", "0.4053691", "0.404273", "0.40423337", "0.4037501", "0.40346065", "0.40252295", "0.40239483", "0.4015693", "0.4015331", "0.40147176", "0.40140086", "0.4013196", "0.4010521", "0.40033078", "0.4002672", "0.4002672", "0.3998208", "0.39967853", "0.39924514", "0.39796814", "0.39767838", "0.3969543", "0.39687625", "0.39660916", "0.396562", "0.39635715", "0.39635715", "0.39629295", "0.39580578", "0.39535385", "0.3952066", "0.3950628", "0.39506236", "0.39504623", "0.39496937" ]
0.0
-1
Set the value of the successProperty property.
public void setSuccessProperty(String successProperty) { this.successProperty = successProperty; this.handleConfig("successProperty", successProperty); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSuccess(boolean value) {\r\n this.success = value;\r\n }", "public void setSuccess(boolean success) {\n this.success = success;\n }", "public void setSuccess(boolean success) {\n this.success = success;\n }", "private void setSuccess(boolean value) {\n \n success_ = value;\n }", "private void setSuccess(boolean value) {\n \n success_ = value;\n }", "private void setSuccess(boolean value) {\n \n success_ = value;\n }", "protected void setSuccess(boolean newSuccess)\r\n {\r\n success = newSuccess;\r\n }", "public void setSuccess(boolean success);", "public void setSuccess(boolean success) {\n logger.info(Thread.currentThread().getStackTrace()[1].getMethodName());\n logger.debug(\"Setting success to -> \"+ success);\n this.success = success;\n }", "public void setSuccess(final boolean value)\n\t{\n\t\tsetSuccess( getSession().getSessionContext(), value );\n\t}", "public ChannelProgressivePromise setSuccess()\r\n/* 41: */ {\r\n/* 42: 73 */ return setSuccess(null);\r\n/* 43: */ }", "public void setSuccess(final SessionContext ctx, final Boolean value)\n\t{\n\t\tsetProperty(ctx, SUCCESS,value);\n\t}", "public void setSuccess(final Boolean value)\n\t{\n\t\tsetSuccess( getSession().getSessionContext(), value );\n\t}", "public void setOperationSuccess(boolean value) {\n this.operationSuccess = value;\n }", "public Builder setSuccess(boolean value) {\n \n success_ = value;\n onChanged();\n return this;\n }", "public void setIsSuccess(boolean value) {\n this.isSuccess = value;\n }", "public Builder setSuccess(boolean value) {\n copyOnWrite();\n instance.setSuccess(value);\n return this;\n }", "public Builder setSuccess(boolean value) {\n copyOnWrite();\n instance.setSuccess(value);\n return this;\n }", "public Builder setSuccess(boolean value) {\n copyOnWrite();\n instance.setSuccess(value);\n return this;\n }", "public String getSuccessProperty() {\n\t\tif (null != this.successProperty) {\n\t\t\treturn this.successProperty;\n\t\t}\n\t\tValueExpression _ve = getValueExpression(\"successProperty\");\n\t\tif (_ve != null) {\n\t\t\treturn (String) _ve.getValue(getFacesContext().getELContext());\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public void setIsSuccess(boolean isSuccess) {\r\n this.isSuccess = isSuccess;\r\n }", "public void setActionSuccess(boolean actionSuccess)\n {\n m_actionSuccess = actionSuccess;\n }", "@Required\n\tpublic void setSuccessView(String successView) {\n\t\tthis.successView = successView;\n\t}", "public ChannelProgressivePromise setSuccess(Void result)\r\n/* 46: */ {\r\n/* 47: 78 */ super.setSuccess(result);\r\n/* 48: 79 */ return this;\r\n/* 49: */ }", "public Boolean getSuccess() {\n\t\treturn success;\n\t}", "public void setIsSuccess(Integer isSuccess) {\n this.isSuccess = isSuccess;\n }", "public boolean patenteSuccess() {\n return this.success;\n }", "public boolean getSuccess() {\n return success_;\n }", "public boolean getSuccess() {\n return success_;\n }", "public boolean getSuccess() {\n return success_;\n }", "public boolean getSuccess() {\n return success_;\n }", "public void setSuccess(final SessionContext ctx, final boolean value)\n\t{\n\t\tsetSuccess( ctx,Boolean.valueOf( value ) );\n\t}", "public boolean getSuccess() {\n return success_;\n }", "@Override\n public void onSetSuccess() {\n }", "@Override\n public void onSetSuccess() {\n }", "@Override\n public void markSuccess() {\n }", "public Promise<V> setSuccess(V result)\r\n/* 311: */ {\r\n/* 312:397 */ if (setSuccess0(result))\r\n/* 313: */ {\r\n/* 314:398 */ notifyListeners();\r\n/* 315:399 */ return this;\r\n/* 316: */ }\r\n/* 317:401 */ throw new IllegalStateException(\"complete already: \" + this);\r\n/* 318: */ }", "public void setSuccessIndicator(boolean value) {\n this.successIndicator = value;\n }", "public void setOnSuccessEvent(SuccessEvent e) {\n successEvent = e;\n }", "public void setAsSuccessful_OK(){\n setStatus(200);\n }", "public int getSuccess() {\n return success;\n }", "private boolean setSuccess0(V result)\r\n/* 407: */ {\r\n/* 408:494 */ if (isDone()) {\r\n/* 409:495 */ return false;\r\n/* 410: */ }\r\n/* 411:498 */ synchronized (this)\r\n/* 412: */ {\r\n/* 413:500 */ if (isDone()) {\r\n/* 414:501 */ return false;\r\n/* 415: */ }\r\n/* 416:503 */ if (result == null) {\r\n/* 417:504 */ this.result = SUCCESS;\r\n/* 418: */ } else {\r\n/* 419:506 */ this.result = result;\r\n/* 420: */ }\r\n/* 421:508 */ if (hasWaiters()) {\r\n/* 422:509 */ notifyAll();\r\n/* 423: */ }\r\n/* 424: */ }\r\n/* 425:512 */ return true;\r\n/* 426: */ }", "public boolean isSuccess() {\r\n return success;\r\n }", "public boolean isSuccess() {\r\n return success;\r\n }", "public boolean isSuccess() {\n return mSuccess;\n }", "public boolean isSetSuccess() {\r\n return this.success != null;\r\n }", "public boolean isSetSuccess() {\r\n return this.success != null;\r\n }", "public boolean isSetSuccess() {\r\n return this.success != null;\r\n }", "public boolean isSetSuccess() {\r\n return this.success != null;\r\n }", "public boolean isSetSuccess() {\r\n return this.success != null;\r\n }", "public boolean isSetSuccess() {\r\n return this.success != null;\r\n }", "public boolean isSuccess()\r\n {\r\n return success;\r\n }", "public boolean isSuccess() {\n return success;\n }", "public boolean isSuccess() {\n return success;\n }", "public boolean isSuccess() {\n return success;\n }", "boolean getSuccess();", "boolean getSuccess();", "boolean getSuccess();", "boolean getSuccess();", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }", "public boolean isSetSuccess() {\n return this.success != null;\n }" ]
[ "0.7531059", "0.741079", "0.741079", "0.7387937", "0.7387937", "0.7387937", "0.7309768", "0.7156466", "0.7066562", "0.69191456", "0.68706495", "0.6831058", "0.6802845", "0.67962277", "0.6789181", "0.6739903", "0.66774845", "0.66774845", "0.66774845", "0.66768324", "0.6516288", "0.6488686", "0.6416788", "0.6311606", "0.6249155", "0.6178177", "0.61143744", "0.6091066", "0.6091066", "0.6091066", "0.6091066", "0.6083521", "0.60805744", "0.6024978", "0.6024978", "0.6014185", "0.60013485", "0.5969039", "0.5913627", "0.59014994", "0.59000695", "0.5875791", "0.58340484", "0.58340484", "0.5827585", "0.5811113", "0.5811113", "0.5811113", "0.5811113", "0.5811113", "0.5811113", "0.57781947", "0.5773675", "0.5773675", "0.5773675", "0.57657754", "0.57657754", "0.57657754", "0.57657754", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955", "0.57607955" ]
0.85985637
0
The DomQuery path from which to retrieve thetotal number of records in the dataset. This is only needed if the whole dataset is not passed in one go, but is being paged from the remote server.
public String getTotalProperty() { if (null != this.totalProperty) { return this.totalProperty; } ValueExpression _ve = getValueExpression("totalProperty"); if (_ve != null) { return (String) _ve.getValue(getFacesContext().getELContext()); } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getNumXPathSegments() {\n return xPath.size();\n }", "int getQueryItemsCount();", "public int getXpathCount(final String xpath);", "int getQueriesCount();", "public int getQueryLength()\n\t{\n\t\treturn myQueryLength;\n\t}", "public static int getRecordNum(IQueryResult queryResult) {\r\n Map<String, List<IRecord>> allRecords = queryResult.getRecords();\r\n int n = 0;\r\n for (List<IRecord> values : allRecords.values()) {\r\n n += values.size();\r\n }\r\n return n;\r\n }", "private int getRecordsCount(final HtmlPage resultPage) {\n if (resultPage == null) {\n return 0;\n }\n \n DomElement countElement = resultPage.getElementById(\"K66\");\n if (countElement == null) {\n return 0;\n }\n \n return Integer.parseInt(countElement.getTextContent().replaceAll(\"[^0-9]\", \"\"), 10);\n }", "public double getRows()\n {\n // TODO: factor in search key directives\n return RelMetadataQuery.getRowCount(sourceRel);\n }", "int getNumbersOfRowsInFolder(String path) {\n return getFilesInFolder(path).length;\n }", "int getDataCount();", "int getDataCount();", "int getDataCount();", "int getDataCount();", "int getDataCount();", "public int getPathCount() {\n return path_.size();\n }", "public int getPathCount() {\n return path_.size();\n }", "public int getNumOfPath(){\r\n\t\treturn numOfPath;\r\n\t}", "public int dataCount() {\n return this.root.dataCount();\n }", "Long getNumberOfElement();", "@Override\n\tpublic int totalPathLength() {\n\t\treturn totalPathLength(root, sum);// returns total path lenght number\n\t}", "int getPathsCount();", "public int query() {\n return totalcount;\n }", "public Integer getPageCount();", "int findAllCount() ;", "public int getQueriesCount() {\n return queries_.size();\n }", "private int getRecordsCountWithComment(final HtmlPage resultPage) {\n int recordsCount = getRecordsCount(resultPage);\n \n if (resultPage == null || recordsCount == 0) {\n logger.info(\"No results found\");\n return 0;\n } else if (recordsCount > RECORDS_MAX_COUNT) {\n logger.warn(\"Count of records ({}) exceeded the limit of {}\", recordsCount, RECORDS_MAX_COUNT);\n } else {\n logger.info(\"{} records found\", recordsCount);\n }\n\n return recordsCount;\n }", "public Long getElementCount();", "public int totalRowsCount();", "public Integer getPathLength() {\n return pathLength;\n }", "public int getPathLength();", "public int getDatasetIdsCount() {\n return datasetIds_.size();\n }", "public int getDataSetCount() {\n EntityManager em = getEntityManager();\n try {\n CriteriaQuery cq = em.getCriteriaBuilder().createQuery();\n Root<DataSet> rt = cq.from(DataSet.class);\n cq.select(em.getCriteriaBuilder().count(rt));\n Query q = em.createQuery(cq);\n return ((Long) q.getSingleResult()).intValue();\n } finally {\n em.close();\n }\n }", "@Override\r\n\tpublic int countData(PageCriteria pCri) throws Exception {\n\t\treturn ss.selectOne(\"countData\", pCri);\r\n\t}", "int getRowsCount();", "int getPagesize();", "public int size()\n {\n return queries.size();\n }", "public int getDatasetIdsCount() {\n return datasetIds_.size();\n }", "public int getSourcePathCount() {\n if (sourcePathBuilder_ == null) {\n return sourcePath_.size();\n } else {\n return sourcePathBuilder_.getCount();\n }\n }", "int getRecordCount();", "public int getPathLength()\r\n\t{\r\n\t\treturn path.size();\r\n\t}", "public long getRelationCount();", "@Override\n\tpublic int queryCountOfRows() {\n\t\treturn parentDao.queryCountOfRows();\n\t}", "int getDocumentCount();", "public int getNUMBEROFRECORDS() {\n return numberofrecords;\n }", "int sizeOfPathArray();", "public int query() {\n return count;\n }", "private int getDataLength(String urlString, String name)\n throws RedmineException\n {\n final int[] result = new int[1];\n\n getData(urlString,name,0,1,new ParseElementHandler()\n {\n public void root(Element element)\n {\n result[0] = getIntAttribute(element,\"total_count\");\n }\n public void data(Element element)\n {\n }\n });\n if (Settings.debugFlag)\n {\n System.err.println(\"DEBUG: Get length '\"+urlString+\"': \"+result[0]);\n }\n\n return result[0];\n }", "public long getAllRelationCount();", "public abstract int \t\tgetNodeRowCount(int nodeIndex);", "Long recordCount();", "public long countRecords();", "public int actualRowCount() {\n\t\tint actualRawCount = 0;\n\t\tList<WebElement> paginationCount = driver.findElements(By.xpath(\"//div[@id='example_paginate']/span/a\"));\n\t\tint rowCountPagination = paginationCount.size();\n\t\ttry {\n\t\t\t\n\t\t\tif (rowCountPagination > 0) {\n\t\t\t\tTestLog.log.info(\"click on pagination link \");\n\t\t\t\tfor (int i = 0; i < rowCountPagination; i++) {\n\t\t\t\t\tdriver.findElements(By.xpath(\"//div[@id='example_paginate']/span/a\")).get(i).click();\n\t\t\t\t\tactualRawCount = (actualRawCount + driver.findElements(By.tagName(\"tr\")).size())-1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbtnFirst.click();\n\t\t\t\t\n\t\t\t}\n\n\t\t} catch (Exception ex) {\n\t\t\t\n\t\t\tTestLog.log.info(\"Could not find table\" + ex);\n\t\t}\n\t\treturn actualRawCount;\n\t}", "public abstract int deepRowCount();", "public int getCalculatedPathsCount() {\n\t\treturn calculatedPathsCount;\n\t}", "public abstract int getNodeRowCount();", "public void storeXpathCount(final String xpath, final String variableName);", "public int getTotalCount() {\r\n return root.getTotalCount();\r\n }", "@Override\r\n\tpublic int queryListCount() {\n\t\treturn crawlerCronJobDao.queryListCount();\r\n\t}", "public abstract String get_size(DataRequest source) throws ConnectorOperationException;", "public Graph runNumberOfPathThroughAnyLink(AdjacencyMatrix m){\r\n\t\tGraph graph = new Graph(m);\r\n\t\treturn PathCount.getNumberOfPathThroughAnyLink(graph);\r\n\t}", "public int getRecCnt () {\n return (getRecCnt(\"1=1\"));\n }", "public int getTotalRows();", "public int getTotalRecords() {\r\n return totalRecords;\r\n }", "public int getQueriesSize() {\n\t\tint result = 0;\n\t\tfor (QueryInfo oneQ : this.maxQueries) {\n\t\t\tresult += oneQ.getFrequency();\n\t\t}\n\t\treturn result;\n\t}", "int getNumberOfDocuments();", "public String ExecuteCypherQueryReturnCount(String cypherQuery) {\r\n\t\tString nodeString = \"\";\r\n\t\tNodeController nc = new NodeController();\r\n\t\tExecutionEngine engine = new ExecutionEngine( _db );\r\n\t\tExecutionResult result = null;\r\n\t\tTransaction tx = _db.beginTx();\r\n\t\ttry {\r\n\t\t result = engine.execute(cypherQuery);\r\n\t\t Iterator<Long> iterator = result.columnAs(\"count(*)\");\r\n\t\t nodeString = Long.toString(iterator.next());\r\n\t\t tx.success();\r\n\t\t} catch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t\tSystem.out.print(\"issues with fetching node and its relations\");\r\n\t\t\ttx.failure();\r\n\t\t\t//return \"failed\";\r\n\t\t} finally {\r\n\t\t\ttx.close();\r\n\t\t}\r\n\t\t\r\n\t\treturn nodeString;\r\n\t}", "int getHdfsMetricsCount();", "public int getNumOfRecords() {\n return records.size();\n }", "public String getTotalDomainFiles() {\n return this.totalDomainFiles;\n }", "public int domainDimension() {\n return dvModel.totalParamSize();\r\n }", "public int getRowsPerPage();", "public int getTotalRecords() {\n return totalRecords;\n }", "public int getRowCount() {\n return downloadList.size();\n }", "public String getNumContentResources4Sql()\r\n \t{\r\n \t\treturn \"select count(IN_COLLECTION) from CONTENT_COLLECTION where IN_COLLECTION = ?\";\r\n \t}", "public Graph runNumberOfPathThroughAnyNode(AdjacencyMatrix m){\r\n\t\tGraph graph = new Graph(m);\r\n\t\treturn PathCount.getNumberOfPathThroughAnyNode(graph);\t\r\n\t}", "protected abstract int getNumRecords();", "protected int getTotalPages(FacesContext context) {\n String forValue = (String) getAttributes().get(\"for\");\n UIData uiData = (UIData) getForm(context).findComponent(forValue);\n if (uiData == null) {\n return 0;\n }\n int rowsPerPage = uiData.getRows(); \n int totalRows = uiData.getRowCount();\n int result = totalRows / rowsPerPage;\n if (0 != (totalRows % rowsPerPage)) {\n result++;\n }\n return result;\n }", "@Override\n public long getQueryHitCount(ViewRowSetImpl viewRowSet) {\n long value = super.getQueryHitCount(viewRowSet);\n return value;\n }", "@GET\n @Path(\"count\")\n public Response getDeviceCount() {\n try {\n Integer count = DeviceMgtAPIUtils.getDeviceManagementService().getDeviceCount();\n return Response.status(Response.Status.OK).entity(count).build();\n } catch (DeviceManagementException e) {\n String msg = \"Error occurred while fetching the device count.\";\n log.error(msg, e);\n return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build();\n }\n }", "public int executeCountQuery(String xmlMessage) throws IOException \n {\n URL biomartServer = new URL(SZBIOMARTURL);\n URLConnection conn = biomartServer.openConnection();\n\t\n // use POST method\n conn.setDoOutput(true);\n OutputStreamWriter osw = new OutputStreamWriter(conn.getOutputStream());\n osw.write(\"query=\" + URLEncoder.encode(xmlMessage, \"UTF-8\"));\n osw.flush(); \n \n // read the response into a file\n BufferedReader brresponse = new BufferedReader(new InputStreamReader(conn.getInputStream()));\t\n String ln;\n\n ln = brresponse.readLine();\n brresponse.close();\n osw.close();\n int numlines;\n\n try\n {\n numlines = Integer.parseInt(ln);\n }\n catch (NumberFormatException nfex)\n {\n\t throw new IllegalArgumentException(\"Count query did not return a number, instead returned \"+ln);\n }\n\n if (numlines < 1)\n {\n throw new IllegalArgumentException(\"Count query returned \"+numlines+\" records. The number of \"+\n \"records must be positive!\");\n }\n\n return numlines;\n }", "public int sizeOfDependLineIDArray()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(DEPENDLINEID$26);\n }\n }", "public int getRowCount() {\n\t return downloadList.size();\n }", "public Long count(DatasetItem dataset) {\n\n logTrace(\"Getting Number of Transactions in Dataset with query :: \" + COUNT_QUERY);\n\n Long numResults = (Long)getHibernateTemplate().find(\n COUNT_QUERY, dataset.getId()).get(0);\n return numResults;\n }", "public XPath getCount()\n {\n return m_countMatchPattern;\n }", "@Override\r\n\tpublic int findTotalRecords(String cid) throws Exception {\n\t\treturn 0;\r\n\t}", "public int getPathsCount() {\n return paths_.size();\n }", "public int length() {\n return records.size();\n }", "public int getDataCount() {\n return data_.size();\n }", "public int getRowNumberPerQuery() {\n return rowNumberPerQuery;\n }", "public int getNumberOfDVRecords()\r\n/* 66: */ {\r\n/* 67:142 */ return this.numDVRecords;\r\n/* 68: */ }", "public int getSourcepathCount() {\n return sourcepath_.size();\n }", "public Integer countOfNode(NodeParam queryParam) throws NodeMgrException {\n log.debug(\"start countOfNode queryParam:{}\", JsonTools.toJSONString(queryParam));\n try {\n Integer nodeCount = nodeMapper.getCount(queryParam);\n log.debug(\"end countOfNode nodeCount:{} queryParam:{}\", nodeCount,\n JsonTools.toJSONString(queryParam));\n return nodeCount;\n } catch (RuntimeException ex) {\n log.error(\"fail countOfNode . queryParam:{}\", queryParam, ex);\n throw new NodeMgrException(ConstantCode.DB_EXCEPTION);\n }\n }", "@Override\n\tprotected int fetchRecordsNumber() {\n\t\treturn new Categories().count();\n\t}", "public int getSourcepathCount() {\n return sourcepath_.size();\n }", "Long getAllCount();", "public int countDependencies() {\r\n int Dependencies = 0;\r\n for (FileLine s : getQueryData()) {\r\n if (s.isDependency()) {\r\n Dependencies++;\r\n }\r\n }\r\n return Dependencies;\r\n }", "public int getListCount() { return this.urlSeries.size(); }", "int getSourcepathCount();", "int getSourcepathCount();", "public int getPathsCount() {\n return paths_.size();\n }", "int getNodeCount();" ]
[ "0.58986044", "0.5722803", "0.5546459", "0.5518654", "0.55163324", "0.54544973", "0.543106", "0.5354017", "0.5346001", "0.52614677", "0.52614677", "0.52614677", "0.52614677", "0.52614677", "0.5241554", "0.5235784", "0.52356046", "0.52339375", "0.52100986", "0.5167465", "0.5164237", "0.5150981", "0.5140712", "0.51252884", "0.5124349", "0.51225466", "0.5113522", "0.5112077", "0.5098193", "0.5094193", "0.5091583", "0.5082192", "0.5076757", "0.50607985", "0.5058853", "0.50578105", "0.50529563", "0.50443864", "0.5043514", "0.501454", "0.5011523", "0.5002367", "0.49850637", "0.4954318", "0.49499825", "0.494817", "0.49455178", "0.49342042", "0.49311337", "0.4919257", "0.491153", "0.4910204", "0.49090222", "0.49074057", "0.48930463", "0.48810554", "0.48803636", "0.48703954", "0.48665702", "0.48628554", "0.48580623", "0.4856393", "0.48366693", "0.48362032", "0.48323852", "0.4831127", "0.4830341", "0.4829313", "0.48042193", "0.47947732", "0.4793423", "0.47838512", "0.47823542", "0.47818494", "0.47744983", "0.47742113", "0.4772513", "0.4772501", "0.47687915", "0.4755128", "0.47546735", "0.47480857", "0.47419992", "0.47400734", "0.47343847", "0.4731258", "0.47254533", "0.47245705", "0.4722135", "0.47217086", "0.47208774", "0.47189957", "0.47167367", "0.47164994", "0.4716249", "0.4714469", "0.47131297", "0.47078505", "0.47078505", "0.4707163", "0.4706606" ]
0.0
-1
Set the value of the totalProperty property.
public void setTotalProperty(String totalProperty) { this.totalProperty = totalProperty; this.handleConfig("totalProperty", totalProperty); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setTotal(int value) {\n this.total = value;\n }", "public void setTotal(int total) {\n this.total = total;\n }", "public void setTotal(Double total);", "public void setTotal(float total) {\n this.total = total;\n }", "public void setTotal(Double total) {\n this.total = total;\n }", "public void setTotal(Double total) {\n this.total = total;\n }", "public void setTotal(Double total) {\n this.total = total;\n }", "public void setTotal(int total) {\n\t\tthis.total = total;\n\t}", "public void setTotal (java.lang.Double total) {\r\n\t\tthis.total = total;\r\n\t}", "public void setTotal(Number value) {\n setAttributeInternal(TOTAL, value);\n }", "void setTotal(BigDecimal total);", "public void setTotalNum(Integer totalNum) {\n this.totalNum = totalNum;\n }", "public void setTotal(BigDecimal total) {\n this.total = total;\n }", "public void setTotal(BigDecimal total) {\n this.total = total;\n }", "public final ReadOnlyDoubleProperty totalProperty() {\n return total.getReadOnlyProperty();\n }", "public void setTotal(Coverage total) {\n this.total = total;\n }", "@Override\r\n\tpublic IPage<T> setTotal(long total) {\n\t\treturn null;\r\n\t}", "@Deprecated\n @JsonProperty\n public void setTotal(final long total) {\n //do nothing\n }", "public void setTotalCount(int totalCount) {\n this.totalCount = totalCount;\n }", "@Test\n public void setTotal() throws NegativeValueException {\n cartItem.setTotal(45);\n double expected = 45;\n double actual = cartItem.getTotal();\n assertEquals(expected, actual, 0.0);\n }", "public void setTotalCount(int total) {\r\n\t\tif(isValid)\r\n\t\t\tpercentage = count / (float) total;\r\n\t}", "public void incrementTotal() {\n\t\t\ttotal++;\n\t\t}", "public void setTotalItemCount(Integer totalItemCount) {\n this.totalItemCount = totalItemCount;\n }", "public void setTotalPageCount(Integer totalPageCount) {\n this.totalPageCount = totalPageCount;\n }", "@Test\n void setTotal() {\n Tests tests = new Tests();\n tests.setTotal(78645);\n assertEquals(78645,tests.getTotal());\n\n }", "public native int getTotal() /*-{\n\t\treturn this.total;\n\t}-*/;", "public void setTotalCount(Long totalCount) {\r\n this.totalCount = totalCount;\r\n }", "public void setTotalManPokok(double totalManPokok) {\n this.totalManPokok = totalManPokok;\n }", "public void setTotalCost(float totalCost) {\n this.totalCost = totalCost;\n }", "public void setTotalNum(Number value) {\n setAttributeInternal(TOTALNUM, value);\n }", "public void setTotal (double total) throws PatientException {\r\n if (total < 0){\r\n PatientException eTotal = new PatientException();\r\n eTotal.setMessage(\"The amount owed to the hospital cannot be negative.\");\r\n throw(eTotal);\r\n }\r\n else {\r\n this.total = total;\r\n }\r\n }", "public void setTotal(BigDecimal amount){\r\n\t\ttotal = amount.doubleValue();\r\n\t}", "public void setTotalCost(float totalCost)\r\n\t{\r\n\t\tthis.totalCost = totalCost;\r\n\t}", "public void setTotalCount(long totalCount) {\r\n\t\tif (totalCount < 0) {\r\n\t\t\tthis.totalCount = 0;\r\n\t\t} else {\r\n\t\t\tthis.totalCount = totalCount;\r\n\t\t}\r\n\t}", "public void setTotalMini(double totalMini) {\n this.totalMini = totalMini;\n }", "protected void setTotalValue(BigDecimal totalValue){\n\t\tif(totalValue.compareTo(new BigDecimal(0)) < 0){\n\t\t\tthrow new IllegalArgumentException(\"Total Value can't be less than 0: \" + totalValue);\n\t\t}\n\t\tthis.totalValue = totalValue;\n\t}", "public void setTotalprice(Integer totalprice) {\n this.totalprice = totalprice;\n }", "public void setTotalPeroid(Integer totalPeroid) {\n this.totalPeroid = totalPeroid;\n }", "public void setTotal_Venta(double total_Venta) {\n this.total_Venta = total_Venta;\n }", "public String getTotalProperty() {\n\t\tif (null != this.totalProperty) {\n\t\t\treturn this.totalProperty;\n\t\t}\n\t\tValueExpression _ve = getValueExpression(\"totalProperty\");\n\t\tif (_ve != null) {\n\t\t\treturn (String) _ve.getValue(getFacesContext().getELContext());\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "@JsonProperty(\"total_items\")\n public void setTotalItems(Long totalItems) {\n this.totalItems = totalItems;\n }", "public void setTotalResults(java.math.BigInteger totalResults)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(TOTALRESULTS$4);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(TOTALRESULTS$4);\n }\n target.setBigIntegerValue(totalResults);\n }\n }", "public void setTotale(double totale) {\n\t\t\tthis.totale = totale;\n\t\t}", "public Long total() {\n return this.total;\n }", "public void setPointsTotal(long pointsTotal)\n {\n this.pointsTotal = pointsTotal;\n }", "@Test\n public void testSetTotal() {\n System.out.println(\"setTotal\");\n int total = 0;\n DataModel instance = new DataModel();\n instance.setTotal(total);\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 setTotalDistance(int totalDistance) {\n this.totalDistance = totalDistance;\n }", "public void setTotalCost(String TotalCost) {\n this.TotalCost = TotalCost;\n }", "public void setTotalPage(String totalPage) {\r\n this.totalPage = totalPage;\r\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic <I extends ResourceCollectionTransformation<S, T>> I total(Long totalCount) {\n\t\ttarget.setTotal(totalCount);\n\t\treturn (I) this;\n\t}", "public void setGrandTotal(Float grandTotal) {\r\n this.grandTotal = grandTotal;\r\n }", "@Override\n public double getTotal() {\n return total;\n }", "public void setPktotal(Integer pktotal) {\n this.pktotal = pktotal;\n }", "public void setGrandTotal (BigDecimal GrandTotal);", "public void setGrandTotal (BigDecimal GrandTotal);", "public void setTotalprice(Long totalprice) {\n this.totalprice = totalprice;\n }", "@Override\r\n\tpublic void addTotal() {\n\t\ttotalPrice += myPrice;\r\n\t\tsetChanged();\r\n\t\tnotifyObservers(OBSERVABLE_EVENT_ADD_TOTAL);\r\n\t}", "public Builder total(final int total) {\n if (total >= 0) {\n this.total = total;\n } else {\n throw new IllegalArgumentException(WRONG_TOTAL_VALUE);\n }\n\n return this;\n }", "public void setSueldoTotal(int sueldoTotal) {\n this.sueldoTotal = sueldoTotal;\n }", "@Override\r\n public void update() {\r\n this.total = calculateTotal();\r\n }", "public Integer total() {\n return this.total;\n }", "public void setTotalManBunga(double totalManBunga) {\n this.totalManBunga = totalManBunga;\n }", "public void setTotalSpacingDegree(float totalSpacingDegree) {\n this.totalSpacingDegree = totalSpacingDegree;\n resetItems();\n }", "public void setTotalTtp(double totalTtp) {\n this.totalTtp = totalTtp;\n }", "public int total() {\n return this.total;\n }", "public void setTotalHits(long totalHits)\r\n\t{\r\n\t\tthis.totalHits = totalHits;\r\n\t}", "private void setTotalValue(String rawText){\n\t\tBigDecimal num = new BigDecimal(Double.parseDouble(rawText));\n\t\tif(num.compareTo(new BigDecimal(0)) < 0){\n\t\t\tthrow new IllegalArgumentException(\"Total Value can't be less than 0: \" + num);\n\t\t}\n\t\tsynchronized(this){\n\t\t\tthis.totalValue = num;\n\t\t}\n\t}", "public void incrementTotal(){\n total++;\n }", "public void xsetTotalResults(com.a9.spec.opensearch.x11.QueryType.TotalResults totalResults)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.a9.spec.opensearch.x11.QueryType.TotalResults target = null;\n target = (com.a9.spec.opensearch.x11.QueryType.TotalResults)get_store().find_attribute_user(TOTALRESULTS$4);\n if (target == null)\n {\n target = (com.a9.spec.opensearch.x11.QueryType.TotalResults)get_store().add_attribute_user(TOTALRESULTS$4);\n }\n target.set(totalResults);\n }\n }", "public final void setTotalAmount(Double totalamount)\r\n\t{\r\n\t\tsetTotalAmount(getContext(), totalamount);\r\n\t}", "public void setTotalAbsencePercentage(double totalAbsencePercentage) {\n //this.totalAbsencePercentageProperty.set(Math.round(totalAbsencePercentage * 100.0) / 100.0);\n this.totalAbsencePercentageProperty.set(totalAbsencePercentage);\n }", "public float getTotal(){\r\n\t\treturn Total;\r\n\t}", "public void total() {\n\t\t\n\t}", "public void setTotalAmount(BigDecimal totalAmount) {\n this.totalAmount = totalAmount;\n }", "public void setTotalStorage(long totalStorage) {\n this.totalStorage = totalStorage;\n }", "public Total getTotal() {\r\n\t\treturn total;\r\n\t}", "public int total() {\n return _total;\n }", "public void setTotalRating(double totalRating) {\n this.totalRating = totalRating;\n }", "@ApiModelProperty(value = \"Total amount of money paid (or should be paid)\")\n @JsonProperty(\"total\")\n public String getTotal() {\n return total;\n }", "public long getTotal() { return total; }", "public long getTotal() { return total; }", "public float getTotal() {\n return this.total;\n }", "public void setMontantTotal(int montantTotal_) {\n\t\tmontantTotal = montantTotal_;\n\t}", "public double getTotal() {\r\n\t\treturn total;\r\n\t}", "public void setTotalAvailable(Double totalAvailable){\n this.totalAvailable = totalAvailable;\n }", "public void setTotalScore(Double totalScore) {\n this.totalScore = totalScore;\n }", "public void setTotalPagar(Long totalPagar) {\n this.totalPagar = totalPagar;\n }", "public Double getTotal() {\n return total;\n }", "public Double getTotal() {\n return total;\n }", "public Double getTotal() {\n return total;\n }", "public double getTotal(){\n return total;\n }", "public void setIncomeTotal(){\n\t\tincomeOutput.setText(\"$\" + getIncomeTotal());\n\t\tnetIncomeOutput.setText(\"$\" + (getIncomeTotal() - getExpensesTotal()));\n\t}", "public void setTotalPageNum(Long totalPageNum) {\n\t\tthis.totalPageNum = totalPageNum;\n\t}", "public BigDecimal getTotal() {\n return total;\n }", "public BigDecimal getTotal() {\n return total;\n }", "public long getTotal() {\n return total;\n }", "public long getTotal() {\n return total;\n }", "@Override\n\tpublic void setTotalOil(int totalOil) {\n\t\tthis.totalOil += totalOil;\n\n\t}", "public double getTotal() {\n\t\treturn total;\n\t}", "public void addSales(double totalSales) {\n this.total_sales = totalSales;\n }" ]
[ "0.74636453", "0.74550736", "0.7453624", "0.73906136", "0.7333152", "0.7333152", "0.7333152", "0.7210713", "0.7108104", "0.7021252", "0.68748707", "0.68707573", "0.67595106", "0.67595106", "0.6743784", "0.6627823", "0.6567815", "0.6531689", "0.6486399", "0.64802045", "0.64716405", "0.6392153", "0.63731194", "0.6308226", "0.6302649", "0.6299669", "0.62967575", "0.6293252", "0.62751323", "0.62726605", "0.6270723", "0.624268", "0.6240282", "0.6234034", "0.62092555", "0.62026334", "0.6200802", "0.6187712", "0.61418355", "0.61327296", "0.61246926", "0.61228806", "0.611971", "0.6110925", "0.60736734", "0.6047856", "0.6047305", "0.60291886", "0.6008458", "0.6007728", "0.59960973", "0.5972282", "0.5969927", "0.5969747", "0.5969747", "0.59586936", "0.5939229", "0.59305966", "0.5927124", "0.5920328", "0.5919373", "0.59165925", "0.59063256", "0.5902108", "0.58952725", "0.5888509", "0.58796424", "0.5877393", "0.5874077", "0.5861755", "0.5859419", "0.58538634", "0.5847153", "0.58406913", "0.58392704", "0.58390814", "0.5837417", "0.583573", "0.58299834", "0.5823433", "0.5823433", "0.5808447", "0.5805829", "0.5796814", "0.5788234", "0.5775198", "0.5766796", "0.57657343", "0.57657343", "0.57657343", "0.57398057", "0.57393986", "0.5737302", "0.5736569", "0.5736569", "0.57146764", "0.57146764", "0.5708813", "0.5707207", "0.5705949" ]
0.8197842
0
A remoteInterface for the ContextListener. Copyright (c) 20022019 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information The DSOL project is distributed under a threeclause BSDstyle license, which can be found at
public interface RemoteContextListenerInterface extends Remote { /** * Called when an object has been added. * <p> * The binding of the newly added object can be obtained using <tt>evt.getNewBinding()</tt>. * @param evt NamingEvent; The nonnull event. * @see NamingEvent#OBJECT_ADDED * @throws RemoteException on network failure */ public void objectAdded(NamingEvent evt) throws RemoteException; /** * Called when an object has been removed. * <p> * The binding of the newly removed object can be obtained using <tt>evt.getOldBinding()</tt>. * @param evt NamingEvent; The nonnull event. * @see NamingEvent#OBJECT_REMOVED * @throws RemoteException on network failure */ public void objectRemoved(NamingEvent evt) throws RemoteException; /** * Called when an object has been renamed. * <p> * The binding of the renamed object can be obtained using <tt>evt.getNewBinding()</tt>. Its old binding (before the * rename) can be obtained using <tt>evt.getOldBinding()</tt>. One of these may be null if the old/new binding was * outside the scope in which the listener has registered interest. * @param evt NamingEvent; The nonnull event. * @see NamingEvent#OBJECT_RENAMED * @throws RemoteException on network failure */ public void objectRenamed(NamingEvent evt) throws RemoteException; /** * Called when an object has been changed. * <p> * The binding of the changed object can be obtained using <tt>evt.getNewBinding()</tt>. Its old binding (before the * change) can be obtained using <tt>evt.getOldBinding()</tt>. * @param evt NamingEvent; The nonnull naming event. * @see NamingEvent#OBJECT_CHANGED * @throws RemoteException on network failure. */ public void objectChanged(NamingEvent evt) throws RemoteException; /** * Called when a naming exception is thrown while attempting to fire a <tt>NamingEvent</tt>. * @param evt NamingExceptionEvent; The nonnull event. * @throws RemoteException on network exception * @throws RemoteException on network failure */ void namingExceptionThrown(NamingExceptionEvent evt) throws RemoteException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface DeviceContextChangeListener {\n\n /**\n * Notification about start phase in device context, right after successful handshake\n * @param nodeId\n * @param success or failure\n */\n void deviceStartInitializationDone(final NodeId nodeId, final boolean success);\n\n /**\n * Notification about start phase in device context, after all other contexts initialized properly\n * @param nodeId\n * @param success\n */\n void deviceInitializationDone(final NodeId nodeId, final boolean success);\n\n}", "public interface Context extends ExtensionPoint {\n /**\n * Context initialization with parameters.\n */\n void init();\n /**\n * Context run.\n */\n void run();\n /**\n * @return The created user interaction context.\n */\n UserInteractionContext getUserInteractionContext();\n}", "public interface ServerIF extends RemoteIF{\n void RegisterClient(ClientIF client) throws RemoteException;\n void WelcomeScreen() throws RemoteException;\n ArrayList<ClientIF> getClients() throws RemoteException;\n}", "public interface IGlobalContext extends IContext {\r\n\r\n\t/**\r\n\t * @return the monitor\r\n\t */\r\n\tpublic IMonitor getMonitor();\r\n\r\n\t/**\r\n\t * @param monitor the monitor to set\r\n\t */\r\n\tpublic void setMonitor(IMonitor monitor);\r\n\r\n}", "public interface IngestHandlerService extends Remote {\r\n\r\n String ingest(String xmlData, String resourceType, SecurityContext securityContext) throws EscidocException,\r\n RemoteException;\r\n\r\n String ingest(String xmlData, String resourceType, String authHandle, Boolean restAccess) throws EscidocException,\r\n RemoteException;\r\n\r\n}", "public interface Listener extends Remote{\n \n /**\n * \n * Handles new updated readings\n * @param sensors\n * @param monitorCount\n * @param sensorCount\n * @throws java.rmi.RemoteException \n */\n public void Changed(List<Sensor> sensors, int monitorCount, int sensorCount) throws java.rmi.RemoteException;\n \n /**\n * \n * Alerts monitor if the temperatures reach critical levels\n * @param sensor\n * @throws RemoteException \n */\n public void alertMonitor(Sensor sensor) throws RemoteException;\n \n /**\n * \n * Notifies monitors when a particular sensor is down\n * @param sensor\n * @throws RemoteException \n */\n public void notifySensorFailure(Sensor sensor) throws RemoteException;\n}", "public interface ServiceCallListener extends ServiceInstanceCallListener, RemoteServiceCallListener {\r\n\r\n}", "public interface OnServiceConnectionListener {\n}", "public interface LiveHostEvents extends LiveEvents{\n /** Live infomation\n * @param strUrl Rtmp/Hls url\n * @param strSessionId SessionId\n */\n public void OnRtcLiveInfomation(String strUrl, String strSessionId);\n\n /** Guest want to line with you\n * @param strPeerId Peer's ID\n * @param strUserName Peer's user name\n * @param strBrief A brief\n */\n public void OnRtcLiveApplyLine(String strPeerId, String strUserName, String strBrief);\n\n /** Guest cancel line apply\n * @param strPeerId Peer's ID\n * @param strUserName Peer's user name\n */\n public void OnRtcLiveCancelLine(String strPeerId, String strUserName);\n}", "@Override\n default IServerPrx ice_context(java.util.Map<String, String> newContext)\n {\n return (IServerPrx)_ice_context(newContext);\n }", "public static ExtendedRemoteDisplay listen(String iface, RemoteDisplay.Listener listener,\n Handler handler, Context context) {\n if (iface == null) {\n throw new IllegalArgumentException(\"iface must not be null\");\n }\n if (listener == null) {\n throw new IllegalArgumentException(\"listener must not be null\");\n }\n if (handler == null) {\n throw new IllegalArgumentException(\"handler must not be null\");\n }\n\n ExtendedRemoteDisplay display =\n new ExtendedRemoteDisplay(listener, handler, context);\n\n /*\n *\n * Before starting the next session, we need to ensure that previous\n * session has moved to DEINIT state. Ideally this should never be\n * hit, since we try to ensure in disposeInternal that the state machine moves\n * to DEINIT on teardown when disposeInternal has been invoked.\n */\n if (sState != WFDState.DEINIT) {\n Log.d(TAG, \"Waiting to move to DEINIT\");\n display.blockOnLock();\n }\n\n if (sState != WFDState.DEINIT) {\n /*\n *\n * Now, here we have created the resources like threads and handlers\n * for the ERD object. We need to clean them up from here rather than\n * waiting for the finalizer daemon and then invoking cleanup.\n *\n */\n Log.e(TAG, \"Something has gone kaput!\");\n display.dispose();\n return null;\n }\n\n Log.d(TAG, \"Waiting for RTSP server to start \");\n\n display.startListening(iface);\n\n /*\n *\n * Now wait for the worker thread to signal the start of RTSP\n * server.\n */\n display.blockOnLock();\n\n if (sState != WFDState.ESTABLISHING) {\n /*\n *\n * Now, here we have created the resources like threads and handlers\n * for the ERD object. We need to clean them up from here rather than\n * waiting for the finalizer daemon and then invoking cleanup.\n *\n */\n Log.d(TAG, \"Failed to start RTSP Server!\");\n display.dispose();\n return null;\n }\n\n /*\n * Everything's hunky-dory!\n */\n\n Log.i(TAG, \"New ERD instance \" + display);\n return display;\n }", "CTX_Context getContext();", "public interface ILamportServer extends Remote {\n public String SERVICE_NAME = \"LAMPORT_RMI\"; // Nom du service\n \n /**\n * Envoie un Message REQUEST aux autres serveurs pour annoncer le fait de \n * vouloir rentrer dans la section critique\n * @param message Le message envoyé avec une requête\n * @throws RemoteException \n */\n public void request(Message message) throws RemoteException;\n \n /**\n * Envoi du Message RESPONSE après avoir Reçu le Message REQUEST\n * @param message Le message envoyé avec une réponse\n * @throws RemoteException \n */\n public void response(Message message) throws RemoteException;\n \n /**\n * Envoie du message FREE pour indiquer aux autres serveur que l'on sort de\n * la section critique\n * @param message Le message envoyé pour libérer la section critique\n * @throws RemoteException \n */\n public void freeSC(Message message) throws RemoteException;\n \n /**\n * Métode pour modifier la variable globalle dans tous les serveurs\n * @param newValue La nouvelle valeur de la variable\n * @throws RemoteException \n */\n public void setVariableGlobally(int newValue) throws RemoteException;\n}", "public interface RemoteStorageContext\n{\n // change detection\n\n /**\n * Returns the timestamp of latest change. Will propagate to parent if it is more recently changed as this (and\n * parent is set).\n */\n long getLastChanged();\n\n // parent\n\n /**\n * Returns the parent context, or null if not set.\n * \n * @return\n */\n RemoteStorageContext getParentRemoteStorageContext();\n\n /**\n * Sets the parent context, or nullify it.\n * \n * @return\n */\n void setParentRemoteStorageContext( RemoteStorageContext parent );\n\n // modification\n\n /**\n * Gets an object from context. Will propagate to parent if not found in this context (and parent is set).\n * \n * @param key\n * @return\n */\n Object getRemoteConnectionContextObject( String key );\n\n /**\n * Puts an object into this context.\n * \n * @param key\n * @param value\n */\n void putRemoteConnectionContextObject( String key, Object value );\n\n /**\n * Removed an object from this context. Parent is unchanged.\n * \n * @param key\n */\n void removeRemoteConnectionContextObject( String key );\n\n /**\n * Returns true if this context has an object under the given key.\n * \n * @param key\n * @return\n */\n boolean hasRemoteConnectionContextObject( String key );\n\n // --\n\n boolean hasRemoteConnectionSettings();\n\n RemoteConnectionSettings getRemoteConnectionSettings();\n\n void setRemoteConnectionSettings( RemoteConnectionSettings settings );\n\n void removeRemoteConnectionSettings();\n\n boolean hasRemoteAuthenticationSettings();\n\n RemoteAuthenticationSettings getRemoteAuthenticationSettings();\n\n void setRemoteAuthenticationSettings( RemoteAuthenticationSettings settings );\n\n void removeRemoteAuthenticationSettings();\n\n boolean hasRemoteProxySettings();\n\n RemoteProxySettings getRemoteProxySettings();\n\n void setRemoteProxySettings( RemoteProxySettings settings );\n\n void removeRemoteProxySettings();\n}", "@Remote\r\npublic interface MenuActionManagerRemote\r\n extends MenuActionManager\r\n{\r\n\r\n\r\n}", "public interface DemoService extends Remote {\r\n public final static String SERVICE_NAME = \"DemoService\";\r\n \r\n public String doTask(String[] args) throws RemoteException;\r\n}", "public interface IRemoteMessageService {\n\n void unsubscribeToMessage(UnSubscribeToMessage cmd);\n\n /**\n * Sets a message element to a specified value\n */\n void setElementValue(SetElementValue cmd);\n\n void zeroizeElement(ZeroizeElement cmd);\n\n /**\n * Notifies service to send message updates to the specified ip address\n */\n SubscriptionDetails subscribeToMessage(SubscribeToMessage cmd);\n\n Set<? extends DataType> getAvailablePhysicalTypes();\n\n boolean startRecording(RecordCommand cmd);\n\n InetSocketAddress getRecorderSocketAddress();\n\n InetSocketAddress getMsgUpdateSocketAddress();\n\n void stopRecording();\n\n void terminateService();\n\n void reset();\n\n void setupRecorder(IMessageEntryFactory factory);\n\n public Map<String, Throwable> getCancelledSubscriptions();\n}", "public interface Scope {\n /**\n * scope name(which is auto uniquify to a {@link JvmUnique#uniqueNameWithRandom(String)}\n */\n String getName();\n\n boolean isRoute();\n\n /**\n * set timeout of call\n *\n * @param timeout maximum call waiting\n */\n void setTimeout(@Nullable Duration timeout);\n\n /**\n * change debug mode\n *\n * @param debug whether open debug mode\n */\n void setDebug(boolean debug);\n\n void setTrace(boolean trace);\n\n /**\n * create a new RSocket Server\n *\n * @param name simple server name\n * @param config server configuration\n */\n void startServer(String name, Config.ServerConfig config);\n\n /**\n * create a new RSocket Client\n *\n * @param name simple client name\n * @param config client configuration\n */\n void startClient(String name, Config.ClientConfig config);\n\n /**\n * release and close all cache ,include all RS server and client\n */\n void release();\n\n /**\n * build a Proxy Rpc Service\n *\n * @param clientKlass service ( must be a interface)\n * @param argumentProcessor parameter and result processor for each method (<b>if there is some interface parameter or result or else with nested interface that Implement may not exists in remote service</b>)\n * @param useFNF use fireAndForgot for void return method\n * @param <T> service type\n * @return the Instance\n */\n <T> T createClientService(Class<T> clientKlass, @Nullable Map<String, Function<Object[], Object[]>> argumentProcessor, boolean useFNF);\n\n /**\n * register a local service to serve\n *\n * @param service the service instance\n * @param serviceKlass the define interface of the service\n * @param resultProcessor parameter and result processor for each method (<b>if there is some interface parameter or result or else with nested interface that Implement may not exists in remote service</b>)\n * @param <T> type\n */\n <T> void registerService(\n T service,\n Class<T> serviceKlass,\n @Nullable Map<String, Function<Object, Object>> resultProcessor\n );\n\n /**\n * service list\n */\n @Unmodifiable List<String> names();\n\n /**\n * close a named Server\n *\n * @param name server name\n */\n boolean dispose(@NotNull String name);\n}", "public interface ChatInterface extends Remote {\r\n void postMessage(String msg) throws RemoteException;\r\n\r\n String getName() throws RemoteException;\r\n\r\n void setClient(ChatInterface c) throws RemoteException;\r\n\r\n ChatInterface getClient() throws RemoteException;\r\n\r\n}", "@Activate\n public void activate(final BundleContext context) throws IOException\n {\n // set port, use default if not set\n int serverPort = DEFAULT_PORT;\n \n // set SSL flag, use default if not set\n boolean enableSsl = false;\n \n if (context.getProperty(PORT_PROP_KEY) != null)\n {\n serverPort = Integer.parseInt(context.getProperty(PORT_PROP_KEY));\n }\n \n if (context.getProperty(SSL_PROP_KEY) != null)\n {\n enableSsl = Boolean.parseBoolean(context.getProperty(SSL_PROP_KEY));\n }\n\n m_ServerSocket = m_ServerSocketFactory.createServerSocket(serverPort, enableSsl);\n\n m_Logging.info(\"Server socket listening on port %d for remote messages\", m_ServerSocket.getLocalPort());\n \n m_ServerSocketThread = new Thread(new Runnable()\n {\n @Override\n public void run()\n {\n //run until the socket is closed\n while (true)\n {\n try\n {\n final Socket socket = m_ServerSocket.accept(); // NOFORTIFY: unreleased resource:\n //resources are managed by the remote channel lookup\n m_Logging.info(\"Connection made from %s for remote interface\", \n socket.getRemoteSocketAddress());\n \n m_RemoteChannelLookup.newServerSocketChannel(socket);\n }\n catch (final IOException e)\n {\n if (m_ServerSocket.isClosed())\n {\n m_Logging.info(\"Server socket has been closed, will stop accepting connections\");\n return;\n }\n }\n }\n }\n });\n \n m_ServerSocketThread.setName(\"RemoteInterfaceServerSocket\");\n m_ServerSocketThread.start();\n }", "public interface RemoteExecutionListener {\n\n /**\n * Called when a remote execution starts\n * \n * @param method\n * the method which will be executed remotely\n * @param invoker\n * the invoker to be invoked\n * @param args\n * the args to be passed to method\n * @return true if this execution should run remotely, false if it should be\n * run locally\n */\n public boolean onRemoteExecutionStart(Method method, Object invoker, Object[] args);\n\n /**\n * Called when a remote execution completes\n * \n * @param method\n * the method which is executed remotely\n * @param invoker\n * the invoker to be invoked\n * @param args\n * the args to be passed to the method\n * @param returnValue\n * the value which will be returned, or null if execution fails\n * @param isSuccess\n * if the execution is successful\n * @param exception\n * the exception that is thrown if execution fails\n */\n public void onRemoteExecutionComplete(Method method, Object invoker, Object[] args, Object returnValue,\n boolean isSuccess, Throwable exception);\n\n}", "public interface VSGroupChat extends Remote {\n\n void register(VSGCListener listener, VSGCGroup group) throws RemoteException;\n void post(VSGCListener listener, VSGCMessage message) throws RemoteException;\n ArrayList<VSGCMessage> getHistory(VSGCGroup group) throws IllegalArgumentException, RemoteException;\n ArrayList<VSGCGroup> getGroups() throws RemoteException;\n void addGroup(VSGCGroup group) throws RemoteException;\n}", "public interface SocketEventListener {\n\npublic void socketReceive( String s );\n}", "public interface ControllerInterface extends Remote {\n\n /**\n * Remotely invocable method.\n *\n * @param text\n * @exception RemoteException if the remote invocation fails.\n */\n public void setText(String text) throws RemoteException;\n\n public String getText() throws RemoteException;\n \n public void criarArquivo(String nome) throws RemoteException;\n\n public String[] listarArquivos() throws RemoteException;\n \n public String abrirArquivo(String nome) throws RemoteException;\n \n public void editarArquivo(String nome, String texto) throws RemoteException;\n \n public void insert(char c, int pos) throws RemoteException;\n}", "public interface ClientHandler extends Remote {\n\n public void handleMessage(Message msg) throws RemoteException;\n\n}", "public interface FingerService extends Remote {\n\n String connectedUsers() throws RemoteException;\n}", "public interface ChatxEventListener extends EventListener {\n public void OnChatEvtNewMsg(String msg);\n public void OnChatEvtConnectServerFailed();\n public void OnChatActivityQuit();\n public void OnChatEvtConnected();\n public void OnChatEvtDisConnected();\n public void OnNoAgents(String reason);\n\n public void OnVideoGuestJoin(String vendor,String param1,String param2,String param3,String param4 );\n public void OnVideoQuit();\n}", "public interface ServerController extends java.rmi.Remote{\r\n\t// abstract classes\r\n\tpublic int connect() throws RemoteException;\r\n\tpublic String getPath() throws RemoteException;\r\n\tpublic String echo(String message) throws RemoteException;\r\n\tpublic String isFileExists(String fname) throws RemoteException;\r\n\tpublic int[] sortList(int[] a) throws RemoteException;\r\n\tpublic int[][] mMultiplication(int[][] a, int[][] b, int row, int col) throws RemoteException;\r\n}", "public interface ConnectorContext {\n\n\n /**\n * Get a reference to a global state manager for state coordination, dedup and ordering semantics\n *\n * @return global state manager instance\n */\n StateManager getStateManager();\n\n /**\n * Get a Globally unique connector instance identifier for the connector instance\n *\n * @return globally unique uuid\n */\n UUID getConnectorId();\n\n /**\n * Partition id for the connector instance.\n *\n * @return local partition id in cluster\n */\n int getPartitionId();\n\n /**\n * Get expected total instances of this connector type currently active\n *\n * @return total active instance count\n */\n int getInstanceCount();\n\n /**\n * Notifying the external runtime of metrics and other related events\n *\n * @param event Event to Sent\n * @return Error or success code\n */\n Integer publishEvent(SendableEvent event);\n\n /**\n * Receiving events from an external manager post initialization, meant for throttling and config updates.\n *\n * @param listener Local listener object to bind to.\n */\n void subscribeToEvents(Listener listener);\n\n /**\n * Get a reference to the global state manager\n *\n * @return a client object to interact with the scheme registry\n */\n SchemaManager getSchemaManager();\n}", "public interface MsgListener {\n\n public void handlerMsg(Channel ctx, SocketMsg msg);\n}", "public interface ServerRegisterListener {\r\n \r\n /**\r\n * Register server listener.\r\n *\r\n * @param server the server\r\n */\r\n public void registerServerListener(Server server);\r\n \r\n}", "@Override\n default ManagerPrx ice_context(java.util.Map<String, String> newContext)\n {\n return (ManagerPrx)_ice_context(newContext);\n }", "public interface PeerInfoService extends PeerInfoCallback {\r\n}", "interface RemoteControl {\n void on();\n\n void off();\n}", "public interface CommunicationEventListener extends EventListener {\n // Ajoute un handler\n boolean handleServerResponse(String response);\n}", "public interface C44035d extends C1677a {\n C7358b addICoreServiceLifecycleCallback(C30032a c30032a);\n\n C7358b addNotifyReceiverCallback(C44034c c44034c);\n\n void setILightPushDelegate(C23228b c23228b);\n}", "public interface RMIInterface extends Remote {\n\n public String helloTo(String name) throws RemoteException;\n\n}", "public interface InterfaceService\n extends ListenerService<InterfaceEvent, InterfaceListener> {\n\n /**\n * Returns the set of all interfaces in the system.\n *\n * @return set of interfaces\n */\n Set<Interface> getInterfaces();\n\n /**\n * Returns the interface with the given name.\n *\n * @param connectPoint connect point of the interface\n * @param name name of the interface\n * @return interface if it exists, otherwise null\n */\n Interface getInterfaceByName(ConnectPoint connectPoint, String name);\n\n /**\n * Returns the set of interfaces configured on the given port.\n *\n * @param port connect point\n * @return set of interfaces\n */\n Set<Interface> getInterfacesByPort(ConnectPoint port);\n\n /**\n * Returns the set of interfaces with the given IP address.\n *\n * @param ip IP address\n * @return set of interfaces\n */\n Set<Interface> getInterfacesByIp(IpAddress ip);\n\n /**\n * Returns the set of interfaces in the given VLAN.\n *\n * @param vlan VLAN ID of the interfaces\n * @return set of interfaces\n */\n Set<Interface> getInterfacesByVlan(VlanId vlan);\n\n /**\n * Returns an interface that has an address that is in the same subnet as\n * the given IP address.\n *\n * @param ip IP address to find matching subnet interface for\n * @return interface\n */\n Interface getMatchingInterface(IpAddress ip);\n\n /**\n * Returns all interfaces that have an address that is in the same\n * subnet as the given IP address.\n *\n * @param ip IP address to find matching subnet interface for\n * @return a set of interfaces\n */\n Set<Interface> getMatchingInterfaces(IpAddress ip);\n\n /**\n * Returns untagged VLAN configured on given connect point.\n * <p>\n * Only returns the first match if there are multiple untagged VLAN configured\n * on the connect point.\n *\n * @param connectPoint connect point\n * @return untagged VLAN or null if not configured\n */\n default VlanId getUntaggedVlanId(ConnectPoint connectPoint) {\n return null;\n }\n\n /**\n * Returns tagged VLAN configured on given connect point.\n * <p>\n * Returns all matches if there are multiple tagged VLAN configured\n * on the connect point.\n *\n * @param connectPoint connect point\n * @return tagged VLAN or empty set if not configured\n */\n default Set<VlanId> getTaggedVlanId(ConnectPoint connectPoint) {\n return ImmutableSet.of();\n }\n\n /**\n * Returns native VLAN configured on given connect point.\n * <p>\n * Only returns the first match if there are multiple native VLAN configured\n * on the connect point.\n *\n * @param connectPoint connect point\n * @return native VLAN or null if not configured\n */\n default VlanId getNativeVlanId(ConnectPoint connectPoint) {\n return null;\n }\n\n /**\n * Returns true if given connectPoint has an IP address or vlan configured\n * on any of its interfaces.\n *\n * @param connectPoint the port on a device\n * @return true if connectpoint has a configured interface\n */\n default boolean isConfigured(ConnectPoint connectPoint) {\n throw new NotImplementedException(\"isConfigured is not implemented\");\n }\n\n /**\n * Returns true if given vlanId is in use due to configuration on any of the\n * interfaces in the system.\n *\n * @param vlanId the vlan id being queried\n * @return true if vlan is configured on any interface\n */\n default boolean inUse(VlanId vlanId) {\n throw new NotImplementedException(\"isConfigured is not implemented\");\n }\n}", "public interface Listener {}", "public interface SocketControl {\n\n /**\n * 获取服务的IP和端口\n * @return 格式:ip:port,如127.0.0.1:8080\n */\n String getIpPort();\n\n /**\n * 获取服务的ServiceId\n * @return 服务的ServiceId\n */\n String getServiceId();\n\n /**\n * 获取服务的InstanceId\n * @return 服务的InstanceId\n */\n String getInstanceId();\n\n\n /**\n * 获取模块名称,也可以直接调用getIpPort()\n * @return 模块名称\n */\n String getModelName();\n\n\n /**\n * 模块下连接的标示\n * @param channel 管道对象\n * @return uk\n */\n String getUniqueKey(Channel channel);\n\n\n /**\n * 模块下连接的标示\n * @param ctx 管道对象\n * @return uk\n */\n String getUniqueKey(ChannelHandlerContext ctx);\n\n\n /**\n * 绑定key\n * @param ctx 当前连接对象\n * @param key key\n */\n void bindKey(ChannelHandlerContext ctx,String key);\n\n /**\n * 绑定key\n * @param ctx 当前连接对象\n * @param key key\n */\n void bindKey(Channel ctx,String key);\n\n /**\n * 获取key\n * @param ctx 当前链接对象\n * @return key\n */\n String getKey(Channel ctx);\n\n /**\n * 获取key\n * @param ctx 当前链接对象\n * @return key\n */\n String getKey(ChannelHandlerContext ctx);\n\n\n /**\n * 重置心跳时间\n * @param ctx 当前连接对象\n * @param heartTime 心跳时间(秒)\n */\n void resetHeartTime(Channel ctx,int heartTime);\n\n\n\n}", "public interface IServerResponseListener {\n\n\t/**\n\t * Receive requested \n\t * \n\t * @param requestId the same id number as the request* method that caused\n\t * \tthis request returned\n\t * @param data raw data, allways a List<RequestedModelType>\n\t */\n\tpublic void onServerResponse(int requestId, Object data);\n\t\n}", "public interface CallPeerSecurityListener extends EventListener\n{\n\t/**\n\t * The handler for the security event received. The security event represents an indication of\n\t * change in the security status.\n\t *\n\t * @param securityEvent\n\t * the security event received\n\t */\n\tpublic void securityOn(CallPeerSecurityOnEvent securityEvent);\n\n\t/**\n\t * The handler for the security event received. The security event represents an indication of\n\t * change in the security status.\n\t *\n\t * @param securityEvent\n\t * the security event received\n\t */\n\tpublic void securityOff(CallPeerSecurityOffEvent securityEvent);\n\n\t/**\n\t * The handler for the security event received. The security event represents a timeout trying\n\t * to establish a secure connection. Most probably the other peer doesn't support it.\n\t *\n\t * @param securityTimeoutEvent\n\t * the security timeout event received\n\t */\n\tpublic void securityTimeout(CallPeerSecurityTimeoutEvent securityTimeoutEvent);\n\n\t/**\n\t * The handler of the security message event.\n\t *\n\t * @param event\n\t * the security message event.\n\t */\n\tpublic void securityMessageReceived(CallPeerSecurityMessageEvent event);\n\n\t/**\n\t * The handler for the security event received. The security event for starting establish a\n\t * secure connection.\n\t *\n\t * @param securityStartedEvent\n\t * the security started event received\n\t */\n\tpublic void securityNegotiationStarted(\n\t\tCallPeerSecurityNegotiationStartedEvent securityStartedEvent);\n}", "private ContextListener getContextListener(Object source) {\n if (listener == null) {\n listener = new Listener();\n }\n return (ContextListener)WeakListeners.create(ContextListener.class, listener, source);\n }", "public interface ServerAdapter\nextends ClusterEventAdapter\n{\n\n\tpublic abstract ClusterMessageSender getClusterMessageSender();\n\n\t/**\n\t * @return the globalNamingServer\n\t */\n\tpublic abstract GlobalNamingServer getGlobalNamingServer();\n\tpublic abstract void setGlobalNamingServer(GlobalNamingServer globalNamingServer);\n\n\tpublic ServerAuthentication getServerAuthentication();\n\tpublic void setServerAuthentication(ServerAuthentication serverAuthentication);\n\t\n\t/**\n\t * @see gov.va.med.server.tomcat.ServerLifecycleListener#addLifecycleListener(gov.va.med.server.ServerLifecycleListener)\n\t */\n\tpublic abstract void addServerLifecycleListener(ServerLifecycleListener listener);\n\n\t/**\n\t * @see gov.va.med.server.tomcat.ServerLifecycleListener#removeLifecycleListener(gov.va.med.server.ServerLifecycleListener)\n\t */\n\tpublic abstract void removeServerLifecycleListener(ServerLifecycleListener listener);\n\n\t/**\n\t * \n\t * @param applicationEvent\n\t */\n\tpublic abstract void serverLifecycleEvent(ServerLifecycleEvent applicationEvent);\n\t\n}", "public interface ShellLaunchListener {\n /**\n * Called when the connection to the target machine is initiated, for example\n * when debugger reports machine attach.\n * @param ev \n */\n public void connectionInitiated(ShellLaunchEvent ev);\n \n /**\n * The handshake with the target VM has succeeded, or failed. The 'agent' field\n * is valid.\n * @param ev \n */\n public void handshakeCompleted(ShellLaunchEvent ev);\n \n /**\n * Called when the connection has been closed. The connection and\n * agent fields are valid. Agent may be still live, so a new Connection\n * can be opened.\n * @param ev \n */\n public void connectionClosed(ShellLaunchEvent ev);\n \n /**\n * The VM agent has been destroyed. Perhaps the entire VM went down or something.\n * @param ev \n */\n public void agentDestroyed(ShellLaunchEvent ev);\n}", "@Remote\r\npublic interface RappelManagerRemote\r\n extends RappelManager\r\n{\r\n\r\n\r\n}", "interface OnProxyConnectedCallback {\n void onConnected(ChannelHandlerContext ctx);\n //void onError(ChannelHandlerContext ctx, Throwable reason);\n }", "public interface IProtocol {\r\n int ADD_ELEMENT = 2100; // parent, 0, Elements.Extra\r\n\r\n int CLEAR_CHILDREN = 2005; // parent\r\n\r\n int CONTROL_ABOUT = 3001;\r\n\r\n int CONTROL_DELETE_SAVE = 3003;\r\n\r\n // int CONTROL_RESTART = 3004;\r\n int CONTROL_FORCE_CLICK = 3005;\r\n\r\n int CONTROL_HELP = 3002;\r\n\r\n // int UPDATE_SCROLL = 5;\r\n int DISPLAY_TOAST = 2001; // OBJ = text\r\n\r\n int ON_CLICK = 1101; // OBJ = view\r\n\r\n int ON_CREATE = 1001; // OBJ = bundle\r\n\r\n int ON_DESTROY = 1006;\r\n\r\n int ON_PAUSE = 1004;\r\n\r\n int ON_RESUME = 1003;\r\n\r\n int ON_START = 1002;\r\n\r\n int ON_STOP = 1005;\r\n\r\n int ON_TOUCH_EVENT = 1103;\r\n\r\n int SET_THEME = 5001;\r\n\r\n int SHOW_HELP_PAGE = 4001;\r\n\r\n int SHOW_LICENSE = 4002;\r\n\r\n int UPDATE_COLOR = 2;\r\n\r\n int UPDATE_ENABLED = 3;\r\n\r\n int UPDATE_INFLATE = 4;\r\n\r\n int UPDATE_TEXT = 1;\r\n\r\n int UPDATE_VIEW = 0;\r\n}", "public interface ClientRemoteDoor extends Remote{\n public int query_state_door(int id) throws RemoteException;\n\n}", "Context getContext();", "public interface ISocketEchoServer extends ISocketServer\r\n{\r\n\r\n}", "public interface IEvenListener {\n}", "public interface MultiplayerListener extends PacketReceivedCallback\n{\n public void multiplayerSessionStarted(MultiplayerServer server);\n\n public void multiplayerSessionEnded();\n}", "public interface ServiceConnectionListener {\n /**\n * 服务绑定成功的监听回调\n * 注册或者注销场景TTS回调监听\n *\n * @param callbackListener 返回TTS到客户端的Binder\n */\n void onCallbackNotify(ICallbackListener callbackListener);\n\n /**\n * 服务绑定成功的监听回调\n * 注册或者注销场景回调监听\n *\n * @param sceneNotifyListener 返现场景状态到客户端的Binder\n */\n void onSceneNotifyListener(ISceneNotifyListener sceneNotifyListener);\n}", "@Override\n/**\n * Communication Tester method\n */\npublic String Communicate() throws RemoteException {\n\treturn \"Server Says Hi\";\n}", "public interface ExecutionContext {\n}", "public interface Service extends AsyncRunnable, Remote {\n\n\tint registryPort() throws RemoteException;\n\n\tString name() throws RemoteException;\n}", "public interface IRpcResponser {\n\n public void callback(String secret, Class<?> clazzOfInterface, Object serviceProvider, long timeout, TimeUnit timeUnit);\n\n public WrappedRpcServer buildRpcServer(String secret, IRpcMessageProcessor rpcMsgProcessor);\n}", "public interface CommandManagerListener extends Listener, ICommandManagerListener {\n}", "@SPI(scope = Scope.PROTOTYPE)\npublic interface Cluster extends InvokerRegistry<Consumer>, NotifyListener {\n\n void destroy();\n\n List<Consumer> listConsumer();\n\n Response onError(Consumer cluster, Consumer failedConsumer, Request request, RuntimeException e);\n\n /*\n * implement InvokerRegistry\n */\n @Override\n void registerInvoker(String serviceIdentify, Consumer invoker);\n\n @Override\n Consumer unregisterInvoker(String serviceIdentify);\n\n /*\n * implement NotifyListener\n */\n @Override\n default void notify(RegistryConfig registryConfig, List<MetaInfo> metaInfoCollection) {\n }\n}", "public interface ClientCallbackSIMON_IF // extends ClientCallback_IF\n{\n public void callback(String text);\n\n public void ping();\n\n}", "public interface ClientRemoteInterface extends Remote {\n\n /**\n * Receiver method, used by the server to send to the client\n// * @param playerMessage message that has been sent\n * @throws RemoteException exception due to communication fall\n */\n void receiveFromServer(PlayerMessage playerMessage) throws RemoteException;\n\n /**\n * Method used to\n * @throws RemoteException\n */\n void receiveLifeline() throws RemoteException;\n}", "public interface DsViaListenInterface extends DsListenInterface {\n\n /** @return port to be used as the source port of outgoing requests */\n public int getSourcePort();\n\n /** @return the interface to be used as the source port of outgoing requests */\n public InetAddress getSourceAddress();\n}", "public cl_context getContext() {\r\n return context;\r\n }", "public interface IMountService extends IInterface {\n /** Local-side IPC implementation stub class. */\n public static abstract class Stub extends Binder implements IMountService {\n private static class Proxy implements IMountService {\n private final IBinder mRemote;\n\n Proxy(IBinder remote) {\n mRemote = remote;\n }\n\n public IBinder asBinder() {\n return mRemote;\n }\n\n public String getInterfaceDescriptor() {\n return DESCRIPTOR;\n }\n\n /**\n * Registers an IMountServiceListener for receiving async\n * notifications.\n */\n public void registerListener(IMountServiceListener listener) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeStrongBinder((listener != null ? listener.asBinder() : null));\n mRemote.transact(Stub.TRANSACTION_registerListener, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Unregisters an IMountServiceListener\n */\n public void unregisterListener(IMountServiceListener listener) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeStrongBinder((listener != null ? listener.asBinder() : null));\n mRemote.transact(Stub.TRANSACTION_unregisterListener, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Returns true if a USB mass storage host is connected\n */\n public boolean isUsbMassStorageConnected() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_isUsbMassStorageConnected, _data, _reply, 0);\n _reply.readException();\n _result = 0 != _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Enables / disables USB mass storage. The caller should check\n * actual status of enabling/disabling USB mass storage via\n * StorageEventListener.\n */\n public void setUsbMassStorageEnabled(boolean enable) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt((enable ? 1 : 0));\n mRemote.transact(Stub.TRANSACTION_setUsbMassStorageEnabled, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Returns true if a USB mass storage host is enabled (media is\n * shared)\n */\n public boolean isUsbMassStorageEnabled() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_isUsbMassStorageEnabled, _data, _reply, 0);\n _reply.readException();\n _result = 0 != _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Mount external storage at given mount point. Returns an int\n * consistent with MountServiceResultCode\n */\n public int mountVolume(String mountPoint) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(mountPoint);\n mRemote.transact(Stub.TRANSACTION_mountVolume, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Safely unmount external storage at given mount point. The unmount\n * is an asynchronous operation. Applications should register\n * StorageEventListener for storage related status changes.\n */\n public void unmountVolume(String mountPoint, boolean force, boolean removeEncryption)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(mountPoint);\n _data.writeInt((force ? 1 : 0));\n _data.writeInt((removeEncryption ? 1 : 0));\n mRemote.transact(Stub.TRANSACTION_unmountVolume, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Format external storage given a mount point. Returns an int\n * consistent with MountServiceResultCode\n */\n public int formatVolume(String mountPoint) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(mountPoint);\n mRemote.transact(Stub.TRANSACTION_formatVolume, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Returns an array of pids with open files on the specified path.\n */\n public int[] getStorageUsers(String path) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int[] _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(path);\n mRemote.transact(Stub.TRANSACTION_getStorageUsers, _data, _reply, 0);\n _reply.readException();\n _result = _reply.createIntArray();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Gets the state of a volume via its mountpoint.\n */\n public String getVolumeState(String mountPoint) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(mountPoint);\n mRemote.transact(Stub.TRANSACTION_getVolumeState, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Creates a secure container with the specified parameters. Returns\n * an int consistent with MountServiceResultCode\n */\n public int createSecureContainer(String id, int sizeMb, String fstype, String key,\n int ownerUid, boolean external) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n _data.writeInt(sizeMb);\n _data.writeString(fstype);\n _data.writeString(key);\n _data.writeInt(ownerUid);\n _data.writeInt(external ? 1 : 0);\n mRemote.transact(Stub.TRANSACTION_createSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Destroy a secure container, and free up all resources associated\n * with it. NOTE: Ensure all references are released prior to\n * deleting. Returns an int consistent with MountServiceResultCode\n */\n public int destroySecureContainer(String id, boolean force) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n _data.writeInt((force ? 1 : 0));\n mRemote.transact(Stub.TRANSACTION_destroySecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Finalize a container which has just been created and populated.\n * After finalization, the container is immutable. Returns an int\n * consistent with MountServiceResultCode\n */\n public int finalizeSecureContainer(String id) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n mRemote.transact(Stub.TRANSACTION_finalizeSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Mount a secure container with the specified key and owner UID.\n * Returns an int consistent with MountServiceResultCode\n */\n public int mountSecureContainer(String id, String key, int ownerUid, boolean readOnly)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n _data.writeString(key);\n _data.writeInt(ownerUid);\n _data.writeInt(readOnly ? 1 : 0);\n mRemote.transact(Stub.TRANSACTION_mountSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Unount a secure container. Returns an int consistent with\n * MountServiceResultCode\n */\n public int unmountSecureContainer(String id, boolean force) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n _data.writeInt((force ? 1 : 0));\n mRemote.transact(Stub.TRANSACTION_unmountSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Returns true if the specified container is mounted\n */\n public boolean isSecureContainerMounted(String id) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n mRemote.transact(Stub.TRANSACTION_isSecureContainerMounted, _data, _reply, 0);\n _reply.readException();\n _result = 0 != _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Rename an unmounted secure container. Returns an int consistent\n * with MountServiceResultCode\n */\n public int renameSecureContainer(String oldId, String newId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(oldId);\n _data.writeString(newId);\n mRemote.transact(Stub.TRANSACTION_renameSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Returns the filesystem path of a mounted secure container.\n */\n public String getSecureContainerPath(String id) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n mRemote.transact(Stub.TRANSACTION_getSecureContainerPath, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Gets an Array of currently known secure container IDs\n */\n public String[] getSecureContainerList() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String[] _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_getSecureContainerList, _data, _reply, 0);\n _reply.readException();\n _result = _reply.createStringArray();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Shuts down the MountService and gracefully unmounts all external\n * media. Invokes call back once the shutdown is complete.\n */\n public void shutdown(IMountShutdownObserver observer)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeStrongBinder((observer != null ? observer.asBinder() : null));\n mRemote.transact(Stub.TRANSACTION_shutdown, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Call into MountService by PackageManager to notify that its done\n * processing the media status update request.\n */\n public void finishMediaUpdate() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_finishMediaUpdate, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Mounts an Opaque Binary Blob (OBB) with the specified decryption\n * key and only allows the calling process's UID access to the\n * contents. MountService will call back to the supplied\n * IObbActionListener to inform it of the terminal state of the\n * call.\n */\n public void mountObb(String rawPath, String canonicalPath, String key,\n IObbActionListener token, int nonce) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(rawPath);\n _data.writeString(canonicalPath);\n _data.writeString(key);\n _data.writeStrongBinder((token != null ? token.asBinder() : null));\n _data.writeInt(nonce);\n mRemote.transact(Stub.TRANSACTION_mountObb, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Unmounts an Opaque Binary Blob (OBB). When the force flag is\n * specified, any program using it will be forcibly killed to\n * unmount the image. MountService will call back to the supplied\n * IObbActionListener to inform it of the terminal state of the\n * call.\n */\n public void unmountObb(\n String rawPath, boolean force, IObbActionListener token, int nonce)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(rawPath);\n _data.writeInt((force ? 1 : 0));\n _data.writeStrongBinder((token != null ? token.asBinder() : null));\n _data.writeInt(nonce);\n mRemote.transact(Stub.TRANSACTION_unmountObb, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n /**\n * Checks whether the specified Opaque Binary Blob (OBB) is mounted\n * somewhere.\n */\n public boolean isObbMounted(String rawPath) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(rawPath);\n mRemote.transact(Stub.TRANSACTION_isObbMounted, _data, _reply, 0);\n _reply.readException();\n _result = 0 != _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Gets the path to the mounted Opaque Binary Blob (OBB).\n */\n public String getMountedObbPath(String rawPath) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(rawPath);\n mRemote.transact(Stub.TRANSACTION_getMountedObbPath, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Returns whether the external storage is emulated.\n */\n public boolean isExternalStorageEmulated() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_isExternalStorageEmulated, _data, _reply, 0);\n _reply.readException();\n _result = 0 != _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public int getEncryptionState() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_getEncryptionState, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public int decryptStorage(String password) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(password);\n mRemote.transact(Stub.TRANSACTION_decryptStorage, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public int encryptStorage(int type, String password) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(type);\n _data.writeString(password);\n mRemote.transact(Stub.TRANSACTION_encryptStorage, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public int changeEncryptionPassword(int type, String password) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(type);\n _data.writeString(password);\n mRemote.transact(Stub.TRANSACTION_changeEncryptionPassword, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public int verifyEncryptionPassword(String password) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(password);\n mRemote.transact(Stub.TRANSACTION_verifyEncryptionPassword, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public int getPasswordType() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_getPasswordType, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public String getPassword() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_getPassword, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public void clearPassword() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_clearPassword, _data, _reply, IBinder.FLAG_ONEWAY);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n public void setField(String field, String data) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(field);\n _data.writeString(data);\n mRemote.transact(Stub.TRANSACTION_setField, _data, _reply, IBinder.FLAG_ONEWAY);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n public String getField(String field) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(field);\n mRemote.transact(Stub.TRANSACTION_getField, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public boolean isConvertibleToFBE() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_isConvertibleToFBE, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt() != 0;\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n public StorageVolume[] getVolumeList(int uid, String packageName, int flags)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n StorageVolume[] _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(uid);\n _data.writeString(packageName);\n _data.writeInt(flags);\n mRemote.transact(Stub.TRANSACTION_getVolumeList, _data, _reply, 0);\n _reply.readException();\n _result = _reply.createTypedArray(StorageVolume.CREATOR);\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /*\n * Returns the filesystem path of a mounted secure container.\n */\n public String getSecureContainerFilesystemPath(String id) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n mRemote.transact(Stub.TRANSACTION_getSecureContainerFilesystemPath, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n /**\n * Fix permissions in a container which has just been created and\n * populated. Returns an int consistent with MountServiceResultCode\n */\n public int fixPermissionsSecureContainer(String id, int gid, String filename)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n _data.writeInt(gid);\n _data.writeString(filename);\n mRemote.transact(Stub.TRANSACTION_fixPermissionsSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public int mkdirs(String callingPkg, String path) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(callingPkg);\n _data.writeString(path);\n mRemote.transact(Stub.TRANSACTION_mkdirs, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public int resizeSecureContainer(String id, int sizeMb, String key)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n int _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(id);\n _data.writeInt(sizeMb);\n _data.writeString(key);\n mRemote.transact(Stub.TRANSACTION_resizeSecureContainer, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public long lastMaintenance() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n long _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_lastMaintenance, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readLong();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public void runMaintenance() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_runMaintenance, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return;\n }\n\n @Override\n public void waitForAsecScan() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_waitForAsecScan, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return;\n }\n\n @Override\n public DiskInfo[] getDisks() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n DiskInfo[] _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_getDisks, _data, _reply, 0);\n _reply.readException();\n _result = _reply.createTypedArray(DiskInfo.CREATOR);\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public VolumeInfo[] getVolumes(int _flags) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n VolumeInfo[] _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(_flags);\n mRemote.transact(Stub.TRANSACTION_getVolumes, _data, _reply, 0);\n _reply.readException();\n _result = _reply.createTypedArray(VolumeInfo.CREATOR);\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public VolumeRecord[] getVolumeRecords(int _flags) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n VolumeRecord[] _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(_flags);\n mRemote.transact(Stub.TRANSACTION_getVolumeRecords, _data, _reply, 0);\n _reply.readException();\n _result = _reply.createTypedArray(VolumeRecord.CREATOR);\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public void mount(String volId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volId);\n mRemote.transact(Stub.TRANSACTION_mount, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void unmount(String volId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volId);\n mRemote.transact(Stub.TRANSACTION_unmount, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void format(String volId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volId);\n mRemote.transact(Stub.TRANSACTION_format, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public long benchmark(String volId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volId);\n mRemote.transact(Stub.TRANSACTION_benchmark, _data, _reply, 0);\n _reply.readException();\n return _reply.readLong();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void partitionPublic(String diskId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(diskId);\n mRemote.transact(Stub.TRANSACTION_partitionPublic, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void partitionPrivate(String diskId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(diskId);\n mRemote.transact(Stub.TRANSACTION_partitionPrivate, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void partitionMixed(String diskId, int ratio) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(diskId);\n _data.writeInt(ratio);\n mRemote.transact(Stub.TRANSACTION_partitionMixed, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void setVolumeNickname(String fsUuid, String nickname) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(fsUuid);\n _data.writeString(nickname);\n mRemote.transact(Stub.TRANSACTION_setVolumeNickname, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void setVolumeUserFlags(String fsUuid, int flags, int mask) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(fsUuid);\n _data.writeInt(flags);\n _data.writeInt(mask);\n mRemote.transact(Stub.TRANSACTION_setVolumeUserFlags, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void forgetVolume(String fsUuid) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(fsUuid);\n mRemote.transact(Stub.TRANSACTION_forgetVolume, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void forgetAllVolumes() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_forgetAllVolumes, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void setDebugFlags(int _flags, int _mask) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(_flags);\n _data.writeInt(_mask);\n mRemote.transact(Stub.TRANSACTION_setDebugFlags, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public String getPrimaryStorageUuid() throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n String _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n mRemote.transact(Stub.TRANSACTION_getPrimaryStorageUuid, _data, _reply, 0);\n _reply.readException();\n _result = _reply.readString();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public void setPrimaryStorageUuid(String volumeUuid, IPackageMoveObserver callback)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volumeUuid);\n _data.writeStrongBinder((callback != null ? callback.asBinder() : null));\n mRemote.transact(Stub.TRANSACTION_setPrimaryStorageUuid, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void createUserKey(int userId, int serialNumber, boolean ephemeral)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n _data.writeInt(serialNumber);\n _data.writeInt(ephemeral ? 1 : 0);\n mRemote.transact(Stub.TRANSACTION_createUserKey, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void destroyUserKey(int userId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n mRemote.transact(Stub.TRANSACTION_destroyUserKey, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void addUserKeyAuth(int userId, int serialNumber,\n byte[] token, byte[] secret) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n _data.writeInt(serialNumber);\n _data.writeByteArray(token);\n _data.writeByteArray(secret);\n mRemote.transact(Stub.TRANSACTION_addUserKeyAuth, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void fixateNewestUserKeyAuth(int userId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n mRemote.transact(Stub.TRANSACTION_fixateNewestUserKeyAuth, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void unlockUserKey(int userId, int serialNumber,\n byte[] token, byte[] secret) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n _data.writeInt(serialNumber);\n _data.writeByteArray(token);\n _data.writeByteArray(secret);\n mRemote.transact(Stub.TRANSACTION_unlockUserKey, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void lockUserKey(int userId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n mRemote.transact(Stub.TRANSACTION_lockUserKey, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public boolean isUserKeyUnlocked(int userId) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n boolean _result;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeInt(userId);\n mRemote.transact(Stub.TRANSACTION_isUserKeyUnlocked, _data, _reply, 0);\n _reply.readException();\n _result = 0 != _reply.readInt();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n\n @Override\n public void prepareUserStorage(\n String volumeUuid, int userId, int serialNumber, int flags)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volumeUuid);\n _data.writeInt(userId);\n _data.writeInt(serialNumber);\n _data.writeInt(flags);\n mRemote.transact(Stub.TRANSACTION_prepareUserStorage, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public void destroyUserStorage(String volumeUuid, int userId, int flags)\n throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(volumeUuid);\n _data.writeInt(userId);\n _data.writeInt(flags);\n mRemote.transact(Stub.TRANSACTION_destroyUserStorage, _data, _reply, 0);\n _reply.readException();\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n }\n\n @Override\n public ParcelFileDescriptor mountAppFuse(String name) throws RemoteException {\n Parcel _data = Parcel.obtain();\n Parcel _reply = Parcel.obtain();\n ParcelFileDescriptor _result = null;\n try {\n _data.writeInterfaceToken(DESCRIPTOR);\n _data.writeString(name);\n mRemote.transact(Stub.TRANSACTION_mountAppFuse, _data, _reply, 0);\n _reply.readException();\n _result = _reply.<ParcelFileDescriptor>readParcelable(\n ClassLoader.getSystemClassLoader());\n } finally {\n _reply.recycle();\n _data.recycle();\n }\n return _result;\n }\n }\n\n private static final String DESCRIPTOR = \"IMountService\";\n\n static final int TRANSACTION_registerListener = IBinder.FIRST_CALL_TRANSACTION + 0;\n\n static final int TRANSACTION_unregisterListener = IBinder.FIRST_CALL_TRANSACTION + 1;\n\n static final int TRANSACTION_isUsbMassStorageConnected = IBinder.FIRST_CALL_TRANSACTION + 2;\n\n static final int TRANSACTION_setUsbMassStorageEnabled = IBinder.FIRST_CALL_TRANSACTION + 3;\n\n static final int TRANSACTION_isUsbMassStorageEnabled = IBinder.FIRST_CALL_TRANSACTION + 4;\n\n static final int TRANSACTION_mountVolume = IBinder.FIRST_CALL_TRANSACTION + 5;\n\n static final int TRANSACTION_unmountVolume = IBinder.FIRST_CALL_TRANSACTION + 6;\n\n static final int TRANSACTION_formatVolume = IBinder.FIRST_CALL_TRANSACTION + 7;\n\n static final int TRANSACTION_getStorageUsers = IBinder.FIRST_CALL_TRANSACTION + 8;\n\n static final int TRANSACTION_getVolumeState = IBinder.FIRST_CALL_TRANSACTION + 9;\n\n static final int TRANSACTION_createSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 10;\n\n static final int TRANSACTION_finalizeSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 11;\n\n static final int TRANSACTION_destroySecureContainer = IBinder.FIRST_CALL_TRANSACTION + 12;\n\n static final int TRANSACTION_mountSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 13;\n\n static final int TRANSACTION_unmountSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 14;\n\n static final int TRANSACTION_isSecureContainerMounted = IBinder.FIRST_CALL_TRANSACTION + 15;\n\n static final int TRANSACTION_renameSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 16;\n\n static final int TRANSACTION_getSecureContainerPath = IBinder.FIRST_CALL_TRANSACTION + 17;\n\n static final int TRANSACTION_getSecureContainerList = IBinder.FIRST_CALL_TRANSACTION + 18;\n\n static final int TRANSACTION_shutdown = IBinder.FIRST_CALL_TRANSACTION + 19;\n\n static final int TRANSACTION_finishMediaUpdate = IBinder.FIRST_CALL_TRANSACTION + 20;\n\n static final int TRANSACTION_mountObb = IBinder.FIRST_CALL_TRANSACTION + 21;\n\n static final int TRANSACTION_unmountObb = IBinder.FIRST_CALL_TRANSACTION + 22;\n\n static final int TRANSACTION_isObbMounted = IBinder.FIRST_CALL_TRANSACTION + 23;\n\n static final int TRANSACTION_getMountedObbPath = IBinder.FIRST_CALL_TRANSACTION + 24;\n\n static final int TRANSACTION_isExternalStorageEmulated = IBinder.FIRST_CALL_TRANSACTION + 25;\n\n static final int TRANSACTION_decryptStorage = IBinder.FIRST_CALL_TRANSACTION + 26;\n\n static final int TRANSACTION_encryptStorage = IBinder.FIRST_CALL_TRANSACTION + 27;\n\n static final int TRANSACTION_changeEncryptionPassword = IBinder.FIRST_CALL_TRANSACTION + 28;\n\n static final int TRANSACTION_getVolumeList = IBinder.FIRST_CALL_TRANSACTION + 29;\n\n static final int TRANSACTION_getSecureContainerFilesystemPath = IBinder.FIRST_CALL_TRANSACTION + 30;\n\n static final int TRANSACTION_getEncryptionState = IBinder.FIRST_CALL_TRANSACTION + 31;\n\n static final int TRANSACTION_verifyEncryptionPassword = IBinder.FIRST_CALL_TRANSACTION + 32;\n\n static final int TRANSACTION_fixPermissionsSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 33;\n\n static final int TRANSACTION_mkdirs = IBinder.FIRST_CALL_TRANSACTION + 34;\n\n static final int TRANSACTION_getPasswordType = IBinder.FIRST_CALL_TRANSACTION + 35;\n\n static final int TRANSACTION_getPassword = IBinder.FIRST_CALL_TRANSACTION + 36;\n\n static final int TRANSACTION_clearPassword = IBinder.FIRST_CALL_TRANSACTION + 37;\n\n static final int TRANSACTION_setField = IBinder.FIRST_CALL_TRANSACTION + 38;\n\n static final int TRANSACTION_getField = IBinder.FIRST_CALL_TRANSACTION + 39;\n\n static final int TRANSACTION_resizeSecureContainer = IBinder.FIRST_CALL_TRANSACTION + 40;\n\n static final int TRANSACTION_lastMaintenance = IBinder.FIRST_CALL_TRANSACTION + 41;\n\n static final int TRANSACTION_runMaintenance = IBinder.FIRST_CALL_TRANSACTION + 42;\n\n static final int TRANSACTION_waitForAsecScan = IBinder.FIRST_CALL_TRANSACTION + 43;\n\n static final int TRANSACTION_getDisks = IBinder.FIRST_CALL_TRANSACTION + 44;\n static final int TRANSACTION_getVolumes = IBinder.FIRST_CALL_TRANSACTION + 45;\n static final int TRANSACTION_getVolumeRecords = IBinder.FIRST_CALL_TRANSACTION + 46;\n\n static final int TRANSACTION_mount = IBinder.FIRST_CALL_TRANSACTION + 47;\n static final int TRANSACTION_unmount = IBinder.FIRST_CALL_TRANSACTION + 48;\n static final int TRANSACTION_format = IBinder.FIRST_CALL_TRANSACTION + 49;\n\n static final int TRANSACTION_partitionPublic = IBinder.FIRST_CALL_TRANSACTION + 50;\n static final int TRANSACTION_partitionPrivate = IBinder.FIRST_CALL_TRANSACTION + 51;\n static final int TRANSACTION_partitionMixed = IBinder.FIRST_CALL_TRANSACTION + 52;\n\n static final int TRANSACTION_setVolumeNickname = IBinder.FIRST_CALL_TRANSACTION + 53;\n static final int TRANSACTION_setVolumeUserFlags = IBinder.FIRST_CALL_TRANSACTION + 54;\n static final int TRANSACTION_forgetVolume = IBinder.FIRST_CALL_TRANSACTION + 55;\n static final int TRANSACTION_forgetAllVolumes = IBinder.FIRST_CALL_TRANSACTION + 56;\n\n static final int TRANSACTION_getPrimaryStorageUuid = IBinder.FIRST_CALL_TRANSACTION + 57;\n static final int TRANSACTION_setPrimaryStorageUuid = IBinder.FIRST_CALL_TRANSACTION + 58;\n\n static final int TRANSACTION_benchmark = IBinder.FIRST_CALL_TRANSACTION + 59;\n static final int TRANSACTION_setDebugFlags = IBinder.FIRST_CALL_TRANSACTION + 60;\n\n static final int TRANSACTION_createUserKey = IBinder.FIRST_CALL_TRANSACTION + 61;\n static final int TRANSACTION_destroyUserKey = IBinder.FIRST_CALL_TRANSACTION + 62;\n\n static final int TRANSACTION_unlockUserKey = IBinder.FIRST_CALL_TRANSACTION + 63;\n static final int TRANSACTION_lockUserKey = IBinder.FIRST_CALL_TRANSACTION + 64;\n static final int TRANSACTION_isUserKeyUnlocked = IBinder.FIRST_CALL_TRANSACTION + 65;\n\n static final int TRANSACTION_prepareUserStorage = IBinder.FIRST_CALL_TRANSACTION + 66;\n static final int TRANSACTION_destroyUserStorage = IBinder.FIRST_CALL_TRANSACTION + 67;\n\n static final int TRANSACTION_isConvertibleToFBE = IBinder.FIRST_CALL_TRANSACTION + 68;\n\n static final int TRANSACTION_mountAppFuse = IBinder.FIRST_CALL_TRANSACTION + 69;\n\n static final int TRANSACTION_addUserKeyAuth = IBinder.FIRST_CALL_TRANSACTION + 70;\n\n static final int TRANSACTION_fixateNewestUserKeyAuth = IBinder.FIRST_CALL_TRANSACTION + 71;\n\n /**\n * Cast an IBinder object into an IMountService interface, generating a\n * proxy if needed.\n */\n public static IMountService asInterface(IBinder obj) {\n if (obj == null) {\n return null;\n }\n IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\n if (iin != null && iin instanceof IMountService) {\n return (IMountService) iin;\n }\n return new IMountService.Stub.Proxy(obj);\n }\n\n /** Construct the stub at attach it to the interface. */\n public Stub() {\n attachInterface(this, DESCRIPTOR);\n }\n\n public IBinder asBinder() {\n return this;\n }\n\n @Override\n public boolean onTransact(int code, Parcel data, Parcel reply,\n int flags) throws RemoteException {\n switch (code) {\n case INTERFACE_TRANSACTION: {\n reply.writeString(DESCRIPTOR);\n return true;\n }\n case TRANSACTION_registerListener: {\n data.enforceInterface(DESCRIPTOR);\n IMountServiceListener listener;\n listener = IMountServiceListener.Stub.asInterface(data.readStrongBinder());\n registerListener(listener);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_unregisterListener: {\n data.enforceInterface(DESCRIPTOR);\n IMountServiceListener listener;\n listener = IMountServiceListener.Stub.asInterface(data.readStrongBinder());\n unregisterListener(listener);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_isUsbMassStorageConnected: {\n data.enforceInterface(DESCRIPTOR);\n boolean result = isUsbMassStorageConnected();\n reply.writeNoException();\n reply.writeInt((result ? 1 : 0));\n return true;\n }\n case TRANSACTION_setUsbMassStorageEnabled: {\n data.enforceInterface(DESCRIPTOR);\n boolean enable;\n enable = 0 != data.readInt();\n setUsbMassStorageEnabled(enable);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_isUsbMassStorageEnabled: {\n data.enforceInterface(DESCRIPTOR);\n boolean result = isUsbMassStorageEnabled();\n reply.writeNoException();\n reply.writeInt((result ? 1 : 0));\n return true;\n }\n case TRANSACTION_mountVolume: {\n data.enforceInterface(DESCRIPTOR);\n String mountPoint;\n mountPoint = data.readString();\n int resultCode = mountVolume(mountPoint);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_unmountVolume: {\n data.enforceInterface(DESCRIPTOR);\n String mountPoint;\n mountPoint = data.readString();\n boolean force = 0 != data.readInt();\n boolean removeEncrypt = 0 != data.readInt();\n unmountVolume(mountPoint, force, removeEncrypt);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_formatVolume: {\n data.enforceInterface(DESCRIPTOR);\n String mountPoint;\n mountPoint = data.readString();\n int result = formatVolume(mountPoint);\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_getStorageUsers: {\n data.enforceInterface(DESCRIPTOR);\n String path;\n path = data.readString();\n int[] pids = getStorageUsers(path);\n reply.writeNoException();\n reply.writeIntArray(pids);\n return true;\n }\n case TRANSACTION_getVolumeState: {\n data.enforceInterface(DESCRIPTOR);\n String mountPoint;\n mountPoint = data.readString();\n String state = getVolumeState(mountPoint);\n reply.writeNoException();\n reply.writeString(state);\n return true;\n }\n case TRANSACTION_createSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n int sizeMb;\n sizeMb = data.readInt();\n String fstype;\n fstype = data.readString();\n String key;\n key = data.readString();\n int ownerUid;\n ownerUid = data.readInt();\n boolean external;\n external = 0 != data.readInt();\n int resultCode = createSecureContainer(id, sizeMb, fstype, key, ownerUid,\n external);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_finalizeSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n int resultCode = finalizeSecureContainer(id);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_destroySecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n boolean force;\n force = 0 != data.readInt();\n int resultCode = destroySecureContainer(id, force);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_mountSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n String key;\n key = data.readString();\n int ownerUid;\n ownerUid = data.readInt();\n boolean readOnly;\n readOnly = data.readInt() != 0;\n int resultCode = mountSecureContainer(id, key, ownerUid, readOnly);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_unmountSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n boolean force;\n force = 0 != data.readInt();\n int resultCode = unmountSecureContainer(id, force);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_isSecureContainerMounted: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n boolean status = isSecureContainerMounted(id);\n reply.writeNoException();\n reply.writeInt((status ? 1 : 0));\n return true;\n }\n case TRANSACTION_renameSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String oldId;\n oldId = data.readString();\n String newId;\n newId = data.readString();\n int resultCode = renameSecureContainer(oldId, newId);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_getSecureContainerPath: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n String path = getSecureContainerPath(id);\n reply.writeNoException();\n reply.writeString(path);\n return true;\n }\n case TRANSACTION_getSecureContainerList: {\n data.enforceInterface(DESCRIPTOR);\n String[] ids = getSecureContainerList();\n reply.writeNoException();\n reply.writeStringArray(ids);\n return true;\n }\n case TRANSACTION_shutdown: {\n data.enforceInterface(DESCRIPTOR);\n IMountShutdownObserver observer;\n observer = IMountShutdownObserver.Stub.asInterface(data\n .readStrongBinder());\n shutdown(observer);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_finishMediaUpdate: {\n data.enforceInterface(DESCRIPTOR);\n finishMediaUpdate();\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_mountObb: {\n data.enforceInterface(DESCRIPTOR);\n final String rawPath = data.readString();\n final String canonicalPath = data.readString();\n final String key = data.readString();\n IObbActionListener observer;\n observer = IObbActionListener.Stub.asInterface(data.readStrongBinder());\n int nonce;\n nonce = data.readInt();\n mountObb(rawPath, canonicalPath, key, observer, nonce);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_unmountObb: {\n data.enforceInterface(DESCRIPTOR);\n String filename;\n filename = data.readString();\n boolean force;\n force = 0 != data.readInt();\n IObbActionListener observer;\n observer = IObbActionListener.Stub.asInterface(data.readStrongBinder());\n int nonce;\n nonce = data.readInt();\n unmountObb(filename, force, observer, nonce);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_isObbMounted: {\n data.enforceInterface(DESCRIPTOR);\n String filename;\n filename = data.readString();\n boolean status = isObbMounted(filename);\n reply.writeNoException();\n reply.writeInt((status ? 1 : 0));\n return true;\n }\n case TRANSACTION_getMountedObbPath: {\n data.enforceInterface(DESCRIPTOR);\n String filename;\n filename = data.readString();\n String mountedPath = getMountedObbPath(filename);\n reply.writeNoException();\n reply.writeString(mountedPath);\n return true;\n }\n case TRANSACTION_isExternalStorageEmulated: {\n data.enforceInterface(DESCRIPTOR);\n boolean emulated = isExternalStorageEmulated();\n reply.writeNoException();\n reply.writeInt(emulated ? 1 : 0);\n return true;\n }\n case TRANSACTION_decryptStorage: {\n data.enforceInterface(DESCRIPTOR);\n String password = data.readString();\n int result = decryptStorage(password);\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_encryptStorage: {\n data.enforceInterface(DESCRIPTOR);\n int type = data.readInt();\n String password = data.readString();\n int result = encryptStorage(type, password);\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_changeEncryptionPassword: {\n data.enforceInterface(DESCRIPTOR);\n int type = data.readInt();\n String password = data.readString();\n int result = changeEncryptionPassword(type, password);\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_getVolumeList: {\n data.enforceInterface(DESCRIPTOR);\n int uid = data.readInt();\n String packageName = data.readString();\n int _flags = data.readInt();\n StorageVolume[] result = getVolumeList(uid, packageName, _flags);\n reply.writeNoException();\n reply.writeTypedArray(result, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE);\n return true;\n }\n case TRANSACTION_getSecureContainerFilesystemPath: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n String path = getSecureContainerFilesystemPath(id);\n reply.writeNoException();\n reply.writeString(path);\n return true;\n }\n case TRANSACTION_getEncryptionState: {\n data.enforceInterface(DESCRIPTOR);\n int result = getEncryptionState();\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_fixPermissionsSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n int gid;\n gid = data.readInt();\n String filename;\n filename = data.readString();\n int resultCode = fixPermissionsSecureContainer(id, gid, filename);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_mkdirs: {\n data.enforceInterface(DESCRIPTOR);\n String callingPkg = data.readString();\n String path = data.readString();\n int result = mkdirs(callingPkg, path);\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_getPasswordType: {\n data.enforceInterface(DESCRIPTOR);\n int result = getPasswordType();\n reply.writeNoException();\n reply.writeInt(result);\n return true;\n }\n case TRANSACTION_getPassword: {\n data.enforceInterface(DESCRIPTOR);\n String result = getPassword();\n reply.writeNoException();\n reply.writeString(result);\n return true;\n }\n case TRANSACTION_clearPassword: {\n data.enforceInterface(DESCRIPTOR);\n clearPassword();\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_setField: {\n data.enforceInterface(DESCRIPTOR);\n String field = data.readString();\n String contents = data.readString();\n setField(field, contents);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_getField: {\n data.enforceInterface(DESCRIPTOR);\n String field = data.readString();\n String contents = getField(field);\n reply.writeNoException();\n reply.writeString(contents);\n return true;\n }\n case TRANSACTION_isConvertibleToFBE: {\n data.enforceInterface(DESCRIPTOR);\n int resultCode = isConvertibleToFBE() ? 1 : 0;\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_resizeSecureContainer: {\n data.enforceInterface(DESCRIPTOR);\n String id;\n id = data.readString();\n int sizeMb;\n sizeMb = data.readInt();\n String key;\n key = data.readString();\n int resultCode = resizeSecureContainer(id, sizeMb, key);\n reply.writeNoException();\n reply.writeInt(resultCode);\n return true;\n }\n case TRANSACTION_lastMaintenance: {\n data.enforceInterface(DESCRIPTOR);\n long lastMaintenance = lastMaintenance();\n reply.writeNoException();\n reply.writeLong(lastMaintenance);\n return true;\n }\n case TRANSACTION_runMaintenance: {\n data.enforceInterface(DESCRIPTOR);\n runMaintenance();\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_waitForAsecScan: {\n data.enforceInterface(DESCRIPTOR);\n waitForAsecScan();\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_getDisks: {\n data.enforceInterface(DESCRIPTOR);\n DiskInfo[] disks = getDisks();\n reply.writeNoException();\n reply.writeTypedArray(disks, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE);\n return true;\n }\n case TRANSACTION_getVolumes: {\n data.enforceInterface(DESCRIPTOR);\n int _flags = data.readInt();\n VolumeInfo[] volumes = getVolumes(_flags);\n reply.writeNoException();\n reply.writeTypedArray(volumes, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE);\n return true;\n }\n case TRANSACTION_getVolumeRecords: {\n data.enforceInterface(DESCRIPTOR);\n int _flags = data.readInt();\n VolumeRecord[] volumes = getVolumeRecords(_flags);\n reply.writeNoException();\n reply.writeTypedArray(volumes, android.os.Parcelable.PARCELABLE_WRITE_RETURN_VALUE);\n return true;\n }\n case TRANSACTION_mount: {\n data.enforceInterface(DESCRIPTOR);\n String volId = data.readString();\n mount(volId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_unmount: {\n data.enforceInterface(DESCRIPTOR);\n String volId = data.readString();\n unmount(volId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_format: {\n data.enforceInterface(DESCRIPTOR);\n String volId = data.readString();\n format(volId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_benchmark: {\n data.enforceInterface(DESCRIPTOR);\n String volId = data.readString();\n long res = benchmark(volId);\n reply.writeNoException();\n reply.writeLong(res);\n return true;\n }\n case TRANSACTION_partitionPublic: {\n data.enforceInterface(DESCRIPTOR);\n String diskId = data.readString();\n partitionPublic(diskId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_partitionPrivate: {\n data.enforceInterface(DESCRIPTOR);\n String diskId = data.readString();\n partitionPrivate(diskId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_partitionMixed: {\n data.enforceInterface(DESCRIPTOR);\n String diskId = data.readString();\n int ratio = data.readInt();\n partitionMixed(diskId, ratio);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_setVolumeNickname: {\n data.enforceInterface(DESCRIPTOR);\n String volId = data.readString();\n String nickname = data.readString();\n setVolumeNickname(volId, nickname);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_setVolumeUserFlags: {\n data.enforceInterface(DESCRIPTOR);\n String volId = data.readString();\n int _flags = data.readInt();\n int _mask = data.readInt();\n setVolumeUserFlags(volId, _flags, _mask);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_forgetVolume: {\n data.enforceInterface(DESCRIPTOR);\n String fsUuid = data.readString();\n forgetVolume(fsUuid);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_forgetAllVolumes: {\n data.enforceInterface(DESCRIPTOR);\n forgetAllVolumes();\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_setDebugFlags: {\n data.enforceInterface(DESCRIPTOR);\n int _flags = data.readInt();\n int _mask = data.readInt();\n setDebugFlags(_flags, _mask);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_getPrimaryStorageUuid: {\n data.enforceInterface(DESCRIPTOR);\n String volumeUuid = getPrimaryStorageUuid();\n reply.writeNoException();\n reply.writeString(volumeUuid);\n return true;\n }\n case TRANSACTION_setPrimaryStorageUuid: {\n data.enforceInterface(DESCRIPTOR);\n String volumeUuid = data.readString();\n IPackageMoveObserver listener = IPackageMoveObserver.Stub.asInterface(\n data.readStrongBinder());\n setPrimaryStorageUuid(volumeUuid, listener);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_createUserKey: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n int serialNumber = data.readInt();\n boolean ephemeral = data.readInt() != 0;\n createUserKey(userId, serialNumber, ephemeral);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_destroyUserKey: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n destroyUserKey(userId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_addUserKeyAuth: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n int serialNumber = data.readInt();\n byte[] token = data.createByteArray();\n byte[] secret = data.createByteArray();\n addUserKeyAuth(userId, serialNumber, token, secret);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_fixateNewestUserKeyAuth: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n fixateNewestUserKeyAuth(userId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_unlockUserKey: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n int serialNumber = data.readInt();\n byte[] token = data.createByteArray();\n byte[] secret = data.createByteArray();\n unlockUserKey(userId, serialNumber, token, secret);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_lockUserKey: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n lockUserKey(userId);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_isUserKeyUnlocked: {\n data.enforceInterface(DESCRIPTOR);\n int userId = data.readInt();\n boolean result = isUserKeyUnlocked(userId);\n reply.writeNoException();\n reply.writeInt(result ? 1 : 0);\n return true;\n }\n case TRANSACTION_prepareUserStorage: {\n data.enforceInterface(DESCRIPTOR);\n String volumeUuid = data.readString();\n int userId = data.readInt();\n int serialNumber = data.readInt();\n int _flags = data.readInt();\n prepareUserStorage(volumeUuid, userId, serialNumber, _flags);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_destroyUserStorage: {\n data.enforceInterface(DESCRIPTOR);\n String volumeUuid = data.readString();\n int userId = data.readInt();\n int _flags = data.readInt();\n destroyUserStorage(volumeUuid, userId, _flags);\n reply.writeNoException();\n return true;\n }\n case TRANSACTION_mountAppFuse: {\n data.enforceInterface(DESCRIPTOR);\n String name = data.readString();\n ParcelFileDescriptor fd = mountAppFuse(name);\n reply.writeNoException();\n reply.writeParcelable(fd, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);\n return true;\n }\n }\n return super.onTransact(code, data, reply, flags);\n }\n }\n\n /*\n * Creates a secure container with the specified parameters. Returns an int\n * consistent with MountServiceResultCode\n */\n public int createSecureContainer(String id, int sizeMb, String fstype, String key,\n int ownerUid, boolean external) throws RemoteException;\n\n /*\n * Destroy a secure container, and free up all resources associated with it.\n * NOTE: Ensure all references are released prior to deleting. Returns an\n * int consistent with MountServiceResultCode\n */\n public int destroySecureContainer(String id, boolean force) throws RemoteException;\n\n /*\n * Finalize a container which has just been created and populated. After\n * finalization, the container is immutable. Returns an int consistent with\n * MountServiceResultCode\n */\n public int finalizeSecureContainer(String id) throws RemoteException;\n\n /**\n * Call into MountService by PackageManager to notify that its done\n * processing the media status update request.\n */\n public void finishMediaUpdate() throws RemoteException;\n\n /**\n * Format external storage given a mount point. Returns an int consistent\n * with MountServiceResultCode\n */\n public int formatVolume(String mountPoint) throws RemoteException;\n\n /**\n * Gets the path to the mounted Opaque Binary Blob (OBB).\n */\n public String getMountedObbPath(String rawPath) throws RemoteException;\n\n /**\n * Gets an Array of currently known secure container IDs\n */\n public String[] getSecureContainerList() throws RemoteException;\n\n /*\n * Returns the filesystem path of a mounted secure container.\n */\n public String getSecureContainerPath(String id) throws RemoteException;\n\n /**\n * Returns an array of pids with open files on the specified path.\n */\n public int[] getStorageUsers(String path) throws RemoteException;\n\n /**\n * Gets the state of a volume via its mountpoint.\n */\n public String getVolumeState(String mountPoint) throws RemoteException;\n\n /**\n * Checks whether the specified Opaque Binary Blob (OBB) is mounted\n * somewhere.\n */\n public boolean isObbMounted(String rawPath) throws RemoteException;\n\n /*\n * Returns true if the specified container is mounted\n */\n public boolean isSecureContainerMounted(String id) throws RemoteException;\n\n /**\n * Returns true if a USB mass storage host is connected\n */\n public boolean isUsbMassStorageConnected() throws RemoteException;\n\n /**\n * Returns true if a USB mass storage host is enabled (media is shared)\n */\n public boolean isUsbMassStorageEnabled() throws RemoteException;\n\n /**\n * Mounts an Opaque Binary Blob (OBB) with the specified decryption key and\n * only allows the calling process's UID access to the contents.\n * MountService will call back to the supplied IObbActionListener to inform\n * it of the terminal state of the call.\n */\n public void mountObb(String rawPath, String canonicalPath, String key,\n IObbActionListener token, int nonce) throws RemoteException;\n\n /*\n * Mount a secure container with the specified key and owner UID. Returns an\n * int consistent with MountServiceResultCode\n */\n public int mountSecureContainer(String id, String key, int ownerUid, boolean readOnly)\n throws RemoteException;\n\n /**\n * Mount external storage at given mount point. Returns an int consistent\n * with MountServiceResultCode\n */\n public int mountVolume(String mountPoint) throws RemoteException;\n\n /**\n * Registers an IMountServiceListener for receiving async notifications.\n */\n public void registerListener(IMountServiceListener listener) throws RemoteException;\n\n /*\n * Rename an unmounted secure container. Returns an int consistent with\n * MountServiceResultCode\n */\n public int renameSecureContainer(String oldId, String newId) throws RemoteException;\n\n /**\n * Enables / disables USB mass storage. The caller should check actual\n * status of enabling/disabling USB mass storage via StorageEventListener.\n */\n public void setUsbMassStorageEnabled(boolean enable) throws RemoteException;\n\n /**\n * Shuts down the MountService and gracefully unmounts all external media.\n * Invokes call back once the shutdown is complete.\n */\n public void shutdown(IMountShutdownObserver observer) throws RemoteException;\n\n /**\n * Unmounts an Opaque Binary Blob (OBB). When the force flag is specified,\n * any program using it will be forcibly killed to unmount the image.\n * MountService will call back to the supplied IObbActionListener to inform\n * it of the terminal state of the call.\n */\n public void unmountObb(String rawPath, boolean force, IObbActionListener token, int nonce)\n throws RemoteException;\n\n /*\n * Unount a secure container. Returns an int consistent with\n * MountServiceResultCode\n */\n public int unmountSecureContainer(String id, boolean force) throws RemoteException;\n\n /**\n * Safely unmount external storage at given mount point. The unmount is an\n * asynchronous operation. Applications should register StorageEventListener\n * for storage related status changes.\n * @param mountPoint the mount point\n * @param force whether or not to forcefully unmount it (e.g. even if programs are using this\n * data currently)\n * @param removeEncryption whether or not encryption mapping should be removed from the volume.\n * This value implies {@code force}.\n */\n public void unmountVolume(String mountPoint, boolean force, boolean removeEncryption)\n throws RemoteException;\n\n /**\n * Unregisters an IMountServiceListener\n */\n public void unregisterListener(IMountServiceListener listener) throws RemoteException;\n\n /**\n * Returns whether or not the external storage is emulated.\n */\n public boolean isExternalStorageEmulated() throws RemoteException;\n\n /** The volume is not encrypted. */\n static final int ENCRYPTION_STATE_NONE = 1;\n /** The volume has been encrypted succesfully. */\n static final int ENCRYPTION_STATE_OK = 0;\n /** The volume is in a bad state.*/\n static final int ENCRYPTION_STATE_ERROR_UNKNOWN = -1;\n /** Encryption is incomplete */\n static final int ENCRYPTION_STATE_ERROR_INCOMPLETE = -2;\n /** Encryption is incomplete and irrecoverable */\n static final int ENCRYPTION_STATE_ERROR_INCONSISTENT = -3;\n /** Underlying data is corrupt */\n static final int ENCRYPTION_STATE_ERROR_CORRUPT = -4;\n\n /**\n * Determines the encryption state of the volume.\n * @return a numerical value. See {@code ENCRYPTION_STATE_*} for possible\n * values.\n * Note that this has been replaced in most cases by the APIs in\n * StorageManager (see isEncryptable and below)\n * This is still useful to get the error state when encryption has failed\n * and CryptKeeper needs to throw up a screen advising the user what to do\n */\n public int getEncryptionState() throws RemoteException;\n\n /**\n * Decrypts any encrypted volumes.\n */\n public int decryptStorage(String password) throws RemoteException;\n\n /**\n * Encrypts storage.\n */\n public int encryptStorage(int type, String password) throws RemoteException;\n\n /**\n * Changes the encryption password.\n */\n public int changeEncryptionPassword(int type, String password)\n throws RemoteException;\n\n /**\n * Verify the encryption password against the stored volume. This method\n * may only be called by the system process.\n */\n public int verifyEncryptionPassword(String password) throws RemoteException;\n\n /**\n * Returns list of all mountable volumes.\n */\n public StorageVolume[] getVolumeList(int uid, String packageName, int flags) throws RemoteException;\n\n /**\n * Gets the path on the filesystem for the ASEC container itself.\n *\n * @param cid ASEC container ID\n * @return path to filesystem or {@code null} if it's not found\n * @throws RemoteException\n */\n public String getSecureContainerFilesystemPath(String cid) throws RemoteException;\n\n /*\n * Fix permissions in a container which has just been created and populated.\n * Returns an int consistent with MountServiceResultCode\n */\n public int fixPermissionsSecureContainer(String id, int gid, String filename)\n throws RemoteException;\n\n /**\n * Ensure that all directories along given path exist, creating parent\n * directories as needed. Validates that given path is absolute and that it\n * contains no relative \".\" or \"..\" paths or symlinks. Also ensures that\n * path belongs to a volume managed by vold, and that path is either\n * external storage data or OBB directory belonging to calling app.\n */\n public int mkdirs(String callingPkg, String path) throws RemoteException;\n\n /**\n * Determines the type of the encryption password\n * @return PasswordType\n */\n public int getPasswordType() throws RemoteException;\n\n /**\n * Get password from vold\n * @return password or empty string\n */\n public String getPassword() throws RemoteException;\n\n /**\n * Securely clear password from vold\n */\n public void clearPassword() throws RemoteException;\n\n /**\n * Set a field in the crypto header.\n * @param field field to set\n * @param contents contents to set in field\n */\n public void setField(String field, String contents) throws RemoteException;\n\n /**\n * Gets a field from the crypto header.\n * @param field field to get\n * @return contents of field\n */\n public String getField(String field) throws RemoteException;\n\n public boolean isConvertibleToFBE() throws RemoteException;\n\n public int resizeSecureContainer(String id, int sizeMb, String key) throws RemoteException;\n\n /**\n * Report the time of the last maintenance operation such as fstrim.\n * @return Timestamp of the last maintenance operation, in the\n * System.currentTimeMillis() time base\n * @throws RemoteException\n */\n public long lastMaintenance() throws RemoteException;\n\n /**\n * Kick off an immediate maintenance operation\n * @throws RemoteException\n */\n public void runMaintenance() throws RemoteException;\n\n public void waitForAsecScan() throws RemoteException;\n\n public DiskInfo[] getDisks() throws RemoteException;\n public VolumeInfo[] getVolumes(int flags) throws RemoteException;\n public VolumeRecord[] getVolumeRecords(int flags) throws RemoteException;\n\n public void mount(String volId) throws RemoteException;\n public void unmount(String volId) throws RemoteException;\n public void format(String volId) throws RemoteException;\n public long benchmark(String volId) throws RemoteException;\n\n public void partitionPublic(String diskId) throws RemoteException;\n public void partitionPrivate(String diskId) throws RemoteException;\n public void partitionMixed(String diskId, int ratio) throws RemoteException;\n\n public void setVolumeNickname(String fsUuid, String nickname) throws RemoteException;\n public void setVolumeUserFlags(String fsUuid, int flags, int mask) throws RemoteException;\n public void forgetVolume(String fsUuid) throws RemoteException;\n public void forgetAllVolumes() throws RemoteException;\n public void setDebugFlags(int flags, int mask) throws RemoteException;\n\n public String getPrimaryStorageUuid() throws RemoteException;\n public void setPrimaryStorageUuid(String volumeUuid, IPackageMoveObserver callback)\n throws RemoteException;\n\n public void createUserKey(int userId, int serialNumber, boolean ephemeral)\n throws RemoteException;\n public void destroyUserKey(int userId) throws RemoteException;\n public void addUserKeyAuth(int userId, int serialNumber,\n byte[] token, byte[] secret) throws RemoteException;\n public void fixateNewestUserKeyAuth(int userId) throws RemoteException;\n\n public void unlockUserKey(int userId, int serialNumber,\n byte[] token, byte[] secret) throws RemoteException;\n public void lockUserKey(int userId) throws RemoteException;\n public boolean isUserKeyUnlocked(int userId) throws RemoteException;\n\n public void prepareUserStorage(String volumeUuid, int userId, int serialNumber,\n int flags) throws RemoteException;\n public void destroyUserStorage(String volumeUuid, int userId, int flags) throws RemoteException;\n\n public ParcelFileDescriptor mountAppFuse(String name) throws RemoteException;\n}", "public interface Listener {\n}", "public interface Listener {\n}", "public interface MDDChannelListener {\r\n /**\r\n * Called on receipt of CHANNEL events\r\n * @param channel String containing the name of the channel\r\n * @param title String containing the title of the program\r\n * @param subtitle String containing the subtitle of the program\r\n */\r\n public void onChannel(String channel, String title, String subtitle);\r\n /**\r\n * Called on receipt of PROGRESS events\r\n * @param pos int representing current position\r\n */\r\n public void onProgress(int pos);\r\n /**\r\n * Called on receipt of EXIT event\r\n */\r\n public void onExit();\r\n}", "public interface RemoteDBConnection extends Remote, DBConnection {\n\n\t/**\n\t * Key the database connection in registered with in RMI registry.\n\t */\n\tpublic static final String REGISTRY_KEY = \"DBConnection\";\n}", "public interface MessageReceivedListener {\n\t\n\t/**\n\t * Called when new command/message received\n\t * @param msg Command/message as String\n\t */\n\tpublic void OnMessageReceived(String msg);\n\t\n\t/**\n\t * Called when new file is incoming.\n\t * @param length Total length of data expected to be received\n\t * @param downloaded Total length of data actually received so far\n\t */\n\tpublic void OnFileIncoming(int length);\n\t\n\t/**\n\t * Called when more data of a file has been transfered\n\t * @param data Byte array of data received\n\t * @param read The lenght of the data received as int\n\t * @param length Total length of data expected to be received\n\t * @param downloaded Total length of data actually received so far\n\t */\n\tpublic void OnFileDataReceived(byte[] data,int read, int length, int downloaded);\n\t\n\t/**\n\t * Called when file transfer is complete\n\t * @param got\n\t * @param expected\n\t */\n\tpublic void OnFileComplete();\n\t\n\t/**\n\t * Called when an error occur\n\t */\n\tpublic void OnConnectionError();\n\t\n\t/**\n\t * Called when socket has connected to the server\n\t */\n\tpublic void OnConnectSuccess();\n}", "public interface FSInterface extends Remote\n{\n\tpublic String browseDirs(String dir) throws RemoteException;\n\tpublic String browseFiles(String dir) throws RemoteException;\n\tpublic String search(String file, String startDir) throws RemoteException;\n\tpublic boolean createFile(String file) throws RemoteException;\n\tpublic boolean createDir(String dir) throws RemoteException;\n\tpublic boolean delete(String file) throws RemoteException;\n\tpublic boolean rename(String oldName, String newName) throws RemoteException;\n\tpublic String getOSName()throws RemoteException;\n\tpublic String getHostName() throws RemoteException;\n\tpublic String getHostAddress() throws RemoteException;\n\tpublic void sendClientAddress(String clientAddress) throws RemoteException;\n\tpublic String getClientAddress() throws RemoteException;\n\tpublic Path [] getFileList() throws RemoteException;\n\t//public String sendClientName(String clientName) throws RemoteException; //ToDo\n\t//public String sendClientOS(String clientOS) throws RemoteException; //ToDo\n}", "@Remote\r\npublic interface ActionItemManagerRemote\r\n extends ActionItemManager\r\n{\r\n\r\n\r\n}", "public interface ServerListener {\n void onSessionCreated(Session session);\n\n void onSessionRemoved(Session session);\n}", "public interface AccessSessionLocal\n extends javax.ejb.EJBLocalObject\n{\n /**\n * Business Method\n */\n public boolean authenticateUser( java.security.cert.X509Certificate[] certificates ) throws org.emayor.servicehandling.kernel.AccessSessionException;\n\n /**\n * Business Method\n */\n public org.emayor.servicehandling.interfaces.ServiceSessionLocal[] getAllServiceSessions( ) throws org.emayor.servicehandling.kernel.AccessSessionException;\n\n /**\n * Business Method\n */\n public org.emayor.servicehandling.interfaces.ServiceSessionLocal getServiceSession( java.lang.String ssid ) throws org.emayor.servicehandling.kernel.AccessSessionException;\n\n /**\n * Business Method\n */\n public java.lang.String startServiceSession( java.lang.String serviceId,boolean isForwarded,java.lang.String xmlDoc,java.lang.String docSig ) throws org.emayor.servicehandling.kernel.AccessSessionException;\n\n /**\n * Business Method\n */\n public java.lang.String startServiceSession( java.lang.String serviceId,java.lang.String requestDocument ) throws org.emayor.servicehandling.kernel.AccessSessionException;\n\n /**\n * Business Method\n */\n public boolean stopServiceSession( java.lang.String ssid ) throws org.emayor.servicehandling.kernel.AccessSessionException;\n\n /**\n * Business Method\n */\n public boolean stopAllServiceSessions( ) throws org.emayor.servicehandling.kernel.AccessSessionException;\n\n /**\n * Business Method\n */\n public org.emayor.servicehandling.kernel.ServiceInfo[] listAvailableServices( ) throws org.emayor.servicehandling.kernel.AccessSessionException;\n\n /**\n * Business Method\n */\n public boolean stop( ) throws org.emayor.servicehandling.kernel.AccessSessionException;\n\n /**\n * Business Method\n */\n public org.eMayor.PolicyEnforcement.C_UserProfile getUserProfile( ) throws org.emayor.servicehandling.kernel.AccessSessionException;\n\n /**\n * Business Method\n */\n public java.lang.String getSessionId( ) throws org.emayor.servicehandling.kernel.SessionException;\n\n /**\n * Business Method\n */\n public java.lang.String getUserId( ) throws org.emayor.servicehandling.kernel.AccessSessionException;\n\n /**\n * Business Method\n */\n public void setUserId( java.lang.String userId ) throws org.emayor.servicehandling.kernel.AccessSessionException;\n\n /**\n * Business Method\n */\n public java.util.Date getStartDate( ) throws org.emayor.servicehandling.kernel.SessionException;\n\n}", "public IRuntimeContext getContext() {\n return fContext;\n }", "public interface RMIClientInterface extends Remote {\n\n void sendSnapshot(SnapshotToSend snapshotToSend) throws RemoteException;\n\n void sendMap(ArrayList<Map> mapArrayList) throws RemoteException;\n\n void gameInitialization(SnapshotToSend snapshotToSend) throws RemoteException;\n\n void isYourTurn() throws RemoteException;\n\n void finishTurn() throws RemoteException;\n\n void onStartMarket() throws RemoteException;\n\n void onStartBuyPhase() throws RemoteException;\n\n void disableMarketPhase() throws RemoteException;\n\n void selectPermitCard() throws RemoteException;\n\n void selectCityRewardBonus(SnapshotToSend snapshotToSend) throws RemoteException;\n\n void moveKing(ArrayList<City> kingPath) throws RemoteException;\n\n void sendMatchFinishedWithWin(ArrayList<BaseUser> finalSnapshot) throws RemoteException;\n\n void ping() throws RemoteException;\n\n void selectOldPermiCard() throws RemoteException;\n\n void onUserDisconnect(String username) throws RemoteException;\n}", "public interface IBaseListener {\n}", "public interface IGFVoiceWakeupListener extends android.os.IInterface\n{\n/** Local-side IPC implementation stub class. */\npublic static abstract class Stub extends android.os.Binder implements com.gofun.voice.IGFVoiceWakeupListener\n{\nprivate static final java.lang.String DESCRIPTOR = \"com.gofun.voice.IGFVoiceWakeupListener\";\n/** Construct the stub at attach it to the interface. */\npublic Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}\n/**\n * Cast an IBinder object into an com.gofun.voice.IGFVoiceWakeupListener interface,\n * generating a proxy if needed.\n */\npublic static com.gofun.voice.IGFVoiceWakeupListener asInterface(android.os.IBinder obj)\n{\nif ((obj==null)) {\nreturn null;\n}\nandroid.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\nif (((iin!=null)&&(iin instanceof com.gofun.voice.IGFVoiceWakeupListener))) {\nreturn ((com.gofun.voice.IGFVoiceWakeupListener)iin);\n}\nreturn new com.gofun.voice.IGFVoiceWakeupListener.Stub.Proxy(obj);\n}\n@Override public android.os.IBinder asBinder()\n{\nreturn this;\n}\n@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException\n{\njava.lang.String descriptor = DESCRIPTOR;\nswitch (code)\n{\ncase INTERFACE_TRANSACTION:\n{\nreply.writeString(descriptor);\nreturn true;\n}\ncase TRANSACTION_onBeginOfSpeech:\n{\ndata.enforceInterface(descriptor);\nthis.onBeginOfSpeech();\nreply.writeNoException();\nreturn true;\n}\ncase TRANSACTION_onWakeup:\n{\ndata.enforceInterface(descriptor);\njava.lang.String _arg0;\n_arg0 = data.readString();\njava.lang.String _arg1;\n_arg1 = data.readString();\njava.lang.String _arg2;\n_arg2 = data.readString();\nthis.onWakeup(_arg0, _arg1, _arg2);\nreply.writeNoException();\nreturn true;\n}\ncase TRANSACTION_onVolumeChanged:\n{\ndata.enforceInterface(descriptor);\nint _arg0;\n_arg0 = data.readInt();\nthis.onVolumeChanged(_arg0);\nreply.writeNoException();\nreturn true;\n}\ncase TRANSACTION_onError:\n{\ndata.enforceInterface(descriptor);\nint _arg0;\n_arg0 = data.readInt();\nthis.onError(_arg0);\nreply.writeNoException();\nreturn true;\n}\ndefault:\n{\nreturn super.onTransact(code, data, reply, flags);\n}\n}\n}\nprivate static class Proxy implements com.gofun.voice.IGFVoiceWakeupListener\n{\nprivate android.os.IBinder mRemote;\nProxy(android.os.IBinder remote)\n{\nmRemote = remote;\n}\n@Override public android.os.IBinder asBinder()\n{\nreturn mRemote;\n}\npublic java.lang.String getInterfaceDescriptor()\n{\nreturn DESCRIPTOR;\n}\n@Override public void onBeginOfSpeech() throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\nmRemote.transact(Stub.TRANSACTION_onBeginOfSpeech, _data, _reply, 0);\n_reply.readException();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\n}\n@Override public void onWakeup(java.lang.String sst, java.lang.String id, java.lang.String score) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeString(sst);\n_data.writeString(id);\n_data.writeString(score);\nmRemote.transact(Stub.TRANSACTION_onWakeup, _data, _reply, 0);\n_reply.readException();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\n}\n@Override public void onVolumeChanged(int volume) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(volume);\nmRemote.transact(Stub.TRANSACTION_onVolumeChanged, _data, _reply, 0);\n_reply.readException();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\n}\n@Override public void onError(int code) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(code);\nmRemote.transact(Stub.TRANSACTION_onError, _data, _reply, 0);\n_reply.readException();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\n}\n}\nstatic final int TRANSACTION_onBeginOfSpeech = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0);\nstatic final int TRANSACTION_onWakeup = (android.os.IBinder.FIRST_CALL_TRANSACTION + 1);\nstatic final int TRANSACTION_onVolumeChanged = (android.os.IBinder.FIRST_CALL_TRANSACTION + 2);\nstatic final int TRANSACTION_onError = (android.os.IBinder.FIRST_CALL_TRANSACTION + 3);\n}\npublic void onBeginOfSpeech() throws android.os.RemoteException;\npublic void onWakeup(java.lang.String sst, java.lang.String id, java.lang.String score) throws android.os.RemoteException;\npublic void onVolumeChanged(int volume) throws android.os.RemoteException;\npublic void onError(int code) throws android.os.RemoteException;\n}", "Object getRemoteConnectionContextObject( String key );", "@Remote\r\npublic interface EcheanceReglementManagerRemote\r\n extends EcheanceReglementManager\r\n{\r\n\r\n\r\n}", "public interface IRemoteCacheServerAttributes\n extends ICommonRemoteCacheAttributes\n{\n /**\n * Gets the localPort attribute of the IRemoteCacheAttributes object.\n * <p>\n * @return The localPort value\n */\n int getServicePort();\n\n /**\n * Sets the localPort attribute of the IRemoteCacheAttributes object.\n * <p>\n * @param p\n * The new localPort value\n */\n void setServicePort( int p );\n\n /**\n * Should we try to get remotely when the request does not come in from a\n * cluster. If local L1 asks remote server R1 for element A and R1 doesn't\n * have it, should R1 look remotely? The difference is between a local and a\n * remote update. The local update stays local. Normal updates, removes,\n * etc, stay local when they come from a client. If this is set to true,\n * then they can go remote.\n * <p>\n * @return The localClusterConsistency value\n */\n boolean isAllowClusterGet();\n\n /**\n * Should cluster updates be propagated to the locals.\n * <p>\n * @param r\n * The new localClusterConsistency value\n */\n void setAllowClusterGet( boolean r );\n\n /**\n * Gets the ConfigFileName attribute of the IRemoteCacheAttributes object.\n * <p>\n * @return The configuration file name\n */\n String getConfigFileName();\n\n /**\n * Sets the ConfigFileName attribute of the IRemoteCacheAttributes object.\n * <p>\n * @param s\n * The new configuration file name\n */\n void setConfigFileName( String s );\n\n /**\n * Should we try to keep the registry alive\n * <p>\n * @param useRegistryKeepAlive the useRegistryKeepAlive to set\n */\n void setUseRegistryKeepAlive( boolean useRegistryKeepAlive );\n\n /**\n * Should we try to keep the registry alive\n * <p>\n * @return the useRegistryKeepAlive\n */\n boolean isUseRegistryKeepAlive();\n\n /**\n * @param registryKeepAliveDelayMillis the registryKeepAliveDelayMillis to set\n */\n void setRegistryKeepAliveDelayMillis( long registryKeepAliveDelayMillis );\n\n /**\n * @return the registryKeepAliveDelayMillis\n */\n long getRegistryKeepAliveDelayMillis();\n}", "public interface IServer extends Remote {\n /**\n * @param auction\n * @throws RemoteException\n */\n void placeAuction(AuctionBean auction) throws RemoteException;\n\n /**\n * @param client\n * @throws RemoteException\n * @throws InterruptedException\n */\n void register(IClient client) throws RemoteException, InterruptedException;\n\n void disconnect(IClient client) throws RemoteException;\n\n /**\n * @param client\n * @param newBid\n * @throws RemoteException\n */\n void raiseBid(IClient client, int newBid) throws RemoteException;\n\n /**\n * @param client\n * @throws RemoteException\n * @throws InterruptedException\n */\n void timeElapsed(IClient client) throws RemoteException, InterruptedException;\n\n\tvoid registerCredentials(String username, String password) throws RemoteException, InterruptedException;\n\n\tboolean verifyCredentials(String username, String password) throws RemoteException, InterruptedException;\n\t\n}", "public interface cew {\n void a(Context context);\n}", "public org.omg.CORBA.Context read_Context() {\n throw new org.omg.CORBA.NO_IMPLEMENT();\n }", "public interface InterfaceClient extends Remote {\n\n double seConnecter(Client client) throws RemoteException;\n\n \n\n boolean peutReserver(Reservation rv) throws RemoteException;\n\n void visualiser(Vehicule voiture) throws RemoteException;\n\n \n \n \n void deconnexion() throws RemoteException;\n\n boolean sinscrire(Client client) throws RemoteException;\n\n void inscriptionReussite(Client client) throws RemoteException;\n}", "public interface IListenerPresenter {\n void loadListen(Context context, boolean isFirst, String type, String page);\n\n void loadListen(Context context, boolean isFirst, String page);\n}", "public interface OnRequestDetailsListen {\n}", "public interface ImgServer extends ImgServerOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "public static interface Proxy {\r\n\t\t/** \r\n\t\t * Returns self of current context.\r\n\t\t * @return self of current context.\r\n\t\t */\r\n\t\tpublic Component getSelf(ExecutionCtrl exec);\r\n\t\t/** Sets an execution attribute.\r\n\t\t */\r\n\t\tpublic void setAttribute(Execution exec, String name, Object value);\r\n\t\t/** Removes an execution attribute.\r\n\t\t */\r\n\t\tpublic void removeAttribute(Execution exec, String name);\r\n\t\t\r\n\t\t/** Sets an session attribute.\r\n\t\t */\r\n\t\tpublic void setAttribute(Session ses, String name, Object value);\r\n\t\t\r\n\t\t/** Removes an session attribute.\r\n\t\t */\r\n\t\tpublic void removeAttribute(Session session, String name);\r\n\t\t\r\n\t\t/** Called when ZK Update Engine has sent a response to the client.\r\n\t\t *\r\n\t\t * <p>Note: the implementation has to maintain one last-sent\r\n\t\t * response information for each channel, since a different channel\r\n\t\t * has different set of request IDs and might resend in a different\r\n\t\t * condition.\r\n\t\t *\r\n\t\t * @param channel the request channel.\r\n\t\t * For example, \"au\" for AU requests and \"cm\" for Comet requests.\r\n\t\t * @param reqId the request ID that the response is generated for.\r\n\t\t * Ingore if null.\r\n\t\t * @param resInfo the response infomation. Ignored if reqId is null.\r\n\t\t * The real value depends on the caller.\r\n\t\t */ \r\n\t\tpublic void responseSent(DesktopCtrl desktopCtrl, String channel, String reqId, Object resInfo);\r\n\t}", "public interface Server {\n\n /**\n * Start server.\n */\n void start();\n\n /**\n * Stop server.\n */\n void stop();\n\n /**\n * Is the server running?\n *\n * @return return true, not return false.\n */\n boolean isRunning();\n\n interface Listener {\n\n /**\n * The server is started.\n */\n void onStarted();\n\n /**\n * The server is stopped.\n */\n void onStopped();\n\n /**\n * An error occurred.\n *\n * @param e error.\n */\n void onError(Exception e);\n\n }\n}", "public interface Context { long getNativeEglContext(); }", "public interface EventListener extends Remote{\n\n @OneWay(full = true)\n void onEvent(EventObject event);\n}", "public interface ContextListener {\n /**\n * Gets the albums.\n * \n * @return the albums\n */\n public List<AlbumInfo> getAlbums();\n\n /**\n * Notify album retrieved.\n * \n * @param file the file\n * @param id the id\n */\n public void notifyAlbumRetrieved(AudioObject file, long id);\n\n /**\n * Notify artist image.\n * \n * @param img the img\n * @param id the id\n */\n public void notifyArtistImage(Image img, long id);\n\n /**\n * Notify cover retrieved.\n * \n * @param album the album\n * @param cover the cover\n * @param id the id\n */\n public void notifyCoverRetrieved(AlbumInfo album, Image cover, long id);\n\n /**\n * Notify finish get similar artist.\n * \n * @param a the a\n * @param img the img\n * @param id the id\n */\n public void notifyFinishGetSimilarArtist(ArtistInfo a, Image img, long id);\n\n /**\n * Notify start retrieving artist images.\n * \n * @param id the id\n */\n public void notifyStartRetrievingArtistImages(long id);\n\n /**\n * Notify start retrieving covers.\n * \n * @param id the id\n */\n public void notifyStartRetrievingCovers(long id);\n\n /**\n * Notify wiki info retrieved.\n * \n * @param wikiText the wiki text\n * @param wikiURL the wiki url\n * @param id the id\n */\n public void notifyWikiInfoRetrieved(String wikiText, String wikiURL, long id);\n\n /**\n * Sets the album.\n * \n * @param album the album\n * @param id the id\n */\n public void setAlbum(AlbumInfo album, long id);\n\n /**\n * Sets the albums.\n * \n * @param album the album\n * @param id the id\n */\n public void setAlbums(List<? extends AlbumInfo> album, long id);\n\n /**\n * Sets the image.\n * \n * @param img the img\n * @param ao audio object\n * @param id the id\n */\n public void setImage(Image img, AudioObject ao, long id);\n\n /**\n * Sets the last album retrieved.\n * \n * @param album the album\n * @param id the id\n */\n public void setLastAlbumRetrieved(String album, long id);\n\n /**\n * Sets the last artist retrieved.\n * \n * @param artist the artist\n * @param id the id\n */\n public void setLastArtistRetrieved(String artist, long id);\n}", "public interface CallbackClientIntf extends Remote \n{ \n public static final String NAME = \"CallbackClientIntf\";\n\t\n public boolean IsGoodObject(Object Obj1, Object Obj2) throws RemoteException;\n public boolean IsRightValue(long val1, long val2) throws RemoteException, Exception;\n\n}", "@Remote\r\npublic interface CmUserDocstatusAccessFacadeRemote extends UtopiaBasicUsecaseBean<CmUserDocstatusAccess, CmUserDocstatusAccess> {\r\n\r\n\tpublic List<CmDocStatus> getUserAccessibleDocStatuses(Long userId,Map<String,Object>context);\r\n}", "public interface cez {\n void d(Context context);\n}", "public interface ChatServiceListener {\n\n public final static byte STATUS_CONNECT_SUCCESS = 1;\n\n public final static byte STATUS_CONNECT_CLOSED = 0;\n\n public final static byte STATUS_CONNECT_ERROR = 0;\n\n\n /**\n * 当接收到系统消息\n *\n */\n public void onMessageResponse(String msg);\n\n /**\n * 当服务状态发生变化时触发\n *\n */\n public void onServiceStatusConnectChanged(int statusCode);\n}", "public interface InterFace2 extends InterFace2Operations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity \r\n{\r\n}", "public interface CompleteListener {\n\n public void done(String response);\n Context getApplicationsContext();\n}", "protected IOContext _createContext(Object srcRef, boolean resourceManaged)\n/* */ {\n/* 1513 */ return new IOContext(_getBufferRecycler(), srcRef, resourceManaged);\n/* */ }" ]
[ "0.6282508", "0.61442053", "0.60622835", "0.6035497", "0.60127395", "0.59687066", "0.5964633", "0.59441787", "0.59408283", "0.5929878", "0.58980024", "0.5876103", "0.58744496", "0.5864304", "0.58525306", "0.5851713", "0.5836189", "0.57959366", "0.57663286", "0.57533294", "0.57483846", "0.5746299", "0.57234895", "0.5714612", "0.5713834", "0.5711526", "0.5647256", "0.5645468", "0.5625316", "0.5623429", "0.56094545", "0.56049764", "0.5600192", "0.5586809", "0.5575197", "0.55711615", "0.5552381", "0.5540366", "0.55399936", "0.55264425", "0.5519603", "0.55142695", "0.55095", "0.55089676", "0.5507211", "0.54871196", "0.5476987", "0.5473292", "0.5471045", "0.54702157", "0.5467032", "0.54636705", "0.5456398", "0.5455952", "0.544831", "0.5447413", "0.5443994", "0.5442314", "0.5434984", "0.5428857", "0.5427853", "0.54228187", "0.54172516", "0.5414203", "0.5413912", "0.54084677", "0.54084677", "0.54041797", "0.53983086", "0.53949654", "0.5393471", "0.53909945", "0.53864914", "0.53850317", "0.53783303", "0.5375448", "0.53690284", "0.5367432", "0.5363179", "0.53599596", "0.53555757", "0.53511065", "0.5343703", "0.53428996", "0.5330137", "0.53285056", "0.53251815", "0.5321939", "0.5318465", "0.5316858", "0.53129053", "0.5307123", "0.5305709", "0.5303611", "0.5302469", "0.52967894", "0.529473", "0.5291048", "0.5290789", "0.52883476" ]
0.7296971
0
Called when an object has been added. The binding of the newly added object can be obtained using evt.getNewBinding().
public void objectAdded(NamingEvent evt) throws RemoteException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void add(GObject object);", "@Override\r\n\tpublic void insertObjectListener(ActionEvent e) {\n\t\t\r\n\t}", "public void newBinding(BGMEvent e);", "@Override\n public boolean add(T1 o) //Modify to take in Authenication ID for future logging function\n {\n if(super.add(o)) {\n comboBoxModelSelectedItem = o;\n modelListenersNotify();\n ViewerController.saveModel();\n return true;\n }\n return false;\n }", "@Override\r\n\t\t\tpublic void componentAdded(ContainerEvent arg0){}", "@Override\r\n\t\t\t\t\tpublic void addItemEventOccurred(AddItemEvent event) {\n\r\n\t\t\t\t\t}", "@Override\r\n\tpublic void add(Object object) {\n\t\t\r\n\t}", "public void addShape(Shapes obj) {\n \tthis.listShapes.add(obj);\n W.repaint();\n }", "private void addPerson(){\r\n\t\tpeople.add(new Person(this));\r\n\t\t// fire the listeners so the screen updates\r\n\t\t// when addPerson is called (by the button click)\r\n\t\tpersonTableModel.fireTableRowsInserted(0,0);\r\n\t}", "@Override\npublic void add(ObjectAdapter compAdapter) {\n\t\n}", "public AddEvent() {\n initComponents();\n }", "public void addNewborn(Object anObj) { _newBorns.add(anObj); }", "private void addBindingAndListener() {\n // When the simulation has more than one time of simulation this property change the selected element\n // of time series.\n this.changeListener = (observable, oldValue, newValue) -> {\n if (newValue instanceof Component) { // IS LINK OR NODE\n Component comp = (Component) newValue;\n idTextField.setText(comp.getId());\n }\n };\n this.selectableItem.addListener(changeListener);\n }", "public void objectChanged(NamingEvent evt) throws RemoteException;", "public void addGraphicObject(GraphicObject obj)\n {\n graphicObjects.addLast(obj);\n }", "protected void objAdded(UserId principal, ObjLoc objLoc, ObjectMeta objectMeta) {\r\n\r\n }", "private void addNewMember(Event x) {\r\n \r\n \r\n \r\n }", "public void addObj(Obj3d obj) {\n\t\tthis.panes.add(new ObjPane(obj, this));\n\t\tthis.add(getObjPane(obj));\n\t\tthis.revalidate();\n\t\tthis.repaint();\n\t}", "public void handleAdd(ActionEvent actionEvent) {\n }", "public void formEventOccurred(FormEvent e){\n\t\t\t\tcontroller.addPerson(e);\r\n\t\t\t\ttablePanel.refresh();\r\n\t\t\t}", "public BulletAddedEvent(Bullet b)\r\n {\r\n bull = b;\r\n }", "public void add(GameObject newObject) {\n\t\tgameObjects.addElement(newObject);\n\t}", "@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\tUser myUser = new User();\r\n\t\t\t\tmyUsers.add(myUser);\r\n\t\t\t\tSystem.out.println(\"guest added\");\r\n\t\t\t\t\r\n\t\t\t}", "public void onAdd(TimelineAddEvent e) {\n\t\tevent = new TimelineEvent(new Booking(), e.getStartDate(), e.getEndDate(), true, e.getGroup());\n\n\t\t// add the new event to the model in case if user will close or cancel the \"Add dialog\"\n\t\t// without to update details of the new event. Note: the event is already added in UI.\n\t\tmodel.add(event);\n\t}", "public void actionPerformed(ActionEvent e) {\r\n String record[] = getRecordOnPan();\r\n // Avoid exist owner value\r\n record[5] = \"\";\r\n\r\n try {\r\n bc.handleAddGesture(record);\r\n updateStatus(\"Record added.\");\r\n } catch (Exception ex) {\r\n updateStatus(ex.getMessage());\r\n }\r\n }", "void addObjLabel(ObjLabel objLabel) {\n\n //make sure the Object gets notified of mouse movements\n objCanvas.addEventHandler(MouseEvent.MOUSE_MOVED, objLabel);\n objCanvas.drawLabel(objLabel);\n }", "public void addListener(AlgorithmInterface obj) {\r\n objectList.addElement(obj);\r\n }", "public void add(Object obj) { \n\t\tcollection.addElement(obj);\n\t}", "com.walgreens.rxit.ch.cda.EIVLEvent addNewEvent();", "@Override\n \t\tpublic void addPoi(POIObject poi) {\n \t\t\tCreateEventFragment.this.poi = poi;\n \t\t\tCreateEventFragment.this.eventObject.assignPoi(poi);\n \t\t}", "@Override\npublic void add(VirtualContainer parent, VirtualComponent comp,\n\t\tObjectAdapter childAdapter) {\n\t\n}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\taddNewItem();\n\t\t\t}", "@FXML\n\tpublic void add(ActionEvent event) {\n\t\tBrand brand = new Brand();\n\t\tbrand.setLabel(nameTF.getText());\n\t\t\n\n\t\t\n\t\tBrandDelegate.addBrand(brand);\n\t\tJOptionPane.showMessageDialog(null, \"Ajout effectué avec succés\");\n\t}", "@Override\n public void addedResource( ResourceEvent event )\n {\n }", "public boolean isObjectAdded() {\n return OBJECTADDED.equals(message);\n }", "public void addObject(DcObject dco);", "public void add(GeometricalObject object);", "private void bindObject() {\n }", "public void evt_AddCurrentObject(CObject pHo)\r\n {\r\n CObjInfo oilPtr = pHo.hoOiList;\r\n if (oilPtr.oilEventCount != rh2EventCount)\r\n {\r\n // Aucune selection\r\n oilPtr.oilEventCount = rh2EventCount;\r\n oilPtr.oilListSelected = pHo.hoNumber;\r\n oilPtr.oilNumOfSelected = 1;\r\n pHo.hoNextSelected = -1;\r\n }\r\n else\r\n {\r\n // Objet deja selectionne, evite les doublets\r\n short oils = oilPtr.oilListSelected;\r\n if (oils < 0)\r\n {\r\n oilPtr.oilListSelected = pHo.hoNumber;\r\n oilPtr.oilNumOfSelected += 1;\r\n pHo.hoNextSelected = -1;\r\n }\r\n else\r\n {\r\n CObject pHo1;\r\n do\r\n {\r\n if (pHo.hoNumber == oils)\r\n {\r\n return;\r\n }\r\n pHo1 = rhPtr.rhObjectList[oils];\r\n oils = pHo1.hoNextSelected;\r\n } while (oils >= 0);\r\n\r\n pHo1.hoNextSelected = pHo.hoNumber;\r\n pHo.hoNextSelected = -1;\r\n pHo.hoOiList.oilNumOfSelected += 1;\r\n }\r\n }\r\n }", "public void addBinding(Binding aBinding)\n{\n removeBinding(aBinding.getPropertyName()); // Remove current binding for property name (if it exists)\n List <Binding> bindings = getBindings(true); // Add binding\n bindings.add(aBinding);\n aBinding.setNode(this); // Set binding width to this shape\n}", "public void addObject(AdvObject obj) {\n\t\tobjects.add(obj);\n\t}", "void add(GeometricalObject object);", "private void fireObjectAdded(final FieldObject fieldObject) {\n for (FieldObjectListener objectListener : _fieldObjectListeners) {\n objectListener.fieldObjectAdded(fieldObject);\n }\n }", "public interface NewObjectListener extends EventListener {\r\n //~ Methods ////////////////////////////////////////////////////////////////\r\n\r\n /**\r\n * Called when an new HyperEdge has just been created.\r\n * @param hedge the newly created HyperEdge.\r\n * hedge should be in a well-defined state with all required\r\n * fields and attributes set.\r\n *\r\n * <P>Note that since this callback may be invoked while in the\r\n * middle of making major object changes, care must be taken in\r\n * examining and modifying arbitrary HyperEdges while in this\r\n * callback. You should always check the state any objects (using\r\n * isState()) you wish to examine or modify before actually\r\n * examining or modifying them.\r\n */\r\n void objectCreated (HyperEdge hedge);\r\n}", "@Override\n\tpublic void add(final Obj prim) {\n\t\tbvhObjList.add(prim);\n\t\tif(bvhBox == null) {\n\t\t\tthis.bvhBox = prim.bbox();\n\t\t}else {\n\t\t\tPoint mm = prim.bbox().getMin();\n\t\t\tPoint mx = prim.bbox().getMax();\n\t\t\tfloat nex = Float.max(mx.x(),bvhBox.getMax().x());\n\t\t\tfloat ney = Float.max(mx.y(),bvhBox.getMax().y());\n\t\t\tfloat nez = Float.max(mx.z(),bvhBox.getMax().z());\n\t\t\tfloat nex1 = Float.min(mm.x(),bvhBox.getMin().x());\n\t\t\tfloat ney1 = Float.min(mm.y(),bvhBox.getMin().y());\n\t\t\tfloat nez1 = Float.min(mm.z(),bvhBox.getMin().z());\n\t\t\tPoint nemax = new Point(nex, ney, nez);\n\t\t\tPoint nemin = new Point(nex1,ney1,nez1);\n\t\t\tthis.bvhBox = BBox.create(nemax, nemin);\n\t\t\t\n\t\t}\n\t\t\n\t}", "@Override\n public void onAdded() {\n }", "@Override\n <T> void add(T object);", "@Override\npublic void add(VirtualComponent comp, int pos) {\n\t\n}", "protected void onAdd( E entity, int index )\r\n\t{\r\n\t\t\r\n\t}", "@Override\n\tpublic void add(Object o) {\n\t}", "@FXML\n private void handleNewPerson() {\n Shops tempShops = new Shops();\n boolean okClicked = mainApp.showPersonEditDialog(tempShops);\n if (okClicked) {\n mainApp.getPersonData().add(tempShops);\n }\n }", "public void addObjectChangeListener(ObjectChangeListener listener)\n\t{\n\t\tif (listenerList == null)\tlistenerList = new java.util.HashSet<ObjectChangeListener>(1,1);\n\t\tlistenerList.add(listener);\n\t}", "public void addObjectChangeListener(ObjectChangeListener listener)\n\t{\n\t\tif (listenerList == null)\tlistenerList = new java.util.HashSet<ObjectChangeListener>(1,1);\n\t\tlistenerList.add(listener);\n\t}", "EventBinding createEventBinding();", "public abstract void mapDrawableAdapterChildAdded(StratmasObject object);", "private void addGraphicObject(GraphicObject g_obj, int x, int y) {\n\t\tg_obj.setFillColor(this.currentFillColor);\n g_obj.setStroke(this.currentStrokeColor, this.currentStrokeSize.getValue());\n\n\t\tthis.canvas.add(g_obj, x, y);\n\t}", "public void add(DrawEvent currentEvent) {\n DrawShape shape = currentEvent.getShape();\n if (size() > 0) {\n if (shape.getX() < bounds.x) {\n bounds.x = shape.getX();\n bounds.width += bounds.x - shape.getX();\n }\n if (shape.getY() < bounds.y) {\n bounds.y = shape.getY();\n bounds.height += bounds.y - shape.getY();\n }\n } else {\n bounds.x = shape.getX();\n bounds.y = shape.getY();\n bounds.width = shape.getWidth();\n bounds.height = shape.getHeight();\n }\n super.addElement(currentEvent);\n }", "public void add(WorldObject obj) {\n\troomList.add(obj);\n}", "protected void addObject(Obstacle obj) {\n\t\tassert inBounds(obj) : \"Object is not in bounds\";\n\t\tobjects.add(obj);\n\t\tobj.activatePhysics(world);\n\t}", "public void addEvent(Event e) {\n\t\t\n\t}", "public void addEvent(Event e) {\n\t\t\n\t}", "@Override\r\n\tpublic void updateObjectListener(ActionEvent e) {\n\t\t\r\n\t}", "public void push(E obj) {\n super.add(obj);\n }", "public void add(E obj) {\r\n throw new UnsupportedOperationException();\r\n }", "void addButton_actionPerformed(ActionEvent e) {\n doAdd();\n }", "public void addEvent(Event event) {\n\t\t\n\t}", "public void add(Object obj) {\n\t\tif (obj instanceof Entity) {\n\t\t\tentities.add((Entity) obj);\n\t\t}\n\t\t\n\t\tif (obj instanceof ICollidable) {\n\t\t\tcollidables.add((ICollidable) obj);\n\t\t}\n\t\t\n\t\tif (obj instanceof IDrawable) {\n\t\t\tdrawables.addFirst((IDrawable) obj);\n\t\t}\n\t}", "public void objectRemoved(NamingEvent evt) throws RemoteException;", "public void add(String nome, Object obj);", "@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\tUser myUser = new User(username.getText(), password.getText());\r\n\t\t\t\tmyUsers.add(myUser);\r\n\t\t\t\tSystem.out.println(\"new user added\");\r\n\t\t\t\t\r\n\t\t\t}", "public void add(Binding binding) {\n\tif (values == null) values = new LinkedList();\n\tvalues.add(binding);\n }", "protected void addObject(AbstractGameObject object) {\n\t\t// add object to rendering list\n\t\tobjects.add(object);\n\t\tif (object instanceof UIi18nReload) {\n\t\t\tuis.add((UIi18nReload) object);\n\t\t}\n\t\tobjects.sort(new Comparator<GameObject>() {\n\t\t\tpublic int compare(GameObject o1, GameObject o2) {\n\t\t\t\tAbstractGameObject ago1 = (AbstractGameObject) o1;\n\t\t\t\tAbstractGameObject ago2 = (AbstractGameObject) o2;\n\t\t\t\treturn (ago1.layer > ago2.layer ? -1 : (ago1.priority > ago2.priority ? -1 : 1));\n\t\t\t};\n\t\t});\n\t\t// add object to a specific Layer.\n\t\taddObjectToLayer(object);\n\n\t\tstatistics.put(\"objectCount\", objects.size());\n\t\tlogger.debug(\"Add {} to the objects list\", object.name);\n\t}", "public void onAdd() {\n String bookTitle = details[0];\n String author = details[1];\n boolean addedCorrectly = ControllerBook.addBook(this.ISBN, author, bookTitle, \"\");\n if (addedCorrectly) {\n dispose();\n } else {\n\n pack();\n }\n\n }", "@FXML void but_AddProduct(ActionEvent event) {\n\n productLine.add(new Widget(txtProductName.getText(), txtManufacturer.getText(),\n choiceType.getValue())); //Adding test product in observable list\n\n productTable.setItems(productLine); //Adds product to table\n listProduce.setItems(productLine); //Adds product to produce list\n\n addToDatabaseProduct();\n\n System.out.println(\"Product added\");\n }", "private void gAddActionPerformed(ActionEvent e) {\n }", "private void onAdd()\n {\n // get the source list selection\n Object selection[] = _lstSource.getSelectedValues();\n\n // iterate the selection\n EntityDobj table;\n TransferEntity te;\n for(int i = 0; selection != null && i < selection.length; i++)\n {\n // get the table\n table = (EntityDobj)selection[i];\n if(table != null)\n {\n // create new te\n te = new TransferEntity();\n te.setSourceEntityName(table.getName());\n\n // add to the target list and the datasource\n _lstTarget.addItem(te);\n _dt.addTransferEntity(te);\n }\n }\n\n // remove the selection from the source list\n for(int i = 0; selection != null && i < selection.length; i++)\n {\n // get the table\n table = (EntityDobj)selection[i];\n if(table != null)\n _lstSource.removeItem(table);\n }\n }", "@Override\npublic void add(VirtualContainer parent, VirtualComponent comp, int pos) {\n\t\n}", "public void newValueBinding(BGMEvent e);", "@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\tRefuelling refuellingData = new Refuelling(textFieldCours.getText(), textFieldPriceOfFuel.getText(), textFieldAmountOfFuel.getText(), CalendarOfRefuelling.getDate(), vehicleId);\n\t\t\t\t\t\tAddNewRefuelling(refuellingData);\n\t\t\t}", "public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {\n\t\t\t\t\t\tRoomAdd ra=new RoomAdd();\r\n\t\t\t\t\t\tra.getsShell().open();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tsShell.setMinimized(true);\r\n\t\t\t\t\t\t/*if(ra.flag){\r\n\t\t\t\t\t\t\tnewRoom=ra.getRoom();\r\n\t\t\t\t\t\t\ttableViewer.add(SystemManageShell.newRoom);\r\n\t\t\t\t\t\t}*/\r\n\t\t\t\t\t\t}", "void diagramAdded(ProjectEvent event);", "public void instanceAdded(Contextual<?> bean, CreationalContext<?> context, Object instance);", "public void addBinding(WbBinding binding)\n {\n _bindingList.add(binding);\n }", "@FXML private void handleAddProdAdd(ActionEvent event) {\n if (fxidAddProdAvailableParts.getSelectionModel().getSelectedItem() != null) {\n //get the selected part from the available list\n Part tempPart = fxidAddProdAvailableParts.getSelectionModel().getSelectedItem();\n //save it to our temporary observable list\n partToSave.add(tempPart);\n //update the selected parts list\n fxidAddProdSelectedParts.setItems(partToSave); \n } else {\n Alert partSearchError = new Alert(Alert.AlertType.INFORMATION);\n partSearchError.setHeaderText(\"Error!\");\n partSearchError.setContentText(\"Please select a part to add.\");\n partSearchError.showAndWait();\n }\n }", "@Override\n public void onNewItem(int id, Face face) {\n mEyesGraphic = new FaceTrackerGraphic(mOverlay);\n }", "private void addButtonActionPerformed() {//GEN-FIRST:event_addButtonActionPerformed\r\n this.controller.OnAddPhoto();\r\n }", "public void bindChosenEvent(Object currObject, Context context)\n {\n final Event event = (Event) currObject;\n\n showEventDescription(event);\n\n Drawable eventIcon = new IconDrawable(context,FontAwesomeIcons.fa_map_marker).colorRes(R.color.green).sizeDp(40);\n icon.setImageDrawable(eventIcon);\n }", "boolean add(Object object) ;", "public void addObject(ObjectNode on) throws MismatchException, ChangeNotAllowedException {\r\n FactType ft = getFactType(on.getTypeName());\r\n if (ft == null) {\r\n throw new RuntimeException(\"objecttype \" + on.getTypeName() + \" is unknown at objectmodel\");\r\n }\r\n if (!ft.isObjectType()) {\r\n throw new RuntimeException(\"adding object at facttype \"\r\n + ft.getName() + \" which isn't an objecttype\");\r\n }\r\n ft.addFact(on);\r\n\r\n }", "public void mousePressed(MouseEvent evt) {\n\n\t\t\tstartingX = evt.getX();\n\t\t\tstartingY = evt.getY();\n\t\t\tif (currentShapeName != null) {\n\t\t\t\tif (!isDrawing) {\n\n\t\t\t\t\tif (currentShapeName.equals(\"line\")) {\n\t\t\t\t\t\tcurrentShape = new Line(startingX, startingY);\n\t\t\t\t\t}\n\t\t\t\t\tif (currentShapeName.equals(\"oval\")) {\n\t\t\t\t\t\tcurrentShape = new Oval(startingX, startingY);\n\t\t\t\t\t}\n\t\t\t\t\tif (currentShapeName.equals(\"rect\")) {\n\t\t\t\t\t\tcurrentShape = new Rectangle(startingX, startingY);\n\t\t\t\t\t}\n\t\t\t\t\tif (currentShapeName.equals(\"image\")) {\n\t\t\t\t\t\tcurrentShape = new Image(startingX, startingY);\n\t\t\t\t\t}\n\t\t\t\t\tcurrentShape.setColor(colorChooser.getColor());\n\t\t\t\t} else {\n\t\t\t\t\tcurrentShape.lastForm(newX, newY);\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\toutput.writeObject(new AddShapeCommand(currentShape));\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\tisDrawing = !isDrawing;\n\t\t\t}\n\t\t}", "@Override\r\n\tpublic void deleteObjectListener(ActionEvent e) {\n\t\t\r\n\t}", "protected void addSpecial(Object object) {\n super.add(object);\n }", "@Override\r\n\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\r\n\t\t\t\t\t\tvenObjectsByPack.init(\"NEW\");\r\n\t\t\t\t\t\tUI.getCurrent().addWindow(venObjectsByPack);\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t}", "public void addObject(final PhysicalObject obj) {\n \t\tmyScene.addChild(obj.getGroup());\n \t\tmyObjects.add(obj);\n \t}", "ProductView addProduct(ProductBinding productToAdd) throws ProductException;", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tadd();\n\t\t\t}", "@FXML void onActionModifyProductAdd(ActionEvent event) {\n Part selectedPart = partTableView.getSelectionModel().getSelectedItem();\n tmpAssociatedParts.add(selectedPart);\n }", "@Override\r\n\tprotected void bindEvents() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void bindEvents() {\n\t\t\r\n\t}", "public abstract void addComponent(DrawingComponent component);" ]
[ "0.6716261", "0.6614098", "0.61712337", "0.6065266", "0.6052514", "0.594738", "0.59345555", "0.57551545", "0.5746784", "0.57268745", "0.57093763", "0.56869966", "0.5683473", "0.5682268", "0.5674519", "0.5640305", "0.5617637", "0.5589043", "0.55886173", "0.55857617", "0.5567372", "0.55655056", "0.55615616", "0.5556051", "0.5556046", "0.5526553", "0.5503145", "0.549224", "0.54902226", "0.54862905", "0.5464075", "0.54620135", "0.54564804", "0.545048", "0.54309106", "0.5422675", "0.54032016", "0.54012346", "0.54011166", "0.54002285", "0.5388083", "0.53796667", "0.5374219", "0.5370485", "0.5356447", "0.5350251", "0.5335842", "0.5332098", "0.5327237", "0.5310979", "0.53084165", "0.53029037", "0.53029037", "0.5289662", "0.52614325", "0.5252547", "0.52484643", "0.52469456", "0.52442765", "0.523877", "0.523877", "0.52287203", "0.5225226", "0.52218133", "0.52155095", "0.5214476", "0.52116185", "0.5209087", "0.5207912", "0.5206393", "0.52035713", "0.519859", "0.5186134", "0.51799273", "0.5172513", "0.5170682", "0.5165294", "0.5163748", "0.51626694", "0.51605403", "0.51520056", "0.51510346", "0.5150037", "0.5149", "0.51385593", "0.51263094", "0.512525", "0.51188725", "0.51175076", "0.5111211", "0.51109594", "0.5109983", "0.5109184", "0.51083136", "0.51062334", "0.5095846", "0.50946", "0.5093412", "0.5093412", "0.5090726" ]
0.7387639
0
Called when an object has been removed. The binding of the newly removed object can be obtained using evt.getOldBinding().
public void objectRemoved(NamingEvent evt) throws RemoteException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void deleteObjectListener(ActionEvent e) {\n\t\t\r\n\t}", "public void remove(GObject object);", "@Override\npublic void remove(VirtualComponent comp, ObjectAdapter childAdapter) {\n\t\n}", "public void componentRemoved(GPaintable object);", "@Override\npublic void remove(ObjectAdapter compAdapter) {\n\t\n}", "public void itemRemoved(E item);", "protected void onBindingUnset(@NonNull AutoRef<Context> context, @NonNull AutoRef<TBinding> oldBinding) {\n }", "public abstract void removedFromWidgetTree();", "private void removeObject() {\n\t\tif(this.curr_obj != null) {\n this.canvas.uRemove(this.curr_obj);\n\t\t\tthis.canvas.remove(this.transformPoints);\n this.transformPoints.clear();\n\n this.curr_obj = null;\n }\n\t}", "public void evt_DeleteCurrentObject()\r\n {\r\n rh2EventPos.hoOiList.oilNumOfSelected -= 1;\t\t\t\t\t// Un de moins dans l'OiList\r\n if (rh2EventPrev != null)\r\n {\r\n rh2EventPrev.hoNextSelected = rh2EventPos.hoNextSelected;\r\n rh2EventPos = rh2EventPrev; // Car le courant est vire!\r\n }\r\n else\r\n {\r\n// rhPtr.rhOiList[rh2EventPosOiList].oilListSelected=rh2EventPos.hoNextSelected;\r\n rh2EventPrevOiList.oilListSelected = rh2EventPos.hoNextSelected;\r\n rh2EventPos = null;\r\n }\r\n }", "public void removeListener(AlgorithmInterface obj) {\r\n objectList.removeElement(obj);\r\n }", "public void gxlElementRemoved(GXLTreeModificationEvent e) {\n\t}", "public void itemRemoved(boolean wasSelected);", "void removeModelEventListener(PropertyChangeListener listener, Object modelelement, String propertyName);", "public void entityRemoved() {}", "public void instanceRemoved(Contextual<?> bean, CreationalContext<?> context, Object instance);", "public void removeObject(java.lang.Object object) {}", "public void removed() {\n }", "void removeModelEventListener(UmlChangeListener listener, Object modelelement, String propertyName);", "@Override\npublic void remove(VirtualContainer parent, VirtualComponent comp,\n\t\tObjectAdapter childAdapter) {\n\t\n}", "@Override\n\tpublic void remove(Object o) {\n\t\t\n\t}", "@Override\npublic void remove(VirtualComponent component) {\n\t\n}", "void removeModelEventListener(PropertyChangeListener listener, Object modelelement);", "void removeModelEventListener(UmlChangeListener listener, Object modelelement, String[] propertyNames);", "public void removeObjectChangeListener(ObjectChangeListener listener)\n\t{\n\t\tif (listenerList == null)\treturn;\n\t\tlistenerList.remove(listener);\n\t\tif (listenerList.size()==0) listenerList = null;\n\t}", "public void removeObjectChangeListener(ObjectChangeListener listener)\n\t{\n\t\tif (listenerList == null)\treturn;\n\t\tlistenerList.remove(listener);\n\t\tif (listenerList.size()==0) listenerList = null;\n\t}", "void removeModelEventListener(PropertyChangeListener listener, Object modelelement, String[] propertyNames);", "void removeClassModelEventListener(PropertyChangeListener listener, Object modelClass, String propertyName);", "public abstract void onRemove();", "@Override\n\tpublic void delObserver(ObserverListener ob) {\n\t\tvector.remove(ob);\n\t}", "public void onResourceRemoved(final ResourceEvent resourceEvent);", "public void removeObject(AdvObject obj) {\n\t\tobjects.remove(obj); // Replace with your code\n\t}", "public void removeShape(Shapes obj) {\n \tthis.listShapes.remove(obj);\n \t W.repaint();\n }", "public void remove(E object) {\n\t\tsynchronized (mLock) {\n\t\t\tif (data != null) {\n\t\t\t\tdata.remove(object);\n\t\t\t}\n\t\t}\n\t\tnotifyDataSetChanged();\n\t}", "public void removeByObject()\r\n\t{\n\t}", "@Override\n public boolean remove(Object o) //Modify to take in Authenication ID for future logging function\n {\n if(super.remove(o)){\n if(comboBoxModelSelectedItem.equals(o))\n comboBoxModelSelectedItem = ((this.size()>0)? this.first() : null);\n modelListenersNotify();\n ViewerController.saveModel();\n return true;\n }\n return false;\n }", "public void handlerRemoved(CEventListener aoHandler) {\n\t}", "@Override\n\t\t\tpublic void windowDeiconified(WindowEvent arg0) {\n\n\t\t\t}", "@Override\n\t\tpublic void windowDeiconified(WindowEvent arg0) {\n\t\t\t\n\t\t}", "@Override\n public void windowDeiconified( WindowEvent arg0 )\n {\n\n }", "@Override\n public void windowDeiconified( WindowEvent arg0 )\n {\n\n }", "@Override\r\n\t\t\tpublic void ancestorRemoved(AncestorEvent event) {\n\t\t\t}", "@Override\n\tpublic void onRemove() {\n\n\t}", "void removeClassModelEventListener(PropertyChangeListener listener, Object modelClass, String[] propertyNames);", "public void objectChanged(NamingEvent evt) throws RemoteException;", "@Override\r\n\t\tpublic void ancestorRemoved(AncestorEvent arg0) {\n\t\t\t\r\n\t\t}", "@Override\n public void deletedResource( ResourceEvent event )\n {\n\n }", "@Override\n public void remove() {\n }", "public void objectClosed(PoolEvent evt) {\n releaseObject(evt.getSource());\n }", "@Override\n public void windowDeiconified(WindowEvent arg0) {\n\n }", "@Override\r\n\t\t\tpublic void windowDeiconified(WindowEvent arg0) {\n\t\t\t\t\r\n\t\t\t}", "@Override\n public void remove() {\n }", "@Override\n\t\t\tpublic void windowDeiconified(WindowEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void windowDeiconified(WindowEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\t\t\tpublic void ancestorRemoved(AncestorEvent event) {\n\t\t\t\t\r\n\t\t\t}", "public void attributeRemoved(Component component, String attr, String oldValue);", "void diagramRemoved(ProjectEvent event);", "@Override\n public void removePropertyChangeListener( String propertyName,PropertyChangeListener listener )\n {\n if( componentModel == null )\n return;\n\n if( propertyName==null )\n {\n componentModel.removePropertyChangeListener( listener );\n }\n else\n {\n Property prop = componentModel.findProperty( propertyName );\n if ( prop != null )\n {\n prop.removePropertyChangeListener( listener );\n }\n }\n }", "@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}", "@Override\n\tpublic void onGuiClosed() {\n\t\tfield_154330_a.removed();\n\t\tsuper.onGuiClosed();\n\t}", "void unbind(Object element);", "@Override\n\t\t\t\tpublic void remove() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\npublic void remove(VirtualContainer parent, VirtualComponent component) {\n\t\n}", "@Override\r\n\t\t\t\t\t\t\tpublic void ancestorRemoved(AncestorEvent event) {\n\t\t\t\t\t\t\t}", "@Override\n\tpublic void elementRemoved(int anIndex, Object aNewValue) {\n\t\tListEditObserved.newCase(OperationName.DELETE, anIndex, aNewValue,\n\t\t\t\tApplicationTags.EDITOR, this);\n\t\tdisplayOutput();\n\t\tListEditDisplayed.newCase(OperationName.DELETE, anIndex, aNewValue,\n\t\t\t\tApplicationTags.EDITOR, this);\n\t}", "private void notifyObjectRemoved(int index0, int index1) {\n\t\tlisteners.forEach(l -> l.objectsRemoved(this, index0, index1));\n\t}", "void removeHadithReferenceNo(Object oldHadithReferenceNo);", "@Override\n\tpublic void removeInUse() {\n\t\theldObj.removeInUse();\n\t}", "public void removeDeepChangeListener(DeepChangeListener aLstnr) { removeListener(DeepChangeListener.class, aLstnr); }", "@Override\n\tpublic void remove(IFigure figure) {\n\t\tfigure.removeFigureListener(this);\n\t\tsuper.remove(figure);\n\t}", "public void nodeRemoved(GraphEvent e);", "void remove(SpaceInstanceAddedEventListener eventListener);", "void documentRemoved(SingleDocumentModel model);", "@Override\n\tpublic void remove(Object entity) {\n\t\t\n\t}", "@Override\n\tpublic void removeListDataListener(ListDataListener arg0) {\n\n\t}", "@Override\r\n\tpublic void onRemove() {\n\r\n\t}", "@Override\r\n\tpublic void windowDeiconified(WindowEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowDeiconified(WindowEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowDeiconified(WindowEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowDeiconified(WindowEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowDeiconified(WindowEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowDeiconified(WindowEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowDeiconified(WindowEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void windowDeiconified(WindowEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void removeListDataListener(ListDataListener arg0) {\n\r\n\t}", "@Override\r\n\tpublic void remove() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void remove() {\n\t\t\r\n\t}", "@Override\n\tpublic void remove() { }", "public void removeGameObj(GameObject obj){\n display.getChildren().remove(obj.getDisplay());\n }", "@Override\n\t\t\tpublic void onChildRemoved(DataSnapshot arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onChildRemoved(DataSnapshot arg0) {\n\n\t\t\t}", "public void removePropertyChangeListener(PropertyChangeListener l);", "@Override\r\n\t\tpublic void remove() {\r\n\t\t\t// YOU DO NOT NEED TO WRITE THIS\r\n\t\t}", "protected void elementRemoved(MutationEvent evt) throws MelodyException {\r\n\t\tsuper.elementRemoved(evt);\r\n\t\t// the removed node\r\n\t\tElement t = (Element) evt.getTarget();\r\n\t\tDUNID tdunid = DUNIDDocHelper.getDUNID(t);\r\n\t\t// its parent node\r\n\t\tElement p = (Element) t.getParentNode();\r\n\t\tDUNID pdunid = DUNIDDocHelper.getDUNID(p);\r\n\t\t// Modify the DUNIDDoc\r\n\t\tDocument d = getOwnerDUNIDDoc(p).getDocument();\r\n\t\tElement tori = DUNIDDocHelper.getElement(d, tdunid);\r\n\t\tDUNIDDocHelper.getElement(d, pdunid).removeChild(tori);\r\n\t\t// Modify the targets descriptor\r\n\t\tif (!areTargetsFiltersDefined()) {\r\n\t\t\t/*\r\n\t\t\t * If there is no targets filters defined, there's no need to modify\r\n\t\t\t * the targets descriptor.\r\n\t\t\t */\r\n\t\t\treturn;\r\n\t\t}\r\n\t\td = getTargetsDescriptor().getDocument();\r\n\t\ttori = DUNIDDocHelper.getElement(d, tdunid);\r\n\t\tif (tori != null) { // removed node is in the targets descriptor\r\n\t\t\tDUNIDDocHelper.getElement(d, pdunid).removeChild(tori);\r\n\t\t}\r\n\t}", "@Override\n public void windowDeiconified(WindowEvent we) {\n }", "@Override\n\tpublic void windowDeiconified(WindowEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void windowDeiconified(WindowEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void windowDeiconified(WindowEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void windowDeiconified(WindowEvent arg0) {\n\t\t\n\t}" ]
[ "0.66654915", "0.6567474", "0.63814586", "0.6348833", "0.6326159", "0.6171055", "0.60668164", "0.60642797", "0.6049484", "0.6032508", "0.6019427", "0.6012087", "0.5995252", "0.5979112", "0.5978224", "0.59715384", "0.59595346", "0.594379", "0.59390455", "0.5935723", "0.59190917", "0.59156436", "0.5905162", "0.59043986", "0.5900413", "0.5900413", "0.5895797", "0.5881785", "0.58784395", "0.58755416", "0.58622444", "0.58332247", "0.58210146", "0.5808971", "0.58069605", "0.5806925", "0.5777243", "0.5776879", "0.5773047", "0.5756272", "0.5756272", "0.5748169", "0.5744227", "0.5742107", "0.57414734", "0.5736341", "0.57355124", "0.57330686", "0.5718835", "0.57186157", "0.5717688", "0.57143164", "0.5710197", "0.5710197", "0.5709725", "0.5696167", "0.56936187", "0.56811816", "0.5678811", "0.5678811", "0.56744236", "0.56645745", "0.56608987", "0.5652032", "0.56507343", "0.56459093", "0.56432587", "0.56389153", "0.56317127", "0.5622597", "0.5621888", "0.56108624", "0.5608666", "0.5604162", "0.5599712", "0.5595892", "0.5593916", "0.55937594", "0.55937594", "0.55937594", "0.55937594", "0.55937594", "0.55937594", "0.55937594", "0.55937594", "0.559358", "0.55886716", "0.55886716", "0.5584308", "0.5580093", "0.5570713", "0.5570713", "0.55693954", "0.55638736", "0.5563378", "0.5561052", "0.5554894", "0.5554894", "0.5554894", "0.5554894" ]
0.7699693
0
Called when an object has been renamed. The binding of the renamed object can be obtained using evt.getNewBinding(). Its old binding (before the rename) can be obtained using evt.getOldBinding(). One of these may be null if the old/new binding was outside the scope in which the listener has registered interest.
public void objectRenamed(NamingEvent evt) throws RemoteException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void objectChanged(NamingEvent evt) throws RemoteException;", "public void onNameChange(String newName) {\n\t\t\n\t}", "public void objectRemoved(NamingEvent evt) throws RemoteException;", "@Override\n public void rename(Name oldName, Name newName) throws NamingException {\n validSupportName(oldName);\n validSupportName(newName);\n\n if (oldName == newName || oldName.equals(newName))\n return;\n String nn = newName.get(newName.size());\n\n\n }", "public void rebind(String name, Object obj) throws NamingException {\n }", "public void rebind(Name name, Object obj) throws NamingException {\n }", "public void objectAdded(NamingEvent evt) throws RemoteException;", "@Override\n\tpublic void rename(String oldName, String newName) {\n\n\t}", "public void rename()\n\t{\n\t\t// get the object within the node\n\t\tObject string = this.getUserObject();\n\n\t\t// should always be a string, given the constructor\n\t\tif (string instanceof String)\n\t\t{\n\t\t\tstring = JOptionPane.showInputDialog(\"Enter a New Name\");\n\n\t\t\tif (string != null && string instanceof String)\n\t\t\t{\n\t\t\t\tthis.setUserObject(string);\n\t\t\t\tthis.name = (String) string;\n\t\t\t}\n\t\t}\n\t}", "@Override\r\n\tpublic void updateName(int eno, String newName) {\n\r\n\t}", "public void rename(String oldName, String newName) throws NamingException {\n }", "void namingExceptionThrown(NamingExceptionEvent evt) throws RemoteException;", "public void rename(Name oldName, Name newName) throws NamingException {\n }", "@Override\n public void focusLost( FocusEvent arg0 ) {\n String newname = text.getText();\n if ( renameDatabase( name, newname ) ) {\n ti.setText( newname );\n }\n text.dispose();\n }", "public PlayerRenameWarpEvent(Player player, Warp warp, String newName) {\n super(player, warp);\n this.oldName = warp.getName();\n this.newName = newName;\n }", "@Override\n\tpublic void rename(String name) {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "@Override\n public void focusLost( FocusEvent arg0 ) {\n String newname = text.getText();\n if ( renameTransformation( fname, newname, frepdir ) ) {\n ti.setText( newname );\n }\n text.dispose();\n }", "public void rename(String newName)\n\t{\n\t\t// get the object within the node\n\t\tObject object = this.getUserObject();\n\n\t\tif (newName == null)\n\t\t\tnewName = StyleEditorUtility.DEFAULT_STYLE_NODE_NAME;\n\n\t\t// should always be a string, given the constructor\n\t\tif (object instanceof String)\n\t\t{\n\t\t\tobject = newName;\n\n\t\t\tif (object != null && object instanceof String)\n\t\t\t{\n\t\t\t\tthis.setUserObject(object);\n\t\t\t\tthis.name = (String) object;\n\t\t\t}\n\t\t}\n\t}", "public abstract void rename(String newName);", "public void renameClassName(String oldClassName, String newClassName) {\n\t\tClassNameRenamer renamer = buildClassNameRenamer(oldClassName, newClassName);\n\t\tgetStateObject().accept(renamer);\n\t}", "@FXML\n public void onRename(ActionEvent event) {\n try {\n folders.update(oldName.getText(), newName.getText());\n stage.close();\n tree.displayTree();\n } catch (SQLException ex) {\n errorRename.setText(ex.getMessage());\n }\n }", "public void renameEntityName(String oldEntityName, String newEntityName) {\n\t\tEntityNameRenamer renamer = buildEntityNameRenamer(oldEntityName, newEntityName);\n\t\tgetStateObject().accept(renamer);\n\t}", "public void renameField(String typeName, String oldFieldName, String newFieldName) {\n\t\tFieldNameRenamer renamer = buildFieldNameRenamer(typeName, oldFieldName, newFieldName);\n\t\tgetStateObject().accept(renamer);\n\t}", "@Override\n public void focusLost( FocusEvent arg0 ) {\n String newname = text.getText();\n if ( renameJob( name, repdir, newname ) ) {\n ti.setText( newname );\n }\n text.dispose();\n }", "public void rename (String newName) throws Exception;", "void checkRename(Object oldId, Object newId) throws UPAException;", "public void rename( String newName ) {\n this.name = newName;\n }", "@Override\n public void focusLost( FocusEvent arg0 ) {\n String newname = text.getText();\n if ( renameUser( name, newname ) ) {\n ti.setText( newname );\n }\n text.dispose();\n }", "@Override\n public void focusLost( FocusEvent arg0 ) {\n String newname = text.getText();\n if ( renameJob( fname, newname, frepdir ) ) {\n ti.setText( newname );\n }\n text.dispose();\n }", "public void rename(String n){\n name = n;\r\n }", "public void stateChanged(ChangeEvent e){\n\r\n fShape.removeChangeListener(this); // ordinarily stateChange can get called many\r\n //times during resize, so we'll stop listening once we know\r\n // there is change\r\n\r\n\r\n if (fLastEdit!=this){\r\n if (fLastEdit != null) // kill the previous one so there's only one undo\r\n fLastEdit.die(); // don't kill ourselves\r\n\r\n //fUndoListener.undoableEditHappened(new UndoableEditEvent(TShapePanel.this, this)); // tell the listener.\r\n\r\n tellListeners(new UndoableEditEvent(TShapePanel.this,this)); // tell the listeners.\r\n\r\n fLastEdit = this;\r\n }\r\n }", "public void renameVariable(String oldVariableName, String newVariableName) {\n\t\tVariableNameRenamer renamer = buildVariableNameRenamer(oldVariableName, newVariableName);\n\t\tgetStateObject().accept(renamer);\n\t}", "public EntityNameRenamer(String oldEntityName, String newEntityName) {\n\t\t\tsuper();\n\t\t\tthis.oldEntityName = oldEntityName;\n\t\t\tthis.newEntityName = newEntityName;\n\t\t}", "public String getOldName() {\n return oldName;\n }", "public String getOldName() {\n return oldName;\n }", "protected void fireNameChanged() {\n\t\tfor(ReadingPointListener l : listeners) l.nameChanged(this);\n\t}", "public void renameLabel(LabelModel aLabel, String aNewName, AsyncHandler<Void> aHandler);", "@Override\n\tpublic void changedUpdate(DocumentEvent e) {\n\t\tvalidateNameField();\n\t}", "@Override\n public void onChanged(@Nullable final String newName) {\n System.out.println(\"text changed\");\n nameEditText.setText(newName);\n }", "public T caseEntityRenamed(EntityRenamed object) {\n\t\treturn null;\n\t}", "public void renameField(String className, String name, String newName) \n\t{\n\t\tstoreViewState();\n\t\tproject.renameField(className, name, newName);\n\t\tcheckStatus();\n\t}", "public void renameClass(String oldName, String newName) \n\t{\n\t\tstoreViewState();\n\t\tproject.renameClass(oldName, newName);\n\t\tcheckStatus();\n\t}", "protected void bind( final Name name, Object object, final boolean rebind )\n throws NamingException\n {\n if ( isSelf( name ) )\n {\n throw new InvalidNameException( \"Failed to bind self\" );\n }\n\n if ( 1 == name.size() )\n {\n boolean alreadyBound;\n try\n {\n localLookup( name );\n alreadyBound = true;\n }\n catch ( final NamingException ne )\n {\n alreadyBound = false;\n }\n\n if ( !rebind && alreadyBound )\n {\n throw new NameAlreadyBoundException( name.get( 0 ) );\n }\n else\n {\n if ( object instanceof Referenceable )\n {\n object = ( (Referenceable) object ).getReference();\n }\n\n // Call getStateToBind for using any state factories\n final Name atom = name.getPrefix( 1 );\n object = m_namespace.getStateToBind( object, atom, this, getRawEnvironment() );\n\n doLocalBind( name, object );\n }\n }\n else\n {\n final Context context = lookupSubContext( getPathName( name ) );\n if ( rebind )\n {\n context.rebind( getLeafName( name ), object );\n }\n else\n {\n context.bind( getLeafName( name ), object );\n }\n }\n }", "public void renameTree(String oldName, String newName) throws DuplicateNameException;", "public void rename( String oldKey, String newKey ) {\n if ( containsKey(oldKey) ) {\n JsonValue value = get(oldKey);\n put(newKey, value);\n remove(oldKey);\n }\n }", "public void changeName(String newName) {\n\t\tthis.myName = newName;\n\t\tthis.hasChangedName = true;\n\t}", "public void objectChanged(ObjectChangeEvent e) {\n\t\tString key = e.getAttributeName();\n\t\tStructure s = (Structure) attributes.get(key);\n\t\tif (s!=null) {\n\t\t\tStructure change = (Structure) changedAttributes.get(key);\n\t\t\tif(change==null) {\n\t\t\t\tchange = new Structure();\n\t\t\t\tchange.setAttributeValue(ATTRIBUTE_NAME_, s.getAttributeValue(ATTRIBUTE_NAME_, null));\n\t\t\t}\n\t\t\tchange.setAttributeValue(ATTRIBUTE_VALUE_, e.getChangedObject());\n\t\t\tchangedAttributes.put(key, change);\n\t\t\tTrace.send(Trace.ALL_LEVELS, traceKey, i18n, \"AttributeValueChanged\", key, e.getChangedObject(), changedAttributes);\n\t\t\t \n\t\t}\n\t}", "public void setRename( String rename ) {\n rename_ = rename;\n }", "protected void rename(String oldname, String newname) throws IOException { //TODO map this to the FileSystem\n\t\tthrow new IOException( \"not implemented\" ); //TODO map this to the FileSystem\n\t}", "public void stateChanged(ChangeEvent e){\n\r\n if (fLastEdit!=this){ // just a precaution against stateChange getting called many times\r\n\r\n if (fLastEdit != null) // kill the previous one so there's only one undo\r\n fLastEdit.die(); // don't kill ourselves\r\n\r\n fLastEdit = this;\r\n // fUndoListener.undoableEditHappened(new UndoableEditEvent(TShapePanel.this, this)); // tell the listener.\r\n\r\n tellListeners(new UndoableEditEvent(TShapePanel.this,this)); // tell the listeners.\r\n\r\n }\r\n\r\n }", "public FieldNameRenamer(IManagedTypeProvider managedTypeProvider,\n\t\t String typeName,\n\t\t String oldFieldName,\n\t\t String newFieldName) {\n\n\t\t\tsuper();\n\t\t\tthis.typeName = typeName;\n\t\t\tthis.oldFieldName = oldFieldName;\n\t\t\tthis.newFieldName = newFieldName;\n\t\t\tthis.managedTypeProvider = managedTypeProvider;\n\t\t}", "public void stateChanged(ChangeEvent e){\n\r\n if (fLastEdit!=this){ // just a precaution against stateChange getting called many times\r\n\r\n if (fLastEdit != null) // kill the previous one so there's only one undo\r\n fLastEdit.die(); // don't kill ourselves\r\n\r\n fLastEdit = this;\r\n // fUndoListener.undoableEditHappened(new UndoableEditEvent(TShapePanel.this, this)); // tell the listener.\r\n\r\n tellListeners(new UndoableEditEvent(TShapePanel.this,this)); // tell the listeners.\r\n\r\n }\r\n\r\n }", "public void rename(String newName) {\n\t\tname = newName;\n\t}", "public void newBinding(BGMEvent e);", "@Override\n public void focusLost( FocusEvent arg0 ) {\n String newname = text.getText();\n if ( renameDirectory( repdir, name, newname ) ) {\n ti.setText( newname );\n }\n text.dispose();\n }", "private void notifyObjectChanged(int index0, int index1) {\n\t\tlisteners.forEach(l -> l.objectsChanged(this, index0, index1));\n\t}", "public static void bind(String jndiName, Object obj) {\n\t\ttry {\n\t\t\tContext ctx = new InitialContext();\n\t\t\ttry {\n\t\t\t\tctx.unbind(jndiName);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// Ignore\n\t\t\t}\n\t\t\ttry {\n\t\t\t\t// Use alternative method for JBoss\n\t\t\t\tClass<?> nonSerializableFactory = Class.forName(\"org.jboss.naming.NonSerializableFactory\");\n\t\t\t\tMethod rebind = nonSerializableFactory.getMethod(\"rebind\", Context.class, String.class, Object.class);\n\t\t\t\trebind.invoke(null, ctx, jndiName, obj);\n\t\t\t} catch (Exception e) {\n\t\t\t\tctx.rebind(jndiName, obj);\n\t\t\t}\n\n\t\t\tlog.info(\"Bound \" + obj.getClass().getName() + \" to \" + jndiName);\n\t\t} catch (NamingException e) {\n\t\t\tlog.error(\"Error in JNDI binding\", e);\n\t\t}\n\t}", "public ClassNameRenamer(String oldClassName, String newClassName) {\n\t\t\tsuper();\n\t\t\tthis.oldClassName = oldClassName;\n\t\t\tthis.newClassName = newClassName;\n\t\t}", "@Override\n\tpublic void rename(String newName) {\n\t\tint lastDot = newName.lastIndexOf('.');\n\t\tif (lastDot == -1) {\n\t\t\tclsInfo.changeShortName(newName);\n\t\t\treturn;\n\t\t}\n\t\tif (isInner()) {\n\t\t\taddWarn(\"Can't change package for inner class: \" + this + \" to \" + newName);\n\t\t\treturn;\n\t\t}\n\t\t// change class package\n\t\tString newPkg = newName.substring(0, lastDot);\n\t\tString newShortName = newName.substring(lastDot + 1);\n\t\tif (changeClassNodePackage(newPkg)) {\n\t\t\tclsInfo.changePkgAndName(newPkg, newShortName);\n\t\t} else {\n\t\t\tclsInfo.changeShortName(newShortName);\n\t\t}\n\t}", "@Nullable\n protected PsiElement processRef(PsiReference ref, String newName) {\n return ref.handleElementRename(newName);\n }", "public void changeName(String newName) {\n this.name = newName;\n }", "public T caseRelationRenamed(RelationRenamed object) {\n\t\treturn null;\n\t}", "public void newValueBinding(BGMEvent e);", "Long handleEvent(Long renderedOpID, \n\t\t String propName,\n\t\t Object oldValue, \n\t\t Object newValue) throws RemoteException;", "public int handleRenameError(String source, String target, int errCode, String errMsg);", "void rename(String name, boolean replace, IProgressMonitor monitor)\n\t\t\tthrows RodinDBException;", "void onPropertyChange(String name, String newValue);", "public void changeName(String newName){\n\t\tname = newName;\n\t}", "public void changeSelectedReferenceNameListener(AjaxBehaviorEvent pEvent) {\n if (StringUtil.isEmptyOrNull(selectedReferenceName)) {\n selectedTypeArticle = null;\n }\n checkValidity();\n }", "@Override\r\n\tpublic void setName(String newName) \r\n\t{\r\n\t\tthis._name = newName;\r\n\t}", "public interface RemoteContextListenerInterface extends Remote\n{\n /**\n * Called when an object has been added.\n * <p>\n * The binding of the newly added object can be obtained using <tt>evt.getNewBinding()</tt>.\n * @param evt NamingEvent; The nonnull event.\n * @see NamingEvent#OBJECT_ADDED\n * @throws RemoteException on network failure\n */\n public void objectAdded(NamingEvent evt) throws RemoteException;\n\n /**\n * Called when an object has been removed.\n * <p>\n * The binding of the newly removed object can be obtained using <tt>evt.getOldBinding()</tt>.\n * @param evt NamingEvent; The nonnull event.\n * @see NamingEvent#OBJECT_REMOVED\n * @throws RemoteException on network failure\n */\n public void objectRemoved(NamingEvent evt) throws RemoteException;\n\n /**\n * Called when an object has been renamed.\n * <p>\n * The binding of the renamed object can be obtained using <tt>evt.getNewBinding()</tt>. Its old binding (before the\n * rename) can be obtained using <tt>evt.getOldBinding()</tt>. One of these may be null if the old/new binding was\n * outside the scope in which the listener has registered interest.\n * @param evt NamingEvent; The nonnull event.\n * @see NamingEvent#OBJECT_RENAMED\n * @throws RemoteException on network failure\n */\n public void objectRenamed(NamingEvent evt) throws RemoteException;\n\n /**\n * Called when an object has been changed.\n * <p>\n * The binding of the changed object can be obtained using <tt>evt.getNewBinding()</tt>. Its old binding (before the\n * change) can be obtained using <tt>evt.getOldBinding()</tt>.\n * @param evt NamingEvent; The nonnull naming event.\n * @see NamingEvent#OBJECT_CHANGED\n * @throws RemoteException on network failure.\n */\n public void objectChanged(NamingEvent evt) throws RemoteException;\n\n /**\n * Called when a naming exception is thrown while attempting to fire a <tt>NamingEvent</tt>.\n * @param evt NamingExceptionEvent; The nonnull event.\n * @throws RemoteException on network exception\n * @throws RemoteException on network failure\n */\n void namingExceptionThrown(NamingExceptionEvent evt) throws RemoteException;\n}", "private void renameProduct(int id, String newName)\n {\n manager.renameProduct(id, newName);\n }", "public void rename(String name){\n this.name = name;\n }", "public native final EventFacade changedEvent() /*-{\n\t\treturn this.changedEvent;\n\t}-*/;", "protected void notifyReferenceChanged(Object oldObject, Object newObject) {\n\t\t// Avoid spurious notifications\n\t\tif (oldObject == newObject)\n\t\t\treturn;\n\n\t\tSet<CFGChangeListener> invokedListeners = new HashSet<CFGChangeListener>(1000);\n\n\t\t// Get the wrapper for the old object. If we broadcast notifications, we\n\t\t// directly inform this object.\n\t\ttry {\n\t\t\tUpdatableWrapper<?> wrapper = this.wrappedObjects.get(oldObject);\n\t\t\tif (BROADCAST_NOTIFICATIONS && wrapper != null) {\n\t\t\t\twrapper.notifyReferenceChanged(oldObject, newObject);\n\t\t\t\tinvokedListeners.add(wrapper);\n\t\t\t}\n\t\t\n\t\t\t// Notify all explicitly registered object listeners\n\t\t\tSet<CFGChangeListener> objListeners = objectListeners.get(oldObject);\n\t\t\tif (objListeners != null) {\n\t\t\t\tfor (CFGChangeListener listener : objListeners) {\n\t\t\t\t\tif (listener != null && invokedListeners.add(listener))\n\t\t\t\t\t\tlistener.notifyReferenceChanged(oldObject, newObject);\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t// Make sure that we don't loose track of our listeners. Expired\n\t\t\t\t// listeners for gc'ed objects will automatically be removed by\n\t\t\t\t// the WeakHashMap.\n\t\t\t\tobjectListeners.put(newObject, objListeners);\n\t\t\t}\n\t\t\t\t\n\t\t\t// Notify the global listeners that have not yet been notified as\n\t\t\t// object listeners\n\t\t\tfor (CFGChangeListener listener : globalListeners)\n\t\t\t\tif (!invokedListeners.contains(listener))\n\t\t\t\t\tlistener.notifyReferenceChanged(oldObject, newObject);\n\t\t\t\n\t\t\t// We must also update our list of wrapped objects\n\t\t\tthis.wrappedObjects.put(newObject, wrapper);\n//\t\t\tthis.wrappedObjects.remove(oldObject);\n\t\t} catch (ExecutionException e) {\n\t\t\tSystem.err.println(\"Could not wrap object\");\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t}", "public static void addNameBinding (String name, Object javaObject)\n\t{\n\t\tm_interpreter.set (name, javaObject);\n\t}", "public final void setOldImageName(String oldImageName) {\n\t\tthis.oldImageName = oldImageName;\n\t}", "@Override\n\tpublic void setName(String name) {\n\t\theldObj.setName(name);\n\t}", "public void setObjName( String objName )\n {\n this.objName = objName;\n }", "public void ChangeName(String newName)\n\t{\n\t\tSendMessage(newName, MessageType.clientData);\n\t}", "@Override\n public void rename(String name) throws SQLException, ElementExistException {\n \n }", "public void update(Observable o, Object arg) {\r\n\t\tif (arg instanceof String) { \r\n\t\t\tname = ((String)arg).toString();\r\n\t\t\tnameFrame.insert(name);\r\n\t\t}\r\n\t}", "public PropertyChangeEvent(Object source, String propertyName,\n Object oldVal, Object newVal)\n {\n super(source);\n this.propertyName = propertyName;\n oldValue = oldVal;\n newValue = newVal;\n }", "public void setName(String newName) {\r\n\t\tthis.holderName = newName;\r\n\t}", "@Override\n\tpublic void onPropertyModified(PropertyDescriptor descriptor, String oldValue, String newValue) {\n\t\tsuper.onPropertyModified(descriptor, oldValue, newValue);\n\t\t\n\t\t\n\t\t\n\t}", "public void setName(java.lang.String newName) {\n\tname = newName;\n}", "public void setName(java.lang.String newName) {\n\tname = newName;\n}", "public void setName(java.lang.String newName) {\n\tname = newName;\n}", "private void processAlterSchemaRename() throws HsqlException {\n\n String name = tokenizer.getSimpleName();\n\n tokenizer.getThis(Token.T_RENAME);\n tokenizer.getThis(Token.T_TO);\n\n String newName = tokenizer.getSimpleName();\n boolean isQuoted = tokenizer.wasQuotedIdentifier();\n\n database.schemaManager.renameSchema(name, newName, isQuoted);\n }", "public VariableNameRenamer(String oldVariableName, String newVariableName) {\n\t\t\tsuper();\n\t\t\tthis.oldVariableName = oldVariableName;\n\t\t\tthis.newVariableName = newVariableName;\n\t\t}", "public void renameService(final String oldServiceName, final String newServiceName) {\n selectOptionByValue(Page.SELECT_SERVICES_LIST, oldServiceName);\r\n fillInput(Page.INPUT_NAME, newServiceName);\r\n clickLink(Page.BUTTON_RENAME);\r\n }", "protected void setName(String newName) {\n\t\tname = newName;\n\t}", "protected final void firePropertyChange(String name, Object o, Object n) {\n // even though o == null and n == null will signify a change, that\n // is consistent with PropertyChangeSupport's behavior and is\n // necessary for this to work\n boolean noChange = ((o != null) && (n != null) && o.equals(n));\n\n super.firePropertyChange(name, o, n);\n\n if (!(PROP_MODIFIED.equals(name)) && !noChange) {\n setModified(true);\n }\n }", "public void afterPropertyChange(T obj, String propertyName, Object oldValue, Object newValue);", "protected void addNamePropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors.add\n\t\t\t(createItemPropertyDescriptor\n\t\t\t\t(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),\n\t\t\t\t getResourceLocator(),\n\t\t\t\t getString(\"_UI_Cell_name_feature\"),\n\t\t\t\t getString(\"_UI_PropertyDescriptor_description\", \"_UI_Cell_name_feature\", \"_UI_Cell_type\"),\n\t\t\t\t LDEExperimentsPackage.Literals.CELL__NAME,\n\t\t\t\t true,\n\t\t\t\t false,\n\t\t\t\t false,\n\t\t\t\t ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,\n\t\t\t\t null,\n\t\t\t\t null));\n\t}", "@Override\n protected void commitNameChange(PropertyChangeEvent evt) {\n AttributeItemFigure figure = getFigure();\n figure.updateLabels();\n setSelected(EditPart.SELECTED_PRIMARY);\n figure.revalidate();\n }", "private void processAlterIndexRename() throws HsqlException {\n\n String name = tokenizer.getName();\n String schema =\n session.getSchemaNameForWrite(tokenizer.getLongNameFirst());\n\n tokenizer.getThis(Token.T_RENAME);\n tokenizer.getThis(Token.T_TO);\n\n String newName = tokenizer.getName();\n String newSchema = tokenizer.getLongNameFirst();\n\n newSchema = newSchema == null ? schema\n : session.getSchemaNameForWrite(\n newSchema);\n\n boolean isQuoted = tokenizer.wasQuotedIdentifier();\n\n if (!schema.equals(newSchema)) {\n throw Trace.error(Trace.INVALID_SCHEMA_NAME_NO_SUBCLASS);\n }\n\n Table t = database.schemaManager.findUserTableForIndex(session, name,\n schema);\n\n if (t == null) {\n throw Trace.error(Trace.INDEX_NOT_FOUND, name);\n }\n\n database.schemaManager.checkIndexExists(name, t.getSchemaName(), true);\n\n if (HsqlName.isReservedName(name)) {\n throw Trace.error(Trace.SYSTEM_INDEX, name);\n }\n\n if (HsqlName.isReservedName(newName)) {\n throw Trace.error(Trace.BAD_INDEX_CONSTRAINT_NAME, newName);\n }\n\n session.setScripting(true);\n session.commit();\n t.getIndex(name).setName(newName, isQuoted);\n database.schemaManager.renameIndex(name, newName, t.getName());\n }", "@Override\n\tpublic String getName() {\n\t\treturn heldObj.getName();\n\t}", "public void updateName(String newName)\r\n {\r\n name = newName;\r\n }", "@Override\r\n public void renameContainer(String oldName, String newName) \r\n throws NoSuchElementException, IllegalArgumentException\r\n {\r\n \tif (oldName == null)\r\n {\r\n throw new IllegalArgumentException(\"Old name cannot be null!\");\r\n }\r\n if (!isValidName(newName))\r\n {\r\n throw new IllegalArgumentException(\"New name is invalid!\");\r\n }\r\n ChangableProductContainer foundProductGroup = \r\n getChangableProductContainer(oldName);\r\n if (foundProductGroup == null)\r\n {\r\n throw new NoSuchElementException(oldName+\" does not exist!\");\r\n }\r\n foundProductGroup.rename(newName);\r\n }" ]
[ "0.76042384", "0.6159553", "0.6122957", "0.6104385", "0.60249686", "0.6000069", "0.5941421", "0.5854349", "0.57199645", "0.5614832", "0.5610989", "0.55839944", "0.5558595", "0.5500921", "0.5470511", "0.5439371", "0.5419576", "0.5400927", "0.53915936", "0.5386495", "0.5361914", "0.5358201", "0.53226346", "0.53111386", "0.5279372", "0.52756065", "0.5268532", "0.52624434", "0.5261291", "0.52088904", "0.5185501", "0.5179083", "0.51703984", "0.51637167", "0.51637167", "0.5155374", "0.5144488", "0.5140915", "0.51385665", "0.51384765", "0.5134118", "0.51309913", "0.5097287", "0.5095029", "0.5092549", "0.5084567", "0.5081077", "0.50655067", "0.50640774", "0.5057223", "0.5057015", "0.5045354", "0.5028155", "0.50256354", "0.4999417", "0.4997943", "0.49867162", "0.49831197", "0.49805924", "0.49741042", "0.49723142", "0.4964913", "0.49611422", "0.4948868", "0.49458635", "0.49450025", "0.49445358", "0.49412677", "0.4926974", "0.49263027", "0.49160883", "0.49092248", "0.49082845", "0.49053466", "0.48834363", "0.48825368", "0.48694113", "0.48590037", "0.48589322", "0.4854672", "0.48483953", "0.48399925", "0.48319516", "0.48250553", "0.4821984", "0.481365", "0.481365", "0.481365", "0.4811618", "0.48044127", "0.48027435", "0.48022947", "0.4802223", "0.4794941", "0.47870123", "0.47684962", "0.47630388", "0.47605732", "0.4760145", "0.47559577" ]
0.8071628
0
Called when an object has been changed. The binding of the changed object can be obtained using evt.getNewBinding(). Its old binding (before the change) can be obtained using evt.getOldBinding().
public void objectChanged(NamingEvent evt) throws RemoteException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void boundObjectChanged(Object componentValue) {\r\n this.boundObjectChanged(true, componentValue);\r\n }", "public void objectChanged(ObjectChangeEvent e) {\n\t\tString key = e.getAttributeName();\n\t\tStructure s = (Structure) attributes.get(key);\n\t\tif (s!=null) {\n\t\t\tStructure change = (Structure) changedAttributes.get(key);\n\t\t\tif(change==null) {\n\t\t\t\tchange = new Structure();\n\t\t\t\tchange.setAttributeValue(ATTRIBUTE_NAME_, s.getAttributeValue(ATTRIBUTE_NAME_, null));\n\t\t\t}\n\t\t\tchange.setAttributeValue(ATTRIBUTE_VALUE_, e.getChangedObject());\n\t\t\tchangedAttributes.put(key, change);\n\t\t\tTrace.send(Trace.ALL_LEVELS, traceKey, i18n, \"AttributeValueChanged\", key, e.getChangedObject(), changedAttributes);\n\t\t\t \n\t\t}\n\t}", "public native final EventFacade changedEvent() /*-{\n\t\treturn this.changedEvent;\n\t}-*/;", "public void newValueBinding(BGMEvent e);", "@Override\n public void propertyChange(PropertyChangeEvent evt) {\n if (evt.getPropertyName() == DataObject.PROP_MODIFIED &&\n evt.getNewValue() == Boolean.FALSE) {\n // dataobject has been modified, context graph is out of sync\n synchronized (this) {\n context = null;\n }\n }\n }", "public native final EditorBaseEvent changedEvent(EventFacade val) /*-{\n\t\tthis.changedEvent = val;\n\t\treturn this;\n\t}-*/;", "public void propertyChange(PropertyChangeEvent evt)\n/* */ {\n/* 76 */ CompoundPainter<?> painter = (CompoundPainter)this.ref.get();\n/* */ \n/* 78 */ if (painter == null) {\n/* 79 */ AbstractPainter<?> src = (AbstractPainter)evt.getSource();\n/* 80 */ src.removePropertyChangeListener(this);\n/* */ } else {\n/* 82 */ String property = evt.getPropertyName();\n/* */ \n/* 84 */ if ((\"dirty\".equals(property)) && (evt.getNewValue() == Boolean.FALSE)) {\n/* 85 */ return;\n/* */ }\n/* */ \n/* 88 */ painter.setDirty(true);\n/* */ }\n/* */ }", "public void stateChanged(ChangeEvent e){\n\r\n fShape.removeChangeListener(this); // ordinarily stateChange can get called many\r\n //times during resize, so we'll stop listening once we know\r\n // there is change\r\n\r\n\r\n if (fLastEdit!=this){\r\n if (fLastEdit != null) // kill the previous one so there's only one undo\r\n fLastEdit.die(); // don't kill ourselves\r\n\r\n //fUndoListener.undoableEditHappened(new UndoableEditEvent(TShapePanel.this, this)); // tell the listener.\r\n\r\n tellListeners(new UndoableEditEvent(TShapePanel.this,this)); // tell the listeners.\r\n\r\n fLastEdit = this;\r\n }\r\n }", "private void updateBinding(){\n\t\tif(propertiesObj == null)\n\t\t\treturn;\n\n\t\tif(txtBinding.getText().trim().length() == 0)\n\t\t\treturn;\n\n\t\tif(propertiesObj instanceof QuestionDef)\n\t\t\t((QuestionDef)propertiesObj).setVariableName(txtBinding.getText());\n\t\telse if(propertiesObj instanceof OptionDef)\n\t\t\t((OptionDef)propertiesObj).setVariableName(txtBinding.getText());\n\t\telse if(propertiesObj instanceof FormDef)\n\t\t\t((FormDef)propertiesObj).setVariableName(txtBinding.getText());\n\t\telse if(propertiesObj instanceof PageDef){\n\t\t\ttry{\n\t\t\t\t((PageDef)propertiesObj).setPageNo(Integer.parseInt(txtBinding.getText()));\n\t\t\t}catch(Exception ex){\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tformChangeListener.onFormItemChanged(propertiesObj);\n\t}", "public void stateChanged( ChangeEvent event )\n {\n \n }", "public void stateChanged(ChangeEvent e){\n\r\n if (fLastEdit!=this){ // just a precaution against stateChange getting called many times\r\n\r\n if (fLastEdit != null) // kill the previous one so there's only one undo\r\n fLastEdit.die(); // don't kill ourselves\r\n\r\n fLastEdit = this;\r\n // fUndoListener.undoableEditHappened(new UndoableEditEvent(TShapePanel.this, this)); // tell the listener.\r\n\r\n tellListeners(new UndoableEditEvent(TShapePanel.this,this)); // tell the listeners.\r\n\r\n }\r\n\r\n }", "@Override\n\tpublic void stateChanged(ChangeEvent arg0) {\n\t\t\n\t}", "public void stateChanged(ChangeEvent e){\n\r\n if (fLastEdit!=this){ // just a precaution against stateChange getting called many times\r\n\r\n if (fLastEdit != null) // kill the previous one so there's only one undo\r\n fLastEdit.die(); // don't kill ourselves\r\n\r\n fLastEdit = this;\r\n // fUndoListener.undoableEditHappened(new UndoableEditEvent(TShapePanel.this, this)); // tell the listener.\r\n\r\n tellListeners(new UndoableEditEvent(TShapePanel.this,this)); // tell the listeners.\r\n\r\n }\r\n\r\n }", "public void modelPropertyChange(PropertyChangeEvent evt) {\n\t\t\n\t}", "public PropertyChangeEvent(Object source, String propertyName,\n Object oldVal, Object newVal)\n {\n super(source);\n this.propertyName = propertyName;\n oldValue = oldVal;\n newValue = newVal;\n }", "@Override\n public void stateChanged(javax.swing.event.ChangeEvent e) {\n }", "@Override\r\n\tpublic void updateObjectListener(ActionEvent e) {\n\t\t\r\n\t}", "public void stateChanged (ChangeEvent e)\n {\n }", "@Override\r\n public void stateChanged(ChangeEvent e) {\n }", "protected void notifyReferenceChanged(Object oldObject, Object newObject) {\n\t\t// Avoid spurious notifications\n\t\tif (oldObject == newObject)\n\t\t\treturn;\n\n\t\tSet<CFGChangeListener> invokedListeners = new HashSet<CFGChangeListener>(1000);\n\n\t\t// Get the wrapper for the old object. If we broadcast notifications, we\n\t\t// directly inform this object.\n\t\ttry {\n\t\t\tUpdatableWrapper<?> wrapper = this.wrappedObjects.get(oldObject);\n\t\t\tif (BROADCAST_NOTIFICATIONS && wrapper != null) {\n\t\t\t\twrapper.notifyReferenceChanged(oldObject, newObject);\n\t\t\t\tinvokedListeners.add(wrapper);\n\t\t\t}\n\t\t\n\t\t\t// Notify all explicitly registered object listeners\n\t\t\tSet<CFGChangeListener> objListeners = objectListeners.get(oldObject);\n\t\t\tif (objListeners != null) {\n\t\t\t\tfor (CFGChangeListener listener : objListeners) {\n\t\t\t\t\tif (listener != null && invokedListeners.add(listener))\n\t\t\t\t\t\tlistener.notifyReferenceChanged(oldObject, newObject);\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t// Make sure that we don't loose track of our listeners. Expired\n\t\t\t\t// listeners for gc'ed objects will automatically be removed by\n\t\t\t\t// the WeakHashMap.\n\t\t\t\tobjectListeners.put(newObject, objListeners);\n\t\t\t}\n\t\t\t\t\n\t\t\t// Notify the global listeners that have not yet been notified as\n\t\t\t// object listeners\n\t\t\tfor (CFGChangeListener listener : globalListeners)\n\t\t\t\tif (!invokedListeners.contains(listener))\n\t\t\t\t\tlistener.notifyReferenceChanged(oldObject, newObject);\n\t\t\t\n\t\t\t// We must also update our list of wrapped objects\n\t\t\tthis.wrappedObjects.put(newObject, wrapper);\n//\t\t\tthis.wrappedObjects.remove(oldObject);\n\t\t} catch (ExecutionException e) {\n\t\t\tSystem.err.println(\"Could not wrap object\");\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t}", "private void changeBinding(InstanceBinding binding) {\r\n\t\t\r\n\t}", "public void afterPropertyChange(T obj, String propertyName, Object oldValue, Object newValue);", "@Override\n\t\t\t\tpublic void changed(ChangeEvent event, Actor actor) {\n\t\t\t\t\trealArrs.clear();\n\t\t\t\t\t// remove old temp\n\t\t\t\t\tif (icoTemp != null)\n\t\t\t\t\t\ticoTemp = null;\n\t\t\t\t\t// reborn\n\t\t\t\t\tif (tfModel.equals(\"\"))\n\t\t\t\t\t\ttfModel.setText(\"{}\");\n\t\t\t\t\treBorn(tfModel.getText());\n\t\t\t\t\t// hide dialog\n\t\t\t\t\tdialog.setVisible(false);\n\t\t\t\t}", "@Override\n\t\t\tpublic void changed(ChangeEvent event, Actor actor) {\n\t\t\t}", "@Override\n\t\t\tpublic void changed(ChangeEvent event, Actor actor) {\n\t\t\t}", "@Override\n\t\t\tpublic void changed(ChangeEvent event, Actor actor) {\n\t\t\t}", "@Override\n\t\t\tpublic void changed(ChangeEvent event, Actor actor) {\n\t\t\t}", "public void notifyChange(Object obj) {\n\t\t\ttry\n\t\t\t{\n\t\t\t\tsetChanged();\n\t\t\t\tnotifyObservers(obj);\n\t\t\t}\n\t\t\tcatch(Exception e)\n\t\t\t{\n\t\t\t}\n\t\t\t\n\t\t}", "private void handleObjectStateChange(GameObject obj){\n ImageView imageView = (ImageView) getNodeById(obj.getObjID());\n if(imageView != null) {\n imageView.setImage(resources.getImage(obj.getClassName(), obj.getState()));\n System.out.println(obj + \" changed state to: \" + obj.getState());\n }\n }", "public void stateChanged(ChangeEvent e) {\n }", "public void firePropertyChange(String propertyName, Object oldValue, Object newValue);", "public void stateChanged (ChangeEvent event)\n {\n ((GroupItem)gbox.getSelectedItem()).configChanged();\n }", "Long handleEvent(Long renderedOpID, \n\t\t String propName,\n\t\t Object oldValue, \n\t\t Object newValue) throws RemoteException;", "public void update(Observable obj, Object arg ){\n\t\trepaint();\n\t\tif(theModel.getSelectedVertexIndex() == -1){\n\t\t\ttextField.setText(\"\");\n\t\t\ttextField.setEditable(false);\n\t\t}\n\t}", "@Override\r\n\tpublic void propertyChange(PropertyChangeEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void propertyChange(PropertyChangeEvent arg0) {\n\t\t\r\n\t}", "public void stateChanged(ChangeEvent e) {\n isChanged = true;\n refreshComponents();\n }", "@Override\n\t\t\tpublic void onChanged(ListChangeListener.Change<? extends PR1Model.Shape> e) { \n\t\t\t\t\n\t\t\t\trepaint(); \n\t\t\t\treTable();\n\t\t\t\tviewState.set(ViewState.MODIFIED);\n\t\t\t\t\n\t\t\t}", "@Override\n public void propertyChange(PropertyChangeEvent evt) {\n\n System.out.println(\"Customer \" + this.name + \" observed a change in \" +\n evt.getPropertyName() + \" of \" + evt.getSource());\n\n System.out.println(\n evt.getOldValue() + \" has changed to \" + evt.getNewValue() + \". \");\n\n System.out.println();\n }", "public void tableViewChanged(ObjectViewModelEvent pEvent);", "@Override\r\n\tpublic void propertyChange(PropertyChangeEvent arg0) {\n\r\n\t}", "@Override\n\tpublic void propertyChange(PropertyChangeEvent arg0)\n\t{\n\t\t\n\t}", "protected void firePropertyChange( java.beans.PropertyChangeEvent evt ) {\n propertyChangeSupport.firePropertyChange( evt );\n }", "@Override\n\tpublic void stateChanged(ChangeEvent e) {\n\t}", "private void notifyObjectChanged(int index0, int index1) {\n\t\tlisteners.forEach(l -> l.objectsChanged(this, index0, index1));\n\t}", "public void stateChanged(ChangeEvent e){\n\r\n repaint(); // at the moment we're being pretty crude with this, redrawing all the shapes\r\n\r\n\r\n\r\n if (fDeriverDocument!=null) // if this drawing has a journal, set it for saving\r\n fDeriverDocument.setDirty(true);\r\n\r\n\r\n\r\n }", "@Override\n\tpublic void propertyChange(PropertyChangeEvent arg0) {\n\t\t\n\t}", "@Override\n\t\t\tpublic void changedUpdate(DocumentEvent arg0) {\n\t\t\t}", "public void propertyChange(PropertyChangeEvent evt) {\n \r\n }", "public void objectRenamed(NamingEvent evt) throws RemoteException;", "public void change(GeometricalObject object);", "public void propertyChange(java.beans.PropertyChangeEvent evt) {\r\n\t//\r\n\t// must listen to the following events:\r\n\t// this.simulationContext\r\n\t//\t\tsimulationContext.GeometryContext.geometry\r\n\t// simulationContext.GeometryContext.structureMappings\r\n\t// StructureMapping.resolved\r\n\t//\r\n\t// this.speciesContextSpec\r\n\t// SpeciesContextSpec.parameters\r\n\t// Parameter.*\r\n\t//\r\n\ttry {\t\t\r\n\t\t//\r\n\t\t// if geometry changes (could affect spatially resolved boundaries).\r\n\t\t//\r\n\t\tif (fieldSpeciesContextSpec != null && evt.getSource() == fieldSpeciesContextSpec.getSimulationContext().getGeometryContext() \r\n\t\t\t\t&& evt.getPropertyName().equals(\"geometry\")){\r\n\t\t\trefreshData();\r\n\t\t}\r\n\t\t//\r\n\t\t// if structureMappings array changes (could affect spatially resolved boundaries).\r\n\t\t//\r\n\t\tif (fieldSpeciesContextSpec != null && evt.getSource() == fieldSpeciesContextSpec.getSimulationContext().getGeometryContext() \r\n\t\t\t\t&& evt.getPropertyName().equals(\"structureMappings\")){\r\n\t\t\tStructureMapping[] oldStructureMappings = (StructureMapping[])evt.getOldValue();\r\n\t\t\tfor (int i = 0; oldStructureMappings!=null && i < oldStructureMappings.length; i++){\r\n\t\t\t\toldStructureMappings[i].removePropertyChangeListener(this);\r\n\t\t\t}\r\n\t\t\tStructureMapping[] newStructureMappings = (StructureMapping[])evt.getNewValue();\r\n\t\t\tfor (int i = 0; newStructureMappings!=null && i < newStructureMappings.length; i++){\r\n\t\t\t\tnewStructureMappings[i].addPropertyChangeListener(this);\r\n\t\t\t}\r\n\t\t\trefreshData();\r\n\t\t}\r\n\t\t//\r\n\t\t// if structureMapping changes (could affect spatially resolved boundaries).\r\n\t\t//\r\n\t\tif (evt.getSource() instanceof StructureMapping){\r\n\t\t\trefreshData();\r\n\t\t}\r\n\t\t\r\n\t\tif (evt.getSource() == this && evt.getPropertyName().equals(\"speciesContextSpec\")) {\r\n\t\t\tSpeciesContextSpec oldValue = (SpeciesContextSpec)evt.getOldValue();\r\n\t\t\tif (oldValue!=null){\r\n\t\t\t\toldValue.removePropertyChangeListener(this);\r\n\t\t\t\tParameter oldParameters[] = oldValue.getParameters();\r\n\t\t\t\tif (oldParameters!=null) {\r\n\t\t\t\t\tfor (int i = 0; i<oldParameters.length; i++){\r\n\t\t\t\t\t\toldParameters[i].removePropertyChangeListener(this);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSimulationContext oldSimContext = oldValue.getSimulationContext();\r\n\t\t\t\tif (oldSimContext!=null){\r\n\t\t\t\t\toldSimContext.getGeometryContext().removePropertyChangeListener(this);\r\n\t\t\t\t\tStructureMapping[] oldStructureMappings = oldSimContext.getGeometryContext().getStructureMappings();\r\n\t\t\t\t\tif (oldStructureMappings!=null) {\r\n\t\t\t\t\t\tfor (int i = 0; i < oldStructureMappings.length; i++){\r\n\t\t\t\t\t\t\toldStructureMappings[i].removePropertyChangeListener(this);\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\tSpeciesContextSpec newValue = (SpeciesContextSpec)evt.getNewValue();\r\n\t\t\tif (newValue!=null){\r\n\t\t\t\tnewValue.addPropertyChangeListener(this);\r\n\t\t\t\tParameter newParameters[] = newValue.getParameters();\r\n\t\t\t\tif (newParameters != null) {\r\n\t\t\t\t\tfor (int i = 0; i < newParameters.length; i ++){\r\n\t\t\t\t\t\tnewParameters[i].addPropertyChangeListener(this);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSimulationContext newSimContext = newValue.getSimulationContext();\r\n\t\t\t\tif (newSimContext!=null){\r\n\t\t\t\t\tnewSimContext.getGeometryContext().addPropertyChangeListener(this);\r\n\t\t\t\t\tStructureMapping[] newStructureMappings = newSimContext.getGeometryContext().getStructureMappings();\r\n\t\t\t\t\tif (newStructureMappings != null) {\r\n\t\t\t\t\t\tfor (int i = 0; i < newStructureMappings.length; i++){\r\n\t\t\t\t\t\t\tnewStructureMappings[i].addPropertyChangeListener(this);\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\trefreshData();\r\n\t\t}\r\n\t\tif (evt.getSource() instanceof SpeciesContextSpec){\r\n\t\t\t// if parameters changed must update listeners\r\n\t\t\tif (evt.getPropertyName().equals(\"parameters\")) {\r\n\t\t\t\tParameter oldParameters[] = (Parameter[])evt.getOldValue();\r\n\t\t\t\tif (oldParameters!=null) {\r\n\t\t\t\t\tfor (int i = 0;i<oldParameters.length; i++){\r\n\t\t\t\t\t\toldParameters[i].removePropertyChangeListener(this);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tParameter newParameters[] = (Parameter[])evt.getNewValue();\r\n\t\t\t\tif (newParameters!=null) {\r\n\t\t\t\t\tfor (int i = 0;i<newParameters.length; i++){\r\n\t\t\t\t\t\tnewParameters[i].addPropertyChangeListener(this);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!evt.getPropertyName().equals(SpeciesContextSpec.PARAMETER_NAME_PROXY_PARAMETERS)) {\r\n\t\t\t\t// for any change to the SpeciesContextSpec, want to update all.\r\n\t\t\t\t// proxy parameters don't affect table\r\n\t\t\t\trefreshData();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(evt.getSource() instanceof Parameter){\r\n\t\t\trefreshData();\r\n\t\t}\r\n\t} catch (Exception e){\r\n\t\te.printStackTrace(System.out);\r\n\t}\r\n}", "private void change() {\n\t\tsetChanged();\n\t\t//NotifyObservers calls on the update-method in the GUI\n\t\tnotifyObservers();\n\t}", "public void stateChanged(ChangeEvent event)\r\n {\r\n fireChangeEvent(event);\r\n }", "protected void handleModelChanged() {\n\t\t// refresh connections on the source edit part!\n\t\tif (isActive()) {\n//\t\t\tLink link = (Link)getModel();\n//\t\t\tEObject sourceActivity = FlowLinkUtil.getLinkSource(link); \n//\t\t\tif (sourceActivity != null) {\n//\t\t\t\tObject editPart = getViewer().getEditPartRegistry().get(sourceActivity);\n//\t\t\t\tif (editPart instanceof ActivityEditPart) {\n//\t\t\t\t\t((ActivityEditPart)editPart).refresh();\n//\t\t\t\t}\n//\t\t\t}\n//\t\t\tEObject targetActivity = FlowLinkUtil.getLinkTarget(link); \n//\t\t\tif (targetActivity != null) {\n//\t\t\t\tObject editPart = getViewer().getEditPartRegistry().get(targetActivity);\n//\t\t\t\tif (editPart instanceof ActivityEditPart) {\n//\t\t\t\t\t((ActivityEditPart)editPart).refresh();\n//\t\t\t\t}\n//\t\t\t}\n\t\t\t// If property name is children, refresh children.\n\t\t\t// If property name is size or location, refresh visuals.\n\t\t\trefreshVisuals();\n\t\t}\n\t}", "public void propertyChange(PropertyChangeEvent evt) {\r\n fireStateChanged();\r\n }", "@Override\n \tpublic void propertyChange(PropertyChangeEvent arg0) {\n \t\t\n \t}", "public void onChange(Widget sender) {\n /** if there was a change in opacity, we update the currentFillColor and the selected object if there's any. */\n if (sender.equals(this.fillOpacity)) {\n\t\t\tint value = this.fillOpacity.getValue();\n\t\t\tif (this.curr_obj != null) {\n\t\t\t\tfinal Color color = this.curr_obj.getFillColor();\n\t\t\t\tColor newColor = new Color(color.getRed(), color.getGreen(), color.getBlue(), value);\n\t\t\t\tthis.curr_obj.uSetFillColor(newColor);\n\n } else {\n this.currentFillColor.setAlpha(value);\n\t\t\t}\n\n\n }else if(sender.equals(this.strokeOpacity)) {\n int value = this.strokeOpacity.getValue();\n\n if(this.curr_obj != null) {\n\t\t\t\tfinal Color color = this.curr_obj.getStrokeColor();\n\t\t\t\tColor newColor = new Color(color.getRed(), color.getGreen(), color.getBlue(), value);\n\t\t\t\tthis.curr_obj.uSetStroke(newColor, this.curr_obj.getStrokeWidth());\n\n } else {\n this.currentStrokeColor.setAlpha(value);\n\t\t\t}\n /** If there was any change in the ListBoxes we update the current font. */\n } else if(sender.equals(this.currentFontFamily) || sender.equals(this.currentFontSize) || sender.equals(this.currentFontStyle) || sender.equals(this.currentFontWeight)) {\n this.updateFont();\n } else if(sender.equals(this.currentStrokeSize) && this.curr_obj != null) {\n this.curr_obj.uSetStroke(this.currentStrokeColor, this.currentStrokeSize.getValue());\n }\n\t}", "public void newBinding(BGMEvent e);", "void onPropertyChange(String name, String newValue);", "@Override\n public void propertyChange(PropertyChangeEvent evt) {\n modelToView(handle);\n }", "public void stateChanged(ChangeEvent e) {\n\n (model.getInterpol()).setBezierIterationen(((JSlider) e.getSource()).getValue());\n }", "public void changed(LocationEvent arg0) {\n \t\t\t\t\t\t\n \t\t\t\t\t}", "@Override\n\t\tpublic void widgetSelected(SelectionEvent event) {\n\n\t\t\tObject source = event.getSource();\n\n\t\t\tif (source == cbLRC) { //LR Charge value change\n\t\t\t\thandleLRCTypeChange();\n\t\t\t} else if (source == cbGSC) { //GSC value change\n\t\t\t\thandleGSCTypeChange();\n\t\t\t} else if (source == cbInsurance) { //Insurance Value Change\n\t\t\t\thandleInsuranceTypeChange();\n\t\t\t} else if (source == cbDHC) { //GSC value change\n\t\t\t\thandleDHCTypeChange();\n\t\t\t} else if (source == cbCCC) { //CC Charge Type change\n\t\t\t\thandleCCCTypeChange();\n\t\t\t} else if (source == cbDCC) { //DC Charge Type change\n\t\t\t\thandleDCCTypeChange();\n\t\t\t} else if (source == cbDDC) { //DD Charge Type change\n\t\t\t\thandleDDCTypeChange();\n\t\t\t} else if (source == cbIEC) { //IEC Charge Type change\n\t\t\t\thandleIECTypeChange();\n\t\t\t} else if (source == cbLoadingCharge) { //Loading Charge Type change\n\t\t\t\thandleLCTypeChange();\n\t\t\t} else if (source == btnAdd) {\n\t\t\t\tif(isValidArticle())\n\t\t\t\t\taddArticle();\n\t\t\t} else if (source == tblArticle) {\n\t\t\t\tviewEditTblArticle();\n\t\t\t}\n\t\t\tif (source == btnLRCPop) {\n\t\t\t\thandleLRCPop();\n\t\t\t} else if (source == btnGSCPop) {\n\t\t\t\thandleGSCPop();\n\t\t\t} else if (source == btnInsurancePop) {\n\t\t\t\thandleInsurancePop();\n\t\t\t} else if (source == btnDHCPop) {\n\t\t\t\thandleDHCPop();\n\t\t\t}\n\t\t}", "void instanceChanged();", "public void dataChanged(DataChangeEvent e) {\n\t\t\t}", "@Override\n public void changeEventRaised(ChangeEvent event)\n {\n if (!(event instanceof ValueSourceChangeEvent))\n return;\n\n if (event instanceof SingularSubsourceChangeEvent)\n {\n SingularSubsourceChangeEvent e = (SingularSubsourceChangeEvent) event;\n singleSubsourceReplaced(e, e.getOldSource(), e.getNewSource());\n }\n else if (event instanceof ValueChangeEvent)\n {\n ValueChangeEvent e = (ValueChangeEvent) event;\n valueChanged(e, e.getOldValue(), e.getNewValue());\n }\n else if (event instanceof TypeChangeEvent)\n {\n TypeChangeEvent e = (TypeChangeEvent) event;\n typeChanged(e, e.getOldType(), e.getNewType());\n }\n else if (event instanceof SubsourceModificationEvent)\n subsourceChanged((SubsourceModificationEvent) event);\n }", "protected void PropertyChanged()\r\n { }", "public final void propertyChange(PropertyChangeEvent evt) {\n Object oldValue = evt.getOldValue();\n Object newValue = evt.getNewValue();\n String propertyName = evt.getPropertyName();\n if ((oldValue instanceof Document) || (newValue instanceof Document)) {\n if (oldValue != null) {\n ((Document)oldValue).removeDocumentListener(this);\n i18nView = false;\n }\n if (newValue != null) {\n ((Document)newValue).addDocumentListener(this);\n if (\"document\" == propertyName) {\n setView(null);\n BasicTextUI.this.propertyChange(evt);\n modelChanged();\n return;\n }\n }\n modelChanged();\n }\n if (\"focusAccelerator\" == propertyName) {\n updateFocusAcceleratorBinding(true);\n } else if (\"componentOrientation\" == propertyName) {\n // Changes in ComponentOrientation require the views to be\n // rebuilt.\n Document document = editor.getDocument();\n final String I18NProperty = \"i18n\";\n // if a default direction of right-to-left has been specified,\n // we want complex layout even if the text is all left to right.\n if (ComponentOrientation.RIGHT_TO_LEFT == newValue\n && ! Boolean.TRUE.equals(document.getProperty(I18NProperty))) {\n document.putProperty(I18NProperty, Boolean.TRUE);\n }\n modelChanged();\n } else if (\"font\" == propertyName) {\n modelChanged();\n } else if (\"dropLocation\" == propertyName) {\n dropIndexChanged();\n } else if (\"editable\" == propertyName) {\n updateCursor();\n modelChanged();\n }\n BasicTextUI.this.propertyChange(evt);\n }", "@Override\n\tpublic void setChanged() {\n\t\tthis.changed = true;\n\t}", "public void objectAdded(NamingEvent evt) throws RemoteException;", "void eventChanged();", "public void stateChanged(ChangeEvent param1ChangeEvent) {\n/* 1503 */ if (param1ChangeEvent == null) {\n/* 1504 */ throw new NullPointerException();\n/* */ }\n/* 1506 */ firePropertyChange(\"AccessibleVisibleData\", \n/* 1507 */ Boolean.valueOf(false), \n/* 1508 */ Boolean.valueOf(true));\n/* */ }", "public void setPropertyChanged(com.app.tvp.cas.cliente.PropertyChangedEventHandler propertyChanged) {\n this.propertyChanged = propertyChanged;\n }", "protected void stateChanged() {\r\n\t\tsetChanged();\r\n\t\tnotifyObservers();\r\n\t}", "void bindings() {\n this.categoryComboBoxEdit.setItems(this.bookModelToEdit.getCategoryFxObservableList());\n authorComboBoxEdit.setItems(this.bookModelToEdit.getAuthorFxObservableList());\n\n categoryComboBoxEdit.valueProperty().bindBidirectional(this.bookModelToEdit.bookFxObjectPropertyProperty().get().categoryFxProperty());\n authorComboBoxEdit.valueProperty().bindBidirectional(this.bookModelToEdit.bookFxObjectPropertyProperty().get().authorFxProperty());\n bookTitleTextFieldEdit.textProperty().bindBidirectional(this.bookModelToEdit.bookFxObjectPropertyProperty().get().titleProperty());\n bookDescriptionTextAreaEdit.textProperty().bindBidirectional(this.bookModelToEdit.bookFxObjectPropertyProperty().get().descriptionProperty());\n bookIsbnTextFieldEdit.textProperty().bindBidirectional(this.bookModelToEdit.bookFxObjectPropertyProperty().get().isbnProperty());\n bookNoteSliderEdit.valueProperty().bindBidirectional(this.bookModelToEdit.bookFxObjectPropertyProperty().get().ratingProperty());\n bookReleaseDatePickerEdit.valueProperty().bindBidirectional(this.bookModelToEdit.bookFxObjectPropertyProperty().get().releaseDateProperty());\n\n }", "public void changed() {\n this.fireContentsChanged(this, 0, this.getSize() - 1);\n }", "public void propertyChange(PropertyChangeEvent anEvent)\n{\n // Get DeepChangeListener count (just return if zero)\n int deepListenerCount = getListenerCount(DeepChangeListener.class); if(deepListenerCount==0) return;\n \n // If change is fill/stroke, convert property name to \"Fill.xxx\" or \"Stroke.xxx\" for the sake of animation\n if(anEvent.getSource() instanceof RMFill) {\n Object source = anEvent.getSource();\n String prefix = source==getFill()? \"Fill\" : source==getStroke()? \"Stroke\" : null;\n String propertyName = prefix + \".\" + anEvent.getPropertyName();\n anEvent = new PropertyChangeEvent(this, propertyName, anEvent.getOldValue(), anEvent.getNewValue());\n repaint();\n }\n \n // Propagate to this shape's DeepChangeListeners (if present)\n for(int i=0, iMax=getListenerCount(DeepChangeListener.class); i<iMax; i++)\n getListener(DeepChangeListener.class, i).deepChange(this, anEvent);\n}", "@Override\n\t\t\t\t\tpublic void changed(ObservableValue arg0, Object arg1,\n\t\t\t\t\t\t\tObject arg2) {\n\t\t\t\t\t\tif (arg2.toString() == \"报溢单\") {// 报溢单\n\t\t\t\t\t\t\tOverflow de = new Overflow();\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tde.display(Job, name, id);\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (arg2.toString() == \"报损单\") {// 报损单\n\t\t\t\t\t\t\tloss l = new loss();\n\t\t\t\t\t\t\tl.display(Job, name, id);\n\t\t\t\t\t\t} else if (arg2.toString() == \"报警单\") {// 报警单\n\t\t\t\t\t\t\tAlarm a = new Alarm();\n\t\t\t\t\t\t\ta.display(Job, name, id);\n\t\t\t\t\t\t} else if (arg2.toString() == \"赠送单\") {// 赠送单\n\t\t\t\t\t\t\tGift g = new Gift();\n\t\t\t\t\t\t\tg.display(Job, name, id);\n\t\t\t\t\t\t} else if (arg2.toString() == \"草稿箱\") {// 草稿箱\n\t\t\t\t\t\t\tdrafts d = new drafts();\n\t\t\t\t\t\t\td.display(Job, name, id);\n\t\t\t\t\t\t} else if (arg2.toString() == \"查看单据\") {// 查看单据\n\t\t\t\t\t\t\tGetReceipt g = new GetReceipt();\n\t\t\t\t\t\t\tg.display(Job, name, id);\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "@Override\n\tpublic void propertyChange(PropertyChangeEvent evt) {\n\t\t\n\t}", "@Override\n public void eventsChanged() {\n }", "public native final EditorBaseEvent changedNode(Node val) /*-{\n\t\tthis.changedNode = val;\n\t\treturn this;\n\t}-*/;", "public synchronized void setChanged() {\n super.setChanged();\n }", "public void propertyChange(String propertyName, Object oldValue, Object newValue) {\r\n propertyChangeSupport.firePropertyChange(propertyName, oldValue, newValue);\r\n }", "@Override\n\tpublic void onPropertyModified(PropertyDescriptor descriptor, String oldValue, String newValue) {\n\t\tsuper.onPropertyModified(descriptor, oldValue, newValue);\n\t\t\n\t\t\n\t\t\n\t}", "public void treeRowSelectionChanged(AbstractBean beanObj) {\r\n\t}", "public final synchronized void setChanged() {\n\t\tsuper.setChanged ();\n }", "public void selectionChanged(MPart part, Object object) {\n\t\tif (object == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tStructuredSelection selection = new StructuredSelection(object);\n\n\t\t// Query the new selection for appropriate new child/sibling descriptors\n\t\t//\n\t\tCollection<?> newChildDescriptors = null;\n\t\tCollection<?> newSiblingDescriptors = null;\n\n\t\tif (editingDomain != null) {\n\n\t\t\tnewChildDescriptors = editingDomain.getNewChildDescriptors(object,\n\t\t\t\t\tnull);\n\t\t\tnewSiblingDescriptors = editingDomain.getNewChildDescriptors(null,\n\t\t\t\t\tobject);\n\n\t\t\t// Generate actions for selection; populate and redraw the menus.\n\t\t\tgenerateCreateChildActions(newChildDescriptors, selection);\n\t\t\tgenerateCreateSiblingActions(newSiblingDescriptors, selection);\n\n\t\t\t// create or update our Menu Manger.\n\t\t\tgetCreateChildMenuManager();\n\t\t\tSystem.out.println(\"EMF Editor selection changed child menu size: \"\n\t\t\t\t\t+ createChildMenuManager.getChildren().size());\n\t\t\tgetCreateSiblingMenuManager();\n\t\t\tSystem.out\n\t\t\t\t\t.println(\"EMF Editor selection changed sibling menu size: \"\n\t\t\t\t\t\t\t+ createSiblingMenuManager.getChildren().size());\n\n\t\t\tpopulateContextMenu(part);\n\t\t}\n\t}", "public void changedUpdate(DocumentEvent evt, FoldHierarchyTransaction transaction) {\n }", "private void addBindingAndListener() {\n // When the simulation has more than one time of simulation this property change the selected element\n // of time series.\n this.changeListener = (observable, oldValue, newValue) -> {\n if (newValue instanceof Component) { // IS LINK OR NODE\n Component comp = (Component) newValue;\n idTextField.setText(comp.getId());\n }\n };\n this.selectableItem.addListener(changeListener);\n }", "@objid (\"002d0230-0d4f-10c6-842f-001ec947cd2a\")\n @Override\n public void inputChanged(Viewer v, Object oldInput, Object newInput) {\n }", "public void designerStateModified(DesignerEvent e);", "public void objectRemoved(NamingEvent evt) throws RemoteException;", "public void propertyChange(PropertyChangeEvent event) {\r\n\t\tString property = event.getPropertyName();\r\n\t\tif (\"bendpoint\".equals(property)) //$NON-NLS-1$\r\n\t\t\trefreshVisuals(); \r\n\t}", "public void rebind(String name, Object obj) throws NamingException {\n }", "@Override\n public void onChange() {\n java.lang.String callbackArg_0 = android.databinding.adapters.TextViewBindingAdapter.getTextString(mboundView1);\n // localize variables for thread safety\n // viewModel.obName != null\n boolean viewModelObNameJavaLangObjectNull = false;\n // viewModel.obName.get()\n java.lang.String viewModelObNameGet = null;\n // viewModel\n ys.app.pad.viewmodel.ModifyServiceDetailViewModel viewModel = mViewModel;\n // viewModel.obName\n android.databinding.ObservableField<java.lang.String> viewModelObName = null;\n // viewModel != null\n boolean viewModelJavaLangObjectNull = false;\n\n\n\n viewModelJavaLangObjectNull = (viewModel) != (null);\n if (viewModelJavaLangObjectNull) {\n\n\n viewModelObName = viewModel.obName;\n\n viewModelObNameJavaLangObjectNull = (viewModelObName) != (null);\n if (viewModelObNameJavaLangObjectNull) {\n\n\n\n\n viewModelObName.set(((java.lang.String) (callbackArg_0)));\n }\n }\n }", "@Override\n\t\t\t\tpublic void stateChanged(ChangeEvent e) {\n\t\t\t\t\tif (!updating && button.isSelected()) {\n\t\t\t\t\t\tmodel.set(db);\n\t\t\t\t\t}\n\t\t\t\t\tif (!useRadioButtons) {\n\t\t\t\t\t\tlabel.setForeground(button.isSelected() ? selectedForeground : unselectedForeground);\n\t\t\t\t\t}\n\t\t\t\t}", "public void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue) {\r\n\tgetPropertyChange().firePropertyChange(propertyName, oldValue, newValue);\r\n}", "protected abstract void updateFromBackingEvent(Object backingEvent);", "@Override\n public void propertyChange(PropertyChangeEvent event) {\n if (!hasOverrideFor(event.getProperty()))\n fireMappingChanged(event.getProperty(), event.getOldValue(), event.getNewValue());\n }" ]
[ "0.6602734", "0.65115213", "0.6335603", "0.61497706", "0.60487884", "0.60157", "0.59836274", "0.59205735", "0.59066045", "0.5869145", "0.58513725", "0.58417183", "0.5811243", "0.5798291", "0.57971734", "0.5779994", "0.57761675", "0.5765888", "0.5765122", "0.5753008", "0.5726267", "0.56912416", "0.56797326", "0.5677998", "0.5677998", "0.5677998", "0.5677998", "0.5658203", "0.56536096", "0.5639111", "0.56317335", "0.5623371", "0.56181467", "0.5606175", "0.556643", "0.556643", "0.5554273", "0.55433327", "0.5537679", "0.5533208", "0.5515897", "0.5508201", "0.5477082", "0.5473799", "0.5473081", "0.5471223", "0.546738", "0.54657996", "0.54620486", "0.54575497", "0.5440737", "0.54100966", "0.53945386", "0.5392787", "0.538225", "0.537356", "0.5370592", "0.53634393", "0.53509164", "0.5331785", "0.5329287", "0.5319122", "0.5309878", "0.5307734", "0.5298056", "0.52830034", "0.52828246", "0.5278993", "0.5270147", "0.5266288", "0.5262599", "0.52569324", "0.5242994", "0.52426386", "0.5241519", "0.52410567", "0.5235753", "0.52338105", "0.5208146", "0.5207034", "0.52051264", "0.52036506", "0.5197813", "0.51927716", "0.5189334", "0.51874554", "0.51786184", "0.51778567", "0.51727587", "0.51627284", "0.51614004", "0.51602226", "0.5156691", "0.5156469", "0.51542485", "0.515306", "0.51381284", "0.51344335", "0.51327103", "0.5129605" ]
0.7319324
0
Called when a naming exception is thrown while attempting to fire a NamingEvent.
void namingExceptionThrown(NamingExceptionEvent evt) throws RemoteException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ReservedNameException(String message, String name){\r\n super(message);\r\n this.name = name;\r\n }", "public void objectRenamed(NamingEvent evt) throws RemoteException;", "public ReservedNameException(String name){\r\n this(\"Reserved name: \" + name, name);\r\n }", "public ItemNotFoundException(String itemName) {\n super(String.format(\"Item %s was not found\", itemName));\n }", "public void sameNameError(String nickname) {\n notifyNicknameNotValid(nickname);\n }", "public InvalidItemNameException(String name){\n super(\"The name should not contain any number: \" + name);\n }", "public InvalidFileNameException(String pName, String pMessage)\n/* */ {\n/* 49 */ super(pMessage);\n/* 50 */ this.name = pName;\n/* */ }", "@Override\n\t\tpublic void onException(Exception arg0) {\n\t\t\t\n\t\t}", "public MethodInvocationException(PropertyChangeEvent propertyChangeEvent, Throwable ex) {\r\n\t\tsuper(propertyChangeEvent, String.format(\"Property '%s' threw exception\", propertyChangeEvent.getPropertyName()), ex);\r\n\t}", "@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}", "@Override\n\tpublic void onException(Exception e) {\n\n\t}", "public ItemNotFoundException(String e){\r\n super(e+\" was not found!\");\r\n }", "@Override\n public void onException(Exception arg0) {\n }", "@Test\r\n\tpublic void testInvalidManagedIncidentName() {\r\n\t\t//Tests with an empty name String\r\n\t\ttry {\r\n\t\t\tManagedIncident mi = new ManagedIncident(\"callme\", Category.DATABASE, Priority.MEDIUM, \"\", \"Random caller\");\r\n\t\t\tmi.getName();\r\n\t\t\tfail();\r\n\t\t}\r\n\t\tcatch (IllegalArgumentException e) {\r\n\t\t\tassertNull(e.getMessage());\r\n\t\t}\r\n\t\t\r\n\t\t//Tests with a null name String\r\n\t\ttry {\r\n\t\t\tManagedIncident mi = new ManagedIncident(\"lpost\", Category.HARDWARE, Priority.URGENT, null, \"I like lamp\");\r\n\t\t\tmi.getName();\r\n\t\t\tfail();\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\tassertNull(e.getMessage());\r\n\t\t}\r\n\t}", "public void rethrowException(String exceptionName) throws Exception {\n\t\t\ttry {\n\t\t\t\t\tif (exceptionName.equals(\"First\")) {\n\t\t\t\t\t\t\tthrow new FirstException();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthrow new SecondException();\n\t\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\t\tthrow e;\n\t\t\t}\n\t}", "public int handleRenameError(String source, String target, int errCode, String errMsg);", "@Override\n\tpublic void processIOException(IOExceptionEvent exceptionEvent) {\n\t}", "public abstract void onException(Exception e);", "public AuraUnhandledException(String message, Throwable e) {\n super(message, e);\n }", "protected void handleError(ErrorEvent event)\r\n\t{\r\n\t\t// no default behavior\r\n\t}", "void onException(Exception e);", "private void fireOnIndicatorErrorEvent(Exception e) {\n \t\tif(!facade.getApplicationStateManager()\r\n \t\t\t\t.getApplicationState().equals(ApplicationState.LOADING_INDICATORS)) {\r\n \t\t\treturn;\r\n \t\t}\r\n \t\t\r\n \t\tIterator<IndicatorDataListener> it = this.indicatorDataListeners.iterator();\r\n \t\t\r\n \t\twhile(it.hasNext()) {\r\n \t\t\tit.next().onIndicatorError(e);\r\n \t\t}\r\n \t}", "@Override\n\tpublic void onException(JMSException arg0) {\n\t\t\n\t}", "@Override\n\tpublic void onException(JMSException arg0) {\n\t\t\n\t}", "@Override\r\n public void onException(Exception arg0) {\n\r\n }", "public InvalidEventHandlerException(String message) {\n super(message);\n }", "public ObjectNotFoundException(String s) {\r\n super(s);\r\n }", "public void objectChanged(NamingEvent evt) throws RemoteException;", "private void sendOldError(Exception e) {\n }", "public void exceptionEncountered(IOException ioe) {}", "private void fireOnTargetErrorEvent(Exception e) {\n \t\tif(!facade.getApplicationStateManager()\r\n \t\t\t\t.getApplicationState().equals(ApplicationState.LOADING)) {\r\n \t\t\treturn;\r\n \t\t}\r\n \t\t\r\n \t\tIterator<TargetDataListener> it = this.targetDataListeners.iterator();\r\n \t\t\r\n \t\twhile(it.hasNext()) {\r\n \t\t\tit.next().onTargetError(e);\r\n \t\t}\r\n \t}", "public void onException(Exception ex) {\n \t\t\t}", "protected abstract void onException(final Exception exception);", "private void fireOnModelErrorEvent(Exception e) {\n \t\tif(!facade.getApplicationStateManager()\r\n \t\t\t\t.getApplicationState().equals(ApplicationState.LOADING)) {\r\n \t\t\treturn;\r\n \t\t}\r\n \t\t\r\n \t\tIterator<ModelDataListener> it = this.modelDataListeners.iterator();\r\n \t\t\r\n \t\twhile(it.hasNext()) {\r\n \t\t\tit.next().onModelError(e);\r\n \t\t}\r\n \t}", "@Override\n public void onUnrecoverableError(final Throwable caught, final String errorCode) {\n Scheduler.get().scheduleDeferred(new ScheduledCommand() {\n @Override\n public void execute() {\n try {\n selectError(caught, errorCode);\n } catch (Throwable e) {\n }\n }\n });\n\n }", "public void onFileNotFoundException(FileNotFoundException e) {\n\t\t}", "public InvalidEventHandlerException() {\n }", "public WorldEntryFailureEvent(String worldName, String reason)\n {\n super(EventConstants.WorldEntryFailure, \n EventConstants.WorldEntryFailureUri);\n \n if (worldName == null)\n {\n String msg = \"worldName cannot be null\";\n throw new IllegalArgumentException(msg);\n }\n \n this.WorldName = worldName;\n this.Reason = reason;\n }", "public void error(SAXParseException e) throws SAXException {\r\n\t\tif (DATASOURCE_ERROR_CODE == -1) {\r\n\t\t\tstack.clear();\r\n\t\t\tstack.push(new EFGString(e.getMessage()));\r\n\t\t\tthrow e;\r\n\t\t}\r\n\t}", "protected void sendError(final String name, final Throwable t) {\n if (name != null) {\n main.post(new Runnable() {\n @Override\n public void run() {\n for (IntWatcher iw : getWatchers(name)) {\n try {\n iw.onError(name, t);\n } catch (Error | Exception t) {\n Log.e(\"SVC\", \"Error while reporting change.\", t);\n sendError(t);\n }\n }\n }\n });\n }\n sendError(t);\n }", "protected void raiseRequestError(Exception e) {\n\t\tmThrowedExceptions.add(e);\n\t}", "public void onIOException(IOException e) {\n\t\t}", "public void objectAdded(NamingEvent evt) throws RemoteException;", "public AuraUnhandledException(String message) {\n super(message);\n }", "@Override\n\tpublic void validateUserName(String name) throws UserException {\n\t\t\n\t}", "public void close() throws NamingException {\n }", "public void inquiryError() {\n\t\t\n\t}", "@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}", "public ResourceNotFoundException(final Object resourceIdentifier) {\n super();\n this.resourceIdentifier = resourceIdentifier;\n }", "private void sqlException(SQLException e) {\n System.err.println(\"SQLException: \" + e.getMessage());\n System.err.println(\"SQLState: \" + e.getSQLState());\n System.err.println(\"VendorError: \" + e.getErrorCode());\n e.printStackTrace();\n// System.exit(-1);\n }", "public CannotInvokeException(ClassNotFoundException e) {\n super(\"by \" + e.toString());\n err = e;\n }", "public NotBoundException(String s){\n\t\t super(s);\n\t }", "public BusinessObjectException(Exception e) {\r\n super( \"\" + e );\r\n }", "public NoMatchingLastNameException(String LastName) {\n\t\t// Call constructor of parent Exception\n\t\tsuper(\"No last name found matching \" + (LastName));\n\t}", "@Override\n protected String handleGetExceptionKey()\n {\n\n final String type = this.getExceptionType();\n final int dotIndex = type.lastIndexOf(\".\");\n\n // the dot may not be the last character\n return StringUtilsHelper.toResourceMessageKey((dotIndex < (type.length() - 1)) ? type.substring(dotIndex + 1) : type);\n\n }", "public void setInvalidName(String invalidName) {\n this.invalidName = invalidName;\n }", "private RaiseException cannotRemoveError(String id) {\n return getRuntime().newNameError(\"cannot remove \" + id + \" for \" + getName(), id);\n }", "public void set_name(String name) throws Exception{\n\t\tthis.name = name;\n\t}", "public void set_name(String name) throws Exception{\n\t\tthis.name = name;\n\t}", "@Override\n public void errorReceived(Exception ex) {\n }", "@Override\n public void errorReceived(Exception ex) {\n }", "public AuraUnhandledException(String message, Location l, Throwable e) {\n super(message, l, e);\n }", "public void onException(Exception e, String path) {\n LOG.warn(\"The element not found by path =>\" + path + \"\\t\" + e.getMessage());\n }", "public void onException(JMSException e) {\n\t\tif (logger == null) {\n\t\t\tlogger = Logger.getLogger(NodeBase.class);\n\t\t}\n\t\t// Don't log these as they might also be ok, for example when sending\n\t\t// to a deleted temp topic\n\t\t// logger.error(e, e);\n\t}", "public void setName(String name) throws Exception;", "void onSynchronizationFailed(SyncException e);", "public void onException(RequestException e);", "public FaultException raise(Throwable e);", "@Test\n\tpublic void testBasicNamingBad() {\n\t\t// \"Bad\" == \"Should throw an exception\"\n\t\tassertNamingException(\"int foo(int a) { return b; }\");\n\t\tassertNamingException(\"int foo(int a) { { int b = 42; } return b; }\");\n\t\tassertNamingException(\"int foo(int a) { { int b = b; int c = 42; } return a; }\");\n\t\tassertNamingException(\"int foo(int a) { int a = 42; return a; }\");\n\t}", "@Override\r\n\tpublic void doException() {\n\r\n\t}", "@Override\n\tpublic void insertUpdate(DocumentEvent e) {\n\t\tvalidateNameField();\n\t}", "@SuppressWarnings(\"unused\")\n\tpublic\n\tvoid stupid(Exception e)\n\t{\n\t\tthis.severe(\"STUPID: \"+e.toString());\n\t}", "public void onErrorImpl(Throwable e) {\n }", "public NotBoundException(){\n\t\t super();\n\t }", "public ObjectNotFoundException() {\r\n super(\"ObjectNotFound Exception\");\r\n }", "void onMessageProcessingRejection(String internalQueueName);", "void mo57276a(Exception exc);", "public HealthInformationExchangeException(String message, Exception e) {\n\t\tsuper(message, e);\n\t}", "protected String getFaultName() {\n return mName;\n }", "public void rethrowException2(String exceptionName) throws FirstException, SecondException {//rethrow FirstException, SecondException\n\t\t\ttry {\n\t\t\t\t\tif (exceptionName.equals(\"First\")) {\n\t\t\t\t\t\t\tthrow new FirstException();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthrow new SecondException();\n\t\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\t\t//This analysis is disabled if the catch parameter is assigned to another value in the catch block.\n\t\t\t\t\t//e = new FirstException();//If you add this line, Compile Error: Unhandled exception type Exception\n\t\t\t\t\tthrow e;\n\t\t\t}\n\t}", "@Test(description = \"negative test for interface update with wrong interface name for TCL procedure 'testParents'\")\n public void exceptionUpdateWrongName()\n {\n final DataCollection data = new DataCollection(this);\n final InterfaceData inter = data.getInterface(\"TestInterface\");\n this.updateFailure(inter.getCIFileName(),\n \"mql mod interface \\\"${NAME}\\\"\\ntestParents -interface \"\n + inter.getName() + \"1\",\n UpdateException_mxJPO.Error.DM_INTERFACE_UPDATE_WRONG_NAME);\n }", "public NombreNuloException() {\n\t\tsuper(\"Nombre de usuario inválido\"); \n\t}", "public DaoException(String arg0) {\r\n\t\tsuper(arg0);\r\n\t}", "@Override\n\tpublic void changedUpdate(DocumentEvent e) {\n\t\tvalidateNameField();\n\t}", "public void onError(Exception e);", "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 }", "private void processAlterIndexRename() throws HsqlException {\n\n String name = tokenizer.getName();\n String schema =\n session.getSchemaNameForWrite(tokenizer.getLongNameFirst());\n\n tokenizer.getThis(Token.T_RENAME);\n tokenizer.getThis(Token.T_TO);\n\n String newName = tokenizer.getName();\n String newSchema = tokenizer.getLongNameFirst();\n\n newSchema = newSchema == null ? schema\n : session.getSchemaNameForWrite(\n newSchema);\n\n boolean isQuoted = tokenizer.wasQuotedIdentifier();\n\n if (!schema.equals(newSchema)) {\n throw Trace.error(Trace.INVALID_SCHEMA_NAME_NO_SUBCLASS);\n }\n\n Table t = database.schemaManager.findUserTableForIndex(session, name,\n schema);\n\n if (t == null) {\n throw Trace.error(Trace.INDEX_NOT_FOUND, name);\n }\n\n database.schemaManager.checkIndexExists(name, t.getSchemaName(), true);\n\n if (HsqlName.isReservedName(name)) {\n throw Trace.error(Trace.SYSTEM_INDEX, name);\n }\n\n if (HsqlName.isReservedName(newName)) {\n throw Trace.error(Trace.BAD_INDEX_CONSTRAINT_NAME, newName);\n }\n\n session.setScripting(true);\n session.commit();\n t.getIndex(name).setName(newName, isQuoted);\n database.schemaManager.renameIndex(name, newName, t.getName());\n }", "@Override\n public void onError(Exception e) {\n\n }", "public void errorOccured(String errorMessage, Exception e);", "public MissingPropertyException(String propertyName){\n\t\tthis.propertyName = propertyName;\n this.alreadyReported = false;\n\t}", "@Override\r\n public boolean isNameProperty() throws Exception\r\n {\n return false;\r\n }", "public void handle(final String symbolicName, final Throwable t, final Logger log) {\r\n\t\tlog.error(t.getMessage(), t);\r\n\r\n\t\tErrorLog error = new ErrorLog();\r\n\t\terror.setCreationDate(new Date());\r\n\t\terror.setBundleId(symbolicName);\r\n\t\terror.setThrowable(t);\r\n\r\n\t\tmodelListener.fireEvent(null, error, LevelType.Exception, ChangeType.Added);\r\n\t}", "public void onException(JMSException exception)\n {\n System.err.println(\"something bad happended: \" + exception);\n }", "public InvalidUsernameException () {\n super();\n }", "public ActionNotRegisteredException() {\n\t\tsuper();\n\t}", "public void onFailure(Throwable caught) {\n SC.say(\"Failed to add the entry : \" + caught.getMessage());\n }", "protected void onBadServer(Throwable e) {\n log.warn(\"Caught exception (maybe server is bad)\", e);\n }", "private void recordUnknownSymbolError(String name, int line, int col)\n {\n addError(\"Use of undefined identifier \" + name, line, col);\n }", "public InvalidOntologyName(String invalidCharacter) {\n super(String.format(\"Ontology name cannot contain %s\", invalidCharacter));\n }" ]
[ "0.611637", "0.5857806", "0.57941765", "0.5718765", "0.57083786", "0.5694052", "0.5649545", "0.56438184", "0.56181806", "0.56140095", "0.55591995", "0.55413324", "0.55405277", "0.5537667", "0.55144405", "0.5465519", "0.5444873", "0.543717", "0.5433064", "0.5419959", "0.54025716", "0.5382149", "0.53592974", "0.5351589", "0.5351589", "0.5338532", "0.5337741", "0.5317323", "0.5313274", "0.5310073", "0.52888346", "0.5282472", "0.526915", "0.5267135", "0.5261255", "0.52511036", "0.5248785", "0.52316236", "0.5217231", "0.52145934", "0.5208592", "0.52052844", "0.519652", "0.5188887", "0.51811993", "0.51510864", "0.5146636", "0.5143047", "0.51355153", "0.51326644", "0.5125755", "0.5120159", "0.51194876", "0.5113314", "0.510782", "0.5098123", "0.50964427", "0.50908685", "0.50842816", "0.50842816", "0.5079137", "0.5079137", "0.5073085", "0.50707954", "0.5068923", "0.506892", "0.50503933", "0.503731", "0.50303894", "0.5029132", "0.5028565", "0.5025497", "0.5017018", "0.5016503", "0.50157106", "0.5012633", "0.5010349", "0.50072724", "0.500672", "0.49982312", "0.49900293", "0.4975339", "0.49744245", "0.4973898", "0.49733105", "0.49688038", "0.4965082", "0.4960954", "0.49580002", "0.49561995", "0.49517274", "0.49454388", "0.4943457", "0.4942928", "0.4941154", "0.49402595", "0.4940234", "0.49401763", "0.493305", "0.4927465" ]
0.86277056
0
TODO Autogenerated method stub
@Override public Product update(Product entity) { return null; }
{ "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
Set the managed object reference type, and value to ServiceInstance.
private void initSvcInstRef() { SVC_INST_REF.setType(SVC_INST_NAME); SVC_INST_REF.setValue(SVC_INST_NAME); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void setServiceType(String serviceType);", "void setClassOfService(ClassOfService serviceClass);", "public void set(String serverId,T object)\r\n\t{\r\n\t\tinstances.put(serverId, object);\r\n\t}", "public void setService(Service value) {\n\t\tthis._service = value;\n\t}", "public void setTypeOfService(String typeOfService){\n\tthis.typeOfService=typeOfService;\n}", "public ServiceType setActualServiceType(ServiceType service){\r\n\t\tthis.serviceTypeInUse = service;\r\n\t\treturn this.serviceTypeInUse;\r\n\t}", "@Override\n public void modifiedService(ServiceReference<ManagedService> reference, ManagedService service) {\n }", "public void setReferenceService(ReferenceService referenceService){\n\t\tthis.referenceService = referenceService;\n\t}", "public void setTargetObjectClass(ClassDefinitionDMO value) {\n DmcAttribute<?> attr = get(DmpDMSAG.__targetObjectClass);\n if (attr == null)\n attr = new DmcTypeClassDefinitionREFSV(DmpDMSAG.__targetObjectClass);\n else\n ((DmcTypeClassDefinitionREFSV)attr).removeBackReferences();\n \n try{\n attr.set(value);\n set(DmpDMSAG.__targetObjectClass,attr);\n }\n catch(DmcValueException ex){\n throw(new IllegalStateException(\"The type specific set() method shouldn't throw exceptions!\",ex));\n }\n }", "public void setServiceType(Integer serviceType) {\r\n this.serviceType = serviceType;\r\n }", "private void setService(Service service) {\n this.service = service;\n }", "public void setServiceRef(IntegrationAppmasterService<?> serviceRef) {\n\t\tthis.serviceRef = serviceRef;\n\t}", "public void setTypeOfService(String typeOfService){\n\t\tthis.typeOfService=typeOfService;\n\t}", "public Builder setService(go.micro.runtime.RuntimeOuterClass.Service value) {\n if (serviceBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n service_ = value;\n onChanged();\n } else {\n serviceBuilder_.setMessage(value);\n }\n\n return this;\n }", "public Builder setService(go.micro.runtime.RuntimeOuterClass.Service value) {\n if (serviceBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n service_ = value;\n onChanged();\n } else {\n serviceBuilder_.setMessage(value);\n }\n\n return this;\n }", "public Builder setService(go.micro.runtime.RuntimeOuterClass.Service value) {\n if (serviceBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n service_ = value;\n onChanged();\n } else {\n serviceBuilder_.setMessage(value);\n }\n\n return this;\n }", "public void setServiceValue(YangString serviceValue) throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"service\",\n serviceValue,\n childrenNames());\n }", "public void setServiceValue(YangString serviceValue) throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"service\",\n serviceValue,\n childrenNames());\n }", "public void setTargetObjectClass(Object value) throws DmcValueException {\n DmcTypeClassDefinitionREFSV attr = (DmcTypeClassDefinitionREFSV) get(DmpDMSAG.__targetObjectClass);\n if (attr == null)\n attr = new DmcTypeClassDefinitionREFSV(DmpDMSAG.__targetObjectClass);\n else\n attr.removeBackReferences();\n \n attr.set(value);\n set(DmpDMSAG.__targetObjectClass,attr);\n }", "public export.serializers.avro.DeviceInfo.Builder setService(java.lang.CharSequence value) {\n validate(fields()[1], value);\n this.service = value;\n fieldSetFlags()[1] = true;\n return this;\n }", "public void setDataObjectService(DataObjectService dataObjectService) {\n this.dataObjectService = dataObjectService;\n }", "public void setServiceType(typekey.ReviewServiceType value);", "public final native void setObjectType(String type) /*-{\n\t\t\tthis.beanName = type;\n\t\t}-*/;", "public final native void setObjectType(String type) /*-{\n\t\tthis.beanName = type;\n\t}-*/;", "@Override\n public void setBusinessObjectService(BusinessObjectService businessObjectService) {\n this.businessObjectService = businessObjectService;\n }", "public final void setService(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String service)\r\n\t{\r\n\t\tgetMendixObject().setValue(context, MemberNames.Service.toString(), service);\r\n\t}", "@Override\n public void modifiedService(ServiceReference<ManagedServiceFactory> reference,\n ManagedServiceFactory service) {\n }", "public Binding setReference(IDatatype theValue) {\n\t\tmyReference = theValue;\n\t\treturn this;\n\t}", "public void setInstanceNumber(java.lang.Integer value) {\n __getInternalInterface().setFieldValue(INSTANCENUMBER_PROP.get(), value);\n }", "public void setAuthService(AccountService.ServiceType serviceType) throws NoSuchFieldException, IllegalAccessException \n {\n accountService.verify();\n accountService.switchService(serviceType);\n }", "@Override\r\n\tpublic void modifiedService(ServiceReference<T> reference, ServletContextHelperElement service) {\n\t}", "public void setReference (SoftReference ref)\r\n {\r\n _reference = ref;\r\n }", "public void setServiceValue(String serviceValue) throws JNCException {\n setServiceValue(new YangString(serviceValue));\n }", "public void setServiceValue(String serviceValue) throws JNCException {\n setServiceValue(new YangString(serviceValue));\n }", "void xsetServiceId(com.microsoft.schemas._2003._10.serialization.Guid serviceId);", "public void setInstanceNumber(java.lang.Integer value) {\n __getInternalInterface().setFieldValue(INSTANCENUMBER_PROP.get(), value);\n }", "public void setValue(final Object value) { _value = value; }", "public SeriesInstance setType(StringDt theValue) {\n\t\tmyType = theValue;\n\t\treturn this;\n\t}", "public void setValue(org.apache.xmlbeans.XmlObject value)\n {\n generatedSetterHelperImpl(value, VALUE$2, 0, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_SINGLETON);\n }", "protected abstract ServiceObjectType getServiceObjectType();", "public void elSetReference(Object bean);", "public void setValue(Object value) { this.value = value; }", "public T set(T obj);", "public void setObj(com.vmware.converter.ManagedObjectReference obj) {\r\n this.obj = obj;\r\n }", "public void setValue(Object o){\n \tthis.value = o;\n }", "public void setObjProcess(final T objProcess) {\n this.objProcess = objProcess;\n }", "public void setClassObject(Object obj)\n\n {\n\n this.classObject = obj;\n\n }", "public void setService(java.lang.CharSequence value) {\n this.service = value;\n }", "@Override\n\t\tpublic void setService(String system_id) throws RemoteException {\n\t\t\tSystem.out.println(\"set service invoke on \" + system_id);\n\t\t}", "void setValue(Object value);", "public void setService(Text newService) {\n service = newService;\n }", "public native void set(T value);", "public void setObjectReferenceImpl(ObjectReferenceImpl objectReferenceImpl) {\n this.objectReference = objectReferenceImpl;\n }", "public abstract void setServiceName(String serviceName);", "@Override\n\tpublic void setValue(Object object) {\n\n\t}", "public void setService(String service) {\n this.service = service;\n }", "public void setValue(Object value) {\n this.value = value;\n }", "public static void set(Class clazz, String variableName, Object value) throws ReflectionException {\n\t\tset(clazz, null, variableName, value);\n\t}", "synchronized public static void setInstance(SampletypeManager instance)\n {\n singleton = instance;\n }", "@Override\n\tpublic void setValue(Object object) {\n\t\t\n\t}", "public void setValue(Object value);", "public void elSetValue(Object bean, Object value, boolean populate, boolean reference);", "public abstract void setService(OntologyGenerationComponentServiceInterface<T,R> service);", "void setValue(Object object, Object value);", "public void setValue(T value) {\n this.value = value;\n }", "public void setObject(T object)\n\t{\n\t\tthis.object = object;\n\t}", "public void setBusinessObjectService(BusinessObjectService businessObjectService) {\r\n this.businessObjectService = businessObjectService;\r\n }", "public MutableReference set(T value) {\n this.value = value;\n return this;\n }", "public void setInstanceType(String instanceType) {\n this.instanceType = instanceType;\n }", "public void setObjectClass(Class objectAPI)\n {\n _objectClass = objectAPI;\n }", "public void setProviderTypeService(ProviderTypeService providerTypeService) {\n this.providerTypeService = providerTypeService;\n }", "public void setService(CentralSystemServiceFactory service) {\n\t\tthis.service = service;\n\t}", "private void setValueObject(Object object, Object value) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException, SecurityException, NoSuchMethodException{\n\t\tthis.methodSet.invoke(object, value);\n\t}", "public Builder setService(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n service_ = value;\n onChanged();\n return this;\n }", "public Builder setService(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n service_ = value;\n onChanged();\n return this;\n }", "public Builder setService(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n service_ = value;\n onChanged();\n return this;\n }", "public void setBusinessObjectService(BusinessObjectService businessObjectService) {\n this.businessObjectService = businessObjectService;\n }", "public void setBusinessObjectService(BusinessObjectService businessObjectService) {\n this.businessObjectService = businessObjectService;\n }", "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 }", "protected <T> void setSharedContextVariable(String name, Class<T> type, T value) {\r\n T typedValue = TypeCastUtility.castValue(value, type);\r\n m_sharedVariableMap.put(name, typedValue);\r\n }", "protected void setValue(T value) {\r\n this.value = value;\r\n }", "public void setValue(Object value)\r\n {\r\n m_value = value;\r\n }", "public void setServiceClass(java.lang.String serviceClass) {\n this.serviceClass = serviceClass;\n }", "@Override\n\tpublic void setType(Type t) {\n\t\theldObj.setType(t);\n\t}", "public static void setInstance(IdServer inInstance) {\n\t\tserver = inInstance;\n\t}", "@Override\n\tpublic void setValue(Object value) {\n\t\t\n\t}", "public final void setService(java.lang.String service)\r\n\t{\r\n\t\tsetService(getContext(), service);\r\n\t}", "public\tvoid setobject(object obj) {\r\n\t\t oop.value=obj.value;\r\n\t\t oop.size=obj.size;\r\n\t\t \r\n\t}", "public void setService (String service) {\n\t this.service = service;\n\t}", "public void setServiceImpl(Class<AppmasterService> serviceImpl) {\n\t\tthis.serviceImpl = serviceImpl;\n\t}", "public void setValue(T value) {\n\t\tthis.value = value;\n\t}", "public void setValue(T value) {\n\t\tthis.value = value;\n\t}", "public void setServiceID(java.lang.String serviceID)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(SERVICEID$6, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(SERVICEID$6);\n }\n target.setStringValue(serviceID);\n }\n }", "void setClassType(String classType);", "void setObjectValue(Object dataObject);", "public void setInstanceType(String InstanceType) {\n this.InstanceType = InstanceType;\n }", "public void setService(String service) {\n this.service = service;\n }", "public void setService(String service) {\n this.service = service;\n }", "public void setService(String service) {\n this.service = service;\n }", "public void setValueClass(Class<? extends Type> valueClass) {\n this.valueClass = valueClass;\n }" ]
[ "0.62541187", "0.61381406", "0.608214", "0.6029017", "0.5930166", "0.5818731", "0.576544", "0.5761448", "0.5757189", "0.5707279", "0.56359833", "0.5631953", "0.56137913", "0.55771106", "0.55771106", "0.55771106", "0.5561273", "0.5561273", "0.55448127", "0.5519622", "0.5509091", "0.5506147", "0.5430998", "0.5415685", "0.54000217", "0.5391237", "0.5384853", "0.5376179", "0.533371", "0.5319076", "0.53115016", "0.5311025", "0.53094727", "0.53094727", "0.5289593", "0.5278308", "0.52090555", "0.5206412", "0.5204963", "0.52049434", "0.5203886", "0.518127", "0.51787585", "0.5177881", "0.5176652", "0.51765716", "0.5170003", "0.5167377", "0.5163821", "0.5157859", "0.51475686", "0.5142142", "0.5125417", "0.51247746", "0.5123137", "0.51214665", "0.5120295", "0.51150465", "0.51149905", "0.51144516", "0.5113312", "0.5102103", "0.50965244", "0.50953645", "0.5090347", "0.50901157", "0.5088983", "0.5084954", "0.5083463", "0.5080504", "0.5078845", "0.5074427", "0.50615376", "0.5057902", "0.5057902", "0.5057902", "0.5052666", "0.5052666", "0.504988", "0.5049517", "0.5042656", "0.5042653", "0.50423145", "0.5035851", "0.50224525", "0.50208914", "0.5007107", "0.5004058", "0.49923795", "0.49899918", "0.49873272", "0.49873272", "0.49798125", "0.49797457", "0.4975333", "0.4973824", "0.49704152", "0.49704152", "0.49704152", "0.49650246" ]
0.59235597
5
Establishes session with the virtual center server.
public void connect() throws Exception { HostnameVerifier hv = new HostnameVerifier() { @Override public boolean verify(String urlHostName, SSLSession session) { return true; } }; trustAllHttpsCertificates(); HttpsURLConnection.setDefaultHostnameVerifier(hv); // These following methods have to be called in this order. initSvcInstRef(); initVimPort(); initServiceContent(); vimPort.login(serviceContent.getSessionManager(), user, password, null); initPropertyCollector(); initRootFolder(); isConnected = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setupSession() {\n // TODO Retreived the cached Evernote AuthenticationResult if it exists\n// if (hasCachedEvernoteCredentials) {\n// AuthenticationResult result = new AuthenticationResult(authToken, noteStoreUrl, webApiUrlPrefix, userId);\n// session = new EvernoteSession(info, result, getTempDir());\n// }\n ConnectionUtils.connectFirstTime();\n updateUiForLoginState();\n }", "public void startSession(){\n sessionID = client.startSession();\n \n //Get system temporary files path\n String temporaryPath = System.getProperty(\"java.io.tmpdir\").replaceAll(\"\\\\\\\\\",\"/\");\n \n //If temporary file path does not end with /, add it\n if(!temporaryPath.endsWith(\"/\"))\n temporaryPath = temporaryPath + \"/\";\n \n //Create session directory\n sessionDirectory = new File(temporaryPath+sessionID);\n sessionDirectory.mkdir();\n \n }", "private void setupCustomerSession() {\n CustomerSession.initCustomerSession(\n new SampleStoreEphemeralKeyProvider(\n new SampleStoreEphemeralKeyProvider.ProgressListener() {\n @Override\n public void onStringResponse(String string) {\n if (string.startsWith(\"Error: \")) {\n new AlertDialog.Builder(StoreActivity.this).setMessage(string).show();\n }\n }\n }));\n }", "public void connect() throws OOBException {\n \t\tlog.debug(\"enter to connect \");\n \t\tJSch jsch = new JSch();\n \t\ttry {\n\t\t\tjsch.addIdentity(PRIVATE_KEY, PASSPHRASE);\n \t\t\tjsch.setKnownHosts(KNOWN_HOSTS);\n \t\t\tlog.debug(\"user \" + user + \"host : \" + host);\n \t\t\tsession = jsch.getSession(user, host, 22);\n \t\t\tsession.connect();\n \t\t} catch (JSchException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t}", "public abstract Thread startSession();", "Session begin();", "public Session() {\n\t\tLogger.log(\"Creating application session\");\n\t}", "protected final void openSession() {\n openSessionForRead(null, null);\n }", "private void doLogin() {\n\t\tSharedPreferences.Editor prefEditor = mSP.edit();\n\t\tSession.FirstLogin = true;\n\t\tmUserPin = et_password.getText().toString();\n\t\t// Time to update the session\n\t\tif (inTruckMode) {\n\t\t\tSession.setVehicle(vehicle);\n\t\t\tSession.setDriver(userDao.getByPin(mUserPin));\n\n\t\t\tprefEditor.putString(Config.VEHICLE_ID_KEY, vehicle.getId());\n\t\t\tprefEditor.putString(Config.LAST_VEHICLE_KEY, vehicle.getId());\n\t\t\tprefEditor.putString(Config.SITE_ID_KEY, null);\n\n\t\t\tSession.setType(SessionType.VEHICLE_SESSION);\n\t\t} else {\n\t\t\tSession.setSite(site);\n\t\t\tSession.setDriver(userDao.getByPin(mUserPin));\n\n\t\t\tprefEditor.putString(Config.VEHICLE_ID_KEY, null);\n\t\t\tprefEditor.putString(Config.LAST_VEHICLE_KEY, null);\n\t\t\tprefEditor.putString(Config.SITE_ID_KEY, site.getId());\n\n\t\t\tSession.setType(SessionType.SITE_SESSION);\n\t\t}\n\n\t\tstartupSync();\n\t\tstartSync();\n\n\t\tprefEditor.putString(Config.USER_PIN_KEY, mUserPin);\n\t\tprefEditor.putString(Config.LAST_USER_PIN_KEY, mUserPin);\n\t\tprefEditor.putString(Config.SYNC_SERVICE_KEY, \"yes\");\n\t\tprefEditor.commit();\n\n\t\t// if no VIMEI associated with truck, starting GPSService on SB device\n\t\tif (!vehiclesDao.xergoEsn(getApplicationContext())) {\n\t\t\tvimei = vehiclesDao.getVimei(this);\n\n\t\t\tIntent intent = new Intent();\n\t\t\tintent.setAction(GPSService.UPDATE_IMEI_EVENT);\n\t\t\tintent.putExtra(\"Value\", vimei);\n\t\t\tsendBroadcast(intent);\n\n\t\t\tintent = new Intent();\n\t\t\tintent.setAction(GPSService.SEND_IGNITION_ON_EVENT);\n\t\t\tsendBroadcast(intent);\n\t\t}\n\n\t\tstartSession(mUserPin);\n\t\tIntent intent = new Intent(this, MapActivity.class);\n\t\tthis.startActivity(intent);\n\t\tfinish();\n\t}", "private void login() {\n setCredentials();\n setSysProperties();\n\n Properties sysProperties = System.getProperties();\n sysProperties.put(\"mail.store.protocol\", \"imaps\");\n this.session = Session.getInstance(sysProperties,\n new Authenticator() {\n @Override\n protected PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(username, password);\n }\n });\n }", "DatastoreSession createSession();", "private void startNewSession() {\n final FragmentTransaction ft = getFragmentManager().beginTransaction();\n Fragment sessionFragment = null;\n if (mCurrentExperiment.hasSAM()) {\n sessionFragment = new SAMSessionFragment();\n }\n // if there's not hte sam, we start directly with the NASA\n else if (mCurrentExperiment.hasNASATLX()) {\n sessionFragment = new NASATLXSessionFragment();\n }\n ft.replace(R.id.main_content_frame, sessionFragment);\n ft.commit();\n }", "public void launchNewSession(){\r\n framework.launchNewMAV(getArrayMappedToData(), this.experiment, \"Multiple Experiment Viewer - Cluster Viewer\", Cluster.GENE_CLUSTER);\r\n }", "void open(SessionParameters sessionParameters, AuthenticationParameters authenticationParameters);", "public void store() {\n session=(HttpSession)getPageContext().getSession();\n session.setAttribute(\"remoteUser\", getRemoteUser());\n session.setAttribute(\"authCode\", getAuthCode());\n }", "void sessionCreated(SessionEvent se);", "@Override\n public void activate() {\n if ( ! prepared)\n prepare();\n\n validateSessionStatus(session);\n ApplicationId applicationId = session.getApplicationId();\n try (ActionTimer timer = applicationRepository.timerFor(applicationId, \"deployment.activateMillis\")) {\n TimeoutBudget timeoutBudget = new TimeoutBudget(clock, timeout);\n if ( ! timeoutBudget.hasTimeLeft()) throw new RuntimeException(\"Timeout exceeded when trying to activate '\" + applicationId + \"'\");\n\n RemoteSession previousActiveSession;\n CompletionWaiter waiter;\n try (Lock lock = tenant.getApplicationRepo().lock(applicationId)) {\n previousActiveSession = applicationRepository.getActiveSession(applicationId);\n waiter = applicationRepository.activate(session, previousActiveSession, applicationId, ignoreSessionStaleFailure);\n }\n catch (RuntimeException e) {\n throw e;\n }\n catch (Exception e) {\n throw new InternalServerException(\"Error when activating '\" + applicationId + \"'\", e);\n }\n\n waiter.awaitCompletion(timeoutBudget.timeLeft());\n log.log(Level.INFO, session.logPre() + \"Session \" + session.getSessionId() + \" activated successfully using \" +\n hostProvisioner.map(provisioner -> provisioner.getClass().getSimpleName()).orElse(\"no host provisioner\") +\n \". Config generation \" + session.getMetaData().getGeneration() +\n (previousActiveSession != null ? \". Based on session \" + previousActiveSession.getSessionId() : \"\") +\n \". File references: \" + applicationRepository.getFileReferences(applicationId));\n }\n }", "public void startSession() {\n\t\tSystem.out.println(\"Creating Board\");\n\t\tthis.board = new Board(schoolClass.getTeams(), schoolClass.getClassDeck());\n\t\tSystem.out.println(\"Setting Team Positions.\");\n\t\tinitializeTeamPositions();\n\t\tSystem.out.println(\"Clearing Up To Date Status.\");\n\t\tupToDateIds = new ArrayList<Integer>();\n\t\tteamChallengeOrder = new ArrayList<Integer>();\n\t\tchallengeChains = new HashMap<Integer, Chain>();\n\t\tchallengeSubmissionStatus = new HashMap<Integer, Boolean>();\n\t\tthis.setSessionState(SessionState.PlayerTurn);\n\t}", "public void sessionStarted() {\n\t\t\r\n\t}", "@Override\n\t\t\tpublic void handleNewSession() throws Exception {\n\t\t\t\t\n\t\t\t}", "private Session session(Properties props) {\n return Session.getInstance(props,\n new Authenticator() {\n protected PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(\"[email protected]\", \"happinessbarometer2014\");\n }\n }\n );\n }", "static void beginNewSession() {\n SESSION_ID = null;\n Prefs.INSTANCE.setEventPlatformSessionId(null);\n\n // A session refresh implies a pageview refresh, so clear runtime value of PAGEVIEW_ID.\n PAGEVIEW_ID = null;\n }", "@Override\n public CreateSessionResponse createSession()\n throws EwalletException {\n return null;\n }", "public void testCreateSession() throws Exception {\n assertNotNull(mSession.getSessionToken());\n assertFalse(\"New session should not be active\", mSession.isActive());\n\n // Verify by getting the controller and checking all its fields\n MediaController controller = mSession.getController();\n assertNotNull(controller);\n verifyNewSession(controller, TEST_SESSION_TAG);\n }", "IDAOSession createNewSession();", "public void sessionCreated(IoSession session) {\r\n\t\tServerLogger.log(\"Session created...\" + session, Constants.DEBUG);\r\n\t\tsession.getConfig().setIdleTime(IdleStatus.BOTH_IDLE, 5);\r\n\t}", "public void setupSession(UserMstEx userMstEx) {\n\n setUserSeq(userMstEx.getUserSeq());\n setUserAccount(userMstEx.getUserAccount());\n setUserName(userMstEx.getUserName());\n setUserLocale(userMstEx.getUserLocale());\n setUserTimezone(userMstEx.getUserTimezone());\n setUserCurrency(userMstEx.getUserCurrency());\n setUserSubMenuRole(userMstEx.getUserSubMenuRole());\n\n }", "@Override\r\n public void start(OpProjectSession session) {\n OpBroker broker = session.newBroker();\r\n try {\r\n if (session.administrator(broker) == null) {\r\n OpUserService.createAdministrator(broker);\r\n }\r\n if (session.everyone(broker) == null) {\r\n OpUserService.createEveryone(broker);\r\n }\r\n\r\n //register system objects with Backup manager\r\n OpBackupManager.addSystemObjectIDQuery(OpUser.ADMINISTRATOR_NAME, OpUser.ADMINISTRATOR_ID_QUERY);\r\n OpBackupManager.addSystemObjectIDQuery(OpGroup.EVERYONE_NAME, OpGroup.EVERYONE_ID_QUERY);\r\n }\r\n finally {\r\n broker.closeAndEvict();\r\n }\r\n }", "static void startSession() {\n /*if(ZeTarget.isDebuggingOn()){\n Log.d(TAG,\"startSession() called\");\n }*/\n if (!isContextAndApiKeySet(\"startSession()\")) {\n return;\n }\n final long now = System.currentTimeMillis();\n\n runOnLogWorker(new Runnable() {\n @Override\n public void run() {\n logWorker.removeCallbacks(endSessionRunnable);\n long previousEndSessionId = getEndSessionId();\n long lastEndSessionTime = getEndSessionTime();\n if (previousEndSessionId != -1\n && now - lastEndSessionTime < Constants.Z_MIN_TIME_BETWEEN_SESSIONS_MILLIS) {\n DbHelper dbHelper = DbHelper.getDatabaseHelper(context);\n dbHelper.removeEvent(previousEndSessionId);\n }\n //startSession() can be called in every activity by developer, hence upload events and sync datastore\n // only if it is a new session\n //syncToServerIfNeeded(now);\n startNewSessionIfNeeded(now);\n\n openSession();\n\n // Update last event time\n setLastEventTime(now);\n //syncDataStore();\n //uploadEvents();\n\n }\n });\n }", "public boolean setupStartSession() { \n\t\tthis.showNamedMessage(\"Initiating session with server...\");\n\t\ttry {\n\t\t\twhile (!this.requestSession()) {\n\t\t\t\ttextUI.getBoolean(\"Try again?\");\n\t\t\t}\n\t\t} catch (IOException | PacketException | UtilDatagramException e) {\n\t\t\ttextUI.showError(\"Something went wrong while starting the session: \" \n\t\t\t\t\t+ e.getLocalizedMessage());\n\t\t}\n\t\t\n\t\treturn this.sessionActive;\n\t}", "public abstract void initialize(ISession session);", "@Override\n\tpublic Session createSession(SessionBasicInfo sessionBasicInfo) {\n\t\tSession session = sessionStore.createSession( sessionBasicInfo);\n\t\tif(session == null)\n\t\t\treturn null;\n\t\tsession._setSessionStore(this);\n\t\tsession.putNewStatus();\n\t\t\n\t\treturn session;\n\t}", "@Override\n public void onCreate(SessionID sessionID) {\n LOG.info(\"Server: onCreate \" + sessionID.toString());\n }", "public ControlCenter(){\n serverConnect = new Sockets();\n serverConnect.startClient(\"127.0.0.1\", 5000);\n port = 5000;\n }", "public void startSession() throws UnsupportedEncodingException\r\n {\n clientReader.setStopped(false);\r\n shellOutputWriter.setStopped(false);\r\n // shellErrorWriter.setStopped(false);\r\n shellExitListener.setStopped(false);\r\n tunnelsHandler.getConnection().setControlInputStream(connection.getTunnelControlInputStream());\r\n tunnelsHandler.getConnection().setControlOutputStream(connection.getTunnelControlOutputStream());\r\n tunnelsHandler.getConnection().setDataInputStream(connection.getMultiplexedConnectionInputStream());\r\n tunnelsHandler.getConnection().setDataOutputStream(connection.getMultiplexedConnectionOutputStream());\r\n // socksTunnelsHandler.getConnection().setControlOutputStream(connection.getSocksControlOutputStream());\r\n // socksTunnelsHandler.getConnection().setControlInputStream(connection.getSocksControlInputStream());\r\n // socksTunnelsHandler.getConnection().setDataInputStream(connection.getMultiplexedConnectionInputStream());\r\n // socksTunnelsHandler.getConnection().setDataOutputStream(connection.getMultiplexedConnectionOutputStream());\r\n pingService.setInputStream(connection.getPingInputStream());\r\n pingService.setOutputStream(connection.getPingOutputStream());\r\n // tunnelHandler.getConnection().start();\r\n }", "public void logon ()\n {\n ClientResolutionListener clr = new ClientResolutionListener() {\n public void clientResolved (Name username, ClientObject clobj) {\n // fake up a bootstrap; I need to expose the mechanisms in\n // Presents that create it in a network environment\n BootstrapData data = new BootstrapData();\n data.clientOid = clobj.getOid();\n data.services = EditorServer.invmgr.bootlist;\n\n // and configure the client to operate using the server's\n // distributed object manager\n _client.getContext().getClient().gotBootstrap(\n data, EditorServer.omgr);\n }\n\n public void resolutionFailed (Name username, Exception reason) {\n log.log(Level.WARNING, \"Failed to resolve client [who=\" +\n username + \"].\", reason);\n // TODO: display this error\n }\n };\n EditorServer.clmgr.resolveClientObject(new Name(\"editor\"), clr);\n }", "private Session establishSession(String sessionid) throws AxisFault {\n Session s = sessionManager.getSession(sessionid);\n\n if (s == null) {\n throw new AxisFault(\"Session \\\"\" + sessionid + \"\\\" is not active\");\n }\n s.setActive();\n sessionManager.setCurrentSession(s);\n return s;\n }", "DatabaseSession openSession();", "public InitialValuesConnectionCenter() \n\t{\n\t\ttry {\n\t\t\tserverSocket = new ServerSocket(PORT);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"IOException ServerConnectionCenter.\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public boolean startSession() {\n boolean success = true;\n if (sc == null) {\n sc = new Scanner(System.in);\n }\n if (sqlMngr == null) {\n sqlMngr = SQLController.getInstance();\n }\n try {\n success = sqlMngr.connect(this.getCredentials());\n } catch (ClassNotFoundException e) {\n success = false;\n System.err.println(\"Establishing connection triggered an exception!\");\n e.printStackTrace();\n sc = null;\n sqlMngr = null;\n }\n return success;\n }", "protected abstract SESSION newSessionObject() throws EX;", "void startSession(@Nullable Callback<Session> callback);", "@Override\n\tpublic void createSession(String customer) {\n\t\t\n\t}", "public void testSSOPassiveWithSession(@Nullable final BrowserData browserData) throws Exception {\n\n startSeleniumClient(browserData);\n\n startServer();\n\n startFlow();\n\n waitForLoginPage();\n\n login();\n\n // attribute release\n\n waitForAttributeReleasePage();\n\n releaseAllAttributes();\n\n rememberConsent();\n\n submitForm();\n\n // response\n\n waitForResponsePage();\n\n validateResponse();\n\n // isPassive\n\n driver.get(getBaseURL() + isPassiveRequestURLPath);\n\n // response\n\n waitForResponsePage();\n\n validateResponse();\n }", "@Override\n\tpublic void onStart(Session session) {\n\t\tlogger.info(\"onStart session created:id= {}, begin at {}\", session.getId(), session.getStartTimestamp());\n\t}", "private void startAuth() {\n if (ConnectionUtils.getSessionInstance().isLoggedIn()) {\n ConnectionUtils.getSessionInstance().logOut();\n } else {\n ConnectionUtils.getSessionInstance().authenticate(this);\n }\n updateUiForLoginState();\n }", "public void createSession(HttpServletRequest request) {\n\n session = request.getSession();\n writeSessionMessage(session);\n }", "void onOpenSession(Session session);", "public void signIn()\r\n {\r\n FoodCenterRequestFactory factory = AndroidRequestUtils.getFoodCenterRF(context);\r\n ClientServiceRequest service = factory.getClientService();\r\n\r\n service.login(regId).fire(this);\r\n }", "public Session(String username, String pwd, String hostname){\n this.username = username;\n this.pwd = pwd;\n this.hostname = hostname;\n }", "private void refreshSession() {\n\t\ttry {\n\t\t\tAuthenticationUtils.endSession();\n\t\t\tAuthenticationUtils.startSession(endpointUser, endpointPassword);\n\t\t} catch(Throwable e) {\n\t\t\tLOG.error(\"Error refreshing session\", e);\n\t\t}\n\t}", "@Test\n public void testStartSession() {\n startSession();\n }", "public void createSession(int uid);", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n Session.StatusCallback callback = new DefaultSessionStatusCallback();\n sessionTracker = new SessionTracker(this, callback);\n if (savedInstanceState != null) {\n Session session = Session.restoreSession(this, null, callback, savedInstanceState);\n if (session != null) {\n if (savedInstanceState.getBoolean(SESSION_IS_ACTIVE_KEY)) {\n if (Session.getActiveSession() == null) {\n Session.setActiveSession(session);\n }\n } else {\n sessionTracker.setSession(session);\n }\n }\n }\n }", "private void openSession() {\n \t\tmSession = new ApplicationSession(mCastContext, mSelectedDevice);\n \n \t\tint flags = 0;\n \n \t\t// Comment out the below line if you are not writing your own\n \t\t// Notification Screen.\n \t\tflags |= ApplicationSession.FLAG_DISABLE_NOTIFICATION;\n \n \t\t// Comment out the below line if you are not writing your own Lock\n \t\t// Screen.\n \t\tflags |= ApplicationSession.FLAG_DISABLE_LOCK_SCREEN_REMOTE_CONTROL;\n \t\tmSession.setApplicationOptions(flags);\n \n \t\tmSession.setListener(new com.google.cast.ApplicationSession.Listener() {\n \n \t\t\t@Override\n \t\t\tpublic void onSessionStarted(ApplicationMetadata appMetadata) {\n \t\t\t\tApplicationChannel channel = mSession.getChannel();\n \t\t\t\tif (channel == null) {\n \t\t\t\t\treturn;\n \t\t\t\t}\n \n \t\t\t\ttry {\n \t\t\t\t\tif (simpleWebServer == null) {\n \t\t\t\t\t\tsimpleWebServer = new SimpleWebServer(null, 1993,\n \t\t\t\t\t\t\t\tAndroidFileCache\n \t\t\t\t\t\t\t\t\t\t.getCacheDirectory(MainActivity.this),\n \t\t\t\t\t\t\t\ttrue);\n \t\t\t\t\t\tsimpleWebServer.start();\n \t\t\t\t\t}\n \n \t\t\t\t\tmMessageStream = new MediaProtocolMessageStream();\n \t\t\t\t\tchannel.attachMessageStream(mMessageStream);\n \n \t\t\t\t\tloadMedia(currentPage);\n \t\t\t\t} catch (IOException e) {\n \t\t\t\t\te.printStackTrace();\n \n \t\t\t\t\tshowCrouton(R.string.chromecast_failed, null,\n \t\t\t\t\t\t\tAppMsg.STYLE_ALERT);\n \t\t\t\t}\n \t\t\t}\n \n \t\t\t@Override\n \t\t\tpublic void onSessionStartFailed(SessionError error) {\n \t\t\t\tshowCrouton(R.string.chromecast_failed, null,\n \t\t\t\t\t\tAppMsg.STYLE_ALERT);\n \t\t\t}\n \n \t\t\t@Override\n \t\t\tpublic void onSessionEnded(SessionError error) {\n \t\t\t}\n \t\t});\n \n \t\ttry {\n \t\t\tmSession.startSession(\"c529f89e-2377-48fb-b949-b753d9094119\");\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t}", "@Override\r\n\t\tpublic Session newSession(Request request, Response response) {\n\t\t\tLoginSession session = new LoginSession(request);\r\n\t\t\tsession.authenticate(\"scott\", \"tiger\");\r\n\t\t\t\r\n\t\t\treturn session;\r\n\t\t}", "public void sessionCreated(HttpSessionEvent sessionEvent) {\n\t\tHttpSession session = sessionEvent.getSession();\n\t\tDate date = new Date();\n\t\tSystem.out.println(\">>> Created Session : [\" + session.getId() + \"] at [\" + date.toString() + \"] <<<\"); \n\t\tSystem.out.println(\">>> getMaxInactiveInterval : [\" + session.getMaxInactiveInterval() + \" ] <<<\"); \n\t}", "public McqOfficialSession(){\n\t\tsuper(); \n\t}", "public void sessionCreated(IoSession session) { }", "public Session(){\n\t\tdb = ALiteOrmBuilder.getInstance().openWritableDatabase();\n\t\texternalsCallbacks = new ArrayList<EntityListener>();\n\t}", "public void establishConnection() {\n httpNetworkService = new HTTPNetworkService(handler);\n }", "private void initSession(HttpServletRequest request, HttpServletResponse response) throws IOException {\n // create new seassion for user\n HttpSession session = request.getSession();\n if (session != null) {\n _sessionId = session.getId();\n }\n\n response.getWriter().write(_sessionId);\n }", "@Override\n\tpublic void sessionCreated(HttpSessionEvent arg0) {\n\t\tlog.info(\"------ sessionListen init------\");\n\t\tlog.info(arg0.getSession().getId());\n\t}", "void markAsUserSession();", "@Override\n public void onCreateSuccess(SessionDescription sessionDescription) {\n }", "@Override\n public void onCreateSuccess(SessionDescription sessionDescription) {\n }", "DefaultSession createSession(String id);", "private void authenticateSimulatedDevice() {\n mSimulatedDevice.writeln(TestsConfig.deviceWelcome.toString());\n TestsConfig.delay(300);\n \n // check if everything is ok, and get the device instance\n mDeviceInstance = mMainServer.getDevice(\n TestsConfig.deviceWelcome.getString(\"identifier\"));\n assertNotNull(mDeviceInstance);\n }", "public void login(){\n JSONObject clientInfo = new JSONObject();\n try{\n clientInfo.put(\"username\", mUsername);\n clientInfo.put(\"password\", mPassword);\n clientInfo.put(\"deviceID\", getDeviceID());\n clientInfo.put(\"ipAddress\", getClientIP());\n mSocket.emit(\"login\", clientInfo);\n }catch(JSONException ex){\n throw new RuntimeException(ex);\n }\n }", "public void startSessionClick(View view)\n {\n Random rand = new Random();\n int id = rand.nextInt(10000);\n\n //what kind of session is this? Check the variable and create an object\n FeedbackSession mySession = new FeedbackSession();\n\n //set the ID\n mySession.setSessionId(id);\n\n //set the session as created now\n mySession.setDateCreated();\n\n //set the session type that the user chose\n mySession.setSessionType(sessionType);\n\n //new session filename\n String filename = Integer.toString(id);\n File file = new File(getFilesDir() + \"/\" + filename);\n\n //create new session object file\n FileOutputStream outputStream;\n\n try\n {\n //write out the contents of the session object to the file\n //so it can be stored and uploaded\n outputStream = openFileOutput(file.getName(), Context.MODE_PRIVATE);\n outputStream.write(mySession.toString().getBytes());\n outputStream.close();\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n\n //start a new AWS Session\n AWSHelper.startAWSSession(getApplicationContext());\n\n //upload\n AWSHelper.uploadFile(file, filename, getApplicationContext());\n\n //notify user session is ready\n Toast.makeText(this, \"Your session is ready!\", Toast.LENGTH_LONG).show();\n\n\n //all done? go back to previous activity\n finish();\n\n }", "public interface SessionService {\n\n /**\n * Create and start new ComapiImpl session.\n *\n * @param callback Callback with the result.\n */\n void startSession(@Nullable Callback<Session> callback);\n\n /**\n * Ends currently active session.\n *\n * @param callback Callback with the result.\n */\n void endSession(@Nullable Callback<ComapiResult<Void>> callback);\n }", "public void sessionOpened(IoSession session) {\n \tSystem.out.println(\"http session open\");\n }", "private void login() {\n if (blobStore != null) {\n return;\n }\n if (swiftUsername == null || swiftPassword == null || swiftAuthUrl == null || swiftContainer == null) {\n logger.error(\"Blob storage account is not configured\");\n throw new IllegalArgumentException(\"ERROR: Blob storage account is not configured\");\n }\n blobStore = ContextBuilder.newBuilder(blobApi)\n .endpoint(swiftAuthUrl)\n .credentials(swiftUsername, swiftPassword)\n .buildView(BlobStoreContext.class)\n .getBlobStore();\n\n if (!blobStore.containerExists(swiftContainer)) {\n// CreateContainerOptions options = CreateContainerOptions.Builder\n// .withMetadata(ImmutableMap.of(\"description\", \"E-PRTR data\"));\n// blobStore.createContainerInLocation(null, swiftContainer, options);\n Location location = getRegion();\n blobStore.createContainerInLocation(location, swiftContainer);\n }\n }", "public void loginAsUser() {\n vinyardApp.navigateToUrl(\"http://localhost:8080\");\n vinyardApp.fillUsername(\"user\");\n vinyardApp.fillPassord(\"123\");\n vinyardApp.clickSubmitButton();\n }", "@Test\r\n public void testInitSession() {\r\n System.out.println(\"initSession\");\r\n assertNotNull(sm);\r\n \r\n boolean result = sm.initSession(\"test1\", programsHome, programsHome + \"files1/\", requester);\r\n assertFalse(result);\r\n \r\n result = sm.initSession(\"test2\", programsHome, programsHome + \"files2/\", requester);\r\n assertFalse(result);\r\n \r\n result = sm.initSession(\"test3\", programsHome, programsHome + \"files3/\", requester);\r\n assertFalse(result);\r\n \r\n result = sm.initSession(\"test4\", programsHome, programsHome + \"files4/\", requester);\r\n assertTrue(result);\r\n \r\n sm.removeSession(\"test4\");\r\n }", "SessionManagerImpl() {\n }", "public void activate() { \r\n // Notify ActivationListeners\r\n \tSipApplicationSessionEvent event = null;\r\n Set<String> keySet = sipApplicationSessionAttributeMap.keySet();\r\n for (String key : keySet) {\r\n \tObject attribute = sipApplicationSessionAttributeMap.get(key);\r\n if (attribute instanceof SipApplicationSessionActivationListener) {\r\n if (event == null)\r\n event = new SipApplicationSessionEvent(this);\r\n try {\r\n ((SipApplicationSessionActivationListener)attribute)\r\n .sessionDidActivate(event);\r\n } catch (Throwable t) {\r\n logger.error(\"SipApplicationSessionActivationListener threw exception\", t);\r\n }\r\n }\r\n \t\t}\r\n }", "public void conectServer() {\n\n\t}", "private void connect() {\n\t\ttry {\n\t\t\tsocket = new Socket(Server.ADDRESS, Server.PORT_NUMBER);\n\t\t\tthis.oos = new ObjectOutputStream(socket.getOutputStream());\n\t\t\tthis.ois = new ObjectInputStream(socket.getInputStream());\n\t\t\tServerListener serverlistener = new ServerListener();\n\t\t\tserverlistener.start();\n\t\t\tRequest request = new Request(RequestCode.START_DOCUMENT_STREAM);\n\t\t\trequest.setUsername(user.getUsername());\n\t\t\toos.writeObject(request);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public Session createSession() {\n\t\treturn this.session;\n\t}", "public FenDetailSession() {\n initComponents();\n }", "public void configureSession(URLConnection co) throws IOException {\n\t\tco.setRequestProperty(\"Authorization\", \"OreApi session=\\\"\" + this.sessionManager.getOrCreateSession() + \"\\\"\");\n\t}", "@Override\n public void sessionCreated(IoSession session) {\n }", "public SessionManager(API api) {\n _api = api;\n }", "@Override\n\t\t\tpublic void handleSessionEstablishmentError(Throwable error) throws Exception {\n\t\t\t\t\n\t\t\t}", "public void sessionCreated(HttpSessionEvent httpSessionEvent) {\r\n System.out.println(\"sessionCreated method has been called in \"\r\n + this.getClass().getName());\r\n\r\n totalUserCount++;\r\n currentUserCount++;\r\n\r\n ctx = httpSessionEvent.getSession().getServletContext();\r\n\r\n ctx.setAttribute(\"totalusers\", totalUserCount);\r\n ctx.setAttribute(\"currentusers\", currentUserCount);\r\n\r\n }", "public ProtocolServerSession(Socket conn, File destinationFolder, MessageDelegate delegate) throws AtmException\n\t{\n\t\tsuper(conn, \"Server Session\");\n\n\t\ttrace(\"Server protocol session initialized\");\n\t}", "public void runServer() {\n\t\tint i = 0;\n\n\t\tclientList = new ArrayList<>();\n\t\ttry {\n\t\t\tServerSocket listener = new ServerSocket(port);\n\n\t\t\tSocket server;\n\n\t\t\tprintDetails();\n\n\t\t\twhile ((i++ < maxConnections) || (maxConnections == 0)) {\n\n\t\t\t\tserver = listener.accept();\n\t\t\t\tSession session = new Session(server, this.storageLocation );\n\n\t\t\t\tnew Thread(session).start();\n\n\t\t\t\tString name = session.getName();\n\t\t\t\tSystem.out.printf(\"%s STARTED\\r\\n\", name );\n\t\t\t\tclientList.add( session );\n\t\t\t\tdoGC();\n\n\t\t\t}\n\t\t} catch (IOException ioe) {\n\t\t\tSystem.out.println(\"IOException on socket listen: \" + ioe);\n\t\t\tioe.printStackTrace();\n\t\t}\n\t}", "private void mediaSessionInitializer() {\n mMediaSessionCompat = new MediaSessionCompat(getContext(), TAG);\n\n // Set flags for external clients in a car and media buttons\n mMediaSessionCompat.setFlags(MediaSessionCompat.FLAG_HANDLES_MEDIA_BUTTONS\n | MediaSessionCompat.FLAG_HANDLES_TRANSPORT_CONTROLS);\n\n // Don't let external client restart the player when not in UI\n mMediaSessionCompat.setMediaButtonReceiver(null);\n\n // Set available actions to support outside UI\n mStateBuilder = new PlaybackStateCompat.Builder()\n .setActions(PlaybackStateCompat.ACTION_PLAY |\n PlaybackStateCompat.ACTION_PLAY_PAUSE |\n PlaybackStateCompat.ACTION_SKIP_TO_PREVIOUS |\n PlaybackStateCompat.ACTION_PLAY_PAUSE);\n\n // Set the playback state for compat\n mMediaSessionCompat.setPlaybackState(mStateBuilder.build());\n\n // Handle callbacks from media controller\n mMediaSessionCompat.setCallback(new SessionCallbacks());\n\n // Start the Media Session since the activity is active\n mMediaSessionCompat.setActive(true);\n }", "public OCSession(IoSession session) {\n\t\tthis.session = session;\n\t}", "private static void sessionFromCurrentSession(final Context context) {\n\n \t// The session itself\n final Session newSession = Session.getInstance();\n \n // The service\n Service newService = new Service();\n newSession.setService(newService);\n\n // The shared preferences\n Preferences preferences = new Preferences(context);\n newSession.setPreferences(preferences);\n\n // The database\n RestaurantDBAdapter restaurantDBAdapter = new RestaurantDBAdapter(context);\n newSession.setRestaurantDBAdapter(restaurantDBAdapter);\n\n // The hashmap of all the restaurants\n HashMap<String, Restaurant> restaurants = restaurantDBAdapter.getAllRestaurants();\n newSession.setRestaurants(restaurants);\n\n //Save the current session\n Session.setCurrentSession(newSession);\n Session.currentSession.saveAsCurrentSession(context);\n }", "public boolean startSession() {\n while(true){\n try{\n if (currentUser != null){\n return true;\n }\n\n String id = ui.readCard();\n String pin = ui.readPin();\n if(BankUser.getUser(id, pin) != null) {\n currentUser = BankUser.getUser(id, pin);\n ui.displayMessage(\"Hello \" + currentUser.getName());\n return true;\n } else {\n ui.displayError(\"User id or pin not found. Try again\");\n }\n } catch (Exception e){\n ui.displayError(\"Somethinng went wrong. Please try again.\");\n }\n\n }\n\n }", "public void getSession(RequestCallback callback) throws RequestException {\n sendRequest(\"/session\", null, RequestBuilder.GET, callback);\n }", "private Session getSession() throws RepositoryException {\n return getRepository().loginAdministrative(null);\n }", "public void startAuth(AccountManagerCallback accountManagerCallback) {\n mAccountManagerCallback = accountManagerCallback;\n\n CognitoUser user = mUserPool.getUser(mEmail);\n user.getSessionInBackground(authenticationHandler);\n }", "public ShoppingSessionClient() {\n\t\t/* TODO: instantiate the proxy using the EJBProxyFactory (see the other client classes) */\n\t}", "Session createSession(Long courseId, Long studentId, Session session);", "public HelloControllerSession() {\n }", "AppEncryptionServer(final SessionFactory sessionFactory) {\n this(sessionFactory, Constants.DEFAULT_UDS_PATH);\n }", "@Override\n\tpublic void sessionCreated(IoSession arg0) throws Exception {\n\n\t}" ]
[ "0.6914366", "0.5867453", "0.5837169", "0.58340204", "0.5803412", "0.5792027", "0.57096034", "0.56795895", "0.56343967", "0.5627246", "0.55962694", "0.5579245", "0.55741113", "0.5554197", "0.55447865", "0.5537781", "0.54947895", "0.54880846", "0.54652715", "0.54392934", "0.5437498", "0.54318833", "0.54245955", "0.54240143", "0.5421087", "0.54178715", "0.5404799", "0.53889805", "0.53717655", "0.5360144", "0.53503007", "0.5330635", "0.5318958", "0.5315917", "0.5297496", "0.5288645", "0.5268291", "0.52618915", "0.5250904", "0.52485573", "0.5244264", "0.52353346", "0.5232872", "0.52200854", "0.5219063", "0.52100116", "0.52076006", "0.52036554", "0.5156578", "0.51486796", "0.5126186", "0.51250666", "0.51206553", "0.51118517", "0.51052314", "0.5101687", "0.51005375", "0.50888246", "0.50748503", "0.5062397", "0.5056646", "0.5055339", "0.50509", "0.5047197", "0.5042116", "0.5042116", "0.50309736", "0.5030837", "0.50277954", "0.50258696", "0.5025416", "0.5023718", "0.5019799", "0.5019004", "0.5014369", "0.50088096", "0.49892452", "0.4989243", "0.4988746", "0.49853304", "0.49800816", "0.4961461", "0.49575663", "0.49473968", "0.4944489", "0.4942872", "0.49427488", "0.49427179", "0.49385962", "0.49385607", "0.4933505", "0.4930116", "0.4927767", "0.49240592", "0.49239942", "0.4914616", "0.49132186", "0.4911486", "0.49099913", "0.49096778" ]
0.5273168
36
Disconnects the user session.
public void disconnect() { if (isConnected) { try { vimPort.logout(serviceContent.getSessionManager()); } catch (Exception e) { logger.trace("Failed to logout esx: " + host, e); } } isConnected = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void disconnect(){\n Session session = (Session)_sessionRef.get();\n if(session != null && session.isConnected()){\n session.disconnect();\n _sessionRef.set(null);\n }\n }", "void onDisconnect(User user);", "public void disconnect() {\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(mApplicationContext);\n prefs.edit().putBoolean(\"xmpp_logged_in\", false).commit();\n\n if (mConnection != null) {\n mConnection.disconnect();\n }\n\n mConnection = null;\n // Unregister the message broadcast receiver.\n if (uiThreadMessageReceiver != null) {\n mApplicationContext.unregisterReceiver(uiThreadMessageReceiver);\n uiThreadMessageReceiver = null;\n }\n }", "public void Logout()\n {\n isLoggedIn = false;\n connection.Disconnect(); \n connection = null;\n }", "public void disconnect() {\n\t\tMessage quitMessage = Message.makeQuitMessage(getUserName());\n\t\tsocketConnection.print(quitMessage);\n\t\tKeyboardScanner.close();\n\t}", "public void disconnectUser(User user) {\n connect();\n\n try {\n doStream.writeUTF(\"DISCONNECT\");\n doStream.writeUTF(user.getUserName());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n disconnect();\n }", "public void disconnect() throws OOBException {\n \t\tsession.disconnect();\n \t}", "public void disconnectSSH(){\n\t log.info(\"Trying to disconnect to device \"+deviceIP+\" ...\\n\");\n\t session.disconnect();\n\t if(!session.isConnected())\n\t\t log.info(\"Successfully disconnected from device \"+deviceIP+\"\\n\");\n\t else\n\t\t log.error(\"Unable to disconnect to the device \"+deviceIP+\"\\n\");\n\t if(FETCHING_DATA_VIA_DATABASE){\n\t\t dbConnect.closeConnection();\n\t\t log.info(\"Successfully closed the database. \");\n\t }\n }", "public void onDisconnect(DisconnectMsg msg) {\n\n\t\tString user = msg.getUser();\n\n\t\tLogger.log(\"onDisconnect:\" + msg.toString());\n\n\t\tstorage.removeClientSession(user);\n\n\t\tstorage.addBuffer(user);\n\t\t\n\t\tstorage.getThread(user).doStop();\n\t\t\n\t\t\n\t}", "public void disconnect() {\n\t\tif (con.isConnected()) {\n\t\t\tcon.disconnect();\n\t\t}\n\t}", "void onUserSessionDisconnected(WebSocketConnection connection, Session session, String accountId);", "public void disconnect() {\n SocketWrapper.getInstance(mContext).disConnect();\n }", "public void disconnect() {\n\t\tdisconnect(true);\n\t}", "private void UserDisconnectChannel(ClientData d)\n\t{\n\t\tApplicationManager.textChat.writeLog(d.ClientName + \" Quit \" + currentChannel.ChannelName);\n\t\tSendMessage(null, MessageType.channelInfo);\n\n\t}", "public boolean disconnect() {\r\n\t\t\r\n\t\tString message;\r\n\t\t//ENTER YOUR CODE TO DISCONNECT\r\n\t\tif (isChatSessionOpened()){\r\n\t\t\tsendChatClosure();\r\n\t\t}\r\n\t\t\r\n\t\tmessage= \"106\";\r\n\t\tsendDatagramPacket(message);\r\n\t\t\r\n\t\tthis.connectedUser = null;\r\n\t\tthis.chatReceiver = null;\r\n\t\t\r\n\t\t\r\n\t\treturn true;\r\n\t}", "@Override\n public void disconnect(Channel channel)\n {\n Log.e(\"Dudu_SDK\",\n \"disconnect \" + ((user == null) ? \"true\" : user.getUserid()));\n close(false);\n isConnected = false;\n reconnect();\n Log.e(\"Dudu_SDK\",\n \"connectCallBack==null \" + (connectCallBack == null));\n if (connectCallBack != null)\n connectCallBack.disconnect(channel);\n }", "public void logout(){\r\n\t\tallUser.remove(this.sessionID);\r\n\t\tthis.sessionID = -1;\r\n\t}", "public static void logout() {\n try {\n buildSocket();\n ClientService.sendMessageToServer(connectionToServer, ClientService.logoutUser());\n closeSocket();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void logoutUser() {\n session.setLogin(false);\n\n db.deleteUsers();\n\n // Launching the login activity\n Intent intent = new Intent(EscolhaProjeto.this, LoginActivity.class);\n startActivity(intent);\n finish();\n }", "private void logoutUser() {\n session.setLogin(false);\n\n db.deleteUsers();\n\n // Launching the login activity\n Intent intent = new Intent(this, Login.class);\n startActivity(intent);\n finish();\n }", "private void logoutUser() {\n session.setLogin(false);\n\n db.deleteUsers();\n\n // Launching the login activity\n Intent intent = new Intent(getActivity(), LoginActivity.class);\n startActivity(intent);\n getActivity().finish();\n }", "@Override\r\n\tpublic Boolean disconnectIMUser(String userName) {\n\t\treturn null;\r\n\t}", "public void disconnect()\n {\n this.uri = null;\n this.userAddress = null;\n this.password = null;\n connected = false;\n }", "public static opCode logoutUser()\n {\n Operation request = new Operation(username);\n request.setPassword(password);\n request.setCode(opCode.LOGOUT);\n\n sendReq(clientSocketChannel,request);\n\n //chiudo socket del client\n if(clientSocketChannel != null)\n {\n try { clientSocketChannel.close(); }\n catch(IOException ioe)\n {\n System.err.println(\"Error in closing clientSocketChannel\");\n ioe.printStackTrace();\n }\n }\n\n //interrompo il thread degli inviti\n if(inviteThread != null)\n inviteThread.interrupt();\n\n\n //chiudo socket degli inviti\n if(inviteSocketChannel != null)\n {\n try { inviteSocketChannel.close(); }\n catch(IOException ioe)\n {\n System.err.println(\"Error in closing inviteSocketChannel\");\n ioe.printStackTrace();\n }\n }\n\n //mando un messaggio agli altri utenti, per notificare la mia disconnessione\n Utils.sendChatMessage(username, \"left the chat\", TuringPanel.editingFileAddress,null);\n\n //interrompo il thread della chat\n if(chatThread != null)\n chatThread.interrupt();\n\n\n return opCode.OP_OK;\n }", "public void disconnect() {\n\t\tdisconnect(null);\n\t}", "public void disconnect(){\n\n\t\tserverConnection.disconnect();\n\t}", "private void logoutUser() {\n\t\tsession.setLogin(false);\n\n\t\tdb.deleteUsers();\n\n\t\t// Launching the login activity\n\t\tIntent intent = new Intent(MainActivity.this, LoginActivity.class);\n\t\tstartActivity(intent);\n\t\tfinish();\n\t}", "private void deauthenticate(Session userSession) {\n\t\t// move this session from authenticated region to unauthenticated\n\t\tString accountId = accountIdsByUserSession.get(userSession);\n\t\tif (accountId != null) {\n\t\t\tUserGroup userGroup = authenticatedUserGroupsByAccountId.get(accountId);\n\t\t\tif (userGroup != null) {\n\t\t\t\tuserGroup.userSessions.remove(userSession);\n\t\t\t}\n\n\t\t\tfor (OnUserSessionStatusChangeListener listener : userSessionStatusChangeListeners) {\n\t\t\t\tlistener.onUserSessionDisconnected(this, userSession, accountId);\n\t\t\t}\n\t\t}\n\n\t\taccountIdsByUserSession.remove(userSession);\n\t}", "private void logoutUser() {\n session.setLogin(false);\n\n db.deleteUsers();\n\n // Launching the login activity\n Intent intent = new Intent(MainActivity.this, Login.class);\n startActivity(intent);\n finish();\n }", "private void logoutUser() {\n\t\tsession.setLogin(false);\n\n\n\t\t// Launching the login activity\n\t\tIntent intent = new Intent(EnterActivity.this, LoginActivity.class);\n\t\tstartActivity(intent);\n\t\tfinish();\n\t}", "public void disconnect()\n {\n \tLog.d(TAG, \"disconnect\");\n\n \tif(this.isConnected) {\n \t\t// Disable the client connection if have service\n \t\tif(mLedService != null) {\n \t\t\tthis.disable();\n \t\t}\n \t\t\n \t\t// Unbind service\n mContext.unbindService(mServiceConnection);\n \n this.isConnected = false;\n \t}\n }", "public void disconnect() {\t\n\t\t\n\t\ttry {\n\t\t\tconnection.close();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"Disconnected\");\n\t}", "private void disconnect() {\n activityRunning = false;\n MRTClient.getInstance().doHangup();\n MRTClient.getInstance().removeClientListener(this);\n\n finish();\n }", "public void doLogout() {\n mSingleton.getCookieStore().removeUser(mUser);\n mPreferences.setUser(null);\n new ActivityTable().flush();\n\n //update variables\n mUser = null;\n mLogin = false;\n\n //reset drawer\n restartActivity();\n }", "public void disconnectFromFacebook() {\n\n if (AccessToken.getCurrentAccessToken() == null) {\n return; // already logged out\n }\n\n new GraphRequest(AccessToken.getCurrentAccessToken(), \"/me/permissions/\", null, HttpMethod.DELETE,\n new GraphRequest.Callback() {\n @Override\n public void onCompleted(GraphResponse graphResponse) {\n\n LoginManager.getInstance().logOut();\n\n }\n }).executeAsync();\n }", "public void disconnect() throws IOException {\n this.session.disconnect();\n this.session = null;\n }", "private void logoutUser() {\n session.setLogin(false);\n\n db.deleteUsers();\n\n // Launching the login activity\n Intent intent = new Intent(Activity_Main.this, Activity_Login.class);\n startActivity(intent);\n finish();\n }", "public void disconnect() {\r\n\t\tsuper.disconnect();\r\n\t}", "@Override\n public void windowClosing(java.awt.event.WindowEvent windowEvent) {\n JSONObject logout = Command.createLogout(Settings.getUsername(), Settings.getSecret());\n ClientSkeleton.getInstance().writeMsg(logout.toJSONString());\n log.info(\"User is going to log out....\");\n ClientSkeleton.getInstance().disconnect();\n }", "@Override\n\tpublic void exitSessionUser() {\n\t\tgetThreadLocalRequest().getSession().invalidate();\n\t\t\n\t}", "public void disconnect()\n {\n isConnected = false;\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}", "public void logOut() {\n Logger.d(TAG,\"login#logOut\");\n Logger.d(TAG,\"login#stop reconnecting\");\n //\t\teverlogined is enough to stop reconnecting\n everLogined = false;\n isLocalLogin = false;\n reqLoginOut();\n }", "public void deconnect_station(Station s) throws Exception{\r\n\t\ts.remove_user(this);\r\n\t}", "default void onDisconnect(SessionID sessionID) {\n }", "public void disconnect() {\n\t\ttry {\n\t\t\tconn.close();\n\t\t\tSystem.out.println(\"切断された/Disconnected\");\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"接続エラーが発生しました/Connection Close Error Occured\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void disconnect() {\n \ttry {\n \t\tctx.unbindService(apiConnection);\n } catch(IllegalArgumentException e) {\n \t// Nothing to do\n }\n }", "void disconnect() {\n connector.disconnect();\n // Unregister from activity lifecycle tracking\n application.unregisterActivityLifecycleCallbacks(activityLifecycleTracker);\n getEcologyLooper().quit();\n }", "public synchronized void logout(String session_id){\r\n try {\r\n dao.deleteUserBySession(session_id);\r\n }catch(Exception e) {\r\n ExceptionBroadcast.print(e);\r\n }\r\n }", "private void logout() {\n userModel.setLoggedInUser(null);\n final Intent intent = new Intent(this, LoginActivity.class);\n startActivity(intent);\n finish();\n }", "public void disconnect(){\n if(out != null) {\n out.println(\"IDisconnect:\" + username);\n }\n }", "public void sendDisconnect() {\n\t\tString bye = (username + \": :Disconnect\");\n\n\t\ttry {\n\n\t\t\t// print string\n\t\t\twriter.println(bye);\n\n\t\t\t// flush the stream\n\t\t\twriter.flush();\n\n\t\t} catch (Exception e) {\n\t\t\t// print if exception is caught\n\t\t\ttextAreaChat.append(\"Could not send Disconnect message.\\n\");\n\n\t\t}\n\t}", "private void cerrarSession() {\n FirebaseAuth.getInstance().signOut();\n LoginManager.getInstance().logOut();\n Auth.GoogleSignInApi.signOut(googleApiClient).setResultCallback( new ResultCallback<Status>() {\n @Override\n public void onResult(@NonNull Status status) {\n if (status.isSuccess()) {\n logOut();\n } else {\n Toast.makeText(getApplicationContext(),\"Fallo al cerrar session\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "public void closeConnection(){\r\n\t\t_instance.getServerConnection().logout();\r\n\t}", "public void disconnect() {\r\n\t\tif (connected.get()) {\r\n\t\t\tserverConnection.getConnection().requestDestToDisconnect(true);\r\n\t\t\tconnected.set(false);\r\n\t\t}\r\n\t}", "public void disconnect( ) {\n disconnect( \"\" );\n }", "protected void onDisconnect() {}", "private void logout()\r\n {\r\n LogoutRequest request = new LogoutRequest();\r\n request.setUsername(username);\r\n this.sendRequest(request);\r\n }", "public void disconnectSensor() {\n try {\n resultConnection.releaseAccess();\n } catch (NullPointerException ignored) {\n }\n }", "public CompletionStage<Void> disconnect() {\n\t\treturn this.finConnection.sendMessage(\"disconnect-from-channel\", FinBeanUtils.toJsonObject(this.routingInfo)).thenAccept(ack->{\n\t\t\tif (!ack.isSuccess()) {\n\t\t\t\tthrow new RuntimeException(\"error disconnecting channel client, reason: \" + ack.getReason());\n\t\t\t}\n\t\t});\n\t}", "void closeSession();", "void closeSession();", "public void endSession(){\n currentUser = null;\n ui.returnCard();\n }", "public void disconnect() {\n try {\n client.disconnect(null, null);\n } catch (MqttException e) {\n Debug.logError(e, MODULE);\n }\n }", "public void disconnect() {\n if (this.mIsConnected) {\n disconnectCallAppAbility();\n this.mRemote = null;\n this.mIsConnected = false;\n return;\n }\n HiLog.error(LOG_LABEL, \"Already disconnected, ignoring request.\", new Object[0]);\n }", "public void Logout(){\n preferences.edit().remove(userRef).apply();\n }", "public void disconnect() {\n\t\t\n\t}", "private void logout() {\n\t\tgetUI().get().navigate(\"login\");\r\n\t\tgetUI().get().getSession().close();\r\n\t}", "public static void Logout() throws IOException {\n Socket client = ConnectionToServer();\n // Checks if the sever is online\n if (client.isConnected()) {\n OutputStream outputStream = client.getOutputStream();\n InputStream inputStream = client.getInputStream();\n\n ObjectOutputStream send = new ObjectOutputStream(outputStream);\n ObjectInputStream receiver = new ObjectInputStream(inputStream);\n\n send.writeUTF(\"Logout\"); // Send logout to server\n send.writeUTF(loggedInUser); // Send username to server\n send.flush();\n// End connections\n send.close();\n receiver.close();\n client.close();\n }\n// Resetting the application for the user on the client-side\n loggedInUser = \"\";\n Login.usernameText.setText(\"\");\n loginSuccessful = false;\n boolean[] falsePermission = {false, false, false, false};\n permission.SetUserPermission(falsePermission);\n token = \"\";\n ControlPanelFrameHandler.LogoutWindow();\n }", "public void endSession() {\n if (sqlMngr != null) {\n sqlMngr.disconnect();\n }\n if (sc != null) {\n sc.close();\n }\n sqlMngr = null;\n sc = null;\n }", "public void logout () {\n\t\tif (isLoggedIn()) {\n\t\t\tGPPSignIn.sharedInstance().signOut();\n\t\t\tGPGManager.sharedInstance().signOut();\n\t\t}\n\t}", "public void disconnect() {}", "protected void disconnect() {\n try {\n if (connection != null) {\n connection.close();\n }\n connection = null;\n queryRunner = null;\n thread = null;\n queries = null;\n } catch (SQLException ex) {\n Logger.getGlobal().log(Level.WARNING, ex.getMessage(), ex);\n }\n }", "public void dbDisconnect() {\n Logger.write(\"INFO\", \"DB\", \"Disconnecting from database\");\n try {\n dbConnection.close();\n } catch(Exception e) { //Exception logged to disk, program allowed to continue\n Logger.write(\"FATAL\", \"DB\", \"Could not disconnect: \" + e.getClass().getName() + \": \" + e.getMessage() );\n }\n \n if (!Crypto.encryptDB(password))\n Logger.write(\"FATAL\", \"DB\", \"failed to encrypt database\");\n }", "public void disconnect() {\n\t\ttry { \n\t\t\tif(loginInput != null) loginInput.close();\n\t\t\tif(registerInput != null) registerInput.close();\n\t\t}\n\t\tcatch(Exception e) {} // not much else I can do\n\t\ttry {\n\t\t\tif(loginOutput != null) loginOutput.close();\n\t\t\tif(registerOutput != null) registerOutput.close();\n\t\t}\n\t\tcatch(Exception e) {} // not much else I can do\n try{\n\t\t\tif(loginSocket != null) loginSocket.close();\n\t\t\tif(registerSocket != null) registerSocket.close();\n\t\t}\n\t\tcatch(Exception e) {} // not much else I can do\n\n\t\tcg.connectionFailed();\n\t\t\t\n }", "public static void disconnect() {\n if (AppSettings.bluetoothConnection != null) \n \tAppSettings.bluetoothConnection.stop();\n\t}", "protected void logout() {\n\t\tActiveUserModel userController = ActiveUserModel.getInstance();\n\t\tuserController.performLogout();\n\n\t\tIntent intent = new Intent(this, LoginActivity.class);\n\t\tstartActivityForResult(intent, LOGIN_ACTIVITY);\n\t}", "protected void processDisconnect() {\n\t\tconnected.set(false);\n\t\tsenderChannel = null;\n\t}", "private void signOutUser() {\n mAuth.signOut();\n LoginManager.getInstance().logOut();\n Toast.makeText(ChatMessage.this, \"You have been logout\", Toast.LENGTH_SHORT).show();\n finishAffinity();\n proceed();\n }", "private void logOut() {\n mApi.getSession().unlink();\n\n // Clear our stored keys\n clearKeys();\n // Change UI state to display logged out version\n setLoggedIn(false);\n }", "void onDisconnect();", "void onDisconnect();", "public static void disconnect() {\n \t\tconnPool.stop();\n \t}", "public void disconnect ()\n {\n org.omg.CORBA.portable.InputStream $in = null;\n try {\n org.omg.CORBA.portable.OutputStream $out = _request (\"disconnect\", true);\n $in = _invoke ($out);\n return;\n } catch (org.omg.CORBA.portable.ApplicationException $ex) {\n $in = $ex.getInputStream ();\n String _id = $ex.getId ();\n throw new org.omg.CORBA.MARSHAL (_id);\n } catch (org.omg.CORBA.portable.RemarshalException $rm) {\n disconnect ( );\n } finally {\n _releaseReply ($in);\n }\n }", "@Override\n public void disconnect() {\n\n // silently return if connection is closed\n if (!is_open) {\n return;\n }\n\n // close connection and statement, shutdown driver\n try {\n statement.close();\n connection.close();\n DriverManager.getConnection(\"jdbc:derby:\" + db_name + \";shutdown=true\");\n is_open = false;\n } catch (SQLException e) {\n System.out.println(\"Java DB connection did not shutdown successfully.\");\n }\n\n //System.out.println(\"Java DB connection shutdown successfully!\");\n\n }", "public void disconnect() {\n DatabaseGlobalAccess.getInstance().getEm().close();\n DatabaseGlobalAccess.getInstance().getEmf().close();\n }", "public void mDisconnect() {\n try {\n if (oOutput!=null){\n oOutput.close();\n oOutput=null;}\n if (oInput!=null){\n oInput.close();\n oInput=null;}\n if (oSocket!=null) {\n if (oSocket.isConnected())\n mMsgLog(5,\"Disconnected\");\n oSocket.close();\n oSocket = null;\n }\n if (oDevice!=null){\n oDevice=null;\n }\n } catch (IOException e) {\n mErrMsg(\"Err:\"+e.toString());\n }\n mStateSet(kBT_Disconnected);\n }", "public static void logout() {\n\t\tif (activeAccount != null) try {\n\t\t\t\n\t\t\tif (authClient != null)\n\t\t\t\tauthClient.logout();\n\t\t\tauthClient = null;\n\t\t\t\n\t\t\tactiveAccount = null;\n\t\t}\n\t\tcatch (IOException ioe) {\n\t\t\tJOptionPane.showMessageDialog(DialogPanel.getTopWindow(), (\"An error occurred while logging out from the GoldenGATE Server at\\n\" + activeAccount.host + \":\" + activeAccount.port + \"\\n\" + ioe.getMessage()), \"Error on Logout\", JOptionPane.ERROR_MESSAGE);\n\t\t}\n\t}", "public void handleDisconnect(){\r\n consoleAppend(this.getName() + \" disconnected.\");\r\n clientThreads.remove(getIndex(this.getName()));\r\n sendToAll(this.getName() + \" disconnected.\");\r\n sendCTToAll(new ControlToken(ControlToken.REMOVECODE, this.getName()));\r\n }", "public void disconnect() {\n\t\tfinal String METHOD = \"disconnect\";\n\t\tLoggerUtility.fine(CLASS_NAME, METHOD, \"Disconnecting from the IBM Watson IoT Platform ...\");\n\t\ttry {\n\t\t\tthis.disconnectRequested = true;\n\t\t\tmqttAsyncClient.disconnect();\n\t\t\tLoggerUtility.info(CLASS_NAME, METHOD, \"Successfully disconnected \"\n\t\t\t\t\t+ \"from the IBM Watson IoT Platform\");\n\t\t} catch (MqttException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void closeConnection() {\n //handles the case of a disconnection before the login\n if (userNickname == null) {\n synchronized (this) {\n answer = null;\n answerReady = true;\n notifyAll();\n }\n }\n connected = false;\n synchronized (C2SMessages){\n C2SMessages.clear();\n C2SMessages.notifyAll();\n }\n synchronized (S2CMessages){\n S2CMessages.clear();\n S2CMessages.notifyAll();\n }\n }", "@Override\n\tpublic void logout()\n\t{\n\t\tthis.user = null;\n\t}", "public static void disconnect() {\r\n if (isConnected()) {\r\n listener.interrupt();\r\n timerThread.interrupt();\r\n keepAliveThread.interrupt();\r\n db.writeDatabase();\r\n ObjectIO.writeObjectToFile(cmdPath, cmd);\r\n tc.stopCommands();\r\n ObjectIO.writeObjectToFile(tcPath, tc);\r\n try {\r\n irc.close();\r\n }\r\n catch (IOException e) { /* Shouldn't happen */ }\r\n }\r\n irc = null;\r\n }", "public void logout(int sessionId);", "public void logout() {\n getRequest().getSession().invalidate();\n }", "public void endSession(WebSocket conn) {\n String token = reverseMap.get(conn);\n \n // Token can be null if user connected but never logged in\n if (token == null) {\n return;\n }\n \n activeSessions.remove(token);\n reverseMap.remove(conn);\n }", "private void logout(){\r\n\t\ttry {\r\n\t\t\tserver.rmvClient(user);\r\n\t\t} catch (RemoteException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\tSystem.exit(0);\r\n\t}", "public static void signOut(String name, Session user) {\n playerList.remove(name);\n user.removeAttribute(\"player\");\n }", "@Override\n public void disconnect() {\n super.disconnect();\n if (playStateSubscription != null) {\n playStateSubscription.unsubscribe();\n playStateSubscription = null;\n }\n connected = false;\n }", "public void disconnect() {\n\t\tif (_connection != null) {\n\t\t\ttry {\n\t\t\t\twhile (!_connection.isClosed()) {\n\t\t\t\t\t_connection.close();\n\t\t\t\t}\n\t\t\t} catch (Exception e) { /* ignore close errors */\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.7676334", "0.70841783", "0.70200306", "0.7017205", "0.6953847", "0.6778077", "0.677226", "0.6692579", "0.66910416", "0.66815346", "0.6568488", "0.655676", "0.6547329", "0.6497375", "0.6457881", "0.64420754", "0.6440378", "0.64235955", "0.64054984", "0.6404522", "0.639988", "0.6397811", "0.63892704", "0.6386997", "0.63784826", "0.63751364", "0.6371591", "0.6361754", "0.6353549", "0.6350644", "0.6343123", "0.6333504", "0.63325006", "0.6331381", "0.6306438", "0.63006693", "0.6287312", "0.62685806", "0.62537116", "0.6252505", "0.6239677", "0.6171083", "0.6168633", "0.6141395", "0.6120124", "0.61194056", "0.611149", "0.60986865", "0.60781986", "0.60713214", "0.60585105", "0.6054979", "0.60436696", "0.6041758", "0.6038918", "0.603743", "0.6019476", "0.6018561", "0.5997533", "0.5997267", "0.599677", "0.599677", "0.59954023", "0.5992461", "0.59874696", "0.59802073", "0.59678555", "0.59503025", "0.5947758", "0.594529", "0.59359854", "0.5933846", "0.59297407", "0.59160185", "0.5913377", "0.5911447", "0.591023", "0.59099454", "0.5902873", "0.589779", "0.58975136", "0.58975136", "0.58959913", "0.5890423", "0.58814925", "0.58809745", "0.58763456", "0.5861961", "0.58549124", "0.58496886", "0.5837586", "0.5828808", "0.5824791", "0.5824787", "0.5823776", "0.58198243", "0.5812907", "0.58114755", "0.5809926", "0.58080065" ]
0.7174336
1
version string is initially null
private Object[] waitForValues(ManagedObjectReference objmor, String[] filterProps, String[] endWaitProps, Object[][] expectedVals) throws Exception { String version = ""; Object[] endVals = new Object[endWaitProps.length]; Object[] filterVals = new Object[filterProps.length]; PropertyFilterSpec spec = new PropertyFilterSpec(); ObjectSpec oSpec = new ObjectSpec(); oSpec.setObj(objmor); oSpec.setSkip(Boolean.FALSE); spec.getObjectSet().add(oSpec); PropertySpec pSpec = new PropertySpec(); pSpec.getPathSet().addAll(Arrays.asList(filterProps)); pSpec.setType(objmor.getType()); spec.getPropSet().add(pSpec); ManagedObjectReference filterSpecRef = vimPort.createFilter(propCollector, spec, true); boolean reached = false; UpdateSet updateset = null; List<PropertyFilterUpdate> filtupary = null; List<ObjectUpdate> objupary = null; List<PropertyChange> propchgary = null; while (!reached) { updateset = vimPort.waitForUpdates(propCollector, version); if (updateset == null || updateset.getFilterSet() == null) { continue; } version = updateset.getVersion(); // Make this code more general purpose when PropCol changes later. filtupary = updateset.getFilterSet(); for (PropertyFilterUpdate filtup : filtupary) { objupary = filtup.getObjectSet(); for (ObjectUpdate objup : objupary) { if (objup.getKind() == ObjectUpdateKind.MODIFY || objup.getKind() == ObjectUpdateKind.ENTER || objup.getKind() == ObjectUpdateKind.LEAVE) { propchgary = objup.getChangeSet(); for (PropertyChange propchg : propchgary) { updateValues(endWaitProps, endVals, propchg); updateValues(filterProps, filterVals, propchg); } } } } Object expctdval = null; // Check if the expected values have been reached and exit the loop // if done. // Also exit the WaitForUpdates loop if this is the case. for (int chgi = 0; chgi < endVals.length && !reached; chgi++) { for (int vali = 0; vali < expectedVals[chgi].length && !reached; vali++) { expctdval = expectedVals[chgi][vali]; reached = expctdval.equals(endVals[chgi]) || reached; } } } // Destroy the filter when we are done. vimPort.destroyPropertyFilter(filterSpecRef); return filterVals; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "@Override\n public String getVersionString() {\n return versionString;\n }", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "String getVersion();", "public static String getVersion()\n {\n return \"\";\n }", "public static String getVersion()\n {\n return \"\";\n }", "String buildVersion();", "@CheckForNull\n String getVersion();", "default String getVersion()\n {\n return getString( \"version\", \"Unknown Version\");\n }", "String getEmptyVersion();", "public static String getStringVersion() throws IOException {\n return \"0.0.1\";//attr.getValue(\"Implementation-Version\");\n }", "public void setVersion(String version){\r\n this.version = version;\r\n }", "public void setVersion(String version);", "@Override\n public String toString() {\n return versionString;\n }", "public abstract String getVersion();", "public abstract String getVersion();", "public abstract String getVersion();", "public void setVersion(String version)\n {\n this.ver = version;\n }", "void setVersion(String version);", "void setVersion(String version);", "public void setVersion(String value) {\n\t\tthis._version = value;\n\t}", "public static final String getVersion() { return version; }", "public static final String getVersion() { return version; }", "String offerVersion();", "public String getVersion(){\r\n return version;\r\n }", "public void setVersion(String version) {\r\n this.version = version == null ? null : version.trim();\r\n }", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public static String getVersion() {\n\t\treturn \"1.0.3\";\n\t}", "public String getVersion()\n {\n return ver;\n }", "@Override\n\tpublic String getVersion() {\n\t\treturn \"0\";\n\t}", "public static String getVersion() {\r\n\t\treturn VERSION;\r\n\t}", "public void setVersion(String version) {\n this.version = version == null ? null : version.trim();\n }", "String version();", "@java.lang.Override\n public java.lang.String getVersion() {\n java.lang.Object ref = version_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n version_ = s;\n return s;\n }\n }", "public java.lang.String getVersion() {\n return version_;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n\t\t\r\n\t}", "public void setVersion(java.lang.String version) {\r\n this.version = version;\r\n }", "public static String getVersion() {\n\t\treturn version;\r\n\t}", "public String getVersion()\r\n {\r\n return(\"Ver. 1.0\");\r\n }", "public void setVersion(String version)\n {\n this.version = version;\n }", "public static String getVersion() {\n\t\treturn version;\n\t}", "public java.lang.String getVersion() {\n java.lang.Object ref = version_;\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 version_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getVersion() {\n java.lang.Object ref = version_;\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 version_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getVersion() {\n java.lang.Object ref = version_;\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 version_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String versionNumber (){\r\n\t\t\treturn _versionNumber;\r\n\t\t}", "public void setVersion(String version) {\r\n\t\tthis.version = version;\r\n\t}", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion( String version )\n {\n this.version = version.toLowerCase( Locale.ENGLISH );\n }", "public default String getVersion() {\n return Constants.VERSION_1;\n }", "public Builder setVersion(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n version_ = value;\n onChanged();\n return this;\n }", "public Builder setVersion(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n version_ = value;\n onChanged();\n return this;\n }", "public Builder setVersion(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n version_ = value;\n onChanged();\n return this;\n }", "public void setVersion(String _version) {\n this._version = _version;\n }", "Version getVersion();", "Version getVersion();", "Version getVersion();", "Version getVersion();", "public String getVer() {\r\n return this.ver;\r\n }", "public java.lang.String getVersion() {\n java.lang.Object ref = version_;\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 version_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getVersion() {\n java.lang.Object ref = version_;\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 version_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getVersion() {\n java.lang.Object ref = version_;\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 version_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getVersion() {\r\n return version;\r\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getVersionBytes() {\n java.lang.Object ref = version_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);\n version_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public static String getVersion() {\n return version;\n }", "public static String getVersion() {\n return version;\n }", "public java.lang.String getVersion() {\n java.lang.Object ref = version_;\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 version_ = s;\n return s;\n }\n }", "public java.lang.String getVersion() {\n java.lang.Object ref = version_;\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 version_ = s;\n return s;\n }\n }", "public void setVersion(String version) {\n\t\tthis.version = version;\n\t}", "protected static native String getVersion();", "public String getVersion () {\r\n return version;\r\n }", "public Builder setVersion(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n version_ = value;\n onChanged();\n return this;\n }", "public String getVersion()\n {\n return version;\n }", "public final native String getVersion() /*-{ return this.version; }-*/;", "public java.lang.String getVersion() {\n java.lang.Object ref = version_;\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 version_ = s;\n return s;\n }\n }", "public CimString getVersion() {\n return version;\n }", "public java.lang.String getVersion() {\n java.lang.Object ref = version_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n version_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public com.google.protobuf.ByteString\n getVersionBytes() {\n java.lang.Object ref = version_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n version_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }" ]
[ "0.7833991", "0.7833991", "0.7833991", "0.7833991", "0.7833991", "0.7833991", "0.7833991", "0.7833991", "0.7686232", "0.75801736", "0.75801736", "0.75801736", "0.75801736", "0.75801736", "0.75801736", "0.75801736", "0.75801736", "0.75801736", "0.75801736", "0.75801736", "0.75759315", "0.75759315", "0.7557302", "0.7552572", "0.7538051", "0.7531532", "0.7427914", "0.7364805", "0.73438656", "0.73036104", "0.730108", "0.730108", "0.730108", "0.7295589", "0.7285643", "0.7285643", "0.72856057", "0.7230539", "0.7230539", "0.72215027", "0.7211628", "0.72084236", "0.71890235", "0.71890235", "0.71890235", "0.71890235", "0.71879077", "0.71854234", "0.7170207", "0.7160292", "0.7159745", "0.7137331", "0.71335536", "0.7120633", "0.71092975", "0.71007496", "0.7097147", "0.7092755", "0.70842934", "0.7069578", "0.7066979", "0.70306903", "0.70306903", "0.70306903", "0.70276946", "0.7024359", "0.70241475", "0.70241475", "0.7011358", "0.70104045", "0.7008773", "0.7008773", "0.7008773", "0.7008547", "0.6987335", "0.6987335", "0.6987335", "0.6987335", "0.698724", "0.6976005", "0.6976005", "0.6976005", "0.6975925", "0.6961722", "0.6961722", "0.6961722", "0.6960119", "0.6945971", "0.6945971", "0.69332224", "0.69332224", "0.6932844", "0.69301975", "0.69290704", "0.6914274", "0.6905765", "0.69033086", "0.69023204", "0.6900404", "0.68981653", "0.6880119" ]
0.0
-1
1. for no user 2. for denied user 3. exeisting user but failed login Creates new form Main
public Login() { initComponents(); txtAccountStatus.setVisible(false); showDate(); // Class para sa Date showTime(); // Class para sa Time }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void login() {\n if (usrField.getText().equals(\"\") || passwordField.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(rootPane,\n \"YOU MUST ENTER USER AND PASSWORD\",\n \"ERROR\",\n JOptionPane.WARNING_MESSAGE);\n return;\n }\n\n //User.ID = userField.getText();\n User.ID = \"BPDB\";\n\n //User.password = passwordField.getText();\n\n User.password = \"BPDB\";\n\n\n //String sql = \"SELECT desig FROM BPDB.usr WHERE name = '\" + userField.getText() + \"',\"and\" +passwordField.getText() +\"'\";\n\n String sql = \"select desig from BPDB.usr where name='\" + usrField.getText()\n + \"' and password='\" + passwordField.getText() + \"'\";\n\n User.desig = Utility2.singleStOPQuery(login, sql);\n System.out.println(\"Designation : \" + User.desig);\n if (User.desig.isEmpty()) {\n\n\n JOptionPane.showMessageDialog(rootPane,\n \"YOU MUST ENTER USER AND PASSWORD\",\n \"ERROR\",\n JOptionPane.WARNING_MESSAGE);\n return;\n } else {\n\n sql = \"SELECT name FROM BPDB.usr WHERE name = '\" + usrField.getText() + \"'\";\n User.name = Utility2.singleStOPQuery(login, sql);\n\n if (User.desig.equalsIgnoreCase(\"BPDB\")) {\n setVisible(false);\n dispose();\n new HomeFrame().setVisible(true);\n\n } else if (User.desig.equalsIgnoreCase(\"DRAFT\")) {\n setVisible(false);\n dispose();\n new DRAFTFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"APPLY\")) {\n setVisible(false);\n dispose();\n new APPLYFrame().setVisible(true);\n\n } else if (User.desig.equalsIgnoreCase(\"HR\")) {\n setVisible(false);\n dispose();\n new HRFrame().setVisible(true);\n\n } else if (User.desig.equalsIgnoreCase(\"ADMIN\")) {\n setVisible(false);\n dispose();\n new ADMINFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"ACCOUNT\")) {\n setVisible(false);\n dispose();\n new ACCOUNTFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"SALARY\")) {\n setVisible(false);\n dispose();\n new SALARYFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"BILLING\")) {\n setVisible(false);\n dispose();\n new BILLINGFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"DISTRIBUTION\")) {\n setVisible(false);\n dispose();\n new DISTRIBUTIONFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"GENERATION\")) {\n setVisible(false);\n dispose();\n new GENERATIONFrame().setVisible(true);\n\n } else if (User.desig.equalsIgnoreCase(\"DHAKA\")) {\n setVisible(false);\n dispose();\n new DHAKAFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"KHULNA\")) {\n setVisible(false);\n dispose();\n new KHULNAFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"RAUJAN\")) {\n setVisible(false);\n dispose();\n new RAUJANFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"SHIDDERGANJ\")) {\n setVisible(false);\n dispose();\n new SHIDDERGANJFrame().setVisible(true);\n } else if (User.desig.equalsIgnoreCase(\"GRASHAL\")) {\n setVisible(false);\n dispose();\n new GRASHALFrame().setVisible(true);\n }\n }\n }", "protected void confirmLogin() {\n String nameString1 = this.adminName.getText();\n String passwordString1 = this.adminPassword.getText();\n UserType userType = (UserType) this.user_type_combobox.getSelectedItem();\n if (\"系统管理员\".equals(userType.getName())) {\n AdminDao adminDao = new AdminDao();\n SystemAdmin admin = adminDao.selectAdmin(nameString1, passwordString1);\n if (admin == null) {\n JOptionPane.showMessageDialog(this, \"用户名或者密码错误!!\");\n return;\n }\n IndexFrame indexFrame = new IndexFrame(userType, admin, passwordString1);\n indexFrame.setVisible(true);\n this.dispose();\n }\n }", "private void loginBD() {\n\t\t\r\n\t\tif(ConexionStatic.isDbConnected()){\r\n\t\t\ttry\r\n\t\t\t{ \r\n\t\t\t\t\r\n\t //chekar si el usuario escrbio el nombre de usuario y pw\r\n\t if (view.getTxtUser().getText().length() > 0 && view.getTxtPass().getText().length() > 0 )\r\n\t {\r\n\t \tmyUsuario.setPwd(view.getTxtPass().getText());\r\n\t \tmyUsuario.setUser(view.getTxtUser().getText());\r\n\t \tresultado=myUsuarioDao.setLogin(myUsuario);\r\n\t \t\r\n\t \tif(!resultado){//si el resultado el usuario en la bd no existe o el pwd\r\n\t \t\tJOptionPane.showMessageDialog(null, \"El nombre de usuario y/o contrasenia no son validos.\");\r\n\t //JOptionPane.showMessageDialog(null, view.getTxtUser().getText()+\" \" +view.getTxtPass().getText() );\r\n\t //view.getTxtUser().setText(\"\"); //limpiar campos\r\n\t view.getTxtPass().setText(\"\"); \r\n\t \r\n\t view.getTxtUser().requestFocusInWindow();\r\n\t \t}else{\r\n\t \t\tthis.view.setVisible(false);\r\n\t \t\tthis.view.dispose();\r\n\t \t\t\r\n\t \t}\r\n\t \t\r\n\t /*/ Si el usuario si fue validado correctamente\r\n\t if( validarUsuario( txtUser.getText(), txtPass.getText() ) ) //enviar datos a validar\r\n\t {\r\n\t // Codigo para mostrar la ventana principal\r\n\t setVisible(false);\r\n\t VentanaPrincipal ventana1 = new VentanaPrincipal();\r\n\t ventana1.mostrar();\r\n\t\r\n\t\r\n\t }\r\n\t else\r\n\t {\r\n\t JOptionPane.showMessageDialog(null, \"El nombre de usuario y/o contrasenia no son validos.\");\r\n\t JOptionPane.showMessageDialog(null, view.getTxtUser().getText()+\" \" +view.getTxtPass().getText() );\r\n\t view.getTxtUser().setText(\"\"); //limpiar campos\r\n\t view.getTxtPass().setText(\"\"); \r\n\t \r\n\t view.getTxtUser().requestFocusInWindow();\r\n\t }*/\r\n\t\r\n\t }\r\n\t else\r\n\t {\r\n\t JOptionPane.showMessageDialog(null, \"Debe escribir nombre de usuario y contrasenia.\\n\" +\r\n\t \"NO puede dejar ningun campo vacio\");\r\n\t }\r\n\t\r\n\t } catch (Exception e)\r\n\t {\r\n\t e.printStackTrace();\r\n\t }\r\n\t\t}//fin de la comprobacion de la conexion\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "private void logInBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_logInBtnActionPerformed\n User theUser = null;\n String[] options = {\"OK\"};\n String userName = userNameTF.getText();\n String password = passwordTF.getText();\n\n theUser = HF.findUser(userName);\n\n if (userNameTF.getText().equals(\"\") || passwordTF.getText().equals(\"\")){\n JOptionPane.showOptionDialog(this, \"Please fill in your username \"\n + \"and password!\",\n \"\", JOptionPane.ERROR_MESSAGE, JOptionPane.INFORMATION_MESSAGE,\n null, options, options[0] );\n }\n else if (theUser == null) {\n JOptionPane.showOptionDialog(this, \"No such username!\",\n \"\", JOptionPane.ERROR_MESSAGE, JOptionPane.INFORMATION_MESSAGE,\n null, options, options[0] );\n }\n else if (!theUser.getPassword().equals(password)) {\n JOptionPane.showOptionDialog(this, \"Invalid password!\",\n \"\", JOptionPane.ERROR_MESSAGE, JOptionPane.INFORMATION_MESSAGE,\n null, options, options[0] );\n }\n else {\n if (theUser instanceof Trainer){\n TrainerMenu tm = new TrainerMenu(this, (Trainer)theUser);\n tm.setVisible(true);\n this.setVisible(false);\n }\n else if (theUser instanceof Member){\n MemberMenu mm = new MemberMenu(this, (Member)theUser);\n mm.setVisible(true);\n this.setVisible(false);\n }\n userNameTF.setText(\"\");\n passwordTF.setText(\"\");\n }\n }", "protected boolean login() {\n\t\tString Id = id.getText();\n\t\tif (id.equals(\"\")){\n\t\t\tJOptionPane.showMessageDialog(null, \"请输入用户名!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tUserVO user = bl.findUser(Id);\n\t\tif (user == null){\n\t\t\tJOptionPane.showMessageDialog(null, \"该用户不存在!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (! user.getPassword().equals(String.valueOf(key.getPassword()))){\n\t\t\tSystem.out.println(user.getPassword());\n\t\t\tJOptionPane.showMessageDialog(null, \"密码错误!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tsimpleLoginPanel.this.setVisible(false);\n\t\tUserblService user2 = new Userbl(Id);\n\t\tReceiptsblService bl = new Receiptsbl(user2);\n\t\tClient.frame.add(new simpleMainPanel(user2,bl));\n\t\tClient.frame.repaint();\n\t\t\n\t\treturn true;\n\t\t\n\t}", "private void proseslogin() {\n String user = username.getText();\n char[] pass = password.getPassword();\n \n if (user.isEmpty()) {\n JOptionPane.showMessageDialog(this, \"Username Harus Diisi\");\n username.requestFocus();\n } else if (pass.length == 0){\n JOptionPane.showMessageDialog(this, \"Password Harus Diisi\");\n password.requestFocus();\n }else{\n String password = new String(pass);\n login.setEnabled(false);\n try {\n Connection conn = koneksi.sambungDB();\n Statement st = conn.createStatement();\n String n = \"SELECT * FROM tb_admin \"\n +\"WHERE admin_username='\"+user+\"' \"\n +\"AND admin_password=MD5('\"+password+\"')\" ;\n// System.out.println(q);\n ResultSet rs = st.executeQuery(n);\n if (rs.next()) {\n Data_perumahan h = new Data_perumahan();\n h.setExtendedState(Frame.MAXIMIZED_BOTH);\n this.setVisible(false);\n h.setVisible(true);\n }else{\n JOptionPane.showMessageDialog(this, \"Username dan Password Salah\");\n username.requestFocus();\n }\n login.setEnabled(true);\n } catch (HeadlessException | SQLException e) {\n JOptionPane.showMessageDialog(this, e.getMessage());\n }\n }\n }", "private void serchUser() {\n if (!userNameTextField.getText().isEmpty() && !passwordPasswordField.getText().isEmpty()) {\n try {\n User user = UserController.searchUserByUserName(userNameTextField.getText());\n if (user != null) {\n if (passwordPasswordField.getText().equals(user.getPassword())) {\n closeFadeOut();\n Hi hi = new Hi();\n hi.setUser(user);\n hi.setVisible(true);\n dispose();\n } else {\n JOptionPane.showMessageDialog(this, \"Incorrect username or password !\");\n passwordPasswordField.setText(\"\");\n userNameTextField.requestFocus();\n userNameTextField.selectAll();\n }\n } else {\n JOptionPane.showMessageDialog(this, \"Incorrect username or password !\");\n passwordPasswordField.setText(\"\");\n userNameTextField.requestFocus();\n userNameTextField.selectAll();\n }\n\n } catch (ClassNotFoundException ex) {\n ex.printStackTrace();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n } else {\n JOptionPane.showMessageDialog(this, \"Please enter username and password\");\n passwordPasswordField.setText(\"\");\n userNameTextField.requestFocus();\n userNameTextField.selectAll();\n }\n\n }", "public boolean logincheck(String user, String pass) \r\n {\n \r\n try{\r\n Connection conn = DriverManager.getConnection(url, userName, password);\r\n String Sql = \"Select * from APP.MEMBER where email=? and password=?\";\r\n PreparedStatement pst = conn.prepareStatement(Sql);\r\n pst.setString(1,user);\r\n pst.setString(2,pass);\r\n ResultSet rs = pst.executeQuery();\r\n if (rs.next())\r\n {\r\n JOptionPane.showMessageDialog(null,\"Welcome user\");\r\n createEventsUI w = new createEventsUI();\r\n w.setVisible(true);\r\n }\r\n else\r\n {\r\n JOptionPane.showMessageDialog(null,\"Invalid username or password\", \"Access Denied\",JOptionPane.ERROR_MESSAGE);\r\n }\r\n }catch(Exception e) \r\n {\r\n JOptionPane.showMessageDialog(null, e);\r\n }\r\n return false;\r\n \r\n }", "private void jButtonLoginActionPerformed(java.awt.event.ActionEvent evt) {\n Username= jTextUsername.getText();\n Password= String.valueOf(jPassword.getPassword()); \n if ((Username != null)&& (Password!= null)) {\n if(Common.CheckSpace(Username)!= false){\n jLabelCheckSpace.setText(\"Username must not have space. Try again!\");\n System.out.println(\"Try again!\");\n }\n else{\n if (userController.Login(Username, Password)==true) {\n System.out.println(\"Login success!\");\n try {\n DashBoard.role_user = userController.GetRole(Username);\n System.out.println(\"\"+DashBoard.role_user);\n } catch (SQLException ex) {\n Logger.getLogger(Login.class.getName()).log(Level.SEVERE, null, ex);\n }\n DashBoard dashBoard= new DashBoard();\n dashBoard.show();\n dashBoard.getjLabelUsername().setText(Username);\n this.dispose();\n }\n else{\n jLabelCheckPassword.setText(\"Password is not right! Please try again!\");\n System.out.println(\"Fail!\"); \n }\n } \n } \n }", "public void Login()throws Exception{\r\n if(eMailField.getText().equals(\"user\") && PasswordField.getText().equals(\"pass\")){\r\n displayMainMenu();\r\n }\r\n else{\r\n System.out.println(\"Username or Password Does not match\");\r\n }\r\n }", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\tuser = txt_usr.getText();\n\t\t\t\tpass = txt_pass.getText();\n\t\t\t\t//check password or id is correct or not\n\t\t\t\tif(user.equals(\"test\") && pass.equals(\"12345\")) {\n\t\t\t\t\t//if both are correct user will be loged in\n\t\t\t\t\tAccountHome reg = new AccountHome();\n\t\t\t\t\treg.setVisible(true);\n\t\t\t\t\tdispose();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//if user input incorrect details he will get alert message to input correct details\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\"Wrong Password / Username\");\n\t\t\t\t\ttxt_usr.setText(\"\");\n\t\t\t\t\ttxt_pass.setText(\"\");\n\t\t\t\t\ttxt_usr.requestFocus();\n\t\t\t\t}\n\t\t\t}", "private void login()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t//Get the connection to the database\r\n\t\t\tDatabase db = new Database();\r\n\r\n\t\t\t//Get the data and format it correctly\r\n\t\t\tString username = txtUsername.getText().trim().toLowerCase();\r\n\t\t\tString password = new String(txtPassword.getPassword()).trim();\r\n\r\n\t\t\t//Verify that user information has been inserted into the username/password fields\r\n\t\t\tif (username.length() == 0)\r\n\t\t\t{\r\n\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\tthis,\r\n\t\t\t\t\t\"Please enter your username.\",\r\n\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t);\r\n\r\n\t\t\t\ttxtUsername.requestFocus();\r\n\t\t\t}//End of if\r\n\t\t\telse if (password.length() == 0)\r\n\t\t\t{\r\n\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\tthis,\r\n\t\t\t\t\t\"Please enter your password.\",\r\n\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t);\r\n\r\n\t\t\t\ttxtPassword.requestFocus();\r\n\t\t\t}//End of else if\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif (!db.usernameExists(username))\r\n\t\t\t\t{\r\n\t\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\t\tthis,\r\n\t\t\t\t\t\t\"The username/password combination you provided does not exist.\",\r\n\t\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t\t);\r\n\r\n\t\t\t\t\ttxtPassword.setText(\"\");\r\n\t\t\t\t\ttxtPassword.requestFocus();\r\n\t\t\t\t}//End of if\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tUser user = db.loadUser(username);\r\n\t\t\t\t\tbyte [] bPassword = PasswordEncryption.hashPassword(username, password);\r\n\r\n\t\t\t\t\tif (bPassword.length != user.getPassword().length)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\t\t\t\tthis,\r\n\t\t\t\t\t\t\t\t\"The username/password combination you provided does not exist.\",\r\n\t\t\t\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\ttxtPassword.setText(\"\");\r\n\t\t\t\t\t\t\ttxtPassword.requestFocus();\r\n\t\t\t\t\t}//End of if\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tboolean same = true;\r\n\r\n\t\t\t\t\t\t//Check the passwords for equality\r\n\t\t\t\t\t\tfor (int x = 0; x < bPassword.length; x++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (bPassword[x] != user.getPassword()[x])\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tsame = false;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t}//End of if\r\n\t\t\t\t\t\t}//End of for\r\n\r\n\t\t\t\t\t\tif (same)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (user.getAccountLevel() < 10)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\t\t\t\t\tthis,\r\n\t\t\t\t\t\t\t\t\t\"You do not have sufficient rights to access this application.\",\r\n\t\t\t\t\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\t\ttxtPassword.setText(\"\");\r\n\t\t\t\t\t\t\t\ttxtPassword.requestFocus();\r\n\t\t\t\t\t\t\t}//End of if\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t//Login the user\r\n\t\t\t\t\t\t\t\tSession.login(user);\r\n\r\n\t\t\t\t\t\t\t\t//Open the dashbard\r\n\t\t\t\t\t\t\t\tSession.openWindow(new Dashboard());\r\n\r\n\t\t\t\t\t\t\t\t//Close this window\r\n\t\t\t\t\t\t\t\tthis.dispose();\r\n\t\t\t\t\t\t\t}//End of else\r\n\t\t\t\t\t\t}//End of if\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\t\t\t\t\tthis,\r\n\t\t\t\t\t\t\t\t\"The username/password combination your provided does not exist.\",\r\n\t\t\t\t\t\t\t\tApplication.NAME,\r\n\t\t\t\t\t\t\t\tJOptionPane.WARNING_MESSAGE\r\n\t\t\t\t\t\t\t);\r\n\r\n\t\t\t\t\t\t\ttxtPassword.setText(\"\");\r\n\t\t\t\t\t\t\ttxtPassword.requestFocus();\r\n\t\t\t\t\t\t}//End of else\r\n\t\t\t\t\t}//End of else\r\n\t\t\t\t}//End of else\r\n\t\t\t}//End of else\r\n\t\t}//End of try\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\t//Inform the user that the application was unable to connect to the database.\r\n\t\t\tJOptionPane.showMessageDialog(\r\n\t\t\t\tthis,\r\n\t\t\t\t\"An error occured connecting to the database.\\n\\nIf this problem continues, please contact your system administrator.\",\r\n\t\t\t\tApplication.NAME,\r\n\t\t\t\tJOptionPane.ERROR_MESSAGE\r\n\t\t\t);\r\n\t\t}//End of catch\r\n\t}", "void SubmitButton() {\r\n\t\tint checker = Accounts.checkUser(username.getText(), password.getText());\r\n\t\tif(checker == -1) {\r\n\t\t\tsetVisible(false);\r\n\t\t\tdispose();\r\n\t\t\tAdminScreen adminScreen = new AdminScreen();\r\n\t\t}\r\n\t\telse if(checker >= 0) {\r\n\t\t\tsetVisible(false);\r\n\t\t\tdispose();\r\n\t\t\tStudentScreen studentScreen = new StudentScreen(checker);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Error: username \"\r\n\t\t\t\t\t+ \"and/or password is incorrect.\");\r\n\t\t\tpassword.setText(\"\");\r\n\t\t\tusername.setText(\"\");\r\n\t\t}\r\n\t\t\r\n\t}", "private static void handleLogin(Operations o) {\n\t\tswitch(o)\n\t\t{\n\t\tcase ERROR:\n\t\t\tloginGUI.textField.setEnabled(true);\n\t\t\tloginGUI.textField_2.setEnabled(true);\n\t\t\tloginGUI.textField_1.setEnabled(true);\n\t\t\tloginGUI.EnablePassField();\n\t\t\tloginGUI.btnLogin.setEnabled(true);\n\t\t\tJOptionPane.showMessageDialog(LoginCont.mainframe, \"Error:User and/or Password is incorrect!\");\n\t\t\tloginGUI.btnExit.setEnabled(true);\n\t\t\tbreak;\n\t\tcase ALLOW_LOG:\n\t\t\tloginGUI.btnLogin.setEnabled(false);\n\t\t\tloginGUI.btnLogout.setEnabled(true);\n\t\t\tloginGUI.setVisible(false);\t\n\t\t\tMenuGUI mh1=new MenuGUI(loginGUI);\n\t\t\tString buttonNames[];\n\t\t\tbuttonNames = new String[]{\"Station Control\",\"Purchase Plan\",\"Modify Customer\",\"Manage Sales\", \"NFC Module\",\"Manage Fuel\",\"Messages\",\"Invoices\",\"Reports\", \"House Fuel Orders\"};\n\t\t\tmh1.setButtonNames(buttonNames);\n\t\t\t//get the user_type and user the string privilegeLevel to allow certain functions\n\t\t\tSystem.out.println(currUser.getUserType().toString()); // getting the usertype and user correctly\n\t\t\tboolean[] allowedButtons = currUser.getUserType().getPrivilegeLevels();\n\t\t\tfor(int i=0;i<allowedButtons.length;i++)\n\t\t\t{\n\t\t\t\tmh1.functionButton[i].setEnabled(allowedButtons[i]);\n\t\t\t\tmh1.functionButton[i].setVisible(allowedButtons[i]);\n\t\t\t}\n\t\t\tbreak; \n\t\tcase USER_ALREADY_LOGGED:\n\t\t\tJOptionPane.showMessageDialog(LoginCont.mainframe, \"Error:User Already Logged In!\");//do something else after wards like - get the full User Details and display a corresponding GUI\n\t\t\tloginGUI.textField.setEnabled(true);\n\t\t\tloginGUI.textField_2.setEnabled(true);\n\t\t\tloginGUI.textField_1.setEnabled(true);\n\t\t\tloginGUI.EnablePassField();\n\t\t\tloginGUI.btnLogin.setEnabled(true);\n\t\t\tloginGUI.btnExit.setEnabled(true);\n\t\t\tbreak;\n\t\t}\t\n\t}", "public void doLogin() {\r\n\t\tif(this.getUserName()!=null && this.getPassword()!=null) {\r\n\t\t\tcdb=new Connectiondb();\r\n\t\t\tcon=cdb.createConnection();\r\n\t\t\ttry {\r\n\t\t\t\tps=con.prepareStatement(\"Select idUser,nom,prenom,userName,type,tel from t_user where userName=? and pass=? and status=?\");\r\n\t\t\t\tps.setString(1, this.getUserName());\r\n\t\t\t\tps.setString(2, this.getPassword());\r\n\t\t\t\tif(rs.next()) {\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"idUser\", rs.getInt(\"idUser\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"nom\", rs.getString(\"nom\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"prenom\", rs.getString(\"prenom\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"userName\", rs.getString(\"userName\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"type\", rs.getString(\"type\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"tel\", rs.getString(\"tel\"));\r\n\t\t\t\t\tFacesContext.getCurrentInstance().getExternalContext().redirect(\"view/welcome.xhtml\");\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\tnew Message().error(\"echec de connexion\");\r\n\t\t\t}finally {\r\n\t\t\t\tcdb.closeConnection(con);\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\tnew Message().warnig(\"Nom d'utilisateur ou mot de passe incorrecte\");\r\n\t\t}\r\n\t}", "public void menu(){\n System.out.println(\"---------------------------Login------------------------------------\");\n \n System.out.println(\"Usuario:\");\n respuesta = scanner.nextLine();\n System.out.println(\"Contraseña:\");\n respuesta2 = scanner.nextLine();\n Usuario user = new Usuario();\n user.setNombre(respuesta);\n user.setPassword(respuesta2);\n idUser=modelo.validarUsuario(user);\n if(idUser<0){\n System.err.println(\"Usuario invalido\");\n \n }else{\n \n menuInterno();\n \n }\n//\n// menuInterno();\n// \n }", "private boolean SecuenciaValidacion() {\n String cuenta = jTextFieldUser.getText().trim();\n String contrasenia = new String(jPasswordFieldPswd.getPassword());\n\n JDialogSplash jDialogSplash = new JDialogSplash(this, ModalityType.APPLICATION_MODAL);\n jDialogSplash.setLocationRelativeTo(this);\n jDialogSplash.setVisible(true);\n\n if (cuenta.equals(id) && contrasenia.equals(pass)) {\n LOG.info(\"Logging successful\");\n return true;\n } else {\n LOG.info(\"Logging failed\");\n return false;\n }\n }", "public void login() {\n if (!areFull()) {\n return;\n }\n\n // Get the user login info\n loginInfo = getDBQuery(nameField.getText());\n if (loginInfo.equals(\"\")) {\n return;\n }\n\n // Get password and check if the entered password is true\n infoArray = loginInfo.split(\" \");\n String password = infoArray[1];\n if (!passField.getText().equals(password)) {\n errorLabel.setText(\"Wrong Password!\");\n return;\n }\n\n continueToNextPage();\n }", "private void loginbtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_loginbtnActionPerformed\n int id = Integer.parseInt(jbtnTextField.getText());\n \n if (bEmployee.isSelected())\n {\n int index = Library.login(id, String.valueOf(jbtnPassField.getPassword()), \"EMPLOYEE\");\n if (index == -1)\n {\n JOptionPane.showMessageDialog(this, \"There's no employee with this ID!!\", \"No Matching\", JOptionPane.WARNING_MESSAGE); \n }\n else if (index == 3)\n {\n JOptionPane.showMessageDialog(this, \"Wrong password!!\", \"Password\", JOptionPane.WARNING_MESSAGE);\n }\n else if (index == 999)\n {\n // Get the object\n System.out.println(\"Loged\");\n int i = Library.isAvailable(id, \"EMPLOYEE\");\n EmployeeUI eUI = new EmployeeUI(Library.employees.get(i));\n eUI.setVisible(true);\n this.dispose();\n }\n else\n {\n JOptionPane.showMessageDialog(this, \"Internal Error!!\", \"Internal\", JOptionPane.WARNING_MESSAGE);\n }\n }\n else if (bProfessor.isSelected())\n {\n int index = Library.login(Integer.parseInt(jbtnTextField.getText()), String.valueOf(jbtnPassField.getPassword()), \"PROFESSOR\");\n if (index == -1)\n {\n JOptionPane.showMessageDialog(this, \"There's no professor with this ID!!\", \"No Matching\", JOptionPane.WARNING_MESSAGE); \n }\n else if (index == 3)\n {\n JOptionPane.showMessageDialog(this, \"Wrong password!!\", \"Password\", JOptionPane.WARNING_MESSAGE);\n }\n else if (index == 999)\n {\n // Get the object\n try\n {\n System.out.println(\"Loged\");\n int i = Library.isAvailable(id, \"PROFESSOR\");\n ProfessorUI pUI = new ProfessorUI(Library.professors.get(i));\n pUI.setVisible(true);\n this.dispose();\n } catch (IndexOutOfBoundsException e)\n {\n JOptionPane.showMessageDialog(this, \"Internal Error!!\", \"Not found\", JOptionPane.WARNING_MESSAGE);\n }\n }\n else\n {\n JOptionPane.showMessageDialog(this, \"Internal Error!!\", \"Internal\", JOptionPane.WARNING_MESSAGE);\n }\n }\n else if (bStudent.isSelected())\n {\n int index = Library.login(Integer.parseInt(jbtnTextField.getText()), String.valueOf(jbtnPassField.getPassword()), \"STUDENT\");\n if (index == -1)\n {\n JOptionPane.showMessageDialog(this, \"There's no student with this ID!!\", \"No Matching\", JOptionPane.WARNING_MESSAGE); \n }\n else if (index == 3)\n {\n JOptionPane.showMessageDialog(this, \"Wrong password!!\", \"Password\", JOptionPane.WARNING_MESSAGE);\n }\n else if (index == 999)\n {\n try\n {\n System.out.println(\"Loged\");\n int i = Library.isAvailable(id, \"PROFESSOR\");\n StudentUI sUI = new StudentUI(Library.students.get(i));\n sUI.setVisible(true);\n this.dispose();\n } catch (IndexOutOfBoundsException e)\n {\n JOptionPane.showMessageDialog(this, \"Internal Error!!\", \"Not found\", JOptionPane.WARNING_MESSAGE);\n }\n }\n else\n {\n JOptionPane.showMessageDialog(this, \"Internal Error!!\", \"Internal\", JOptionPane.WARNING_MESSAGE);\n } \n }\n else\n {\n JOptionPane.showMessageDialog(this, \"You have to choose one option!\", \"Choose\", JOptionPane.WARNING_MESSAGE);\n }\n \n }", "protected void login() {\n\t\t\r\n\t}", "@SuppressWarnings(\"deprecation\")\n\tprivate void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n\t\tint id = Integer.parseInt(this.jTextField1.getText());\n\t\tString adId = this.jTextField1.getText();\n\t\tString pw = this.jPasswordField1.getText();\n\t\ttry {\n\t\t\tif(jRadioButton1.isSelected()==false&&jRadioButton2.isSelected()==false&&jRadioButton3.isSelected()==false){\n\t\t\t\tthrow new Exception(\"请选择您的角色!\");\n\t\t\t}\n\t\t\tif (jRadioButton1.isSelected()) {\n\t\t\t\tSLogin stu = ModelFactory.stulogin(id, pw);\n\t\t\t\tif (stu == null)\n\t\t\t\t\tthrow new Exception(\"用户不存在或密码错误!\");\n\t\t\t\telse\n\t\t\t\t\tnew StuMain(stu).setVisible(true);\n\t\t\t\tthis.dispose();\n\t\t\t}\n\t\t\tif (jRadioButton2.isSelected()) {\n\t\t\t\tTLogin tea = ModelFactory.tealogin(id, pw);\n\t\t\t\tif (tea == null)\n\t\t\t\t\tthrow new Exception(\"用户不存在或密码错误!\");\n\t\t\t\telse\n\t\t\t\t\tnew MainFace(tea).setVisible(true);\n\t\t\t\tthis.dispose();\n\t\t\t}\n\t\t\tif (jRadioButton3.isSelected()) {\n\t\t\t\tAdLogin ad = ModelFactory.adLogin(adId, pw);\n\t\t\t\tif (ad == null)\n\t\t\t\t\tthrow new Exception(\"用户不存在或密码错误!\");\n\t\t\t\telse\n\t\t\t\t\tnew Admin(ad).setVisible(true);\n\t\t\t\tthis.dispose();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tJOptionPane.showMessageDialog(this, e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "private void LoginButtonActionPerformed(java.awt.event.ActionEvent evt) {\n String id = jTextField2.getText().toString();\n String password = jPasswordField1.getText();\n \n \n \n String getusername = jTextField2.getText().toString();\n String display=lms.DisplayName(getusername);\n System.out.println(display);\n switch (selected) {\n case 1:\n {\n boolean logincheck=lms.checkBorrowerLogin(id,password);\n if(logincheck){\n BorrowerHome b = new BorrowerHome(lms,display,id);\n b.setVisible(true);\n }\n break;\n }\n case 2:\n {\n boolean logincheck=lms.checkClerkLogin(id,password);\n if(logincheck){\n ClerkHome c = new ClerkHome(lms,display,id);\n c.setVisible(true);\n }\n else\n {\n JOptionPane.showMessageDialog(null,\"Invalid login\");\n } \n break;\n }\n case 3:\n { \n boolean logincheck=lms.checkLibrarianLogin(id,password);\n if(logincheck){\n LibrarianHome c = new LibrarianHome(lms,display,id);\n c.setVisible(true);\n }\n else\n {\n JOptionPane.showMessageDialog(null,\"Invalid login\");\n } \n break;\n }\n default:\n {\n boolean logincheck=lms.checkBorrowerLogin(id,password);\n if(logincheck){\n BorrowerHome b = new BorrowerHome(lms,display,id);\n b.setVisible(true);\n }\n else\n {\n JOptionPane.showMessageDialog(null,\"Invalid login\");\n } \n break;\n }\n }\n \n// else\n// {\n// JOptionPane.showMessageDialog(null,\"Invalid login\");\n// } \n\n \n }", "private void checkUser() {\n\t\tloginUser = mySessionInfo.getCurrentUser();\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tString user = userInput.getText();\r\n\t\t\t\tString password = passwordInput.getText();\r\n\t\t\t\tnew controlador.Login().checkUser(user, password);\t\r\n\t\t\t\tdispose();\r\n\t\t\t\t//if (usr.checkUserAndPass(user, password)) { \r\n\t\t\t\t//Login atras1 = new Login(); \r\n\t\t\t\t//atras1.setVisible(true); \r\n\t\t\t\t//setVisible(false); \r\n//} else { \r\n\t//JOptionPane.showMessageDialog(null, \"Usuario no reconocido\"); }\r\n\t\t\t\t//new vista.ElegirEquipo().setVisible(true);\r\n\t\t\t\t\r\n\t\t\t}", "private void logIn() {\n char[] password = jPasswordField1.getPassword();\n String userCode = jTextField1.getText();\n\n String txtpassword = \"\";\n for (char pw : password) {\n txtpassword += pw;\n }\n if (\"\".equals(txtpassword)) {\n JOptionPane.showMessageDialog(this, textBundle.getTextBundle().getString(\"enterPassword\"), \"No Password\", JOptionPane.WARNING_MESSAGE);\n } else if (txtpassword.equals(userData.get(0).toString())) {\n jPasswordField2.setEnabled(true);\n jPasswordField3.setEnabled(true);\n jPasswordField2.setEditable(true);\n jPasswordField3.setEditable(true);\n jPasswordField2.grabFocus();\n }\n }", "private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed\n JOptionPane.showMessageDialog(this.controllingFrame,\"Loggout efetuado\",\"INFORMAÇÃO\",JOptionPane.INFORMATION_MESSAGE);\n dispose();\n Login a = new Login(this.d);\n a.execLogin();\n }", "private void login() {\r\n\r\n if (String.valueOf(login_usernameTextField.getText()).equals(\"\"))\r\n JOptionPane.showMessageDialog\r\n (null, \"Must Enter A Username\");\r\n\r\n else if (String.valueOf(login_passwordField.getPassword()).equals(\"\"))\r\n JOptionPane.showMessageDialog\r\n (null, \"Must Enter A Password\");\r\n\r\n else if (MainGUI.pimsSystem.staff_exists(login_usernameTextField.getText(), String.valueOf(login_passwordField.getPassword()))) {\r\n remove(loginPanel);\r\n add(tabbedPane);\r\n JOptionPane.showMessageDialog\r\n (null, \"Login Successful\");\r\n repaint();\r\n revalidate();\r\n\r\n // reset username and password fields\r\n login_usernameTextField.setText(\"\");\r\n login_passwordField.setText(\"\");\r\n\r\n } else\r\n JOptionPane.showMessageDialog\r\n (null, \"Invalid Password or Username\");\r\n }", "@Override\r\n\tpublic boolean checkLogin() {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean checkLogin() {\n\t\treturn false;\r\n\t}", "private void LoginOwner() {\n Transaksi.setEnabled(false);\n Transaksi.setVisible(false);\n }", "public void logins(){\n \n \n \n String username=txtUser.getText();\n String password=txtPass.getText();\n String sql;\n\n \n try {\n Class.forName(\"com.mysql.jdbc.Driver\");\n conn = (Connection) DriverManager.getConnection(\"jdbc:mysql://\"+host+\"/\"+db+\"?user=\"+user+\"&password=\"+pass);\n sql =\"Select * from user WHERE username ='\" +txtUser.getText() + \"'\";\n PreparedStatement st = (PreparedStatement) conn.prepareStatement(sql);\n ResultSet rs =st.executeQuery(); \n if(rs.next()) {\n String pasas = rs.getString(\"password\");\n if(password.equals(pasas)){\n JOptionPane.showMessageDialog(this, \"Login Berhasil\");\n \n Home tampil=new Home();\n tampil.setVisible(true);\n dispose();\n \n }else{\n JOptionPane.showMessageDialog(this, \"Username tidak terdaftar\");\n txtUser.requestFocus();\n }\n }else{\n JOptionPane.showMessageDialog(this, \"Username tidak terdaftar\");\n txtUser.requestFocus();\n }\n }catch (Exception e) {\n JOptionPane.showMessageDialog(this,e.getMessage());\n }\n \n }", "private void loginButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_loginButtonMouseClicked\n //Make a default user object and bind the input data\n User loginUser;\n loginUser = new User(emailField.getText(), new String(passwordField.getPassword()));\n //Check hashed credentials against database\n //JEncryption encrypter = new JEncryption();\n //loginUser.setPswd(new String(encrypter.encrypt(loginUser.getPswd())));\n try\n {\n if(loginUser.login())\n {\n //If successful load the view\n //System.out.println(loginUser.toString());\n View v = new View(loginUser.getRole(), loginUser.getUserId());\n v.setVisible(true);\n this.setVisible(false);\n }\n //If not, pop out a login failed message\n else\n {\n JOptionPane.showMessageDialog(null, \"No user with that e-mail/password combination found.\");\n }\n }\n catch(DLException d)\n {\n JOptionPane.showMessageDialog(null, \"Connection Error. Please contact an administrator if the problem persists.\");\n }\n }", "@Override\r\npublic void actionPerformed(ActionEvent e) {\n\tString str=e.getActionCommand();\r\n\tif(str.equalsIgnoreCase(\"login\")){\r\n\t\t//System.out.println(\"login\");\r\n\t\tString e1=name.getText();\r\n\t\tString e2=password.getText();\r\n\t\tConnection conn=DBUtility.getConnections();\r\n\t\tString sql=\"SELECT * FROM login where name=? and password=?\";\r\n\t\tSystem.out.println(\"ju\");\r\n\t\ttry{\r\n\t\t\tPreparedStatement ps=conn.prepareStatement(sql);\r\n\t\t\t\r\n\t\t\tps.setString(1,e1);\r\n\t\t\tps.setString(2, e2);\r\n\t\t\tSystem.out.println(\"n\");\r\n\t\t\tResultSet rs=ps.executeQuery();\r\n\t\t\tSystem.out.println(\"jhj\");\r\n\t\t\t//int i=rs.getRow();\r\n\t\t\twhile(rs.next()){\r\n\t\t\tJOptionPane.showMessageDialog(null,\"LOGIN SUCCESSFUL!\");\r\n\t\t\tc=1;\t\r\n\t\t\t\tnew Main();\r\n\t\t\t f.dispose();\r\n\t\t\t}\r\n\t\t\tif(c==0){\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"WRONG USERNAME OR PASSWORD\");}//try\r\n\t\t\t}\r\n\t\tcatch(Exception e11){\r\n\t\t\t\r\n\t\t}\r\n\t\tfinally{\r\n\t\t\ttry{\r\n\t\t\t\tconn.close();\r\n\t\t\t}\r\n\t\t\r\n\t\t\tcatch(Exception e21){\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}}\r\n\t\r\n\t\telse if(str.equalsIgnoreCase(\"sign up\")){\r\n\t\tnew Signup();\r\n\t\tf.dispose();\r\n\t}}", "public static boolean login() {\n\t\t// DB\n\t\tString[] usr = { \"NICOLAS\", \"CELESTE\" };\n\t\tString[] pass = { \"cerveza\", \"fernet\" };\n\t\tString usrAuth = \"\";\n\t\tboolean auth = false;\n\t\tint intentos = 1;\n\n\t\tdo {\n\t\t\tJTextField usuario = new JTextField();\n\t\t\tJTextField password = new JPasswordField();\n\t\t\tObject[] ingresarUsuarioPassword = { \"Usuario: \", usuario, \"Password\", password };\n\t\t\tint ingresarLogin = JOptionPane.showConfirmDialog(null, ingresarUsuarioPassword,\n\t\t\t\t\t\"Ingrese credenciales de usuario\", JOptionPane.OK_CANCEL_OPTION);\n\t\t\tif (ingresarLogin == JOptionPane.OK_OPTION) {\n\t\t\t\t// Busca el usuario en un bucle For\n\t\t\t\tfor (int i = 0; i < usr.length; i++) {\n\t\t\t\t\t// Si encuentra el usuario, verifica si el usuario y la contraseña coinciden\n\t\t\t\t\tif (usr[i].equals(usuario.getText().toUpperCase()) && pass[i].equals(password.getText())) {\n\t\t\t\t\t\tusrAuth = usr[i];\n\t\t\t\t\t\tauth = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Si no coincide, muestra los intentos restantes y vuelve a pedir credenciales\n\t\t\t\tif (!auth) {\n\t\t\t\t\tif (intentos < 3) {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\"Usuario y/o Password incorrecto\\n\" + (3 - intentos) + \" Intentos restantes\",\n\t\t\t\t\t\t\t\t\"Usuario y/o Password incorrecto\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\t\t\tintentos++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\"Usuario y/o Password incorrecto\\n\" + \"Se supero en numero de intentos\",\n\t\t\t\t\t\t\t\t\"Usuario y/o Password incorrecto\", JOptionPane.WARNING_MESSAGE);\n\t\t\t\t\t\tintentos++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Cierra si no se selecciona OK\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (!auth & (intentos <= 3));\n\t\t// Si autentica, muestra mensaje de bienvenida\n\t\tif (auth)\n\t\t\tJOptionPane.showMessageDialog(null, \"Bienvenido \" + usrAuth, \"Bienvenido\", JOptionPane.INFORMATION_MESSAGE);\n\t\treturn auth;\n\t}", "private void entrar() {\n\n Connection con = Conexao.abrirConexao();\n UsuarioDAO ud = new UsuarioDAO(con);\n String login = txtLOGIN.getText();\n String senha = txtSENHA.getText();\n String nome;\n\n if (txtLOGIN.getText().equals(\"admin\")) {\n nome = \"Administrador\";\n } else {\n nome = ud.retornarUsuario(login);\n }\n\n if (/*ud.logar(login, senha) == 0 ||*/ login.equals(\"admin\") && senha.equals(\"admin\")) {\n lblERRO.setText(\"\");\n JFrame principal = new frm_PRINCIPAL(login, nome);\n this.dispose();\n principal.setVisible(true);\n\n } else {\n\n lblERRO.setText(\"Usuário e/ou Senha Inválidos!\");\n }\n Conexao.fecharConexao(con);\n }", "public LoginGUI1(String judul, int posX, int posY, int width,\n\t\t\tint height, JFrame parent) {\n\t\tsetBounds(100, 100, 450, 300);\n\t\tgetContentPane().setLayout(null);\n\t\t\n\t\tJLabel label = new JLabel(\"\");\n\t\tlabel.setBounds(41, 60, 46, 14);\n\t\tgetContentPane().add(label);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"ID :\");\n\t\tlblNewLabel.setBounds(51, 125, 46, 14);\n\t\tgetContentPane().add(lblNewLabel);\n\t\t\n\t\tJLabel lblNewLabel_1 = new JLabel(\"Password :\");\n\t\tlblNewLabel_1.setBounds(51, 164, 60, 14);\n\t\tgetContentPane().add(lblNewLabel_1);\n\t\t\n\t\ttxtUser = new JTextField();\n\t\ttxtUser.setBounds(168, 122, 86, 20);\n\t\tgetContentPane().add(txtUser);\n\t\ttxtUser.setColumns(10);\n\t\t\n\t\tJButton btnLogin = new JButton(\"Login\");\n\t\tbtnLogin.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString usr=txtUser.getText();\n\t\t\t\t//String pass=Users.generateMD5(txtPass.getText());\n\t\t\t\t//String pDef=Users.generateMD5(\"lh091011\");\n\t\t\t\tString pass=(txtPass.getText());\n\t\t\t\tString pDef=(\"lh091011\");\n\t\t\t\t\n\t\t\t\tint jml=ut.viewAll().size();\n\t\t\t\tUsers lg=ut.cariById(txtUser.getText());\n\t\t\t\tif(jml==0 && usr.equals(\"adm\") && pass.equals(pDef)){\n\t\t\t\t\t((MainGUI)getParent()).setLogin(\"adm\",\"A\");\n\t\t\t\t\tdispose();\n\t\t\t\t}else if(usr.equals(lg.getId()) && pass.equals(lg.getPass())){\n\t\t\t\t\t((MainGUI)getParent()).setLogin(lg.getId(),lg.getJenis());\n\t\t\t\t\tdispose();\n\t\t\t\t}else{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Username dan Password salah\", \"Toko Obat\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnLogin.setBounds(55, 207, 89, 23);\n\t\tgetContentPane().add(btnLogin);\n\t\t\n\t\tJButton btnExit = new JButton(\"Exit\");\n\t\tbtnExit.setBounds(165, 207, 89, 23);\n\t\tgetContentPane().add(btnExit);\n\t\t\n\t\ttxtPass = new JPasswordField();\n\t\ttxtPass.setBounds(168, 161, 86, 20);\n\t\tgetContentPane().add(txtPass);\n\t\t\n\t\tJLabel lblSilahkanLoginDisini = new JLabel(\"Silahkan Login Disini\");\n\t\tlblSilahkanLoginDisini.setFont(new Font(\"Sylfaen\", Font.PLAIN, 13));\n\t\tlblSilahkanLoginDisini.setBounds(103, 85, 126, 14);\n\t\tgetContentPane().add(lblSilahkanLoginDisini);\n\t\t\n\t\tJLabel lblNewLabel_2 = new JLabel(\"Aplikasi Penjualan Toko Obat Herbal\");\n\t\tlblNewLabel_2.setFont(new Font(\"Traditional Arabic\", Font.PLAIN, 15));\n\t\tlblNewLabel_2.setBounds(41, 60, 237, 14);\n\t\tgetContentPane().add(lblNewLabel_2);\n\n\t}", "public void login() {\n\t\tUser user = new User(\"admin\", \"12345678\", Role.ADMIN);\n\t\tuser.setEmail(\"[email protected]\");\n\t\t\n\t\tif(user != null) {\n\t\t\tuserBean.setLoggedInUser(user);\n\t\t\tFacesContext context = FacesContext.getCurrentInstance();\n\t\t\tHttpServletRequest req = (HttpServletRequest)context.getExternalContext().getRequest();\n\t\t\treq.getSession().setAttribute(ATTR_USER, user);\n\t\t}else{\n\t\t\tkeepDialogOpen();\n\t\t\tdisplayErrorMessageToUser(\"Wrong Username/Password. Try again\");\n\t\t}\n\t\t\n\t}", "private void initialize() {\r\n\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 842, 468);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\n\r\n\t\tframe.setIconImage(Toolkit.getDefaultToolkit().getImage(\"C:\\\\Users\\\\kinjolnath\\\\Desktop\\\\logo2.jpg\"));\r\n\t\tframe.setTitle(\"Crime Reporting System\");\r\n\t\tframe.getContentPane().setBackground(Color.BLACK);\r\n\t\tframe.setBounds(100, 100, 842, 468);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setBackground(Color.BLACK);\r\n\t\t\r\n\t\tpasswordField = new JPasswordField();\r\n\t\tpasswordField.setToolTipText(\"Password\");\r\n\t\tpasswordField.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\t\r\n\t\tJButton btnLogin = new JButton(\"Login\");\r\n\t\tbtnLogin.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\t\r\n\t\t\t java.sql.Connection conn;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tconn = DriverManager.getConnection (Main.url,\"clint\",\"passkey1\");\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t java.sql.PreparedStatement pst=conn.prepareStatement(\"Select * from user where user_id=? and password=?\");\r\n\t\t\t\t pst.setString(1, txtUsername.getText());\r\n\t\t\t\t pst.setString(2, passwordField.getText());\r\n\t\t\t\t \r\n\t\t\t\t ResultSet set= pst.executeQuery();\r\n\t\t\t\t int flag=0;\r\n\t\t\t\t while(set.next()){\r\n\t\t\t\t \t \r\n\t\t\t\t \t flag=1;\r\n\t\t\t\t \t if (set.getString(\"Designation\").equals(\"Informer\")){\r\n\t\t\t\t \t\t \r\n\t\t\t\t \t\t UserProf.main();\r\n\t\t\t\t \t\t frame.setVisible(false); \r\n\t\t\t\t \t\t \r\n\t\t\t\t \t }\r\n\t\t\t\t \t else if(set.getString(\"Designation\").equals(\"Admin\")){\r\n\t\t\t\t \t\t \r\n\t\t\t\t \t\t admin_welcome.main();\r\n\t\t\t\t \t\t frame.setVisible(false);\r\n\t\t\t\t \t }\r\n\t\t\t\t \t else if(set.getString(\"Designation\").equals(\"Executive\")) {\r\n\t\t\t\t \t\t \r\n\n\t\t\t\t \t\t Executive_home.main();\r\n\n\t\t\t\t \t\t frame.setVisible(false);\r\n\t\t\t\t \t }\r\n\t\t\t\t \t else{\r\n\t\t\t\t \t\t JOptionPane.showMessageDialog(null, \"You have not been assigned a designation. Try contacting the admin\");\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 \r\n\t\t\t\t }\r\n\t\t\t\t conn.close();\r\n\t\t\t\t if (flag==0){\r\n\t\t\t\t \t JOptionPane.showMessageDialog(null, \"User not found\");\r\n\t\t\t\t }\r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t\t} catch (SQLException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n//\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Connection failed\"+e);\r\n\t\t\t\t\t\te.printStackTrace();\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\r\n\n\t\tbtnLogin.setBackground(Color.GREEN);\r\n\t\tbtnLogin.setForeground(Color.BLACK);\r\n\t\t//frame.setSize(Toolkit.getDefaultToolkit().getScreenSize());\r\n\t\t//frame.setExtendedState(JFrame.MAXIMIZED_BOTH);\r\n\t\t//frame.setVisible(true);\r\n\t\t//frame.setExtendedState(frame.getExtendedState() | JFrame.MAXIMIZED_BOTH);\r\n\t\t\r\n\n\t\ttxtUsername = new JTextField();\r\n\t\ttxtUsername.setForeground(Color.BLACK);\r\n\t\ttxtUsername.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\ttxtUsername.setColumns(10);\r\n\t\tGroupLayout gl_panel = new GroupLayout(panel);\r\n\t\tgl_panel.setHorizontalGroup(\r\n\t\t\tgl_panel.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addGroup(gl_panel.createSequentialGroup()\r\n\t\t\t\t\t.addGroup(gl_panel.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t\t.addGroup(gl_panel.createSequentialGroup()\r\n\t\t\t\t\t\t\t.addGap(87)\r\n\t\t\t\t\t\t\t.addGroup(gl_panel.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t\t\t\t.addComponent(passwordField, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE)\r\n\t\t\t\t\t\t\t\t.addComponent(txtUsername, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE)))\r\n\t\t\t\t\t\t.addGroup(gl_panel.createSequentialGroup()\r\n\t\t\t\t\t\t\t.addGap(145)\r\n\t\t\t\t\t\t\t.addComponent(btnLogin, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n\t\t\t\t\t\t\t.addGap(58)))\r\n\t\t\t\t\t.addGap(74))\r\n\t\t);\r\n\t\tgl_panel.setVerticalGroup(\r\n\t\t\tgl_panel.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addGroup(gl_panel.createSequentialGroup()\r\n\t\t\t\t\t.addContainerGap(32, Short.MAX_VALUE)\r\n\t\t\t\t\t.addComponent(txtUsername, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t.addComponent(passwordField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t.addGap(17)\r\n\t\t\t\t\t.addComponent(btnLogin)\r\n\t\t\t\t\t.addGap(27))\r\n\t\t);\r\n\t\tpanel.setLayout(gl_panel);\r\n\t\t\r\n\t\tlblNewLabel = new JLabel(\"New label\");\r\n\t\tlblNewLabel.setIcon(new ImageIcon(\"./src/logo2.jpg\"));\r\n\n\t\t\r\n\n\t\t\r\n\t//\tJLabel lblNewLabel_1 = new JLabel(\"New label\");\r\n\t\t//lblNewLabel_1.setIcon(new ImageIcon(\"./src/logo2.jpg\"));\r\n\t\tGroupLayout groupLayout = new GroupLayout(frame.getContentPane());\r\n\t\tgroupLayout.setHorizontalGroup(\r\n\t\t\tgroupLayout.createParallelGroup(Alignment.TRAILING)\r\n\t\t\t\t.addGroup(groupLayout.createSequentialGroup()\r\n\t\t\t\t\t.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t\t.addGroup(groupLayout.createSequentialGroup()\r\n\t\t\t\t\t\t\t.addGap(200)\r\n\t\t\t\t\t\t\t.addComponent(lblNewLabel, GroupLayout.PREFERRED_SIZE, 406, GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t\t.addGroup(groupLayout.createSequentialGroup()\r\n\t\t\t\t\t\t\t.addGap(226)\r\n\t\t\t\t\t\t\t.addComponent(panel, GroupLayout.PREFERRED_SIZE, 334, GroupLayout.PREFERRED_SIZE)))\r\n\t\t\t\t\t.addContainerGap(220, Short.MAX_VALUE))\r\n\t\t);\r\n\t\tgroupLayout.setVerticalGroup(\r\n\t\t\tgroupLayout.createParallelGroup(Alignment.TRAILING)\r\n\t\t\t\t.addGroup(groupLayout.createSequentialGroup()\r\n\t\t\t\t\t.addGap(20)\r\n\t\t\t\t\t.addComponent(lblNewLabel, GroupLayout.PREFERRED_SIZE, 241, Short.MAX_VALUE)\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addComponent(panel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t.addGap(12))\r\n\t\t);\r\n\n\t\tframe.getContentPane().setLayout(groupLayout);\r\n\t\t\r\n\t\tframe.getRootPane().setDefaultButton(btnLogin);\r\n\n\t\t\n\t\tbtnLogin.requestFocus();\r\n\t}", "private void button1ActionPerformed(ActionEvent e) throws InterruptedException, SQLException, ClassNotFoundException {\n // TODO add your code here\n try {\n controllerConnection.isConnected(textField1.getText(), passwordField1.getText());\n\n } catch (SQLException | ClassNotFoundException throwables) {\n throwables.printStackTrace();\n }\n if (controllerConnection.getIsConnect()) {\n try {\n controllerConnection.updateUser(getEmailActualUser());\n } catch (SQLException | ClassNotFoundException throwables) {\n throwables.printStackTrace();\n }\n int permission = controllerConnection.testPermission();\n switch (permission) {\n case 0 -> System.out.println(\"Erreur - Permission non reconnu\");\n case 1 -> {\n root.setVisible(false);\n AdminView adminView = new AdminView(controllerConnection, true);\n }\n case 2 -> {\n root.setVisible(false);\n\n AdminView adminView = new AdminView(controllerConnection, false);\n }\n case 3 -> {\n root.setVisible(false);\n\n TeacherView teacherView = new TeacherView(controllerConnection);}\n case 4 ->{\n root.setVisible(false);\n StudentView studentView = new StudentView(controllerConnection);}\n }\n }\n\n if(controllerConnection.getIsIdFaild()){\n IdFail.setVisible(true);\n controllerConnection.idFailed =false;\n }\n }", "private void LoginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_LoginActionPerformed\n\n Connection connection = null;\n try {\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\n\n String ConnectionURL = \"jdbc:mysql://localhost:3306/weddinghallreservation\";\n \n PreparedStatement q;\n\n \n connection = DriverManager.getConnection(ConnectionURL, \"root\", \"1212\");\n \n\n Id = id.getText();\n \n if (Id.startsWith(\"12\")) {\n // Query to bring the login information of the owner from Owner table\n q = connection.prepareStatement(\"Select `idOwner` , `Password` from `owner` where `idOwner`=? AND `Password`=? \");\n q.setString(1, Id);\n q.setString(2, String.valueOf(Password.getPassword()));\n ResultSet r = q.executeQuery();\n \n if (r.next()) { // Moving to the Owner home page\n OwnerPage_Home ob = new OwnerPage_Home();\n ob.setVisible(true);\n this.setVisible(false);\n\n } else { // In case the password is incorrect\n incorrectPass.setText(\"Incorrect email or password\");\n }\n\n } else {\n // Query to bring the login information of the tenant from Tenant table\n q = connection.prepareStatement(\"Select `idTenant` , `Password` from `tenant` where `idTenant`=? AND `Password`=? \");\n q.setString(1, Id);\n q.setString(2, String.valueOf(Password.getPassword()));\n ResultSet r = q.executeQuery();\n\n if (r.next()) { // Moving to the Tenant home page\n TenantPage_Home ob = new TenantPage_Home();\n ob.setVisible(true);\n this.setVisible(false);\n } else {\n\n incorrectPass.setText(\"Incorrect email or password\");\n }\n\n }\n\n connection.close();\n\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, ex.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void btn_LoginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btn_LoginActionPerformed\n // Connect to database and verify login credentials\n try{\n String valid = \"\";\n // Connect to the database\n DBConnect con = new DBConnect();\n // SQL query statement\n ResultSet rs = con.getStatement().executeQuery(\"SELECT [PlayerId]\" +\n \", [Username], [Password] FROM LoginInfo\");\n\n // Validate the username and password\n while(rs.next()){\n /* If the username and password are incorrect then skip through\n the loop */\n if(!rs.getString(2).equals(txt_userName.getText()) ||\n !Arrays.equals(rs.getString(3).toCharArray(),\n password_password.getPassword())){\n continue;\n }\n // If username and password are correct then log in\n playerId = Integer.parseInt(rs.getString(1));\n valid = \"Login Successful\";\n\n // Create and display Main Form\n new frm_Main(playerId).setVisible(true);\n\n // Close database connection and dispose of this form\n con.getConnection().close();\n this.dispose();\n }\n // If username and password are not valid then print invalid\n if(valid.equals(\"\")){\n JOptionPane.showMessageDialog(null, \"Incorrect Username or Password!!\");\n txt_userName.setText(\"\");\n password_password.setText(\"\");\n txt_userName.requestFocus();\n }\n }catch(Exception ex){ // Print error is there is a problem with database\n System.out.println(\"Error: \" + ex);\n }\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n if (e.getSource() == submitButton) {\n username = usernameInput.getText();\n password = passwordInput.getText();\n\n //Check lengths\n for(int i = 0; i < JavaMySQL.username_vector.length;i++)\n {\n if(username.equals(JavaMySQL.username_vector[i]))\n {\n //System.out.println(\"username good\");\n if(password.equals(JavaMySQL.passwords_vector[i]))\n {\n // System.out.println(\"pw good\");\n\n if(JavaMySQL.mechanic_status[i] == 0)\n {\n ClientGUI clientGUI = new ClientGUI(username);\n\n }\n else\n {\n MechanicGUI mechanicGUI = new MechanicGUI(username);\n }\n }\n }\n\n }\n\n //If lengths are ok, code inside \"else\"\n// else{\n// //Add query to check if user exists in DB\n// frame.setVisible(false);\n// }\n }\n\n }", "private void btnLoginActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLoginActionPerformed\n String user = tfdCodInregistrare.getText();\n if (user.equals(cod)){\n MainForm mf = new MainForm();\n mf.setVisible(true);\n this.dispose();\n }\n else{\n JOptionPane.showMessageDialog(this, \"Codul este incorect!!!\");\n tfdCodInregistrare.getText();\n }\n }", "private void loginCliente(){\n Scanner s = new Scanner(System.in); int contador = 0;\n String username,pass,k;\n try{\n do{\n System.out.println(\"Introduza o seu username\");\n username= s.nextLine();\n System.out.println(\"Introduza a sua password\");\n pass = s.nextLine();\n contador++;\n k = b_dados.checkUserPassUtil(username,pass);\n if(k.equals(\"NOK\")) System.out.println(\"Dados de acesso inválidos ou não registado\\n\");\n }while(k.equals(\"NOK\")&& contador < 3);\n if(k.equals(\"NOK\")) //menuInicial();\n return;\n\n else menuCliente(username);\n }\n catch(InputMismatchException e){\n System.out.println(\"Entrada inválida\");\n menuInicial();\n return;\n\n }\n }", "public login() {\n\n initComponents();\n \n usuarios.add(new usuarios(\"claudio\", \"claudioben10\"));\n usuarios.get(0).setAdminOno(true);\n \n }", "private void validateLoginUser() {\n\t\tUser user = userDao.getByPin(et_password.getText().toString());\n\t\tSession.setDriver(user);\n\n\t\tif (user.getWorkStatus().equals(User.STATUS_INACTIVE)) {\n\n\t\t\tdoLogin();\n\t\t} else {\n\t\t\tString locAt = \"\";\n\t\t\tif (user.getWorkStatus().equals(User.STATUS_IN_VEHICLE)) {\n\t\t\t\tVehiclesDao dao = new VehiclesDao();\n\t\t\t\tlocAt = dao.getById(user.getCurrentVehicleId()).getName();\n\t\t\t} else {\n\t\t\t\tServiceLocationDao dao = new ServiceLocationDao();\n\t\t\t\tlocAt = dao.getById(user.getCurrentServiceLocationId()).getName();\n\t\t\t}\n\t\t\tString msg = \"You are currently marked as \" + user.getWorkStatus() + \" at \" + locAt + \" since \" + user.getWorkStatusDate()\n\t\t\t\t\t+ \"\\n\" + \"Do you want to continue and override this status?\";\n\t\t\tAlertDialog.Builder alert_box = new AlertDialog.Builder(this);\n\t\t\talert_box.setIcon(R.drawable.icon);\n\t\t\talert_box.setMessage(msg);\n\t\t\talert_box.setPositiveButton(\"YES\", new DialogInterface.OnClickListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tdoPunchOut(et_password.getText().toString());\n\t\t\t\t\tdoLogin();\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}\n\t\t\t});\n\t\t\talert_box.setNeutralButton(\"NO\", new DialogInterface.OnClickListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tdialog.dismiss();\n\t\t\t\t}\n\t\t\t});\n\n\t\t\talert_box.show();\n\t\t}\n\t}", "private void loginButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_loginButtonActionPerformed\n uL.setVisible(true);\n boolean isLoggedInNew = uL.isLoggedIn();\n boolean isLoggedIn = na.isLoggedIn();\n if (isLoggedInNew || isLoggedIn) {\n dm.messageMustLogOut();\n uL.dispose();\n }\n }", "public void premutoLogin()\n\t{\n\t\tnew _FINITO_funzione_loginGUI();\n\t}", "protected void submitAction() {\n\t\ttry {\n\t\t\tString username = userField.getText();\n\t\t\tAbstractAgent loggedClient = parent.getAgent().login(username, new String(passField.getPassword()));\n\t\t\tif (loggedClient instanceof AdminMS) {\n\t\t\t\tAdminUI adminUI = new AdminUI((AdminMS) loggedClient);\n\t\t\t\tparent.setVisible(false);\n\t\t\t\tadminUI.run();\n\t\t\t} else if (loggedClient instanceof IUser) {\n\t\t\t\tUserUI userUI = new UserUI((IUser) loggedClient);\n\t\t\t\tparent.setVisible(false);\n\t\t\t\tuserUI.run();\n\t\t\t}\n\t\t\tif (loggedClient != null)\n\t\t\t\tparent.dispose();\n\t\t} catch (LoginException e) {\n\t\t\tmessageLabel.setText(e.getMessage());\n\t\t} catch (RemoteException e) {\n\t\t\tJOptionPane.showMessageDialog(parent, e);\n\t\t}\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tif (arg0.getActionCommand().equals(\"LOGIN\")) {\n\t\t\t\n\t\t\t// Verify username is valid and acquire associated password for account\n\t\t\tString username = usernameTF.getText();\n\t\t\t\n\t\t\t// Database: Check for username\n\t\t\tif (username == \"jmn7080\") {\n\t\t\t\t// Get password from database\n\t\t\t//\tcorrectPassword = getAssociatedPassword(username);\n\t\t\t\t\n\t\t\t\t// Retrieve password input by user\n\t\t\t\tchar[] input = passwordPF.getPassword();\n\t\t\t\tchar[] correctPassword = { 's', 'a', 'v', 'e', 'm', 'e'};\n\t\t\t\t\n\t\t\t\tif (isPasswordCorrect(input, correctPassword)) {\n\t\t\t\t\tJOptionPane.showMessageDialog(newUserWindow,\"Success! You typed the right password.\");\n\t\t\t\t\tloginWindow.dispose();\n\t\t\t\t\tcreateTempData();\n\t\t\t\t\tteacherPortalScreen();\n\t\t\t\t\t\n\t\t } else {\n\t\t \t\t\tJOptionPane.showMessageDialog(newUserWindow,\"Invalid password. Try again.\",\n\t\t \"Error Message\", JOptionPane.ERROR_MESSAGE);\n\t\t usernameTF.setText(\"\");\n\t\t passwordPF.setText(\"\");\n\t\t \n\t\t // Zero out the possible password, for security.\n\t\t Arrays.fill(input, '0');\n\t\t }\n\t\t\t\t\n\t\t\t\t// Zero out the possible password, for security.\n\t Arrays.fill(input, '0');\n\t \n\t passwordPF.selectAll();\n\t resetFocus();\n\t\t\t} \n\t\t}\n\t}", "private void btnLogInActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLogInActionPerformed\n if(mngr!=null){\n if(mngr.LogIn(txtUsername.getText(), new String(txtPassword.getPassword()))){\n this.dispose();\n } else {\n JOptionPane.showConfirmDialog(this, \"Could not log you in. Check login, password or connection.\");\n }\n }\n }", "public login(JFrame frame, Authenticator auth) {\n\t\tsetBackground(Color.GRAY);\n\t\t\n\t\tJLabel lblWelcomeToOpen = new JLabel(\"Welcome to the Open Journal Submission System\");\n\t\tlblWelcomeToOpen.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblWelcomeToOpen.setBounds(10, 55, 780, 30);\n\t\tlblWelcomeToOpen.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 24));\n\t\t\n\t\tJLabel lblUsername = new JLabel(\"Username:\");\n\t\tlblUsername.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblUsername.setBounds(233, 183, 92, 22);\n\t\tlblUsername.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 18));\n\t\t\n\t\tJLabel lblPassword = new JLabel(\"Password:\");\n\t\tlblPassword.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblPassword.setBounds(238, 253, 87, 22);\n\t\tlblPassword.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 18));\n\t\t\n\t\ttextUser = new JTextField();\n\t\ttextUser.setBounds(369, 178, 180, 32);\n\t\ttextUser.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 18));\n\t\ttextUser.setColumns(10);\n\t\t\n\t\tJButton loginbtn = new JButton(\"Login\");\n\t\tloginbtn.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 18));\n\t\tloginbtn.setBounds(449, 339, 100, 40);\n\t\tloginbtn.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\tString user = textUser.getText();\n\t\t\t\tString pass = String.valueOf( textPass.getPassword());\n\t\t\t\t\t\t\t\n\t\t\t\tif ((user == null || user.isEmpty()) && (pass == null || pass.isEmpty())) {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Please enter username and password\", \"ERROR\", JOptionPane.ERROR_MESSAGE);\n //JOptionPane.showMessageDialog(null, \"Please enter username and password\", \"ERROR\", JOptionPane.INFORMATION_MESSAGE);\n } else if (user == null || user.isEmpty()){\n \tJOptionPane.showMessageDialog(null, \"Please enter username\", \"ERROR\", JOptionPane.ERROR_MESSAGE);\n } else if (pass == null || pass.isEmpty()){\n \tJOptionPane.showMessageDialog(null, \"Please enter password\", \"ERROR\", JOptionPane.ERROR_MESSAGE);\n }\n\t\t\t}\n\t\t});\n\t\tloginbtn.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString uname = textUser.getText();\n\t\t\t\tString pass = String.valueOf( textPass.getPassword());\n\t\t\t\t\n\t\t\t\tif (auth.login(uname, pass) != null) {\n\t\t\t\t\tif (auth.login(uname, pass).getAccountType() == \"Researcher\") {\n\t\t\t\t\t\tResearcher panel = new Researcher(frame, auth);\n\t\t\t\t\t\tframe.setContentPane(panel);\n\t\t\t\t\t\tframe.revalidate();\n\t\t\t\t\t} else if (auth.login(uname, pass).getAccountType() == \"Reviewer\") {\n\t\t\t\t\t\tSystem.out.println(uname);\n\t\t\t\t\t\tReviewer panel = new Reviewer(frame, auth,uname);\n\t\t\t\t\t\tframe.setContentPane(panel);\n\t\t\t\t\t\tframe.revalidate();\n\t\t\t\t\t} else if (auth.login(uname, pass).getAccountType() == \"Editor\") {\n\t\t\t\t\t\tEditor panel = new Editor(frame, auth,uname);\n\t\t\t\t\t\tframe.setContentPane(panel);\n\t\t\t\t\t\tframe.revalidate();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Account not found\", \"ERROR\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tJButton btnRegister = new JButton(\"Register\");\n\t\tbtnRegister.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mousePressed(MouseEvent e) {\n\t\t\t\tregister panel = new register(frame, auth);\n\t\t\t\tframe.setContentPane(panel);\n\t\t\t\tframe.revalidate();\n\t\t\t}\n\t\t});\n\t\t\t\n\t\tbtnRegister.setFont(new Font(\"Lucida Grande\", Font.PLAIN, 18));\n\t\tbtnRegister.setBounds(259, 339, 120, 40);\t\n\t\t\t\n\t\tsetLayout(null);\n\t\tadd(lblWelcomeToOpen);\n\t\tadd(lblPassword);\n\t\tadd(lblUsername);\n\t\tadd(textUser);\n\t\tadd(btnRegister);\n\t\tadd(loginbtn);\n\t\t\n\t\ttextPass = new JPasswordField();\n\t\ttextPass.setBounds(369, 251, 180, 32);\n\t\tadd(textPass);\n\n\t}", "@Test\n\tpublic void loginWithInvalidCredentials(){\n\t\tapp.loginScreen().waitUntilLoaded();\n\t\tapp.loginScreen().logIn(Credentials.USER_INVALID.username, Credentials.USER_INVALID.password);\n\t\tassertTrue(app.loginScreen().isActive());\n\t}", "private void loginError(HttpServletRequest _req, HttpServletResponse _res)\n throws IOException, ServletException {\n\n session.setAttribute(\"validUser\", \"n\");\n session.setAttribute(\"loginError\", \"y\");\n gotoPage(\"/ch5/login.jsp\", _req, _res);\n\n }", "private void button2ActionPerformed(java.awt.event.ActionEvent evt) {\n ReadAdminInfo ReadArray = new ReadAdminInfo();\n String Username;\n String Password;\n Username=UserNameJTextField.getText();\n Password= new String(PasswordJPasswordField.getPassword());\n try{\n System.out.println(\"AdminInformationFile Was Read\");\n String []InfoArray = ReadArray.read(1);\n if(InfoArray[0].equals(Username) && InfoArray[1].equals(Password)){\n JOptionPane.showMessageDialog(null, \"Login Successful\");\n //TimeUnit.SECONDS.sleep(5);\n NumberOfAttempts=0;\n AdminPage GoToAdminPage = new AdminPage();\n GoToAdminPage.setVisible(true);\n this.dispose();\n }\n else{\n NumberOfAttempts++;\n if(NumberOfAttempts%3==0){\n JOptionPane.showMessageDialog(null, \"Sorry Login Denied\");\n HomePage GoToHomePage = new HomePage();\n GoToHomePage.setVisible(true);\n this.dispose();\n }\n else{\n JOptionPane.showMessageDialog(null, \"Login Unsuccessful , Try Again\");\n }\n }\n }\n catch(Exception e){\n System.out.println(\"AdminInformationFile Was Not Found\");\n JOptionPane.showMessageDialog(null, \"AdminInformationFile Was Not Found\");\n HomePage GoToHomePage = new HomePage();\n GoToHomePage.setVisible(true);\n this.dispose();\n }\n }", "@FXML\n private void handleLoginAttempt() {\n\n if (isInputValid()) {\n String uname = userField.getText();\n if (Model.doesUsernameExist(uname)) {\n User user = Model.verifyLogin(uname, pwField.getText());\n\n if (user == null) {\n // uname exists but incorrect login\n user = UserInfoTable.getUserFromUserName(uname);\n _loginAuthenticated = false;\n user.setLockoutNum(user.getLockoutNum() + 1);\n Model.editUser(user);\n\n // increment incorrect login attempts, check if banned\n if (user.getLockoutNum() >= 3) {\n bannedAlert();\n return;\n }\n } else {\n // uname exists and correct login\n // check if banned\n if (user.getLockoutNum() >= 3) {\n bannedAlert();\n return;\n }\n user.setLockoutNum(0);\n Model.editUser(user);\n Model.setUser(user);\n _loginAuthenticated = true;\n app.showMainPage();\n return;\n }\n }\n // Show the error message if bad data\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.initOwner(_dialogStage);\n alert.setTitle(\"Please Correct Invalid Fields \");\n alert.setHeaderText(\"Incorrect password and/or username\");\n\n alert.showAndWait();\n }\n }", "private void login(JTextField user){\n\t\tString username1 = user.getText();\n\t\tuser.setText(null);\n\t\tuser.requestFocus();\n\n\t\t//Validate username\n\t\tif (username1.isEmpty()){\n\t\t\tJOptionPane.showMessageDialog(this,\"Empty values!\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t}\n\t\telse if (!username1.matches(\"[a-zA-Z]+\")){\n\t\t\tJOptionPane.showMessageDialog(this,\"Improper Name!\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t}\n\n\t\telse {\n\t\t\tif (DBInit.connectDB(username1)){\n\t\t\t\tFrameController s = BudgieUI.getSwitcher();\n\t\t\t\tJFrame main = new MainUI(\"Budgie\", s);\n\t\t\t\tBudgieUI.setMain(main);\n\t\t\t\ts.setFrame(main);\n\t\t\t\tFrameController.switchFrames();\n\t\t\t} else{\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Host Does not exist\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\tusername.setText(null);\n\t\t\t\tusername.requestFocus();\n\t\t\t}\n\t\t}\n\n\t}", "private static ErrorType handleLogin(String username) {\n\t\tUser currUser = VersionControlDb.findUser(username);\n\t\tif (currUser != null) {\n\t\t\tSystem.out.println(ErrorType.SUCCESS);\n\t\t\tprocessUserMenu(currUser);\n\t\t\treturn ErrorType.SUCCESS;\n\t\t}\n\t\telse {\n\t\t\treturn ErrorType.USER_NOT_FOUND;\n\t\t}\n\t}", "public String execute(){\n\t\tint p=loginService.canLogin(uid, pwd);\n\t\tif(p==-1){\n\t\t\ttry {\n\t\t\t\tgetResponse().getWriter().write(\"{\\\"error:1\\\",\\\"reason\\\":\\\"invalidate password\\\"}\");\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn null;\n\t\t}else if(p==-2){\n\t\t\ttry {\n\t\t\t\tgetResponse().getWriter().write(\"{\\\"error\\\":1,\\\"reason\\\":\\\"invalidate username\\\"}\");\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn null;\n\t\t}else if (p==0||p==1){\n\t\t\tgetSession().setAttribute(\"id\", uid);\n\t\t\tgetWriter().write(\"{\\\"error\\\":0,\\\"redirect\\\":\\\"project.html\\\"}\");\n\t\t\treturn null;\n\t\t}else{\n\t\t\tgetSession().setAttribute(\"id\", uid);\n\t\t\tgetWriter().write(\"{\\\"error\\\":0,\\\"redirect\\\":\\\"myself.html\\\"}\");\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t\tif (uName.getText().equals(AdminPage.NAME) && password.getText().equals(AdminPage.PASSWORD)) {\n\n\t\t\t\t\tnew AdminPage();\n\t\t\t\t\tMainGUI.sf.close();\n\n\t\t\t\t} else {\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tMainGUI.rs = MainGUI.statement.executeQuery(\n\t\t\t\t\t\t\t\t\"SELECT password\\r\\n\" + \"FROM USERS\\r\\n\" + \"WHERE name='\" + uName.getText() + \"'\");\n\t\t\t\t\t} catch (SQLException e2) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te2.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\tint b = 0;\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\tif (!MainGUI.rs.next() || !MainGUI.rs.getString(\"PASSWORD\").equals(password.getText())) {\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Invalid Username or Password\", \"Error\",\n\t\t\t\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t\t\t\t\tb++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdo {\n\t\t\t\t\t\t\tif (b != 0)\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tif (password.getText().equals(MainGUI.rs.getString(\"PASSWORD\"))) {\n\t\t\t\t\t\t\t\tString name, mail = null, password = null, gender = null, dob = null;\n\t\t\t\t\t\t\t\tint wallet = 0, id = -1;\n\t\t\t\t\t\t\t\tname = uName.getText();\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tMainGUI.rs = MainGUI.statement.executeQuery(\n\t\t\t\t\t\t\t\t\t\t\t\"SELECT *\\r\\n\" + \"FROM USERS\\r\\n\" + \"WHERE name='\" + uName.getText() + \"'\");\n\t\t\t\t\t\t\t\t\twhile (MainGUI.rs.next()) {\n\t\t\t\t\t\t\t\t\t\tmail = MainGUI.rs.getString(\"EMAIL\");\n\t\t\t\t\t\t\t\t\t\tpassword = MainGUI.rs.getString(\"PASSWORD\");\n\t\t\t\t\t\t\t\t\t\tgender = MainGUI.rs.getString(\"GENDER\");\n\t\t\t\t\t\t\t\t\t\tdob = MainGUI.rs.getString(\"DOB\");\n\t\t\t\t\t\t\t\t\t\tdob = dob.substring(0, 10);\n\t\t\t\t\t\t\t\t\t\twallet = MainGUI.rs.getInt(\"WALLET\");\n\t\t\t\t\t\t\t\t\t\tid = MainGUI.rs.getInt(\"ID\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tUser user = new User(name, mail, password, gender, wallet, dob, id);\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tnew LibraryGUI(user);\n\t\t\t\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tMainGUI.sf.close();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} while (MainGUI.rs.next());\n\t\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t\t// ----------------------------------------------------------\n\t\t\t}", "public void registerUser(String username, String password)\n {\n if(!spaceExists.spaceExists(SpaceUtils.getSpace()))\n {\n spaceExists.getSpaceExistsWarning(loginForm,\n \"\");\n }\n // check text fields are not blank\n if(StringUtils.isNotBlank(username) &&\n StringUtils.isNotBlank(password))\n {\n // Check length of password\n if(password.length() >= 6 &&\n password.length() <= 25)\n {\n // check username length\n if(username.length() >= 3 &&\n username.length() <= 20)\n {\n // continue\n String confirmDialogResponse = confirmPassword();\n\n// System.out.println(\"Dialog: \" + confirmDialogResponse);\n// System.out.println(\"Password: \"+password);\n if(password.equals(confirmDialogResponse))\n {\n // passwords match\n // save user to space\n try\n {\n // create new entry\n // encrypt password\n UserEntry user = new UserEntry();\n user.setUsername(username);\n user.setID(UUID.randomUUID());\n user.setSalt(CipherUtils.getSalt(30));\n user.setPassword(\n CipherUtils.generateSecurePassword(\n password, user.getSalt()));\n\n if(user.getSecureUsername().length() > 3)\n {\n // there are at least 3 non-special characters\n // create user\n if(userUtils.createUser(user) != null)\n {\n\n JOptionPane.showMessageDialog(loginForm,\n \"Welcome \" + user.getUsername() + \"!\");\n\n // remove loginForm\n loginForm.setVisible(false);\n loginForm.dispose();\n // Lease is renewed at every login\n userUtils.renewUserLease(user);\n\n // Debug:\n// UserEntry debug = (UserEntry) space.readIfExists(user, null, 3000);\n// System.out.println(\"User: \" + debug.getUsername() +\" Successfully added!\");\n// System.out.println(\"Main Form Created!\");\n\n // Create MainForm\n new MainForm(user);\n }\n else\n {\n // user already exists\n JOptionPane.showMessageDialog(loginForm,\n user.getUsername() + \" is taken.\");\n }\n }\n else\n {\n JOptionPane.showMessageDialog(loginForm,\n \"Username must have at least 3 non-special characters. \");\n }\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }\n else\n {\n JOptionPane.showMessageDialog(loginForm,\n \"Passwords did not match!\");\n }\n }\n else\n {\n JOptionPane.showMessageDialog(loginForm,\n \"Username must be 3 - 20 characters. \");\n }\n }\n else\n {\n JOptionPane.showMessageDialog(loginForm,\n \"Password must be 6 - 25 characters. \");\n }\n }\n else\n {\n JOptionPane.showMessageDialog(loginForm,\n \"A username and password are required.\");\n }\n }", "private void btncreateActionPerformed(java.awt.event.ActionEvent evt) {\n \n \n String newfirstname = txtnewfirstname.getText();\n String newlastname =txtnewlastname.getText();\n String newusername = txtnewusername.getText();\n String newpassword = txtnewpassword.getText();\n int newusertype = txtnewusertype.getSelectedIndex();\n String newuserid = txtnewuserid.getText();\n if(newfirstname.equals(\"\") || newlastname.equals(\"\") || newusername.equals(\"\")||newpassword.equals(\"\")||newusertype == 0||newuserid.equals(\"\"))\n {\n JOptionPane.showMessageDialog(null,\"Some Fields are Empty\", \"Error\",1);\n }\n \n \n else\n {\n try\n {\n if(newusertype == 1){\n String input = JOptionPane.showInputDialog(null,\"Enter the Admin Password:\");\n query = null;\n try\n {\n query = \"select Password from tablelogin where userID = 101\" + \" and Password = '\" + input + \"'\";\n rs = DatabaseQuery.ExecuteQuery(query);\n if (rs.next())\n {\n if(rs.getString(\"Password\").equals(input))\n {\n query = \"insert into tablelogin values(\"+newuserid+\",'\"+newfirstname+\"','\"+newlastname+\"','\"+newusername+\"','\"+newpassword+\"','\"+newusertype+\"')\";\n rowcount = DatabaseQuery.ExecuteUpdate(query);\n JOptionPane.showMessageDialog(null, \"Saved Successfully\",\"Save\", 1);\n clearForm();\n }\n }\n else\n {\n JOptionPane.showMessageDialog(null, \"Incorrect Admin Password\");\n }\n \n }\n catch(SQLException e)\n {\n e.printStackTrace();\n } \n }\n else{\n \n //\n query = \"insert into tablelogin values(\"+newuserid+\",'\"+newfirstname+\"','\"+newlastname+\"','\"+newusername+\"','\"+newpassword+\"','\"+newusertype+\"')\";\n rowcount = DatabaseQuery.ExecuteUpdate(query);\n JOptionPane.showMessageDialog(null, \"Saved Successfully\",\"Save\", 1);\n clearForm();\n }\n }\n catch(SQLException e)\n {\n e.printStackTrace();\n }\n \n }\n }", "private void createAccountButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_createAccountButtonActionPerformed\n na.setVisible(true);\n boolean isLoggedInNew = uL.isLoggedIn();\n boolean isLoggedIn = na.isLoggedIn();\n if (isLoggedInNew || isLoggedIn) {\n dm.messageMustLogOut();\n na.dispose();\n }\n }", "public void tryLogin() {\n\t\tcontroller.setupClient(txtNickname.getText());\n\t\tString cardDesign = comboBoxCardDesign.getSelectionModel()\n\t\t\t\t.getSelectedItem();\n\t\tConfiguration.chooseCardDesign(cardDesign);\n\t\tConfiguration.chooseMeepleDesign(cardDesign);\n\t}", "public void login(ActionEvent event) throws IOException {\n\t\t//if user is admin, open admin screen\n\t\tif(username.getText().toLowerCase().equals(\"admin\")) {\n\t\t\t//open admin screen\n\t\t\tMain.changeScene(\"/view/admin.fxml\", \"Administrator Dashboard\");\t\t\t\n\t\t}\n\t\t//if user is blank, throw error\n\t\telse if(username.getText().isEmpty()){\n\t\t\tinvalidUserError.setVisible(true);\n\t\t}\n\t\t//otherwise make sure user exists and if they do set current user and change screen, if not throw error.\n\t\telse {\n\t\t\tfor(User user : UserState.getAllUsers()) {\n\t\t\t\tif(user.getUserName().toLowerCase().equals(username.getText().toLowerCase())) {\n\t\t\t\t\tUserState.setCurrentUser(user);\n\t\t\t\t\tMain.changeScene(\"/view/userhome.fxml\", \"User Home\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tinvalidUserError.setVisible(true);\n\t\t\tusername.setText(\"\");\n\t\t}\n\t}", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(410, 210, 450, 300);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\t\r\n\t\t\r\n\t\ttextField = new JTextField();\r\n\t\ttextField.setBounds(262, 83, 86, 20);\r\n\t\tframe.getContentPane().add(textField);\r\n\t\ttextField.setColumns(10);\r\n\t\t\r\n\t\tJLabel lbl1 = new JLabel(\"UserName\");\r\n\t\tlbl1.setBounds(103, 86, 60, 14);\r\n\t\tframe.getContentPane().add(lbl1);\r\n\t\tJLabel err = new JLabel(\"\");\r\n\t\terr.setBounds(71, 23, 277, 14);\r\n\t\tframe.getContentPane().add(err);\r\n\t\t\r\n\t\tJLabel lNewLabel_1 = new JLabel(\"Password\");\r\n\t\tlNewLabel_1.setBounds(103, 139, 92, 14);\r\n\t\tframe.getContentPane().add(lNewLabel_1);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tJButton btnNewButton = new JButton(\"Login\");\r\n\t\tbtnNewButton.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\r\n\t\t\t\ttry {\r\n\t\t\t\t\tString uname = textField.getText();\r\n\t\t\t\t\tString password = new String(passwordField.getPassword());\r\n\t\t\t\t\tint num = ConnectDB.Login(uname,password);\r\n\t\t\t\t\r\n\t\t\t\tif(num==0)\r\n\t\t\t\t{\r\n\t\t\t\t\tDialogMessage.showInfoDialog(\"Employee Login\");\r\n\t\t\t\t\tMenu m = new Menu();\r\n\t\t\t\t\tm.Newscreen();\r\n\t\t\t\t\tframe.setVisible(false);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\telse if(num==2)\r\n\t\t\t\t{\r\n\t\t\t\t\tDialogMessage.showInfoDialog(\"Employee Login\");\r\n\t\t\t\t\tMenu m = new Menu();\r\n\t\t\t\t\tm.Newscreen();\r\n\t\t\t\t\tframe.setVisible(false);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tDialogMessage.showWarningDialog(\"ERROR\");\r\n\t\t\t\t}\r\n\t\t\t\t} catch (SQLException e2) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te2.printStackTrace();\r\n\t\t\t\t} catch (NoSuchAlgorithmException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t});\r\n\t\tbtnNewButton.setBounds(106, 196, 89, 23);\r\n\t\tframe.getContentPane().add(btnNewButton);\r\n\t\t\r\n\t\tJButton btnNewButton_1 = new JButton(\"Exit\");\r\n\t\tbtnNewButton_1.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tSystem.exit(0);\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnNewButton_1.setBounds(262, 196, 89, 23);\r\n\t\tframe.getContentPane().add(btnNewButton_1);\r\n\t\t\r\n\t\tpasswordField = new JPasswordField();\r\n\t\tpasswordField.setBounds(262, 136, 86, 20);\r\n\t\tframe.getContentPane().add(passwordField);\r\n\t\t\r\n\t\r\n\t}", "public void actionPerformed(ActionEvent ae) {\n \t\n \t// JPasswordFields gives char arrays instead of Strings. Need to convert.\n \tchar[] enteredPassword = passwordField.getPassword();\n \tString enteredPasswordStr = new String(enteredPassword);\n \t\n \t// check login info. If it's good we can dispose of this frame and open the RMOS's frame.\n \tif (usernameField.getText().equals(\"admin\") && enteredPasswordStr.equals(\"admin\")) {\n\n \t\t// log in was correct\n \t\tProjectLauncher.adminFrame.dispose();\n \t\tsetRecyclingStationFrame(new RecyclingStation());\n \t\t\n \t\tgetRecyclingStationFrame().setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n \t\tgetRecyclingStationFrame().setTitle(\"Recycling Monitoring Station (RMOS)\");\n \t\t\n \tgetRecyclingStationFrame().validate();\n \tgetRecyclingStationFrame().pack();\n \tgetRecyclingStationFrame().setVisible(true);\n\n \t} else {\n \t\t\n \t\terrMsgLabel.setText(\"Incorrect username/password\");\n \t\tProjectLauncher.adminFrame.pack();\n \t}\n }", "public void actionPerformed(ActionEvent event) {\n\t\t//We have only one button\n\t\tif(event.getSource() == loginButton) {\n\t\t\t//Getting the username and password inserted\n\t\t\tauxUsername = usernameTextField.getText();\n\t\t\tauxPassword = new String(passwordField.getPassword());\n\t\t\t\n\t\t\t//Check if user introduces username and password\n\t\t\tif(!auxUsername.equals(\"\") && !auxPassword.equals(\"\")) {\n\t\t\t\t//First case: the administrator is logging\n\t\t\t\tif(auxUsername.equals(\"admin\") \n\t\t\t\t\t\t&& auxPassword.equals(\"admin\")) {\n\t\t\t\t\tsetVisible(false);\n\t\t\t\t\t\n\t\t\t\t\tUser auxUser = null;\n\t\t\t\t\tfor(int i=0 ; i<usersList.size(); i++) {\n\t\t\t\t\t\tif(usersList.get(i).getUsername().equals(\"admin\") && \n\t\t\t\t\t\t\t\t\tusersList.get(i).getPassword().equals(\"admin\")) {\n\t\t\t\t\t\t\tauxUser = usersList.get(i);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tAdminGUI adminGUI = new AdminGUI(this, auxUser);\n\t\t\t\t\tadminGUI.run();\n\t\t\t\t} else {\n\t\t\t\t\t//Second case: somebody else is logging\n\t\t\t\t\tUser auxUser = null;\n\t\t\t\t\tfor(int i=0; i<usersList.size(); i++) {\n\t\t\t\t\t\tif(usersList.get(i).getUsername().equals(auxUsername) &&\n\t\t\t\t\t\t\t\t\tusersList.get(i).getPassword().equals(auxPassword)) {\n\t\t\t\t\t\t\tauxUser = usersList.get(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\tif(auxUser != null) {\n\t\t\t\t\t\tsetVisible(false);\n\t\t\t\t\t\tUserGUI userGUI = new UserGUI(this, auxUser);\n\t\t\t\t\t\tuserGUI.run();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\"Username or password incorect! Try again!\",\n\t\t\t\t \t\t\"ERROR!\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\t\t//Delete text from textfields\n\t\t\t\t\t\tusernameTextField.setText(\"\");\n\t\t\t\t\t\tpasswordField.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Delete text from textfields\n\t\t\t\tusernameTextField.setText(\"\");\n\t\t\t\tpasswordField.setText(\"\");\n\t\t\t}\n\t\t}\n\t}", "public void login(ActionEvent e) throws IOException{\n\t\tString username = Username.getText().toLowerCase();\n\t\tString password = Password.getText();\n\t\tif(username.equalsIgnoreCase(\"admin\")){\n\t\t\tif (password.equals(PhotoAlbum.admin.getPassword())) {\n\t\t\t\tsegue(\"/view/Admin.fxml\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpasswrong.setStyle(\"-fx-opacity: 1;\");\n\t\t\t\tPassword.setStyle(\"-fx-text-box-border: red; -fx-focus-color: red;\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t} \n\t\t//search through list\n\t\tfor(int i = 0; i < PhotoAlbum.admin.getUserList().size(); i++){\n\t\t\tPhotoAlbum.regular_user = (NonAdminUser) PhotoAlbum.admin.getUserList().get(i);\n\t\t\tif(PhotoAlbum.regular_user.getUsername().equals(username)){\n\t\t\t\tif(PhotoAlbum.regular_user.getPassword().equals(password)){\n\t\t\t\t\tUsername.setStyle(\"-fx-text-box-border: white; -fx-focus-color: #008ED6;\");\n\t\t\t\t\tuserwrong.setStyle(\"-fx-opacity: 0;\");\n\t\t\t\t\tPassword.setStyle(\"-fx-text-box-border: white; -fx-focus-color: #008ED6;\");\n\t\t\t\t\tpasswrong.setStyle(\"-fx-opacity: 0;\");\n\t\t\t\t\tPhotoAlbum.logged_in = (NonAdminUser) PhotoAlbum.admin.getUserList().get(i);\n\t\t\t\t\tsegue(\"/view/Albums.fxml\");\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\tpasswrong.setStyle(\"-fx-opacity: 1;\");\n\t\t\t\t\tPassword.setStyle(\"-fx-text-box-border: red; -fx-focus-color: red;\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//if not found\n\t\tuserwrong.setStyle(\"-fx-opacity: 1;\");\n\t\tUsername.setStyle(\"-fx-text-box-border: #e67e22; -fx-focus-color: #e67e22;\");\n\t\tPassword.setStyle(\"-fx-text-box-border: #e67e22; -fx-focus-color: #e67e22;\");\n\t}", "public frmAnagraficaUsers() {\n initComponents();\n\n this.texCodi.setVisible(false);\n \n //associo il panel ai dati\n this.dati.dbNomeTabella = \"accessi_utenti\";\n Vector chiave = new Vector();\n chiave.add(\"id\");\n this.dati.dbChiave = chiave;\n this.dati.butSave = this.butSave;\n this.dati.butUndo = this.butUndo;\n this.dati.butFind = this.butFind;\n this.dati.butNew = this.butNew;\n this.dati.butDele = this.butDele;\n this.dati.tipo_permesso = Permesso.PERMESSO_GESTIONE_UTENTI;\n\n this.texDbPassword.setVisible(false);\n this.comRoleId.dbOpenList(Db.getConn(), \"SELECT descrizione, id FROM accessi_ruoli ORDER BY id\");\n this.dati.dbOpen(Db.getConn(), \"select * from \" + this.dati.dbNomeTabella + \" order by id\");\n this.dati.dbRefresh();\n\n dati.addDbListener(new DbListener() {\n public void statusFired(DbEvent event) {\n if (event.getStatus() == tnxDbPanel.STATUS_REFRESHING) {\n controllaAdmin();\n }\n }\n\n });\n\n this.salvaPassword = false;\n\n //apro la griglia\n //this.griglia.dbEditabile = true;\n this.griglia.dbChiave = chiave;\n this.griglia.flagUsaThread = false;\n\n java.util.Hashtable colsWidthPerc = new java.util.Hashtable();\n colsWidthPerc.put(\"id\", new Double(15));\n colsWidthPerc.put(\"username\", new Double(85));\n this.griglia.columnsSizePerc = colsWidthPerc;\n this.griglia.dbOpen(Db.getConn(), \"select id, username from \" + this.dati.dbNomeTabella + \" order by id\");\n controllaAdmin();\n this.griglia.dbPanel = this.dati;\n }", "@Override\n public void show()\n {\n boolean loginOK; // true if good user info was entered\n // multithreaded code does not execute properly in IDEs; true if IDE run detected\n boolean runningFromIDE = false;\n\n do // continue login process while user chooses to stay in login menu\n {\n loginOK = false;\n while(!loginOK) // do this while no good login info acquired, or user choose to bail.\n {\n System.out.println(splashStrings.LOGIN); // SPLASH WELCOME\n\n String userName = GET.getString(\"Indtast venligst bruger navn:\\n\\t|> \");\n\n char[] password;\n\n if(!runningFromIDE) // getPassword does not work in IDE\n {\n password = PasswordField.getPassword(System.in, \"Indtast venligst password:\\n\\t|> \");\n\n if(password == null)\n {\n // getPassword returns a null array reference, if no chars were captured, thus this.\n runningFromIDE = true;\n\n System.out.println(\"MELDING:\\nDet ser ud til at du kører programmet fra en IDE:\\t\" +\n \"Password masking slås fra.\" +\n \"\\nKør shorttest.jar, for at opnå den fulde bruger-oplevelse.\\n\");\n\n continue;\n }\n\n loginOK = checkCredentials(userName, new String(password));\n\n } else // option is chosen if IDE-execution detected\n {\n String passw = GET.getString(\"Indtast venligst password:\\n\\t|> \");\n loginOK = checkCredentials(userName, passw);\n }\n\n if(!loginOK) // if user input were no good, and ONLY if info were no good\n {\n System.out.println(\"De indtastede informationer fandtes ikke i systemet.\");\n if(GET.getConfirmation(\"Vil du prøve igen?\\n\\tja / nej\\n\\t|> \", \"nej\", \"ja\"))\n {\n System.out.println(\"Du valgte ikke at prøve igen, login afsluttes.\");\n break;\n }\n }\n }\n\n if(loginOK)\n {\n System.out.println(\"Login var en success. Fortsætter til første menu.\\n\");\n menuLoggedInto.show();\n }\n\n // when user returns from main menu, they get to choose if they want to log in again\n } while(GET.getConfirmation(\"Skal en anden logge ind?\\n\\t ja / nej\\n\\t|> \", \"ja\", \"nej\"));\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tString password = passwordField_Doctor.getText();\n\t\t\t\tString user_name = username_Doctor.getText();\n\t\t\t\tString userId =\"\";\n\t\t\t\tString pass = \"\";\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\tSystem.out.println(user_name + password);\n\t\t\t\tif(user_name.equals(\"\")|| password.equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\"Please enter missing details.\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\t\n\t\t\t\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\t\t\n\t\t\t\t\tConnection c=DriverManager.getConnection(\"jdbc:mysql://localhost/oopd\",\"root\",\"root\");\n\t\t\t\t\tStatement st=c.createStatement();\n\t\t\t\t\tString user = \"\";\n\t\t\t\t\tResultSet rs=st.executeQuery(\"Select * from logindoctor where username = '\"+user_name+\"'\");\n\t\t\t\t\t\n\t\t\t\t\twhile(rs.next())\n\t\t\t\t\t{\n\t\t\t\t\t\tuserId = rs.getString(\"username\");\n\t\t\t\t\t\tpass = rs.getString(\"password\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tResultSet rs1=st.executeQuery(\"Select * from department where dept_hod_username = '\"+user_name+\"'\");\n\t\t\t\t\twhile(rs1.next())\n\t\t\t\t\t{\n\t\t\t\t\t\tuser = rs1.getString(\"dept_hod_username\");\n\t\t\t\t\t}\n\n\t\t\t\t\tSystem.out.println(userId + pass);\n\t\t\t\t\tif(user_name.equals(userId) && pass.equals(password))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!user.equals(\"\"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tclose();\n\t\t\t\t\t\t\tHoDPage hodp = new HoDPage(user_name);\n\t\t\t\t\t\t\thodp.setVisible(true);\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\tclose();\n//\t\t\t\t\t\t\tDoctor_Home dh = new Doctor_Home(user_name);\n//\t\t\t\t\t\t\tdh.setVisible(true);\n\t\t\t\t\t\t\tList_Of_Patients lop = new List_Of_Patients(user_name);\n\t\t\t\t\t\t\tlop.setVisible(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tusername_Doctor.setText(\"\");\n\t\t\t\t\t\tpasswordField_Doctor.setText(\"\");\n\t\t\t\t\t\tJOptionPane.showMessageDialog(contentPane, \"Invalid Credentials!!\",\"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t\t}\n\t\t\t\t\t\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\tSystem.out.println(\"Exception is here!!\");\n\t\t\t\t\tlgf.logfile(\" Exception Caught\");\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t}", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tUserLoginPage userloginpanel = new UserLoginPage();\n\t\t\t\t\tuserloginpanel.login.addActionListener(new ActionListener() {\n\t\t\t\t\t\t\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\tDatabaseMethods DB = new DatabaseMethods();\n\t\t\t\t\t\t\tArrayList<User> usrarray = DB.ReadUser();\n\t\t\t\t\t\t\tArrayList<Admin> adminarray = DB.ReadAdmin();\n\t\t\t\t\t\t\tfor(User u:usrarray) {\n\t\t\t\t\t\t\t\t//System.out.println(u.getUserName().equals(login.psw.getPassword()) + \" \" + u.getPassword() + \" \" + new String(login.psw.getPassword()));\n\t\t\t\t\t\t\t\tif(u.getUserName().equals(userloginpanel.usr_name.getText()) && u.getPassword().equals(new String(userloginpanel.psw.getPassword()))) {\n\t\t\t\t\t\t\t\t\tuserloginpanel.frame.setVisible(false);\n\t\t\t\t\t\t\t\t\tex.setuser(u);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor(Admin a:adminarray){\n\t\t\t\t\t\t\t\tif(a.getAdminName().equals(userloginpanel.usr_name.getText()) && a.getPassword().equals(new String(userloginpanel.psw.getPassword()))) {\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"admin\");\n\t\t\t\t\t\t\t\t\tuserloginpanel.frame.setVisible(false);\n\t\t\t\t\t\t\t\t\tex.sidebar.admin_button.setVisible(true);\n\t\t\t\t\t\t\t\t\t//ex.repaint();\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}", "private void checkRole() {\n if (tools.checkNewPassword(new String(txtNewPass.getPassword()))) {\n if (new String(txtNewPass.getPassword()).equals(new String(txtConfirmPass.getPassword()))) {\n try {\n controller.changePassword(employee.getUsername(), new String(txtNewPass.getPassword()));\n Tools tools = new Tools();\n tools.sendMessage(employee, 3);\n tampilPesan(\"Password successfully updated.\");\n Login login = new Login(sessionFactory);\n this.getParent().add(login);\n login.setLocation(480, 200);\n login.setVisible(true);\n \n dispose();\n } catch (SQLException ex) {\n Logger.getLogger(ChangePasswordView.class.getName()).log(Level.SEVERE, null, ex);\n }\n } else {\n tampilPesan(\"New password doesn't match with confirm password\");\n }\n } else {\n tampilPesan(\"Password must have 8 characters minimum containing Uppercase, Lowercase, and number!!!\");\n }\n }", "public void loginUser(String username, String password)\n {\n // check password and username entered\n if(StringUtils.isNotBlank(username) &&\n StringUtils.isNotBlank(password))\n {\n // username and password not blank: continue\n // check user exists\n UserEntry template = new UserEntry();\n template.setUsername(username);\n\n UserEntry existingUser =\n spaceSearcher.getUserByUsername(username);\n\n if(existingUser != null)\n {\n // user exists\n try\n {\n boolean correctPassword = CipherUtils.verifyPassword(password,\n existingUser.getPassword(), existingUser.getSalt());\n\n if(correctPassword)\n {\n // login successful\n JOptionPane.showMessageDialog(loginForm,\n \"Welcome Back \" + existingUser.getUsername()+ \"!\");\n\n loginForm.setVisible(false);\n loginForm.dispose();\n\n // create new main form\n new MainForm(existingUser);\n }\n else\n {\n JOptionPane.showMessageDialog(loginForm,\n \"Incorrect username or password!\");\n }\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }\n else\n {\n JOptionPane.showMessageDialog(loginForm,\n \"User does not exist! Please register.\");\n }\n }\n else\n {\n JOptionPane.showMessageDialog(loginForm,\n \"Please enter a valid username and password.\");\n }\n }", "public void login(ActionEvent e) throws IOException {\r\n\t\t\r\n \tString username = loginuser.getText().trim();\r\n \t//if user is admin, change to userlist screen\r\n \tif (username.equals(\"admin\")) {\r\n \tPhotos.userlistscreen();\r\n \t} else {\r\n \t\tUser user = currentAdmin.findUser(username);\r\n \t\t//if user is found, log into that user and show the album view for that user specifically\r\n \t\tif (user!=null) {\r\n \t\t\tAlbumController.currentUser = (NonAdmin) user;\r\n \t\t\tCopyController.currentUser = (NonAdmin) user;\r\n \t\t\tMoveController.currentUser = (NonAdmin) user;\r\n \t\t\tPhotos.albumscreen(user);\r\n \t\t}\r\n \t\telse {\r\n \t\t\tAlert alert = new Alert(Alert.AlertType.ERROR);\r\n \t\t\talert.setTitle(\"Error\");\r\n \t\t\talert.setHeaderText(\"Invalid username\");\r\n \t\t\talert.setContentText(\"Please try again\");\r\n \t\t\talert.showAndWait();\r\n \t\t\tloginuser.setText(\"\");\r\n \t\t}\r\n \t}\r\n\t}", "public void logincredentials() {\n\t\tutil.entertext(prop.getValue(\"locators.text.uname\"), \"admin\");\n\t\tutil.entertext(prop.getValue(\"locators.text.password\"), \"Admin123\");\n\t\tutil.ClickElement(prop.getValue(\"locators.button.regdesk\"));\n\t\tutil.ClickElement(prop.getValue(\"locators.button.login\"));\n\t\tlogreport.info(\"logged into the application\");\n\n\t}", "private void checkAction(HttpServletRequest req, HttpServletResponse resp) throws SQLException, IOException {\n\t\tString account = req.getParameter(\"account\");\r\n\t\tString password = req.getParameter(\"password\");\r\n\t\tManage manage = this.service.checkLogin(account, password);\r\n\r\n\t\t// 如果User不是空,证明账号密码正确\r\n\t\tif (manage != null) {\r\n\t\t\tsession.setAttribute(\"MANAGEINSESSION\", manage);\r\n//\t\t\tresp.sendRedirect(path + \"/jsps/manage/index.jsp\");\r\n\t\t\tpw.print(true);\r\n\t\t} else {\r\n\t\t\tpw.print(false);\r\n//\t\t\tresp.sendRedirect(path + \"/jsps/manage/login.jsp\");\r\n\t\t}\r\n\t\treturn;\r\n\t}", "@Override\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tuser = \tbuildLogin( );\r\n\t\t\t\t\tif(user == null) {\r\n\t\t \t\t\r\n\t\t \t\tJOptionPane.showMessageDialog(null,\"Login Failed\" ,null,\r\n\t\t \t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n\t\t \t} \r\n\t\t\t\t\tif(user != null) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tjPanel0.setVisible(false);\r\n\t\t\t\t\t\tgetJPanel1();\r\n\t\t\t\t\t\tjPanel1.setVisible(true);\r\n\t\t\t\t\t\tjPanel1.setLocationRelativeTo(null);\r\n\t\t\t\t\t\tjPanel1.setSize(244, 84);\r\n\t\t\t\t\t\tjPanel1.pack();\r\n\t\t\t\t\t\tjPanel1.show();\r\n\t\t\t\t\t\t dispose();\r\n\t\t\t\t\t\tif (_timer != null && _timer.isRunning())\r\n\t\t return;\r\n\t\t _timer = new Timer(10, new ActionListener() {\r\n\t\t int i = 0;\r\n\r\n\t\t public void actionPerformed(ActionEvent e) {\r\n\t\t if (i == 0)\r\n\t\t progress.setProgressStatus(\"started..\");\r\n\t\t if (i == 10)\r\n\t\t progress.setProgressStatus(\"Running..\");\r\n\t\t if (i == 90)\r\n\t\t progress.setProgressStatus(\"Completing..\");\r\n\t\t progress.setProgress(i++);\r\n\t\t if (i > 100) {\r\n\t\t _timer.stop();\r\n\t\t JFrameMainApplication mainApp = new JFrameMainApplication(user);\r\n\t\t //mainApp.setBackground(commonUTIL.getColors());\r\n\t\t \t\tsetFrame(mainApp, 500, 100,user); \r\n\t\t \t\tjPanel1.dispose();\r\n\t\t \r\n\t\t }\r\n\t\t }\r\n\t\t });\r\n\t\t _timer.start();\r\n\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}\r\n\t\t\t\t}", "@Override\n\t\t\t\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tmodel = new StudentLoginModel();\n\t\t\t\tuser = txtStudentName.getText();\n\t\t\t\tps = passWord.getPassword();\n\t\t\t\t\n\t\t\t\t//işte burda diyelim şifre doğru değil ise\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \" Please check the username or password and try again! \");\n\t\t\t\tnew StudentLoginPanel();\n\t\t\t\t//eğer şifre doğru ise\n\t\t\t\tnew StudentPage();\n\t\t\t}", "public T01Login() {\n initComponents();\n btnMenu.setVisible(false);\n }", "public static void Login() \r\n\t{\n\t\t\r\n\t}", "public login() {\n initComponents();\n setLocationRelativeTo(null);\n this.setDefaultCloseOperation(login.DO_NOTHING_ON_CLOSE);\n }", "public void login() throws ClassNotFoundException, SQLException {\n\t\tConnectionManager con=new ConnectionManager();//connection manager\r\n\t\tScanner s=new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter the username\");\r\n\t\tString name=s.next();\r\n\t\tSystem.out.println(\"Enter the password\");\r\n\t\tString pass=s.next();\r\n\t\tint flag=0;\r\n\t\tStatement st=con.getConnection().createStatement();\r\n\t\tResultSet set=st.executeQuery(\"select * from adminlogin\"); \r\n\t\twhile(set.next()) {\r\n\t\t\t//to display the values\r\n\t\t\tString name1=set.getString(1);\r\n\t\t\tString pw1=set.getString(2);\r\n\t\t\r\n\t\tif(name1.contentEquals(name)&& pass.contentEquals(pw1)) \r\n\t\t\tflag=1;\r\n\t\t}\r\n\t\tif(flag==1) {\r\n\r\n\t\t\tSystem.out.println(\"Admin login successful\");\r\n\t\t\tadminlogin ad=new adminlogin();\r\n\t\t\tad.option();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"Sorry..!! Incorrect details.\\nLogin again\\n\");\r\n\t\t}\r\n\t\t\t\r\n\t\tHotelmanagement first=new Hotelmanagement();\r\n\t\tfirst.choice();\r\n\t}", "@Override\n\tprotected void checkLoginRequired() {\n\t\treturn;\n\t}", "public static void LoginDirector() {\n SuperUI.clearScreen();\n int type = LoginScreen();\n\n try {\n\n Connection conn = ConnectToDatabase();\n if (type == 1) {\n SuperUI.clearScreen();\n Employee.EmployeeLogin();\n// if(employeePosition.equalsIgnoreCase(\"HR Manager\"))\n// {\n// type=4;\n// }\n } else if (type == 2) {\n Customer.CustomerLogin();\n }\n if (type == 3) {\n System.out.println(\"Goodbye\");\n System.exit(0);\n conn.close();\n }\n\n } catch (SQLException excpt) {\n System.out.println(excpt.getMessage());\n\n }\n\n }", "public static void main(String[] args) {\n\t\ttry {\n\t\t\tString status=Allow_log.chek_log();\n\t\t\tif(status.equals(\"active\")){\n\t\t\t\t\n\t\t\t\tLogin_view obj=new Login_view();\n\t\t\t\tobj.buildGUI();\n\t\t\t}\n\t\t\telse if(status.equals(\"inactive\")){\n\t\t\t\tMain_view.main(null);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tJOptionPane.showMessageDialog(null,\"Database Missing !!!\");\n\t\t}\n\t}", "public FormLogin() {\n initComponents();\n open_db();\n setLocationRelativeTo(this);\n }", "static void acceptLogin() throws IOException\n\t{\n\t\tboolean validLogin = false, loginAccepted=false, emptyInput=false;;\n\t\tint dialogButton, attempts = 0,option;\n\t\tString info, title = \"Registration\";\n\t\tdialogButton = JOptionPane.showConfirmDialog (null, \"Are you an existing user?\",\"Login\", JOptionPane.YES_NO_OPTION);\n \n JTextField email = new JTextField(); //A text field is a basic text control that enables the user to type a small amount of text.\n JTextField password = new JPasswordField();\n JTextField confirmEmail = new JTextField(); //A text field is a basic text control that enables the user to type a small amount of text.\n JTextField confirmPassword = new JPasswordField();\n \n if(dialogButton == JOptionPane.YES_OPTION)//Executes only if the user is already an existing user\n\t\t{\n\t\t\tSystem.out.println(\"User selected yes..\");\n //Creates an object that accepts both username and password using JTextField\n \n Object[]message = {\"Username:\", username,\"Password:\", password};\n String attempted=\"***\";\n System.out.println(attempted);\n //Loop will keep running until three attempts are made or a valid input is entered\n\t\t\twhile(attempts<3 && !validLogin && !emptyInput)\n\t\t\t{\n\n\t\t\t\toption = JOptionPane.showConfirmDialog(null, message, \"Login\", JOptionPane.OK_CANCEL_OPTION);\n System.out.println(username.getText()+\"\\n\"+password.getText());\n\n //if user presses Cancel button the program loops through acceptLogin Method\n if(option == JOptionPane.CANCEL_OPTION)\n {\n acceptLogin();\n validLogin = true;\n }\n\n else \n\t\t\t\t{\n\t\t\t\t validLogin = validLoginEntered(username.getText(), password.getText());\n\t\t\t\t if(!validLogin)\n {\n\t\t\t\t JOptionPane.showMessageDialog(null, \"User Could Not Be Found!\\nAttempt \"+(attempts+1)+\" of 3\", title, 2);\n\t\t\t\t attempts++;\t\n\t\t\t\t if (attempts==3) \n\t\t\t\t {\n\t\t\t\t \tSystem.out.println(\"Login Failed\");\n\t\t\t\t \tdialogButton= JOptionPane.showConfirmDialog (null, \"Do you want to Login Again?\",\"Login Failed\", JOptionPane.YES_NO_OPTION);\n\t\t\t\t \t if(dialogButton==JOptionPane.YES_OPTION)\n\t\t\t\t \t \t{acceptLogin();System.out.println(\"Reseting Login...\");\n\t\t\t\t \t \tvalidLogin=true;}\n\t\t\t\t \t else {\n\t\t\t\t \t \tSystem.out.println(\"Terminating Login...\");\n\t\t\t\t \t \tJOptionPane.showMessageDialog(null,\"Goodbye!!\");\n\t\t\t\t \t }\n\t\t\t\t }\n\t\t\t\t attempted=attempted.substring(0,attempted.length()-1);\n\t\t\t\t System.out.println(attempted);\n\t\t\t\t }\n else\n {\n loggedin = true;\n user(username.getText());\n getUsername(username.getText());\n }\n\t\t\t\t}\n }\n }\n //if user presses NO option then the user is asked to create a new user\n else if(dialogButton == JOptionPane.NO_OPTION)\n\t\t{ \n boolean userExists = false;\n\t\t\tFile fileReader = new File(\"loginDetails.txt\");\n\t\t\tObject[] message= {\"Email:\",email,\"Username:\", username,\"Password:\", password,\"Confirm Password:\", confirmPassword};\n JOptionPane.showMessageDialog(null, message, \"Create user\",1);\n info = username.getText()+\",\"+password.getText()+\",\"+email.getText()+\"\\n\"; \n //this is used to check if the user already exists. If user already exists then the user is asked to try logging in \n if (validpassword(password.getText())==true) {\n \t\n \n if(validemail(email.getText())==true)\n {\n if(loginDetails.get(0).contains(username.getText()) || username.getText().equals(\"\"))\n {\n JOptionPane.showMessageDialog(null,\"Username Taken or Empty Input, Try Again\",\"Registration Error!\",0);\n userExists = true;\n acceptLogin();\n }\n //if user doesn't exist then a new user is created\n if(!userExists&&confirmPassword.getText().matches(password.getText()))\n {\n \tSystem.out.println(\"New user Added to log...\");\n writeToFile(fileReader, info);\n writeUserFile(username.getText()+\".txt\",\"\");\n userDetails(username.getText()+\".txt\");\n loginDetails.get(0).add(username.getText());\n loginDetails.get(1).add(password.getText());\n loginDetails.get(2).add(\"0\");\n userIndex = loginDetails.get(0).indexOf(username.getText());\n validLogin=true;\n loggedin = true;\n }else{JOptionPane.showMessageDialog(null,\"Password does not match, Try again\",\"Password Error\",0);acceptLogin();}\n \t}else \n \t{\n \t\t\n \t\t acceptLogin();\n \t}\n }else\n {\n\n \t\t acceptLogin();\n }\n \n }\n //if the login is not succesfull then the program exists \n\t}", "public void tryLoginAgain(){\n\t\tnameField.setText(\"\");\n\t\trollField.setText(\"\");\n\t\tseatField.setText(\"\");\n\t\tnameField.repaint();\n\t\tseatField.repaint();\n\t\trollField.repaint();\n\t\tclearErrors();\n\t\tmainDialog.dispose();\t\t\n\t}", "private static void attemptToLogin() {\n\t\tString id = null;\n\t\tString password = null;\n\t\tString role = null;\n\t\tint chances = 3;\n\t\t//User will get 3 chances to login into the system.\n\t\twhile(chances-->0){\n\t\t\tlog.info(\"Email Id:\");\n\t\t\tid = sc.next();\n\t\t\tlog.info(\"Password:\");\n\t\t\tpassword = sc.next();\n\t\t\trole = LogInAuthentication.authenticate(id, password);\n\t\t\t//If correct credentials are entered then role of user will be fetch from the database. \n\t\t\tif(role == null) {\n\t\t\t\t//If role is not fetched, error and left chances will be shown.\n\t\t\t\tlog.error(\"Invalid EmailId or password\");\n\t\t\t\tlog.info(\"Chances left: \"+chances);\n\t\t\t}\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\t\t//After verifying credentials User will be on-board to its portal depending upon the role.\n\t\tonboard(id,role);\n\t}", "private void CustCheckLogin() {\n\t\tLoggingUtil.trace(\"Customer log in\");\n\t\tinput = new Scanner(System.in);\n\t\tSystem.out.println(\"Customer Login Page\");\n\t\tString email;\tString pass;\t\n\t\tint i=0;//counter from tries\n\t do { System.out.println(\"Email: \");\n\t\tSystem.out.print(\">>>>>\");email=input.nextLine(); c.setUsername(email);\n\t\tif(email.isEmpty()) {System.out.println(\"\\n\\nNo Dont put empty email\"); break; }\n\t\tSystem.out.println(\"Passowrd\");\n\t\tSystem.out.print(\">>>>>\");pass=input.nextLine();\n\t i++; \n\t if (s.checkUserCust(email, pass)==false) {\n\t \tSystem.out.println(\"Invalid Username or Pass\"); \n\t \tSystem.out.println(i);\n\t }\n\t else { cs.choosechoice();// go to customer screen\n\t \t break; }\t \n\t }while(i<4);\n\t ms.pageoneScreen();\n\t}", "private void login() {\n\t\t \tetUserName.addTextChangedListener(new TextWatcher() {\n\t\t public void afterTextChanged(Editable s) {\n\t\t Validation.hasText(etUserName);\n\t\t }\n\t\t public void beforeTextChanged(CharSequence s, int start, int count, int after){}\n\t\t public void onTextChanged(CharSequence s, int start, int before, int count){}\n\t\t });\n\t\t \t\n\t\t \t // TextWatcher would let us check validation error on the fly\n\t\t \tetPass.addTextChangedListener(new TextWatcher() {\n\t\t public void afterTextChanged(Editable s) {\n\t\t Validation.hasText(etPass);\n\t\t }\n\t\t public void beforeTextChanged(CharSequence s, int start, int count, int after){}\n\t\t public void onTextChanged(CharSequence s, int start, int before, int count){}\n\t\t });\n\t\t }", "public errorlogin() {\n initComponents();\n }", "private void loginAsAdmin() {\n vinyardApp.navigateToUrl(\"http://localhost:8080\");\n vinyardApp.fillUsername(\"admin\");\n vinyardApp.fillPassord(\"321\");\n vinyardApp.clickSubmitButton();\n }", "@Override\r\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tif(arg0.getActionCommand().equals(\"Login\")){\r\n\t\t\tif(UserNamePane.isEnabled()){\r\n\t\t\tUserNamePane.setEnabled(false);\r\n\t\t\tUserNamePane.setVisible(false);\r\n\t\t\tlblTips.setText(\"TIPS:Login\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t if(tryLogin())\r\n\t\t\t dlg.dispose();\r\n\t\t\t else{\r\n\t\t\t\t lblTips.setText(\"Login Error\");\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(arg0.getActionCommand().equals(\"Cancel\")){\r\n\t\t\t//serverinfo.port=-1;\r\n\t\t\t//serverinfo.OK=true;\r\n\t\t\tdlg.dispose();\r\n\t\t}\r\n\t\telse if(arg0.getActionCommand().equals(\"Register\")){\r\n\t\t\tif(UserNamePane.isEnabled()==false){\r\n\t\t\tUserNamePane.setEnabled(true);\r\n\t\t\tUserNamePane.setVisible(true);\r\n\t\t\tlblTips.setText(\"TIPS:Register\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tif(tryRegister()==false){\r\n\t\t\t\t\tUserNameText.setText(\"\");\r\n\t\t\t\t\tUserCodeText.setText(\"\");\r\n\t\t\t\t\tUserIDText.setText(\"\");\r\n\t\t\t\t\tlblTips.setText(\"Register error\");\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tlblTips.setText(\"Register successful->please try login\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "@Override\n public void onClick(View v) {\n loginUser(\"999999\");\n }", "private void jBtnKerjaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnKerjaActionPerformed\n if(roles.equals(\"employeer\") || roles.equals(\"admin\")){\n// TAMBAH KERJA UNTUK ADMIN HRD\n TambahLowonganForm lf;\n lf = new TambahLowonganForm();\n lf.setVisible(true);\n }else{\n// CARI KERJA UNTUK ADMIN HRD\n try {\n LamarForm join;\n join = new LamarForm();\n join.setVisible(true);\n } catch (SQLException ex) {\n Logger.getLogger(Dashboard.class.getName()).log(Level.SEVERE, null, ex);\n } \n }\n \n \n }", "public boolean login(){\r\n try{\r\n DbManager0 db = DbManager0.getInstance();\r\n Query q = db.createQuery(\"SELECT * FROM user WHERE username = '\"+this.login+\"' and password = '\"+this.pwd+\"';\");\r\n QueryResult rs = db.execute(q);\r\n rs.next();\r\n if(rs.wasNull()) return false;\r\n this.id = rs.getInt(\"id\")+\"\";\r\n return true;\r\n }\r\n catch(SQLException ex){\r\n throw new RuntimeException( ex.getMessage(), ex );\r\n }\r\n }", "private void jBtnLamarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnLamarActionPerformed\n if(roles.equals(\"employeer\") || roles.equals(\"admin\")){\n// LIHAT PELAMAR UNTUK ADMIN HRD\n try {\n LamarForm join;\n join = new LamarForm();\n join.setVisible(true);\n } catch (SQLException ex) {\n Logger.getLogger(Dashboard.class.getName()).log(Level.SEVERE, null, ex);\n } \n }else{\n// LIHAT LAMARANKU UNTUK JOBSEEKER\n \n try {\n Lamaranku lm = new Lamaranku();\n lm.setVisible(true);\n } catch (SQLException ex) {\n Logger.getLogger(Dashboard.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }\n \n \n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jLabel5 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n uname1 = new javax.swing.JTextField();\n password1 = new javax.swing.JPasswordField();\n jButton4 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n jLabel8 = new javax.swing.JLabel();\n jLabel7 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"LogIn\");\n setResizable(false);\n getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());\n\n jLabel5.setFont(new java.awt.Font(\"074-CAI978\", 1, 18)); // NOI18N\n jLabel5.setForeground(new java.awt.Color(255, 255, 255));\n jLabel5.setText(\"Username :\");\n getContentPane().add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 250, 120, 30));\n\n jLabel6.setFont(new java.awt.Font(\"074-CAI978\", 1, 18)); // NOI18N\n jLabel6.setForeground(new java.awt.Color(255, 255, 255));\n jLabel6.setText(\"Password :\");\n getContentPane().add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(60, 340, 120, 30));\n\n uname1.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n getContentPane().add(uname1, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 250, 200, 30));\n\n password1.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n getContentPane().add(password1, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 340, 200, 30));\n\n jButton4.setBackground(new java.awt.Color(51, 51, 255));\n jButton4.setFont(new java.awt.Font(\"074-CAI978\", 1, 18)); // NOI18N\n jButton4.setForeground(new java.awt.Color(255, 255, 255));\n jButton4.setText(\"Log In\");\n jButton4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton4ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton4, new org.netbeans.lib.awtextra.AbsoluteConstraints(320, 500, -1, 40));\n\n jButton3.setBackground(new java.awt.Color(51, 51, 255));\n jButton3.setFont(new java.awt.Font(\"074-CAI978\", 1, 18)); // NOI18N\n jButton3.setForeground(new java.awt.Color(255, 255, 255));\n jButton3.setText(\"Sign Up\");\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n getContentPane().add(jButton3, new org.netbeans.lib.awtextra.AbsoluteConstraints(80, 500, -1, 40));\n\n jLabel8.setForeground(new java.awt.Color(255, 255, 255));\n jLabel8.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/connectdb/icon/bb.jpeg\"))); // NOI18N\n getContentPane().add(jLabel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(-670, 0, 1160, 690));\n getContentPane().add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(-110, 0, 600, 690));\n\n pack();\n setLocationRelativeTo(null);\n }" ]
[ "0.6972043", "0.6832474", "0.67763215", "0.67534477", "0.66707385", "0.6629764", "0.6614548", "0.6606724", "0.65959996", "0.65527606", "0.65458906", "0.6523314", "0.65168685", "0.64969814", "0.6467351", "0.6461694", "0.641923", "0.64168316", "0.6413755", "0.64009506", "0.63978744", "0.63927984", "0.6377833", "0.636616", "0.63346225", "0.6325309", "0.6316843", "0.6305994", "0.6305994", "0.63059205", "0.6298337", "0.62963134", "0.6292846", "0.62919426", "0.6279591", "0.62694573", "0.62682146", "0.6267142", "0.6266713", "0.62399316", "0.6238169", "0.62306213", "0.6225143", "0.6215622", "0.62133133", "0.62132275", "0.6209457", "0.6208495", "0.62017465", "0.61931056", "0.6186682", "0.61841166", "0.6174151", "0.6169714", "0.6162881", "0.6160827", "0.6150527", "0.61437213", "0.61398757", "0.6138513", "0.61380965", "0.61350423", "0.6123705", "0.6121822", "0.610771", "0.61066556", "0.6094827", "0.6093139", "0.6090008", "0.60877585", "0.6082053", "0.6081257", "0.60543704", "0.6048041", "0.6044274", "0.6041846", "0.6037525", "0.60297406", "0.6027219", "0.6026141", "0.60236865", "0.60200864", "0.6013071", "0.6007226", "0.6003495", "0.60023624", "0.59969103", "0.59949934", "0.5993481", "0.5986824", "0.5983544", "0.5982598", "0.5980733", "0.5979854", "0.5977705", "0.5961067", "0.5960155", "0.5954029", "0.59438515", "0.5941709", "0.5940844" ]
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() { jPanel1 = new javax.swing.JPanel(); sprtrDateTime = new javax.swing.JSeparator(); lblTime = new javax.swing.JLabel(); lblDate = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); lblUsername = new javax.swing.JLabel(); lblPassword = new javax.swing.JLabel(); txtPassword = new javax.swing.JPasswordField(); txtUsername = new javax.swing.JTextField(); cmdCancel = new javax.swing.JButton(); cmdLogin = new javax.swing.JButton(); txtAccountStatus = new javax.swing.JTextField(); lblBackround = new javax.swing.JLabel(); txtWew = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("Barangay Records System: Login"); setMaximumSize(new java.awt.Dimension(860, 500)); setResizable(false); jPanel1.setLayout(null); jPanel1.add(sprtrDateTime); sprtrDateTime.setBounds(10, 450, 210, 20); lblTime.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N lblTime.setForeground(new java.awt.Color(0, 102, 255)); lblTime.setText("Time"); jPanel1.add(lblTime); lblTime.setBounds(20, 450, 210, 30); lblDate.setFont(new java.awt.Font("Tahoma", 1, 20)); // NOI18N lblDate.setForeground(new java.awt.Color(0, 102, 255)); lblDate.setText("Date"); jPanel1.add(lblDate); lblDate.setBounds(20, 420, 210, 30); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 210, Short.MAX_VALUE) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 60, Short.MAX_VALUE) ); jPanel1.add(jPanel2); jPanel2.setBounds(10, 420, 210, 60); lblUsername.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N lblUsername.setText("Username:"); jPanel1.add(lblUsername); lblUsername.setBounds(540, 340, 70, 30); lblPassword.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N lblPassword.setText(" Password:"); jPanel1.add(lblPassword); lblPassword.setBounds(540, 380, 70, 30); txtPassword.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N jPanel1.add(txtPassword); txtPassword.setBounds(620, 380, 180, 30); txtUsername.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N jPanel1.add(txtUsername); txtUsername.setBounds(620, 340, 180, 30); cmdCancel.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N cmdCancel.setText("Cancel"); cmdCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cmdCancelActionPerformed(evt); } }); jPanel1.add(cmdCancel); cmdCancel.setBounds(720, 420, 80, 40); cmdLogin.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N cmdLogin.setText("Login"); cmdLogin.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cmdLoginActionPerformed(evt); } }); jPanel1.add(cmdLogin); cmdLogin.setBounds(620, 420, 80, 40); txtAccountStatus.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtAccountStatusActionPerformed(evt); } }); jPanel1.add(txtAccountStatus); txtAccountStatus.setBounds(490, 290, 30, 20); lblBackround.setIcon(new javax.swing.ImageIcon(getClass().getResource("/barangaysystem/image/LoginUI.jpg"))); // NOI18N jPanel1.add(lblBackround); lblBackround.setBounds(0, 0, 860, 500); txtWew.setText("jLabel1"); jPanel1.add(txtWew); txtWew.setBounds(320, 50, 34, 14); jLabel2.setText("jLabel2"); jPanel1.add(jLabel2); jLabel2.setBounds(320, 70, 34, 14); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 860, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 500, Short.MAX_VALUE) ); getAccessibleContext().setAccessibleDescription(""); pack(); setLocationRelativeTo(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public FormListRemarking() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public FormPemilihan() {\n initComponents();\n }", "public GUIForm() { \n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public FormCompra() {\n initComponents();\n }", "public muveletek() {\n initComponents();\n }", "public Interfax_D() {\n initComponents();\n }", "public quanlixe_form() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public Soru1() {\n initComponents();\n }", "public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }", "public soal2GUI() {\n initComponents();\n }", "public EindopdrachtGUI() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }", "public BloodDonationGUI() {\n initComponents();\n }", "public quotaGUI() {\n initComponents();\n }", "public PatientUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public Oddeven() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Magasin() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "public RadioUI()\n {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "public ZobrazUdalost() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public form2() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public kunde() {\n initComponents();\n }", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public MusteriEkle() {\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 frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\n initComponents();\n }", "public frmVenda() {\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 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 vpemesanan1() {\n initComponents();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public FormHorarioSSE() {\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.7321342", "0.7292121", "0.7292121", "0.7292121", "0.72863305", "0.7249828", "0.7213628", "0.7209084", "0.7197292", "0.71912086", "0.7185135", "0.7159969", "0.7148876", "0.70944786", "0.70817256", "0.7057678", "0.69884527", "0.69786763", "0.69555986", "0.69548863", "0.69453996", "0.69434965", "0.69369817", "0.6933186", "0.6929363", "0.69259083", "0.69255763", "0.69123995", "0.6911665", "0.6894565", "0.6894252", "0.68922615", "0.6891513", "0.68894076", "0.6884006", "0.68833494", "0.6882281", "0.6879356", "0.68761575", "0.68752", "0.6872568", "0.68604666", "0.68577915", "0.6856901", "0.68561065", "0.6854837", "0.68547136", "0.6853745", "0.6853745", "0.68442935", "0.6838013", "0.6837", "0.6830046", "0.68297213", "0.68273175", "0.682496", "0.6822801", "0.6818054", "0.68177056", "0.6812038", "0.68098444", "0.68094784", "0.6809155", "0.680804", "0.68033874", "0.6795021", "0.67937285", "0.6793539", "0.6791893", "0.6790516", "0.6789873", "0.67883795", "0.67833847", "0.6766774", "0.6766581", "0.67658913", "0.67575616", "0.67566", "0.6754101", "0.6751978", "0.6741716", "0.6740939", "0.6738424", "0.6737342", "0.6734709", "0.672855", "0.6728138", "0.6721558", "0.6716595", "0.6716134", "0.6715878", "0.67096144", "0.67083293", "0.6703436", "0.6703149", "0.6701421", "0.67001027", "0.66999036", "0.66951054", "0.66923416", "0.6690235" ]
0.0
-1
Push element x to the back of queue.
public void push(int x) { inStack.push(x); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void push(int x) {\n queue.addLast(x);\n }", "public void push(int x) {\n queue.addLast(x);\n }", "public void push(int x) {\n if (!reverseQueue.isEmpty()) {\n normalQueue.offer(reverseQueue.poll());\n }\n normalQueue.offer(x);\n }", "public void push(int x) {\n queue.add(x);\n for (int i = 0; i < queue.size()-1; i++) {\n queue.add(queue.poll());\n }\n }", "public void push(int x) {\n int n = queue.size();\n queue.offer(x);\n for (int i = 0; i < n; i++) {\n queue.offer(queue.poll());\n }\n }", "public void push(int x) {\n\t int size=q.size();\n\t q.offer(x);\n\t for(int i=0;i<size;i++){\n\t q.offer(q.poll());\n\t }\n\t \n\t }", "public void push(int x) {\n queue.offer(x);\n }", "public void push(int x) {\n q.add(x);\n for (int i = 0; i < q.size() - 1; ++i) {\n q.add(q.poll());\n }\n }", "public void push(int x) {\n while (!forReverse.isEmpty()) {\n queue.add(forReverse.poll());\n }\n queue.add(x);\n }", "public void push(int x) {\n Queue<Integer> tmp = new LinkedList<>();\n while (!queue.isEmpty()) {\n tmp.add(queue.remove());\n }\n queue.add(x);\n \n while (!tmp.isEmpty()) {\n queue.add(tmp.remove());\n }\n }", "public void push(int x) {\n q.offer(x);\n }", "public void push(int x) {\n // 第一步先 push\n queue.offer(x);\n // 第二步把前面的变量重新倒腾一遍\n // 这一部分代码很关键,在树的层序遍历中也用到了\n int size = queue.size() - 1;\n for (int i = 0; i < size; i++) {\n queue.offer(queue.poll());\n }\n }", "public void push(int x) {\n Integer elem = x;\n queue.offer(elem);\n topElem = elem;\n }", "public void push(int x) {\n q1.push(x);\n if (q2.size() > 0){\n q2.remove();\n }\n }", "public void push(int x) {\r\n this.queueMain.offer(x);\r\n }", "public void push(int x) {\n one.add(x);\n for(int i=0;i<one.size()-1;i++)\n {\n one.add(one.poll());\n }\n \n }", "public void push(int x) {\n queue.add(x);\n }", "public void push(int x) {\n queue.add(x);\n }", "public void push(int x) {\n queue.push(x);\n }", "public void push(int x) {\n q1.add(x);\n int n = q1.size();\n for (int i = 1; i < n; i++) {\n q1.add(q1.poll());\n }\n }", "public void push(int x) {\n // for pop(), so prepare\n // 要想 pop 省事 push到 queue tail 的 x 要 想办法放到队列第一位\n // how 只要不空 移到另外一个 放好 x 再移回来\n while (!One.isEmpty()) {\n Two.add(One.poll());\n }\n One.add(x);\n while (!Two.isEmpty()) {\n One.add(Two.poll());\n }\n }", "public void push(int x) {\n queue2.offer(x);\n while (!queue1.isEmpty()) {\n queue2.offer(queue1.poll());\n }\n Queue<Integer> temp = queue1;\n queue1 = queue2;\n queue2 = temp;\n\n\n }", "public void push(int x) {\n \n q2.offer(x);\n \n while(!q1.isEmpty()) {\n q2.offer(q1.poll());\n }\n \n Queue tmp = q1;\n q1 = q2;\n q2 = tmp;\n \n }", "public void push(int x) {\n if (queue1.isEmpty() && queue2.isEmpty()){\n queue1.offer(x);\n }else {\n if (!queue1.isEmpty()){\n queue1.offer(x);\n }\n if (!queue2.isEmpty()){\n queue2.offer(x);\n }\n }\n }", "public void push(int x) {\r\n queue1.add(x);\r\n top = x;\r\n }", "public void push(int x) {\r\n queue1.add(x);\r\n top = x;\r\n }", "public void push(int x) {\n temp.push(x);\n }", "public void push(int x) {\r\n stack.offer(x);\r\n }", "public void push(int x) {\r\n stack.offer(x);\r\n }", "private void enqueue(E x) {\n final Object[] items = this.items;\n items[putIndex] = x;\n if (++putIndex == items.length) putIndex = 0;\n count++;\n notEmpty.signal();\n }", "public void push(int x) {\n if(q1.isEmpty()) {\n q1.add(x);\n while(q2.size() > 0) {\n q1.add(q2.poll());\n }\n } else {\n q2.add(x);\n while(q1.size() > 0){\n q2.add(q1.poll());\n }\n }\n }", "public void push(int x) {\n rearStack.push(x);\n }", "public void push(int x) {\n if(!queueA.isEmpty()){\n queueA.add(x);\n }else if(!queueB.isEmpty()){\n queueB.add(x);\n }else{\n queueA.add(x);\n }\n }", "public void push(int x) {\n if(q1.isEmpty()) {\n q1.add(x);\n while(q2.size() > 0) {\n q1.add(q2.poll());\n }\n }\n else {\n q2.add(x);\n while(q1.size() > 0) {\n q2.add(q1.poll());\n }\n }\n }", "public void push(int x) {\n // Write your code here\n if (queue1.isEmpty() && queue2.isEmpty()) {\n queue1.offer(x);\n } else if (!queue1.isEmpty()) {\n queue1.offer(x);\n } else {\n queue2.offer(x);\n }\n }", "public void push(int x) {\n\t\tif (size() == capacity()) {\n\t\t\tdoubleSize();\n\t\t}\n\t\tarr[end] = x;\n\t\t++end;\n\t}", "public void push(int x) { //全部放到第一个\n temp1.push(x);\n }", "public void push(int x) {\n helper.add(x);\n helper.addAll(objects);\n\n tmp = objects;\n tmp.clear();\n objects = helper;\n helper = tmp;\n }", "public void push(T x) {\n\t\tl.push(x);\n\t}", "static void enQueue(Queue q, int x) {\r\n push(q.stack1, x);\r\n }", "public void push(int x) {\n push.push(x);\n }", "public void push(int x) {\n inSt.push(x);\n\n }", "public void push(int x) {\n\n if (list.isEmpty()) {\n head = x;\n }\n\n list2.add(x);\n while (!(list.isEmpty())) {\n list2.add(list.poll());\n }\n\n while (!(list2.isEmpty())) {\n list.add(list2.poll());\n }\n\n\n }", "public void push(int x) {\n \tint size = s2.size();\n \tfor(int i = 0; i < size; i++) {\n \t\ts.push(s2.pop());\n \t}\n \ts.push(x);\n }", "public void push(int x) {\n\t\tlist.add(x);\n\t}", "public void push(int x) {\n \tlist.add(x);\n }", "public void push(T x);", "public void push(int x) {\n data.add(x);\n }", "@Override\n\tpublic void push(Object x) {\n\t\tlist.addFirst(x);\n\t}", "public void push(int x) {\n left.push(x);\n }", "public void push(int x) {\n Node node = new Node(x);\n top.next = node;\n node.pre = top;\n top = node;\n size++;\n }", "@Override\n\tpublic void push(Object x) {\n\t\tthis.vector.add(x);\n\t}", "public void push(int x) {\n\t if(first == null){\n\t first = x;\n\t }\n\t s.push(x);\n\t}", "public void push(int x) {\n\t\tinput.push(x);\n\t}", "public static void pushQueue(MyQueue q, int x) {\n push(q.stack1, x);\n }", "public void push(int x) {\n if (storeStack.isEmpty()) {\n storeStack.push(x);\n return;\n }\n\n int[] ints = new int[storeStack.size()];\n int i =0;\n while (!storeStack.isEmpty()) {\n ints[i++] = storeStack.pop();\n }\n storeStack.push(x);\n for (int i1 = ints.length - 1; i1 >= 0; i1--) {\n storeStack.push(ints[i1]);\n\n }\n }", "public void push(E x) {\n\t\t\n\t\taddBefore(mHead.next, x);\n\n\t\tmSize++;\n\t\tmodCount++;\n\t}", "public void push(int x) {\n /**\n * 将otherStack中所有元素还原到stack中后在栈顶加入新元素\n */\n while (!otherStack.isEmpty()) {\n stack.push(otherStack.pop());\n }\n stack.push(x);\n }", "@Override\n public void insertBack(Item x) {\n if (size == items.length) {\n //dynamic array\n //resize array\n resize(size * RFACTOR);\n }\n items[size] = x;\n size += 1;\n }", "public void insert(int x)\n\t{\n//\t\treturns if queue is full\n\t\tif(isFull())\n\t\t{\n\t\t\tSystem.out.println(\"Queue Overflow\\n\");\n\t\t\treturn;\n\t\t}\n\t\tif(front==-1)\n\t\t\tfront=0;\n//\t\tif rear = last index of array\n\t\tif(rear==queueArray.length-1)\n\t\t\trear=0;\n\t\telse\n//\t\t\tincrements rear\n\t\t\trear=rear+1;\n//\t\tinserts new element in rear of array\n\t\tqueueArray[rear]=x;\n\t}", "void push(int x) {\n\t\tif (stack.size() == 0) {\n\t\t\tstack.push(x);\n\t\t\tminEle = x;\n\t\t} else if (x >= minEle) {\n\t\t\tstack.push(x);\n\t\t} else if (x < minEle) {\n\t\t\t// Push something smaller than original value\n\t\t\t// At any time when we pop , we will see if the value\n\t\t\t// of the peek is less then min or not\n\t\t\tstack.push(2 * x - minEle);\n\t\t\tminEle = x;\n\t\t}\n\t}", "public void enqueue(AnyType x) {\n\t\tNode<AnyType> newNode = new Node<AnyType>(x, null);\n\t\tback.next = newNode;\n\t\tback = newNode;\n\t\t// Running time is θ(1) because it's a constant operation.\n\t}", "public void push(int x) {\n load();\n stack.push(x);\n unload();\n }", "void push(int x) \n\t{ \n\t\tif(isEmpty() == true) \n\t\t{ \n\t\t\tsuper.push(x); \n\t\t\tmin.push(x); \n\t\t} \n\t\telse\n\t\t{ \n\t\t\tsuper.push(x); \n\t\t\tint y = min.pop(); \n\t\t\tmin.push(y); \n\t\t\tif(x < y) \n\t\t\t\tmin.push(x); \n\t\t\telse\n\t\t\t\tmin.push(y); \n\t\t} \n\t}", "public void enqueue(T x) {\n //Enqueue the item. Don't forget to increase fillCount and update last.\n if (isFull()) {\n throw new RuntimeException(\"Ring Buffer Overflow\");\n }\n rb[last] = x;\n fillCount += 1;\n last = (last + 1) % capacity;\n }", "void push(T x);", "public void push(ExParValue x) {\r\n\t\t// System.out.println(\"ExPar.push() currently on top \" +\r\n\t\t// value.toString() + \" pushing \" + x.toString());\r\n\t\tExParValue v = x.isUndefined() ? (ExParValue) value.clone()\r\n\t\t\t\t: (ExParValue) x.clone();\r\n\t\tv.next = value;\r\n\t\tvalue = v;\r\n\t\t// System.out.println(\"ExPar.push() New value: \" + value);\r\n\t}", "void enqueue(int x)\n\t{\n\t\tif(isFull())\n\t\t{\n\t\t\tSystem.out.println(\"Queue is full!\");\n\t\t\treturn;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(isEmpty())\n\t\t\t\tfront++;\n\t\t\tqueue[++rear] = x;\n\t\t}\n\t}", "public void push(int x) {\n storeStack.push(x);\n }", "public void push(int x) {\n if(afterRotate){\n rotate();\n afterRotate = false;\n }\n stack.push(x);\n }", "void push(Integer x) {\n if (s.isEmpty()) {\n minEle = x;\n s.push(x);\n System.out.println(\"Number Inserted: \" + x);\n return;\n }\n // if new number is less than original minEle\n if (x < minEle) {\n s.push(2 * x - minEle);\n minEle = x;\n } else {\n s.push(x);\n }\n System.out.println(\"Number Inserted: \" + x);\n }", "@Override\n public void enqueue(T x) {\n if(fillCount==Buffer_num){\n throw new RuntimeException(\"Ring buffer overflow\");\n }\n rb[last] = x;\n last = adjust_L_ring_position(last);\n fillCount = fillCount+1;\n return;\n }", "public void push(double x) \n {\n if (top == s.length) \n {\n \tthrow new IllegalArgumentException(\"full stack!\");\n }\n \n \n else\n {\n s[++top] = x;\n \n } \n }", "public void push(int x) {\n this.stack1.add(x);\n }", "public void push(int x) {\n s1.push(x);\n }", "public void push(int x) {\r\n Stack<Integer> newStack = new Stack<>();\r\n newStack.push(x);\r\n\r\n Stack<Integer> tmp = new Stack<>();\r\n while (!this.stack.isEmpty()) {\r\n tmp.push(this.stack.pop());\r\n }\r\n\r\n while (!tmp.isEmpty()) {\r\n newStack.push(tmp.pop());\r\n }\r\n\r\n\r\n this.stack = newStack;\r\n }", "void push(Integer x) {\n\n\t\tif (isEmpty()) {\n\t\t\ttop = new Node(x);\n\t\t\tmid = top;\n\t\t\ttotalNodes++;\n\t\t} else {\n\t\t\tNode n = new Node(x);\n\t\t\tn.next = top;\n\t\t\ttop.prev = n;\n\t\t\ttop = n;\n\t\t\ttotalNodes++;\n\t\t\tif (totalNodes % 2 != 0) {\n\t\t\t\tmid = mid.prev;\n\t\t\t}\n\t\t}\n\t}", "public void push(int x) {\n if (isIn) {\n stackIn.push(x);\n } else {\n while (!stackOut.empty()) {\n stackIn.push(stackOut.pop());\n }\n stackIn.push(x);\n isIn = true;\n }\n\n }", "public void push(int x) {\n s1.push(x);\n }", "public void push(int x) {\n s1.push(x);\n }", "public void push(int x) {\n s1.push(x);\n }", "public void push(int x) {\n stack.add(x);\n }", "public void push(int x) {\n\t\tNode t = new Node();\n\t\tt.data = x;\n\t\tt.next = top;\n\t\ttop = t;\n\t}", "@Override\n\tpublic void incrementPop(int x) {\n\t\t\n\t}", "void push(int element);", "public void push(T x)\n\t{\n\t\t// If the head is null, set the head equal\n\t\t// to the new node.\n\t\tif(head == null)\n\t\t\thead = new Node<T>(x);\n\t\telse\n\t\t{\n\t\t\t// Loop through the list and add the new node\n\t\t\t// on to the back of the list.\n\t\t\tNode<T> curr = head;\n\t\t\twhile(curr.getNext() != null)\n\t\t\t\tcurr = curr.getNext();\n\n\t\t\tNode<T> last = new Node<T>(x);\n\t\t\tcurr.setNext(last);\n\t\t}\t\n\t}", "public void uncheckedPushBack(IClause c) {\n back++;\n if (back >= tab.length)\n back = 0;\n tab[back] = c;\n\n assert back + 1 != front\n && (front != 0 || back != tab.length - 1) : \"Deque is full !\";\n }", "public void push(int x) {\n pushStack.add(x);\n }", "public void push(E item) {\n if (!isFull()) {\n this.stack[top] = item;\n top++;\n } else {\n Class<?> classType = this.queue.getClass().getComponentType();\n E[] newArray = (E[]) Array.newInstance(classType, this.stack.length*2);\n System.arraycopy(stack, 0, newArray, 0, this.stack.length);\n this.stack = newArray;\n\n this.stack[top] = item;\n top++;\n }\n }", "public void push(E value) {\n list.addLast(value);\n index++;\n }", "public void enqueue(Object value)\n {\n queue.insertLast(value);\n }", "public void push(int x) {\n if (head == null) {\n head = new Node1(x, x);\n } else {\n head = new Node1(x, Math.min(x, head.min), head);\n }\n }", "public void push(int x) {\n Stack<Integer> tmp = new Stack<>();\n while(!s.isEmpty()) {\n tmp.push(s.pop());\n }\n tmp.push(x);\n while(!tmp.isEmpty()) {\n s.push(tmp.pop());\n }\n }", "public void push(int x) {\n\t\tstack.push(x);\n\t}", "public void pop() {\n move();\n reverseQueue.poll();\n }", "@Override\n public Object enqueue(Object x) {\n if (!isFull() && x != null){ // Pré-condição\n if (++tail >= MAX){\n tail = 0; // MAX-1 é a ultima posição do vetor\n }\n \n if (head == -1){\n head = tail;\n }\n \n memo[tail] = x;\n total++;\n return x;\n }\n else{ // Não pode inserir elemento nulo (x == null)\n return null; // Ou se a FILA estiver cheia\n }\n }", "public void push (T element)\r\n {\r\n if (size() == stack.length) \r\n expandCapacity();\r\n\r\n stack[top] = element;\r\n top++;\r\n }", "public void push(int x) {\n if(x <= min){\n stack.push(min);\n min=x;\n }\n stack.push(x);\n }", "public void push(int x) {\n if (storeStack.isEmpty()) {\n storeStack.push(x);\n return;\n }\n\n Stack<Integer> assistStack = new Stack<>();\n while (!storeStack.isEmpty()) {\n assistStack.push(storeStack.pop());\n }\n assistStack.push(x);\n while (!assistStack.isEmpty()) {\n storeStack.push(assistStack.pop());\n }\n }", "public void push(int x) {\n stk1.push(x);\n }" ]
[ "0.82624036", "0.8259673", "0.81935894", "0.81571823", "0.80487853", "0.8009802", "0.7990561", "0.79842633", "0.79804295", "0.7975267", "0.7919498", "0.78962463", "0.7856843", "0.78444326", "0.7841012", "0.77275115", "0.7722426", "0.7722426", "0.76359296", "0.76308316", "0.7613451", "0.7593293", "0.7580426", "0.7526367", "0.7500378", "0.7500378", "0.7471206", "0.74355227", "0.7423393", "0.7411367", "0.73738754", "0.73693335", "0.7356771", "0.73520994", "0.72848165", "0.72730684", "0.72014064", "0.71783143", "0.71159905", "0.7084847", "0.70662844", "0.69853604", "0.6980971", "0.69796485", "0.69779855", "0.6962277", "0.69543", "0.6942443", "0.6935219", "0.69181216", "0.6898908", "0.68950903", "0.6879799", "0.6856291", "0.6820406", "0.68158275", "0.6796318", "0.6776699", "0.6775979", "0.6746227", "0.674423", "0.6739258", "0.6725424", "0.6715741", "0.6676491", "0.6666506", "0.66493016", "0.66318727", "0.6620178", "0.65975296", "0.65939325", "0.6592974", "0.65864205", "0.6579515", "0.65776247", "0.657313", "0.6567979", "0.65448636", "0.65409696", "0.65409696", "0.65409696", "0.6540937", "0.65357685", "0.6530563", "0.6527506", "0.6507796", "0.64867747", "0.64852667", "0.64778817", "0.6466511", "0.6462241", "0.6458599", "0.6457872", "0.6450086", "0.64464265", "0.64434254", "0.6430324", "0.642537", "0.64232147", "0.6417516" ]
0.6589431
72
Removes the element from in front of queue.
public void pop() { readyForPop(); outStack.pop(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void remove() {\n\t\tprocess temp = queue.removeFirst();\n\t}", "public void pop() {\n queue.remove();\n }", "public void dequeue()\n\t{\n\t\tq.removeFirst();\n\t}", "public void pop() {\n queue.remove(0);\n }", "public long remove(){\n\t\t\r\n\t\t\tlong temp = queueArray[front]; //retrieves and stores the front element\r\n\t\t\tfront++;\r\n\t\t\tif(front == maxSize){ //To set front = 0 and use it again\r\n\t\t\t\tfront = 0;\r\n\t\t\t}\r\n\t\t\tnItems--;\r\n\t\t\treturn temp;\r\n\t\t}", "@Override\n\tpublic E deQueue() {\n\t\treturn list.removeFirst();\n\t}", "public T removeFirst(){\n\tT ret = _front.getCargo();\n\t_front = _front.getPrev();\n\t_front.setNext(null);\n\t_size--;\n\treturn ret;\n }", "public synchronized Object removeFirstElement() {\n return _queue.remove(0);\n }", "public int dequeueFront();", "@Override\r\n\tpublic E dequeueFront() {\n\t\tif(isEmpty()) return null;\r\n\t\tE value = data[frontDeque];\r\n\t\tfrontDeque = (frontDeque + 1)% CAPACITY;\r\n\t\tsizeDeque--;\r\n\t\treturn value;\r\n\t}", "public E remove(){\r\n if(isEmpty())\r\n return null;\r\n \r\n //since the array is ordered, the highest priority will always be at the end of the queue\r\n //--currentSize will find the last index (highest priority) and remove it\r\n return queue[--currentSize];\r\n }", "private E remove() {\n if (startPos >= queue.length || queue[startPos] == null) throw new NoSuchElementException();\n size--;\n return (E) queue[startPos++];\n }", "void dequeue() \n { \n // If queue is empty, return NULL. \n if (this.front == null) \n return; \n \n // Store previous front and move front one node ahead \n LinkedListQueue temp = this.front; \n this.front = this.front.next; \n \n // If front becomes NULL, then change rear also as NULL \n if (this.front == null) \n this.rear = null; \n }", "public Country removeFront() {\n\t\tCountry temp = null;\n\t\ttry {\n\t\t\tif (isEmpty()) {\n\t\t\t\tSystem.out.println(\"The queue is empty.\");\n\t\t\t} else if (front != end) {\n\t\t\t\tfront.previous = null;\n\t\t\t\ttemp = front.data;\n\t\t\t\tfront = front.next;\n\t\t\t} else {\n\t\t\t\tfront = end = null;\n\t\t\t\ttemp = front.data;\n\t\t\t}\n\t\t} catch (NullPointerException e) {\n\t\t\t;\n\t\t}\n\t\treturn temp;\n\t}", "public void dequeue() {\n\t\tObject ret_val = todequeue();\n\t\tif(ret_val == null)\n\t\t\tSystem.out.println(\"The queue is empty\");\n\t\telse\n\t\t\tSystem.out.println(\"Removed: \" + ret_val);\n\t}", "public void dequeue() {\r\n saf.remove(0);\r\n }", "void deleteFromFront()\n {\n // check whether Deque is empty or not \n if (isEmpty())\n {\n return;\n }\n // Only one element left\n if (front == end)\n {\n front = end = -1;\n }\n else {\n // back to initial\n front = (front == size -1) ? 0 : front+1;\n }\n }", "public T removeFront() {\n\t\tT found = start.value;\n\t\tstart = start.next;\n\t\treturn found;\n\t}", "public E removeFront() {\r\n if (elem[front] == null) {\r\n throw new NoSuchElementException();\r\n } else {\r\n E temp = elem[front];\r\n elem[front] = null;\r\n front++;\r\n return temp;\r\n }\r\n }", "public void requeue() {\n\t\tenqueue(queue.removeFirst());\n\t}", "public Object dequeue(){\r\n return super.remove(size()-1);\r\n }", "public Item removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"queue is empty\");\n }\n Item a;\n a = first.item;\n first = first.next;\n if (first == null) {\n last = null;\n }\n else first.prev = null;\n size--;\n return a;\n }", "public void pop() {\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\twhile (!queue.isEmpty())\n\t\t\tlist.add(queue.poll());\n\t\tfor (int i = 0; i < list.size() - 1; i++)\n\t\t\tqueue.add(list.get(i));\n\t}", "public Object dequeue()\n {\n return queue.removeFirst();\n }", "public static String deQueue(Queue q){ \n String front = q.names[0]; //Store the front element to be returned and printed if wanted \n if (q.queuesize != 0){ //IF the queue is not empty \n for (int i = 0; i < q.queuesize; i++){ //For the all of the non zero elements in the queue\n q.names[i] = q.names[i+1]; // Overwrite the first element to get rid of it and shove all of the others up 1\n }\n q.queuesize -=1; //Decrease the size by 1 as someone left \n }\n else{\n System.out.print(\"Empty Queue\"); //State the queue is empty and nothing can be removed\n }\n return front; //Return the element that was once in front - This can be printed \n }", "public void popFront()\n {\n\thead = head.next;\n\tif (null == head) {\t// the list is now empty\n\t tail = null;\n\t}\n\telse {\n\t head.prev = null;\n\t}\n }", "public synchronized Object dequeue() throws EmptyListException {\r\n return removeFromFront();\r\n }", "public E dequeue(){\n if (isEmpty()) return null;\n E answer = arrayQueue[front];\n arrayQueue[front] = null;\n front = (front +1) % arrayQueue.length;\n size--;\n return answer;\n }", "public E dequeue() {\n\t\treturn list.removeFirst();\n\t}", "@Override\n public void removeFromFront(){\n if(getSize() < 1) {\n throw new IndexOutOfBoundException(\"Cannot remove Node from Empty List\");\n }\n Node<T> temp = this.head.getNext();\n\n this.head.setNext(temp.getNext());\n temp.setData(null);\n temp.setNext(null);\n }", "public T removeFromFront() {\n DoublyLinkedListNode<T> temp = head;\n if (size == 0) {\n throw new NoSuchElementException(\"The list is empty, so there\"\n + \" is nothing to get.\");\n } else {\n if (head == tail) {\n head = tail;\n tail = null;\n return temp.getData();\n } else {\n head = head.getNext();\n head.setPrevious(null);\n size -= 1;\n return temp.getData();\n }\n }\n\n\n }", "public void pop() {\n int size = q.size();\n for(int i = 1; i<size;i++){\n q.offer(q.poll());\n }\n q.poll();\n }", "T getFront() throws EmptyQueueException;", "public T removeFirst() {\r\n \r\n if (size == 0) {\r\n return null;\r\n }\r\n \r\n T deleted = front.element;\r\n front = front.next;\r\n size--;\r\n \r\n return deleted;\r\n }", "public int dequeue() {\n\t\tif (isEmpty()) throw new IllegalStateException(\"\\nQueue is empty!\\n\");\n\t\tint removedItem = bq[head];\n\t\tif (head == bq.length - 1) head = 0; // wraparound\n\t\telse head++;\n\t\tsize--;\n\t\treturn removedItem;\t\n\t}", "public T remove() throws EmptyQueueException;", "public void pop() {\n move();\n reverseQueue.poll();\n }", "public T front() throws EmptyQueueException;", "@Override\n public E removeFirst() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n E value = dequeue[head];\n dequeue[head] = null;\n head = ++head % dequeue.length;\n size--;\n if (size < dequeue.length / 2) {\n reduce();\n }\n return value;\n }", "public void removeAtFront(){\r\n\t head = head.getLink();\r\n\t cursor = head; \r\n\t precursor = null; \r\n\t \r\n\t manyNodes--;\r\n }", "public Item removeFirst(){\r\n\t\tif (isEmpty()) throw new NoSuchElementException(\"Queue underflow\");\r\n\t\tItem tmp = list[first];\r\n\t\tlist[first++] = null;\r\n\t\tn--;\r\n\t\tprior=first-1;\r\n\t\tif(first==list.length){first=0;}\r\n\t\tif (n > 0 && n == list.length/4) resize(list.length/2); \r\n\t\treturn tmp;}", "private E dequeue() {\n final Object[] items = this.items;\n @SuppressWarnings(\"unchecked\")\n E x = (E) items[takeIndex];\n items[takeIndex] = null;\n if (++takeIndex == items.length) takeIndex = 0;\n count--;\n notFull.signal();\n return x;\n }", "@Override\r\n public CustomProcess removeBest() {\r\n if (isEmpty()) {\r\n throw new NoSuchElementException(\"queue is empty, cannot remove from empty queue\");\r\n }\r\n CustomProcess best = data[0]; // process to be removed\r\n data[0] = data[size - 1];\r\n data[size - 1] = null;\r\n minHeapPercolateDown(0); // Percolate down on first index\r\n size--;\r\n return best;\r\n }", "public E removeFront() {\n\t\tif (count == 0) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tE temp = head.value;\n\t\t\thead = head.next;\n\t\t\tcount--;\n\t\t\treturn temp;\n\t\t}\n\t}", "Node dequeue() {\n Node n = queue.removeFirst();\n queueSet.remove(n);\n return n;\n }", "public E dequeue() {\n if (size == 0){\n return null;\n }\n\n\n E result = (E) queue[0];\n queue[0] = null;\n --size;\n\n if (size != 0){\n shift();\n }\n return result;\n }", "public Object todequeue() {\n\t\tif(rear == 0)\n\t\t\treturn null;\n\t\telse {\n\t\t\tObject to_return = arr[front];\n\t\t\tfront++;\n\t\t\tsize--;\n\t\t\treturn to_return;\n\t\t}\n\t}", "public static Object dequeue() {\t \n if(queue.isEmpty()) {\n System.out.println(\"The queue is already empty. No element can be removed from the queue.\"); \n return -1;\n }\n return queue.removeFirst();\n }", "public void push_front(T element);", "public E dequeue() {\n if (isEmpty()) return null; //nothing to remove.\n E item = first.item;\n first = first.next; //will become null if the queue had only one item.\n n--;\n if (isEmpty()) last = null; // special case as the queue is now empty. \n return item;\n }", "public E poll() {\n\t\twhile (true) {\n\t\t\tlong f = front.get();\n\t\t\tint i = (int)(f % elements.length());\n\t\t\tE x = elements.get(i);\n\t\t\t//Did front change while we were reading x?\n\t\t\tif (f != front.get())\n\t\t\t\tcontinue;\n\t\t\t//Is the queue empty?\n\t\t\tif (f == rear.get())\n\t\t\t\treturn null; //Don't retry; fail the poll.\n\n\t\t\tif (x != null) {//Is the front nonempty?\n\t\t\t\tif (elements.compareAndSet(i, x, null)) {//Try to remove an element.\n\t\t\t\t\t//Try to increment front. If we fail, other threads will\n\t\t\t\t\t//also try to increment before any further removals, so we\n\t\t\t\t\t//don't need to loop.\n\t\t\t\t\tfront.compareAndSet(f, f+1);\n\t\t\t\t\treturn x;\n\t\t\t\t}\n\t\t\t} else //front empty. Try to help other threads.\n\t\t\t\tfront.compareAndSet(f, f+1);\n\n\t\t\t//If we get here, we failed at some point. Try again.\n\t\t}\n\t}", "@Override\n\tpublic Node removeNode() {\n\t\tif(isEmpty())\n\t\t\treturn null;\n\t\t// BreadthFirstSearch using a queue, first in first out principle\n\t\treturn frontier.removeFirst();\n\t}", "public IClause uncheckedPopFront() {\n assert back!=front : \"Deque is empty\";\n\n front++;\n if (front >= tab.length)\n front = 0;\n return tab[front];\n }", "public void remove(){\n\t\tqueueArray[1][0] = null;\n\t\tqueueArray[1][1] = null;\n\t}", "public L removeFromFront(){\n\t\tif(isEmpty())//throw exception if List is empty\n\t\tthrow new IllegalStateException(\"List \" + name + \" is empty\");\n\n\t\tL removedItem = (L) firstNode.data; //retrieve data being removed\n\n\t\t//update references firstNode and lastNode\n\t\tif(firstNode == lastNode)\n\t\tfirstNode = lastNode = null;\n\t\telse\n\t\tfirstNode = firstNode.getNext();\n\n\t\treturn removedItem; //return removed node data\n\t}", "public Object deQueue()\n {\n if(this.isEmpty()){throw new QueueUnderflowException();}\n Node temp = this.front;\n front = front.getNext();\n if(this.isEmpty()){this.rear = null;}\n return temp.getData();\n }", "public Node removeFromFront() {\n Node node = head.next;\n head.next = node.next;\n head.next.prev = head;\n size--;\n \n return node;\n }", "public void dequeueFromBack() {\r\n\t\tif (head == null) { //If there is no head (meaning the list is empty), don't do anything\r\n\t\t\tprintQueue();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tNode current = head; //Instantiated node to cycle through list\r\n\t\tfor(int i = 1; i < size; i++) { //Loop to get instantiated node to the end of the list\r\n\t\t\tcurrent = current.next;\r\n\t\t\tcurrent.prev.index--;\r\n\t\t}\r\n\t\t\r\n\t\tif(current.prev == tail && current.next == tail) { //If there is only one node left, set it equal to null\r\n\t\t\thead = null;\r\n\t\t\tprintQueue();\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tcurrent.prev.next = head; //The previous node's next node is removed\r\n\t\ttail = current.prev;\r\n\t\tsize--;\r\n\t\tprintQueue();\r\n\t}", "public T dequeue(){\n T front = getFront(); // might throw exception, assumes firstNode != null\n firstNode = firstNode.getNext();\n\n if (firstNode == null){\n lastNode = null;\n } // end if\n return front;\n }", "public E dequeue() {\n return pop();\n }", "public void pop() {\n \n if(!q1.isEmpty())q1.remove();\n \n }", "public T poll() {\n if (size == 0) {\n return null;\n }\n\n // set returned value to queue[0]\n T value = (T) array[0];\n\n // decrease size - we are removing element\n size--;\n\n // move queue 1 place left\n System.arraycopy(array, 1, array, 0, size);\n\n // clear last element\n array[size] = null;\n\n return value;\n }", "public E peek(){\r\n if(isEmpty())\r\n return null;\r\n\r\n return queue[currentSize-1]; //return the object without removing it\r\n }", "public T dequeue() {\n if (size == 0) {\n throw new NoSuchElementException(\"The queue is empty\"\n + \". Please add data before attempting to remove.\");\n } else if (front == backingArray.length - 1) {\n int temp = front;\n T data = backingArray[temp];\n backingArray[front] = null;\n front = 0;\n size--;\n return data;\n } else {\n int temp = front;\n T data = backingArray[temp];\n backingArray[front] = null;\n front = temp + 1;\n size--;\n return data;\n }\n }", "T dequeue() {\n return contents.removeFromTail();\n }", "public T removeFromFront() throws EmptyListException \n\t{\n\t\tif (isEmpty()) // throw exception if List is empty\n\t\t\tthrow new EmptyListException(name);\n\n\t\tT removedItem = firstNode.data; // retrieve data being removed\n\n\t\t// update references firstNode and lastNode\n\t\tif (firstNode == lastNode)\n\t\t\tfirstNode = lastNode = null;\n\t\telse\n\t\t\tfirstNode = firstNode.nextNode;\n\t\tsize--;\n\t\treturn removedItem; // return removed node data\n\t}", "private void shift(){\n if (queue.length < 1){\n throw new Error(\"Table self destruction!\");\n }\n if (size <= 0){\n return;\n }\n\n if (queue[0] == null){\n E best = null;\n int bestAT = -1;\n for (int x = 0 ; x < queue.length; x++){\n E cur = (E)queue[x];\n if (cur == null){\n continue;\n }\n if (best == null || cur.compareTo(best) > 0){\n best = cur;\n bestAT = x;\n }\n }\n // Not put best at front;\n queue[bestAT] = null;\n queue[0] = best;\n }\n\n }", "@Override\n public E poll() {\n E tmp = (E)queue[0];\n System.arraycopy(queue, 1, queue, 0, size - 1);\n size--;\n return tmp;\n }", "public T removeFromFront() throws EmptyListException {\n if(isEmpty())\n throw new EmptyListException(name);\n\n // retrieve data being removed\n T removedItem = firstNode.data;\n\n // update references to firstNode and lastNode\n if(firstNode == lastNode)\n firstNode = lastNode = null;\n else\n firstNode = firstNode.nextNode;\n\n return removedItem;\n }", "public T removeFirst() {\n if (size == 0) {\n return null;\n }\n if (size == 1) {\n size--;\n return array[front];\n }\n this.checkReSizeDown();\n size--;\n front++;\n this.updatePointer();\n return array[Math.floorMod(front - 1, array.length)];\n }", "public void deleteFront(){\n\t\tif(head == null){\n\t\t\tSystem.out.println(\"List is empty... Cannot remove from front.\");\n\t\t\treturn;\n\t\t}\n\t\tNode tmp = head;\n\t\thead = tmp.getNext();\n\t\tif(head == null){\n\t\t\ttail = null;\n\t\t}\n\t}", "public void dequeue() {\n if (!isEmpty()) { //se estiver vazia retorna -1\n\n No temp = inicio;\n // move o topo para o prox nó\n inicio = inicio.next;\n if (inicio == null) {\n fim = null;\n }\n size--;\n }\n\n }", "public O popFront()\r\n {\r\n if (!isEmpty())\r\n {\r\n VectorItem<O> l = first;\r\n first = first.getNext();\r\n \r\n count--;\r\n if (isEmpty()) last = null;\r\n else first.setPrevious(null);\r\n \r\n return l.getObject();\r\n } else\r\n return null;\r\n }", "@Override\n public PaintOrder remove() {\n if (!queue.isEmpty()) {\n var temp = queue.remove();\n processedOrders ++;\n currentOrders --;\n queuedOrders --;\n return temp; \n }\n return null;\n }", "public E removeFirst() {\n return pop();\n }", "public void remove() {\n btRemove().push();\n }", "public void remove() {\n btRemove().push();\n }", "public int pop() {\r\n if (queue1.size() == 0) {\r\n return -1;\r\n }\r\n int removed = top;\r\n while (queue1.peek() != removed) {\r\n top = queue1.remove();\r\n queue1.add(top);\r\n }\r\n return queue1.remove();\r\n }", "static void pop() {\n\t\t\tif (q1.isEmpty()) \n\t\t\t\treturn; \n\t\t\tq1.remove(); \n\t\t\tcurr_size--; \n\t\t}", "@Override\n\tpublic E dequeue() {\n\t\tif(isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\tE data = queue[pos];\n\t\tqueue[pos] = null;\n\t\tpos = (pos+1) % queue.length;\n\t\tsize--;\n\t\treturn data;\n\t}", "E dequeue();", "E dequeue();", "E dequeue();", "public int pop() {\n int size=queue.size();\n for (int i = 0; i <size-1 ; i++) {\n int temp=queue.poll();\n queue.add(temp);\n }\n return queue.poll();\n }", "@Override\r\n\tpublic void Dequeue() {\n\t\tif (IsEmpty())\r\n\t throw new NoSuchElementException(\"Underflow Exception\");\r\n\t else \r\n\t {\r\n\t \tlen--;\r\n\t int data = queue[front];\r\n\t System.out.println(\"The Dequed Element is \"+data);\r\n\t if ( front == rear) \r\n\t {\r\n\t front = -1;\r\n\t rear = -1;\r\n\t }\r\n\t else\r\n\t front++;\r\n\t }\r\n\t\t\r\n\t}", "@Override\n public T dequeue() {\n if (!isEmpty()) {\n return heap.remove();\n } else {\n throw new NoSuchElementException(\"Priority Queue is null\");\n }\n }", "public Item removeFirst(){\n\t\tif(isEmpty()){\n\t\t\tthrow new NoSuchElementException(\"Queue underflow\");\n\t\t}else{\n\t\t\t//save item to return\n\t\t\tItem returnItem = first.item;\n\t\t\t//delete first node\n\t\t\tfirst = first.next;\n\t\t\tn--;\n\t\t\tif(isEmpty()){\n\t\t\t\tlast = null; // to avoid loitering\n\t\t\t}else{\n\t\t\t\tfirst.prev = null;\n\t\t\t}\n\t\t\treturn returnItem;\n\t\t}\n\t}", "public E dequeue();", "public Object popFront(){\n\t\tObject data = head.data;\n\t\thead = head.nextNode; \n\t\t--size; \n\t\t\n\t\treturn data; \n\t}", "@Override\n public AmortizedDeque<T> popFront() throws NoSuchElementException {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n return new AmortizedDeque<>(head.popFront(), tail);\n }", "public T dequeue()\n\t{\n\t\tNode<T> eliminado = head;\n\t\thead = head.getNext();\n\t\tif(head == null)\n\t\t{\n\t\t\ttail = null;\n\t\t}\n\t\tsize--;\n\t\treturn eliminado.getElement();\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic T dequeue() {\r\n\t\tT data;\r\n\t\t\r\n\t\t// checking if queue is empty or not\r\n\t\tif (isEmtpy()) {\r\n\t\t\tthrow new AssertionError(\"Queue is empty\");\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\t// remove element\r\n\t\t\tdata = (T)(Integer)this.array[this.front];\r\n\t\t\t\r\n\t\t\t// adjust both front and rear of queue\r\n\t\t\tif (this.front == this.rear) {\r\n\t\t\t\tthis.front = this.rear = -1;\r\n\t\t\t} else {\r\n\t\t\t\tthis.front = (this.front + 1) % this.size;\r\n\t\t\t}\r\n\t\t\treturn (T)data;\r\n\t\t}\r\n\t}", "@Override\n\tpublic E dequeue() {\n\t\tE temp=null;\n\t\tif(front==data.length-1){\n\t\t\ttemp=data[front];\n\t\t\tsize--;\n\t\t\tfront=(front+1)%data.length;\n\t\t}else{\n\t\t\tsize--;\n\t\t\ttemp=data[front++];\n\t\t}\n\t\treturn temp;\n\t}", "@Override\n\tpublic void pop() {\n\t\tlist.removeFirst();\n\t}", "public void dequeue() {\n if (!isEmpty()) { //caso esteja vazia retorna -1\n\n Node temp = first;\n // desloca o topo para o prox no\n first = first.next;\n if (first == null) {\n last = null;\n }\n iSize--;\n }\n\n }", "public T removeFromBack() {\n if (size == 0) {\n throw new NoSuchElementException(\"The list is empty, \"\n + \"so there is nothing to get.\");\n }\n if (head == tail) {\n head.setNext(null);\n head.setPrevious(null);\n tail.setNext(null);\n tail.setPrevious(null);\n size -= 1;\n return tail.getData();\n } else {\n T temp = tail.getData();\n tail = tail.getPrevious();\n tail.setNext(null);\n size -= 1;\n return temp;\n\n }\n }", "@Override\r\n\tpublic T dequeue() {\r\n\t\tT element;\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new AssertionError(\"Queue is empty.\");\r\n\t\telement = arr[front].getData();\r\n\t\tif (front == rear) {\r\n\t\t\tfront = rear = -1;\r\n\t\t} else {\r\n\t\t\tfront++;\r\n\t\t}\r\n\t\treturn element;\r\n\t}", "public Item removeFirst() throws NoSuchElementException {\n checkDequeIsNotEmpty();\n\n Item item = first.item;\n first = first.next;\n size--;\n\n if (isEmpty()) {\n // to avoid loitering; first already points to null\n last = null;\n } else {\n first.prev = null;\n }\n return item;\n }", "public void pop() {\n \n q1.poll();\n }", "Object dequeue();", "Object dequeue();" ]
[ "0.74406934", "0.7374841", "0.7309438", "0.727601", "0.72067803", "0.72031546", "0.7092046", "0.7080782", "0.7052602", "0.7033634", "0.70175695", "0.69679564", "0.6967259", "0.6959936", "0.6959073", "0.6958906", "0.6947531", "0.69337666", "0.6920043", "0.689548", "0.6879026", "0.68751174", "0.685132", "0.6841592", "0.6831022", "0.67873985", "0.67795247", "0.67701995", "0.67701733", "0.6768544", "0.67665225", "0.6752217", "0.6740633", "0.6738598", "0.67376053", "0.67328864", "0.6732043", "0.67204225", "0.67110294", "0.67001206", "0.6690115", "0.6679675", "0.66665924", "0.6642391", "0.66299856", "0.6622276", "0.66209733", "0.66190505", "0.6614979", "0.6611122", "0.6605252", "0.66036475", "0.6597417", "0.6592979", "0.6590228", "0.65717936", "0.65706104", "0.656618", "0.655886", "0.6553689", "0.6552065", "0.6543305", "0.65370333", "0.6524364", "0.65231705", "0.652027", "0.6518904", "0.6517579", "0.6512917", "0.6504694", "0.6501328", "0.64896256", "0.64869624", "0.6481919", "0.64771134", "0.6473631", "0.6473631", "0.6470389", "0.6467651", "0.64628273", "0.644834", "0.644834", "0.644834", "0.6447327", "0.6441487", "0.6432439", "0.6422909", "0.6421661", "0.64117056", "0.64112544", "0.6410567", "0.64091504", "0.64053863", "0.6398857", "0.6390435", "0.6389138", "0.63860047", "0.63849753", "0.6377771", "0.63742214", "0.63742214" ]
0.0
-1
Get the front element.
public int peek() { readyForPop(); return outStack.peek(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object getFront() throws Exception {\n\t\tif(data[front]!=null)\n\t\t\n\t\t return data[front];\n\t\treturn null;\n\t}", "public int getFront() {\n return !isEmpty() ? elements[last - 1] : -1;\n }", "@Override\n\tpublic E getFront() {\n\t\treturn data[front];\n\t}", "public T getFront();", "public E front();", "public AnyType getFront() {\n\t\tif (empty()) {\n\t\t\treturn null;\n\t\t}\n\t\treturn header.next.data;\n\t\t// Running time is θ(1) because it's a constant operation.\n\t}", "public Object front() {\n ListNode p = this.l.start;\n while(p.next!=null)\n {\n p = p.next;\n }\n\t\treturn (Object) p.item;\n\t}", "public T front();", "public T getFront(){\n if (isEmpty()){\n throw new EmptyQueueException();\n }\n else {\n return firstNode.getData();\n }\n }", "E getFront();", "public E peekFront() {\r\n if (front == rear) {\r\n throw new NoSuchElementException();\r\n } else {\r\n return elem[front];\r\n }\r\n }", "public Object getFront() throws Exception {\n if (!isEmpty()) {\n return queue[front];\n } else {\n // 对为空返回null\n return null;\n }\n }", "public int getFront() {\n if (isEmpty()) {\n return -1;\n }\n return arr[front];\n }", "public E getFront() {\n return head.nextNode.data;\n }", "public Card front()\n {\n if (firstLink == null)\n return null;\n\n return firstLink.getCard();\n }", "public int getFront() {\n if (cnt == 0)\n return -1;\n return head.val;\n }", "@Override\n public T peekFront() {\n if (isEmpty()) {\n return null;\n }\n return head.peekFront();\n }", "public int getFront() {\n if (head == tail && size == 0)\n return -1;\n else {\n int head_num = elementData[head];//索引当前头指针的指向的位置\n return head_num;\n }\n // return true;\n }", "public E peekFront();", "public Node getFront(){\n return this.front;\n }", "public int getFront() {\n if(isEmpty()){\n return -1;\n }\n return queue[head];\n }", "public String front()\n {\n\treturn head.value;\n }", "public E peek(){\n\t\treturn top.element;\n\t}", "public int front() {\n return data[first];\n }", "Object front()\n\t{\n\t\tif (length == 0) \n\t\t{\n\t\t\tthrow new RuntimeException(\"List Error: cannot call front() on empty List\");\n\t\t}\n\t\treturn front.data;\n\t}", "T front() throws RuntimeException;", "public int Front() {\n if(isEmpty()) return -1;\n return l.get(head);\n }", "public int Front() {\n if (isEmpty()) {\n return -1;\n }\n return queue[head];\n }", "public int Front() {\n if (this.count == 0)\n return -1;\n return this.queue[this.headIndex];\n }", "public int Front() {\n if (isEmpty())\n return -1;\n return buf[b];\n }", "int front()\n {\n if (isEmpty())\n return Integer.MIN_VALUE;\n return this.array[this.front];\n }", "public T first() {\n \t\n \tT firstData = (T) this.front.data;\n \t\n \treturn firstData;\n \t\n }", "public DVDPackage front() {\n\t\treturn queue.peek();\n\t}", "public T peek() {\r\n\t\tT ele = top.ele;\r\n\t\treturn ele;\r\n\t}", "public E first(){\n if (isEmpty()) return null;\n return arrayQueue[front];\n }", "public int Front() {\n if(queue[head] == null){\n return -1;\n }else{\n return queue[head];\n }\n }", "public int Front() {\n if (count == 0) {\n return -1;\n }\n return array[head];\n }", "public static Object peek() {\t \n if(queue.isEmpty()) { \n System.out.println(\"The queue is empty so we can't see the front item of the queue.\"); \n return -1;\n }\t \n else {\n System.out.println(\"The following element is the top element of the queue:\" + queue.getFirst()); \t \n }\n return queue.getFirst();\n }", "T getFront() throws EmptyQueueException;", "public E first() {\n if (this.isEmpty()) return null;\r\n return this.head.getElement();\r\n }", "public int peekFront();", "public O popFront()\r\n {\r\n if (!isEmpty())\r\n {\r\n VectorItem<O> l = first;\r\n first = first.getNext();\r\n \r\n count--;\r\n if (isEmpty()) last = null;\r\n else first.setPrevious(null);\r\n \r\n return l.getObject();\r\n } else\r\n return null;\r\n }", "public T peek() {\n\t\tif (isEmpty()) {\n\t\t\tthrow new EmptyStackException();\n\t\t}\n\t\t//returns the top element.\n\t\treturn elements.get(elements.size()-1);\n\t}", "public int peekFront() {\n int x = 0;\n if(head == null) {\n return Integer.MIN_VALUE;\n }\n\n return head.val;\n }", "public T front() throws EmptyQueueException;", "public E first() { // returns (but does not remove) the first element\n // TODO\n if (isEmpty()) return null;\n return tail.getNext().getElement();\n }", "int getFront()\n {\n // check whether Deque is empty or not \n if (isEmpty())\n {\n return -1 ;\n }\n return arr[front];\n }", "public T first() throws EmptyCollectionException{\n if (front == null){\n throw new EmptyCollectionException(\"list\");\n }\n return front.getElement();\n }", "public int getFront() {\n if(size == 0) return -1;\n \n return head.next.val;\n \n}", "public E first() {\n\r\n if (head == null) {\r\n return null;\r\n } else {\r\n return head.getItem();\r\n }\r\n\r\n }", "public T popFront() {\n\t\tif(tamanio==0)\n\t\t\treturn null;\n\t\tNodo<T> aux= inicio.getSiguiente();\n\t\tT dato = inicio.getDato();\n\t\tinicio=null;\n\t\tinicio=aux;\n\t\ttamanio--;\n\t\treturn dato;\n\t}", "public IClause front() {\n if (back==front)\n throw new BufferUnderflowException();\n\n int i = front - 1;\n if (i < 0)\n i = tab.length - 1;\n return tab[i];\n }", "public E peek() {\n E item;\n try {\n item = element();\n } catch (NoSuchElementException e) {\n return null;\n }\n return item;\n }", "public Object peek()\r\n {\n assert !this.isEmpty();\r\n return this.top.getItem();\r\n }", "public E getFirst() {\n return peek();\n }", "public int Front() {\n if (isEmpty()) {\n return -1;\n }\n return nums[head];\n }", "public Point getFrontPoint() {\n\t\treturn this.gun;\n\t}", "public E top() {\n return !isEmpty() ? head.item : null;\n }", "public E first() {\n if(isEmpty()){\n return null;\n }else{\n return header.getNext().getElement();\n }\n }", "public E first() {\n if (isEmpty()) return null;\n return first.item;\n }", "public E getFirst() {\r\n\t\t// element checks to see if the list is empty\r\n\t\treturn element();\r\n\t}", "private Element peekElement() {\r\n return ((Element)this.elements.get(this.elements.size() - 1));\r\n }", "public T peek()\n {\n if (isEmpty())\n return null;\n \n return first.getData();\n }", "public T peek() {\n\t\tif (this.l.getHead() != null)\n\t\t\treturn this.l.getHead().getData();\n\t\telse {\n\t\t\tSystem.out.println(\"No element in stack\");\n\t\t\treturn null;\n\t\t}\n\t}", "public T getFirst() {\n\treturn _front.getCargo();\n }", "public E getFirst(){\n return head.getNext().getElement();\n }", "public E peek() {\n\t\tif (isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\treturn apq.get(1);\n\t}", "public E peek() \r\n {\r\n return list.get(getSize() - 1);\r\n }", "public Element first() {\n if(isEmpty()) return null;\n else return header.getNextNode().getContent();\n }", "public IClause uncheckedFront() {\n assert back!=front : \"Deque is empty\";\n\n int i = front - 1;\n if (i < 0)\n i = tab.length - 1;\n return tab[i];\n }", "public Object peek() {\n\t\tcheckIfStackIsEmpty();\n\t\tint indexOfLastElement = collection.size() - 1;\n\t\tObject lastElement = collection.get(indexOfLastElement);\n\t\t\n\t\treturn lastElement;\n\t}", "public Object peek() {\n if (top >= 0) {\n return stack[top];\n }\n else {\n return null;\n }\n }", "public node getFirst() {\n\t\treturn head;\n\t\t//OR\n\t\t//getAt(0);\n\t}", "public boolean getFront()\n {\n return m_bFrontLock;\n }", "public E getPrevious() {\n\t\tif (!super.isEmpty()) {\n\t\t\tif (index <= 0)\n\t\t\t\tindex = this.size();\n\t\t\treturn this.get(--index);\n\t\t}\n\t\treturn null;\n\t}", "public int top() {\n return topElem;\n }", "public Object firstElement() {\n return _queue.firstElement();\n }", "public Object firstElement();", "public T getHead() {\n return get(0);\n }", "@Override\r\n\tpublic E peek() {\r\n\t\tif (isEmpty())\r\n\t\t\treturn null;\r\n\t\treturn stack[t];\r\n\t}", "@Override\n\tpublic E first() {\n\t\treturn queue[pos];\n\t}", "public E peek()\n {\n return arrayList.get(0);\n }", "@Override\n\tpublic Object peek() {\n\t\treturn list.getFirst();\n\t}", "public void offerFront(E elem);", "public T peek() {\n if (size == 0) {\n throw new NoSuchElementException(\"The queue is empty\"\n + \". Please add data before attempting to peek.\");\n } else {\n return backingArray[front];\n }\n\n }", "@Override\r\n\tpublic E dequeueFront() {\n\t\tif(isEmpty()) return null;\r\n\t\tE value = data[frontDeque];\r\n\t\tfrontDeque = (frontDeque + 1)% CAPACITY;\r\n\t\tsizeDeque--;\r\n\t\treturn value;\r\n\t}", "public E top() {\n return head.prev.data;\n }", "public T peek() {\n return top.getData();\n }", "public String getFrontName() {\n return frontName;\n }", "public ListElement<T> getPrev()\n\t{\n\t\treturn prev;\n\t}", "public T peek() {\n\t\treturn top.value;\n\t}", "public E removeFront() {\n\t\tif (count == 0) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\tE temp = head.value;\n\t\t\thead = head.next;\n\t\t\tcount--;\n\t\t\treturn temp;\n\t\t}\n\t}", "public Node3 peek() {\n Node3 response = null;\n if (!isEmpty()) {\n response = new Node3(front.getData());\n }\n return response;\n }", "public E peek(){\r\n if(isEmpty())\r\n return null;\r\n\r\n return queue[currentSize-1]; //return the object without removing it\r\n }", "public E removeFront() {\r\n if (elem[front] == null) {\r\n throw new NoSuchElementException();\r\n } else {\r\n E temp = elem[front];\r\n elem[front] = null;\r\n front++;\r\n return temp;\r\n }\r\n }", "T peek(){\n if(isEmpty()){\n return null;\n }\n return (T)queueArray[0];\n }", "public T removeFront() {\n\t\tT found = start.value;\n\t\tstart = start.next;\n\t\treturn found;\n\t}", "public E top()\n {\n E topVal = stack.peekFirst();\n return topVal;\n }", "public Atom getHead ()\r\n\t{\r\n\t\treturn _head.get(0);\r\n\t}", "public E peek(){\n return front!=rear?(E) data[(int)((front) & (max_size - 1))]:null;\n }", "public E getFirst() {\n\t\t// Bitte fertig ausprogrammieren:\n\t\treturn null;\n\t}" ]
[ "0.7788042", "0.77603334", "0.77359986", "0.770913", "0.7659393", "0.7649537", "0.76232344", "0.7567912", "0.7567317", "0.75489664", "0.754895", "0.75468546", "0.75373614", "0.75340813", "0.7465325", "0.7453483", "0.73273367", "0.7313527", "0.7309557", "0.73002553", "0.71958786", "0.7195471", "0.7152307", "0.71376693", "0.71189517", "0.71103793", "0.70857185", "0.7083212", "0.7073387", "0.70733243", "0.706138", "0.704281", "0.7010204", "0.70006675", "0.6997967", "0.6978131", "0.6971697", "0.69613653", "0.69537216", "0.69423085", "0.6919552", "0.69148743", "0.6886805", "0.68216026", "0.68103766", "0.6791073", "0.6790531", "0.6770173", "0.6764274", "0.67533267", "0.6749555", "0.67212236", "0.67108744", "0.66983837", "0.6685971", "0.6677128", "0.6673218", "0.66643864", "0.6618328", "0.66147023", "0.6574963", "0.6538162", "0.65303147", "0.6529432", "0.6521991", "0.6516687", "0.65043306", "0.6480369", "0.64744234", "0.6470041", "0.64599615", "0.64427894", "0.64417356", "0.64398706", "0.6429368", "0.64275354", "0.64212424", "0.6416124", "0.640834", "0.6405592", "0.64045656", "0.63959473", "0.63918066", "0.63908887", "0.63692683", "0.63489985", "0.63481283", "0.6340062", "0.6324872", "0.63229823", "0.63005155", "0.62991756", "0.6299099", "0.62941825", "0.6289729", "0.6268654", "0.6258268", "0.6256142", "0.6255932", "0.62548995", "0.6245208" ]
0.0
-1
Return whether the queue is empty.
public boolean empty() { return inStack.empty() && outStack.empty(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean is_empty() {\n\t\tif (queue.size() <= 0) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isEmpty() {\n return this.queue.size() == 0;\n }", "boolean isEmpty() {\n return queue.isEmpty();\n }", "public boolean isEmpty() {\n\t\treturn queue.isEmpty();\n\t}", "public boolean isEmpty() {\n\t\treturn queue.isEmpty();\n\t}", "public boolean isEmpty() {\n return queue.isEmpty();\n }", "public boolean empty() {\n\t\treturn queue.isEmpty();\n\t}", "public boolean isEmpty() {\n return queue.isEmpty();\n }", "public boolean isEmpty()\n {\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean empty() {\n return queue.isEmpty();\n }", "public boolean isEmpty() \n {\n\treturn queue.size() == 0;\n }", "public boolean empty() {\r\n return this.queueMain.isEmpty();\r\n }", "public boolean isEmpty(){\n\t\tif(queue.isEmpty()){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Override\n public boolean isEmpty() {\n return queue.isEmpty();\n }", "public boolean isEmpty() {\n return holdingQueue.isEmpty();\n }", "public static boolean isEmpty() {\n System.out.println();\t \n if(queue.isEmpty()) {\t \n System.out.println(\"The queue is currently empty and has no elements.\");\t \t \t \n }\n else {\n System.out.println(\"The queue is currently not empty.\");\t \t\t \n }\n return queue.isEmpty();\n }", "public boolean queueEmpty() {\r\n\t\tif (vehiclesInQueue.size() == 0) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean isMessageQueueEmpty() {\r\n\t\treturn this.messages.size() == 0;\r\n\t}", "public boolean empty() {\n return queue.isEmpty() && forReverse.isEmpty();\n }", "public boolean isEmpty() {\r\n boolean z = false;\r\n if (!isUnconfinedQueueEmpty()) {\r\n return false;\r\n }\r\n DelayedTaskQueue delayedTaskQueue = (DelayedTaskQueue) this._delayed;\r\n if (delayedTaskQueue != null && !delayedTaskQueue.isEmpty()) {\r\n return false;\r\n }\r\n Object obj = this._queue;\r\n if (obj != null) {\r\n if (obj instanceof LockFreeTaskQueueCore) {\r\n z = ((LockFreeTaskQueueCore) obj).isEmpty();\r\n }\r\n return z;\r\n }\r\n z = true;\r\n return z;\r\n }", "public boolean isEmpty()\r\n\t{\n\t\tif(backIndex<0)\r\n\t\t{\r\n\t\t\tbackIndex=-1;\r\n\t\t\tSystem.out.println(\"Queue is Empty\");\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean empty() {\n return normalQueue.isEmpty() && reverseQueue.isEmpty();\n }", "public static boolean isEmpty() {\n\t\treturn resultQueue.isEmpty();\n\t}", "public boolean isEmpty()\r\n {\r\n if(measurementQueue==null) return true;\r\n \r\n return measurementQueue.isEmpty();\r\n }", "public boolean empty() {\r\n return queue1.size() == 0;\r\n }", "public boolean empty() {\r\n return queue1.size() == 0;\r\n }", "public boolean isEmpty() {\n return (head == tail) && (queue[head] == null);\n }", "public boolean isQueueEmpty(Queue objQueue){\r\n\t\treturn objQueue.getRare()==-1;\r\n\t}", "public boolean isFull() {\n int nexttail = (tail + 1 == queue.length) ? 0 : tail + 1;\n return (nexttail == head) && (queue[tail] != null);\n }", "public boolean isFull(){\n return size == arrayQueue.length;\n }", "public boolean empty() {\n return queue1.isEmpty();\n }", "public boolean empty() {\n return queueA.isEmpty() && queueB.isEmpty();\n }", "@Override\r\n\tpublic boolean isFull() {\r\n\r\n\t\treturn data.size() >= maxQueue;\r\n\t}", "public boolean isEmpty() {\n return qSize == 0;\n }", "public boolean queueFull() {\r\n\t\tif (vehiclesInQueue.size() > maxQueueSize) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public boolean empty() {\n return q.isEmpty();\n }", "public boolean empty() {\n /**\n * 当两个栈中都没有元素时,说明队列中也没有元素\n */\n return stack.isEmpty() && otherStack.isEmpty();\n }", "public boolean isEmpty(){\n\t\treturn ( startQueue.isEmpty() && finishQueue.isEmpty() && completedRuns.isEmpty() );\n\t}", "public boolean empty() {\n return q.isEmpty();\n }", "public boolean isEmpty() { return (dequeSize == 0); }", "public boolean isEmpty() {\n return (fifoEmpty.getBoolean());\n }", "boolean isEmpty() {\n\t\t\n\t\t// array is empty if no elements can be polled from it\n\t\t// \"canPoll\" flag shows if any elements can be polled from queue\n\t\t// NOT \"canPoll\" means - empty\n\t\t\n\t\treturn !canPoll;\n\t}", "public boolean isQueueFull(Queue objQueue){\r\n\t\treturn objQueue.getRare()==objQueue.getArrOueue().length;\r\n\t}", "public boolean isEmpty() {\n\t\treturn heap.size() == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn heap.size() == 0;\n\t}", "public boolean empty() {\n\t\treturn (size() <= 0);\n\t}", "public boolean isFull()\n\t{\n\t return (front==0 && rear==queueArray.length-1 || (front==rear+1));\n\t}", "public synchronized boolean isEmpty() {\r\n return size == 0;\r\n }", "public boolean isEmpty() {\n\t\treturn heap.isEmpty();\n\t}", "public boolean empty() {\n\t if(q.size()==0) return true;\n\t return false;\n\t }", "public synchronized boolean isEmpty() {\n\t\treturn size == 0;\n\t}", "public boolean isEmpty() {\n\t\tboolean empty = true;\n\n\t\tfor(LinkedList<Passenger> queue : queues) { // loop through each queue to see if its empty.\n\t\t\tif(!queue.isEmpty()){\n\t\t\t\tempty = false;\n\t\t\t}\n \t}\n\t\treturn empty;\n }", "public boolean empty() {\n return push.isEmpty();\n }", "public boolean empty() {\n if (queue1.isEmpty() && queue2.isEmpty()){\n return true;\n }\n return false;\n }", "public boolean empty() {\n return size == 0;\n }", "public final boolean isEmpty() {\r\n\t\treturn this.size == 0;\r\n\t}", "public boolean empty() {\n return size <= 0;\n }", "public boolean isEmpty()\n {\n return heapSize == 0;\n }", "public boolean isEmpty() {\n\t\treturn this.size == 0;\n\t}", "public boolean empty()\r\n\t{\r\n\t\treturn currentSize == 0;\r\n\t}", "public boolean isEmpty() {\n return (this.size == 0);\n }", "public boolean isEmpty()\n {\n return this.size == 0;\n }", "public boolean empty() {\r\n return size == 0;\r\n }", "public boolean isEmpty() {\n\t\treturn currentSize == 0;\n\t}", "public boolean isEmpty() {\n\t\treturn (size == 0);\n\t}", "public boolean empty() {\n return popStack.isEmpty();\n }", "public boolean isEmpty() {\n return this.size == 0;\n }", "public boolean isEmpty() {\n return this.size == 0;\n }", "public boolean isEmpty() {\r\n return (size == 0);\r\n }", "public boolean empty() {\n return popStack.empty() && pushStack.empty();\n }", "public boolean isEmpty() {\n return (size == 0);\n }", "public boolean isHeapEmpty() {\n\t\treturn this.head == null;\n\t}", "public boolean empty() {\n return rearStack.isEmpty() && frontStack.isEmpty();\n }", "public boolean empty() {\n return stack.isEmpty();\n }", "public boolean empty() {\n return stack.isEmpty();\n }", "public boolean empty() {\r\n return stack.isEmpty();\r\n }", "public boolean empty() { \t \n\t\t return size <= 0;\t \n }", "public boolean isEmpty() {\n return stack.isListEmpty();\n }", "public boolean isEmpty() {\n\t\treturn(this.size == 0);\n\t}", "public boolean isEmpty() {\n\t return size == 0;\n\t }", "public boolean empty() {\r\n return this.stack.isEmpty();\r\n }", "public boolean isEmpty()\n {\n return stack.isEmpty();\n }", "public boolean empty() {\n return stack.isEmpty();\n }", "@Override\r\n\tpublic boolean isEmpty() {\n\t\treturn this.size == 0;\r\n\t}", "public boolean isSetQueue() {\n return this.queue != null;\n }", "public boolean isEmpty() {\n return (size == 0);\n\n }", "public boolean empty() {\r\n return stack.isEmpty();\r\n }", "private boolean isEmpty() {\n int ro = reserveOffset;\n if (ro >= reserve) {\n if (queue[reserve].isCommitted()) {\n ro = reserve + 1;\n } else {\n ro = reserve;\n }\n }\n\n LOG.debug(\"Effective flush/reserve offset {}/{}\", flushOffset, ro);\n return ro <= flushOffset;\n }", "public boolean isEmpty() {\n\t\treturn size == 0;\r\n\t}", "public boolean isEmpty() {\r\n return size == 0;\r\n }" ]
[ "0.9052639", "0.8951558", "0.8884992", "0.88849777", "0.88849777", "0.8866142", "0.8851901", "0.88444257", "0.88393325", "0.8804962", "0.8804962", "0.8804962", "0.8804962", "0.8804962", "0.8804962", "0.8804962", "0.8736885", "0.8736885", "0.8736885", "0.8736885", "0.8736885", "0.87329316", "0.8729997", "0.8719019", "0.85392314", "0.85349065", "0.85048944", "0.84775114", "0.8476621", "0.84139824", "0.840832", "0.8348524", "0.8340728", "0.8323188", "0.8281631", "0.8269947", "0.8269947", "0.8234118", "0.8180097", "0.8145148", "0.81361014", "0.81337947", "0.8103006", "0.806335", "0.8035092", "0.80246216", "0.8021494", "0.8004695", "0.7975325", "0.79741734", "0.79580086", "0.78793085", "0.78761387", "0.787353", "0.783341", "0.783341", "0.7832941", "0.78309184", "0.7824674", "0.7821971", "0.7814976", "0.78058255", "0.7794377", "0.7788328", "0.7779496", "0.7744127", "0.7742105", "0.77345896", "0.7722715", "0.77201676", "0.77113205", "0.7695541", "0.7692184", "0.7691845", "0.7688816", "0.76835734", "0.7681996", "0.7681819", "0.7681819", "0.76755995", "0.7672271", "0.7670897", "0.76664275", "0.76627976", "0.7662692", "0.7662692", "0.76554674", "0.7642117", "0.7631595", "0.76244015", "0.76243615", "0.7620974", "0.7613095", "0.76080865", "0.7607431", "0.7603664", "0.7602549", "0.7602326", "0.7598767", "0.7591182", "0.7585843" ]
0.0
-1
get counts by different color.
@GET @Path("color") @Produces(MediaType.APPLICATION_JSON) public Response getCounts(@QueryParam("color") String type) { JSONObject commitCounts = db.getCounts(type); List<Integer> counts = new ArrayList<>(); List<String> pnames = projectDb.listAllProjectNames(); String status = ""; for (String pname : pnames) { int count = commitCounts.optInt(pname); counts.add(count); } StatusEnum statusEnum = StatusEnum.getStatusEnum(type); switch (statusEnum) { case BUILD_SUCCESS: status = "success"; break; case COMPILE_FAILURE: status = "compile failure"; break; case CHECKSTYLE_FAILURE: status = "checkstyle failure"; break; case UNIT_TEST_FAILURE: status = "JUnit failure"; break; case INITIALIZATION: status = "not build"; break; default: break; } JSONObject ob = new JSONObject(); ob.put("data", counts); ob.put("name", status); return Response.ok().entity(ob.toString()).build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getColoredProbesCount(int colorIndex);", "int getNumColors();", "public native int getTotalColors() throws MagickException;", "public native int getNumberColors() throws MagickException;", "public int getColoredExperimentsCount(int colorIndex);", "public int getColorCount(int idx) {\n \t\t\treturn hist.get(idx);\n \t\t}", "public native int getColors() throws MagickException;", "private void count(int[] counts , int index) {\n\n char color = light[index];\n\n if (color == '0') {\n counts[0]++;\n }\n else if (color == '1') {\n counts[1]++;\n }\n else if (color == '2') {\n counts[2]++;\n }\n else if (color == '3') {\n counts[3]++;\n }\n else if (color == '4') {\n counts[4]++;\n }\n else if (color == '5') {\n counts[5]++;\n }\n else if (color == '6') {\n counts[6]++;\n }\n else if (color == '7') {\n counts[7]++;\n }\n else if (color == '8') {\n counts[8]++;\n }\n else if (color == '9') {\n counts[9]++;\n }\n\n }", "public static int getColorsCount()\n {\n return colorsCount;\n }", "public int colorVertices();", "public Set<Integer> getColors(){\n Set<Integer> colors = new HashSet<Integer>();\n //for(OTEventModel event : events){\n //\tcolors.add(event.getColor());\n //}\n\n return colors;\n }", "private void collectColorData(BufferedImage img) {\n int limit = img.getWidth() * img.getHeight() / 10;\n int i;\n\n for (i=0; i<limit; i++) {\n int y = (int)(Math.random() * img.getHeight());\n int x = (int)(Math.random() * img.getWidth());\n int rgb = img.getRGB(x, y) & 0xffffff;\n\n Integer count = colorMap.get(rgb);\n\n if (count == null) {\n colorMap.put(rgb, 0);\n count = colorMap.get(rgb);\n }\n\n int newCount = count.intValue() + 1;\n colorMap.put(rgb, newCount);\n\n CountData cd = topList.get(2);\n\n if (newCount > cd.count) {\n int j = 0;\n\n for (; j<topList.size(); j++) {\n CountData tcd = topList.get(j);\n\n if (tcd.rgb == rgb) {\n tcd.count++;\n break;\n }\n }\n\n if (j == topList.size()) {\n topList.add(new CountData(newCount, rgb));\n }\n\n Collections.sort(topList);\n\n while (topList.size() > TOP_LIST_COUNT) {\n topList.remove(topList.size() - 1);\n }\n }\n }\n }", "public int getColor();", "public int getColor();", "public int getColorCount() {\n \tif (colorBuf == null)\n \t\treturn 0;\n \treturn colorBuf.asFloatBuffer().limit()/4;\n }", "public int count(HashMap <Integer, Integer> colours) {\r\n\t\tint max = 0;\r\n\t\tfor(int i=1; i<=numNodes; i++) {\r\n\t\t\tint num = colours.get(i);\r\n\t\t\tif(num > max)\r\n\t\t\t\tmax = num;\r\n\t\t}\r\n\t\treturn ++max;\r\n\t}", "public int[] getColorIndices();", "public int getColorCount(CardColor crdClr) {\r\n\t\tint count = 0;\r\n\t\tif (colorCount.containsKey(crdClr)) {\r\n\t\t\tcount = colorCount.get(crdClr);\r\n\t\t}\r\n\t\treturn count;\r\n\t}", "public int countStones(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\tint counter = 0;\r\n\t\tfor (int i = 0; i < playBoard.length; i++) {\r\n\t\t\tfor (int j = 0; j < playBoard[0].length; j++) {\r\n\t\t\t\tif (playBoard[i][j] == color) {\r\n\t\t\t\t\tcounter++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn counter;\r\n\t}", "private int numberOfFieldsOccupiedByStoneColor(Color colorOfStonesToCount) {\n int counterOccupiedByStoneColor = 0;\n for (int i = 0; i < fields.length; i++) {\n for (int j = 0; j < fields.length; j++) {\n if (this.fields[i][j].isOccupiedByStone()) {\n if (this.fields[i][j].getStone().getColor() == colorOfStonesToCount)\n counterOccupiedByStoneColor++;\n }\n }\n }\n return counterOccupiedByStoneColor;\n }", "float[] getColorData(int trisCount, int color) {\n float[] colDat = new float[trisCount * 4];\n float alpha = 255;\n float red = 255;\n float green = 255;\n float blue = 255;\n if(color != -1) {\n alpha = color >> 24 & 0xff;\n red = color >> 16 & 0xff;\n green = color >> 8 & 0xff;\n blue = color & 0xff;\n }\n// Log.e(\"Modelbase\", \"shift = \" + red + \",\" + green + \",\" + blue + \",\" + alpha);\n red /= 255f;\n green /= 255f;\n blue /= 255f;\n alpha /= 255f;\n// Log.e(\"Modelbase\", \"div by 255 = \" + red + \",\" + green + \",\" + blue + \",\" +\n// alpha);\n for (int i = 0; i < colDat.length; i += 4) {\n colDat[i] = red;\n colDat[i + 1] = green;\n colDat[i + 2] = blue;\n colDat[i + 3] = alpha;\n }\n return colDat;\n }", "public int getNumChips(CtColor color) {\n\t\tint num = 0;\n\t\tfor (CtColor chip : chips) {\n\t\t\tif (chip.getColorNum() == color.getColorNum())\n\t\t\t\tnum++;\n\t\t}\n\t\treturn num;\n\t}", "public int contarAtomosDeColor(Color color) {\n\t\tint resultado = 0;\n\t\tfor (int i = 0; i < matriz.size(); ++i) {\n\t\t\tfor (int j = 0; j < matriz.get(i).size(); ++j) {\n\t\t\t\tif (matriz.get(i).get(j).estaVacia() == false) {\n\t\t\t\t\tif ((matriz.get(i).get(j).obtenerAtomo().obtenerColor() == color)) {\n\t\t\t\t\t\tresultado = resultado + 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn resultado;\n\t}", "public int getNColor(){\n int nColor = getBit();\n\n if (nColor==0) {\n for (int i=0; i<7; i++) {\n nColor = (nColor<<1) | getBit();\n }\n }\n\n return nColor;\n }", "public Map<Color, Integer> getScores( Board board) {\n Map<Color, Integer> num_of_disks = new TreeMap<Color, Integer>();\n for (Color c : Color.values()) {\n num_of_disks.put(c, 0);\n }\n //count disks of each color\n for (int i = 0; i < board.getRows(); i++) {\n for (int j = 0; j < board.getCols(); j++) {\n if (board.getCell(i,j).getDisk() != null) {\n for (Color c : Color.values()) {\n if (board.getCell(i,j).getDisk().getColor() == c) {\n num_of_disks.put(c, num_of_disks.get(c) + 1);\n }\n }\n }\n }\n }\n return num_of_disks;\n }", "public Color[] getColors();", "public int countPossibleColor(String res) {\n int count = 0;\n for (String c : res.split(\"\")) {\n if (c.equals(\"*\") || c.equals(\"+\")) { count++; }\n }\n return count;\n }", "private int getColorAlgo(String[] _data) {\n\t\tif(_data != null && _data.length >1) {\n\t\t\tSystem.out.print(\"Color Algo : \"+_data[1]);\n\t\t\ttry {\n\t\t\t\treturn Integer.parseInt(_data[1].trim());\n\t\t\t} catch (Exception ignored) {}\n\t\t}\n\t\treturn 0;\n\t}", "public int[] getColorIndexes()\n {\n return this.colorIndexes;\n }", "public void onColorFetched(int[] colors, long albumId) {\n }", "public abstract int rgbColor(double u, double v);", "private static int getMainColor(BufferedImage image)\n {\n // Counts how many time each colors appear\n ColorOccurence co[] = new ColorOccurence[10000];\n\n // For every pixel of the image\n for(int x = 0; x < image.getWidth(null) / 2; x++)\n {\n for(int y = 0; y < image.getHeight(null) / 2; y++)\n {\n // Get the pixel\n int pixel = image.getRGB(x, y);\n\n // Parse every element initialized of the array\n for(int i = 0; i < 10000; i++)\n {\n // If the element is null, a new color has been found\n if(co[i] == null)\n {\n // Creates a new color and sets its occurence to 1\n co[i] = new ColorOccurence(pixel, 1);\n break;\n }\n\n // If the color is already is already in the array, add one\n if(co[i].color == pixel){\n co[i].occurence += 1;\n break;\n }\n }\n }\n }\n\n // Maximum number of occurence\n int max = 0;\n\n // The color that appeared the most so far\n int maxVal = 0;\n\n // For every color\n for(ColorOccurence c : co)\n {\n // If null, the whole array has been parsed\n if(c == null)\n {\n break;\n }\n\n // If this color occurs more times than the previous most appearing\n // color, set it as the new most appearing color\n if(c.occurence > max)\n {\n max = c.occurence;\n maxVal = c.color;\n }\n }\n return maxVal;\n }", "String slotsFromColor(String color);", "public static int countSquaresOnFace(Cube cube, int squareColor, int face){\n\t\tint counter = 0;\n\t\tfor(int i = 0; i <3; i++){\n\t\t\tfor(int j = 0; j<3; j++){\n\t\t\t\tif(cube.getSquare (face, i, j) == squareColor) counter++;\n\t\t\t}\n\t\t}\n\t\treturn counter;\n\t}", "public int[] getExperimentColorIndices();", "public static int countColorsAboveBrightnessThreshold(double bound) {\n int count = 0;\n\n if (bound >= luminanceOfRed255Green255Blue11()) {\n //If the bound is this high, no color value can be lower than 11, even if the other two are maxed.\n double maxRedBlueSumLuminance = 0.2126 + 0.0722; // Equals .2848, which is 1 - .7152\n double minGreenContrib = bound - maxRedBlueSumLuminance;\n double minGreenElementLuminance = minGreenContrib / .7152;\n // What is RsGreen when ((RsGreen + .055)/1.055)^2.4 == minGreenElementLuminance?\n double minRsGreen = RsRGBFromElementLuminanceWhereIntAbove10(minGreenElementLuminance);\n long minGreenInt = Math.round(Math.ceil(minRsGreen*255));\n Long i = minGreenInt;\n while (i <= 255) {\n //Evaluate what happens when the green value from 0 to 255 is equal to i\n double greenElementLuminance = .7152*ColorNamer.elementLuminance(i.intValue());\n double minRedContrib = bound - greenElementLuminance - .0722;\n // Red must contribute at least minRedContrib luminance for the luminance to be above the bound\n double minRedElementLuminance = minRedContrib / .2126;\n double minRsRed = RsRGBFromElementLuminanceWhereIntAbove10(minRedElementLuminance);\n long minRedInt = Math.round(Math.ceil(minRsRed*255));\n Long j = minRedInt;\n while (j <= 255) {\n double redElementLuminance = .2126*ColorNamer.elementLuminance(j.intValue());\n double minBlueContrib = bound - greenElementLuminance - redElementLuminance;\n double minBlueElementLuminance = minBlueContrib / .0722;\n double minRsBlue = RsRGBFromElementLuminanceWhereIntAbove10(minBlueElementLuminance);\n long minBlueInt = Math.round(Math.ceil(minRsBlue*255));\n count += (255 - minBlueInt + 1);\n j++;\n }\n\n i++;\n }\n }\n else {\n System.out.println(\"countColorsAboveBrightnessThreshold is not finished for bounds this low\");\n }\n\n return count;\n }", "public int getColorInt () {\r\n return this.colorReturned;\r\n }", "public int getColor(){\r\n\t\treturn color;\r\n\t}", "public static IntArrayPtr\ngetColorIndices(SoState state) \n{ \n SoLazyElement elem = getInstance(state);\n if(state.isCacheOpen()) elem.registerGetDependence(state, masks.DIFFUSE_MASK.getValue());\n //return curElt.ivState.colorIndices;\n\treturn new IntArrayPtr(elem.coinstate.colorindexarray);\n}", "@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 }", "public int getColAmount(Enum c) {\r\n int x = 0;\r\n for (Property prop : owned) {\r\n if (prop.getColour() == c) {\r\n x++;\r\n } \r\n }\r\n return x;\r\n }", "public Color[] getExperimentColors();", "public static int TOTAL_COLORS(int gfxn){\n return (Machine.gfx[gfxn].total_colors * Machine.gfx[gfxn].color_granularity);\n }", "boolean similarColorTo(Card c);", "private void handleFindByColor(String[] args) {\n if (args.length < 3) {\n String requiredArgs = \"<color>\";\n Messages.badNumberOfArgsMessage(args.length, FIND_BY_COLOR_OPERATION, requiredArgs);\n System.exit(1);\n }\n\n Color color = null;\n String stringColor = args[2];\n try {\n color = Color.parseColor(stringColor);\n } catch (IllegalArgumentException e) {\n // in case of unsupported color, print all supported colors and end here\n Messages.printAllColors();\n System.exit(1);\n }\n\n\n Client client = ClientBuilder.newBuilder().build();\n WebTarget webTarget = client.target(\"http://localhost:8080/pa165/rest/bricks\").queryParam(\"color\", color.getColorString());\n webTarget.register(auth);\n Invocation.Builder invocationBuilder = webTarget.request(MediaType.APPLICATION_JSON);\n invocationBuilder.header(\"accept\", MediaType.APPLICATION_JSON);\n\n\n Response response = invocationBuilder.get();\n\n\n if (response.getStatus() == Response.Status.OK.getStatusCode()) {\n List<BrickDto> brickDtoList = response.readEntity(new GenericType<List<BrickDto>>() {\n });\n\n System.out.println(\"Number of bricks returned: \" + brickDtoList.size());\n for (BrickDto b : brickDtoList) {\n System.out.println(b);\n }\n } else {\n System.out.println(\"Server error - Error code: \" + response.getStatus());\n }\n }", "private void selectNovelColors(IMapColor mapColor, Histogram hist, int interestingColors,\n \t\t\tint usedColors, int[] paletteSelections) {\n \t\t\n \t\tInteger[] indices = (Integer[]) hist.getColorIndices().toArray(new Integer[hist.getColorIndices().size()]);\n \t\tSet<Integer> visited = new HashSet<Integer>();\n \t\t\n \t\tbyte[] rgb = { 0, 0, 0 };\n \t\tfloat[] hsv = { 0, 0, 0 };\n \t\t\n \t\tfloat[] lastHSV = { 0, 0, 0 };\n \t\tint[] lastRGB = { 0, 0, 0 };\n \t\tint lastPixel = Integer.MIN_VALUE;\n \t\t\n \t\tint directMap = usedColors / 3;\n \t\tint distance = interestingColors / 3;\n \t\t\n \t\tfor (int i = 0; i < usedColors; i++) {\n \t\t\tfloat maxDiff = -Float.MAX_VALUE;\n \t\t\tint farthestIndex = 0;\n \t\t\tint farthestPixel = 0;\n \t\t\t\n \t\t\tint searchDist = Math.max(1, Math.min(indices.length, (distance * (i + 1) / usedColors)));\n \t\t\tfor (int j = 0; j < searchDist && j < indices.length; j++) {\n \t\t\t\tif (visited.contains(j)) {\n \t\t\t\t\tsearchDist++;\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tint idx = indices[j];\n \t\t\t\tint pixel = mapColor.getPalettePixel(idx);\n \t\t\t\tpixelToRGB(pixel, rgb);\n \t\t\t\trgbToHsv(rgb[0] & 0xff, rgb[1] & 0xff, rgb[2] & 0xff, hsv);\n \t\t\t\t\n \t\t\t\t\n \t\t\t\tfloat diff = //(hsv[0] - lastHSV[0]) * (hsv[0] - lastHSV[0])\n \t\t\t\t\t//+ ((hsv[1] - lastHSV[1]) * (hsv[1] - lastHSV[1])) * 100000\n \t\t\t\t\t+ (hsv[2] - lastHSV[2]) * (hsv[2] - lastHSV[2])\n \t\t\t\t;\n \t\t\t\t\n \t\t\t\t//float diff = getRGBDistance(rgb, lastRGB);\n \t\t\t\tif (diff >= maxDiff) {\n \t\t\t\t\tmaxDiff = diff;\n \t\t\t\t\tfarthestPixel = pixel;\n \t\t\t\t\tfarthestIndex = j;\n \t\t\t\t\tif (i < directMap) {\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t} \n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t// winner!\n \t\t\tpaletteSelections[i] = farthestIndex;\n \t\t\tvisited.add(farthestIndex);\n \t\t\t\n \t\t\tlastPixel = farthestPixel;\n \t\t\tpixelToRGB(lastPixel, lastRGB);\n \t\t\trgbToHsv(lastRGB[0] & 0xff, lastRGB[1] & 0xff, lastRGB[2] & 0xff, lastHSV);\n \t\t}\n \t}", "public ArrayList getColors(int amount){\n \n \tArrayList colors = new ArrayList();\n\n \tfloat step = img.width/amount;\n\n \tfor (int i=0; i < Math.floor(img.width/step); i++){\n \t\tfloat index = map(i*step,0,img.width,0,(float)1.0);\n \t\tint c = getColorAt(index);\n \t\tcolors.add(c);\n \t} \n\n \treturn colors;\n\n }", "String getColor();", "public String getResultColors(final String resultCode) {\n\t\tString color = colorMap.get(resultCode);\n\t\tif (color == null) {\n\t\t\treturn JudgementColor.getDefaultColor(resultCode);\n\t\t}\n\t\treturn color;\n\t}", "private HashMap getColorInfo(Bitmap bmp) {\n HashMap<String, String> colorInfo = new HashMap<>();\n\n int smoothFactor = 10;\n int[] pixels = new int[bmp.getHeight() * bmp.getWidth()];\n bmp.getPixels(pixels, 0, bmp.getWidth(),0,0, bmp.getWidth(), bmp.getHeight());\n List<Integer> R = new ArrayList<>();\n List<Integer> G = new ArrayList<>();\n List<Integer> B = new ArrayList<>();\n\n for (int y = 0; y < bmp.getHeight(); y++) {\n for (int x = 0; x < bmp.getWidth(); x++) {\n int index = y * bmp.getWidth() + x;\n R.add((pixels[index] >> 16) & 0xff);\n G.add((pixels[index] >> 8) & 0xff);\n B.add(pixels[index] & 0xff);\n }\n }\n\n int r = mostCommonElement(R); if (r <= smoothFactor) { r = 0;}\n int g = mostCommonElement(G); if (g <= smoothFactor) { g = 0;}\n int b = mostCommonElement(B); if (b <= smoothFactor) { b = 0;}\n float[] hsv = new float[3];\n Color.RGBToHSV(r,g,b,hsv);\n\n colorInfo.put(\"R\", String.valueOf(r));\n colorInfo.put(\"G\", String.valueOf(g));\n colorInfo.put(\"B\", String.valueOf(b));\n colorInfo.put(\"H\", String.valueOf(hsv[0]));\n colorInfo.put(\"S\", String.valueOf(hsv[1]));\n colorInfo.put(\"V\", String.valueOf(hsv[2]));\n colorInfo.put(\"DECIMAL\", String.valueOf((0xff000000 | (r << 16) | (g << 8) | b)));\n colorInfo.put(\"HEX\", String.format(\"#%02x%02x%02x\", r, g, b));\n colorInfo.put(\"AREA\", getBase64(bmp));\n\n return colorInfo;\n }", "public Set<CtColor> getColors() {\n\t\tHashSet<CtColor> hs = new HashSet<CtColor>();\n\t\tint colorIndexArr[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };\n\t\tfor (CtColor chip : chips) {\n\t\t\tcolorIndexArr[chip.getColorNum()] = 1;\n\t\t}\n\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tif (colorIndexArr[i] != 0)\n\t\t\t\ths.add(new CtColor(i));\n\t\t}\n\t\treturn hs;\n\t}", "public int getColor(){\n\t\treturn color;\n\t}", "public int getColor(){\n\t\treturn color;\n\t}", "public int getColor() {\n \t\treturn color;\n \t}", "int getColour();", "public static void HistogrammeCumuleRGB(Mat m,int[] R,int[] G,int[] B,int[] RC,int[] GC,int[] BC,int N)\n\t{\n\t\tint valueR=0;int valueG=0;int valueB=0;\n\t\tfor(int i=0;i<256;i++)\n\t\t{\n\t\t\tvalueR+=R[i];RC[i]=R[i]==0?0:valueR;\n\t\t\tvalueG+=G[i];GC[i]=G[i]==0?0:valueG;\n\t\t\tvalueB+=B[i];BC[i]=B[i]==0?0:valueB;\n\t\t\t\n\t\t}\n\t}", "private int[] histogram(Bitmap bmp) {\n int[] res = new int[256];\n int w = bmp.getWidth();\n int h = bmp.getHeight();\n Bitmap bmCopy = bmp.copy(bmp.getConfig(), true);\n toGray(bmCopy);\n\n int pixels[] = new int[w*h];\n bmCopy.getPixels(pixels, 0, w, 0, 0, w, h);\n for (int i = 0; i < w*h; i++)\n res[Color.red(pixels[i])]++;\n return res;\n }", "public int getColor(Vertex v);", "public int getColor() {\n return color;\n }", "protected int getColor(int colornumber) {\n if(random){\n return colorMap.get((int)Math.floor(colorMap.size() * Math.random())).getRGB();\n }\n return colorMap.get(colornumber % colorMap.size()).getRGB();\n }", "@Override\n public int getCount() {\n return(this.colors.length);\n }", "public int getColorValue() {\r\n\t\treturn color;\r\n\t}", "public Integer getColor() {\n\t\treturn color;\n\t}", "private int cantidadSiendoAtendidos(Color color) {\n int cantidad = pacienteRepository.cantidadPacientesSiendoAtendidos(color.getId());\n return cantidad;\n }", "private int optimizeForNColors(BufferedImage img, IMapColor mapColor) {\n \t\t\n \t\tif (canSetPalette) {\n \t\t\treturn optimizeForNColorsAndRebuildPalette(img, mapColor);\n \t\t}\n \t\t\t\n \t\tint numColors = mapColor.getNumColors();\n \t\t\n \t\tbyte[][] palette = mapColor.getPalette();\n \t\t\n \t\tint ourDist = mapColor.getMinimalPaletteDistance();\n \t\t\n \t\tSystem.out.println(\"Minimum color palette distance: \" + ourDist);\n \n \t\tHistogram hist = new Histogram(img);\n \t\tint mappedColors = 0;\n \t\tint interestingColors = 0;\n \t\tint total = img.getWidth() * img.getHeight();\n \t\t\n \t\tfor (int mask = 0; mask < 5; mask++) {\n \t\t\tmappedColors = hist.generate(mapColor, ourDist, mask);\n \t\t\tinterestingColors = hist.size();\n \t\t\tSystem.out.println(\"For mask \" + Integer.toHexString(mask) \n \t\t\t\t\t+\"; # interesting = \" + interestingColors\n \t\t\t\t\t+\"; # mapped = \" + mappedColors);\n \n \t\t\tif (mappedColors >= total / 2)\n \t\t\t\tbreak;\n \t\t}\n \n \t\t\n \t\tint usedColors = Math.min(numColors * 3 / 4, \n \t\t\t\tMath.min(numColors, interestingColors));\n \t\t\n \t\tif (!(mapColor instanceof MonoMapColor)) {\n \t\t\tif (interestingColors == 2)\n \t\t\t\tusedColors = 1;\n \t\t}\n \t\t\n \t\tSystem.out.println(\"\\nN-color: interestingColors=\"+interestingColors\n \t\t\t\t+\"; usedColors=\"+usedColors\n \t\t\t\t+\"; mapped=\"+mappedColors\n \t\t\t\t);\n \t\t\n \t\tourDist = mapColor.getMaximalReplaceDistance(usedColors);\n \t\tfor (int i = 0; i < usedColors; i++) {\n \t\t\t// ensure there will be an exact match so no dithering \n \t\t\t// occurs on the primary occurrences of this color\n \t\t\tint idx = hist.getColorIndex(i);\n \t\t\tbyte[] rgb = palette[idx];\n \t\t\tint newRGB = rgb8ToPixel(rgb);\n \t\t\treplaceColor(img, hist, idx, newRGB, ourDist);\n \t\t}\n \t\t\n \t\treturn ourDist;\n \t}", "Color getColor();", "Color getColor();", "Color getColor();", "Color getColor();", "Color getColor();", "private void colorizePalette(byte [] buffer, int offset, int color) {\r\n\t\tint dataLength = getInt(buffer, offset);\r\n\t\tint dataOffset = offset + 8;\r\n\r\n\t\tint r = (color & 0x00FF0000) >>> 16;\r\n\t\tint g = (color & 0x0000FF00) >>> 8;\r\n\t\tint b = (color & 0x000000FF);\r\n\r\n\t\tfor (int i = 0; i < dataLength / 3; i++) {\r\n\t\t\tint pR = buffer[dataOffset+0] & 0xFF;\r\n\t\t\tint pG = buffer[dataOffset+1] & 0xFF;\r\n\t\t\tint pB = buffer[dataOffset+2] & 0xFF;\r\n\r\n\t\t\tint brightness = (pR + pG + pB) / 3;\r\n\r\n\t\t\tbuffer[dataOffset++] = (byte) (r + (brightness * (255-r)) / 255); // red\r\n\t\t\tbuffer[dataOffset++] = (byte) (g + (brightness * (255-g)) / 255); // green\r\n\t\t\tbuffer[dataOffset++] = (byte) (b + (brightness * (255-b)) / 255); // blue\r\n\t\t}\r\n\r\n\t\tint crc = crc32(buffer, offset + 4, dataLength + 4);\r\n\t\tsetInt(buffer, offset + 8 + dataLength, crc);\r\n\t}", "GlobalColors() {\n countMap = new ConcurrentHashMap<State, Integer>();\n redMap = new ConcurrentHashMap<State, Boolean>();\n hasResult = false;\n result = false;\n }", "public int getPaletteCount() {\n return AviDemux.str2ulong( bih, 32 );\n }", "public int countByStatus(int status);", "public Color getExperimentColor(int col);", "public int getColor() {\n return this.color;\n }", "public static ArrayList<String> getColorsDetected() {\n return colorsDetected;\n }", "public int[] getColoursToConsider(boolean red, boolean green, boolean blue) {\n if (red && green && blue) {\n return new int[]{0, 1, 2};\n } else if (red && green) {\n return new int[]{0, 1};\n } else if (red && blue) {\n return new int[]{0, 2};\n } else if (blue && green) {\n return new int[]{1, 2};\n } else if (red) {\n return new int[]{0};\n } else if (green) {\n return new int[]{1};\n } else if (blue) {\n return new int[]{2};\n }\n return new int[]{0, 1, 2};\n }", "public synchronized Color scan(){\n \tcolorRGBSensor.fetchSample(sample, 0);\n color.setR(sample[0]*1024);\n color.setG(sample[1]*1024);\n color.setB(sample[2]*1024);\n return color;\n }", "private int[] countPixelSums(final int[][] imageData) {\n\n\t\tfinal int width = imageData.length;\n\t\tfinal int height = imageData[0].length;\n\n\t\tfinal int[] pixelValueSums = new int[256];\n\n\t\tfor (int x = 0; x < width; x++) {\n\t\t\tfor (int y = 0; y < height; y++) {\n\t\t\t\tfinal int pixelValue = imageData[x][y];\n\n\t\t\t\tfinal int red = (pixelValue & 0x00ff0000) >> 16;\n\t\t\t\tfinal int green = (pixelValue & 0x0000ff00) >> 8;\n\t\t\t\tfinal int blue = pixelValue & 0x000000ff;\n\n\t\t\t\tfinal int greyValue = (red + green + blue) / 3;\n\n\t\t\t\tpixelValueSums[greyValue]++;\n\t\t\t}\n\t\t}\n\n\t\treturn pixelValueSums;\n\t}", "public int getProbeColorIndex(int row);", "public boolean checkColoring(int[] ccolor){\n // \tfor(int i = 0; i < ccolor.length; i++){\n //\t System.out.println(Arrays.toString(ccolor));\n \t//}\n for(int i = 0; i < ccolor.length; i++){\n for(int w = 0; w < ccolor.length; w++){\n \t//System.out.println(i + \",\" + w);\n if(hasEdge(i,w) && (ccolor[i] == ccolor[w])){\n \t//System.out.println(i + \",false\" + w);\n return false;\n }\n }\n }\n return true;\n }", "static public int getGreen(int color) {\n return (color >> 8) & 0xff;\n }", "public int getColorIndex() {\n return colorIndex;\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 int getColor() {\n\t\treturn getMappedColor(color);\n\t}", "@Override\n public int hashCode() {\n int hash = 5;\n hash = 11 * hash + Objects.hashCode(this.color);\n return hash;\n }", "java.awt.Color getColor();", "public native int getColorspace() throws MagickException;", "public int getColorTextureCount()\n\t{\n\t\treturn mColorTextures.length;\n\t}", "public void getProfileCounts(char[][] c, int j, int[] counts) {\n for (int i = 0; i < c.length; i++) {\n switch (c[i][j]) {\n case 'A':\n counts[0]++;\n break;\n case 'C':\n counts[1]++;\n break;\n case 'G':\n counts[2]++;\n break;\n case 'T':\n counts[3]++;\n break;\n }\n }\n }", "public int getCount(boolean getBlackCount) {\n\t\tint count = 0;\n\t\tif (getBlackCount) {\n\t\t\tfor (int i = 0; i < dimensions.x; ++i) {\n\t\t\t\tfor (int j = 0; j < dimensions.y; ++j) {\n\t\t\t\t\tif (board[i][j].isBlack())\n\t\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tfor (int i = 0; i < dimensions.x; ++i) {\n\t\t\t\tfor (int j = 0; j < dimensions.y; ++j) {\n\t\t\t\t\tif (board[i][j].isRed())\n\t\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn count;\n\t}", "int getRed(){\n return getPercentageValue(\"red\");\n }", "int getGreen(){\n return getPercentageValue(\"green\");\n }", "int violetSquares() {\n int s = 0;\n int i, j;\n for (i = 0; i < 14; i++) {\n for (j = 0; j < 14; j++) {\n if (_board[i][j] == VIOLET) {\n s++;\n }\n }\n }\n return s;\n }", "public char getColor();", "public Color[] getColors()\n {\n return colors;\n }", "protected ArrayList<String> getViewID(String color){\n if(color.equals(AppCSTR.GREEN_IDS)){\n return greenIDs;\n }\n return redIDs;\n }", "public List<PhotoColor> getColors() {\n return fullPhoto.getColors();\n }", "int getRed(int x, int y);" ]
[ "0.72069883", "0.70684564", "0.6848518", "0.68331414", "0.6763019", "0.6493675", "0.6481149", "0.6464001", "0.63204235", "0.6311411", "0.6126773", "0.59865046", "0.59711987", "0.59711987", "0.5936294", "0.5929207", "0.59066683", "0.58328384", "0.5785318", "0.5773661", "0.5752704", "0.57321537", "0.57280743", "0.57255185", "0.5685242", "0.56575376", "0.5640547", "0.5630794", "0.56210816", "0.5594302", "0.5578494", "0.5566374", "0.5542994", "0.5530783", "0.54900277", "0.5465319", "0.5462965", "0.541963", "0.5415981", "0.54077214", "0.54036087", "0.5390939", "0.53856367", "0.53849876", "0.53830975", "0.53830975", "0.5365002", "0.53566873", "0.53521955", "0.5344093", "0.53419036", "0.5339163", "0.5339163", "0.53353316", "0.53252816", "0.5316475", "0.5285152", "0.52727807", "0.5268877", "0.5264281", "0.52419066", "0.52000046", "0.5193333", "0.51917267", "0.51906985", "0.51842165", "0.51842165", "0.51842165", "0.51842165", "0.51842165", "0.5181698", "0.51689863", "0.51612204", "0.5154948", "0.5150626", "0.51480645", "0.5132632", "0.5131248", "0.51201457", "0.5113783", "0.5113106", "0.510899", "0.5107256", "0.51030564", "0.51029825", "0.5101727", "0.5101635", "0.51006407", "0.5097288", "0.5095791", "0.50955737", "0.50944614", "0.5080855", "0.50806713", "0.5077125", "0.50732535", "0.5069889", "0.5069848", "0.506667", "0.50648063" ]
0.6466323
7
get commit result by stuId and hw.
@GET @Path("result") @Produces(MediaType.TEXT_PLAIN) public Response getCommitResultByStudentAndHw(@QueryParam("proName") String proName, @QueryParam("userName") String userName) { int id = userDb.getUser(userName).getId(); CommitResult commitResult = db.getCommitResultByStudentAndHw(id, proName); String circleColor = "circle " + commitResult.getStatus(); String result = userName + "_" + proName + "," + circleColor + "," + (commitResult.getCommit() + 1); return Response.ok().entity(result).build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getCommitResult(String userName, String proName) {\n int id = userDb.getUser(userName).getId();\n return db.getCommitResultByStudentAndHw(id, proName).getStatus();\n }", "public Commit findCommit(String hash) {\r\n Query<Commit> commitQuery = datastore.find(Commit.class);\r\n commitQuery.and(\r\n commitQuery.criteria(\"revision_hash\").equal(hash),\r\n commitQuery.criteria(\"vcs_system_id\").equal(getVcSystem().getId())\r\n );\r\n final List<Commit> commits = commitQuery.asList();\r\n\r\n if (commits.size() == 1) {\r\n return commits.get(0);\r\n } else {\r\n logger.debug(\"Could not find commit: \" + hash);\r\n return null;\r\n }\r\n }", "public JSONObject getProjectCommitRecord(int pgId) {\n String sql = \"SELECT * FROM Project_Commit_Record WHERE pgId=?\";\n JSONObject ob = new JSONObject();\n JSONArray array = new JSONArray();\n\n try (Connection conn = database.getConnection();\n PreparedStatement preStmt = conn.prepareStatement(sql)) {\n preStmt.setInt(1, pgId);\n try (ResultSet rs = preStmt.executeQuery()) {\n while (rs.next()) {\n int statusId = rs.getInt(\"status\");\n StatusEnum statusEnum = csDb.getStatusNameById(statusId);\n int commitNumber = rs.getInt(\"commitNumber\");\n Date commitTime = rs.getTimestamp(\"time\");\n String commitStudent = rs.getString(\"commitStudent\");\n JSONObject eachHw = new JSONObject();\n eachHw.put(\"status\", statusEnum.getType());\n eachHw.put(\"commitNumber\", commitNumber);\n eachHw.put(\"commitTime\", commitTime);\n eachHw.put(\"commitStudent\", commitStudent);\n array.put(eachHw);\n }\n }\n ob.put(\"commits\", array);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return ob;\n }", "@Override\r\n\tpublic Object getStu_resultById(int stu_r_id) {\n\t\tConnection conn = null;\r\n\t\tPreparedStatement stmt = null;\r\n\t\tResultSet rs = null;\r\n\t\ttry {\r\n\t\t\tconn = DBHelper.getConnection();\r\n\t\t\tString sql = \"select * from stu_result where stu_r_id=?;\"; // SQL语句\r\n\t\t\tstmt = conn.prepareStatement(sql);\r\n\t\t\tstmt.setInt(1, stu_r_id);\r\n\t\t\trs = stmt.executeQuery();\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tStu_result stu_r = new Stu_result();\r\n\t\t\t\tstu_r.setStu_r_id(rs.getInt(\"stu_r_id\"));\r\n\t\t\t\tstu_r.setSid(rs.getInt(\"sid\"));\r\n\t\t\t\tstu_r.setKj_id(rs.getInt(\"kj_id\"));\r\n\t\t\t\tstu_r.setStu_dxt_r(rs.getString(\"stu_dxt_r\"));\r\n\t\t\t\tstu_r.setStu_dxt_c(rs.getString(\"stu_dxt_c\"));\r\n\t\t\t\tstu_r.setStu_dxts_r(rs.getString(\"stu_dxts_r\"));\r\n\t\t\t\tstu_r.setStu_dxts_c(rs.getString(\"stu_dxts_c\"));\r\n\t\t\t\tstu_r.setStu_pdt_r(rs.getString(\"stu_pdt_r\"));\r\n\t\t\t\tstu_r.setStu_pdt_c(rs.getString(\"stu_pdt_c\"));\r\n\t\t\t\treturn stu_r;\r\n\t\t\t} else {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t} finally {\r\n\t\t\t// 释放数据集对象\r\n\t\t\tif (rs != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\trs.close();\r\n\t\t\t\t\trs = null;\r\n\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// 释放语句对象\r\n\t\t\tif (stmt != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tstmt.close();\r\n\t\t\t\t\tstmt = null;\r\n\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}", "public JSONObject getLastProjectCommitRecord(int pgId) {\n String sql = \"SELECT * from Project_Commit_Record a where (a.commitNumber = \"\n + \"(SELECT max(commitNumber) FROM Project_Commit_Record WHERE pgId = ?));\";\n JSONObject ob = new JSONObject();\n JSONArray array = new JSONArray();\n\n try (Connection conn = database.getConnection();\n PreparedStatement preStmt = conn.prepareStatement(sql)) {\n preStmt.setInt(1, pgId);\n try (ResultSet rs = preStmt.executeQuery()) {\n\n int statusId = rs.getInt(\"status\");\n StatusEnum statusEnum = csDb.getStatusNameById(statusId);\n int commitNumber = rs.getInt(\"commitNumber\");\n Date commitTime = rs.getTimestamp(\"time\");\n String commitStudent = rs.getString(\"commitStudent\");\n JSONObject eachHw = new JSONObject();\n eachHw.put(\"status\", statusEnum.getType());\n eachHw.put(\"commitNumber\", commitNumber);\n eachHw.put(\"commitTime\", commitTime);\n eachHw.put(\"commitStudent\", commitStudent);\n array.put(eachHw);\n }\n ob.put(\"commits\", array);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return ob;\n }", "public String getProjectCommitRecordStatus(int pgId, int commitNumber) {\n String status = \"\";\n String query = \"SELECT status FROM Project_Commit_Record where pgId = ? and limit ?,1\";\n\n try (Connection conn = database.getConnection();\n PreparedStatement preStmt = conn.prepareStatement(query)) {\n preStmt.setInt(1, pgId);\n preStmt.setInt(2, commitNumber - 1);\n\n try (ResultSet rs = preStmt.executeQuery();) {\n if (rs.next()) {\n status = rs.getString(\"status\");\n }\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return status;\n\n }", "public Buffer execute(Transaction tx) {\n if (!isRunAllowed()) {\n return null;\n }\n\n SortedIndex<Buffer, Buffer> indexCompleted = hawtDBFile.getRepositoryIndex(tx, getRepositoryNameCompleted(), false);\n if (indexCompleted == null) {\n return null;\n }\n\n Iterator<Map.Entry<Buffer, Buffer>> it = indexCompleted.iterator();\n // scan could potentially be running while we are shutting down so check for that\n while (it.hasNext() && isRunAllowed()) {\n Map.Entry<Buffer, Buffer> entry = it.next();\n Buffer keyBuffer = entry.getKey();\n\n String exchangeId;\n try {\n exchangeId = codec.unmarshallKey(keyBuffer);\n } catch (IOException e) {\n throw new RuntimeException(\"Error unmarshalling confirm key: \" + keyBuffer, e);\n }\n if (exchangeId != null) {\n LOG.trace(\"Scan exchangeId [{}]\", exchangeId);\n answer.add(exchangeId);\n }\n }\n return null;\n }", "public wsihash fetchByPrimaryKey(long wsihashId);", "Commit getCommit(String hash) {\n Commit newCommit = null;\n File gettin = new File(\".gitlet/commits/\" + hash);\n if (gettin.exists()) {\n return deserializeCommit(\".gitlet/commits/\" + hash);\n } else {\n return deserializeCommit(\".gitlet/commits/\" + hash + \".ser\");\n }\n }", "private Commit getCommitFromID(String shaCode) {\n File f = new File(Main.ALL_COMMITS, shaCode);\n if (f.exists()) {\n return Utils.readObject(f, Commit.class);\n } else {\n return null;\n }\n }", "Online selectByPrimaryKey(String hash);", "public Buffer execute(Transaction tx) {\n if (!isRunAllowed()) {\n return null;\n }\n\n SortedIndex<Buffer, Buffer> index = hawtDBFile.getRepositoryIndex(tx, repositoryName, false);\n if (index == null) {\n return null;\n }\n\n Iterator<Map.Entry<Buffer, Buffer>> it = index.iterator();\n // scan could potentially be running while we are shutting down so check for that\n while (it.hasNext() && isRunAllowed()) {\n Map.Entry<Buffer, Buffer> entry = it.next();\n Buffer keyBuffer = entry.getKey();\n\n String key;\n try {\n key = codec.unmarshallKey(keyBuffer);\n } catch (IOException e) {\n throw new RuntimeException(\"Error unmarshalling key: \" + keyBuffer, e);\n }\n if (key != null) {\n LOG.trace(\"getKey [{}]\", key);\n keys.add(key);\n }\n }\n return null;\n }", "@Test\n public void testSelectSpecificRow() throws SQLException {\n // Arrange\n CommitStructure commit = getSampleCommit();\n String commitID = commit.getCommitID();\n // Act\n mysqlDatabase.insertCommitToDatabase(commit);\n CommitStructure commits = mysqlDatabase.selectSpecificRow(commitID);\n // Assert\n assertEquals(commits.getCommitID() , commitID);\n }", "@GET\n @Path(\"all\")\n @Produces(MediaType.TEXT_PLAIN)\n public Response getCommitResult() {\n JSONArray array = new JSONArray();\n JSONObject result = new JSONObject();\n\n List<User> users = userDb.listAllUsers();\n for (User user : users) {\n JSONObject ob = db.getCommitResultByStudent(user.getId());\n array.put(ob);\n }\n result.put(\"result\", array); \n\n return Response.ok().entity(result.toString()).build();\n }", "public Commit getCommitById(int id) {\r\n for (Commit c : this.commmit) {\r\n if (c.getId() == id) {\r\n return c;\r\n }\r\n }\r\n return null;\r\n }", "int getHjOpId();", "long getCommitID() {\r\n return commit_id;\r\n }", "@NonNull\n public String getCommitId() {\n return this.commitId;\n }", "public static void main(String[] args) {\nSystem.out.println(\"nagarjuna is .................\");\r\n//second commit\r\nSystem.out.println(\"vinay is ..............................\");\r\n//third commit\r\nSystem.out.println(\"vinay is a ?\");\r\n\t}", "@POST\n @Path(\"update\")\n @Consumes(MediaType.APPLICATION_FORM_URLENCODED)\n public Response updateCommitResult(@FormParam(\"user\") String userName,\n @FormParam(\"proName\") String proName) {\n JSONObject ob = new JSONObject();\n if (!userName.equals(\"root\")) {\n\n JenkinsService jenkinsService = new JenkinsService();\n StudentDashChoosePro stuDashChoPro = new StudentDashChoosePro();\n\n int lastCommitNum = jenkinsService.getProjectCommitCount(proName, userName);\n int commitCount = lastCommitNum - 1;\n String proType = projectDb.getAssignmentType(proName);\n String buildApiJson = stuDashChoPro.getBuildApiJson(lastCommitNum, userName, proName);\n String strDate = stuDashChoPro.getCommitTime(buildApiJson);\n String[] dates = strDate.split(\" \");\n String status = stuDashChoPro.getCommitStatus(lastCommitNum, userName, proName, buildApiJson,\n proType);\n int id = userDb.getUser(userName).getId();\n\n boolean check = db.checkJenkinsJobTimestamp(id, proName);\n if (check) {\n db.updateJenkinsCommitCount(id, proName, commitCount, status);\n\n } else {\n db.insertJenkinsCommitCount(id, proName, commitCount, status);\n }\n db.updateJenkinsJobTimestamp(id, proName, strDate);\n\n boolean inDb = commitRecordDb.checkRecord(id, proName, dates[0], dates[1]);\n if (inDb) {\n commitRecordDb.updateRecordStatus(id, proName, status, dates[0], dates[1]);\n } else {\n commitRecordDb.insertCommitRecord(id, proName, status, dates[0], dates[1]);\n }\n\n updateCommitRecordState();\n\n ob.put(\"userName\", userName);\n ob.put(\"proName\", proName);\n ob.put(\"commitCount\", commitCount);\n ob.put(\"dates\", dates[0]);\n ob.put(\"dates1\", dates[1]);\n ob.put(\"status\", status);\n }\n\n return Response.ok().entity(ob.toString()).build();\n }", "private void processCommit() throws HsqlException {\n tokenizer.isGetThis(Token.T_WORK);\n session.commit();\n }", "public void getSingleTransQuery(HashMap<String, String> params) {\n\t\tID = params.get(\"transactionID\");\n\t\tREPORT_START = params.get(\"reportStart\");\n\t\tREPORT_END = params.get(\"reportEnd\");\n\t\tEXCLUDE_ERRORS = params.get(\"excludeErrors\");\n\t\tAPI = \"stq\";\n\t}", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "@SuppressWarnings(\"unchecked\")\n\t@GET\n @Path(\"get/{hash}\")\n @Produces(\"application/json\")\n public Response getIt(@PathParam(\"hash\") String curHash) {\n \t\n \tJSONObject resp = new JSONObject();\n \t\n \tOnlineStatus on = OnlineStatus.getInstance(); \n \t\n \t// Find SA\n \tint saID = SADAO.hashToId(curHash);\n \t\n \tif (saID == 0) {\n \t\tresp.put(\"Error\", \"Hash not in database\");\n \t\treturn Response.status(200).entity(resp.toJSONString()).build();\n \t}\n \t\n \t//if SA is set for exit\n \tif(on.isForExit(curHash)){\n \t\tresp.put(\"Signal\" , \"Kill\");\n \t\ton.exited(curHash);\n \t\t\n \t\treturn Response.status(200).entity(resp.toJSONString()).build();\n \t}\n \t\n \t// Update SAs Online Status\n \ton.update(curHash);\n \t\n \t// Find jobs for SA\n \tLinkedList<Job> jobsToSendToSa = JobDAO.getAllSAJobs(saID);\n \t\n \tif(jobsToSendToSa.size() > 0){\n \t\tSystem.out.println(\"Sending to SA \"+curHash+\" the following job(s) :\");\n \t}\n \tfor (Job j : jobsToSendToSa) {\n \t\tj.print();\n \t}\n \t\n \t// Create JSON and Sent\n \tObjectMapper mapper = new ObjectMapper();\n \t\n \ttry{\n \t\t\n \t\tString jsonInString = mapper.writeValueAsString(jobsToSendToSa);\n \t\t\n \t\treturn Response.status(200).entity(jsonInString).build();\n \t\n \t}catch (JsonProcessingException ex){\n \t\t\n \t\tSystem.out.println(ex.getMessage());\n \t\t\n \t\tresp.put(\"Error\", ex.getMessage());\n \t\treturn Response.status(200).entity(resp.toJSONString()).build();\n \t}\n }", "public Hash getHash(String hash) {\n Hash gothash = null;\n Session session = sessionFactory.openSession();\n // Try to return the user by the given nickname\n try {\n session.beginTransaction();\n\n Criteria criteria = session.createCriteria(Hash.class);\n criteria.add(Restrictions.eq(\"hashstring\", hash));\n \n List<Hash> hashlist = (List<Hash>) criteria.list();\n \n session.getTransaction().commit();\n session.flush();\n \n gothash = hashlist.get(0);\n } \n catch (HibernateException e) { e.printStackTrace(); return null; } \n finally { session.close(); }\n // Return userID if seted\n return gothash;\n }", "public Object executeQueryOneResult(String hql, Map params) throws RepositoryException {\n\t\tObject retorno = DatanucleusCRUDUtils.executeQueryOneResult(hql, params); \n\t\tparams.clear();\n\t\treturn retorno;\n\t}", "public int getProjectCommitRecordId(int pgId, int commitNumber) {\n String query = \"SELECT id FROM Project_Commit_Record where pgId = ? and commitNumber = ?\";\n int id = 0;\n try (Connection conn = database.getConnection();\n PreparedStatement preStmt = conn.prepareStatement(query)) {\n preStmt.setInt(1, pgId);\n preStmt.setInt(2, commitNumber);\n\n try (ResultSet rs = preStmt.executeQuery();) {\n if (rs.next()) {\n id = rs.getInt(\"id\");\n }\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return id;\n }", "Commit getLastCommitDetails(Object requestBody) throws VersionControlException;", "static int getHash(int par0)\n {\n return computeHash(par0);\n }", "@Override\n\tpublic JSONObject getById(String wt_id) {\n\t\tJSONObject result = new JSONObject();\n\t\tMainUtility mainUtil = new MainUtility();\n\t\tString queryForWrittingTest = \"SELECT `wt_title`, `wt_content` FROM `writing_test` WHERE `wt_id` = ?\";\n\t\tString queryForTopic = \"SELECT wtt.wtt_id, wtt.wtt_content, user.full_name FROM `writing_test` AS wt \"\n\t\t\t\t+ \"LEFT JOIN writing_test_topic AS wtt ON (wt.wt_id = wtt.wt_id) \"\n\t\t\t\t+ \"LEFT JOIN crm_user AS user ON (wtt.created_by = user.user_id) WHERE wt.wt_id = ?\";\n\t\ttry {\n\t\t\tMap<String, Object> test = this.jdbcTemplate.queryForMap(queryForWrittingTest, new Object[] {wt_id});\n\t\t\tList<Map<String, Object>> lstTopic = this.jdbcTemplate.queryForList(queryForTopic, new Object[] {wt_id});\n\t\t\ttest.put(\"lstTopic\", lstTopic);\n\t\t\tresult.put(\"data\", test);\n\t\t\tresult.put(\"success\", true);\n\t\t} catch (Exception e) {\n\t\t\tresult.put(\"success\", false);\n\t\t\tresult.put(\"err\", e.getMessage());\n\t\t\tresult.put(\"msg\", \"Lấy bài kiếm tra thất bại\");\n\t\t}\n\t\treturn result;\n\t}", "public static String getHeadCommitId(@NotNull JSONObject jsonObject) {\n return jsonObject.getJSONObject(\"head_commit\").get(\"id\").toString();\n }", "public String findStatement(String id, int no) {\n\t\tMap<String, Object> map = new HashMap<>();\n\t\t\n\t\tmap.put(\"db\", id);\n\t\tmap.put(\"no\", no);\n\t\t\n\t\treturn sqlSession.selectOne(\"order.findStatement\", map);\n\t}", "public java.util.Collection<pl.wcislo.sbql4j.java.model.runtime.Struct> executeQuery(\n final ObjectContainerBase ocb, final Transaction t) {\n final LocalTransaction transLocal = (LocalTransaction) t;\n final java.util.Collection<kor.model.Student> _ident_Student = new java.util.ArrayList<kor.model.Student>();\n ClassMetadata _classMeta5 = ocb.classCollection()\n .getClassMetadata(\"kor.model.Student\");\n long[] _ids5 = _classMeta5.getIDs(transLocal);\n\n for (long _id5 : _ids5) {\n LazyObjectReference _ref5 = transLocal.lazyReferenceFor((int) _id5);\n _ident_Student.add((kor.model.Student) _ref5.getObject());\n }\n\n java.util.Collection<pl.wcislo.sbql4j.java.model.runtime.Struct> _dotResult3 =\n new java.util.ArrayList<pl.wcislo.sbql4j.java.model.runtime.Struct>();\n int _dotIndex3 = 0;\n\n for (kor.model.Student _dotEl3 : _ident_Student) {\n if (_dotEl3 == null) {\n continue;\n }\n\n if (_dotEl3 != null) {\n ocb.activate(_dotEl3, 2);\n }\n\n java.lang.String _mth_getFnameResult = _dotEl3.getFname();\n\n if (_mth_getFnameResult != null) {\n ocb.activate(_mth_getFnameResult, 1);\n }\n\n java.lang.String _mth_getSnameResult = _dotEl3.getSname();\n\n if (_mth_getSnameResult != null) {\n ocb.activate(_mth_getSnameResult, 1);\n }\n\n pl.wcislo.sbql4j.java.model.runtime.Struct _commaResult = OperatorUtils.cartesianProductSS(_mth_getFnameResult,\n _mth_getSnameResult, \"\", \"\");\n kor.model.Address _mth_getAddressResult = _dotEl3.getAddress();\n\n if (_mth_getAddressResult != null) {\n ocb.activate(_mth_getAddressResult, 1);\n }\n\n kor.model.Address _dotEl = _mth_getAddressResult;\n\n if (_mth_getAddressResult != null) {\n ocb.activate(_mth_getAddressResult, 2);\n }\n\n java.lang.String _mth_getStreetResult = _dotEl.getStreet();\n\n if (_mth_getStreetResult != null) {\n ocb.activate(_mth_getStreetResult, 1);\n }\n\n pl.wcislo.sbql4j.java.model.runtime.Struct _commaResult1 = OperatorUtils.cartesianProductSS(_commaResult,\n _mth_getStreetResult, \"\", \"\");\n kor.model.Address _mth_getAddressResult1 = _dotEl3.getAddress();\n\n if (_mth_getAddressResult1 != null) {\n ocb.activate(_mth_getAddressResult1, 1);\n }\n\n kor.model.Address _dotEl1 = _mth_getAddressResult1;\n\n if (_mth_getAddressResult1 != null) {\n ocb.activate(_mth_getAddressResult1, 2);\n }\n\n java.lang.String _mth_getCityResult = _dotEl1.getCity();\n\n if (_mth_getCityResult != null) {\n ocb.activate(_mth_getCityResult, 1);\n }\n\n pl.wcislo.sbql4j.java.model.runtime.Struct _commaResult2 = OperatorUtils.cartesianProductSS(_commaResult1,\n _mth_getCityResult, \"\", \"\");\n kor.model.Address _mth_getAddressResult2 = _dotEl3.getAddress();\n\n if (_mth_getAddressResult2 != null) {\n ocb.activate(_mth_getAddressResult2, 1);\n }\n\n kor.model.Address _dotEl2 = _mth_getAddressResult2;\n\n if (_mth_getAddressResult2 != null) {\n ocb.activate(_mth_getAddressResult2, 2);\n }\n\n java.lang.String _mth_getZipResult = _dotEl2.getZip();\n\n if (_mth_getZipResult != null) {\n ocb.activate(_mth_getZipResult, 1);\n }\n\n pl.wcislo.sbql4j.java.model.runtime.Struct _commaResult3 = OperatorUtils.cartesianProductSS(_commaResult2,\n _mth_getZipResult, \"\", \"\");\n\n if (_commaResult3 != null) {\n ocb.activate(_commaResult3, 2);\n }\n\n _dotResult3.add(_commaResult3);\n _dotIndex3++;\n }\n\n java.util.Collection<pl.wcislo.sbql4j.java.model.runtime.Struct> _groupAsResultstuds =\n _dotResult3;\n pl.wcislo.sbql4j.db4o.utils.DerefUtils.activateResult(_groupAsResultstuds,\n ocb);\n\n return _groupAsResultstuds;\n }", "public void handle(PBFTCommit c){\n Object lpid = getLocalServerID();\n long now = getClockValue();\n\n JDSUtility.debug(\"[handle(commit)] s\" + lpid + \", at time \" + now + \", received \" + c);\n\n /* If I received a invalid prepare then I'll discard it. */\n if(!(c != null && c.getSequenceNumber() != null && c.getViewNumber() != null && c.getReplicaID() != null)){\n JDSUtility.debug(\"[handle(commit)] s\" + lpid + \", at time \" + now + \", discarded \" + c + \" because it's a malformed commit.\");\n return;\n }\n\n /* If the received commit wasn't sent by a group member then I'll discard it. */\n if(!wasSentByAGroupMember(c)){\n JDSUtility.debug(\"[handle(commit)] s\" + lpid + \", at time \" + now + \", discarded \" + c + \" because it wasn't sent by group member.\");\n return;\n }\n\n long lcwm = getLCWM();\n long hcwm = getHCWM();\n long seqn = c.getSequenceNumber();\n\n /*If seqn(c) not in (lcwm, hcwm] then c will be discarded. */\n if(!(lcwm < seqn && seqn <= hcwm)){\n JDSUtility.debug(\"[handle(commit)] s\" + lpid + \", at time \" + now + \", discarded \" + c + \" because its SEQN{\" + seqn +\"} not in (\" + lcwm + \"; \" + hcwm + \"].\");\n return;\n }\n\n int itView = c.getViewNumber();\n int myView = getCurrentViewNumber();\n\n /* If the prepare was sent in my current view then I'll check and process it.*/\n if(itView > myView){\n JDSUtility.debug(\"[handle(commit)] s\" + lpid + \", at time \" + now + \", discarded \" + c + \" because it wasn't sent in CURR-VIEW{\" + myView + \"}\");\n return;\n }\n \n if(!getCommitInfo().put(c)){\n JDSUtility.debug(\"[handle(commit)] s\" + lpid + \", at time \" + now + \", discarded \" + c + \" because it is a duplicaded commit SEQN{\" + seqn + \"}\");\n return;\n }\n\n if(itView != myView){\n JDSUtility.debug(\"[handle(commit)] s\" + lpid + \", at time \" + now + \", cann't proceed because \" + c + \" in CURR-VIEW{\" + myView + \"}\");\n return;\n }\n\n int f = getServiceBFTResilience();\n\n if(getCommitInfo().count(myView, seqn) < (2 * f + 1)){\n return;\n }\n \n PBFTPrepare p = getPrepareInfo().get(myView, seqn, lpid);\n\n if(p != null && getCommitInfo().get(myView, seqn, lpid) == null){\n getRequestInfo().assign(seqn, RequestState.COMMITTED);\n emitCommit(myView, seqn);\n return;\n }\n\n tryExecuteRequests();\n \n }", "public Info_laboral findByID(int cod){\n ConexionBD con = new ConexionBD();\n Connection c = con.conOracle();\n Info_laboral IL = new Info_laboral();\n try{\n CallableStatement cs = c.prepareCall(\"{? = call F_BUSNOMINFO(?)}\");\n cs.registerOutParameter(1, Types.VARCHAR);\n cs.setInt(2, cod);\n cs.execute();\n //IL.setId(cod);\n //IL.setJefe(cs.getString(1));\n System.out.println(cs.getString(1));\n con.CerrarCon();\n return IL;\n }catch(SQLException e){\n System.out.println(\"erorrrr findbyid \"+e);\n con.CerrarCon();\n return null;\n }\n \n }", "public int getCommitStatusbyPgid(int pgid) {\n int status = 0;\n String sql = \"SELECT status FROM Project_Commit_Record WHERE pgId=?\";\n try (Connection conn = database.getConnection();\n PreparedStatement preStmt = conn.prepareStatement(sql)) {\n preStmt.setInt(1, pgid);\n try (ResultSet rs = preStmt.executeQuery()) {\n while (rs.next()) {\n status = rs.getInt(\"status\");\n }\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return status;\n }", "java.lang.String getResult();", "public static String getTeamTaskDue(Integer pmid) {\n Session session = ConnectionFactory.getInstance().getSession();\n String result = \"\";\n\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd \");\n Date date = new Date();\n String ndt = dateFormat.format(date);\n try {\n PreparedStatement st = session.connection().prepareStatement(\"SELECT p.number,l.taskname,s.language as sLang,t.language as tLang,l.dueDatedate, r.firstName,r.lastName,r.companyname,c.company_code FROM project p INNER JOIN sourcedoc s ON p.id_project=s.id_project \"\n + \"INNER JOIN targetdoc t ON s.id_sourcedoc=t.id_sourcedoc \"\n + \"INNER JOIN lintask l ON l.ID_TargetDoc=t.ID_TargetDoc \"\n + \"INNER JOIN resource r ON l.personname=r.id_resource \"\n + \"INNER JOIN client_information c ON p.id_client=c.id_client \"\n + \"WHERE DATEDIFF ('\" + ndt + \"', l.dueDatedate)<0 AND l.receiveddatedate IS NULL AND p.pm_id=\" + pmid + \" AND p.status='active' \"\n + \"UNION \"\n + \"SELECT p.number,l.taskname,s.language as sLang,t.language as tLang,l.dueDatedate, r.firstName,r.lastName,r.companyname,c.company_code FROM project p INNER JOIN sourcedoc s ON p.id_project=s.id_project \"\n + \"INNER JOIN targetdoc t ON s.id_sourcedoc=t.id_sourcedoc \"\n + \"INNER JOIN dtptask l ON l.ID_TargetDoc=t.ID_TargetDoc \"\n + \"INNER JOIN resource r ON l.personname=r.id_resource \"\n + \"INNER JOIN client_information c ON p.id_client=c.id_client \"\n + \"WHERE DATEDIFF ('\" + ndt + \"', l.dueDatedate)<0 AND l.receiveddatedate IS NULL AND p.pm_id=\" + pmid + \" AND p.status='active' \"\n + \"UNION \"\n + \"SELECT p.number,l.taskname,s.language as sLang,t.language as tLang,l.dueDatedate, r.firstName,r.lastName,r.companyname,c.company_code FROM project p INNER JOIN sourcedoc s ON p.id_project=s.id_project \"\n + \"INNER JOIN targetdoc t ON s.id_sourcedoc=t.id_sourcedoc \"\n + \"INNER JOIN engtask l ON l.ID_TargetDoc=t.ID_TargetDoc \"\n + \"INNER JOIN resource r ON l.personname=r.id_resource \"\n + \"INNER JOIN client_information c ON p.id_client=c.id_client \"\n + \"WHERE DATEDIFF ('\" + ndt + \"', l.dueDatedate)<0 AND l.receiveddatedate IS NULL AND p.pm_id=\" + pmid + \" AND p.status='active' \"\n + \"UNION \"\n + \"SELECT p.number,l.taskname,s.language as sLang,t.language as tLang,l.dueDatedate, r.firstName,r.lastName,r.companyname,c.company_code FROM project p INNER JOIN sourcedoc s ON p.id_project=s.id_project \"\n + \"INNER JOIN targetdoc t ON s.id_sourcedoc=t.id_sourcedoc \"\n + \"INNER JOIN othtask l ON l.ID_TargetDoc=t.ID_TargetDoc \"\n + \"INNER JOIN resource r ON l.personname=r.id_resource \"\n + \"INNER JOIN client_information c ON p.id_client=c.id_client \"\n + \"WHERE DATEDIFF ('\" + ndt + \"', l.dueDatedate)<0 AND l.receiveddatedate IS NULL AND p.pm_id=\" + pmid + \" AND p.status='active'\");\n\n ResultSet rs = st.executeQuery();\n \n Integer count=1;\n while (rs.next()) {\n if(count==1) result = \"<fieldset><legend>Due Tasks</legend><div align='center'><table class='tableHighlight' width='90%' align='center' ><tr><td>&nbsp;</td></tr>\";\n// //System.out.println(\"AAAAAANNNNNAAAAAA\" + rs.getString(\"sLang\"));\n// //System.out.println(\"ddddddddddddddddd\" + rs.getString(\"taskname\"));\n// //System.out.println(\"qqqqqqqqqqqqqqqqq\" + rs.getString(\"tLang\"));\n String resource = \"\";\n if (rs.getString(\"firstName\").equals(\"\")) {\n resource = rs.getString(\"companyname\");\n } else {\n resource = rs.getString(\"firstName\") + \" \" + rs.getString(\"lastName\");\n }\n result += \"<tr>\";\n result += \"<td class=tableHeadingData><center>\"+count++ +\": \" + rs.getString(\"taskname\") + \" ( \" + rs.getString(\"sLang\") + \" - \" + rs.getString(\"tLang\") + \") of Project Number -<b><u>\" + rs.getInt(\"number\") +rs.getString(\"company_code\")+ \"</u></b>, <br> is due for <b>\" + resource + \"</b></center></td>\";\n\n result += \"</tr><tr><td>&nbsp;</td></tr>\";\n\n }\n if (count > 1) {\n result += \"</table></div></fieldset>\";\n }\n st.close();\n } catch (Exception e) {\n //System.out.println(\"errrrrrrrrrrrrrror\" + e.getMessage());\n } finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n //System.out.println(\"Hibernate Exception:\" + e);\n throw new RuntimeException(e);\n }\n\n }\n }\n return result;\n\n }", "public Object[] getCbo_SysCd(String UserId,String SecuYn,String WkSys) throws SQLException, Exception {\r\n\t\tConnection conn = null;\r\n\t\tPreparedStatement pstmt = null;\r\n\t\tResultSet rs = null;\r\n\t\tStringBuffer strQuery = new StringBuffer();\r\n\t\tArrayList<Hashtable<String, String>> rsval = new ArrayList<Hashtable<String, String>>();\r\n\t\tHashtable<String, String>\t\t\t rst = null;\r\n\t\tObject[]\t\t rtObj\t\t = null;\r\n\r\n\t\tConnectionContext connectionContext = new ConnectionResource();\r\n\t\ttry {\r\n\t\t\tconn = connectionContext.getConnection();\r\n\r\n\t\t\tstrQuery.setLength(0);\r\n\t\t\tstrQuery.append(\"select a.cm_syscd,a.cm_sysmsg,a.cm_sysgb \\n\");\r\n\t if (!SecuYn.equals(\"Y\") && (WkSys == null || WkSys == \"\")){\r\n\t \tstrQuery.append(\"from cmm0044 b, cmm0030 a where \\n\");\r\n\t \tstrQuery.append(\"b.cm_userid=? and \\n\");//UserId\r\n\t \tstrQuery.append(\"a.cm_syscd=b.cm_syscd and \\n\");\r\n\t \tstrQuery.append(\"b.cm_closedt is null and \\n\");\r\n\t //}else if (!Sv_Admin.toUpperCase().equals(\"Y\") && ViewFg.equals(\"true\")){\r\n\t }else if (WkSys != null && WkSys != \"\"){\r\n\t \tstrQuery.append(\"from cmm0030 a where \\n\");\r\n\t \tstrQuery.append(\" a.cm_syscd=? and \\n\");//WkSys\r\n\t }else{\r\n\t \tstrQuery.append(\"from cmm0030 a where \\n\");\r\n\t }\r\n\t strQuery.append(\"a.cm_closedt is null and substr(a.cm_sysinfo,1,1)='0' \\n\");\r\n\t strQuery.append(\"group by a.cm_syscd,a.cm_sysmsg,a.cm_sysgb \\n\");\r\n\t strQuery.append(\"order by a.cm_sysmsg,a.cm_syscd,a.cm_sysgb \\n\");\r\n\r\n\t pstmt = conn.prepareStatement(strQuery.toString());\r\n\t //pstmt = new LoggableStatement(conn,strQuery.toString());\r\n\r\n\t\t int Cnt = 0;\r\n\t if (!SecuYn.equals(\"Y\") && (WkSys == null || WkSys == \"\")){\r\n\t \tpstmt.setString(++Cnt, UserId);\r\n\t }else if (WkSys != null && WkSys != \"\"){\r\n\t \tpstmt.setString(++Cnt, WkSys);\r\n\t }\r\n\r\n\t //ecamsLogger.debug(((LoggableStatement)pstmt).getQueryString());\r\n\t\t rs = pstmt.executeQuery();\r\n\r\n\t\t\twhile (rs.next()){\r\n\t\t\t\trst = new Hashtable<String, String>();\r\n\t\t\t\trst.put(\"cm_sysmsg\", rs.getString(\"cm_sysmsg\"));\r\n\t\t\t\trst.put(\"cm_sysgb\", rs.getString(\"cm_sysgb\"));\r\n\t\t\t\trst.put(\"cm_syscd\", rs.getString(\"cm_syscd\"));\r\n\t \trsval.add(rst);\r\n\t \trst = null;\r\n\t\t\t}\r\n\t\t\trs.close();\r\n\t\t\tpstmt.close();\r\n\t\t\tconn.close();\r\n\t\t\trs = null;\r\n\t\t\tpstmt = null;\r\n\t\t\tconn = null;\r\n\r\n\t\t\trtObj = rsval.toArray();\r\n\t\t\trsval.clear();\r\n\t\t\trsval = null;\r\n\r\n\t\t\treturn rtObj;\r\n\r\n\t\t} catch (SQLException sqlexception) {\r\n\t\t\tif (conn != null){\r\n\t\t\t\tconn.close();conn = null;\r\n\t\t\t}\r\n\t\t\tsqlexception.printStackTrace();\r\n\t\t\tthrow sqlexception;\r\n\t\t} catch (Exception exception) {\r\n\t\t\tif (conn != null){\r\n\t\t\t\tconn.close();conn = null;\r\n\t\t\t}\r\n\t\t\texception.printStackTrace();\r\n\t\t\tthrow exception;\r\n\t\t}finally{\r\n\t\t\tif (strQuery != null)\tstrQuery = null;\r\n\t\t\tif (rtObj != null)\trtObj = null;\r\n\t\t\tif (rs != null) try{rs.close();}catch (Exception ex){ex.printStackTrace();}\r\n\t\t\tif (pstmt != null) try{pstmt.close();}catch (Exception ex2){ex2.printStackTrace();}\r\n\t\t\tif (conn != null){\r\n\t\t\t\ttry{\r\n\t\t\t\t\tConnectionResource.release(conn);\r\n\t\t\t\t}catch(Exception ex3){\r\n\t\t\t\t\tex3.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public Transaction getTransaction(NulsDigestData txHash) {\n return null;\n }", "@Override\n public GetCommitResult getCommit(GetCommitRequest request) {\n request = beforeClientExecution(request);\n return executeGetCommit(request);\n }", "SysCode selectByPrimaryKey(String id);", "public String getRemoteBlock(String hash){\n getBlock = true;\n getBlockHash = hash;\n try{\n synchronized(this){\n this.wait();\n }\n } catch(InterruptedException e){\n // nothing happens here\n }\n getBlock = false;\n if(remoteBlocks.containsKey(hash))\n return remoteBlocks.get(hash);\n else{\n return \"notfound\";\n }\n }", "@Override\n\tpublic List<CrmReturnedGoodsDtoResult> queryReturnGoodsWorkOrderResult(\n\t\t\tCrmReturnedGoodsDtoResult vo) {\n\t\treturn null;\n\t}", "@Override\r\n\t@Transactional\r\n\tpublic String examSubjectStudentResult(int ExamId, int SubdivId) {\n\t\tStringBuffer sb=new StringBuffer(); \r\n\t\t Query query=currentSession().createQuery(\"from ExamSubjectStudentCompositTable essct LEFT JOIN Result r on essct.id=r.examSubjectStudentCompositTable.id LEFT JOIN Student s on essct.student.id=s.id where essct.exam.id= :ExamId and essct.subjectDivComposit.id = :subDivId and essct.student.id is not null\");\r\n\t\t query.setParameter(\"ExamId\", ExamId);\r\n\t\t query.setParameter(\"subDivId\", SubdivId);\r\n\t\t \r\n List lst = query.list();\r\n sb.append(\"[\");\r\n // System.out.println(\"\" + lst.size());\r\n //System.out.println(\"gooing to display result\");\r\n for (int i = 0; i < lst.size(); i++) {\r\n \t sb.append(\"{\");\r\n \t sb.append(\"\\\"examSubjectStudentCompositTable\\\":\"+gson.toJson(((Object[]) lst.get(i))[0]));\r\n \t sb.append(\",\\\"result\\\":\"+gson.toJson(((Object[]) lst.get(i))[1]));\r\n \t sb.append(\",\\\"student\\\":\"+gson.toJson(((Object[]) lst.get(i))[2]));\r\n //System.out.println(\"first obj\"+((Object[]) lst.get(i))[0]); //account bean, actually this is in reverse order - so this is user bean\r\n // System.out.println(\"second obj\"+((Object[]) lst.get(i))[1]); \r\n // System.out.println(\"third obj\"+((Object[]) lst.get(i))[2]); //user bean & this account bean\r\n sb.append(\"},\");\r\n }\r\n sb.setLength(sb.length() - 1);\r\n \r\n sb.append(\"]\");\r\n return sb.toString();\r\n\t\t\r\n\t}", "@Override\r\n\tpublic boolean addStu_result(Object stu_result) {\n\t\tConnection conn = null;\r\n\t\tPreparedStatement stmt = null;\r\n\t\tStu_result Stu_result1 = (Stu_result) stu_result;\r\n\t\tint count;\r\n\t\ttry {\r\n\t\t\tconn = DBHelper.getConnection();\r\n\t\t\tString sql = \"insert into Stu_result(sid,kj_id,Stu_dxt_r,Stu_dxt_c,Stu_dxts_r,Stu_dxts_c,Stu_pdt_r,Stu_pdt_c) values(?,?,?,?,?,?,?,?);\"; // SQL语句\r\n\t\t\tstmt = conn.prepareStatement(sql);\r\n\t\t\tstmt.setInt(1, Stu_result1.getSid());\r\n\t\t\tstmt.setInt(2, Stu_result1.getKj_id());\r\n\t\t\tstmt.setString(3, Stu_result1.getStu_dxt_r());\r\n\t\t\tstmt.setString(4, Stu_result1.getStu_dxt_c());\r\n\t\t\tstmt.setString(5, Stu_result1.getStu_dxts_r());\r\n\t\t\tstmt.setString(6, Stu_result1.getStu_dxts_c());\r\n\t\t\tstmt.setString(7, Stu_result1.getStu_pdt_r());\r\n\t\t\tstmt.setString(8, Stu_result1.getStu_pdt_c());\r\n\t\t\tcount = stmt.executeUpdate();\r\n\t\t\tSystem.out.println(count + \"学生答案插入记录\");\r\n\t\t\tif (count == 1) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else\r\n\t\t\t\treturn false;\r\n\t\t} catch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t} finally {\r\n\t\t\t// 释放语句对象\r\n\t\t\tif (stmt != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tstmt.close();\r\n\t\t\t\t\tstmt = null;\r\n\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic ExecuteTask getById(int id) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask \"\r\n\t\t\t\t+ \"WHERE et_id = ?\";\r\n\t\treturn get(sql,id);\r\n\t}", "public static String supvUpdate(int supvid) { //taskid and update number\n int failureid = -1;\n try {\n Statement st = conn.createStatement();\n //select update numbers for tasks that this supervisor supervises\n String getUpdate = \"select otherstaskupdate from users where userid = \" + supvid;\n ResultSet updateResult = st.executeQuery(getUpdate);\n if(updateResult.next()) {\n Long[] updateNums = (Long[]) updateResult.getArray(1).getArray();\n updateResult.close();\n failureid = -2;\n JSONArray updates = new JSONArray();\n //for each update number get taskid in indvprogressupdate\n for (Long num : updateNums) {\n PreparedStatement ps = conn.prepareStatement(\"select * from progressupdate where updatenum = \" + num);\n ResultSet taskUpdates = ps.executeQuery();\n failureid = -3;\n taskUpdates.next();\n failureid = -6;\n String image = taskUpdates.getString(4);\n failureid = -7;\n int taskid = Integer.parseInt(taskUpdates.getString(2));\n int userId = Integer.parseInt(taskUpdates.getString(5));\n failureid = -4;\n taskUpdates.close();\n JSONObject update = new JSONObject();\n update.put(\"TaskID\", taskid);\n update.put(\"UpdateNumber\", num);\n update.put(\"userId\", userId);\n update.put(\"image\", image);\n updates.put(update);\n ps.close();\n failureid = -5;\n }\n st.close();\n return updates.toString();\n }else {\n return \"failure\";\n }\n } catch (SQLException e) {\n return \"\" + failureid;\n }\n }", "private Commit findCommit(String branchName) {\n File givenBranch = new File(Main.ALL_BRANCHES, branchName);\n if (givenBranch.exists()) {\n String commitID = Utils.readObject(givenBranch, String.class);\n File theCommit = new File(Main.ALL_COMMITS, commitID);\n Commit cmt = Utils.readObject(theCommit, Commit.class);\n return cmt;\n } else {\n return null;\n }\n }", "@Override\n\tpublic Student selectStudentById(int stuId) {\n\t\tString sql=\"SELECT * FROM tb_student where stu_id=?\";\n\t\tObject[] stuid={stuId};\n\t\tList<Student> stu=ORMUtil.ormutil().selectList(sql, stuid, Student.class);\n\t\treturn stu.size()>0?stu.get(0):null;\n\t}", "org.apache.drill.exec.proto.UserBitShared.QueryId getQueryId();", "org.apache.drill.exec.proto.UserBitShared.QueryId getQueryId();", "public void getSelectedGame(int bin){\r\n try{\r\n c = DbConnect.getConnection();\r\n pstmt = c.prepareStatement(\"Select serial FROM tickets WHERE Bin = ?\");\r\n pstmt.setInt(1,bin);\r\n rs = pstmt.executeQuery();\r\n rs.next();\r\n }catch (Exception e) { e.printStackTrace(); }\r\n}", "@Override\n\tpublic DatabaseObject selectByID(DatabaseHandler db) throws Exception {\n\t\treturn db.getWorkById(id);\n\t\t\n\t}", "@Override\n\tpublic StageOrder getOrderCheck(String sgoodsId, Integer userinfoId) {\n\t\tList<StageOrder> list=stageOrderDao.getOrderCheck(sgoodsId,userinfoId);\n\t\tif(list!=null&&list.size()>0)\n\t\t{\n\t\t\treturn list.get(0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}", "ChangeData getChangeData(Project.NameKey projectName, Change.Id changeId);", "private synchronized String processGet(String query) {\r\n\t\tString[] valuesCommand = query.split(\" \");\r\n\t\tif ( valuesCommand.length != 2 )\r\n\t\t\treturn \"ERROR Bad syntaxe command GET - Usage : GET id\";\r\n\t\tString id = valuesCommand[1];\r\n\t\tif ( !this.bank.existAccount(id) ) {\r\n\t\t\treturn \"ERROR Account doesn't exist\";\r\n\t\t}\r\n\t\tdouble solde = this.bank.getSolde(id);\r\n\t\treturn \"SOLDE \" + solde + \" \" + this.bank.getLastOperation(id);\r\n\t}", "HelpInfo selectByPrimaryKey(Integer hId);", "@Override\n public int hashCode() {\n return this.commit.getId().hashCode();\n }", "public int getProjectCommitCount(int pgId) {\n int commitNumber = 0;\n String sql = \"SELECT commitNumber from Project_Commit_Record a where (a.commitNumber = \"\n + \"(SELECT max(commitNumber) FROM Project_Commit_Record WHERE auId = ?));\";\n try (Connection conn = database.getConnection();\n PreparedStatement preStmt = conn.prepareStatement(sql)) {\n preStmt.setInt(1, pgId);\n try (ResultSet rs = preStmt.executeQuery()) {\n while (rs.next()) {\n commitNumber = rs.getInt(\"commitNumber\");\n }\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return commitNumber;\n }", "public void queryTransactionDetail(){\n System.out.println(\"-----find transaction detail by condition-----\");\n System.out.println(\"--press enter to skip the input--\");\n String sql = \"select * from TransactionContains join Merchandise on TransactionContains.ProductID = Merchandise.ProductID where TransactionID=\";\n System.out.print(\"TransactionID: \");\n String unuse=scanner.nextLine();\n String id=scanner.nextLine();\n sql+=id;\n try {\n //System.out.println(sql);\n result = statement.executeQuery(sql);\n int cnt=0;\n while (result.next()) {\n cnt++;\n System.out.println(\"\\n=== No.\"+cnt+\" ===\");\n System.out.println(\"transaction id: \"+result.getInt(\"TransactionID\"));\n System.out.println(\"product id: \"+result.getInt(\"ProductID\"));\n System.out.println(\"product name: \"+result.getString(\"ProductName\"));\n System.out.println(\"actual price: \"+result.getDouble(\"ActualPrice\"));\n }\n System.out.println(\"Total rows: \"+cnt);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "void commit(String tpcid);", "Transaction getTransctionByTxId(String txId);", "Transaction get(String id) throws Exception;", "public Users get(String id, String hash) {\n\tthis.createConnection();\n\n\ttry {\n Connection con = this.getCon();\n\t\tPreparedStatement stmnt = con.prepareStatement(this.getAllQuery() + \" where username=? AND password=?;\");\n stmnt.setString(1, id);\n stmnt.setString(2, hash);\n ResultSet rs = stmnt.executeQuery();\n return get(rs);\n } catch (SQLException e) {\n System.out.println(\"SQLException: \" + e.getErrorCode() + \":\" + e.getMessage());\n return new Users();\n }\n }", "String getCommitMessageForLine(IPath filePath, int line);", "public Commit commitFullInfo(ArrayList<Commit> commitList) {\n\t\tCommit previousCommitID = null;\n\t\tfor (int i = 0; i < commitList.size(); i++) {\n\t\t\tif (commitList.get(i).commitID.contains(this.commitID)) {\n\t\t\t\treturn commitList.get(i);\n\t\t\t}\n\t\t}\n\n\t\treturn previousCommitID;\n\n\t}", "@Override\n\tpublic String getResult(Map<String, String> params) throws Exception {\n\t\tlong playerId = Long.valueOf(params.get(\"playerId\"));\n\t\tint taskId = Integer.parseInt(params.get(\"taskId\"));//ID\n\t\tint process = Integer.parseInt(params.get(\"process\"));\n\t\t\n\t\tGamePlayer player = WorldMgr.getPlayerFromCache(playerId);\n\t\tif (player != null && player.getPlayerState() == PlayerState.ONLINE) {\n\t\t\tRealTask task = player.getTaskInventory().getTaskInfos().get(taskId);\n\t\t\tif(task!=null){\n\t\t\t\ttask.updateProcess(process);\n\t\t\t}else{\n\t\t\t\tTaskCfg cfg = TaskTemplateMgr.getTaskCfg(taskId);\n\t\t\t\t\n\t\t\t\tif(cfg!=null){\n\t\t\t\t\tList<Integer> ids = new ArrayList<>();\n\t\t\t\t\tfor (RealTask t: player.getTaskInventory().getTaskInfos().values()) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(t.getConfig().getTaskLink() == cfg.getTaskLink()){\n\t\t\t\t\t\t\tids.add(t.getInfo().getTaskId());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfor (int id : ids) {\n\t\t\t\t\t\tplayer.getTaskInventory().del(id);\n\t\t\t\t\t\tTaskOperateRespMsg.Builder resp = TaskOperateRespMsg.newBuilder();\n\t\t\t\t\t\tresp.setTaskId(id);\n\t\t\t\t\t\tresp.setOperate(3);\n\t\t\t\t\t\tPBMessage pkg = MessageUtil.buildMessage(Protocol.U_RESP_TASKOPERATE, resp);\n\t\t\t\t\t\tplayer.sendPbMessage(pkg);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tTaskInfo updateT = new TaskInfo();\n\t\t\t\t\tupdateT.setPlayerId(player.getPlayerId());\n\t\t\t\t\tupdateT.setProcess(0);\n\t\t\t\t\tupdateT.setTaskId(cfg.getTaskId());\n\t\t\t\t\tupdateT.setState(TaskInfo.UN_ACCEPT);\n\t\t\t\t\tupdateT.setUpdateTime(new Date());\n\t\t\t\t\tupdateT.setCreateTime(new Date());\n\t\t\t\t\tupdateT.setOp(Option.Insert);\n\t\t\t\t\tRealTask newTask = new RealTask(cfg, updateT, player);\n\t\t\t\t\tplayer.getTaskInventory().add(newTask);\n\t\t\t\t\tnewTask.doAccept();\n\t\t\t\t\tnewTask.updateProcess(process);\n\t\t\t\t\treturn HttpResult.getResult(Code.SUCCESS, \"*_*taskGm exec success*_*\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn HttpResult.getResult(Code.SUCCESS, \"*_*taskGm exec fail*_*\");\n\t}", "private TreeTableNode parseSingleCommit(Description commit) throws OWLException {\r\n\r\n\t\t// make the main annotation the top header\r\n\t\tSwoopChange main = new SwoopChange();\r\n\t\tmain.setAuthor(commit.getAuthor());\r\n\t\tmain.setCommitted(true); // not needed really\r\n\t\tmain.isTopNode = true; /* this is key */\r\n\t\tmain.setTimeStamp(commit.getCreated());\r\n\t\tmain.setDescription(commit.getAnnotatedEntityDefinition());\r\n\t\tTreeTableNode mainNode = new TreeTableNode(main);\r\n\t\t\r\n\t\t// parse change set associated with single commit\r\n\t\tString changeSetString = commit.getBody();\r\n\t\tif (changeSetString!=null) {\r\n\t\t\t// decode CDATA stuff\r\n\t\t\tchangeSetString = changeSetString.replaceAll(\"ENCODED-CDATA\", \"CDATA\");\r\n\t\t\tchangeSetString = changeSetString.replaceAll(\"]ENCODED]>\", \"]]>\"); \r\n\t\t\t\t\r\n\t\t\t// now split based on separator\r\n\t\t\tString[] changeStr = changeSetString.split(separator);\r\n\t\t\t\r\n\t\t\t// each split component is a separate change\r\n\t\t\tList repDesc = new ArrayList(); // list of Description (changes)\r\n\t\t\tfor (int i=0; i<changeStr.length; i++) {\r\n\t\t\t\tString swcDesc = changeStr[i]; // SwoopChange mapped to a Description serialized in RDF/XML\r\n\t\t\t\tDescription desc = new Description();\r\n\t\t\t\tdesc.deserializeFromString(swcDesc, swoopModel);\r\n\t\t\t\trepDesc.add(desc);\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// transform Description list to SwoopChange list\r\n\t\t\tList swcChangeList = this.transformChangeList(repDesc);\r\n\t\t\t\r\n\t\t\t// add each swoopChange as a child of mainNode\r\n\t\t\tthis.sortChanges(swcChangeList);\r\n\t\t\tfor (Iterator iter2 = swcChangeList.iterator(); iter2.hasNext();) {\r\n\t\t\t\tSwoopChange swc = (SwoopChange) iter2.next();\r\n\t\t\t\tTreeTableNode swcNode = new TreeTableNode(swc);\r\n\t\t\t\tswcNode.swoopChange.isOnRepository = true;\r\n\t\t\t\tmainNode.addChild(swcNode);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn mainNode;\r\n\t}", "public static String getTeamTaskDueInvoice(Integer pmid) {\n Session session = ConnectionFactory.getInstance().getSession();\n String result = \"\";\n String invoiceAmt = StandardCode.getInstance().getPropertyValue(\"resource.invoice.alert.limit\");\n\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd \");\n Date date = new Date();\n String ndt = dateFormat.format(date);\n try {\n PreparedStatement st = session.connection().prepareStatement(\"SELECT p.number,l.taskname,l.internalDollarTotal,l.internalCurrency,s.language as sLang,t.language as tLang,l.dueDatedate, r.firstName,r.lastName,r.companyname,c.company_code FROM project p INNER JOIN sourcedoc s ON p.id_project=s.id_project \"\n + \"INNER JOIN targetdoc t ON s.id_sourcedoc=t.id_sourcedoc \"\n + \"INNER JOIN lintask l ON l.ID_TargetDoc=t.ID_TargetDoc \"\n + \"INNER JOIN resource r ON l.personname=r.id_resource \"\n + \"INNER JOIN client_information c ON p.id_client=c.id_client \"\n + \"WHERE l.receiveddatedate IS NOT NULL AND REPLACE(l.internalDollarTotal,',','')>\"+invoiceAmt+\" AND l.invoicedatedate IS NULL AND p.pm_id=\" + pmid + \" \"\n + \"UNION \"\n + \"SELECT p.number,l.taskname,l.internalDollarTotal,l.internalCurrency,s.language as sLang,t.language as tLang,l.dueDatedate, r.firstName,r.lastName,r.companyname,c.company_code FROM project p INNER JOIN sourcedoc s ON p.id_project=s.id_project \"\n + \"INNER JOIN targetdoc t ON s.id_sourcedoc=t.id_sourcedoc \"\n + \"INNER JOIN dtptask l ON l.ID_TargetDoc=t.ID_TargetDoc \"\n + \"INNER JOIN resource r ON l.personname=r.id_resource \"\n + \"INNER JOIN client_information c ON p.id_client=c.id_client \"\n + \"WHERE l.receiveddatedate IS NOT NULL AND REPLACE(l.internalDollarTotal,',','')>\"+invoiceAmt+\" AND l.invoicedatedate IS NULL AND p.pm_id=\" + pmid + \" \"\n + \"UNION \"\n + \"SELECT p.number,l.taskname,l.internalDollarTotal,l.internalCurrency,s.language as sLang,t.language as tLang,l.dueDatedate, r.firstName,r.lastName,r.companyname,c.company_code FROM project p INNER JOIN sourcedoc s ON p.id_project=s.id_project \"\n + \"INNER JOIN targetdoc t ON s.id_sourcedoc=t.id_sourcedoc \"\n + \"INNER JOIN engtask l ON l.ID_TargetDoc=t.ID_TargetDoc \"\n + \"INNER JOIN resource r ON l.personname=r.id_resource \"\n + \"INNER JOIN client_information c ON p.id_client=c.id_client \"\n + \"WHERE l.receiveddatedate IS NOT NULL AND REPLACE(l.internalDollarTotal,',','')>\"+invoiceAmt+\" AND l.invoicedatedate IS NULL AND p.pm_id=\" + pmid + \" \"\n + \"UNION \"\n + \"SELECT p.number,l.taskname,l.internalDollarTotal,l.internalCurrency,s.language as sLang,t.language as tLang,l.dueDatedate, r.firstName,r.lastName,r.companyname,c.company_code FROM project p INNER JOIN sourcedoc s ON p.id_project=s.id_project \"\n + \"INNER JOIN targetdoc t ON s.id_sourcedoc=t.id_sourcedoc \"\n + \"INNER JOIN othtask l ON l.ID_TargetDoc=t.ID_TargetDoc \"\n + \"INNER JOIN resource r ON l.personname=r.id_resource \"\n + \"INNER JOIN client_information c ON p.id_client=c.id_client \"\n + \"WHERE l.receiveddatedate IS NOT NULL AND REPLACE(l.internalDollarTotal,',','')>\"+invoiceAmt+\" AND l.invoicedatedate IS NULL AND p.pm_id=\" + pmid + \" \");\n\n ResultSet rs = st.executeQuery();\n \n Integer count=1;\n while (rs.next()) {\n if(count==1) result = \"<fieldset><legend>Due Invoice</legend>\"\n + \"<div><font size=\\\"1\\\" color='red'>Note: (only invoices over $\"+invoiceAmt+\" are displayed here)</font></div>\"\n + \"<div class =\\\"row\\\">\";\n// //System.out.println(\"AAAAAANNNNNAAAAAA\" + rs.getString(\"sLang\"));\n// //System.out.println(\"ddddddddddddddddd\" + rs.getString(\"taskname\"));\n// //System.out.println(\"qqqqqqqqqqqqqqqqq\" + rs.getString(\"tLang\"));\n String resource = \"\";\n if (rs.getString(\"firstName\").equals(\"\")) {\n resource = rs.getString(\"companyname\");\n } else {\n resource = rs.getString(\"firstName\") + \" \" + rs.getString(\"lastName\");\n }\n result += \"<div class=\\\"six column\\\" style=\\\"padding-bottom: 10px\\\">\";\n result+=\"<div class=\\\"w3-card-8 w3-light-grey\\\" style=\\\"padding-bottom: 5px\\\">\";\n result += \"<div class=\\\"w3-container\\\">\"\n +\"</br><span style='font-size:15px'><b>\" + resource + \"</b></span>\"\n + \"<span class='w3-right' style='color : blue'>\"+rs.getString(\"internalDollarTotal\")+ \" \" +rs.getString(\"internalCurrency\")+\"</span></br>\"\n +\"</br></br><span style='font-size:12px'><b>\" + rs.getInt(\"number\") +rs.getString(\"company_code\") + \"</b></span>\"\n + \"</br>\"+ rs.getString(\"taskname\") + \" \"\n + \"( \" + rs.getString(\"sLang\") + \" - \" + rs.getString(\"tLang\") + \") <br><br>\" \n + \"</div>\";\n \n \n\n result += \"</b></div></div>\";\n count++;\n\n }\n if (count > 1) {\n result += \"</fieldset>\";\n }\n st.close();\n } catch (Exception e) {\n //System.out.println(\"errrrrrrrrrrrrrror\" + e.getMessage());\n } finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n //System.out.println(\"Hibernate Exception:\" + e);\n throw new RuntimeException(e);\n }\n\n }\n }\n return result;\n\n }", "public String getBmcStuToken(String id, String pass) throws IOException, InterruptedException, ParseException\n {\n String loginJSON = new Communicator(token).getStudentLoginInfo(id, pass, BMC_COMPANY_ID);\n JSONParser parser = new JSONParser();\n \n JSONObject rootJSONObject = (JSONObject)parser.parse(loginJSON);\n JSONObject loginMapJSONObject = (JSONObject)rootJSONObject.get(\"map\");\n String token = (String)loginMapJSONObject.get(\"token\");\n return token;\n }", "TCommit getLatestCommitForBranch(String branchName, TRepo repo);", "CompletableFuture<String> getHardwareRevision();", "@Override\n\tpublic HwTraceStudyLogInfo getEntityByTjId(Integer tjId)\n\t\t\tthrows WEBException {\n\t\ttry {\n\t\t\thwLogDao = (HwTraceStudyLogDao) DaoFactory.instance(null).getDao(Constants.DAO_HW_TRACE_STUDY_LOG_INFO);\n\t\t\tSession sess = HibernateUtil.currentSession();\n\t\t\treturn hwLogDao.getEntityByTjId(sess, tjId);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tthrow new WEBException(\"根据统计编号获取溯源学习记录时出现异常!\");\n\t\t} finally{\n\t\t\tHibernateUtil.closeSession();\n\t\t}\n\t}", "public IStatus getResult();", "@Override\n\tpublic HwTraceStudyLogInfo getEntityById(Integer id) throws WEBException {\n\t\ttry {\n\t\t\thwLogDao = (HwTraceStudyLogDao) DaoFactory.instance(null).getDao(Constants.DAO_HW_TRACE_STUDY_LOG_INFO);\n\t\t\tSession sess = HibernateUtil.currentSession();\n\t\t\treturn hwLogDao.getEntityById(sess, id);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tthrow new WEBException(\"根据主键获取溯源学习记录时出现异常!\");\n\t\t} finally{\n\t\t\tHibernateUtil.closeSession();\n\t\t}\n\t}", "long getLastUpdate(long inId);", "public GHFrom getSha() {\n return sha;\n }", "HomeWork selectByPrimaryKey(Long id);", "public static Set getTestStatus(HTMLizer h, Statement s, int test)\n throws SQLException{\n Set retval = new HashSet();\n\n confirmTableExistence (h,s);\n\t\n ResultSet rs=s.executeQuery(getTestStatusSql(test));\n while(rs.next()) {\n int run = rs.getInt(1);\n int result = rs.getInt(2);\n\n if (result != Test.RESULT_NOT_RUN)\n\tretval.add(new Integer(run));\n }\n \n rs.close();\n return retval;\n }", "SysId selectByPrimaryKey(String id);", "private String stageDetailsFromDB(String queryString){\n\t\tString RET=\"\";\n\t\ttry\n\t\t{\n\t\t\tcon = Globals.getDatasource().getConnection();\n\t\t\tps = con.prepareStatement(queryString); \n\t\t\tresult = ps.executeQuery();\n\t\t\tif (result.first()) {\n\t\t\t\tRET = result.getString(1);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\tcatch(SQLException sqle){sqle.printStackTrace();}\n\t\tfinally {\n\t\t Globals.closeQuietly(con, ps, result);\n\t\t}\n\t\treturn RET;\n\t}", "private String getSingleLockSBRStmt() {\n\n if (null == mSingleLockStmt) {\n initClauses();\n mSingleLockStmt = \"SELECT s.EUID FROM SBYN_SYSTEMSBR s \" + mWithClause + \" WHERE s.EUID = ? AND s.REVISIONNUMBER = ? \" + mForUpdateClause;\n }\n\n return mSingleLockStmt;\n }", "public boolean checkControlStringStatus(String userId, String branchCode, String functionId, String operation, String txnStatus, String authStatus, String interfaceStatus) throws SQLException {\n boolean status = false;\n String finalControlString=null;\n PreparedStatement psmnt1=null;\n PreparedStatement psmnt2=null;\n PreparedStatement psmnt3=null;\n PreparedStatement psmnt4=null;\n PreparedStatement psmnt5=null;\n PreparedStatement psmnt6=null;\n PreparedStatement psmnt7=null;\n PreparedStatement psmnt8=null;\n ResultSet rs1=null;\n ResultSet rs2=null;\n ResultSet rs3=null;\n ResultSet rs4=null;\n ResultSet rs5=null;\n ResultSet rs6=null;\n ResultSet rs7=null;\n \n try {\n psmnt1 =conn.prepareStatement(\"select role_id , role_function , control_string from smtbs_role_detail where role_id in (select role_id from smtbs_user_role where user_id = ? and branch_code= ?) and role_function = ? \");\n psmnt1.setString(1, userId);\n psmnt1.setString(2, branchCode);\n psmnt1.setString(3, functionId);\n psmnt2 = conn.prepareStatement(\" select control_string from smtbs_users_functions where user_id = ? and function_id = ? and branch_code= ?\");\n psmnt2.setString(1, userId);\n psmnt2.setString(2, functionId);\n psmnt2.setString(3, branchCode);\n psmnt3 = conn.prepareStatement(\" select control_string from SMTBS_TXN_STATUS where txn_status = ? and auth_status = ? and interface_status = nvl(?,'XXXXX')\");\n psmnt3.setString(1, txnStatus);\n psmnt3.setString(2, authStatus);\n psmnt3.setString(3, interfaceStatus);\n psmnt4 =conn.prepareStatement(\" select control_string from SMTBS_MENU where function_id = ?\");\n psmnt4.setString(1, functionId);\n psmnt5 = conn.prepareStatement(\"select lpad(?,16,'0') from dual\");\n psmnt6 = conn.prepareStatement(\"select to_char(to_number(?) + to_number(?) + to_number(?) ) from dual\");\n psmnt7 = conn.prepareStatement(\"select translate(?,'3210','1000') from dual\");\n \n \n finalControlString = \"0000000000000000\";\n String tempControlString = \"0000000000000000\";\n String userControlString = \"0000000000000000\";\n String funcControlString = \"0000000000000000\";\n String tranControlString = \"1111111111111111\";\n String interControlString=null;\n \n rs1 = psmnt1.executeQuery();\n rs2 = psmnt2.executeQuery();\n if (rs2.next()){\n userControlString = rs2.getString(1);\n }\n rs3 = psmnt3.executeQuery();\n if (rs3.next())\n tranControlString = rs3.getString(1);\n rs4 = psmnt4.executeQuery();\n if (rs4.next())\n funcControlString = rs4.getString(1);\n if (userControlString.equals(\"0000000000000000\")) {\n while (rs1.next()) {\n interControlString = rs1.getString(\"control_string\");\n userControlString = fn_and_controlstrings(userControlString, \n interControlString);\n \n }\n \n }\n if (tranControlString == null)\n tranControlString = \"1111111111111111\";\n if (funcControlString == null)\n funcControlString = null;\n psmnt5.setString(1, userControlString);\n rs5 = psmnt5.executeQuery();\n if (rs5.next())\n userControlString = rs5.getString(1);\n psmnt5.setString(1, tranControlString);\n rs5 = psmnt5.executeQuery();\n if (rs5.next())\n tranControlString = rs5.getString(1);\n psmnt5.setString(1, funcControlString);\n rs5 = psmnt5.executeQuery();\n if (rs5.next())\n funcControlString = rs5.getString(1);\n psmnt6.setString(1, userControlString);\n psmnt6.setString(2, tranControlString);\n psmnt6.setString(3, funcControlString);\n rs6 = psmnt6.executeQuery();\n if (rs6.next())\n tempControlString = rs6.getString(1);\n psmnt7.setString(1, tempControlString);\n rs7 = psmnt7.executeQuery();\n if (rs7.next())\n finalControlString = rs7.getString(1);\n List funcList = FCSMSUtility.getActionNames(finalControlString);\n for (int i=0; i<funcList.size(); i++) {\n String lAction = (String) funcList.get(i);\n if (lAction.equalsIgnoreCase(operation)) {\n status = true;\n break;\n }\n }\n }catch (Exception e) {\n dbg(\"checkControlStringStatus-->Exception = \"+ e.getMessage());\n e.printStackTrace();\n }finally{\n if(psmnt1!=null&&rs1!=null){\n psmnt1.close();\n rs1.close();\n }\n if(psmnt2!=null&&rs2!=null){\n psmnt2.close();\n rs2.close();\n }\n if(psmnt3!=null&&rs3!=null){\n psmnt3.close();\n rs3.close();\n }\n if(psmnt4!=null&&rs4!=null){\n psmnt4.close();\n rs4.close();\n }\n if(psmnt5!=null&&rs5!=null){\n psmnt5.close();\n rs5.close();\n }\n if(psmnt6!=null&&rs6!=null){\n psmnt6.close();\n rs6.close();\n }\n if(psmnt7!=null&&rs7!=null){\n psmnt7.close();\n rs7.close();\n }\n \n }\n dbg(\"getControlString-->ControlString : \" + finalControlString+\" Status: \"+status);\n return status;\n }", "FctWorkguide selectByPrimaryKey(Long autoid);", "@Test\n public void testCommitsApiWithSpecificCommit() throws Exception\n {\n \n \n RequestBuilder builder = new RequestBuilder(\"GET\");\n Request request = builder.setUrl(\n UriTemplate.fromTemplate(BASE)\n .append(PATH_EXPRESSION)\n .set(\"user\", \"damnhandy\")\n .set(\"repo\", \"Handy-URI-Templates\")\n .set(\"function\",\"commits\")\n .set(\"id\",\"7cdf7ff75f8ede138228ceff7f5a1c18a5835b94\")\n .expand()).build();\n Assert.assertEquals(\"https://api.github.com/repos/damnhandy/Handy-URI-Templates/commits/7cdf7ff75f8ede138228ceff7f5a1c18a5835b94\", request.getUrl());\n executeRequest(createClient(), request);\n }", "public static Set getDiffStatus(HTMLizer h, Statement s, int test, int baseline)\n throws SQLException{\n Set retval = new HashSet();\n\n\tconfirmTableExistence (h,s);\n\n ResultSet rs = s.executeQuery(getDiffStatusSql(test, baseline));\n while(rs.next()) {\n int runone = rs.getInt(1);\n int runtwo = rs.getInt(2);\n int result = rs.getInt(3);\n int otherrun = baseline;\n if (runone == baseline) {\n\totherrun = runtwo;\n } else if (runtwo == baseline) {\n\totherrun = runone;\n }\n\n if (result != Test.RESULT_NOT_RUN)\n\tretval.add(new Integer(otherrun));\n }\n \n rs.close();\n\n return retval;\n }", "static public void extractSingleCommit(String commitId) throws Exception\n\t{\n\t\tDataExtractor de = new DataExtractor();\n\t\tList<String> commit_ids = new ArrayList<String>();\n\t\tcommit_ids.add(commitId);\n\t\tde.extractCommitInfo(commit_ids);\n\t}", "Result getResult();", "public So_cdVO getById(String so_cd);", "@Test\n\tpublic void getIdWithCommit() throws Exception {\n\t\tRepository repo = new FileRepository(testRepo);\n\t\tRevCommit commit = add(\"d1/f1.txt\", \"content\");\n\t\tassertNull(TreeUtils.getId(repo, commit, \"d2/f1.txt\"));\n\t\tassertNull(TreeUtils.getId(repo, commit, \"d1/f1.txt\"));\n\t\tObjectId treeId = TreeUtils.getId(repo, commit, \"d1\");\n\t\tassertNotNull(treeId);\n\t\tassertFalse(treeId.equals(commit.getTree()));\n\t\tassertNull(BlobUtils.getId(repo, commit, \"d1\"));\n\t\tassertFalse(treeId.equals(BlobUtils.getId(repo, commit, \"d1/f1.txt\")));\n\t}", "public String doDetail(){\n if(idsecteur==null){\n this.addActionError(getText(\"error.topo.missing.id.\"));\n }else secteur = managerFactory.getSecteurManager().getbynid(idsecteur);\n {\n // this.addActionError(\"il n'y a pas de projet pour ce numéro \"+idtopo );\n\n\n }\nreturn (this.hasErrors())? ActionSupport.ERROR : ActionSupport.SUCCESS;\n\n }", "private static String getCommitId(RevCommit m )\n\t{\n\t\treturn m.getId().abbreviate(10).name();\n\t}", "@Override\n\tpublic TransferResultInfo<?> find() {\n\t\ttry {\n\t\t\tgradeDao.init();\n\t\t\tList<Grade> list_grade = gradeDao.select(transferDbData);\n\t\t\tList<TransferGradeInfo> finalList = new ArrayList<TransferGradeInfo>();\n\t\t\tfor (Grade grade : list_grade) {\n\t\t\t\tTransferGradeInfo g = new TransferGradeInfo();\n\t\t\t\tg.setUid(grade.getUid());\n\t\t\t\tg.setName(grade.getName());\n\t\t\t\tg.setAdmissiontime(grade.getAdmissiontime());\n\t\t\t\tg.setGraduationtime(grade.getGraduationtime());\n\t\t\t\tg.setCreatetime(grade.getCreatetime());\n\t\t\t\tg.setCreateip(grade.getCreateip());\n\t\t\t\tif (grade.getAdmin() != null) {\n\t\t\t\t\tTransferAdminInfo createuser = new TransferAdminInfo();\n\t\t\t\t\tcreateuser.setUid(grade.getAdmin().getUid());\n\t\t\t\t\tcreateuser.setName(grade.getAdmin().getName());\n\t\t\t\t\tg.setCreateuser(createuser);\n\t\t\t\t}\n\t\t\t\tfinalList.add(g);\n\t\t\t}\n\t\t\tTransferResultInfo<List<TransferGradeInfo>> rs = new TransferResultInfo<List<TransferGradeInfo>>();\n\t\t\trs.setMsgType(ResultCodeStorage.type_success);\n\t\t\trs.setMsgCode(ResultCodeStorage.code_success);\n\t\t\trs.setMsgContent(finalList);\n\t\t\treturn rs;\n\t\t} catch (HibernateException e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\tTransferResultInfo<String> rs = new TransferResultInfo<String>();\n\t\t\trs.setMsgType(ResultCodeStorage.type_error);\n\t\t\trs.setMsgCode(ResultCodeStorage.code_err_dao_hibernate_query);\n\t\t\trs.setMsgContent(StringUtil.formatResultInfoMessage(ResultCodeStorage.code_err_dao_hibernate_query, e.getMessage()));\n\t\t\treturn rs;\n\t\t} catch (HibernateSessionNotInitializedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tTransferResultInfo<String> rs = new TransferResultInfo<String>();\n\t\t\trs.setMsgType(ResultCodeStorage.type_error);\n\t\t\trs.setMsgCode(ResultCodeStorage.code_err_session_hibernate_empty);\n\t\t\trs.setMsgContent(StringUtil.formatResultInfoMessage(ResultCodeStorage.code_err_session_hibernate_empty, e.getMessage()));\n\t\t\treturn rs;\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tTransferResultInfo<String> rs = new TransferResultInfo<String>();\n\t\t\trs.setMsgType(ResultCodeStorage.type_error);\n\t\t\trs.setMsgCode(ResultCodeStorage.code_err_generic_server_internal_exception);\n\t\t\trs.setMsgContent(StringUtil.formatResultInfoMessage(ResultCodeStorage.code_err_generic_server_internal_exception, e.getMessage()));\n\t\t\treturn rs;\n\t\t} finally {\n\t\t\tgradeDao.close();\n\t\t}\n\t}", "public ResultSet appcomp(Long comp_id)throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select * from company where comp_id=\"+comp_id+\"\");\r\n\treturn rs;\r\n}", "@Override\n\tpublic StudyTaskInfo getLastInfoByLogId(Integer studyLogId)\n\t\t\tthrows WEBException {\n\t\ttry {\n\t\t\tstDao = (StudyTaskDao) DaoFactory.instance(null).getDao(Constants.DAO_STUDY_TASK_INFO);\n\t\t\tSession sess = HibernateUtil.currentSession();\n\t\t\treturn stDao.getLastInfoByLogId(sess, studyLogId);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tthrow new WEBException(\"获取最后一次的任务记录列表时出现异常!\");\n\t\t} finally{\n\t\t\tHibernateUtil.closeSession();\n\t\t}\n\t}" ]
[ "0.63204", "0.5670476", "0.56401485", "0.55103254", "0.5509402", "0.55078536", "0.5431899", "0.5313572", "0.5311796", "0.5243043", "0.522123", "0.51231986", "0.50842345", "0.5052723", "0.49969205", "0.49862888", "0.4956169", "0.49192423", "0.48864165", "0.48610637", "0.48519316", "0.4851137", "0.48429736", "0.48429736", "0.48428014", "0.48420867", "0.48420867", "0.48401892", "0.48367375", "0.48049822", "0.47751495", "0.4772598", "0.47583035", "0.47511792", "0.47308147", "0.4714604", "0.47081146", "0.47065392", "0.47000182", "0.46929005", "0.46758872", "0.4673151", "0.46472335", "0.46460423", "0.4634569", "0.4615475", "0.4607686", "0.45921373", "0.45874295", "0.45869726", "0.45830753", "0.45824885", "0.45511937", "0.45486474", "0.45372814", "0.45372814", "0.4535819", "0.4527299", "0.452372", "0.4522257", "0.45144427", "0.4504248", "0.45021135", "0.44994026", "0.4490984", "0.44814694", "0.4480373", "0.4478854", "0.44644", "0.44571748", "0.4453667", "0.44507188", "0.44505325", "0.4449465", "0.444828", "0.44482055", "0.44478878", "0.44460693", "0.44342938", "0.44297352", "0.44294462", "0.44294193", "0.442765", "0.44227508", "0.44201675", "0.44169003", "0.44106084", "0.44077817", "0.44060832", "0.44027537", "0.4398113", "0.4397925", "0.43959594", "0.43951005", "0.43917242", "0.43907395", "0.43874028", "0.43864378", "0.43860608", "0.4382212" ]
0.60920817
1
get all commit result.
@GET @Path("all") @Produces(MediaType.TEXT_PLAIN) public Response getCommitResult() { JSONArray array = new JSONArray(); JSONObject result = new JSONObject(); List<User> users = userDb.listAllUsers(); for (User user : users) { JSONObject ob = db.getCommitResultByStudent(user.getId()); array.put(ob); } result.put("result", array); return Response.ok().entity(result.toString()).build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Commit> getAllCommits() {\r\n return datastore.createQuery(Commit.class)\r\n .field(\"vcs_system_id\").equal(vcSystem.getId())\r\n .asList();\r\n }", "private ArrayList getCommitteList() {\r\n /**\r\n * This sends the functionType as 'G' to the servlet indicating to\r\n * get the details of all existing committees with the required\r\n * information\r\n */\r\n \r\n Vector vecBeans = new Vector();\r\n String connectTo = CoeusGuiConstants.CONNECTION_URL + \"/comMntServlet\";\r\n RequesterBean request = new RequesterBean();\r\n request.setDataObject(\"\"+CoeusConstants.IACUC_COMMITTEE_TYPE_CODE);\r\n request.setFunctionType(COMMITTEE_LIST_FOR_MODULE);\r\n AppletServletCommunicator comm = new AppletServletCommunicator(\r\n connectTo, request);\r\n /**\r\n * Updated for REF ID :0003 Feb'21 2003.\r\n * Hour Glass implementation while DB Trsactions Wait\r\n * by Subramanya Feb' 21 2003\r\n */\r\n setCursor( new Cursor( Cursor.WAIT_CURSOR ) );\r\n comm.send();\r\n ResponderBean response = comm.getResponse();\r\n setCursor( new Cursor( Cursor.DEFAULT_CURSOR ) );\r\n \r\n if (response.isSuccessfulResponse()) {\r\n vecBeans = response.getDataObjects();\r\n }\r\n return new ArrayList(vecBeans);\r\n }", "public List<Commit> getAllCommits(Project project, String branchName);", "@Override\n public CommandResultList getResultList() {\n return cresultList;\n }", "public List<String> getAllCommits() {\n return Utils.plainFilenamesIn(Main.ALL_COMMITS);\n }", "public List<TransactionInfo> list() {\n LOG.debug(\"loading all transaction info\");\n try {\n return getEditor().list();\n } catch (IOException e) {\n throw new CommandExecutionException(\"error occurred while loading transactions\", e);\n }\n }", "public Collection<Transaction> getAllTransactions();", "public List<TransactionInfo> getAll() {\n return transactions;\n }", "@Override\n\tpublic List<Transaction> getAllTransactions() { \n\t\t/* begin transaction */ \n\t\tSession session = getCurrentSession(); \n\t\tsession.beginTransaction();\n\n\t\tQuery query = session.createQuery(\"from Transaction\");\n\t\tList<Transaction> expenses = query.list();\n\n\t\t/* commit */ \n\t\tsession.getTransaction().commit();\n\n\t\treturn expenses; \n\t}", "public List<com.MyBlog.entity.Archivescommit> FindAll() {\n\t\treturn acmapper.FindAll();\n\t}", "public List<ContentInterventoBOBean> execGetAll() {\n System.out.println(\"InterventoLogics - execGetAll\");\n InterventoClient client = new InterventoClient(new ContentInterventoRequestBean());\n try {\n client.getAll();\n return BOFactory.convertWorkableToBOInterventi(client.getResList());\n }catch(Exception e){\n e.printStackTrace();\n }\n return null;\n }", "public ArrayList<ModelCommit> getCommits() {\n\t\treturn commits;\n\t}", "@Override\n\tpublic List<Log> finLogALL() {\n\t\tString sql = \"SELECT * FROM t_log ORDER BY ASC\";\n\t\tList<Log> list = null;\n\t\ttry {\n\t\t\tlist = qr.query(sql, new BeanListHandler<Log>(Log.class));\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\treturn list;\n\t}", "public List<Result> loadResults() {\n List<Result> results = null;\n try {\n DataBaseBroker dbb = new DataBaseBroker();\n dbb.loadDriver();\n dbb.establishConnection();\n results = dbb.loadResults();\n dbb.commit();\n dbb.closeConnection();\n } catch (Exception ex) {\n Logger.getLogger(GameDBLogic.class.getName()).log(Level.SEVERE, null, ex);\n }\n return results;\n }", "@Override\r\n\tpublic List<ExecuteTask> getAll() {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask\";\r\n\t\treturn getForList(sql);\r\n\t}", "public List<Commit> getAllCommits(Repository repo) throws Exception {\n List<Commit> commits = new ArrayList<>();\n RevWalk walk = this.createAllRevsWalk(repo, null);\n walk.markStart(walk.parseCommit(repo.resolve(\"HEAD\")));\n for (RevCommit r: walk){\n if(r.getParents().length>0){\n Commit c = getCommit(repo, r, r.getParent(0));\n commits.add(c);\n }else{\n Commit c = new Commit(r);\n commits.add(c);\n }\n\n }\n return commits;\n }", "@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}", "public List<Transaction> getAllTransactions(){\n Cursor cursor = fetchAllRecords();\n List<Transaction> transactions = new ArrayList<Transaction>();\n if (cursor != null){\n while(cursor.moveToNext()){\n transactions.add(buildTransactionInstance(cursor));\n }\n cursor.close();\n }\n return transactions;\n }", "public QbUpdate all();", "@TransactionAttribute(TransactionAttributeType.SUPPORTS)\r\n\t\tpublic List<DatosGrlsProyectoDO> getAllAll() throws ConectelException {\r\n\t\t\tTypedQuery<DatosGrlsProyectoDO> query = entityManager.createNamedQuery(\r\n\t\t\t\t\t\"DatosGrlsProyectoDO.findAllAll\", DatosGrlsProyectoDO.class);\r\n\t\t\tList<DatosGrlsProyectoDO> dataProjectList;\r\n\t\t\ttry {\r\n\t\t\t\tdataProjectList = query.getResultList();\r\n\t\t\t} catch(NoResultException e) {\r\n\t\t\t\tthrow new ConectelException(\"No existen Datos Generales registrados.\");\r\n\t\t\t}\r\n\t\t\treturn dataProjectList;\r\n\t\t}", "DataResult<List<Job>> getAll();", "public GitCommit[] getCommits()\n {\n List <GitCommit> list = new ArrayList(); for(GitCommit c=getCommit(); c!=null; c = c.getParent()) list.add(c);\n return list.toArray(new GitCommit[list.size()]);\n }", "@Override\n\tpublic List<finalDataBean> findAll() throws Exception {\n\t\treturn this.dao.findAll();\n\t}", "@Override\r\n\tpublic List<Post> refreshResult() {\n\t\tpostDao=new PostDaoImpl(TransactionManager.connection);\r\n\t\tList<Post> list=new ArrayList<Post>();\r\n\t\treturn postDao.refreshResult();\r\n\t\t\r\n\t}", "public static String getAll() {\n Result r = new Result();\n int status = 0;\n if((status = doGetList(r)) != 200) return \"Error from server \"+ status;\n return r.getValue();\n }", "List<T> getAll() throws PersistException;", "public Collection<CleaningTransaction> findAll();", "public List<R> getAll();", "public void showGlobal() {\n List<String> allCommits = getAllCommits();\n for (String cmt: allCommits) {\n File commitFile = new File(Main.ALL_COMMITS, cmt);\n Commit associatedCommit =\n Utils.readObject(commitFile, Commit.class);\n printCommitLog(associatedCommit);\n }\n }", "private List<Instance> flushResultBuffer() {\n\t\tList<Instance> resultBuffer = this.resultBuffer;\n\t\tthis.resultBuffer = new LinkedList<Instance>();\n\t\treturn resultBuffer;\n\t}", "Map retrievePreparedTransactions();", "@Override\r\n\tpublic Map<String, Object> readAll() {\n\t\tsimpleJdbcCall = new SimpleJdbcCall(jdbcTemplate).withCatalogName(\"PKG_ESTADO_CIVIL\")\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t .withProcedureName(\"PR_LIS_ESTADO_CIVIL\")\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t .declareParameters(new SqlOutParameter(\"CUR_ESTADO_CIVIL\", OracleTypes.CURSOR,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t new ColumnMapRowMapper()));\r\n\t\treturn simpleJdbcCall.execute();\r\n\t}", "private void printAllTransactions(){\n Set<Transaction> transactions = ctrl.getAllTransactions();\n transactions.stream().forEach(System.out::println);\n }", "@Override\n public Set<Committee> getAllCommittee(Editor editor) {\n Set<Committee> committeeSet = new HashSet<>();\n\n\n return committeeSet;\n }", "public Commit getRoot(){\n\t\treturn myRoot;\n\t}", "@Test\n public void testSelectingAllRowsWhenNotEmpty() throws SQLException {\n // Arrange\n CommitStructure commit = getSampleCommit();\n // Act\n mysqlDatabase.insertCommitToDatabase(commit);\n List<CommitStructure> commits = mysqlDatabase.selectAllCommits();\n // Assert\n assertFalse(commits.isEmpty());\n assertEquals(commits.get(0).getCommitID() , commit.getCommitID());\n }", "public List<SSTableReader> finished()\n {\n assert state() == State.COMMITTED || state() == State.READY_TO_COMMIT;\n return preparedForCommit;\n }", "@Override\n public List<R> getAll() {\n return onFindForList(getSession().createCriteria(entityClass).list());\n }", "public Cursor fetchAll() {\n\t\treturn db.query(tableName, fields, null, null, null, null, null);\n\t}", "public List<Batch> getAll() {\n return batchRepository.findAll();\n }", "public List<T> selectAll() {\n Logger logger = getLogger();\n List<T> objectList = new ArrayList<>();\n try (Connection connection = getConnection();\n PreparedStatement preparedStatement = connection.prepareStatement(getSelectAll())) {\n\n logger.info(\"Executing statement: \" + preparedStatement);\n ResultSet rs = preparedStatement.executeQuery();\n\n while (rs.next()) {\n T object = setObjectParams(rs);\n setObjectId(rs, object);\n objectList.add(object);\n }\n } catch (SQLException e) {\n logger.error(e.getMessage());\n }\n logger.info(\"Select all: success\");\n return objectList;\n }", "public List<Transaction> getAllTransaction() throws SQLException {\n String sql = \"SELECT * FROM LabStore.Transaction_Detail\";\n List<Transaction> transactions = new ArrayList<>();\n\n try (Connection conn = database.getConnection();\n PreparedStatement preStmt = conn.prepareStatement(sql)) {\n try (ResultSet rs = preStmt.executeQuery()) {\n while (rs.next()) {\n Transaction transaction = new Transaction();\n transaction.setId(rs.getInt(\"id\"));\n transaction.setUser(userDbManager.getUser(rs.getInt(\"uId\")));\n transaction.setPurchaseDetail(purchaseDetailDbManager\n .getPurchaseDetailById(rs.getInt(\"pdId\")));\n transaction.setCount(rs.getInt(\"count\"));\n transaction.setTime(rs.getTimestamp(\"time\"));\n transactions.add(transaction);\n }\n }\n }\n\n return transactions;\n }", "@Override\n \tpublic Object getResult() {\n \t\treturn result;\n \t}", "@Test\n public void testSelectingAllRowsWhenEmpty() throws SQLException {\n // Arrange\n CommitStructure commit = getSampleCommit();\n // Act\n List<CommitStructure> commits = mysqlDatabase.selectAllCommits();\n // Assert\n assertTrue(commits.isEmpty());\n }", "public List<Message> getMessageAll(){\n return repo.findAll();\n \n }", "@Override\n public int[] executeBatch() {\n if (this.batchPos == 0) {\n return new int[0];\n }\n try {\n int[] arrn = this.db.executeBatch(this.pointer, this.batchPos / this.paramCount, this.batch);\n return arrn;\n }\n finally {\n this.clearBatch();\n }\n }", "@GET(\"points-transaction-history?expand=translations&sort=-created_at\")\n Call<HistoryExchangeResponse> getTransactionHistoryAll();", "@Override\n public List<T> getAll() throws SQLException {\n\n return this.dao.queryForAll();\n\n }", "public List <reclamation> findall(){\n\t\tList<reclamation> a = reclamationRepository.findAll();\n\t\t\n\t\tfor(reclamation reclamations : a)\n\t\t{\n\t\t\tL.info(\"reclamations :\"+ reclamations);\n\t\t\t\n\t\t}\n\t\treturn a;\n\t\t}", "public List<Compte> findAll() {\n\t\treturn dao.findAll();\n\t}", "@Override\n public List<Transaksi> getAll() {\n List<Transaksi> listTransaksi = new ArrayList<>();\n\n try {\n String query = \"SELECT id, date_format(tgl_transaksi, '%d-%m-%Y') AS tgl_transaksi FROM transaksi\";\n\n PreparedStatement ps = Koneksi().prepareStatement(query);\n ResultSet rs = ps.executeQuery();\n\n while (rs.next()) {\n Transaksi transaksi = new Transaksi();\n\n transaksi.setId(rs.getString(\"id\"));\n transaksi.setTglTransaksi(rs.getString(\"tgl_transaksi\"));\n\n listTransaksi.add(transaksi);\n }\n } catch (SQLException se) {\n se.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return listTransaksi;\n }", "public List<TransactionOutput> calculateAllSpendCandidates() {\n return calculateAllSpendCandidates(true, true);\n }", "boolean flush_all();", "public IStatus getResult();", "public List<Integer> Result()\n\t{\n\t\treturn result;\n\t}", "@Override\n\tpublic List<T> getAll() {\n\t\treturn getDao().findAll();\n\t}", "@Override\r\n\tpublic List<Repair> queryAll() {\n\t\treturn repairDao.queryAll();\r\n\t}", "public List<String> getResult()\n {\n while (!readComplete)\n {\n try\n {\n Thread.sleep(1000);\n }\n catch (InterruptedException ex)\n {\n // swallow and exit;\n }\n }\n return lines;\n }", "public Result getResults()\r\n {\r\n return result;\r\n }", "ReadResponseMessage fetchAllMessages();", "public Result all(String id);", "E[] getAll();", "public Buffer execute(Transaction tx) {\n if (!isRunAllowed()) {\n return null;\n }\n\n SortedIndex<Buffer, Buffer> indexCompleted = hawtDBFile.getRepositoryIndex(tx, getRepositoryNameCompleted(), false);\n if (indexCompleted == null) {\n return null;\n }\n\n Iterator<Map.Entry<Buffer, Buffer>> it = indexCompleted.iterator();\n // scan could potentially be running while we are shutting down so check for that\n while (it.hasNext() && isRunAllowed()) {\n Map.Entry<Buffer, Buffer> entry = it.next();\n Buffer keyBuffer = entry.getKey();\n\n String exchangeId;\n try {\n exchangeId = codec.unmarshallKey(keyBuffer);\n } catch (IOException e) {\n throw new RuntimeException(\"Error unmarshalling confirm key: \" + keyBuffer, e);\n }\n if (exchangeId != null) {\n LOG.trace(\"Scan exchangeId [{}]\", exchangeId);\n answer.add(exchangeId);\n }\n }\n return null;\n }", "public List<CorpusSearchHit> getResult() {\n return result;\n }", "@Override\n public ArrayList<Course> getAll() {\n ArrayList<Course> allCourses = new ArrayList();\n String statement = FINDALL;\n ResultSet rs = data.makeStatement(statement);\n try {\n while(rs.next()){\n Course course = new Course(rs.getInt(\"id\"),rs.getString(\"title\"),rs.getString(\"stream\"),\n rs.getString(\"type\"),rs.getDate(\"start_date\").toLocalDate(),rs.getDate(\"end_date\").toLocalDate());\n allCourses.add(course);\n }\n } catch (SQLException ex) {\n System.out.println(\"Problem with CourseDao.getAll()\");\n }\n finally{\n data.closeConnections(rs,data.statement,data.conn);\n }\n return allCourses;\n }", "public ContractAppendixList queryAllContractAppendix(boolean forUpdate)\n throws SQLException, IOException{\n /* if limit < 0 or offset < 0 then select all */\n return this.contractAppendixManager.select(forUpdate, -1, -1);\n }", "@SuppressWarnings(\"unchecked\")\n\t@Transactional(isolation = Isolation.READ_COMMITTED, propagation = Propagation.REQUIRED)\n\tpublic List<Batch> findAllCurrent();", "private static void flushResult(IQueryResult result) throws IOException\n {\n while (result.next()) {\n System.out.println(result.getValueArray().toString());\n }\n }", "public String getAllWrittenText() {\r\n\t\treturn sb.toString();\r\n\t}", "List<Bill> all() throws SQLException;", "public abstract List<Object> getAll();", "public Result getResult() {\n return result;\n }", "public int[] executeBatch() throws SQLException {\n return null;\r\n }", "public ArrayList<Reponce> getAllReponces() {\n\t\tArrayList<Reponce> listReponces = new ArrayList<Reponce>();\n\t\tSession session = HibernateUtil.getSessionFactory().openSession();\n\t\t// start a transaction\n\t\t//Transaction transaction = session.beginTransaction();\n\t\tQuery en = session.createQuery(\"FROM Reponce\", Reponce.class);\n\t\tlistReponces = (ArrayList<Reponce>) en.getResultList();\n\t\treturn listReponces;\n\t}", "@Override\n public byte[] execute() {\n return buildResponse();\n }", "@Override\n\tpublic ArrayList<TransferCompra> listaCompra() {\n\t\t\n\t\t//Creamos la Transaccion\n\t\tTransactionManager.getInstance().nuevaTransaccion();\n\t\tTransactionManager.getInstance().getTransaccion().start();\n\t\tArrayList<TransferCompra> lista = FactoriaDAO.getInstance().createDAOCompra().list();\n\t\t\n\t\t//Hacemos Commit\n\t\tTransactionManager.getInstance().getTransaccion().commit();\n\t\t\n\t\t//Finalmnete cerramos la Transaccion\n\t\tTransactionManager.getInstance().eliminaTransaccion();\n\t\treturn lista;\n\t}", "@Override\n\tpublic List<Commande> getAll() {\n\n\t\ttry {\n\n\t\t\tps = this.connection.prepareStatement(\"SELECT * FROM commandes\");\n\n\t\t\trs = ps.executeQuery();\n\n\t\t\tList<Commande> listeCommandesBDD = new ArrayList<>();\n\t\t\tCommande commande = null;\n\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tcommande = new Commande(rs.getInt(1), rs.getDate(2), rs.getInt(3));\n\t\t\t\tlisteCommandesBDD.add(commande);\n\n\t\t\t} // end while\n\n\t\t\treturn listeCommandesBDD;\n\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"...(CommandeDAOImpl) erreur de l'execution de getAll()...\");\n\t\t\te.printStackTrace();\n\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\trs.close();\n\t\t\t\tps.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} // end finally\n\n\t\treturn null;\n\n\t}", "@Override\n\tpublic List<Resident> getAll() {\n\t\tList<Resident> list = null;\n\t\ttry {\n\t\t\tlist = repository.findAll();\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\t// TODO: handle exception\n\t\t}\n\t\treturn list;\n\t}", "public List<TreateWait> queryAll() {\n\t\tQuery query = Query.query(Criteria.where(\"id\").exists(true));\n\t\treturn treateWaitDao.queryList(query);\n\t\t\n\t}", "@Override\n\tpublic List<Record> getAllRecord() {\n\t\tSession session = HibernateSessionFactory.getSession();\n\t\tTransaction tx = session.beginTransaction();\n\t\ttry {\n\t\t\tlist = dao.findAll();\n\t\t\ttx.commit();\n\t\t} catch (RuntimeException e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\ttx.rollback();\n\t\t} finally {\n\t\t\tsession.close();\n\t\t}\n\n\t\treturn list;\n\t}", "@Override\n\tpublic ResultWrapper<List<Todos>> getAll() {\n\t\tResultWrapper<List<Todos>> rs = new ResultWrapper<List<Todos>>();\n\t\tList<Todos> todosList = todosRepo.findAllTodos();\n\t\tif (todosList.size() > 0) {\n\t\t\trs.succeedGet(todosList);\n\t\t\treturn rs;\n\t\t} else {\n\t\t\trs.setResult(todosList);\n\t\t\trs.setStatus(Result.SUCCESS);\n\t\t\trs.setMessage(\"List is empty\");\n\t\t\treturn rs;\n\t\t}\n\t}", "public String getAllCommitteeMembers(){\r\n\t\tString allCommitteeMembers = \"\";\r\n\t\tfor(int index = 0; index < committeeMembers.size(); ++index){\r\n\t\t\tallCommitteeMembers += committeeMembers.get(index).returnNameInString() + \"\\n\\t\";\r\n\t\t}\r\n\t\treturn allCommitteeMembers;\r\n\t}", "public ArrayList<Commit> getCommmit() {\r\n return commmit;\r\n }", "public Cursor getAll()\r\n {\r\n \treturn mDb.query(DB_TABLE_NAME, new String[] {\"_id\",\"fundId\", \"moneyPaid\", \"currentValue\", \"units\", \"simpleReturn\"}, null, null, null, null, null);\r\n }", "@Override\n\tpublic String getResult() {\n\t\treturn result;\n\t}", "@Transactional\n\n\t@Override\n\tpublic Collection<FileModel> getAll() {\n\t\treturn fm.findAll();\n\t}", "RetrieveCommitsStatisticsResultResponse retrieveCommits(final RetrieveCommitsStatisticsRequest request);", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "List<Receipt> getAllReceipts() throws DbException;", "public Cursor fetchAll() {\n\t\tCursor cursor = db.query(CertificationConstants.DB_TABLE, CertificationConstants.fields(), null, null, null, null, null);\n\t\treturn cursor;\n\t}", "@Override\n public List<Client> getAllClients(){\n log.trace(\"getAllClients --- method entered\");\n List<Client> result = clientRepository.findAll();\n log.trace(\"getAllClients: result={}\", result);\n return result;\n }", "@Override\n\tpublic List queryAll() throws Exception {\n\t\treturn null;\n\t}", "List<StockList> fetchAll();", "List<T> getAll();", "List<T> getAll();", "List<T> getAll();" ]
[ "0.6325058", "0.60665834", "0.5885102", "0.58463204", "0.584473", "0.57539904", "0.57397664", "0.57228905", "0.5689331", "0.56708384", "0.5605492", "0.5560056", "0.5512259", "0.55087614", "0.5493862", "0.54619884", "0.54529005", "0.5443253", "0.5405001", "0.53920037", "0.5363775", "0.5350525", "0.5329831", "0.53283733", "0.5299333", "0.5272531", "0.52344024", "0.5225133", "0.5217378", "0.5209343", "0.5209087", "0.5199822", "0.51898265", "0.51896614", "0.5178466", "0.51734626", "0.51711196", "0.5159487", "0.5157873", "0.51559705", "0.5155817", "0.51499444", "0.51404154", "0.51387656", "0.5132253", "0.5122684", "0.51192725", "0.51186776", "0.51182437", "0.511507", "0.5106922", "0.5099602", "0.5088405", "0.5083371", "0.5072131", "0.50705445", "0.5068292", "0.5068157", "0.50614816", "0.50585103", "0.50408125", "0.5037132", "0.5035202", "0.5031532", "0.50194645", "0.5010708", "0.5007007", "0.5002127", "0.49996358", "0.49960926", "0.4992466", "0.49914372", "0.49905083", "0.4988359", "0.4986915", "0.4986694", "0.498431", "0.49833068", "0.49776748", "0.49768236", "0.4970038", "0.49698055", "0.496766", "0.4966577", "0.49638185", "0.49635914", "0.4960796", "0.4958239", "0.4958239", "0.49574274", "0.49564916", "0.49564916", "0.49554253", "0.49549827", "0.49521056", "0.49511874", "0.4943583", "0.49379417", "0.49379417", "0.49379417" ]
0.73824984
0
get commit result by stuId and hw.
public String getCommitResult(String userName, String proName) { int id = userDb.getUser(userName).getId(); return db.getCommitResultByStudentAndHw(id, proName).getStatus(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GET\n @Path(\"result\")\n @Produces(MediaType.TEXT_PLAIN)\n public Response getCommitResultByStudentAndHw(@QueryParam(\"proName\") String proName,\n @QueryParam(\"userName\") String userName) {\n int id = userDb.getUser(userName).getId();\n\n CommitResult commitResult = db.getCommitResultByStudentAndHw(id, proName);\n String circleColor = \"circle \" + commitResult.getStatus();\n String result = userName + \"_\" + proName + \",\" + circleColor + \",\"\n + (commitResult.getCommit() + 1);\n\n return Response.ok().entity(result).build();\n }", "public Commit findCommit(String hash) {\r\n Query<Commit> commitQuery = datastore.find(Commit.class);\r\n commitQuery.and(\r\n commitQuery.criteria(\"revision_hash\").equal(hash),\r\n commitQuery.criteria(\"vcs_system_id\").equal(getVcSystem().getId())\r\n );\r\n final List<Commit> commits = commitQuery.asList();\r\n\r\n if (commits.size() == 1) {\r\n return commits.get(0);\r\n } else {\r\n logger.debug(\"Could not find commit: \" + hash);\r\n return null;\r\n }\r\n }", "public JSONObject getProjectCommitRecord(int pgId) {\n String sql = \"SELECT * FROM Project_Commit_Record WHERE pgId=?\";\n JSONObject ob = new JSONObject();\n JSONArray array = new JSONArray();\n\n try (Connection conn = database.getConnection();\n PreparedStatement preStmt = conn.prepareStatement(sql)) {\n preStmt.setInt(1, pgId);\n try (ResultSet rs = preStmt.executeQuery()) {\n while (rs.next()) {\n int statusId = rs.getInt(\"status\");\n StatusEnum statusEnum = csDb.getStatusNameById(statusId);\n int commitNumber = rs.getInt(\"commitNumber\");\n Date commitTime = rs.getTimestamp(\"time\");\n String commitStudent = rs.getString(\"commitStudent\");\n JSONObject eachHw = new JSONObject();\n eachHw.put(\"status\", statusEnum.getType());\n eachHw.put(\"commitNumber\", commitNumber);\n eachHw.put(\"commitTime\", commitTime);\n eachHw.put(\"commitStudent\", commitStudent);\n array.put(eachHw);\n }\n }\n ob.put(\"commits\", array);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return ob;\n }", "@Override\r\n\tpublic Object getStu_resultById(int stu_r_id) {\n\t\tConnection conn = null;\r\n\t\tPreparedStatement stmt = null;\r\n\t\tResultSet rs = null;\r\n\t\ttry {\r\n\t\t\tconn = DBHelper.getConnection();\r\n\t\t\tString sql = \"select * from stu_result where stu_r_id=?;\"; // SQL语句\r\n\t\t\tstmt = conn.prepareStatement(sql);\r\n\t\t\tstmt.setInt(1, stu_r_id);\r\n\t\t\trs = stmt.executeQuery();\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tStu_result stu_r = new Stu_result();\r\n\t\t\t\tstu_r.setStu_r_id(rs.getInt(\"stu_r_id\"));\r\n\t\t\t\tstu_r.setSid(rs.getInt(\"sid\"));\r\n\t\t\t\tstu_r.setKj_id(rs.getInt(\"kj_id\"));\r\n\t\t\t\tstu_r.setStu_dxt_r(rs.getString(\"stu_dxt_r\"));\r\n\t\t\t\tstu_r.setStu_dxt_c(rs.getString(\"stu_dxt_c\"));\r\n\t\t\t\tstu_r.setStu_dxts_r(rs.getString(\"stu_dxts_r\"));\r\n\t\t\t\tstu_r.setStu_dxts_c(rs.getString(\"stu_dxts_c\"));\r\n\t\t\t\tstu_r.setStu_pdt_r(rs.getString(\"stu_pdt_r\"));\r\n\t\t\t\tstu_r.setStu_pdt_c(rs.getString(\"stu_pdt_c\"));\r\n\t\t\t\treturn stu_r;\r\n\t\t\t} else {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t} finally {\r\n\t\t\t// 释放数据集对象\r\n\t\t\tif (rs != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\trs.close();\r\n\t\t\t\t\trs = null;\r\n\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// 释放语句对象\r\n\t\t\tif (stmt != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tstmt.close();\r\n\t\t\t\t\tstmt = null;\r\n\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}", "public JSONObject getLastProjectCommitRecord(int pgId) {\n String sql = \"SELECT * from Project_Commit_Record a where (a.commitNumber = \"\n + \"(SELECT max(commitNumber) FROM Project_Commit_Record WHERE pgId = ?));\";\n JSONObject ob = new JSONObject();\n JSONArray array = new JSONArray();\n\n try (Connection conn = database.getConnection();\n PreparedStatement preStmt = conn.prepareStatement(sql)) {\n preStmt.setInt(1, pgId);\n try (ResultSet rs = preStmt.executeQuery()) {\n\n int statusId = rs.getInt(\"status\");\n StatusEnum statusEnum = csDb.getStatusNameById(statusId);\n int commitNumber = rs.getInt(\"commitNumber\");\n Date commitTime = rs.getTimestamp(\"time\");\n String commitStudent = rs.getString(\"commitStudent\");\n JSONObject eachHw = new JSONObject();\n eachHw.put(\"status\", statusEnum.getType());\n eachHw.put(\"commitNumber\", commitNumber);\n eachHw.put(\"commitTime\", commitTime);\n eachHw.put(\"commitStudent\", commitStudent);\n array.put(eachHw);\n }\n ob.put(\"commits\", array);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return ob;\n }", "public String getProjectCommitRecordStatus(int pgId, int commitNumber) {\n String status = \"\";\n String query = \"SELECT status FROM Project_Commit_Record where pgId = ? and limit ?,1\";\n\n try (Connection conn = database.getConnection();\n PreparedStatement preStmt = conn.prepareStatement(query)) {\n preStmt.setInt(1, pgId);\n preStmt.setInt(2, commitNumber - 1);\n\n try (ResultSet rs = preStmt.executeQuery();) {\n if (rs.next()) {\n status = rs.getString(\"status\");\n }\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return status;\n\n }", "public Buffer execute(Transaction tx) {\n if (!isRunAllowed()) {\n return null;\n }\n\n SortedIndex<Buffer, Buffer> indexCompleted = hawtDBFile.getRepositoryIndex(tx, getRepositoryNameCompleted(), false);\n if (indexCompleted == null) {\n return null;\n }\n\n Iterator<Map.Entry<Buffer, Buffer>> it = indexCompleted.iterator();\n // scan could potentially be running while we are shutting down so check for that\n while (it.hasNext() && isRunAllowed()) {\n Map.Entry<Buffer, Buffer> entry = it.next();\n Buffer keyBuffer = entry.getKey();\n\n String exchangeId;\n try {\n exchangeId = codec.unmarshallKey(keyBuffer);\n } catch (IOException e) {\n throw new RuntimeException(\"Error unmarshalling confirm key: \" + keyBuffer, e);\n }\n if (exchangeId != null) {\n LOG.trace(\"Scan exchangeId [{}]\", exchangeId);\n answer.add(exchangeId);\n }\n }\n return null;\n }", "public wsihash fetchByPrimaryKey(long wsihashId);", "Commit getCommit(String hash) {\n Commit newCommit = null;\n File gettin = new File(\".gitlet/commits/\" + hash);\n if (gettin.exists()) {\n return deserializeCommit(\".gitlet/commits/\" + hash);\n } else {\n return deserializeCommit(\".gitlet/commits/\" + hash + \".ser\");\n }\n }", "private Commit getCommitFromID(String shaCode) {\n File f = new File(Main.ALL_COMMITS, shaCode);\n if (f.exists()) {\n return Utils.readObject(f, Commit.class);\n } else {\n return null;\n }\n }", "Online selectByPrimaryKey(String hash);", "public Buffer execute(Transaction tx) {\n if (!isRunAllowed()) {\n return null;\n }\n\n SortedIndex<Buffer, Buffer> index = hawtDBFile.getRepositoryIndex(tx, repositoryName, false);\n if (index == null) {\n return null;\n }\n\n Iterator<Map.Entry<Buffer, Buffer>> it = index.iterator();\n // scan could potentially be running while we are shutting down so check for that\n while (it.hasNext() && isRunAllowed()) {\n Map.Entry<Buffer, Buffer> entry = it.next();\n Buffer keyBuffer = entry.getKey();\n\n String key;\n try {\n key = codec.unmarshallKey(keyBuffer);\n } catch (IOException e) {\n throw new RuntimeException(\"Error unmarshalling key: \" + keyBuffer, e);\n }\n if (key != null) {\n LOG.trace(\"getKey [{}]\", key);\n keys.add(key);\n }\n }\n return null;\n }", "@Test\n public void testSelectSpecificRow() throws SQLException {\n // Arrange\n CommitStructure commit = getSampleCommit();\n String commitID = commit.getCommitID();\n // Act\n mysqlDatabase.insertCommitToDatabase(commit);\n CommitStructure commits = mysqlDatabase.selectSpecificRow(commitID);\n // Assert\n assertEquals(commits.getCommitID() , commitID);\n }", "@GET\n @Path(\"all\")\n @Produces(MediaType.TEXT_PLAIN)\n public Response getCommitResult() {\n JSONArray array = new JSONArray();\n JSONObject result = new JSONObject();\n\n List<User> users = userDb.listAllUsers();\n for (User user : users) {\n JSONObject ob = db.getCommitResultByStudent(user.getId());\n array.put(ob);\n }\n result.put(\"result\", array); \n\n return Response.ok().entity(result.toString()).build();\n }", "public Commit getCommitById(int id) {\r\n for (Commit c : this.commmit) {\r\n if (c.getId() == id) {\r\n return c;\r\n }\r\n }\r\n return null;\r\n }", "int getHjOpId();", "long getCommitID() {\r\n return commit_id;\r\n }", "@NonNull\n public String getCommitId() {\n return this.commitId;\n }", "public static void main(String[] args) {\nSystem.out.println(\"nagarjuna is .................\");\r\n//second commit\r\nSystem.out.println(\"vinay is ..............................\");\r\n//third commit\r\nSystem.out.println(\"vinay is a ?\");\r\n\t}", "@POST\n @Path(\"update\")\n @Consumes(MediaType.APPLICATION_FORM_URLENCODED)\n public Response updateCommitResult(@FormParam(\"user\") String userName,\n @FormParam(\"proName\") String proName) {\n JSONObject ob = new JSONObject();\n if (!userName.equals(\"root\")) {\n\n JenkinsService jenkinsService = new JenkinsService();\n StudentDashChoosePro stuDashChoPro = new StudentDashChoosePro();\n\n int lastCommitNum = jenkinsService.getProjectCommitCount(proName, userName);\n int commitCount = lastCommitNum - 1;\n String proType = projectDb.getAssignmentType(proName);\n String buildApiJson = stuDashChoPro.getBuildApiJson(lastCommitNum, userName, proName);\n String strDate = stuDashChoPro.getCommitTime(buildApiJson);\n String[] dates = strDate.split(\" \");\n String status = stuDashChoPro.getCommitStatus(lastCommitNum, userName, proName, buildApiJson,\n proType);\n int id = userDb.getUser(userName).getId();\n\n boolean check = db.checkJenkinsJobTimestamp(id, proName);\n if (check) {\n db.updateJenkinsCommitCount(id, proName, commitCount, status);\n\n } else {\n db.insertJenkinsCommitCount(id, proName, commitCount, status);\n }\n db.updateJenkinsJobTimestamp(id, proName, strDate);\n\n boolean inDb = commitRecordDb.checkRecord(id, proName, dates[0], dates[1]);\n if (inDb) {\n commitRecordDb.updateRecordStatus(id, proName, status, dates[0], dates[1]);\n } else {\n commitRecordDb.insertCommitRecord(id, proName, status, dates[0], dates[1]);\n }\n\n updateCommitRecordState();\n\n ob.put(\"userName\", userName);\n ob.put(\"proName\", proName);\n ob.put(\"commitCount\", commitCount);\n ob.put(\"dates\", dates[0]);\n ob.put(\"dates1\", dates[1]);\n ob.put(\"status\", status);\n }\n\n return Response.ok().entity(ob.toString()).build();\n }", "public void getSingleTransQuery(HashMap<String, String> params) {\n\t\tID = params.get(\"transactionID\");\n\t\tREPORT_START = params.get(\"reportStart\");\n\t\tREPORT_END = params.get(\"reportEnd\");\n\t\tEXCLUDE_ERRORS = params.get(\"excludeErrors\");\n\t\tAPI = \"stq\";\n\t}", "private void processCommit() throws HsqlException {\n tokenizer.isGetThis(Token.T_WORK);\n session.commit();\n }", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "com.rpg.framework.database.Protocol.ResponseCode getResult();", "@SuppressWarnings(\"unchecked\")\n\t@GET\n @Path(\"get/{hash}\")\n @Produces(\"application/json\")\n public Response getIt(@PathParam(\"hash\") String curHash) {\n \t\n \tJSONObject resp = new JSONObject();\n \t\n \tOnlineStatus on = OnlineStatus.getInstance(); \n \t\n \t// Find SA\n \tint saID = SADAO.hashToId(curHash);\n \t\n \tif (saID == 0) {\n \t\tresp.put(\"Error\", \"Hash not in database\");\n \t\treturn Response.status(200).entity(resp.toJSONString()).build();\n \t}\n \t\n \t//if SA is set for exit\n \tif(on.isForExit(curHash)){\n \t\tresp.put(\"Signal\" , \"Kill\");\n \t\ton.exited(curHash);\n \t\t\n \t\treturn Response.status(200).entity(resp.toJSONString()).build();\n \t}\n \t\n \t// Update SAs Online Status\n \ton.update(curHash);\n \t\n \t// Find jobs for SA\n \tLinkedList<Job> jobsToSendToSa = JobDAO.getAllSAJobs(saID);\n \t\n \tif(jobsToSendToSa.size() > 0){\n \t\tSystem.out.println(\"Sending to SA \"+curHash+\" the following job(s) :\");\n \t}\n \tfor (Job j : jobsToSendToSa) {\n \t\tj.print();\n \t}\n \t\n \t// Create JSON and Sent\n \tObjectMapper mapper = new ObjectMapper();\n \t\n \ttry{\n \t\t\n \t\tString jsonInString = mapper.writeValueAsString(jobsToSendToSa);\n \t\t\n \t\treturn Response.status(200).entity(jsonInString).build();\n \t\n \t}catch (JsonProcessingException ex){\n \t\t\n \t\tSystem.out.println(ex.getMessage());\n \t\t\n \t\tresp.put(\"Error\", ex.getMessage());\n \t\treturn Response.status(200).entity(resp.toJSONString()).build();\n \t}\n }", "public Hash getHash(String hash) {\n Hash gothash = null;\n Session session = sessionFactory.openSession();\n // Try to return the user by the given nickname\n try {\n session.beginTransaction();\n\n Criteria criteria = session.createCriteria(Hash.class);\n criteria.add(Restrictions.eq(\"hashstring\", hash));\n \n List<Hash> hashlist = (List<Hash>) criteria.list();\n \n session.getTransaction().commit();\n session.flush();\n \n gothash = hashlist.get(0);\n } \n catch (HibernateException e) { e.printStackTrace(); return null; } \n finally { session.close(); }\n // Return userID if seted\n return gothash;\n }", "public Object executeQueryOneResult(String hql, Map params) throws RepositoryException {\n\t\tObject retorno = DatanucleusCRUDUtils.executeQueryOneResult(hql, params); \n\t\tparams.clear();\n\t\treturn retorno;\n\t}", "public int getProjectCommitRecordId(int pgId, int commitNumber) {\n String query = \"SELECT id FROM Project_Commit_Record where pgId = ? and commitNumber = ?\";\n int id = 0;\n try (Connection conn = database.getConnection();\n PreparedStatement preStmt = conn.prepareStatement(query)) {\n preStmt.setInt(1, pgId);\n preStmt.setInt(2, commitNumber);\n\n try (ResultSet rs = preStmt.executeQuery();) {\n if (rs.next()) {\n id = rs.getInt(\"id\");\n }\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return id;\n }", "Commit getLastCommitDetails(Object requestBody) throws VersionControlException;", "static int getHash(int par0)\n {\n return computeHash(par0);\n }", "@Override\n\tpublic JSONObject getById(String wt_id) {\n\t\tJSONObject result = new JSONObject();\n\t\tMainUtility mainUtil = new MainUtility();\n\t\tString queryForWrittingTest = \"SELECT `wt_title`, `wt_content` FROM `writing_test` WHERE `wt_id` = ?\";\n\t\tString queryForTopic = \"SELECT wtt.wtt_id, wtt.wtt_content, user.full_name FROM `writing_test` AS wt \"\n\t\t\t\t+ \"LEFT JOIN writing_test_topic AS wtt ON (wt.wt_id = wtt.wt_id) \"\n\t\t\t\t+ \"LEFT JOIN crm_user AS user ON (wtt.created_by = user.user_id) WHERE wt.wt_id = ?\";\n\t\ttry {\n\t\t\tMap<String, Object> test = this.jdbcTemplate.queryForMap(queryForWrittingTest, new Object[] {wt_id});\n\t\t\tList<Map<String, Object>> lstTopic = this.jdbcTemplate.queryForList(queryForTopic, new Object[] {wt_id});\n\t\t\ttest.put(\"lstTopic\", lstTopic);\n\t\t\tresult.put(\"data\", test);\n\t\t\tresult.put(\"success\", true);\n\t\t} catch (Exception e) {\n\t\t\tresult.put(\"success\", false);\n\t\t\tresult.put(\"err\", e.getMessage());\n\t\t\tresult.put(\"msg\", \"Lấy bài kiếm tra thất bại\");\n\t\t}\n\t\treturn result;\n\t}", "public static String getHeadCommitId(@NotNull JSONObject jsonObject) {\n return jsonObject.getJSONObject(\"head_commit\").get(\"id\").toString();\n }", "public String findStatement(String id, int no) {\n\t\tMap<String, Object> map = new HashMap<>();\n\t\t\n\t\tmap.put(\"db\", id);\n\t\tmap.put(\"no\", no);\n\t\t\n\t\treturn sqlSession.selectOne(\"order.findStatement\", map);\n\t}", "public void handle(PBFTCommit c){\n Object lpid = getLocalServerID();\n long now = getClockValue();\n\n JDSUtility.debug(\"[handle(commit)] s\" + lpid + \", at time \" + now + \", received \" + c);\n\n /* If I received a invalid prepare then I'll discard it. */\n if(!(c != null && c.getSequenceNumber() != null && c.getViewNumber() != null && c.getReplicaID() != null)){\n JDSUtility.debug(\"[handle(commit)] s\" + lpid + \", at time \" + now + \", discarded \" + c + \" because it's a malformed commit.\");\n return;\n }\n\n /* If the received commit wasn't sent by a group member then I'll discard it. */\n if(!wasSentByAGroupMember(c)){\n JDSUtility.debug(\"[handle(commit)] s\" + lpid + \", at time \" + now + \", discarded \" + c + \" because it wasn't sent by group member.\");\n return;\n }\n\n long lcwm = getLCWM();\n long hcwm = getHCWM();\n long seqn = c.getSequenceNumber();\n\n /*If seqn(c) not in (lcwm, hcwm] then c will be discarded. */\n if(!(lcwm < seqn && seqn <= hcwm)){\n JDSUtility.debug(\"[handle(commit)] s\" + lpid + \", at time \" + now + \", discarded \" + c + \" because its SEQN{\" + seqn +\"} not in (\" + lcwm + \"; \" + hcwm + \"].\");\n return;\n }\n\n int itView = c.getViewNumber();\n int myView = getCurrentViewNumber();\n\n /* If the prepare was sent in my current view then I'll check and process it.*/\n if(itView > myView){\n JDSUtility.debug(\"[handle(commit)] s\" + lpid + \", at time \" + now + \", discarded \" + c + \" because it wasn't sent in CURR-VIEW{\" + myView + \"}\");\n return;\n }\n \n if(!getCommitInfo().put(c)){\n JDSUtility.debug(\"[handle(commit)] s\" + lpid + \", at time \" + now + \", discarded \" + c + \" because it is a duplicaded commit SEQN{\" + seqn + \"}\");\n return;\n }\n\n if(itView != myView){\n JDSUtility.debug(\"[handle(commit)] s\" + lpid + \", at time \" + now + \", cann't proceed because \" + c + \" in CURR-VIEW{\" + myView + \"}\");\n return;\n }\n\n int f = getServiceBFTResilience();\n\n if(getCommitInfo().count(myView, seqn) < (2 * f + 1)){\n return;\n }\n \n PBFTPrepare p = getPrepareInfo().get(myView, seqn, lpid);\n\n if(p != null && getCommitInfo().get(myView, seqn, lpid) == null){\n getRequestInfo().assign(seqn, RequestState.COMMITTED);\n emitCommit(myView, seqn);\n return;\n }\n\n tryExecuteRequests();\n \n }", "public java.util.Collection<pl.wcislo.sbql4j.java.model.runtime.Struct> executeQuery(\n final ObjectContainerBase ocb, final Transaction t) {\n final LocalTransaction transLocal = (LocalTransaction) t;\n final java.util.Collection<kor.model.Student> _ident_Student = new java.util.ArrayList<kor.model.Student>();\n ClassMetadata _classMeta5 = ocb.classCollection()\n .getClassMetadata(\"kor.model.Student\");\n long[] _ids5 = _classMeta5.getIDs(transLocal);\n\n for (long _id5 : _ids5) {\n LazyObjectReference _ref5 = transLocal.lazyReferenceFor((int) _id5);\n _ident_Student.add((kor.model.Student) _ref5.getObject());\n }\n\n java.util.Collection<pl.wcislo.sbql4j.java.model.runtime.Struct> _dotResult3 =\n new java.util.ArrayList<pl.wcislo.sbql4j.java.model.runtime.Struct>();\n int _dotIndex3 = 0;\n\n for (kor.model.Student _dotEl3 : _ident_Student) {\n if (_dotEl3 == null) {\n continue;\n }\n\n if (_dotEl3 != null) {\n ocb.activate(_dotEl3, 2);\n }\n\n java.lang.String _mth_getFnameResult = _dotEl3.getFname();\n\n if (_mth_getFnameResult != null) {\n ocb.activate(_mth_getFnameResult, 1);\n }\n\n java.lang.String _mth_getSnameResult = _dotEl3.getSname();\n\n if (_mth_getSnameResult != null) {\n ocb.activate(_mth_getSnameResult, 1);\n }\n\n pl.wcislo.sbql4j.java.model.runtime.Struct _commaResult = OperatorUtils.cartesianProductSS(_mth_getFnameResult,\n _mth_getSnameResult, \"\", \"\");\n kor.model.Address _mth_getAddressResult = _dotEl3.getAddress();\n\n if (_mth_getAddressResult != null) {\n ocb.activate(_mth_getAddressResult, 1);\n }\n\n kor.model.Address _dotEl = _mth_getAddressResult;\n\n if (_mth_getAddressResult != null) {\n ocb.activate(_mth_getAddressResult, 2);\n }\n\n java.lang.String _mth_getStreetResult = _dotEl.getStreet();\n\n if (_mth_getStreetResult != null) {\n ocb.activate(_mth_getStreetResult, 1);\n }\n\n pl.wcislo.sbql4j.java.model.runtime.Struct _commaResult1 = OperatorUtils.cartesianProductSS(_commaResult,\n _mth_getStreetResult, \"\", \"\");\n kor.model.Address _mth_getAddressResult1 = _dotEl3.getAddress();\n\n if (_mth_getAddressResult1 != null) {\n ocb.activate(_mth_getAddressResult1, 1);\n }\n\n kor.model.Address _dotEl1 = _mth_getAddressResult1;\n\n if (_mth_getAddressResult1 != null) {\n ocb.activate(_mth_getAddressResult1, 2);\n }\n\n java.lang.String _mth_getCityResult = _dotEl1.getCity();\n\n if (_mth_getCityResult != null) {\n ocb.activate(_mth_getCityResult, 1);\n }\n\n pl.wcislo.sbql4j.java.model.runtime.Struct _commaResult2 = OperatorUtils.cartesianProductSS(_commaResult1,\n _mth_getCityResult, \"\", \"\");\n kor.model.Address _mth_getAddressResult2 = _dotEl3.getAddress();\n\n if (_mth_getAddressResult2 != null) {\n ocb.activate(_mth_getAddressResult2, 1);\n }\n\n kor.model.Address _dotEl2 = _mth_getAddressResult2;\n\n if (_mth_getAddressResult2 != null) {\n ocb.activate(_mth_getAddressResult2, 2);\n }\n\n java.lang.String _mth_getZipResult = _dotEl2.getZip();\n\n if (_mth_getZipResult != null) {\n ocb.activate(_mth_getZipResult, 1);\n }\n\n pl.wcislo.sbql4j.java.model.runtime.Struct _commaResult3 = OperatorUtils.cartesianProductSS(_commaResult2,\n _mth_getZipResult, \"\", \"\");\n\n if (_commaResult3 != null) {\n ocb.activate(_commaResult3, 2);\n }\n\n _dotResult3.add(_commaResult3);\n _dotIndex3++;\n }\n\n java.util.Collection<pl.wcislo.sbql4j.java.model.runtime.Struct> _groupAsResultstuds =\n _dotResult3;\n pl.wcislo.sbql4j.db4o.utils.DerefUtils.activateResult(_groupAsResultstuds,\n ocb);\n\n return _groupAsResultstuds;\n }", "public Info_laboral findByID(int cod){\n ConexionBD con = new ConexionBD();\n Connection c = con.conOracle();\n Info_laboral IL = new Info_laboral();\n try{\n CallableStatement cs = c.prepareCall(\"{? = call F_BUSNOMINFO(?)}\");\n cs.registerOutParameter(1, Types.VARCHAR);\n cs.setInt(2, cod);\n cs.execute();\n //IL.setId(cod);\n //IL.setJefe(cs.getString(1));\n System.out.println(cs.getString(1));\n con.CerrarCon();\n return IL;\n }catch(SQLException e){\n System.out.println(\"erorrrr findbyid \"+e);\n con.CerrarCon();\n return null;\n }\n \n }", "public int getCommitStatusbyPgid(int pgid) {\n int status = 0;\n String sql = \"SELECT status FROM Project_Commit_Record WHERE pgId=?\";\n try (Connection conn = database.getConnection();\n PreparedStatement preStmt = conn.prepareStatement(sql)) {\n preStmt.setInt(1, pgid);\n try (ResultSet rs = preStmt.executeQuery()) {\n while (rs.next()) {\n status = rs.getInt(\"status\");\n }\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return status;\n }", "java.lang.String getResult();", "public static String getTeamTaskDue(Integer pmid) {\n Session session = ConnectionFactory.getInstance().getSession();\n String result = \"\";\n\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd \");\n Date date = new Date();\n String ndt = dateFormat.format(date);\n try {\n PreparedStatement st = session.connection().prepareStatement(\"SELECT p.number,l.taskname,s.language as sLang,t.language as tLang,l.dueDatedate, r.firstName,r.lastName,r.companyname,c.company_code FROM project p INNER JOIN sourcedoc s ON p.id_project=s.id_project \"\n + \"INNER JOIN targetdoc t ON s.id_sourcedoc=t.id_sourcedoc \"\n + \"INNER JOIN lintask l ON l.ID_TargetDoc=t.ID_TargetDoc \"\n + \"INNER JOIN resource r ON l.personname=r.id_resource \"\n + \"INNER JOIN client_information c ON p.id_client=c.id_client \"\n + \"WHERE DATEDIFF ('\" + ndt + \"', l.dueDatedate)<0 AND l.receiveddatedate IS NULL AND p.pm_id=\" + pmid + \" AND p.status='active' \"\n + \"UNION \"\n + \"SELECT p.number,l.taskname,s.language as sLang,t.language as tLang,l.dueDatedate, r.firstName,r.lastName,r.companyname,c.company_code FROM project p INNER JOIN sourcedoc s ON p.id_project=s.id_project \"\n + \"INNER JOIN targetdoc t ON s.id_sourcedoc=t.id_sourcedoc \"\n + \"INNER JOIN dtptask l ON l.ID_TargetDoc=t.ID_TargetDoc \"\n + \"INNER JOIN resource r ON l.personname=r.id_resource \"\n + \"INNER JOIN client_information c ON p.id_client=c.id_client \"\n + \"WHERE DATEDIFF ('\" + ndt + \"', l.dueDatedate)<0 AND l.receiveddatedate IS NULL AND p.pm_id=\" + pmid + \" AND p.status='active' \"\n + \"UNION \"\n + \"SELECT p.number,l.taskname,s.language as sLang,t.language as tLang,l.dueDatedate, r.firstName,r.lastName,r.companyname,c.company_code FROM project p INNER JOIN sourcedoc s ON p.id_project=s.id_project \"\n + \"INNER JOIN targetdoc t ON s.id_sourcedoc=t.id_sourcedoc \"\n + \"INNER JOIN engtask l ON l.ID_TargetDoc=t.ID_TargetDoc \"\n + \"INNER JOIN resource r ON l.personname=r.id_resource \"\n + \"INNER JOIN client_information c ON p.id_client=c.id_client \"\n + \"WHERE DATEDIFF ('\" + ndt + \"', l.dueDatedate)<0 AND l.receiveddatedate IS NULL AND p.pm_id=\" + pmid + \" AND p.status='active' \"\n + \"UNION \"\n + \"SELECT p.number,l.taskname,s.language as sLang,t.language as tLang,l.dueDatedate, r.firstName,r.lastName,r.companyname,c.company_code FROM project p INNER JOIN sourcedoc s ON p.id_project=s.id_project \"\n + \"INNER JOIN targetdoc t ON s.id_sourcedoc=t.id_sourcedoc \"\n + \"INNER JOIN othtask l ON l.ID_TargetDoc=t.ID_TargetDoc \"\n + \"INNER JOIN resource r ON l.personname=r.id_resource \"\n + \"INNER JOIN client_information c ON p.id_client=c.id_client \"\n + \"WHERE DATEDIFF ('\" + ndt + \"', l.dueDatedate)<0 AND l.receiveddatedate IS NULL AND p.pm_id=\" + pmid + \" AND p.status='active'\");\n\n ResultSet rs = st.executeQuery();\n \n Integer count=1;\n while (rs.next()) {\n if(count==1) result = \"<fieldset><legend>Due Tasks</legend><div align='center'><table class='tableHighlight' width='90%' align='center' ><tr><td>&nbsp;</td></tr>\";\n// //System.out.println(\"AAAAAANNNNNAAAAAA\" + rs.getString(\"sLang\"));\n// //System.out.println(\"ddddddddddddddddd\" + rs.getString(\"taskname\"));\n// //System.out.println(\"qqqqqqqqqqqqqqqqq\" + rs.getString(\"tLang\"));\n String resource = \"\";\n if (rs.getString(\"firstName\").equals(\"\")) {\n resource = rs.getString(\"companyname\");\n } else {\n resource = rs.getString(\"firstName\") + \" \" + rs.getString(\"lastName\");\n }\n result += \"<tr>\";\n result += \"<td class=tableHeadingData><center>\"+count++ +\": \" + rs.getString(\"taskname\") + \" ( \" + rs.getString(\"sLang\") + \" - \" + rs.getString(\"tLang\") + \") of Project Number -<b><u>\" + rs.getInt(\"number\") +rs.getString(\"company_code\")+ \"</u></b>, <br> is due for <b>\" + resource + \"</b></center></td>\";\n\n result += \"</tr><tr><td>&nbsp;</td></tr>\";\n\n }\n if (count > 1) {\n result += \"</table></div></fieldset>\";\n }\n st.close();\n } catch (Exception e) {\n //System.out.println(\"errrrrrrrrrrrrrror\" + e.getMessage());\n } finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n //System.out.println(\"Hibernate Exception:\" + e);\n throw new RuntimeException(e);\n }\n\n }\n }\n return result;\n\n }", "public Object[] getCbo_SysCd(String UserId,String SecuYn,String WkSys) throws SQLException, Exception {\r\n\t\tConnection conn = null;\r\n\t\tPreparedStatement pstmt = null;\r\n\t\tResultSet rs = null;\r\n\t\tStringBuffer strQuery = new StringBuffer();\r\n\t\tArrayList<Hashtable<String, String>> rsval = new ArrayList<Hashtable<String, String>>();\r\n\t\tHashtable<String, String>\t\t\t rst = null;\r\n\t\tObject[]\t\t rtObj\t\t = null;\r\n\r\n\t\tConnectionContext connectionContext = new ConnectionResource();\r\n\t\ttry {\r\n\t\t\tconn = connectionContext.getConnection();\r\n\r\n\t\t\tstrQuery.setLength(0);\r\n\t\t\tstrQuery.append(\"select a.cm_syscd,a.cm_sysmsg,a.cm_sysgb \\n\");\r\n\t if (!SecuYn.equals(\"Y\") && (WkSys == null || WkSys == \"\")){\r\n\t \tstrQuery.append(\"from cmm0044 b, cmm0030 a where \\n\");\r\n\t \tstrQuery.append(\"b.cm_userid=? and \\n\");//UserId\r\n\t \tstrQuery.append(\"a.cm_syscd=b.cm_syscd and \\n\");\r\n\t \tstrQuery.append(\"b.cm_closedt is null and \\n\");\r\n\t //}else if (!Sv_Admin.toUpperCase().equals(\"Y\") && ViewFg.equals(\"true\")){\r\n\t }else if (WkSys != null && WkSys != \"\"){\r\n\t \tstrQuery.append(\"from cmm0030 a where \\n\");\r\n\t \tstrQuery.append(\" a.cm_syscd=? and \\n\");//WkSys\r\n\t }else{\r\n\t \tstrQuery.append(\"from cmm0030 a where \\n\");\r\n\t }\r\n\t strQuery.append(\"a.cm_closedt is null and substr(a.cm_sysinfo,1,1)='0' \\n\");\r\n\t strQuery.append(\"group by a.cm_syscd,a.cm_sysmsg,a.cm_sysgb \\n\");\r\n\t strQuery.append(\"order by a.cm_sysmsg,a.cm_syscd,a.cm_sysgb \\n\");\r\n\r\n\t pstmt = conn.prepareStatement(strQuery.toString());\r\n\t //pstmt = new LoggableStatement(conn,strQuery.toString());\r\n\r\n\t\t int Cnt = 0;\r\n\t if (!SecuYn.equals(\"Y\") && (WkSys == null || WkSys == \"\")){\r\n\t \tpstmt.setString(++Cnt, UserId);\r\n\t }else if (WkSys != null && WkSys != \"\"){\r\n\t \tpstmt.setString(++Cnt, WkSys);\r\n\t }\r\n\r\n\t //ecamsLogger.debug(((LoggableStatement)pstmt).getQueryString());\r\n\t\t rs = pstmt.executeQuery();\r\n\r\n\t\t\twhile (rs.next()){\r\n\t\t\t\trst = new Hashtable<String, String>();\r\n\t\t\t\trst.put(\"cm_sysmsg\", rs.getString(\"cm_sysmsg\"));\r\n\t\t\t\trst.put(\"cm_sysgb\", rs.getString(\"cm_sysgb\"));\r\n\t\t\t\trst.put(\"cm_syscd\", rs.getString(\"cm_syscd\"));\r\n\t \trsval.add(rst);\r\n\t \trst = null;\r\n\t\t\t}\r\n\t\t\trs.close();\r\n\t\t\tpstmt.close();\r\n\t\t\tconn.close();\r\n\t\t\trs = null;\r\n\t\t\tpstmt = null;\r\n\t\t\tconn = null;\r\n\r\n\t\t\trtObj = rsval.toArray();\r\n\t\t\trsval.clear();\r\n\t\t\trsval = null;\r\n\r\n\t\t\treturn rtObj;\r\n\r\n\t\t} catch (SQLException sqlexception) {\r\n\t\t\tif (conn != null){\r\n\t\t\t\tconn.close();conn = null;\r\n\t\t\t}\r\n\t\t\tsqlexception.printStackTrace();\r\n\t\t\tthrow sqlexception;\r\n\t\t} catch (Exception exception) {\r\n\t\t\tif (conn != null){\r\n\t\t\t\tconn.close();conn = null;\r\n\t\t\t}\r\n\t\t\texception.printStackTrace();\r\n\t\t\tthrow exception;\r\n\t\t}finally{\r\n\t\t\tif (strQuery != null)\tstrQuery = null;\r\n\t\t\tif (rtObj != null)\trtObj = null;\r\n\t\t\tif (rs != null) try{rs.close();}catch (Exception ex){ex.printStackTrace();}\r\n\t\t\tif (pstmt != null) try{pstmt.close();}catch (Exception ex2){ex2.printStackTrace();}\r\n\t\t\tif (conn != null){\r\n\t\t\t\ttry{\r\n\t\t\t\t\tConnectionResource.release(conn);\r\n\t\t\t\t}catch(Exception ex3){\r\n\t\t\t\t\tex3.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public Transaction getTransaction(NulsDigestData txHash) {\n return null;\n }", "@Override\n public GetCommitResult getCommit(GetCommitRequest request) {\n request = beforeClientExecution(request);\n return executeGetCommit(request);\n }", "SysCode selectByPrimaryKey(String id);", "public String getRemoteBlock(String hash){\n getBlock = true;\n getBlockHash = hash;\n try{\n synchronized(this){\n this.wait();\n }\n } catch(InterruptedException e){\n // nothing happens here\n }\n getBlock = false;\n if(remoteBlocks.containsKey(hash))\n return remoteBlocks.get(hash);\n else{\n return \"notfound\";\n }\n }", "@Override\n\tpublic List<CrmReturnedGoodsDtoResult> queryReturnGoodsWorkOrderResult(\n\t\t\tCrmReturnedGoodsDtoResult vo) {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic boolean addStu_result(Object stu_result) {\n\t\tConnection conn = null;\r\n\t\tPreparedStatement stmt = null;\r\n\t\tStu_result Stu_result1 = (Stu_result) stu_result;\r\n\t\tint count;\r\n\t\ttry {\r\n\t\t\tconn = DBHelper.getConnection();\r\n\t\t\tString sql = \"insert into Stu_result(sid,kj_id,Stu_dxt_r,Stu_dxt_c,Stu_dxts_r,Stu_dxts_c,Stu_pdt_r,Stu_pdt_c) values(?,?,?,?,?,?,?,?);\"; // SQL语句\r\n\t\t\tstmt = conn.prepareStatement(sql);\r\n\t\t\tstmt.setInt(1, Stu_result1.getSid());\r\n\t\t\tstmt.setInt(2, Stu_result1.getKj_id());\r\n\t\t\tstmt.setString(3, Stu_result1.getStu_dxt_r());\r\n\t\t\tstmt.setString(4, Stu_result1.getStu_dxt_c());\r\n\t\t\tstmt.setString(5, Stu_result1.getStu_dxts_r());\r\n\t\t\tstmt.setString(6, Stu_result1.getStu_dxts_c());\r\n\t\t\tstmt.setString(7, Stu_result1.getStu_pdt_r());\r\n\t\t\tstmt.setString(8, Stu_result1.getStu_pdt_c());\r\n\t\t\tcount = stmt.executeUpdate();\r\n\t\t\tSystem.out.println(count + \"学生答案插入记录\");\r\n\t\t\tif (count == 1) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else\r\n\t\t\t\treturn false;\r\n\t\t} catch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t\treturn false;\r\n\t\t} finally {\r\n\t\t\t// 释放语句对象\r\n\t\t\tif (stmt != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tstmt.close();\r\n\t\t\t\t\tstmt = null;\r\n\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\tex.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\r\n\t@Transactional\r\n\tpublic String examSubjectStudentResult(int ExamId, int SubdivId) {\n\t\tStringBuffer sb=new StringBuffer(); \r\n\t\t Query query=currentSession().createQuery(\"from ExamSubjectStudentCompositTable essct LEFT JOIN Result r on essct.id=r.examSubjectStudentCompositTable.id LEFT JOIN Student s on essct.student.id=s.id where essct.exam.id= :ExamId and essct.subjectDivComposit.id = :subDivId and essct.student.id is not null\");\r\n\t\t query.setParameter(\"ExamId\", ExamId);\r\n\t\t query.setParameter(\"subDivId\", SubdivId);\r\n\t\t \r\n List lst = query.list();\r\n sb.append(\"[\");\r\n // System.out.println(\"\" + lst.size());\r\n //System.out.println(\"gooing to display result\");\r\n for (int i = 0; i < lst.size(); i++) {\r\n \t sb.append(\"{\");\r\n \t sb.append(\"\\\"examSubjectStudentCompositTable\\\":\"+gson.toJson(((Object[]) lst.get(i))[0]));\r\n \t sb.append(\",\\\"result\\\":\"+gson.toJson(((Object[]) lst.get(i))[1]));\r\n \t sb.append(\",\\\"student\\\":\"+gson.toJson(((Object[]) lst.get(i))[2]));\r\n //System.out.println(\"first obj\"+((Object[]) lst.get(i))[0]); //account bean, actually this is in reverse order - so this is user bean\r\n // System.out.println(\"second obj\"+((Object[]) lst.get(i))[1]); \r\n // System.out.println(\"third obj\"+((Object[]) lst.get(i))[2]); //user bean & this account bean\r\n sb.append(\"},\");\r\n }\r\n sb.setLength(sb.length() - 1);\r\n \r\n sb.append(\"]\");\r\n return sb.toString();\r\n\t\t\r\n\t}", "public static String supvUpdate(int supvid) { //taskid and update number\n int failureid = -1;\n try {\n Statement st = conn.createStatement();\n //select update numbers for tasks that this supervisor supervises\n String getUpdate = \"select otherstaskupdate from users where userid = \" + supvid;\n ResultSet updateResult = st.executeQuery(getUpdate);\n if(updateResult.next()) {\n Long[] updateNums = (Long[]) updateResult.getArray(1).getArray();\n updateResult.close();\n failureid = -2;\n JSONArray updates = new JSONArray();\n //for each update number get taskid in indvprogressupdate\n for (Long num : updateNums) {\n PreparedStatement ps = conn.prepareStatement(\"select * from progressupdate where updatenum = \" + num);\n ResultSet taskUpdates = ps.executeQuery();\n failureid = -3;\n taskUpdates.next();\n failureid = -6;\n String image = taskUpdates.getString(4);\n failureid = -7;\n int taskid = Integer.parseInt(taskUpdates.getString(2));\n int userId = Integer.parseInt(taskUpdates.getString(5));\n failureid = -4;\n taskUpdates.close();\n JSONObject update = new JSONObject();\n update.put(\"TaskID\", taskid);\n update.put(\"UpdateNumber\", num);\n update.put(\"userId\", userId);\n update.put(\"image\", image);\n updates.put(update);\n ps.close();\n failureid = -5;\n }\n st.close();\n return updates.toString();\n }else {\n return \"failure\";\n }\n } catch (SQLException e) {\n return \"\" + failureid;\n }\n }", "@Override\r\n\tpublic ExecuteTask getById(int id) {\n\t\tString sql = \"SELECT et_id id,et_member_id memberId,et_task_id taskId,et_comments comments FROM executetask \"\r\n\t\t\t\t+ \"WHERE et_id = ?\";\r\n\t\treturn get(sql,id);\r\n\t}", "private Commit findCommit(String branchName) {\n File givenBranch = new File(Main.ALL_BRANCHES, branchName);\n if (givenBranch.exists()) {\n String commitID = Utils.readObject(givenBranch, String.class);\n File theCommit = new File(Main.ALL_COMMITS, commitID);\n Commit cmt = Utils.readObject(theCommit, Commit.class);\n return cmt;\n } else {\n return null;\n }\n }", "@Override\n\tpublic Student selectStudentById(int stuId) {\n\t\tString sql=\"SELECT * FROM tb_student where stu_id=?\";\n\t\tObject[] stuid={stuId};\n\t\tList<Student> stu=ORMUtil.ormutil().selectList(sql, stuid, Student.class);\n\t\treturn stu.size()>0?stu.get(0):null;\n\t}", "org.apache.drill.exec.proto.UserBitShared.QueryId getQueryId();", "org.apache.drill.exec.proto.UserBitShared.QueryId getQueryId();", "public void getSelectedGame(int bin){\r\n try{\r\n c = DbConnect.getConnection();\r\n pstmt = c.prepareStatement(\"Select serial FROM tickets WHERE Bin = ?\");\r\n pstmt.setInt(1,bin);\r\n rs = pstmt.executeQuery();\r\n rs.next();\r\n }catch (Exception e) { e.printStackTrace(); }\r\n}", "@Override\n\tpublic DatabaseObject selectByID(DatabaseHandler db) throws Exception {\n\t\treturn db.getWorkById(id);\n\t\t\n\t}", "@Override\n\tpublic StageOrder getOrderCheck(String sgoodsId, Integer userinfoId) {\n\t\tList<StageOrder> list=stageOrderDao.getOrderCheck(sgoodsId,userinfoId);\n\t\tif(list!=null&&list.size()>0)\n\t\t{\n\t\t\treturn list.get(0);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}", "ChangeData getChangeData(Project.NameKey projectName, Change.Id changeId);", "private synchronized String processGet(String query) {\r\n\t\tString[] valuesCommand = query.split(\" \");\r\n\t\tif ( valuesCommand.length != 2 )\r\n\t\t\treturn \"ERROR Bad syntaxe command GET - Usage : GET id\";\r\n\t\tString id = valuesCommand[1];\r\n\t\tif ( !this.bank.existAccount(id) ) {\r\n\t\t\treturn \"ERROR Account doesn't exist\";\r\n\t\t}\r\n\t\tdouble solde = this.bank.getSolde(id);\r\n\t\treturn \"SOLDE \" + solde + \" \" + this.bank.getLastOperation(id);\r\n\t}", "HelpInfo selectByPrimaryKey(Integer hId);", "@Override\n public int hashCode() {\n return this.commit.getId().hashCode();\n }", "public int getProjectCommitCount(int pgId) {\n int commitNumber = 0;\n String sql = \"SELECT commitNumber from Project_Commit_Record a where (a.commitNumber = \"\n + \"(SELECT max(commitNumber) FROM Project_Commit_Record WHERE auId = ?));\";\n try (Connection conn = database.getConnection();\n PreparedStatement preStmt = conn.prepareStatement(sql)) {\n preStmt.setInt(1, pgId);\n try (ResultSet rs = preStmt.executeQuery()) {\n while (rs.next()) {\n commitNumber = rs.getInt(\"commitNumber\");\n }\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return commitNumber;\n }", "public void queryTransactionDetail(){\n System.out.println(\"-----find transaction detail by condition-----\");\n System.out.println(\"--press enter to skip the input--\");\n String sql = \"select * from TransactionContains join Merchandise on TransactionContains.ProductID = Merchandise.ProductID where TransactionID=\";\n System.out.print(\"TransactionID: \");\n String unuse=scanner.nextLine();\n String id=scanner.nextLine();\n sql+=id;\n try {\n //System.out.println(sql);\n result = statement.executeQuery(sql);\n int cnt=0;\n while (result.next()) {\n cnt++;\n System.out.println(\"\\n=== No.\"+cnt+\" ===\");\n System.out.println(\"transaction id: \"+result.getInt(\"TransactionID\"));\n System.out.println(\"product id: \"+result.getInt(\"ProductID\"));\n System.out.println(\"product name: \"+result.getString(\"ProductName\"));\n System.out.println(\"actual price: \"+result.getDouble(\"ActualPrice\"));\n }\n System.out.println(\"Total rows: \"+cnt);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n }", "void commit(String tpcid);", "Transaction getTransctionByTxId(String txId);", "Transaction get(String id) throws Exception;", "public Users get(String id, String hash) {\n\tthis.createConnection();\n\n\ttry {\n Connection con = this.getCon();\n\t\tPreparedStatement stmnt = con.prepareStatement(this.getAllQuery() + \" where username=? AND password=?;\");\n stmnt.setString(1, id);\n stmnt.setString(2, hash);\n ResultSet rs = stmnt.executeQuery();\n return get(rs);\n } catch (SQLException e) {\n System.out.println(\"SQLException: \" + e.getErrorCode() + \":\" + e.getMessage());\n return new Users();\n }\n }", "String getCommitMessageForLine(IPath filePath, int line);", "public Commit commitFullInfo(ArrayList<Commit> commitList) {\n\t\tCommit previousCommitID = null;\n\t\tfor (int i = 0; i < commitList.size(); i++) {\n\t\t\tif (commitList.get(i).commitID.contains(this.commitID)) {\n\t\t\t\treturn commitList.get(i);\n\t\t\t}\n\t\t}\n\n\t\treturn previousCommitID;\n\n\t}", "private TreeTableNode parseSingleCommit(Description commit) throws OWLException {\r\n\r\n\t\t// make the main annotation the top header\r\n\t\tSwoopChange main = new SwoopChange();\r\n\t\tmain.setAuthor(commit.getAuthor());\r\n\t\tmain.setCommitted(true); // not needed really\r\n\t\tmain.isTopNode = true; /* this is key */\r\n\t\tmain.setTimeStamp(commit.getCreated());\r\n\t\tmain.setDescription(commit.getAnnotatedEntityDefinition());\r\n\t\tTreeTableNode mainNode = new TreeTableNode(main);\r\n\t\t\r\n\t\t// parse change set associated with single commit\r\n\t\tString changeSetString = commit.getBody();\r\n\t\tif (changeSetString!=null) {\r\n\t\t\t// decode CDATA stuff\r\n\t\t\tchangeSetString = changeSetString.replaceAll(\"ENCODED-CDATA\", \"CDATA\");\r\n\t\t\tchangeSetString = changeSetString.replaceAll(\"]ENCODED]>\", \"]]>\"); \r\n\t\t\t\t\r\n\t\t\t// now split based on separator\r\n\t\t\tString[] changeStr = changeSetString.split(separator);\r\n\t\t\t\r\n\t\t\t// each split component is a separate change\r\n\t\t\tList repDesc = new ArrayList(); // list of Description (changes)\r\n\t\t\tfor (int i=0; i<changeStr.length; i++) {\r\n\t\t\t\tString swcDesc = changeStr[i]; // SwoopChange mapped to a Description serialized in RDF/XML\r\n\t\t\t\tDescription desc = new Description();\r\n\t\t\t\tdesc.deserializeFromString(swcDesc, swoopModel);\r\n\t\t\t\trepDesc.add(desc);\t\t\t\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// transform Description list to SwoopChange list\r\n\t\t\tList swcChangeList = this.transformChangeList(repDesc);\r\n\t\t\t\r\n\t\t\t// add each swoopChange as a child of mainNode\r\n\t\t\tthis.sortChanges(swcChangeList);\r\n\t\t\tfor (Iterator iter2 = swcChangeList.iterator(); iter2.hasNext();) {\r\n\t\t\t\tSwoopChange swc = (SwoopChange) iter2.next();\r\n\t\t\t\tTreeTableNode swcNode = new TreeTableNode(swc);\r\n\t\t\t\tswcNode.swoopChange.isOnRepository = true;\r\n\t\t\t\tmainNode.addChild(swcNode);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn mainNode;\r\n\t}", "@Override\n\tpublic String getResult(Map<String, String> params) throws Exception {\n\t\tlong playerId = Long.valueOf(params.get(\"playerId\"));\n\t\tint taskId = Integer.parseInt(params.get(\"taskId\"));//ID\n\t\tint process = Integer.parseInt(params.get(\"process\"));\n\t\t\n\t\tGamePlayer player = WorldMgr.getPlayerFromCache(playerId);\n\t\tif (player != null && player.getPlayerState() == PlayerState.ONLINE) {\n\t\t\tRealTask task = player.getTaskInventory().getTaskInfos().get(taskId);\n\t\t\tif(task!=null){\n\t\t\t\ttask.updateProcess(process);\n\t\t\t}else{\n\t\t\t\tTaskCfg cfg = TaskTemplateMgr.getTaskCfg(taskId);\n\t\t\t\t\n\t\t\t\tif(cfg!=null){\n\t\t\t\t\tList<Integer> ids = new ArrayList<>();\n\t\t\t\t\tfor (RealTask t: player.getTaskInventory().getTaskInfos().values()) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(t.getConfig().getTaskLink() == cfg.getTaskLink()){\n\t\t\t\t\t\t\tids.add(t.getInfo().getTaskId());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tfor (int id : ids) {\n\t\t\t\t\t\tplayer.getTaskInventory().del(id);\n\t\t\t\t\t\tTaskOperateRespMsg.Builder resp = TaskOperateRespMsg.newBuilder();\n\t\t\t\t\t\tresp.setTaskId(id);\n\t\t\t\t\t\tresp.setOperate(3);\n\t\t\t\t\t\tPBMessage pkg = MessageUtil.buildMessage(Protocol.U_RESP_TASKOPERATE, resp);\n\t\t\t\t\t\tplayer.sendPbMessage(pkg);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tTaskInfo updateT = new TaskInfo();\n\t\t\t\t\tupdateT.setPlayerId(player.getPlayerId());\n\t\t\t\t\tupdateT.setProcess(0);\n\t\t\t\t\tupdateT.setTaskId(cfg.getTaskId());\n\t\t\t\t\tupdateT.setState(TaskInfo.UN_ACCEPT);\n\t\t\t\t\tupdateT.setUpdateTime(new Date());\n\t\t\t\t\tupdateT.setCreateTime(new Date());\n\t\t\t\t\tupdateT.setOp(Option.Insert);\n\t\t\t\t\tRealTask newTask = new RealTask(cfg, updateT, player);\n\t\t\t\t\tplayer.getTaskInventory().add(newTask);\n\t\t\t\t\tnewTask.doAccept();\n\t\t\t\t\tnewTask.updateProcess(process);\n\t\t\t\t\treturn HttpResult.getResult(Code.SUCCESS, \"*_*taskGm exec success*_*\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn HttpResult.getResult(Code.SUCCESS, \"*_*taskGm exec fail*_*\");\n\t}", "public static String getTeamTaskDueInvoice(Integer pmid) {\n Session session = ConnectionFactory.getInstance().getSession();\n String result = \"\";\n String invoiceAmt = StandardCode.getInstance().getPropertyValue(\"resource.invoice.alert.limit\");\n\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd \");\n Date date = new Date();\n String ndt = dateFormat.format(date);\n try {\n PreparedStatement st = session.connection().prepareStatement(\"SELECT p.number,l.taskname,l.internalDollarTotal,l.internalCurrency,s.language as sLang,t.language as tLang,l.dueDatedate, r.firstName,r.lastName,r.companyname,c.company_code FROM project p INNER JOIN sourcedoc s ON p.id_project=s.id_project \"\n + \"INNER JOIN targetdoc t ON s.id_sourcedoc=t.id_sourcedoc \"\n + \"INNER JOIN lintask l ON l.ID_TargetDoc=t.ID_TargetDoc \"\n + \"INNER JOIN resource r ON l.personname=r.id_resource \"\n + \"INNER JOIN client_information c ON p.id_client=c.id_client \"\n + \"WHERE l.receiveddatedate IS NOT NULL AND REPLACE(l.internalDollarTotal,',','')>\"+invoiceAmt+\" AND l.invoicedatedate IS NULL AND p.pm_id=\" + pmid + \" \"\n + \"UNION \"\n + \"SELECT p.number,l.taskname,l.internalDollarTotal,l.internalCurrency,s.language as sLang,t.language as tLang,l.dueDatedate, r.firstName,r.lastName,r.companyname,c.company_code FROM project p INNER JOIN sourcedoc s ON p.id_project=s.id_project \"\n + \"INNER JOIN targetdoc t ON s.id_sourcedoc=t.id_sourcedoc \"\n + \"INNER JOIN dtptask l ON l.ID_TargetDoc=t.ID_TargetDoc \"\n + \"INNER JOIN resource r ON l.personname=r.id_resource \"\n + \"INNER JOIN client_information c ON p.id_client=c.id_client \"\n + \"WHERE l.receiveddatedate IS NOT NULL AND REPLACE(l.internalDollarTotal,',','')>\"+invoiceAmt+\" AND l.invoicedatedate IS NULL AND p.pm_id=\" + pmid + \" \"\n + \"UNION \"\n + \"SELECT p.number,l.taskname,l.internalDollarTotal,l.internalCurrency,s.language as sLang,t.language as tLang,l.dueDatedate, r.firstName,r.lastName,r.companyname,c.company_code FROM project p INNER JOIN sourcedoc s ON p.id_project=s.id_project \"\n + \"INNER JOIN targetdoc t ON s.id_sourcedoc=t.id_sourcedoc \"\n + \"INNER JOIN engtask l ON l.ID_TargetDoc=t.ID_TargetDoc \"\n + \"INNER JOIN resource r ON l.personname=r.id_resource \"\n + \"INNER JOIN client_information c ON p.id_client=c.id_client \"\n + \"WHERE l.receiveddatedate IS NOT NULL AND REPLACE(l.internalDollarTotal,',','')>\"+invoiceAmt+\" AND l.invoicedatedate IS NULL AND p.pm_id=\" + pmid + \" \"\n + \"UNION \"\n + \"SELECT p.number,l.taskname,l.internalDollarTotal,l.internalCurrency,s.language as sLang,t.language as tLang,l.dueDatedate, r.firstName,r.lastName,r.companyname,c.company_code FROM project p INNER JOIN sourcedoc s ON p.id_project=s.id_project \"\n + \"INNER JOIN targetdoc t ON s.id_sourcedoc=t.id_sourcedoc \"\n + \"INNER JOIN othtask l ON l.ID_TargetDoc=t.ID_TargetDoc \"\n + \"INNER JOIN resource r ON l.personname=r.id_resource \"\n + \"INNER JOIN client_information c ON p.id_client=c.id_client \"\n + \"WHERE l.receiveddatedate IS NOT NULL AND REPLACE(l.internalDollarTotal,',','')>\"+invoiceAmt+\" AND l.invoicedatedate IS NULL AND p.pm_id=\" + pmid + \" \");\n\n ResultSet rs = st.executeQuery();\n \n Integer count=1;\n while (rs.next()) {\n if(count==1) result = \"<fieldset><legend>Due Invoice</legend>\"\n + \"<div><font size=\\\"1\\\" color='red'>Note: (only invoices over $\"+invoiceAmt+\" are displayed here)</font></div>\"\n + \"<div class =\\\"row\\\">\";\n// //System.out.println(\"AAAAAANNNNNAAAAAA\" + rs.getString(\"sLang\"));\n// //System.out.println(\"ddddddddddddddddd\" + rs.getString(\"taskname\"));\n// //System.out.println(\"qqqqqqqqqqqqqqqqq\" + rs.getString(\"tLang\"));\n String resource = \"\";\n if (rs.getString(\"firstName\").equals(\"\")) {\n resource = rs.getString(\"companyname\");\n } else {\n resource = rs.getString(\"firstName\") + \" \" + rs.getString(\"lastName\");\n }\n result += \"<div class=\\\"six column\\\" style=\\\"padding-bottom: 10px\\\">\";\n result+=\"<div class=\\\"w3-card-8 w3-light-grey\\\" style=\\\"padding-bottom: 5px\\\">\";\n result += \"<div class=\\\"w3-container\\\">\"\n +\"</br><span style='font-size:15px'><b>\" + resource + \"</b></span>\"\n + \"<span class='w3-right' style='color : blue'>\"+rs.getString(\"internalDollarTotal\")+ \" \" +rs.getString(\"internalCurrency\")+\"</span></br>\"\n +\"</br></br><span style='font-size:12px'><b>\" + rs.getInt(\"number\") +rs.getString(\"company_code\") + \"</b></span>\"\n + \"</br>\"+ rs.getString(\"taskname\") + \" \"\n + \"( \" + rs.getString(\"sLang\") + \" - \" + rs.getString(\"tLang\") + \") <br><br>\" \n + \"</div>\";\n \n \n\n result += \"</b></div></div>\";\n count++;\n\n }\n if (count > 1) {\n result += \"</fieldset>\";\n }\n st.close();\n } catch (Exception e) {\n //System.out.println(\"errrrrrrrrrrrrrror\" + e.getMessage());\n } finally {\n if (session != null) {\n try {\n session.close();\n } catch (HibernateException e) {\n //System.out.println(\"Hibernate Exception:\" + e);\n throw new RuntimeException(e);\n }\n\n }\n }\n return result;\n\n }", "TCommit getLatestCommitForBranch(String branchName, TRepo repo);", "CompletableFuture<String> getHardwareRevision();", "public String getBmcStuToken(String id, String pass) throws IOException, InterruptedException, ParseException\n {\n String loginJSON = new Communicator(token).getStudentLoginInfo(id, pass, BMC_COMPANY_ID);\n JSONParser parser = new JSONParser();\n \n JSONObject rootJSONObject = (JSONObject)parser.parse(loginJSON);\n JSONObject loginMapJSONObject = (JSONObject)rootJSONObject.get(\"map\");\n String token = (String)loginMapJSONObject.get(\"token\");\n return token;\n }", "@Override\n\tpublic HwTraceStudyLogInfo getEntityByTjId(Integer tjId)\n\t\t\tthrows WEBException {\n\t\ttry {\n\t\t\thwLogDao = (HwTraceStudyLogDao) DaoFactory.instance(null).getDao(Constants.DAO_HW_TRACE_STUDY_LOG_INFO);\n\t\t\tSession sess = HibernateUtil.currentSession();\n\t\t\treturn hwLogDao.getEntityByTjId(sess, tjId);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tthrow new WEBException(\"根据统计编号获取溯源学习记录时出现异常!\");\n\t\t} finally{\n\t\t\tHibernateUtil.closeSession();\n\t\t}\n\t}", "public IStatus getResult();", "public GHFrom getSha() {\n return sha;\n }", "long getLastUpdate(long inId);", "@Override\n\tpublic HwTraceStudyLogInfo getEntityById(Integer id) throws WEBException {\n\t\ttry {\n\t\t\thwLogDao = (HwTraceStudyLogDao) DaoFactory.instance(null).getDao(Constants.DAO_HW_TRACE_STUDY_LOG_INFO);\n\t\t\tSession sess = HibernateUtil.currentSession();\n\t\t\treturn hwLogDao.getEntityById(sess, id);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tthrow new WEBException(\"根据主键获取溯源学习记录时出现异常!\");\n\t\t} finally{\n\t\t\tHibernateUtil.closeSession();\n\t\t}\n\t}", "public static Set getTestStatus(HTMLizer h, Statement s, int test)\n throws SQLException{\n Set retval = new HashSet();\n\n confirmTableExistence (h,s);\n\t\n ResultSet rs=s.executeQuery(getTestStatusSql(test));\n while(rs.next()) {\n int run = rs.getInt(1);\n int result = rs.getInt(2);\n\n if (result != Test.RESULT_NOT_RUN)\n\tretval.add(new Integer(run));\n }\n \n rs.close();\n return retval;\n }", "HomeWork selectByPrimaryKey(Long id);", "SysId selectByPrimaryKey(String id);", "private String stageDetailsFromDB(String queryString){\n\t\tString RET=\"\";\n\t\ttry\n\t\t{\n\t\t\tcon = Globals.getDatasource().getConnection();\n\t\t\tps = con.prepareStatement(queryString); \n\t\t\tresult = ps.executeQuery();\n\t\t\tif (result.first()) {\n\t\t\t\tRET = result.getString(1);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\tcatch(SQLException sqle){sqle.printStackTrace();}\n\t\tfinally {\n\t\t Globals.closeQuietly(con, ps, result);\n\t\t}\n\t\treturn RET;\n\t}", "private String getSingleLockSBRStmt() {\n\n if (null == mSingleLockStmt) {\n initClauses();\n mSingleLockStmt = \"SELECT s.EUID FROM SBYN_SYSTEMSBR s \" + mWithClause + \" WHERE s.EUID = ? AND s.REVISIONNUMBER = ? \" + mForUpdateClause;\n }\n\n return mSingleLockStmt;\n }", "public boolean checkControlStringStatus(String userId, String branchCode, String functionId, String operation, String txnStatus, String authStatus, String interfaceStatus) throws SQLException {\n boolean status = false;\n String finalControlString=null;\n PreparedStatement psmnt1=null;\n PreparedStatement psmnt2=null;\n PreparedStatement psmnt3=null;\n PreparedStatement psmnt4=null;\n PreparedStatement psmnt5=null;\n PreparedStatement psmnt6=null;\n PreparedStatement psmnt7=null;\n PreparedStatement psmnt8=null;\n ResultSet rs1=null;\n ResultSet rs2=null;\n ResultSet rs3=null;\n ResultSet rs4=null;\n ResultSet rs5=null;\n ResultSet rs6=null;\n ResultSet rs7=null;\n \n try {\n psmnt1 =conn.prepareStatement(\"select role_id , role_function , control_string from smtbs_role_detail where role_id in (select role_id from smtbs_user_role where user_id = ? and branch_code= ?) and role_function = ? \");\n psmnt1.setString(1, userId);\n psmnt1.setString(2, branchCode);\n psmnt1.setString(3, functionId);\n psmnt2 = conn.prepareStatement(\" select control_string from smtbs_users_functions where user_id = ? and function_id = ? and branch_code= ?\");\n psmnt2.setString(1, userId);\n psmnt2.setString(2, functionId);\n psmnt2.setString(3, branchCode);\n psmnt3 = conn.prepareStatement(\" select control_string from SMTBS_TXN_STATUS where txn_status = ? and auth_status = ? and interface_status = nvl(?,'XXXXX')\");\n psmnt3.setString(1, txnStatus);\n psmnt3.setString(2, authStatus);\n psmnt3.setString(3, interfaceStatus);\n psmnt4 =conn.prepareStatement(\" select control_string from SMTBS_MENU where function_id = ?\");\n psmnt4.setString(1, functionId);\n psmnt5 = conn.prepareStatement(\"select lpad(?,16,'0') from dual\");\n psmnt6 = conn.prepareStatement(\"select to_char(to_number(?) + to_number(?) + to_number(?) ) from dual\");\n psmnt7 = conn.prepareStatement(\"select translate(?,'3210','1000') from dual\");\n \n \n finalControlString = \"0000000000000000\";\n String tempControlString = \"0000000000000000\";\n String userControlString = \"0000000000000000\";\n String funcControlString = \"0000000000000000\";\n String tranControlString = \"1111111111111111\";\n String interControlString=null;\n \n rs1 = psmnt1.executeQuery();\n rs2 = psmnt2.executeQuery();\n if (rs2.next()){\n userControlString = rs2.getString(1);\n }\n rs3 = psmnt3.executeQuery();\n if (rs3.next())\n tranControlString = rs3.getString(1);\n rs4 = psmnt4.executeQuery();\n if (rs4.next())\n funcControlString = rs4.getString(1);\n if (userControlString.equals(\"0000000000000000\")) {\n while (rs1.next()) {\n interControlString = rs1.getString(\"control_string\");\n userControlString = fn_and_controlstrings(userControlString, \n interControlString);\n \n }\n \n }\n if (tranControlString == null)\n tranControlString = \"1111111111111111\";\n if (funcControlString == null)\n funcControlString = null;\n psmnt5.setString(1, userControlString);\n rs5 = psmnt5.executeQuery();\n if (rs5.next())\n userControlString = rs5.getString(1);\n psmnt5.setString(1, tranControlString);\n rs5 = psmnt5.executeQuery();\n if (rs5.next())\n tranControlString = rs5.getString(1);\n psmnt5.setString(1, funcControlString);\n rs5 = psmnt5.executeQuery();\n if (rs5.next())\n funcControlString = rs5.getString(1);\n psmnt6.setString(1, userControlString);\n psmnt6.setString(2, tranControlString);\n psmnt6.setString(3, funcControlString);\n rs6 = psmnt6.executeQuery();\n if (rs6.next())\n tempControlString = rs6.getString(1);\n psmnt7.setString(1, tempControlString);\n rs7 = psmnt7.executeQuery();\n if (rs7.next())\n finalControlString = rs7.getString(1);\n List funcList = FCSMSUtility.getActionNames(finalControlString);\n for (int i=0; i<funcList.size(); i++) {\n String lAction = (String) funcList.get(i);\n if (lAction.equalsIgnoreCase(operation)) {\n status = true;\n break;\n }\n }\n }catch (Exception e) {\n dbg(\"checkControlStringStatus-->Exception = \"+ e.getMessage());\n e.printStackTrace();\n }finally{\n if(psmnt1!=null&&rs1!=null){\n psmnt1.close();\n rs1.close();\n }\n if(psmnt2!=null&&rs2!=null){\n psmnt2.close();\n rs2.close();\n }\n if(psmnt3!=null&&rs3!=null){\n psmnt3.close();\n rs3.close();\n }\n if(psmnt4!=null&&rs4!=null){\n psmnt4.close();\n rs4.close();\n }\n if(psmnt5!=null&&rs5!=null){\n psmnt5.close();\n rs5.close();\n }\n if(psmnt6!=null&&rs6!=null){\n psmnt6.close();\n rs6.close();\n }\n if(psmnt7!=null&&rs7!=null){\n psmnt7.close();\n rs7.close();\n }\n \n }\n dbg(\"getControlString-->ControlString : \" + finalControlString+\" Status: \"+status);\n return status;\n }", "FctWorkguide selectByPrimaryKey(Long autoid);", "@Test\n public void testCommitsApiWithSpecificCommit() throws Exception\n {\n \n \n RequestBuilder builder = new RequestBuilder(\"GET\");\n Request request = builder.setUrl(\n UriTemplate.fromTemplate(BASE)\n .append(PATH_EXPRESSION)\n .set(\"user\", \"damnhandy\")\n .set(\"repo\", \"Handy-URI-Templates\")\n .set(\"function\",\"commits\")\n .set(\"id\",\"7cdf7ff75f8ede138228ceff7f5a1c18a5835b94\")\n .expand()).build();\n Assert.assertEquals(\"https://api.github.com/repos/damnhandy/Handy-URI-Templates/commits/7cdf7ff75f8ede138228ceff7f5a1c18a5835b94\", request.getUrl());\n executeRequest(createClient(), request);\n }", "public static Set getDiffStatus(HTMLizer h, Statement s, int test, int baseline)\n throws SQLException{\n Set retval = new HashSet();\n\n\tconfirmTableExistence (h,s);\n\n ResultSet rs = s.executeQuery(getDiffStatusSql(test, baseline));\n while(rs.next()) {\n int runone = rs.getInt(1);\n int runtwo = rs.getInt(2);\n int result = rs.getInt(3);\n int otherrun = baseline;\n if (runone == baseline) {\n\totherrun = runtwo;\n } else if (runtwo == baseline) {\n\totherrun = runone;\n }\n\n if (result != Test.RESULT_NOT_RUN)\n\tretval.add(new Integer(otherrun));\n }\n \n rs.close();\n\n return retval;\n }", "static public void extractSingleCommit(String commitId) throws Exception\n\t{\n\t\tDataExtractor de = new DataExtractor();\n\t\tList<String> commit_ids = new ArrayList<String>();\n\t\tcommit_ids.add(commitId);\n\t\tde.extractCommitInfo(commit_ids);\n\t}", "Result getResult();", "public So_cdVO getById(String so_cd);", "@Test\n\tpublic void getIdWithCommit() throws Exception {\n\t\tRepository repo = new FileRepository(testRepo);\n\t\tRevCommit commit = add(\"d1/f1.txt\", \"content\");\n\t\tassertNull(TreeUtils.getId(repo, commit, \"d2/f1.txt\"));\n\t\tassertNull(TreeUtils.getId(repo, commit, \"d1/f1.txt\"));\n\t\tObjectId treeId = TreeUtils.getId(repo, commit, \"d1\");\n\t\tassertNotNull(treeId);\n\t\tassertFalse(treeId.equals(commit.getTree()));\n\t\tassertNull(BlobUtils.getId(repo, commit, \"d1\"));\n\t\tassertFalse(treeId.equals(BlobUtils.getId(repo, commit, \"d1/f1.txt\")));\n\t}", "public String doDetail(){\n if(idsecteur==null){\n this.addActionError(getText(\"error.topo.missing.id.\"));\n }else secteur = managerFactory.getSecteurManager().getbynid(idsecteur);\n {\n // this.addActionError(\"il n'y a pas de projet pour ce numéro \"+idtopo );\n\n\n }\nreturn (this.hasErrors())? ActionSupport.ERROR : ActionSupport.SUCCESS;\n\n }", "private static String getCommitId(RevCommit m )\n\t{\n\t\treturn m.getId().abbreviate(10).name();\n\t}", "public ResultSet appcomp(Long comp_id)throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"select * from company where comp_id=\"+comp_id+\"\");\r\n\treturn rs;\r\n}", "@Override\n\tpublic TransferResultInfo<?> find() {\n\t\ttry {\n\t\t\tgradeDao.init();\n\t\t\tList<Grade> list_grade = gradeDao.select(transferDbData);\n\t\t\tList<TransferGradeInfo> finalList = new ArrayList<TransferGradeInfo>();\n\t\t\tfor (Grade grade : list_grade) {\n\t\t\t\tTransferGradeInfo g = new TransferGradeInfo();\n\t\t\t\tg.setUid(grade.getUid());\n\t\t\t\tg.setName(grade.getName());\n\t\t\t\tg.setAdmissiontime(grade.getAdmissiontime());\n\t\t\t\tg.setGraduationtime(grade.getGraduationtime());\n\t\t\t\tg.setCreatetime(grade.getCreatetime());\n\t\t\t\tg.setCreateip(grade.getCreateip());\n\t\t\t\tif (grade.getAdmin() != null) {\n\t\t\t\t\tTransferAdminInfo createuser = new TransferAdminInfo();\n\t\t\t\t\tcreateuser.setUid(grade.getAdmin().getUid());\n\t\t\t\t\tcreateuser.setName(grade.getAdmin().getName());\n\t\t\t\t\tg.setCreateuser(createuser);\n\t\t\t\t}\n\t\t\t\tfinalList.add(g);\n\t\t\t}\n\t\t\tTransferResultInfo<List<TransferGradeInfo>> rs = new TransferResultInfo<List<TransferGradeInfo>>();\n\t\t\trs.setMsgType(ResultCodeStorage.type_success);\n\t\t\trs.setMsgCode(ResultCodeStorage.code_success);\n\t\t\trs.setMsgContent(finalList);\n\t\t\treturn rs;\n\t\t} catch (HibernateException e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\tTransferResultInfo<String> rs = new TransferResultInfo<String>();\n\t\t\trs.setMsgType(ResultCodeStorage.type_error);\n\t\t\trs.setMsgCode(ResultCodeStorage.code_err_dao_hibernate_query);\n\t\t\trs.setMsgContent(StringUtil.formatResultInfoMessage(ResultCodeStorage.code_err_dao_hibernate_query, e.getMessage()));\n\t\t\treturn rs;\n\t\t} catch (HibernateSessionNotInitializedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tTransferResultInfo<String> rs = new TransferResultInfo<String>();\n\t\t\trs.setMsgType(ResultCodeStorage.type_error);\n\t\t\trs.setMsgCode(ResultCodeStorage.code_err_session_hibernate_empty);\n\t\t\trs.setMsgContent(StringUtil.formatResultInfoMessage(ResultCodeStorage.code_err_session_hibernate_empty, e.getMessage()));\n\t\t\treturn rs;\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\tTransferResultInfo<String> rs = new TransferResultInfo<String>();\n\t\t\trs.setMsgType(ResultCodeStorage.type_error);\n\t\t\trs.setMsgCode(ResultCodeStorage.code_err_generic_server_internal_exception);\n\t\t\trs.setMsgContent(StringUtil.formatResultInfoMessage(ResultCodeStorage.code_err_generic_server_internal_exception, e.getMessage()));\n\t\t\treturn rs;\n\t\t} finally {\n\t\t\tgradeDao.close();\n\t\t}\n\t}", "int getResult();" ]
[ "0.60919976", "0.56708086", "0.5639327", "0.55102175", "0.55086607", "0.5507639", "0.543109", "0.5312019", "0.5311535", "0.5242895", "0.5219726", "0.5122393", "0.5084045", "0.5052188", "0.4995716", "0.49849793", "0.4954477", "0.49173304", "0.4887534", "0.4861879", "0.48512194", "0.48511457", "0.4842186", "0.4842186", "0.48420107", "0.4841295", "0.4841295", "0.48397174", "0.48361957", "0.48054442", "0.47747692", "0.4772984", "0.47579446", "0.4750496", "0.47301635", "0.47148308", "0.47066316", "0.47063902", "0.46973184", "0.46930838", "0.4675972", "0.46739832", "0.46475086", "0.4646781", "0.4634083", "0.46130452", "0.4607187", "0.45917267", "0.45884043", "0.4586357", "0.45826754", "0.45811167", "0.45516112", "0.4547692", "0.45360672", "0.45360672", "0.45353672", "0.45254567", "0.45234203", "0.4522552", "0.45138377", "0.45020998", "0.45010057", "0.44993168", "0.4489052", "0.44802532", "0.44789514", "0.44766283", "0.4463673", "0.445797", "0.44526997", "0.44517633", "0.4450101", "0.4449803", "0.44492877", "0.44470996", "0.44466588", "0.44445425", "0.44334012", "0.442977", "0.44288373", "0.44277874", "0.44246083", "0.44244608", "0.44181177", "0.44174063", "0.4412234", "0.44089827", "0.44034436", "0.44029453", "0.44014022", "0.4396749", "0.439536", "0.43931556", "0.43913335", "0.43886802", "0.4387314", "0.43847677", "0.43847263", "0.43816164" ]
0.63202727
0
update stu project commit record.
@POST @Path("update") @Consumes(MediaType.APPLICATION_FORM_URLENCODED) public Response updateCommitResult(@FormParam("user") String userName, @FormParam("proName") String proName) { JSONObject ob = new JSONObject(); if (!userName.equals("root")) { JenkinsService jenkinsService = new JenkinsService(); StudentDashChoosePro stuDashChoPro = new StudentDashChoosePro(); int lastCommitNum = jenkinsService.getProjectCommitCount(proName, userName); int commitCount = lastCommitNum - 1; String proType = projectDb.getAssignmentType(proName); String buildApiJson = stuDashChoPro.getBuildApiJson(lastCommitNum, userName, proName); String strDate = stuDashChoPro.getCommitTime(buildApiJson); String[] dates = strDate.split(" "); String status = stuDashChoPro.getCommitStatus(lastCommitNum, userName, proName, buildApiJson, proType); int id = userDb.getUser(userName).getId(); boolean check = db.checkJenkinsJobTimestamp(id, proName); if (check) { db.updateJenkinsCommitCount(id, proName, commitCount, status); } else { db.insertJenkinsCommitCount(id, proName, commitCount, status); } db.updateJenkinsJobTimestamp(id, proName, strDate); boolean inDb = commitRecordDb.checkRecord(id, proName, dates[0], dates[1]); if (inDb) { commitRecordDb.updateRecordStatus(id, proName, status, dates[0], dates[1]); } else { commitRecordDb.insertCommitRecord(id, proName, status, dates[0], dates[1]); } updateCommitRecordState(); ob.put("userName", userName); ob.put("proName", proName); ob.put("commitCount", commitCount); ob.put("dates", dates[0]); ob.put("dates1", dates[1]); ob.put("status", status); } return Response.ok().entity(ob.toString()).build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int updateByPrimaryKey(UserOperateProject record);", "int updateByPrimaryKey(Project record);", "public boolean updateProject(Project project);", "int updateByPrimaryKey(ProjGroup record);", "@TransactionAttribute(TransactionAttributeType.REQUIRED)\r\n\tpublic ProyectoDO update(ProyectoDO project) throws ConectelException {\r\n\t\t/*try {\r\n\t\t\tProyectoDO current = transformacionService\r\n\t\t\t\t\t.map(project, ProyectoDO.class);*/\r\n\t\t\tentityManager.merge(project);\r\n\t\t/*} catch (ConectelMappingException e) {\r\n\t\t\tthrow new ConectelException(\"Error de sistema.\");\r\n\t\t}*/\r\n\t\treturn null;\r\n\t}", "public void updateCommitRecordState() {\n\n List<String> lsNames = new ArrayList<>();\n lsNames = projectDb.listAllProjectNames();\n\n for (String name : lsNames) {\n\n Map<String, Integer> map = commitRecordDb.getCommitRecordStateCounts(name);\n\n int bs = 0;\n int ini = 0;\n int utf = 0;\n int csf = 0;\n int cpf = 0;\n\n if (map.containsKey(StatusEnum.BUILD_SUCCESS.getTypeName())) {\n bs = map.get(StatusEnum.BUILD_SUCCESS.getTypeName());\n }\n\n if (map.containsKey(StatusEnum.INITIALIZATION.getTypeName())) {\n ini = map.get(StatusEnum.INITIALIZATION.getTypeName());\n }\n\n if (map.containsKey(StatusEnum.UNIT_TEST_FAILURE.getTypeName())) {\n utf = map.get(StatusEnum.UNIT_TEST_FAILURE.getTypeName());\n }\n\n if (map.containsKey(StatusEnum.CHECKSTYLE_FAILURE.getTypeName())) {\n csf = map.get(StatusEnum.CHECKSTYLE_FAILURE.getTypeName());\n }\n\n if (map.containsKey(StatusEnum.COMPILE_FAILURE.getTypeName())) {\n cpf = map.get(StatusEnum.COMPILE_FAILURE.getTypeName());\n }\n\n int ccs = 0;\n ccs = bs + utf + csf + cpf;\n\n boolean check;\n check = crsdb.checkCommitRecordStatehw(name);\n\n if (check) {\n crsdb.updateCommitRecordState(name, bs, csf, cpf, utf, ini, ccs);\n\n } else {\n crsdb.addCommitRecordState(name, bs, csf, cpf, utf, ini, ccs);\n }\n\n }\n\n }", "R commit(C change);", "int updateByPrimaryKey(Ltsprojectpo record);", "public static void updateContractor(){\n projectChosen = getQuestionInput();\r\n try {\r\n Connection myConn = DriverManager.getConnection(url, user, password);\r\n\r\n String sqlInsert = \"UPDATE projects\" +\r\n \" SET contract_name = ?, contract_tel = ?, contract_email = ?, contract_address = ?\" +\r\n \"WHERE project_num = \" +projectChosen;\r\n\r\n PreparedStatement pstmt = myConn.prepareStatement(sqlInsert);\r\n pstmt.setString(1, NewProject.contract_name);\r\n pstmt.setString(2, NewProject.contract_tel);\r\n pstmt.setString(3, NewProject.contract_email);\r\n pstmt.setString(4, NewProject.contract_address);\r\n pstmt.executeUpdate(); //Execute update of database.\r\n pstmt.close();\r\n\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n }", "int updateByPrimaryKey(SysTeam record);", "public boolean updateProject(Project p) {\n\n try {\n String update = \"UPDATE PROJECTS SET \" + \"DESCRIPTION = ?, \"\n + \"HOURS = ?, \" + \"STARTDATE = ?, \" + \"DUEDATE = ?, \" + \"INVOICESENT = ? \"\n + \"WHERE PROJECT_ID = ?\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(update);\n ps.setString(1, p.getDescription());\n ps.setString(2, p.getHours());\n ps.setString(3, p.getStartdate());\n ps.setString(4, p.getDuedate());\n ps.setString(5, p.getInvoicesent());\n ps.setString(6, p.getProjectId());\n ps.executeUpdate();\n\n logger.info(\"ps {}\", ps);\n ps.close();\n return true;\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n\n return false;\n }\n }", "private static void update_project_status() {\r\n\r\n\t\ttry (// Creates a connection and statement object\r\n\t\t\t\tConnection conn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/PoisedPMS\",\"poisedpms\",\"poisedpms\");\r\n\t\t\t\t\r\n\t\t\t\tStatement stmt = conn.createStatement();\r\n\t\t\t\t\r\n\t\t\t){\r\n\t\t\t\r\n\t\t\t// Allows for user input\r\n\t\t\tScanner input = new Scanner(System.in);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Select a project ID to modify it.\");\r\n\t\t\t\r\n\t\t\t// Prints out all project ids and names:\r\n\t\t\tString strSelectProject = String.format(\"SELECT * FROM projects INNER JOIN project_statuses ON \"\r\n\t\t\t\t\t+ \"projects.project_id = project_statuses.project_id;\");\r\n\t\t\tResultSet project_rset = stmt.executeQuery(strSelectProject);\r\n\t\t\t// This creates a list of project ids to check that the user only selects an available one\r\n\t\t\tArrayList<Integer> project_id_list = new ArrayList<Integer>(); \r\n\t\t\twhile (project_rset.next()) {\r\n\t\t\t\tSystem.out.println(\"ID: \" + project_rset.getInt(\"project_id\") + \", Name:\" + project_rset.getString(\"project_name\"));\r\n\t\t\t\tproject_id_list.add(project_rset.getInt(\"project_id\"));\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Allows user to select a project to update \r\n\t\t\tBoolean select_project = true;\r\n\t\t\tint project_id = 0;\r\n\t\t\twhile (select_project == true) {\r\n\t\t\t\tSystem.out.println(\"Project ID: \");\r\n\t\t\t\tString project_id_str = input.nextLine();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tproject_id = Integer.parseInt(project_id_str);\r\n\t\t\t\t\tfor (int i = 0; i < project_id_list.size(); i ++) {\r\n\t\t\t\t\t\tif (project_id == project_id_list.get(i)) { \r\n\t\t\t\t\t\t\tselect_project = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (select_project == true) {\r\n\t\t\t\t\t\tSystem.out.println(\"Please only select an available project id.\");\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 * @exception Throws exception if the users input for project id is not a number\r\n\t\t\t\t */\r\n\t\t\t\tcatch(Exception e) {\r\n\t\t\t\t\t System.out.println(\"The project number cannot contain letters or symbols. Please try again\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t// The user can select either to change the due date, the status or the amount paid\r\n\t\t\t// The values are printed out so that the user can physically see the fields and decide\r\n\t\t\tSystem.out.println(\"Select 1, 2 or 3 depending on which field you want to update: \");\r\n\t\t\t\r\n\t\t\tResultSet project_select_rset = stmt.executeQuery(strSelectProject);\r\n\t\t\twhile (project_select_rset.next()) {\r\n\t\t\t\tif (project_select_rset.getInt(\"project_id\") == project_id) {\r\n\t\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"ID: \" + project_select_rset.getInt(\"project_id\") + \r\n\t\t\t\t\t\"\\nName: \" + project_select_rset.getString(\"project_name\") + \r\n\t\t\t\t\t\"\\nCharged: R\" + project_select_rset.getInt(\"charged\") + \r\n\t\t\t\t\t\"\\n1. Paid: R\" + project_select_rset.getInt(\"paid\") + \r\n\t\t\t\t\t\"\\n2. Due on: \" + project_select_rset.getDate(\"deadline_date\") + \r\n\t\t\t\t\t\"\\n3. Status: \" + project_select_rset.getString(\"status\"));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//Here the user can select the field to update's number\r\n\t\t\t// This allows the user to enter a charged amount \r\n\t\t\tBoolean select_update_field = true;\r\n\t\t\tint update_field = 0;\r\n\t\t\twhile (select_update_field == true) {\r\n\t\t\t\tSystem.out.print(\"Field number \");\r\n\t\t\t\tString field_change_str = input.nextLine();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tupdate_field = Integer.parseInt(field_change_str);\r\n\t\t\t\t\tif (update_field == 1 || update_field == 2 || update_field == 3) {\r\n\t\t\t\t\t\tselect_update_field = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (update_field != 1 && update_field != 2 && update_field != 3) {\r\n\t\t\t\t\t\tSystem.out.println(\"You can only select 1, 2 or 3. Please try again\");\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 * @exception Throws exception if the users input for selected field to update is not a number\r\n\t\t\t\t */\r\n\t\t\t\tcatch(Exception e) {\r\n\t\t\t\t\t System.out.println(\"The selected field number cannot contain letters or symbols. Please try again\");\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t\r\n\t\t\tif (update_field == 1) {\r\n\t\t\t\t// This allows the user to enter update the amount paid \r\n\t\t\t\tBoolean update_paid = true;\r\n\t\t\t\tint prev_paid = 0;\r\n\t\t\t\tint paid = 0;\r\n\t\t\t\twhile (update_paid == true) {\r\n\t\t\t\t\tSystem.out.println(\"How much has been paid: R\");\r\n\t\t\t\t\tString paid_amount_str = input.nextLine();\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tpaid = Integer.parseInt(paid_amount_str);\r\n\t\t\t\t\t\tupdate_paid = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/**\r\n\t\t\t\t\t * @exception Throws exception if the users input for amount paid is not a number\r\n\t\t\t\t\t */\r\n\t\t\t\t\tcatch(Exception e) {\r\n\t\t\t\t\t\t System.out.println(\"The paid amount cannot contain letters or symbols. Please try again\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Fetches any previous paid amount to add it to the new amount\r\n\t\t\t\tResultSet project_paid_rset = stmt.executeQuery(strSelectProject);\r\n\t\t\t\twhile (project_paid_rset.next()) {\r\n\t\t\t\t\tprev_paid = project_paid_rset.getInt(\"paid\");\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// Calculates the total\r\n\t\t\t\tint total_paid = prev_paid + paid;\r\n\r\n\t\t\t\t// Updates the field\r\n\t\t\t\tPreparedStatement ps_paid = conn.prepareStatement(\r\n\t\t\t\t\t\t\"UPDATE project_statuses SET paid = ? WHERE project_id = ?;\");\r\n\t ps_paid.setInt(1, total_paid);\r\n\t ps_paid.setInt(2, project_id);\r\n\t ps_paid.executeUpdate();\r\n\t System.out.println(\"\\nUpdated Paid Amount to R\" + total_paid + \".\\n\");\r\n\t\t\t}\t\t\t\r\n\t\t\t\r\n\t\t\tif (update_field == 2) {\r\n\t\t\t\t\r\n\t\t\t\t// Allows the user to update the due date\r\n\t\t\t\tBoolean update_deadline_date = true;\r\n\t\t\t\tDate deadline_date = null;\r\n\t\t\t\twhile (update_deadline_date == true) {\r\n\t\t\t\t\tSystem.out.print(\"Deadline Date (YYYY-MM-DD): \");\r\n\t\t\t\t\tString deadline_date_str = input.nextLine();\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tdeadline_date= Date.valueOf(deadline_date_str);\r\n\t\t\t\t\t\tupdate_deadline_date = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t/**\r\n\t\t\t\t\t * @exception Throws exception if the users input for deadline date is not in the correct format\r\n\t\t\t\t\t */\r\n\t\t\t\t\tcatch(Exception e) {\r\n\t\t\t\t\t\t System.out.println(\"The date must be in the format YYYY-MM-DD (eg. 2013-01-13). Please try again\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Updates the value\r\n\t\t\t\tPreparedStatement ps_update_date = conn.prepareStatement(\r\n\t\t\t\t\t\t\"UPDATE project_statuses SET completion_date = ? WHERE project_id = ?;\");\r\n\t\t\t\tps_update_date.setDate(1, deadline_date);\r\n\t\t\t\tps_update_date.setInt(2, project_id);\r\n\t\t\t\tps_update_date.executeUpdate();\r\n\t\t\t\tSystem.out.println(\"\\nUpdated deadline date to \" + deadline_date + \".\\n\");\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (update_field == 3) {\r\n\t\t\t\tSystem.out.print(\"In order to set the status to complete select finalize project from the project menu.\\n\"\r\n\t\t\t\t\t\t+ \"Select status number from list of statuses: \\n\");\r\n\t\t\t\tString[] statuses = new String[] {\"Initialised\", \"Paperwork Phase\", \"Foundations\", \"Primary Construction\", \"Finishes\"};\r\n\t\t\t\tfor (int i = 0; i < 5; i ++) {\r\n\t\t\t\t\tSystem.out.println((i + 1) + \". \" + statuses[i]);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// Allows a user to select a new status\r\n\t\t\t\tBoolean update_status = true;\r\n\t\t\t\tint status_index = 0;\r\n\t\t\t\twhile (update_status == true) {\r\n\t\t\t\t\tSystem.out.println(\"Status No: \");\r\n\t\t\t\t\tString status_index_str = input.nextLine();\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tstatus_index = Integer.parseInt(status_index_str);\r\n\t\t\t\t\t\tfor (int i = 0; i < 5; i ++) {\r\n\t\t\t\t\t\t\tif (status_index == i) { \r\n\t\t\t\t\t\t\t\tupdate_status = false;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (update_status == true) {\r\n\t\t\t\t\t\t\tSystem.out.println(\"Please only select an available status numbers.\");\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 * @exception Throws exception if the users input for status index is not a number\r\n\t\t\t\t\t */\r\n\t\t\t\t\tcatch(Exception e) {\r\n\t\t\t\t\t\t System.out.println(\"The status number cannot contain letters or symbols. Please try again\");\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\tPreparedStatement ps_status = conn.prepareStatement(\r\n\t\t\t\t\t\t\"UPDATE project_statuses SET status = ? WHERE project_id = ?;\");\r\n\t ps_status.setString(1, statuses[status_index - 1]);\r\n\t ps_status.setInt(2, project_id);\r\n\t ps_status.executeUpdate();\r\n\t System.out.println(\"\\nThe status has been updated to \" + statuses[status_index -1] + \".\\n\");\r\n\t\t\t}\r\n\t\t/**\r\n\t\t * @exception If the table entry cannot be updated due to database constrains then the SQLException is thrown\r\n\t\t */\r\n\t\t} catch ( SQLException ex ) {\r\n\t\t\tex . printStackTrace ();\r\n\t\t}\r\n\t}", "int updateByPrimaryKeySelective(UserOperateProject record);", "int updateByPrimaryKey(TParklotstatusFile record);", "public void edit_carrer_profile_project(Connection con, int user_id,int carrer_profile_project_id,String project_name,Date project_start_date,Date project_end_date,String project_organisation_associated_with,String project_cast_associated_with,String project_website_link,String project_instgram_link,String project_facebook_link,String project_twitter_link,String project_other_link,String project_description,HashMap carrer_profile_media)\n\t{\n\t\t\n\t\t// connect insta for instagram_followers etc..\t\n\t\tResultSet rs; \n\t\tPreparedStatement pst;\n\t\t DateFormat dateFormat = new SimpleDateFormat(\"yyyy-mm-dd\"); \n\t\t\n\t\ttry {\n\t\t\t\n\t\t\t\n\t\t\tpst=con.prepareStatement(\"update carrer_profile_project set project_name=?,project_start_date=?,project_end_date=?, project_organisation_associated_with=?,project_cast_associated_with=?,project_website_link=?,project_instgram_link=?,project_facebook_link=?,project_twitter_link=?,project_other_link=?,project_description=? where e_id=? and carrer_profile_project_id=?\");\n\t\t\tpst.setString(1, project_name);\n\t\t\tpst.setDate(2, new java.sql.Date( project_start_date.getTime()));\n\t\t\tpst.setDate(3, new java.sql.Date(project_end_date.getTime()));\n\t\t\tpst.setString(4, project_organisation_associated_with); // csv\n\t\t\tpst.setString(5, project_cast_associated_with);//csv\n\t\t\tpst.setString(6, project_website_link);\n\t\t\tpst.setString(7, project_instgram_link);\n\t\t\tpst.setString(8, project_facebook_link); \n\t\t\tpst.setString(9, project_twitter_link);\n\t\t\tpst.setString(10, project_other_link); //csv\n\t\t\tpst.setString(11, project_description);\n\t\t\tpst.setInt(12, user_id);\n\t\t\tpst.setInt(13, carrer_profile_project_id);\n\t\t\t\n\t\t\t//pst=con.prepareStatement(\"update basic_profile set name=?,whatsapp_number=?,calling_number=?,email_id=?,website_link=?,instgram_link=?,facebook_link=?,twitter_link=?,other_link=?,about_us=?,plot_or_building_number=?,building_name=?,floor_number=?,street,locality=?,landmark=?,city=?,state=?,pincode=?,country=?,google_map_link=?,logo=?) where eid=? \");\n\t\t\t//create table database.carrer_profile_media( e_id integer, carrer_profile_id integer,carrer_profile_type String, media_id integer,media longblob,media_type varchar(20))\n\t\t\t\n\t\t\tif(!carrer_profile_media.isEmpty())\n\t\t\t\tadd_carrer_profile_media(con, user_id,carrer_profile_project_id, \"carrer_profile_project\", carrer_profile_media);\n\t\t\t\t\n\t\t\t\tpst.execute();\n\t\t\t\t\n\t\t\t}catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t\t\n\t\t\t// create carrer project profile detail image and store it \n\t\t} \n\t\t\n\t\tArrayList<String> values=new ArrayList<String>();\n\t\tvalues.add(Integer.toString(user_id));\n\t\tvalues.add(Integer.toString(carrer_profile_project_id));\n\t\tvalues.add(project_name);\n\t\tvalues.add(dateFormat.format(project_start_date));\n\t\tvalues.add(dateFormat.format(project_end_date));\n\t\tvalues.add(project_organisation_associated_with);\n\t\t\n\t\tvalues.add(project_cast_associated_with);\n\t\tvalues.add(project_website_link);\n\t\tvalues.add(project_instgram_link);\n\t\tvalues.add(project_facebook_link);\n\t\tvalues.add(project_twitter_link);\n\t\tvalues.add(project_other_link);\n\t\tvalues.add(project_description);\n\t\t\n\t\t\n\t\tArrayList<String> labels=new ArrayList<String>();\n\t\tlabels.add(\"user_id\");\n\t\tlabels.add(\"carrer_profile_project_id\");\n\t\tlabels.add(\"project_name\");\n\t\tlabels.add(\"project_start_date\");\n\t\tlabels.add(\"project_end_date\");\n\t\tlabels.add(\"project_organisation_associated_with\");\n\t\t\n\t\tlabels.add(\"project_cast_associated_with\");\n\t\tlabels.add(\"project_website_link\");\n\t\tlabels.add(\"project_instgram_link\");\n\t\tlabels.add(\"project_facebook_link\");\n\t\tlabels.add(\"project_twitter_link\");\n\t\tlabels.add(\"project_other_link\");\n\t\tlabels.add(\"project_description\");\n\t\t// create carrer project profile detail image and store it \n\t\tmake_snapshot_carrer_profile(values, labels, con, user_id);\n\t\t\t\n\t}", "@Override\n\tpublic int updateProject(Project project) {\n\t\treturn pm.updateProject(project);\n\t}", "public static void updateFinal(){\n projectChosen = getQuestionInput();\r\n try {\r\n Connection myConn = DriverManager.getConnection(url, user, password);\r\n\r\n String sqlInsert = \"UPDATE projects\" +\r\n \" SET completed = ?\" +\r\n \"WHERE project_num = \" + projectChosen;\r\n\r\n PreparedStatement pstmt = myConn.prepareStatement(sqlInsert);\r\n pstmt.setString(1, \"YES\");\r\n pstmt.executeUpdate(); //Execute update of database.\r\n pstmt.close();\r\n\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n }", "int updateByPrimaryKey(PayLogInfoPo record);", "int updateByPrimaryKey(CartDO record);", "int modifyProject(Project project) throws WrongIDException, WrongDurationException;", "void commit() {\n }", "@Override\n\tpublic Integer modifyProject(ProjectInfo project) {\n\t\treturn sqlSession.update(\"cn.sep.samp2.project.modifyProject\", project);\n\t}", "public static void updatePayment(){\n projectChosen = getQuestionInput();\r\n try {\r\n Connection myConn = DriverManager.getConnection(url, user, password);\r\n\r\n String sqlInsert = \"UPDATE projects SET tot_paid = ?\" +\r\n \"WHERE project_num = \" + projectChosen;\r\n\r\n PreparedStatement pstmt = myConn.prepareStatement(sqlInsert);\r\n pstmt.setDouble(1, NewProject.tot_paid);\r\n pstmt.executeUpdate(); //Execute update of database.\r\n pstmt.close();\r\n\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n }", "int updateByPrimaryKey(UploadStateRegDTO record);", "void commit();", "void commit();", "@Override\n\tpublic void updateProjectTeam(ProjectTeamBean bean) {\n\t\t\n\t}", "int updateByPrimaryKey(UserCourseHistory record);", "int updateByPrimaryKey(BehaveLog record);", "int updateByPrimaryKey(TbComEqpModel record);", "public ProjectCart updateProjectCart(ProjectCart pc) {\n Session session = ConnectionFactory.getInstance().getSession();\n boolean tf = true;\n\n Transaction tx = null;\n\n try {\n\n tx = session.beginTransaction();\n\n session.saveOrUpdate(pc);\n\n tx.commit();\n } catch (HibernateException e) {\n try {\n tx.rollback(); //error\n } catch (HibernateException he) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n } /*\n * Regardless of whether the above processing resulted in an Exception\n * or proceeded normally, we want to close the Hibernate session. When\n * closing the session, we must allow for the possibility of a Hibernate\n * Exception.\n *\n */ finally {\n if (session != null) {\n try {\n\n session.close();\n } catch (HibernateException e) {\n System.err.println(\"Hibernate Exception\" + e.getMessage());\n throw new RuntimeException(e);\n }\n\n }\n }\n return pc;\n }", "public void testUpdateProjeto() {\n Projeto p = ProjetoDAO.getProjetoByNome(\"proj4\");\n p.setDuracao(100);\n ProjetoDAO.updateProjeto(p);\n Projeto aux = ProjetoDAO.getProjetoByNome(\"proj4\");\n assertEquals(100, aux.getDuracao());\n }", "int updateByPrimaryKeySelective(SysTeam record);", "public void saveNewProject(){\n String pn = tGUI.ProjectTextField2.getText();\n String pd = tGUI.ProjectTextArea1.getText();\n String statusID = tGUI.StatusComboBox.getSelectedItem().toString();\n String customerID = tGUI.CustomerComboBox.getSelectedItem().toString();\n\n int sstatusID = getStatusID(statusID);\n int ccustomerID = getCustomerID(customerID);\n\n try {\n pstat = cn.prepareStatement (\"insert into projects (project_name, project_description, project_status_id, customer_id) VALUES (?,?,?,?)\");\n pstat.setString(1, pn);\n pstat.setString(2,pd);\n pstat.setInt(3, sstatusID);\n pstat.setInt(4, ccustomerID);\n pstat.executeUpdate();\n\n }catch (SQLException ex) {\n Logger.getLogger(ProjectMethods.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public static void updateArchitect(){\n projectChosen = getQuestionInput();\r\n try {\r\n Connection myConn = DriverManager.getConnection(url, user, password);\r\n\r\n String sqlInsert = \"UPDATE projects \" +\r\n \" SET architect_name = ?, architect_tel = ?, architect_email = ?, architect_address = ?\" +\r\n \"WHERE project_num = \" +projectChosen;\r\n\r\n PreparedStatement pstmt = myConn.prepareStatement(sqlInsert);\r\n pstmt.setString(1, NewProject.architect_name);\r\n pstmt.setString(2, NewProject.architect_tel);\r\n pstmt.setString(3, NewProject.architect_email);\r\n pstmt.setString(4, NewProject.architect_address);\r\n pstmt.executeUpdate(); //Execute update of database.\r\n pstmt.close();\r\n\r\n } catch (SQLException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void updateCalendarProject(String id, CalendarProject project) {\n String sql = \"UPDATE calendar_projects SET name = :name, duration = :duration WHERE id = :id \";\n Map params = new HashMap();\n params.put(\"id\", id);\n params.put(\"name\", project.getProject());\n params.put(\"duration\", project.getDuration());\n int rows = jdbcTemplate.update(sql, params);\n if (rows != 1) {\n throw new DataAccessException(\"Unexpected rows. Expected: 1 Rows: \" + rows) {\n };\n }\n }", "int updateByPrimaryKey(SysNotice record);", "int updateByPrimaryKey(CptDataStore record);", "int updateByPrimaryKey(YzStiveExplosion record);", "int updateByPrimaryKeySelective(ProjGroup record);", "public void update(ProjectPk pk, Project dto) throws ProjectDaoException {\n\t\tlong t1 = System.currentTimeMillis();\n\t\t// declare variables\n\t\tfinal boolean isConnSupplied = (userConn != null);\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\ttry{\n\t\t\t// get the user-specified connection or get a connection from the\n\t\t\t// ResourceManager\n\t\t\tconn = isConnSupplied ? userConn : ResourceManager.getConnection();\n\t\t\tif (logger.isDebugEnabled()){\n\t\t\t\tlogger.debug(\"Executing \" + SQL_UPDATE + \" with DTO: \" + dto);\n\t\t\t}\n\n\t\t\tstmt = conn.prepareStatement(SQL_UPDATE);\n\t\t\tint index = 1;\n\t\t\tstmt.setInt(index++, dto.getId());\n\t\t\tstmt.setInt(index++, dto.getOwnerId());\n\t\t\tstmt.setInt(index++, dto.getCreatorId());\n\t\t\tstmt.setString(index++, dto.getName());\n\t\t\tstmt.setString(index++, dto.getDescription());\n\t\t\tif (dto.isCompanyIdNull()){\n\t\t\t\tstmt.setNull(index++, java.sql.Types.INTEGER);\n\t\t\t} else{\n\t\t\t\tstmt.setInt(index++, dto.getCompanyId());\n\t\t\t}\n\n\t\t\tstmt.setString(index++, dto.getBillAddress());\n\t\t\tstmt.setString(index++, dto.getBillCity());\n\t\t\tif (dto.isBillZipCodeNull()){\n\t\t\t\tstmt.setNull(index++, java.sql.Types.INTEGER);\n\t\t\t} else{\n\t\t\t\tstmt.setInt(index++, dto.getBillZipCode());\n\t\t\t}\n\n\t\t\tstmt.setString(index++, dto.getBillState());\n\t\t\tstmt.setString(index++, dto.getBillCountry());\n\t\t\tstmt.setString(index++, dto.getBillTelNum());\n\t\t\tstmt.setString(index++, dto.getBillFaxNum());\n\t\t\tstmt.setString(index++, dto.getIsEnable());\n\t\t\tstmt.setString(index++, dto.getMessageBody());\n\t\t\tstmt.setInt(index++, dto.getEsrqmId());\n\t\t\tstmt.setTimestamp(index++, dto.getCreateDate() == null ? null : new java.sql.Timestamp(dto.getCreateDate().getTime()));\n\t\t\tstmt.setInt(index++, dto.getLastModifiedBy());\n\t\t\tstmt.setTimestamp(index++, dto.getLastModifiedOn() == null ? null : new java.sql.Timestamp(dto.getLastModifiedOn().getTime()));\n\t\t\tstmt.setInt(20, pk.getId());\n\t\t\tint rows = stmt.executeUpdate();\n\t\t\treset(dto);\n\t\t\tlong t2 = System.currentTimeMillis();\n\t\t\tif (logger.isDebugEnabled()){\n\t\t\t\tlogger.debug(rows + \" rows affected (\" + (t2 - t1) + \" ms)\");\n\t\t\t}\n\t\t} catch (Exception _e){\n\t\t\tlogger.error(\"Exception: \" + _e.getMessage(), _e);\n\t\t\tthrow new ProjectDaoException(\"Exception: \" + _e.getMessage(), _e);\n\t\t} finally{\n\t\t\tResourceManager.close(stmt);\n\t\t\tif (!isConnSupplied){\n\t\t\t\tResourceManager.close(conn);\n\t\t\t}\n\n\t\t}\n\n\t}", "public void commit() {\n }", "int updateByPrimaryKey(ParseTableLog record);", "int updateByPrimaryKey(CGcontractCredit record);", "int updateByPrimaryKey(HrMscChaAssig record);", "int updateByPrimaryKey(CTipoComprobante record) throws SQLException;", "int updateByPrimaryKeySelective(Ltsprojectpo record);", "int updateByPrimaryKey(SysOrganization record);", "public void commit();", "int updateByPrimaryKey(ec_environment record);", "int updateByPrimaryKey(ItemStockDO record);", "int updateByPrimaryKey(ItemStockDO record);", "int updateByPrimaryKey(OrgMemberRecord record);", "int uploadProjectedTrmm(File file, String project, DataDate date, DataDate updated) throws IOException, SQLException;", "@Override\n\tpublic void update(StockDataRecord bo) throws SQLException {\n\t\t\n\t}", "int updateByPrimaryKey(ParkCurrent record);", "int updateByPrimaryKey(Miss_control_log record);", "public void updateCSOfChangeObject(Context context, String strProgProjId, String strChangeObjectID) throws Exception {\n logger.debug(\"PSS_enoECMChangeRequest : updateCSOfChangeObject : START\");\n try {\n if (UIUtil.isNotNullAndNotEmpty(strProgProjId) && UIUtil.isNotNullAndNotEmpty(strChangeObjectID)) {\n BusinessObject busProgProjObj = new BusinessObject(strProgProjId);\n User usrProgProjProjectName = busProgProjObj.getProjectOwner(context);\n String strProgProjProjectName = usrProgProjProjectName.toString();\n BusinessObject busChangeObj = new BusinessObject(strChangeObjectID);\n User usrChangeProjectName = busChangeObj.getProjectOwner(context);\n String strChangeObjectProjectName = usrChangeProjectName.toString();\n if (!strProgProjProjectName.equalsIgnoreCase(strChangeObjectProjectName)) {\n MqlUtil.mqlCommand(context, \"history off\", true, false);\n boolean isContextPushed = false;\n ContextUtil.pushContext(context, PropertyUtil.getSchemaProperty(context, TigerConstants.PERSON_USER_AGENT), DomainConstants.EMPTY_STRING, DomainConstants.EMPTY_STRING);\n isContextPushed = true;\n busChangeObj.open(context);\n busChangeObj.setProjectOwner(context, strProgProjProjectName);\n busChangeObj.update(context);\n busChangeObj.close(context);\n if (isContextPushed) {\n ContextUtil.popContext(context);\n isContextPushed = false;\n }\n MqlUtil.mqlCommand(context, \"history on\", true, false);\n\n String strMqlHistory = \"modify bus $1 add history $2 comment $3\";\n\n StringBuffer sbInfo = new StringBuffer();\n sbInfo.append(\"project: \");\n sbInfo.append(strProgProjProjectName);\n\n MqlUtil.mqlCommand(context, strMqlHistory, strChangeObjectID, \"change\", sbInfo.toString() + \" was \" + strChangeObjectProjectName);\n\n }\n }\n logger.debug(\"PSS_enoECMChangeRequest : updateCSOfChangeObject : END\");\n } catch (Exception ex) {\n logger.error(\"Error in PSS_enoECMChangeRequest : updateCSOfChangeObject : ERROR \", ex);\n throw ex;\n }\n }", "int updateByPrimaryKey(CommunityInform record);", "void commit(String workspace);", "int updateByPrimaryKey(Commet record);", "public void commit() {\n doCommit();\n }", "int updateByPrimaryKey(ComplainNoteDO record);", "int updateByPrimaryKey(FctWorkguide record);", "public String editSubmittedProjectQuery(String username, String field, String value) \r\n\t{\r\n\t\tString query = \"UPDATE SubmittedProject SET \"+field+\" = \"+\"\\\"\"+value+\"\\\" where username = \\\"\"+username+\"\\\"\";\r\n\t\tSystem.out.println(query);\r\n\t\treturn query;\r\n\t}", "int uploadProjectedEto(File file, String project, DataDate date, DataDate updated) throws IOException, SQLException;", "public void commit(){\n \n }", "int updateByPrimaryKey(PfCombElementEvent record);", "@Override\r\n\tpublic Project updateProjectById(Project projectId) {\n\t\treturn projectDAO.updateProjectById(projectId);\r\n\t}", "int updateByPrimaryKey(Caiwu record);", "int updateByPrimaryKey(RepaymentPlanInfoUn record);", "int updateByPrimaryKey(FileRecordAdmin record);", "int updateByPrimaryKey(OpeningRequirement record);", "int updateByPrimaryKey(JzAct record);", "int updateByPrimaryKey(courses record);", "public void commitChanges()\n {\n }", "int updateByPrimaryKey(TerminalInfo record);", "public void commit() {\n\t\tcommitted = true;\n\t}", "Map<Project, JGitStatus> commitChanges(List<Project> projects, String commitMessage, boolean isPushImmediately,\n ProgressListener progressListener);", "int updateByPrimaryKey(AccessModelEntity record);", "@Test\n public void update() {\n try{\n repo.save(s);\n repot.save(t);\n repon.save(n);\n Tema t2 = new Tema(1, 0, 6, \"GUI\");\n Student s2 = new Student(1,221, \"Pop Ion\",\"[email protected]\",\"prof\");\n Nota n2 = new Nota(1, 1, \"prof\", 10, \"Irelevant\");\n repo.save(s2);\n repot.save(t2);\n repon.save(n2);\n repo.update(s2);\n repot.update(t2);\n repon.update(n2);\n assert repo.findOne(1).getGrupa()==221;\n assert repot.findOne(1).getDeadline()==8;\n assert repon.findOne(\"11\").getFeedback()==\"Irelevant\";\n\n }\n catch (ValidationException e){\n }\n }", "int updateByPrimaryKey(PdfCodeTemporary record);", "int updateByPrimaryKey(TDwBzzxBzflb record);", "void commit(boolean isMajor);", "@Override\n\tpublic void commit() {\n\n\t}", "int updateByPrimaryKey(GoodsPo record);", "@Override\n public void commit() {\n }", "int updateByPrimaryKey(FormatOriginRecord record);", "int updateByPrimaryKey(WizardValuationHistoryEntity record);", "protected void commit()\n\t{\n\t\t_Status = DBRowStatus.Unchanged;\n\t}", "int updateByPrimaryKey(SbGroupDetail record);", "int updateByPrimaryKey(DebtsRecordEntity record);", "int updateByPrimaryKey(SysCode record);", "int updateByPrimaryKey(Report record);", "int updateByPrimaryKey(Yqbd record);", "int updateByPrimaryKey(SwipersDO record);", "int updateByPrimaryKey(organize_infoBean record);", "int updateByPrimaryKey(CodeBuildProcedure record);", "int updateByPrimaryKey(RetailModule record);", "int updateByPrimaryKey(R_dept_trade record);" ]
[ "0.6724816", "0.65556616", "0.63477445", "0.63081247", "0.628779", "0.62567055", "0.6151761", "0.61502886", "0.61387277", "0.61206794", "0.60627425", "0.6055018", "0.60458237", "0.60319483", "0.5945332", "0.59377754", "0.593634", "0.5933434", "0.5909056", "0.58477217", "0.5839733", "0.5832732", "0.58258784", "0.5794207", "0.57661694", "0.57661694", "0.5762383", "0.5754231", "0.5753388", "0.57388717", "0.5718308", "0.5712687", "0.5707019", "0.5689827", "0.5673254", "0.566849", "0.56626415", "0.56585205", "0.56565505", "0.5654349", "0.56505543", "0.56449634", "0.5630422", "0.5623021", "0.56155485", "0.5610443", "0.5608992", "0.5606222", "0.5604533", "0.55992985", "0.5597193", "0.5597193", "0.5594906", "0.5589103", "0.5585637", "0.55804676", "0.557904", "0.5578963", "0.55757725", "0.5564441", "0.55637115", "0.5561671", "0.5561647", "0.5556858", "0.55537486", "0.55458534", "0.55442554", "0.55386937", "0.55381405", "0.5535997", "0.55337036", "0.553065", "0.5529266", "0.55225945", "0.5514334", "0.5512948", "0.5512672", "0.5511531", "0.5507568", "0.5507303", "0.5507203", "0.55004114", "0.5499785", "0.5496659", "0.5496126", "0.54954916", "0.54938066", "0.5491204", "0.54891473", "0.5485552", "0.5480673", "0.5476881", "0.5476105", "0.5473755", "0.54724914", "0.546629", "0.5464917", "0.5464829", "0.5464476", "0.5464043" ]
0.6146496
8
update Commit_Record_State DB's data.
public void updateCommitRecordState() { List<String> lsNames = new ArrayList<>(); lsNames = projectDb.listAllProjectNames(); for (String name : lsNames) { Map<String, Integer> map = commitRecordDb.getCommitRecordStateCounts(name); int bs = 0; int ini = 0; int utf = 0; int csf = 0; int cpf = 0; if (map.containsKey(StatusEnum.BUILD_SUCCESS.getTypeName())) { bs = map.get(StatusEnum.BUILD_SUCCESS.getTypeName()); } if (map.containsKey(StatusEnum.INITIALIZATION.getTypeName())) { ini = map.get(StatusEnum.INITIALIZATION.getTypeName()); } if (map.containsKey(StatusEnum.UNIT_TEST_FAILURE.getTypeName())) { utf = map.get(StatusEnum.UNIT_TEST_FAILURE.getTypeName()); } if (map.containsKey(StatusEnum.CHECKSTYLE_FAILURE.getTypeName())) { csf = map.get(StatusEnum.CHECKSTYLE_FAILURE.getTypeName()); } if (map.containsKey(StatusEnum.COMPILE_FAILURE.getTypeName())) { cpf = map.get(StatusEnum.COMPILE_FAILURE.getTypeName()); } int ccs = 0; ccs = bs + utf + csf + cpf; boolean check; check = crsdb.checkCommitRecordStatehw(name); if (check) { crsdb.updateCommitRecordState(name, bs, csf, cpf, utf, ini, ccs); } else { crsdb.addCommitRecordState(name, bs, csf, cpf, utf, ini, ccs); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void commit()\n\t{\n\t\t_Status = DBRowStatus.Unchanged;\n\t}", "void committed() {\n\t\t\tfor (Entry<Integer, Object> entry : newData.entrySet())\n\t\t\t\toriginalData.put(entry.getKey(), entry.getValue());\n\t\t\treset();\n\t\t\taction = RowAction.UPDATE;\n\t\t}", "public void updateRecord() throws LRException\n\t{\n\t\tDataHRecordData myData=(DataHRecordData)getData();\n\t\tgetBackground();\n\t\ttry\n\t\t{\n\t\t\tmyData.record.update(background.getClient());\n\t\t}\n\t\tcatch (LDBException e) { setStatus(e); }\n\t}", "@Override\n\tpublic void update(StockDataRecord bo) throws SQLException {\n\t\t\n\t}", "int updateByPrimaryKey(UploadStateRegDTO record);", "public void update(){\r\n\t\tthis.loadRecords();\r\n\t}", "public int updateByPrimaryKey(State record) {\n int rows = getSqlMapClientTemplate().update(\"lgk_state.abatorgenerated_updateByPrimaryKey\", record);\n return rows;\n }", "private void updateDB() {\n }", "int updateByPrimaryKey(TDwBzzxBzflb record);", "public abstract void updateBlockRecord();", "int updateByPrimaryKey(BPBatchBean record);", "public void updateState( RssGeneratedFile rssFile )\n {\n DAOUtil daoUtil = new DAOUtil( SQL_QUERY_UPDATE );\n daoUtil.setInt( 1, rssFile.getState( ) );\n //FIXME The date should be rssFile.getUpdateDate( )\n daoUtil.setTimestamp( 2, new java.sql.Timestamp( new java.util.Date( ).getTime( ) ) );\n daoUtil.setInt( 3, rssFile.getId( ) );\n daoUtil.executeUpdate( );\n daoUtil.free( );\n }", "public synchronized void updateCommitNumber()\n\t{\n\t\tm_dbCommitNum++;\n\t}", "private void updateDatabase() {\n\t\tAbstractSerializer serializer = new CineplexSerializer();\n\t\tArrayList<String> updatedRecords = serializer.serialize(records);\n\t\tDatabaseHandler.writeToDatabase(DATABASE_NAME, updatedRecords);\n\t}", "int updateByPrimaryKey(PayLogInfoPo record);", "public void update(UsStatePk pk, UsState dto) throws UsStateDaoException;", "int updateByPrimaryKey(BnesBrowsingHis record) throws SQLException;", "int updateByPrimaryKey(UserCourseHistory record);", "int updateByPrimaryKey(WizardValuationHistoryEntity record);", "int updateByPrimaryKey(StatusReplies record);", "int updateByPrimaryKey(BankUserInfo record);", "int updateByPrimaryKey(BankUserInfo record);", "int updateByPrimaryKey(BehaveLog record);", "int updateByPrimaryKey(SysCode record);", "int updateByPrimaryKey(Yqbd record);", "int updateByPrimaryKey(DebtsRecordEntity record);", "int updateByPrimaryKey(TParklotstatusFile record);", "public void updateRecord(Record object);", "int updateByPrimaryKeySelective(UploadStateRegDTO record);", "protected void update() throws SQLException {\n\t\tProperties whereClause = new Properties();\n\t\twhereClause.setProperty(\"1\", \"1\");\n\t\tupdatePersistentState(getSchema(), persistentState, whereClause);\n\t}", "int updateByPrimaryKey(CptDataStore record);", "private void updrec() {\n\t\tsavedata();\n\t\tcontractDetail.retrieve(stateVariable.getXwordn(), stateVariable.getXwabcd());\n\t\tnmfkpinds.setPgmInd36(! lastIO.isFound());\n\t\tnmfkpinds.setPgmInd66(isLastError());\n\t\t// BR00011 Product found on Contract_Detail and NOT ERROR(CONDET)\n\t\tif (! nmfkpinds.pgmInd36() && ! nmfkpinds.pgmInd66()) {\n\t\t\trestoredata();\n\t\t\tcontractDetail.update();\n\t\t\tnmfkpinds.setPgmInd99(isLastError());\n\t\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\t\tmsgObjIdx = setMsgObj(\"Y2U0007\", \"\", msgObjIdx, messages);\n\t\t\t\tstateVariable.setZmsage(subString(errmsg, 1, 78));\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tstateVariable.setZmsage(subString(errmsg, 1, 78));\n\t\t}\n\t}", "@Override\n\tpublic int updateByPrimaryKey(Contract record) {\n\t\treturn contractMapper.updateByPrimaryKey(record);\n\t}", "int updateByPrimaryKey(Miss_control_log record);", "int updateByPrimaryKey(ec_environment record);", "int updateByPrimaryKey(ConfigData record);", "@Override\n\tpublic int updateByPrimaryKey(Checkingin record) {\n\t\treturn 0;\n\t}", "@Override\n\tpublic int updateByPrimaryKey(Cell record) {\n\t\treturn 0;\n\t}", "public void update() {\n\t\tSession session = DBManager.getSession();\n\t\tsession.beginTransaction();\n\t\tsession.update(this);\n\t\tsession.getTransaction().commit();\n\t}", "int updateByPrimaryKey(Transaction record);", "int updateByPrimaryKey(CaseLinkman record);", "R commit(C change);", "int updateByPrimaryKey(BaseCountract record);", "int updateByPrimaryKey(TbComEqpModel record);", "public void commitChanges()\n {\n }", "int updateByPrimaryKey(SvcStoreBeacon record);", "int updateByPrimaryKey(SysNotice record);", "int updateByPrimaryKey(ParkCurrent record);", "@Override\n\tpublic void update(String state,String id) {\n\t\tString query=\"UPDATE Book SET State='\"+state+\"' Where id='\"+id+\"'\";\n\t\texecuteQuery(query);\n\t\tnotifyAllObservers();\n\t\t\n\t}", "int updateByPrimaryKey(CusBankAccount record);", "public void updateDB() {\n \n sql = \"UPDATE Order set \" + \"CustomerID='\"+getCustomerID()+\"',\" + \" Status='\"+getStatus()+\"'\" + \" WHERE OrderID= '\" + getOrderID()+\"'\";\n db.updateDB(sql);\n \n }", "@Override\n\t\tprotected void postUpdate(EspStatusDTO t) throws SQLException {\n\t\t\t\n\t\t}", "int updateByPrimaryKey(EbayLmsLog record);", "@Override\r\n\tpublic int updateByPrimaryKey(PayRecord record) {\n\t\treturn 0;\r\n\t}", "int updateByPrimaryKey(BookDO record);", "int updateByPrimaryKey(DataSync record);", "protected void updateRecord() throws DAOException {\r\n\t\t// Prepara para actualizar\r\n\t\tobject.prepareToUpdate();\r\n\t\t// Actualiza objeto\r\n\t\tobjectDao.update(object);\r\n\t\t// Actualiza relaciones\r\n\t\tfor (Sedrelco relco : object.getRelcos()) {\r\n\t\t\tsedrelcoDao.update(relco);\r\n\t\t}\r\n\t}", "int updateByPrimaryKeyWithBLOBs(StatusReplies record);", "int updateByPrimaryKeySelective(BnesBrowsingHis record) throws SQLException;", "int updateByPrimaryKey(MessageBoardHallEntity record) {\n return mapper.updateByPrimaryKey(record);\n }", "int updateByPrimaryKey(ClOrderInfo record);", "int updateByPrimaryKey(PfCombElementEvent record);", "int updateByPrimaryKey(Leave record);", "int updateByPrimaryKey(PmKeyDbObj record);", "int updateByPrimaryKey(ParseTableLog record);", "int updateByPrimaryKey(NjOrderWork2 record);", "int updateByPrimaryKey(organize_infoBean record);", "int updateByPrimaryKey(JzAct record);", "int updateByPrimaryKeySelective(Miss_control_log record);", "int updateByPrimaryKey(ClinicalData record);", "public void saveState() {\n table.saveState(store);\n }", "int updateByPrimaryKey(Basicinfo record);", "int updateByPrimaryKey(AccessModelEntity record);", "int updateByPrimaryKey(DepAcctDO record);", "int updateByPrimaryKey(ProcurementSource record);", "int updateByPrimaryKey(MenuInfo record);", "int updateByPrimaryKey(TagData record);", "int updateByPrimaryKeySelective(WizardValuationHistoryEntity record);", "int updateByPrimaryKey(CmstTransfdevice record);", "int updateByPrimaryKey(SysId record);", "int updateByPrimaryKey(Ltsprojectpo record);", "SourceMessage commitRecord(SourceRecord record);", "int updateByPrimaryKey(OrgMemberRecord record);", "int updateByPrimaryKey(RepStuLearning record);", "int updateByPrimaryKeySelective(BPBatchBean record);", "int updateByPrimaryKey(Kmffb record);", "int updateByPrimaryKey(FormatOriginRecord record);", "void commit() {\n }", "void commit();", "void commit();", "public void commit() {\n\t\tcommitted = true;\n\t\tbackUp();\n\t\t//back up the current board info at the meanwhile\n\t}", "int updateByPrimaryKey(SmsCleanBagLine record);", "int updateByPrimaryKey(LoginRecordDO record);", "int updateByPrimaryKey(AccuseInfo record);", "int updateByPrimaryKey(CommunityInform record);", "int updateByPrimaryKey(EventDetail record);", "int updateByPrimaryKey(CartDO record);", "int updateByPrimaryKey(ActivityHongbaoPrize record);", "int updateByPrimaryKey(SysTeam record);", "int updateByPrimaryKey(Access record);" ]
[ "0.69194263", "0.6584306", "0.6575718", "0.63218546", "0.6248577", "0.6151959", "0.6148879", "0.60799986", "0.6066856", "0.6048001", "0.6014509", "0.6010325", "0.59958357", "0.5990655", "0.59722483", "0.5963134", "0.5955959", "0.5953004", "0.5935319", "0.59234977", "0.5922538", "0.5922538", "0.5913192", "0.5899788", "0.5892994", "0.58907676", "0.5872912", "0.5866923", "0.58661884", "0.5865057", "0.58637065", "0.5858978", "0.58510023", "0.5848376", "0.5843744", "0.5843045", "0.58095175", "0.580518", "0.58051676", "0.58016014", "0.5798377", "0.5783117", "0.57811284", "0.57722306", "0.5762329", "0.57617074", "0.57607764", "0.575621", "0.57510793", "0.5743722", "0.5742699", "0.57313186", "0.57313067", "0.57275736", "0.5726375", "0.572466", "0.5720436", "0.5717094", "0.5714598", "0.57125634", "0.5700439", "0.5700087", "0.56956357", "0.5695135", "0.5693291", "0.56912416", "0.56826943", "0.56812954", "0.56737614", "0.5672569", "0.5670836", "0.5666197", "0.566613", "0.5666048", "0.56589115", "0.5655025", "0.5653212", "0.5652743", "0.5651042", "0.565057", "0.5650432", "0.5648484", "0.564843", "0.56471044", "0.56463176", "0.5642899", "0.56392777", "0.563637", "0.56358474", "0.56358474", "0.56302536", "0.5627448", "0.56269276", "0.5626738", "0.56245315", "0.5622938", "0.56220305", "0.56149966", "0.5613384", "0.5612686" ]
0.7507856
0
delete build result of hw.
public void deleteResult(String hw) { IDatabase database = new MySqlDatabase(); Connection connection = database.getConnection(); db.deleteResult(hw); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void cleanAutomationResults() {\n \tLOG.info(\"Deleting unneccessary automation results.\");\n \t\n \t// Stop the graph database because it gets deleted\n \tDBUtil.closeGraph();\n \t\n \t// Remove clustering results\n \tFileUtil.deleteFileOrDirectory(clArgs.clusteringOutDir);\n \t\n \t// Remove graph database\n \tFileUtil.deleteFileOrDirectory(DBUtil.getNeo4jPath());\n }", "protected void cleanup() {\n // if the java runtime is holding onto any files in the build dir, we\n // won't be able to delete them, so we need to force a gc here\n System.gc();\n\n if (deleteFilesOnNextBuild) {\n // delete the entire directory and all contents\n // when we know something changed and all objects\n // need to be recompiled, or if the board does not\n // use setting build.dependency\n //Base.removeDir(tempBuildFolder);\n \n // note that we can't remove the builddir itself, otherwise\n // the next time we start up, internal runs using Runner won't\n // work because the build dir won't exist at startup, so the classloader\n // will ignore the fact that that dir is in the CLASSPATH in run.sh\n Base.removeDescendants(tempBuildFolder);\n \n deleteFilesOnNextBuild = false;\n } else {\n // delete only stale source files, from the previously\n // compiled sketch. This allows multiple windows to be\n // used. Keep everything else, which might be reusable\n if (tempBuildFolder.exists()) {\n String files[] = tempBuildFolder.list();\n for (String file : files) {\n if (file.endsWith(\".c\") || file.endsWith(\".cpp\") || file.endsWith(\".s\")) {\n File deleteMe = new File(tempBuildFolder, file);\n if (!deleteMe.delete()) {\n System.err.println(\"Could not delete \" + deleteMe);\n }\n }\n }\n }\n }\n \n // Create a fresh applet folder (needed before preproc is run below)\n //tempBuildFolder.mkdirs();\n }", "public void clean(IProgressMonitor mon) throws CoreException{\r\n \t\tif (project!=null){\r\n \t\t\t/**\r\n \t\t\t * closes processes so they don't have locks on resources we'd like to delete\r\n \t\t\t * and they can then be restarted with the newly generated files\r\n \t\t\t */\r\n \t\t\tcloseAllProcesses();\r\n \t\t\tclean(true);\r\n \t\t\tproject.refreshLocal(IResource.DEPTH_ONE, mon);\r\n \t\t\tdeleteCabalProblems();\r\n \t\t\tBuildWrapperPlugin.deleteAllProblems(project);\r\n \t\t\tcabalFileChanged();\r\n \t\t\toutlines.clear();\r\n \t\t\tif (SandboxHelper.isSandboxed(this)){\r\n \t\t\t\ttry {\r\n \t\t\t\t\tSandboxHelper.installDeps(this);\r\n \t\t\t\t} catch (CoreException ce){\r\n \t\t\t\t\tBuildWrapperPlugin.logError(BWText.error_sandbox,ce);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tsynchronize(false);\r\n \t\t}\r\n \t}", "public boolean deleteBuild(int buildId);", "public void clean(){\n preprocessorActionsPerFile.clear();\n }", "public void deleteOutputData() {\n\t\tif (outputData != null) {\n\t\t\tFile file = outputData;\n\t\t\toutputData = null;\n\t\t\tsave();\n\t\t\tfile.delete();\n\t\t}\n\t}", "void unsetLastrunresult();", "private void clearOneTest() {\n corpus.clear();\n Factory.deleteResource(corpus);\n Factory.deleteResource(learningApi);\n controller.remove(learningApi);\n controller.cleanup();\n Factory.deleteResource(controller);\n }", "void smem_clear_result(IdentifierImpl state)\n {\n final SemanticMemoryStateInfo smem_info = smem_info(state);\n while(!smem_info.smem_wmes.isEmpty())\n {\n final Preference pref = smem_info.smem_wmes.remove(); // top()/pop()\n \n if(pref.isInTempMemory())\n {\n recMem.remove_preference_from_tm(pref);\n }\n }\n }", "private void finishBuilding() {\n buildTarget = null;\n buildStep = 0;\n buildInstructions = null;\n buildLocation = null;\n buildHeight = null;\n\n knowledge.myState = RobotState.IDLE;\n }", "public void deleteResults(){\n }", "public void clean();", "public void clean();", "public void clean();", "public void clean();", "void clean();", "void clean();", "void clean();", "public void deleteTemporaryProject() throws CoreException{\n\t\tString versionName = DataManager.getProjectVersion();\n\t\tajdtHandler.deleteProject(versionName);\n\t\t\n\t\tif(versionName.contains(\"_Old\")){\n\t\t\tversionName = versionName.replace(\"_Old\", \"\");\n\t\t\tajdtHandler.deleteProject(versionName);\n\t\t}\n\t\t\n\t}", "@Override\n public void onSuccess(ApiResult<R> result) {\n IDBHelper dbHelper = Helpers.dBHelper();\n dbHelper.deleteEntity(CacheEntity.class, \"key = ?\", cacheEntity.getKey());\n showAsyncRunnableState(false);\n }", "private void DeleteCMVMMVData() {\n String path = GetFilePath();\r\n File dir = new File(path);\r\n for (File file : dir.listFiles())\r\n if (!file.isDirectory())\r\n file.delete();\r\n DownloadCMVMMVFiles();//state, circle, ran, div\r\n }", "public void clean();", "public void cleanAfterSample() {\n if(previousResult != null) {\n previousResult.cleanAfterSample();\n }\n samplerContext.clear();\n }", "void purge();", "public void delete() {\n if (this.sourceInfo != null) {\n this.sourceInfo.removeSSRC(this);\n }\n }", "@Override\n protected void performCleanup() {\n }", "public void abortBuilding() {\n buildTarget = null;\n buildStep = 0;\n buildInstructions = null;\n buildLocation = null;\n buildHeight = null;\n\n knowledge.myState = RobotState.IDLE;\n }", "private void clearBuild() {\n bitField0_ = (bitField0_ & ~0x00000004);\n build_ = 0L;\n }", "private synchronized void shrink() {\n if (isMutable()) {\n throw new IllegalStateException(\"Can't shrink a mutable test result!\");\n }\n\n // Should ensure we have a resultsFile.\n sections = null;\n\n // NOTE: if either of these are discarded, it may be a good idea to\n // optimize reload() to not read the section/stream data since\n // a small property lookup could incur a huge overhead\n //props = null; // works, may or may-not improve memory usage\n //desc = null; // doesn't work in current implementation\n }", "private void deleteSpecificBuildsAndUpdateResponse(RestResponse response, BuildCoordinate coordinate) {\n String buildName = coordinate.getBuildName();\n String buildNumber = coordinate.getBuildNumber();\n long buildDate = coordinate.getDate();\n BasicStatusHolder multiStatusHolder = new BasicStatusHolder();\n try {\n String buildStarted = DateUtils.formatBuildDate(buildDate);\n BuildRun buildRun = buildService.getBuildRun(buildName, buildNumber, buildStarted);\n buildService.deleteBuild(buildRun, false, multiStatusHolder);\n multiStatusHolder.status(String.format(\"Successfully deleted build '%s' #%s.\", buildName, buildNumber),\n log);\n if (multiStatusHolder.hasErrors()) {\n response.error(multiStatusHolder.getLastError().getMessage());\n } else if (multiStatusHolder.hasWarnings()) {\n List<StatusEntry> warnings = multiStatusHolder.getWarnings();\n response.warn(warnings.get(warnings.size() - 1).getMessage());\n return;\n }\n } catch (Exception exception) {\n String error = String.format(\"Exception occurred while deleting build '%s' #%s\", buildName, buildNumber);\n multiStatusHolder.error(error, exception, log);\n response.error(error);\n }\n }", "private void fullBuild() throws CoreException {\n \t\ttry {\n \t\t\tIFolder sortedFolder = getSortedFolder();\n \t\t\tIFolder unsortedFolder = getUnsortedFolder();\n \n \t\t\tif (sortedFolder.exists()) {\n \t\t\t\t//delete all sorted files\n \t\t\t\tIResource[] members = sortedFolder.members();\n \t\t\t\tfor (int i = 0; i < members.length; i++) {\n \t\t\t\t\tdeleteResource(members[i]);\n \t\t\t\t}\n \t\t\t}\n \n \t\t\tif (unsortedFolder.exists()) {\n \t\t\t\tfullBuild(unsortedFolder);\n \t\t\t}\n \t\t} catch (Exception e) {\n \t\t\tthrow new ResourceException(IResourceStatus.BUILD_FAILED, null, \"Sort builder failed\", e);\n \t\t}\n \t}", "private void cleanReporter(){\n File file = new File(\"test-report.html\");\n file.delete();\n\n }", "private void cleanupLocal() throws IOException {\n FileSystem lfs = FileSystem.getLocal(new Configuration());\n lfs.delete(new Path(\"build\"), true);\n System.setProperty(\"hadoop.log.dir\", \"logs\");\n }", "public void cleanup();", "@Override\n\tpublic void deconfigure() throws CoreException {\n\t\tPTJavaFileBuilder.removeBuilderFromProject(fProject);\n\t\t// TO DO: delete markers here\n\t}", "protected void doDeleteBuilding() {\r\n\t\tif (renderer.surface != null) {\r\n\t\t\tUndoableMapEdit undo = new UndoableMapEdit(renderer.surface);\r\n\t\t\tdeleteEntitiesOf(renderer.surface.buildingmap, renderer.selectedRectangle, true);\r\n\t\t\tundo.setAfter();\r\n\t\t\taddUndo(undo);\r\n\t\t\trepaint();\r\n\t\t}\r\n\t}", "public void Clean()\n\t{\n\t\tstorage.clear();\n\t}", "public void cleanup() {\r\n }", "static void clean(Configuration conf) throws IOException {\n if (!debug(conf)) {\n int iteration = getCurrentIteration(conf);\n for (int i = 0; i <= iteration; i++) {\n deleteIfExists(conf, OUTPUT_BASE + i);\n deleteIfExists(conf, OUTPUT_BASE + i + TEMP_SUFFIX);\n deleteIfExists(conf, SCHEMA_BASE + i);\n }\n deleteIfExists(conf, \"input\");\n }\n }", "public void cleanup() {\n }", "private static void deleteTest() throws SailException{\n\n\t\tString dir2 = \"repo-temp\";\n\t\tSail sail2 = new NativeStore(new File(dir2));\n\t\tsail2 = new IndexingSail(sail2, IndexManager.getInstance());\n\t\t\n//\t\tsail.initialize();\n\t\tsail2.initialize();\n\t\t\n//\t\tValueFactory factory = sail2.getValueFactory();\n//\t\tCloseableIteration<? extends Statement, SailException> statements = sail2\n//\t\t\t\t.getConnection().getStatements(null, null, null, false);\n\n\t\tSailConnection connection = sail2.getConnection();\n\n\t\tint cachesize = 1000;\n\t\tint cached = 0;\n\t\tlong count = 0;\n\t\tconnection.removeStatements(null, null, null, null);\n//\t\tconnection.commit();\n\t}", "@Override\r\n\tpublic void unexecute() {\n\t\t\r\n\t}", "public void deleteGeneratedFiles();", "private void unloadProject()\n {\n if (projectBuilder != null) {\n projectBuilder.database.close();\n projectBuilder = null;\n }\n\n if (projectSettingsPanel != null) {\n Container container = projectSettingsPanel.getParent();\n if (container != null)\n container.remove(projectSettingsPanel);\n projectSettingsPanel = null;\n }\n\n projectSettingsContainer.removeAll();\n generateButton.setEnabled(false);\n\n project = null;\n }", "private void cleanOutputFiles() throws DeviceNotAvailableException {\n CLog.d(\"Remove output file: %s\", mOutputFile);\n String extStore = mTestDevice.getMountPoint(IDevice.MNT_EXTERNAL_STORAGE);\n mTestDevice.executeShellCommand(String.format(\"rm %s/%s\", extStore, mOutputFile));\n }", "void deleteChains() {\n\t\tif (!params.isDebug()) {\n\t\t\tfor (File deleteCandidate : toDelete) {\n\t\t\t\tdeleteCandidate.delete();\n\t\t\t\t\n\t\t\t\ttry (DirectoryStream<Path> directoryStream = Files.newDirectoryStream(deleteCandidate.toPath())) {\n\t\t\t\t\tfor (Path path : directoryStream) {\n\t\t\t\t\t\tif (!path.getFileName().toString().endsWith(\"_SCWRLed.pdb\")) {\n\t\t\t\t\t\t\tpath.toFile().delete();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException ex) {\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void clearFramework() {\r\n\t\tList<Configuration> tests = testCache.getAllTests();\r\n\t\tlog.info(\"Clearing all tests.\\n\");\r\n\t\tfor (Configuration test : tests) {\r\n\t\t\tkillTest(test.getUniqueId());\r\n\t\t}\r\n\t\tworkQueue.clear();\r\n\t\ttestCache.clear();\r\n\t}", "public void clear() {\n results.clear();\n }", "public void cleanup()\n {\n CogTool.delayedWorkMgr.doDelayedWork(true);\n }", "public void remFile(){\n ((MvwDefinitionDMO) core).remFile();\n }", "public GeobatchRunInfo cleanRunInformation(String... compositeId) {\n GeobatchRunInfo last = null;\n List<GeobatchRunInfo> list = search(generateDecription(compositeId));\n if(list != null\n && !list.isEmpty()){\n // obtain last\n last = list.get(0);\n // Delete all resources\n for(GeobatchRunInfo runInfo: list){\n RESTResource resource = getRestResource(runInfo);\n geostoreClient.deleteResource(resource.getId());\n }\n }\n return last;\n }", "public void cleanup() {\n\t}", "public void deleteInst() {\n\t\tlogger.debug(\"DeviceNameTableTester has been stopped\");\n\t}", "@Override\n\t \tpublic void run() {\n\t \t\tsuper.run();\n\t \t\t FileUtil.DeleteFile(new File(Environment.getExternalStorageDirectory() + \"/\"+\"jikedownload\"));\n\t \t}", "public void destory(){\n \n }", "void execute() {\n deleteNextEntry();\n }", "void vacuum( String workspaceName, long revision);", "protected static void cleanUpWorkingDir() {\n final Path testControllerPath =\n Paths.get(SystemPersistence.manager.getConfigurationPath().toString(), TEST_CONTROLLER_FILE);\n try {\n Files.deleteIfExists(testControllerPath);\n } catch (final Exception e) {\n logger.info(\"Problem cleaning {}\", testControllerPath, e);\n }\n\n final Path testControllerBakPath =\n Paths.get(SystemPersistence.manager.getConfigurationPath().toString(), TEST_CONTROLLER_FILE_BAK);\n try {\n Files.deleteIfExists(testControllerBakPath);\n } catch (final Exception e) {\n logger.info(\"Problem cleaning {}\", testControllerBakPath, e);\n }\n }", "public void unsetComparesource()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(COMPARESOURCE$2, 0);\r\n }\r\n }", "public void cleanResult() throws Exception {\n\t\tStatement statement = connect.createStatement();\n\t\ttry {\n\t\t\tstatement.executeUpdate(\"TRUNCATE TABLE search_result\");\n\n\t\t\tSystem.out.println(\"Successfully clean original data\");\n\n\t\t} catch (SQLException e) {\n\n\t\t}\n\t}", "abstract public void deleteAfterBetaReduction();", "void cleanUp();", "void cleanUp();", "void cleanUp();", "public void delete(){\n if (shx!=null) shx.delete();\n if (shp!=null) shp.delete();\n if (dbf!=null) dbf.delete();\n if (prj!=null) prj.delete();\n }", "public void cleanUp();", "public void cleanUp();", "public Builder clearResult() {\n \n result_ = 0;\n onChanged();\n return this;\n }", "@Override\n\tpublic void delete()\n\t{\n\t\tcachedContent = null;\n\t\tFile outputFile = getStoreLocation();\n\t\tif ((outputFile != null) && outputFile.exists())\n\t\t{\n\t\t\tif (Files.remove(outputFile) == false)\n\t\t\t{\n\t\t\t\tlog.error(\"failed to delete file: \" + outputFile.getAbsolutePath());\n\t\t\t}\n\t\t}\n\t}", "public void clean() {\n\t\tSystem.out.println(\"Guitar is clean\");\n\t}", "private static void deleteElement(RubyProjectElement element) {\r\n \t\tRubyProject projectInternal = element.getRubyProjectInternal();\r\n \t\tprojectInternal.getRubyElementsInternal().remove(element);\r\n \r\n deleteResource(element); \r\n \t}", "@Override\n\tpublic void del() {\n\t\ttarget.del();\n\t}", "@Override\n\t\tpublic void delete() {\n\t\t\tSystem.out.println(\"새로운 삭제\");\n\t\t}", "@Override\r\n\tpublic void cleanup() {\n\t\t\r\n\t}", "public void destroy()\r\n\t{\r\n\t\tlog.fine(\"destroy\");\r\n\t}", "public void cleanup() {\n try {\n resManager.stopVirtualNodes();\n } catch (Exception e) {\n logger.error(ITConstants.TS + \": \" + DEL_VM_ERR, e);\n }\n logger.info(\"Cleanup done\");\n }", "@Test\n public void test01cleanup() throws IOException {\n // when\n Map<String, Job> jobs = jenkins.getJobs();\n for (String jobName: jobs.keySet()) {\n if (!JOB_GENERATOR_JOB_NAME.equals(jobName)) {\n jenkins.deleteJob(jobName);\n }\n }\n jobs = jenkins.getJobs();\n\n // then\n assertThat(jobs.size(), is(1));\n }", "public Builder clearResult() {\n \n result_ = false;\n onChanged();\n return this;\n }", "public void clearProduction() {\n genClient.clear(CacheKey.production);\n }", "public void cleanUp(){\n glDeleteTextures(ID);\n }", "private static void deleteResource(ProjectElement element) {\r\n \t\tResource resource = element.eResource();\r\n \t\tif (resource != null) {\r\n resource.getContents().remove(element);\r\n resource.unload();\r\n } \r\n \t}", "public void clearProgramSpecCache() {\n programSpec = null;\n }", "public boolean rm() {\n return false;\n }", "private void delete() {\n\n\t}", "public void clear() {\n\t\tresults.clear();\n\t}", "@After\n\tpublic void tearDown() {\n\t\theroRepository.delete(HERO_ONE_KEY);\n\t\theroRepository.delete(HERO_TWO_KEY);\n\t\theroRepository.delete(HERO_THREE_KEY);\n\t\theroRepository.delete(HERO_FOUR_KEY);\n\t\theroRepository.delete(\"hero::counter\");\n\t}", "public void deleteResult(int scanId, String technology, String address){\n if(technology.equals(\"Bluetooth\"))\n db.delete(DATABASE_TABLE_BTRESULTS,\"_id=\"+scanId+\" AND DeviceAddress='\"+address+\"'\" ,null);\n if(technology.equals(\"Wifi\"))\n db.delete(DATABASE_TABLE_WIFIRESULTS,\"_id=\"+scanId+\" AND BSSID='\"+address+\"'\" ,null);\n }", "public void delete()\n {\n if (this.data != null)\n {\n this.data.free();\n this.data = null;\n }\n \n this.width = 0;\n this.height = 0;\n \n this.mipmaps = 1;\n }", "public void deleteCurrWorker() {\n this.currWorker = null;\n }", "public void atExitOfWorker(Worker w, Model model)\n {\n w.setDistLastPheroDrop(w.getPheromonePolicy().getDropDistance()+1);\n //remove all the pheromones that were detected and visited in the way towards\n w.removeAllDetectedPhero();\n w.removeAllVisitedPhero();\n\n model.findPheromones(w);\n w.setMoving(true);\n }", "private static void doWeTerminate() {\n if(nrOfResults == nrOfWorks){\n //clear this round\n nrOfWorks = 0;\n nrOfResults = 0;\n finished = true;\n return;\n }\n }", "public Builder clearResult() {\n\n result_ = false;\n onChanged();\n return this;\n }", "public Builder clearCloudRunRevision() {\n if (cloudRunRevisionBuilder_ == null) {\n if (stepInfoCase_ == 23) {\n stepInfoCase_ = 0;\n stepInfo_ = null;\n onChanged();\n }\n } else {\n if (stepInfoCase_ == 23) {\n stepInfoCase_ = 0;\n stepInfo_ = null;\n }\n cloudRunRevisionBuilder_.clear();\n }\n return this;\n }", "@Override\n\tpublic void destroyProcess() {\n\t\tsuper.destroyProcess();\n\t\tDataDirRemoverHandler ddhHandler = \n\t\t\tnew DataDirRemoverHandler(getLogHandler());\n\t\tddhHandler.setRetryLimitInMillis(2000);\n\t\tddhHandler.execute();\n\t\tportsInUse.remove(port);\n\t}", "@Override\r\n\tpublic void destory() {\n\t\t\r\n\t}", "@AfterClass\n\tpublic static void cleanup() {\n\t\ttestDir.delete();\n\t\tfile.delete();\n\t}", "public void cleanUp(){\n for(ShaderProgram sp : shaderlist){\n sp.cleanup();\n }\n }", "void onCleanup() {\n\t\tdimensionMap.forEachValue(e -> {\n\t\t\te.releaseAllChunkData();\n\t\t\treturn true;\n\t\t});\n\t\tdimensionMap.clear();\n\t\tconnectedPlayers.clear();\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tFile dir = new File(\"src/reports\");\n\t\t\t\tfor (File file : dir.listFiles())\n\t\t\t\tif (!file.isDirectory())\n\t\t\t\tfile.delete();\n\t\t\t\t}", "@Override\n\tpublic void delete(DatabaseHandler db) {\n\t\tdb.deleteWork(this);\n\t\t\n\t}" ]
[ "0.6379832", "0.60214525", "0.59558034", "0.59180135", "0.5882501", "0.5835209", "0.58107793", "0.5794409", "0.56863505", "0.5678449", "0.5657575", "0.56394815", "0.56394815", "0.56394815", "0.56394815", "0.5611113", "0.5611113", "0.5611113", "0.5574046", "0.55452466", "0.55338436", "0.552337", "0.5514595", "0.5508436", "0.5506896", "0.5503792", "0.5476451", "0.5473467", "0.5440866", "0.5422218", "0.5405866", "0.53976226", "0.53917813", "0.5390866", "0.53835213", "0.5368495", "0.536371", "0.5362866", "0.5353243", "0.53473014", "0.5347282", "0.5343255", "0.53293806", "0.5327026", "0.5326425", "0.5315593", "0.5312704", "0.5304341", "0.53011197", "0.5288058", "0.52843183", "0.5274296", "0.52729565", "0.5270337", "0.5265885", "0.52641076", "0.52565527", "0.52493876", "0.5242879", "0.5242205", "0.52358854", "0.5226747", "0.5226747", "0.5226747", "0.5223596", "0.52223116", "0.52223116", "0.52171123", "0.5216616", "0.5212837", "0.5209969", "0.520895", "0.5207826", "0.52012205", "0.5199255", "0.5198179", "0.51960963", "0.5191144", "0.51795775", "0.51781964", "0.517558", "0.516775", "0.51622367", "0.5160307", "0.5158899", "0.5149331", "0.51465195", "0.5142208", "0.5141597", "0.5140865", "0.5139746", "0.5138309", "0.5136225", "0.5134253", "0.512942", "0.51202834", "0.51193595", "0.51188046", "0.5117754", "0.5112279" ]
0.7049606
0
returns id of the problem
public int getProblemId() { return problemId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getProblemId() {\n return this.problemId;\n }", "public Problem(String id) {\n\t\t this.id=id;\n\t }", "public void setProblemId(String id) {\n this.problemId = id;\n }", "public int getProblemId(String title) {\n int problemId = -1;\n String query = \"select id from problem where title=? \";\n try (Connection myConn = Database.getConnection();\n PreparedStatement statement = myConn.prepareStatement(query);) {\n statement.setString(1, title);\n try (ResultSet rs = statement.executeQuery();) {\n if (rs.next()) problemId = rs.getInt(\"id\");\n }\n } catch (SQLException e) {\n e.printStackTrace();\n }\n return problemId;\n }", "Integer getId();", "Integer getId();", "Integer getId();", "Integer getID();", "Integer getID();", "private int getId() {\r\n\t\treturn id;\r\n\t}", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "int getID();", "int getQuestId();", "int getQuestId();", "int getQuestId();", "int getQuestId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "int getId();", "public int getProblemNumber() {\n return problemNumber;\n }", "Object getId();", "final protected int getId() {\n\t\treturn id;\n\t}", "public int getId(){\r\n\t\treturn id;\r\n\t}", "public int getId(){\r\n\t\treturn id;\r\n\t}", "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();", "java.lang.String getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();" ]
[ "0.7462552", "0.69851935", "0.6771313", "0.670854", "0.6513685", "0.6513685", "0.6513685", "0.6499365", "0.6499365", "0.64950657", "0.63764083", "0.63764083", "0.63764083", "0.63764083", "0.63764083", "0.63764083", "0.63764083", "0.63764083", "0.63764083", "0.63764083", "0.63764083", "0.6374834", "0.6374834", "0.6374834", "0.6374834", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.63525546", "0.629539", "0.62942165", "0.6291361", "0.6281714", "0.6281714", "0.6272598", "0.6268255", "0.6268255", "0.6268255", "0.6268255", "0.6268255", "0.6268255", "0.6268255", "0.6268255", "0.6268255", "0.6268255", "0.6268255", "0.6268255", "0.6268255", "0.6268255", "0.6268255", "0.6268255", "0.6268255", "0.6268255", "0.6268255", "0.62669015", "0.62669015", "0.62669015", "0.62669015", "0.62669015", "0.62669015", "0.62669015", "0.62669015" ]
0.77793604
0