blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
132 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
28 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
352
a27c5abf66d6e1af3004a3dae1f23ca354c530ca
d5292e473404e2b50715e85eae00208806c9a02a
/org.knime.core.testing/src/org/knime/core/data/DataTableDomainCreatorTest.java
156ba89f63d12a7bf66db08669b371f8d909825e
[]
no_license
lulzzz/knime-core
8ef5a2031759d74ec46cd4cb32275dd23f6ee297
e557cc39a44d4351b3d2ecb52254b4995eaaa1f8
refs/heads/master
2021-01-11T10:28:31.807169
2017-06-19T10:15:53
2017-06-20T07:48:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
19,677
java
/* * ------------------------------------------------------------------------ * * Copyright by KNIME GmbH, Konstanz, Germany * Website: http://www.knime.org; Email: contact@knime.org * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License, Version 3, as * published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see <http://www.gnu.org/licenses>. * * Additional permission under GNU GPL version 3 section 7: * * KNIME interoperates with ECLIPSE solely via ECLIPSE's plug-in APIs. * Hence, KNIME and ECLIPSE are both independent programs and are not * derived from each other. Should, however, the interpretation of the * GNU GPL Version 3 ("License") under any applicable laws result in * KNIME and ECLIPSE being a combined program, KNIME GMBH herewith grants * you the additional permission to use and propagate KNIME together with * ECLIPSE with only the license terms in place for ECLIPSE applying to * ECLIPSE and the GNU GPL Version 3 applying for KNIME, provided the * license terms of ECLIPSE themselves allow for the respective use and * propagation of ECLIPSE together with KNIME. * * Additional permission relating to nodes for KNIME that extend the Node * Extension (and in particular that are based on subclasses of NodeModel, * NodeDialog, and NodeView) and that only interoperate with KNIME through * standard APIs ("Nodes"): * Nodes are deemed to be separate and independent programs and to not be * covered works. Notwithstanding anything to the contrary in the * License, the License does not apply to Nodes, you are not required to * license Nodes under the License, and you are granted a license to * prepare and propagate Nodes, in each case even if such Nodes are * propagated with or for interoperation with KNIME. The owner of a Node * may freely choose the license terms applicable to such Node, including * when such Node is propagated with or for interoperation with KNIME. * --------------------------------------------------------------------- * * History * 05.06.2014 (thor): created */ package org.knime.core.data; import static org.hamcrest.core.Is.is; import static org.hamcrest.core.IsNull.nullValue; import static org.junit.Assert.assertThat; import java.util.Collections; import java.util.HashSet; import java.util.LinkedHashSet; import java.util.Set; import org.junit.Test; import org.knime.core.data.container.DataContainer; import org.knime.core.data.def.DefaultRow; import org.knime.core.data.def.DoubleCell; import org.knime.core.data.def.IntCell; import org.knime.core.data.def.StringCell; /** * Testcases for {@link DataTableDomainCreator}. * * @author Thorsten Meinl, KNIME.com, Zurich, Switzerland */ public class DataTableDomainCreatorTest { /** * Check whether upper and lower bounds are computed correctly for double column (including infinity and NaN). */ @Test public void testBoundsDouble() { DataColumnSpecCreator colSpecCrea = new DataColumnSpecCreator("Double col", DoubleCell.TYPE); DataTableSpec tableSpec = new DataTableSpec(colSpecCrea.createSpec()); RowKey rowKey = new RowKey("Row0"); DataTableDomainCreator domainCreator = new DataTableDomainCreator(tableSpec, false); // initially bounds are null DataColumnDomain colDomain = domainCreator.createSpec().getColumnSpec(0).getDomain(); assertThat("Unexpected lower bound", colDomain.getLowerBound(), is(nullValue())); assertThat("Unexpected upper bound", colDomain.getUpperBound(), is(nullValue())); // NaN values are ignored completely domainCreator.updateDomain(new DefaultRow(rowKey, Double.NaN)); colDomain = domainCreator.createSpec().getColumnSpec(0).getDomain(); assertThat("Unexpected lower bound", colDomain.getLowerBound(), is(nullValue())); assertThat("Unexpected upper bound", colDomain.getUpperBound(), is(nullValue())); // missing cells are also ignored domainCreator.updateDomain(new DefaultRow(rowKey, DataType.getMissingCell())); colDomain = domainCreator.createSpec().getColumnSpec(0).getDomain(); assertThat("Unexpected lower bound", colDomain.getLowerBound(), is(nullValue())); assertThat("Unexpected upper bound", colDomain.getUpperBound(), is(nullValue())); // change lower and upper bound domainCreator.updateDomain(new DefaultRow(rowKey, 0.0)); colDomain = domainCreator.createSpec().getColumnSpec(0).getDomain(); assertThat("Unexpected lower bound", colDomain.getLowerBound(), is((DataCell)new DoubleCell(0))); assertThat("Unexpected upper bound", colDomain.getUpperBound(), is((DataCell)new DoubleCell(0))); // change upper bound domainCreator.updateDomain(new DefaultRow(rowKey, 1.0)); colDomain = domainCreator.createSpec().getColumnSpec(0).getDomain(); assertThat("Unexpected lower bound", colDomain.getLowerBound(), is((DataCell)new DoubleCell(0))); assertThat("Unexpected upper bound", colDomain.getUpperBound(), is((DataCell)new DoubleCell(1))); // change lower bound domainCreator.updateDomain(new DefaultRow(rowKey, -1.0)); colDomain = domainCreator.createSpec().getColumnSpec(0).getDomain(); assertThat("Unexpected lower bound", colDomain.getLowerBound(), is((DataCell)new DoubleCell(-1))); assertThat("Unexpected upper bound", colDomain.getUpperBound(), is((DataCell)new DoubleCell(1))); // ignore NaN (again) domainCreator.updateDomain(new DefaultRow(rowKey, Double.NaN)); colDomain = domainCreator.createSpec().getColumnSpec(0).getDomain(); assertThat("Unexpected lower bound", colDomain.getLowerBound(), is((DataCell)new DoubleCell(-1))); assertThat("Unexpected upper bound", colDomain.getUpperBound(), is((DataCell)new DoubleCell(1))); // ignore missing values (again) domainCreator.updateDomain(new DefaultRow(rowKey, DataType.getMissingCell())); colDomain = domainCreator.createSpec().getColumnSpec(0).getDomain(); assertThat("Unexpected lower bound", colDomain.getLowerBound(), is((DataCell)new DoubleCell(-1))); assertThat("Unexpected upper bound", colDomain.getUpperBound(), is((DataCell)new DoubleCell(1))); // change lower bound to -Inf domainCreator.updateDomain(new DefaultRow(rowKey, Double.NEGATIVE_INFINITY)); colDomain = domainCreator.createSpec().getColumnSpec(0).getDomain(); assertThat("Unexpected lower bound", colDomain.getLowerBound(), is((DataCell)new DoubleCell( Double.NEGATIVE_INFINITY))); assertThat("Unexpected upper bound", colDomain.getUpperBound(), is((DataCell)new DoubleCell(1))); // change upper bound to +Inf domainCreator.updateDomain(new DefaultRow(rowKey, Double.POSITIVE_INFINITY)); colDomain = domainCreator.createSpec().getColumnSpec(0).getDomain(); assertThat("Unexpected lower bound", colDomain.getLowerBound(), is((DataCell)new DoubleCell( Double.NEGATIVE_INFINITY))); assertThat("Unexpected upper bound", colDomain.getUpperBound(), is((DataCell)new DoubleCell( Double.POSITIVE_INFINITY))); } /** * Check whether upper and lower bounds are computed correctly for int column. */ @Test public void testBoundsInt() { DataColumnSpecCreator colSpecCrea = new DataColumnSpecCreator("Int col", IntCell.TYPE); DataTableSpec tableSpec = new DataTableSpec(colSpecCrea.createSpec()); RowKey rowKey = new RowKey("Row0"); DataTableDomainCreator domainCreator = new DataTableDomainCreator(tableSpec, false); // initially bounds are null DataColumnDomain colDomain = domainCreator.createSpec().getColumnSpec(0).getDomain(); assertThat("Unexpected lower bound", colDomain.getLowerBound(), is(nullValue())); assertThat("Unexpected upper bound", colDomain.getUpperBound(), is(nullValue())); // missing cells are ignored domainCreator.updateDomain(new DefaultRow(rowKey, DataType.getMissingCell())); colDomain = domainCreator.createSpec().getColumnSpec(0).getDomain(); assertThat("Unexpected lower bound", colDomain.getLowerBound(), is(nullValue())); assertThat("Unexpected upper bound", colDomain.getUpperBound(), is(nullValue())); // change lower and upper bound domainCreator.updateDomain(new DefaultRow(rowKey, new IntCell(0))); colDomain = domainCreator.createSpec().getColumnSpec(0).getDomain(); assertThat("Unexpected lower bound", colDomain.getLowerBound(), is((DataCell)new IntCell(0))); assertThat("Unexpected upper bound", colDomain.getUpperBound(), is((DataCell)new IntCell(0))); // change upper bound domainCreator.updateDomain(new DefaultRow(rowKey, new IntCell(1))); colDomain = domainCreator.createSpec().getColumnSpec(0).getDomain(); assertThat("Unexpected lower bound", colDomain.getLowerBound(), is((DataCell)new IntCell(0))); assertThat("Unexpected upper bound", colDomain.getUpperBound(), is((DataCell)new IntCell(1))); // change lower bound domainCreator.updateDomain(new DefaultRow(rowKey, new IntCell(-1))); colDomain = domainCreator.createSpec().getColumnSpec(0).getDomain(); assertThat("Unexpected lower bound", colDomain.getLowerBound(), is((DataCell)new IntCell(-1))); assertThat("Unexpected upper bound", colDomain.getUpperBound(), is((DataCell)new IntCell(1))); // ignore missing values (again) domainCreator.updateDomain(new DefaultRow(rowKey, DataType.getMissingCell())); colDomain = domainCreator.createSpec().getColumnSpec(0).getDomain(); assertThat("Unexpected lower bound", colDomain.getLowerBound(), is((DataCell)new IntCell(-1))); assertThat("Unexpected upper bound", colDomain.getUpperBound(), is((DataCell)new IntCell(1))); // change lower bound to MIN_VALUE domainCreator.updateDomain(new DefaultRow(rowKey, new IntCell(Integer.MIN_VALUE))); colDomain = domainCreator.createSpec().getColumnSpec(0).getDomain(); assertThat("Unexpected lower bound", colDomain.getLowerBound(), is((DataCell)new IntCell(Integer.MIN_VALUE))); assertThat("Unexpected upper bound", colDomain.getUpperBound(), is((DataCell)new IntCell(1))); // change upper bound to MAX_VALUE domainCreator.updateDomain(new DefaultRow(rowKey, new IntCell(Integer.MAX_VALUE))); colDomain = domainCreator.createSpec().getColumnSpec(0).getDomain(); assertThat("Unexpected lower bound", colDomain.getLowerBound(), is((DataCell)new IntCell(Integer.MIN_VALUE))); assertThat("Unexpected upper bound", colDomain.getUpperBound(), is((DataCell)new IntCell(Integer.MAX_VALUE))); } /** * Checks whether possible values are computed correctly. */ @Test public void testPossibleValues() { DataColumnSpecCreator colSpecCrea = new DataColumnSpecCreator("String col", StringCell.TYPE); DataTableSpec tableSpec = new DataTableSpec(colSpecCrea.createSpec()); RowKey rowKey = new RowKey("Row0"); DataTableDomainCreator domainCreator = new DataTableDomainCreator(tableSpec, false); domainCreator.setMaxPossibleValues(2); // initially no values Set<DataCell> expectedValues = new LinkedHashSet<>(); DataColumnDomain colDomain = domainCreator.createSpec().getColumnSpec(0).getDomain(); assertThat("Unexpected possible values", colDomain.getValues(), is(expectedValues)); // add two values expectedValues.add(new StringCell("v1")); domainCreator.updateDomain(new DefaultRow(rowKey, "v1")); colDomain = domainCreator.createSpec().getColumnSpec(0).getDomain(); assertThat("Unexpected possible values", colDomain.getValues(), is(expectedValues)); expectedValues.add(new StringCell("v2")); domainCreator.updateDomain(new DefaultRow(rowKey, "v2")); colDomain = domainCreator.createSpec().getColumnSpec(0).getDomain(); assertThat("Unexpected possible values", colDomain.getValues(), is(expectedValues)); // add more than the maximum number removes all values domainCreator.updateDomain(new DefaultRow(rowKey, "v3")); colDomain = domainCreator.createSpec().getColumnSpec(0).getDomain(); assertThat("Unexpected possible values", colDomain.getValues(), is(nullValue())); } /** * Check whether a negative number of possible values is rejected. */ @Test(expected = IllegalArgumentException.class) public void testSetMaxPossibleValues() { DataColumnSpecCreator colSpecCrea = new DataColumnSpecCreator("String col", StringCell.TYPE); DataTableSpec tableSpec = new DataTableSpec(colSpecCrea.createSpec()); DataTableDomainCreator domainCreator = new DataTableDomainCreator(tableSpec, false); domainCreator.setMaxPossibleValues(-1); } /** * Checks whether bounds are initialized correctly if requested. */ @Test public void testInitBounds() { DataColumnSpecCreator colSpecCrea = new DataColumnSpecCreator("Int col", IntCell.TYPE); DataColumnDomainCreator domainCrea = new DataColumnDomainCreator(); domainCrea.setLowerBound(new IntCell(-2)); domainCrea.setUpperBound(new IntCell(2)); colSpecCrea.setDomain(domainCrea.createDomain()); DataColumnSpec intColSpec = colSpecCrea.createSpec(); DataTableSpec tableSpec = new DataTableSpec(intColSpec); RowKey rowKey = new RowKey("Row0"); DataTableDomainCreator domainCreator = new DataTableDomainCreator(tableSpec, true); // check initialized bounds DataColumnDomain colDomain = domainCreator.createSpec().getColumnSpec(0).getDomain(); assertThat("Unexpected lower bound", colDomain.getLowerBound(), is((DataCell) new IntCell(-2))); assertThat("Unexpected upper bound", colDomain.getUpperBound(), is((DataCell) new IntCell(2))); domainCreator.updateDomain(new DefaultRow(rowKey, new IntCell(1))); colDomain = domainCreator.createSpec().getColumnSpec(0).getDomain(); assertThat("Unexpected lower bound", colDomain.getLowerBound(), is((DataCell) new IntCell(-2))); assertThat("Unexpected upper bound", colDomain.getUpperBound(), is((DataCell) new IntCell(2))); domainCreator.updateDomain(new DefaultRow(rowKey, new IntCell(3))); colDomain = domainCreator.createSpec().getColumnSpec(0).getDomain(); assertThat("Unexpected lower bound", colDomain.getLowerBound(), is((DataCell) new IntCell(-2))); assertThat("Unexpected upper bound", colDomain.getUpperBound(), is((DataCell) new IntCell(3))); domainCreator.updateDomain(new DefaultRow(rowKey, new IntCell(-3))); colDomain = domainCreator.createSpec().getColumnSpec(0).getDomain(); assertThat("Unexpected lower bound", colDomain.getLowerBound(), is((DataCell) new IntCell(-3))); assertThat("Unexpected upper bound", colDomain.getUpperBound(), is((DataCell) new IntCell(3))); } /** * Checks whether possible values are initialized correctly if requested. */ @Test public void testInitValues() { DataColumnSpecCreator colSpecCrea = new DataColumnSpecCreator("String col", StringCell.TYPE); DataColumnDomainCreator domainCrea = new DataColumnDomainCreator(); domainCrea.setValues(Collections.singleton(new StringCell("v99"))); colSpecCrea.setDomain(domainCrea.createDomain()); DataColumnSpec stringColSpec = colSpecCrea.createSpec(); DataTableSpec tableSpec = new DataTableSpec(stringColSpec); RowKey rowKey = new RowKey("Row0"); DataTableDomainCreator domainCreator = new DataTableDomainCreator(tableSpec, true); domainCreator.setMaxPossibleValues(2); // check initial values Set<DataCell> expectedValues = new LinkedHashSet<>(); expectedValues.add(new StringCell("v99")); DataColumnDomain colDomain = domainCreator.createSpec().getColumnSpec(0).getDomain(); assertThat("Unexpected possible values", colDomain.getValues(), is(expectedValues)); // add two values expectedValues.add(new StringCell("v1")); domainCreator.updateDomain(new DefaultRow(rowKey, "v1")); colDomain = domainCreator.createSpec().getColumnSpec(0).getDomain(); assertThat("Unexpected possible values", colDomain.getValues(), is(expectedValues)); // check whether a initial set of more than 60 possible values is retained if no new possible values // appear in the data domainCrea = new DataColumnDomainCreator(); Set<DataCell> initialValues = new HashSet<>(); for (int i = 0; i < 100; i++) { initialValues.add(new StringCell(Integer.toString(i))); } domainCrea.setValues(initialValues); colSpecCrea.setDomain(domainCrea.createDomain()); stringColSpec = colSpecCrea.createSpec(); tableSpec = new DataTableSpec(stringColSpec); domainCreator = new DataTableDomainCreator(tableSpec, true); domainCreator.setMaxPossibleValues(60); // check initial values colDomain = domainCreator.createSpec().getColumnSpec(0).getDomain(); assertThat("Unexpected possible values", colDomain.getValues(), is(initialValues)); // add already existing value domainCreator.updateDomain(new DefaultRow(rowKey, "2")); colDomain = domainCreator.createSpec().getColumnSpec(0).getDomain(); assertThat("Unexpected possible values", colDomain.getValues(), is(initialValues)); } /** * Checks whether the default maximum of possible values is taken from the system property. */ @Test public void testDefaultNumberOfPossibleValues() { DataColumnSpecCreator colSpecCrea = new DataColumnSpecCreator("String col", StringCell.TYPE); DataTableSpec tableSpec = new DataTableSpec(colSpecCrea.createSpec()); DataTableDomainCreator domainCreator = new DataTableDomainCreator(tableSpec, false); Set<DataCell> expectedValues = new LinkedHashSet<>(); for (int i = 0; i < DataContainer.MAX_POSSIBLE_VALUES; i++) { RowKey rowKey = new RowKey("Row" + i); StringCell c = new StringCell(Integer.toString(i)); domainCreator.updateDomain(new DefaultRow(rowKey, c)); expectedValues.add(c); } // all possible values should be present DataColumnDomain colDomain = domainCreator.createSpec().getColumnSpec(0).getDomain(); assertThat("Unexpected possible values", colDomain.getValues(), is(expectedValues)); // add more than the maximum number removes all values domainCreator.updateDomain(new DefaultRow(new RowKey("One value too many"), new StringCell("One value too many"))); colDomain = domainCreator.createSpec().getColumnSpec(0).getDomain(); assertThat("Unexpected possible values", colDomain.getValues(), is(nullValue())); } }
[ "thorsten.meinl@knime.com" ]
thorsten.meinl@knime.com
fc23c6accb4649f24ee2f19ef69f4aa65ed09724
9ce826bd57557246dc2f5f23c427663ce875d2b1
/Level1.java
1488a3539acdbd5a2cdaf3bf86882bfbfe7158be
[]
no_license
Fligis/Tanks
0183d15ddf7ea16aea91fe25158574b7ae6f1f76
dc0eff5829f0aa5bcc8cef9dd1e6532c53bd964f
refs/heads/master
2021-01-20T05:04:25.724299
2014-03-17T17:58:12
2014-03-17T17:58:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,841
java
import java.awt.Graphics; import java.awt.Color; import java.awt.*; public class Level1 { //Middle-Left Box public int geto1TopX(){return 520;} public int geto1TopY(){return 550;} public int geto1Width(){ return 100;} public int geto1Height(){ return 100;} //Middle-right box public int geto2TopX(){return 1880;} public int geto2TopY(){return 550;} public int geto2Width(){ return 100;} public int geto2Height(){ return 100;} int level; public Level1(int l1) { level=l1; } public void draw( Graphics g ) { g.setColor( Color.WHITE ); g.fillRect( 0, 0, 2500, 1230 ); //top left g.setColor( Color.BLACK ); g.fillRect( 250, 150, 150, 60 ); //top of the brace g.setColor( Color.BLACK ); g.fillRect( 190, 430, 70, 50 ); //Middle of the brace g.setColor( Color.BLACK ); g.fillRect( 235, 430, 45, 350 ); //bottom of the brace g.setColor( Color.BLACK ); g.fillRect( 190, 730, 70, 50 ); //Bottom left g.setColor( Color.BLACK ); g.fillRect( 250, 1010, 150, 60 ); //Middle left g.setColor( Color.BLACK ); g.fillRect( 520, 550, 100, 100 ); //top of the top left brace g.setColor( Color.BLACK ); g.fillRect( 750, 290, 140, 40 ); //bottom of the top left brace g.setColor( Color.BLACK ); g.fillRect( 750, 290, 40, 90 ); //top of the bottom left brace g.setColor( Color.BLACK ); g.fillRect( 750, 820, 40, 90 ); //Bottom of the bottom left brace g.setColor( Color.BLACK ); g.fillRect( 750, 870, 140, 40 ); //top random square g.setColor( Color.BLACK ); g.fillRect( 1150, 0, 100, 100 ); //bottom random square g.setColor( Color.BLACK ); g.fillRect( 1150, 1100, 100, 100 ); //top of the top right brace g.setColor( Color.BLACK ); g.fillRect( 1610, 290, 140, 40 ); //bottom of the top right brace g.setColor( Color.BLACK ); g.fillRect( 1710, 290, 40, 90 ); //top of the bottom rihghth brace g.setColor( Color.BLACK ); g.fillRect( 1610, 870, 140, 40 ); //Bottom of the bottom right brace g.setColor( Color.BLACK ); g.fillRect( 1710, 820, 40, 90 ); //Middle wrightqt g.setColor( Color.BLACK ); g.fillRect( 1880, 550, 100, 100 ); //top of the brace g.setColor( Color.BLACK ); g.fillRect( 2240, 430, 90, 50 ); //Middle of the brace g.setColor( Color.BLACK ); g.fillRect( 2240, 430, 45, 350 ); //bottom of the right brace g.setColor( Color.BLACK ); g.fillRect( 2240, 730, 90, 50 ); //top right g.setColor( Color.BLACK ); g.fillRect( 2100, 150, 150, 60 ); //Bottom left g.setColor( Color.BLACK ); g.fillRect( 2100, 1010, 150, 60 ); } }
[ "sofritosonline@gmail.com" ]
sofritosonline@gmail.com
7b3129687a3003dd76e427bf2e93e28869b5283e
a59ac307b503ff470e9be5b1e2927844eff83dbe
/wheatfield/branches/rkylin-wheatfield-HBDH/wheatfield/src/main/java/com/rkylin/wheatfield/task/WithholdTask.java
698691f7facee9e45ce1f364d501300b35500664
[]
no_license
yangjava/kylin-wheatfield
2cc82ee9e960543264b1cfc252f770ba62669e05
4127cfca57a332d91f8b2ae1fe1be682b9d0f5fc
refs/heads/master
2020-12-02T22:07:06.226674
2017-07-03T07:59:15
2017-07-03T07:59:15
96,085,446
0
4
null
null
null
null
UTF-8
Java
false
false
5,706
java
package com.rkylin.wheatfield.task; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import com.rkylin.common.RedisIdGenerator; import com.rkylin.utils.RkylinMailUtil; import com.rkylin.wheatfield.common.DateUtils; import com.rkylin.wheatfield.constant.Constants; import com.rkylin.wheatfield.constant.SettleConstants; import com.rkylin.wheatfield.constant.TransCodeConst; import com.rkylin.wheatfield.exception.AccountException; import com.rkylin.wheatfield.manager.AccountInfoManager; import com.rkylin.wheatfield.manager.TransDaysSummaryManager; import com.rkylin.wheatfield.manager.TransOrderInfoManager; import com.rkylin.wheatfield.service.GenerationPaymentService; import com.rkylin.wheatfield.service.OperationServive; import com.rkylin.wheatfield.service.PaymentAccountService; import com.rkylin.wheatfield.service.SettlementServiceThr; import com.rkylin.wheatfield.settlement.SettlementLogic; import com.rkylin.wheatfield.utils.DateUtil; public class WithholdTask { @Autowired TransOrderInfoManager transOrderInfoManager; @Autowired GenerationPaymentService generationPaymentService; @Autowired PaymentAccountService paymentAccountService; @Autowired OperationServive operationServive; @Autowired TransDaysSummaryManager transDaysSummaryManager; @Autowired RedisIdGenerator redisIdGenerator; @Autowired AccountInfoManager accountInfoManager; @Autowired SettlementServiceThr settlementServiceThr; @Autowired SettlementLogic settlementLogic; DateUtil dateUtil=new DateUtil(); /** 日志对象 */ private static final Logger logger = LoggerFactory.getLogger(WithdrawTask.class); /** * 会堂代付 */ public void withholdHT(){ settlementServiceThr.paymentGeneration( TransCodeConst.PAYMENT_WITHHOLD, Constants.HT_ID, SettleConstants.ORDER_WITHHOLD, SettleConstants.WITHHOLD_BATCH_CODE,1); // SettleConstants.WITHHOLD_BATCH_CODE_OLD,1); settlementServiceThr.paymentGeneration( TransCodeConst.PAYMENT_WITHHOLD, Constants.HT_CLOUD_ID, SettleConstants.ORDER_WITHHOLD, SettleConstants.WITHHOLD_BATCH_CODE,1); // SettleConstants.WITHHOLD_BATCH_CODE_OLD,1); } /** * 会堂T+0代付 * @throws ParseException */ public void withholdHTT0() throws ParseException{ SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd"); Date date0903 = sdf.parse("2015-09-03"); Date date0904 = sdf.parse("2015-09-04"); Date dateCur = sdf.parse(sdf.format(new Date())); if(dateCur.compareTo(date0903)!=0 && dateCur.compareTo(date0904)!=0){ settlementServiceThr.paymentGeneration( TransCodeConst.PAYMENT_WITHHOLD, Constants.HT_ID, SettleConstants.ORDER_WITHHOLD, // SettleConstants.WITHHOLD_BATCH_CODE_OLD,0); SettleConstants.WITHHOLD_BATCH_CODE,0); settlementServiceThr.paymentGeneration( TransCodeConst.PAYMENT_WITHHOLD, Constants.HT_CLOUD_ID, SettleConstants.ORDER_WITHHOLD, // SettleConstants.WITHHOLD_BATCH_CODE_OLD,0); SettleConstants.WITHHOLD_BATCH_CODE,0); //生成会唐代付文件并上传 try { String accountDate=generationPaymentService.getAccountDate(); String batch=settlementLogic.getBatchNo(DateUtils.getAccountDate(Constants.DATE_FORMAT_YYYYMMDD, accountDate),SettleConstants.ROP_PAYMENT_BATCH_CODE, Constants.HT_ID); logger.info("-------会堂T+0代付批次号------"+batch); // generationPaymentService.uploadPaymentFile(7,batch, Constants.HT_ID,DateUtils.getDate(accountDate, Constants.DATE_FORMAT_YYYYMMDD)); generationPaymentService.submitToRecAndPaySys(7,Constants.HT_ID,accountDate,DateUtils.getDate(accountDate, Constants.DATE_FORMAT_YYYYMMDD)); } catch (AccountException e) { logger.error("生成会堂T+0代付提交到代收付失败"+e.getMessage()); RkylinMailUtil.sendMailThread("会堂T+0代付提交到代收付", "生成会堂T+0提交到代收付失败"+e.getMessage(), TransCodeConst.GENERATION_PAY_ERROR_TOEMAIL); } } } /** * 课栈代付 */ public void withholdKZ(){ settlementServiceThr.paymentGeneration( TransCodeConst.PAYMENT_WITHHOLD, Constants.KZ_ID, SettleConstants.ORDER_WITHHOLD, SettleConstants.WITHHOLD_CODE,1); // SettleConstants.WITHHOLD_CODE_OLD,1); } /** * 君融贷代付 */ public void withholdJRD(){ settlementServiceThr.paymentGeneration( TransCodeConst.PAYMENT_WITHHOLD, Constants.JRD_ID, SettleConstants.ORDER_WITHHOLD, SettleConstants.WITHHOLD_CODE,1); // SettleConstants.WITHHOLD_CODE_OLD,1); } /** * 棉庄代付 */ public void withholdMZ(){ settlementServiceThr.paymentGeneration( TransCodeConst.PAYMENT_WITHHOLD, Constants.MZ_ID, SettleConstants.ORDER_WITHHOLD, SettleConstants.WITHHOLD_CODE,1); // SettleConstants.WITHHOLD_CODE_OLD,1); } /** * 食全食美代付 */ public void withholdSQSM(){ settlementServiceThr.paymentGeneration( TransCodeConst.PAYMENT_WITHHOLD, Constants.SQSM_ID, SettleConstants.ORDER_WITHHOLD, // SettleConstants.WITHHOLD_CODE_OLD,1); SettleConstants.WITHHOLD_CODE,1); } /** * 展酷代付 */ public void withholdZk(){ settlementServiceThr.paymentGeneration( TransCodeConst.PAYMENT_WITHHOLD, Constants.ZK_ID, SettleConstants.ORDER_WITHHOLD, // SettleConstants.WITHHOLD_CODE_OLD,1); SettleConstants.WITHHOLD_CODE,1); } // /** // * 通信运维代付汇总 // */ public void withholdTXYW(){ settlementServiceThr.paymentGeneration( TransCodeConst.PAYMENT_WITHHOLD, Constants.TXYW_ID, SettleConstants.ORDER_WITHHOLD, SettleConstants.WITHHOLD_CODE,1); } }
[ "yangjava@users.noreply.github.com" ]
yangjava@users.noreply.github.com
bc1b8dd0017d6f0ad87dd15497cb9db4882f5a0b
139960e2d7d55e71c15e6a63acb6609e142a2ace
/mobile_app1/module1276/src/main/java/module1276packageJava0/Foo0.java
1bb96ec47138ec0b68cb1c367efb72f023566fd3
[ "Apache-2.0" ]
permissive
uber-common/android-build-eval
448bfe141b6911ad8a99268378c75217d431766f
7723bfd0b9b1056892cef1fef02314b435b086f2
refs/heads/master
2023-02-18T22:25:15.121902
2023-02-06T19:35:34
2023-02-06T19:35:34
294,831,672
83
7
Apache-2.0
2021-09-24T08:55:30
2020-09-11T23:27:37
Java
UTF-8
Java
false
false
1,283
java
package module1276packageJava0; import java.lang.Integer; public class Foo0 { Integer int0; Integer int1; Integer int2; public void foo0() { new module778packageKt0.Foo0().foo5(); new module414packageJava0.Foo0().foo6(); new module114packageKt0.Foo0().foo3(); new module252packageJava0.Foo0().foo5(); new module273packageKt0.Foo0().foo7(); new module1244packageKt0.Foo0().foo4(); new module487packageJava0.Foo0().foo3(); new module466packageJava0.Foo0().foo4(); new module1102packageKt0.Foo0().foo5(); new leafModuleMaxpackageJava0.Foo0().foo1(); new module1139packageJava0.Foo0().foo1(); new module790packageKt0.Foo0().foo6(); new module873packageJava0.Foo0().foo7(); new module1084packageJava0.Foo0().foo7(); new module129packageJava0.Foo0().foo4(); new module940packageKt0.Foo0().foo11(); new module322packageKt0.Foo0().foo3(); new module355packageJava0.Foo0().foo5(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } public void foo5() { foo4(); } public void foo6() { foo5(); } public void foo7() { foo6(); } public void foo8() { foo7(); } }
[ "oliviern@uber.com" ]
oliviern@uber.com
8e3fcf6d930e180535d08b16c264eedd44e645ed
11f06ac9ff0c69e7a6fe9867444f8c4bb96a4f98
/app/src/main/java/com/ejjx/versions/MainActivity.java
41471d29c611b1109fd4d7408da7fa982ee60433
[]
no_license
yongjiushijie/jcenter_library
4a3b4a5ce71e60e1abb142f59f3a8e3c7f1ee475
01777f38e762ba128761f4a04edca465a230237d
refs/heads/master
2021-01-21T21:25:56.428437
2017-06-20T04:12:24
2017-06-20T04:12:24
94,840,640
0
0
null
null
null
null
UTF-8
Java
false
false
825
java
package com.ejjx.versions; import android.os.Bundle; import com.ejjx.library.base.BaseActivity; import com.ejjx.library.bean.ErrorBean; public class MainActivity extends BaseActivity { @Override protected void getExtraEvent(Bundle extras) { super.getExtraEvent(extras); } @Override protected int getColor() { return 0; } @Override protected boolean isSetSystemBar() { return false; } @Override protected boolean isBindEventBus() { return false; } @Override protected int contentViewID() { return R.layout.activity_main; } @Override protected void initialize() { } @Override public void onError(ErrorBean errorBean) { } @Override public void onFailure(String errorMsg) { } }
[ "wangchao@ejiajx.com" ]
wangchao@ejiajx.com
f40c20a3d45c3d7aa21f0c97a795a7c357114ed6
d50e79f72a4627f6651b58f54bcdb0656bf4367f
/OOP/src/Book/Book.java
2c1966aae577f8d74f6d0157bb014283ecc4238e
[]
no_license
Wipro-Nnamdi/firstrepo
7d690a508e3ba4f20b587ae13bb1f72e47c16be2
18e06c1ed8c4330db6f87aeb1b1fb300dc9b5cf3
refs/heads/master
2021-05-16T11:35:35.405764
2017-09-28T15:02:17
2017-09-28T15:02:17
105,042,491
0
0
null
null
null
null
UTF-8
Java
false
false
1,906
java
package Book; import java.util.Scanner; public class Book { private String bookTitle; private String author; private int isbnCode; private double originalPrice; private double finalPrice; private Scanner sc = new Scanner(System.in); public Book() { this.bookTitle = "Hello"; this.author = "Hi"; this.isbnCode = 1111; this.originalPrice = 100; this.finalPrice = 0; } public Book(String bookTitle, String author) { super(); this.bookTitle = bookTitle; this.author = author; } public Book(String bookTitle, String author, int isbnCode, double originalPrice) { super(); this.bookTitle = bookTitle; this.author = author; this.isbnCode = isbnCode; this.originalPrice = originalPrice; } public String getBookTitle() { return bookTitle; } public void setBookTitle(String bookTitle) { bookTitle = sc.nextLine(); this.bookTitle = bookTitle; } public String getAuthor() { return author; } public void setAuthor(String author) { author = sc.nextLine(); this.author = author; } public int getIsbnCode() { return isbnCode; } public void setIsbnCode(int isbnCode) { isbnCode = sc.nextInt(); this.isbnCode = isbnCode; } public double getOriginalPrice() { return originalPrice; } public void setOriginalPrice(double originalPrice) { originalPrice = sc.nextDouble(); this.originalPrice = originalPrice; } public double getFinalPrice() { return finalPrice; } public void setFinalPrice(double finalPrice) { this.finalPrice = finalPrice; } public double getDiscountedPrice(String ni) { double discount = this.originalPrice * 0.1; this.finalPrice = this.originalPrice - discount; return this.originalPrice - discount; } public double getDiscountedPrice(int en) { double discount = this.originalPrice * 0.2; this.finalPrice = this.originalPrice - discount; return this.originalPrice - discount; } }
[ "nnamdi.onyeagba@wipro.com" ]
nnamdi.onyeagba@wipro.com
d9c67686a13064c69f794147d5bd67c692fdbf10
88eb92eb153907d13d384e4f42d42134086924c5
/chatbot-service/src/main/java/unlp/info/chatbot/App.java
58299faf12b30275ecd3782e09c7161ad3df4a5b
[]
no_license
leandronavajas/chatbot
1c303d420750820e2eb99ab944da34732a4d136a
6d0ba4ba04324874a9f24cd2a162a4450bc3faae
refs/heads/master
2021-07-05T22:35:29.836232
2019-03-17T20:38:18
2019-03-17T20:38:18
131,421,484
0
0
null
null
null
null
UTF-8
Java
false
false
2,646
java
package unlp.info.chatbot; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.gzip.GzipHandler; import org.eclipse.jetty.servlet.FilterHolder; import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.servlet.ServletHolder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.annotation.PropertySource; import org.springframework.web.context.support.AnnotationConfigWebApplicationContext; import org.springframework.web.filter.CharacterEncodingFilter; import org.springframework.web.servlet.DispatcherServlet; import unlp.info.chatbot.configuration.ComponentConfiguration; import javax.servlet.DispatcherType; import java.util.EnumSet; import static java.lang.System.exit; public class App { private static final Logger LOGGER = LoggerFactory.getLogger(App.class); /** Context path of the application. */ private static final String APP_PATH = "/*"; public static void main(String[] args) throws Exception { LOGGER.info("[APP] Starting Chatbot - Environment Configuration: {}", "LOCAL"); Server server = new Server(9290); AnnotationConfigWebApplicationContext spring = new AnnotationConfigWebApplicationContext(); spring.register(ComponentConfiguration.class); ServletContextHandler servletHandler = new ServletContextHandler(ServletContextHandler.NO_SESSIONS); servletHandler.setContextPath("/chatbot"); DispatcherServlet servlet = new DispatcherServlet(spring); servlet.setDispatchOptionsRequest(true); servletHandler.addServlet(new ServletHolder(servlet), APP_PATH); addGZipHandler(servletHandler); FilterHolder encodingFilter = servletHandler.addFilter( CharacterEncodingFilter.class, APP_PATH, EnumSet.of(DispatcherType.REQUEST)); encodingFilter.setInitParameter("encoding", "UTF-8"); encodingFilter.setInitParameter("forceEncoding", "true"); server.setHandler(servletHandler); server.setStopAtShutdown(true); try { server.start(); server.join(); } catch (Exception exception) { LOGGER.error("[APP] Error starting the application " + exception.getMessage()); exit(1); } } private static void addGZipHandler(ServletContextHandler servletHandler) { LOGGER.info("Loading gzip {} handler", servletHandler.getDisplayName()); GzipHandler gzipHandler = new GzipHandler(); gzipHandler.setMinGzipSize(1024); gzipHandler.setIncludedMethods("GET,POST,PATCH,PUT,DELETE"); gzipHandler.setIncludedMimeTypes("application/json", "text/json"); gzipHandler.setHandler(servletHandler); } }
[ "lnavajas@despegar.com" ]
lnavajas@despegar.com
49bc7615668f60ec613ec74db62d036f5e76e16d
6bcc827246f01a86fde9b76feb1c5226628b9b90
/musicapiclient/src/musicapiclient/ServerConnection.java
3a6aa74aeb5491660092c3a51f4cc365fa6588c7
[]
no_license
victoriahayes/csi235finalmusicapi
7bd30f793bef2762cc99fefb6d393c65b33b3cb7
790b448393ddb96295317d5a71c6d3bcdcc5dc25
refs/heads/master
2021-01-21T13:03:19.025256
2016-04-19T18:54:12
2016-04-19T18:54:12
55,173,499
0
0
null
2016-04-16T21:25:47
2016-03-31T18:26:01
Java
UTF-8
Java
false
false
1,177
java
package musicapiclient; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.InetAddress; import java.net.Socket; //where client connects to server to get results public class ServerConnection { public ServerConnection() { } public String getServerResponse(String jsonString) { String serverResponse = null; try { Socket clientSocket = new Socket(InetAddress.getLocalHost(), 6000); PrintWriter out = new PrintWriter(clientSocket.getOutputStream(), true); out.println(jsonString); try { StringBuilder buffer=new StringBuilder(); BufferedReader br = new BufferedReader(new InputStreamReader(clientSocket.getInputStream())); String inputLine; inputLine=br.readLine(); System.out.println("Server Response: " + inputLine + "... Parsing ..."); serverResponse=inputLine; } catch (Exception brf) { }; } catch (Exception conn) { } System.out.println(serverResponse); return serverResponse; } }
[ "victoria.hayes@mymail.champlain.edu" ]
victoria.hayes@mymail.champlain.edu
c9457df62d9e27836bc30ac0fe50c08fd65f6b9a
48895dbb358c09da9927d7c1741f7d7bfd707b22
/Documents/javamapp6/BestBokningsSystemEver/src/GymBookingSystem/Repository.java
fc04a997837f6e1e372a30a1d38aab5f783bffdd
[]
no_license
Akinyi/Inl-mningsUppgift02v2
06deabf0ae2d595e5e31ce58b902255453e2f0fc
bd8c9dd9702a32a938d85492385becb8f00213e4
refs/heads/master
2021-05-15T15:02:36.239877
2018-02-27T11:05:52
2018-02-27T11:05:52
107,279,420
0
0
null
null
null
null
UTF-8
Java
false
false
14,875
java
package GymBookingSystem; import java.io.FileInputStream; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.Properties; public class Repository { // private Connection con; private Properties p = new Properties(); private Login login = new Login(); public Repository(){ } public void getMembersTraining(String memberName){ ResultSet rs = null; PreparedStatement stmt = null; Connection con = null; String membername = "", exercise = "", scheduled = ""; int groupsessionID = 0; try { con = DriverManager.getConnection(login.connectionString, login.name, login.password); PreparedStatement memberStmt = con.prepareStatement("select member.name as 'Member'," + " exerciseType.name as 'Exercise',\n" + "groupSession.sessionID as 'Group Session ID'," + " session.scheduled as Date from groupSession\n" + "inner join booking on booking.groupSessionID = groupSession.ID\n" + "inner join member on member.ID = booking.memberID \n" + "inner join session on groupSession.sessionID= session.ID\n" + "inner join exerciseType on exerciseType.ID = " + "groupSession.exerciseTypeID where member.name like ? "); memberStmt.setString(1, memberName); rs = memberStmt.executeQuery(); while (rs.next()) { membername = rs.getString("Member"); exercise = rs.getString("Exercise"); scheduled = rs.getString("Date"); groupsessionID = rs.getInt("Group Session ID"); System.out.println("Member: " + membername + ". " + "Exercise: " + exercise + ". " + "Date and Time: " + scheduled + ". GroupSession ID " + groupsessionID); } } catch (SQLException e){ e.printStackTrace(); if (con != null) { try { System.out.print("Transaction is being rolled back"); con.rollback(); } catch(SQLException e2) { System.out.println(e2.getMessage()); } } } } public void getIndividualsTraining(String memberName){ ResultSet rs = null; PreparedStatement stmt = null; Connection con = null; String membername = "", exercise = "", scheduled = ""; int individualsessionID = 0; boolean attendance = true; try { con = DriverManager.getConnection(login.connectionString, login.name, login.password); PreparedStatement memberStmt = con.prepareStatement("select " + "member.name as 'Member', " + "individualSession.sessionID as 'Individual Session ID', " + "individualSession.attendance as Attendance, \n" + "session.scheduled as Date from individualSession\n" + "inner join member on member.ID = individualSession.memberID\n" + "inner join session on individualSession.sessionID= session.ID\n" + "where member.name like ? "); memberStmt.setString(1, memberName); rs = memberStmt.executeQuery(); while (rs.next()) { membername = rs.getString("Member"); scheduled = rs.getString("Date"); attendance = rs.getBoolean("Attendance"); individualsessionID = rs.getInt("Individual Session ID"); System.out.println(membername + " " + scheduled + " IndividualSessionID: " + individualsessionID + " Attendance: " + attendance); } } catch (SQLException e){ e.printStackTrace(); if (con != null) { try { System.out.print("Transaction is being rolled back"); con.rollback(); } catch(SQLException e2) { System.out.println(e2.getMessage()); } } } } public int checkIfMemberHasIndividualTraining(String memberName){ ResultSet rs = null; PreparedStatement stmt = null; Connection con = null; String membername = "", exercise = "", scheduled = ""; int individualsessionID = 0, sessionID = 0; boolean attendance = true; try { con = DriverManager.getConnection(login.connectionString, login.name, login.password); PreparedStatement memberStmt = con.prepareStatement("select member.name as 'Member', " + "individualSession.ID as 'Individual Session ID' from individualSession\n" + "inner join member on member.ID = individualSession.memberID\n" + "inner join session on individualSession.sessionID= session.ID\n" + "where member.name like ? "); memberStmt.setString(1, memberName); rs = memberStmt.executeQuery(); while (rs.next()) { membername = rs.getString("Member"); sessionID = rs.getInt("Individual Session ID"); System.out.println(sessionID+ "," + membername); } } catch (SQLException e){ e.printStackTrace(); if (con != null) { try { System.out.print("Transaction is being rolled back"); con.rollback(); } catch(SQLException e2) { System.out.println(e2.getMessage()); } } } return sessionID; } public void getAllMembersTraining(){ ResultSet rs = null; PreparedStatement stmt = null; Connection con = null; String membername = "", exercise = "", scheduled = ""; int groupsessionID = 0; boolean attendance = true; try { con = DriverManager.getConnection(login.connectionString, login.name, login.password); PreparedStatement memberStmt = con.prepareStatement("select " + "member.name as 'Member', exerciseType.name as 'Exercise',\n" + "groupSession.sessionID as 'Group Session ID', session.scheduled as Date, " + "booking.attendance as Attendance from groupSession\n" + "inner join booking on booking.groupSessionID = groupSession.ID\n" + "inner join member on member.ID = booking.memberID \n" + "inner join session on groupSession.sessionID= session.ID\n" + "inner join exerciseType on exerciseType.ID = groupSession.exerciseTypeID;"); //memberStmt.setString(1, memberName); rs = memberStmt.executeQuery(); while (rs.next()) { membername = rs.getString("Member"); exercise = rs.getString("Exercise"); attendance = rs.getBoolean("Attendance"); scheduled = rs.getString("Date"); groupsessionID = rs.getInt("Group Session ID"); System.out.println( membername + " " + exercise + " " + scheduled + " Attendance " + attendance); } } catch (SQLException e){ e.printStackTrace(); if (con != null) { try { System.out.print("Transaction is being rolled back"); con.rollback(); } catch(SQLException e2) { System.out.println(e2.getMessage()); } } } } public void getMembersNotes(String memberName){ ResultSet rs = null; Connection con = null; String membername = "", comment = "", trainer = ""; try {con = DriverManager.getConnection(login.connectionString, login.name, login.password); PreparedStatement memberStmt = con.prepareStatement("select trainer.name as 'Trainer', " + "member.name as 'Member' , comment as 'Comment' from note\n" + "inner join individualSession on individualSession.ID = note.individualSessionID\n" + "inner join session on session.ID = individualSession.sessionID\n" + "inner join member on individualSession.memberID = member.ID\n" + "inner join trainer on trainer.ID = session.trainerID where member.name like ? "); memberStmt.setString(1, memberName); rs = memberStmt.executeQuery(); while (rs.next()) { trainer = rs.getString("Trainer"); membername = rs.getString("Member"); comment = rs.getString("Comment"); } System.out.println("Trainer " + trainer + "; Member: " + membername + "; " + "Comments: " + comment ); } catch (SQLException e){ e.printStackTrace(); if (con != null) { try { System.out.print("Transaction is being rolled back"); con.rollback(); } catch(SQLException e2) { System.out.println(e2.getMessage()); } } } } public void writeMembersNotes(String comment, int individualsessionID){ ResultSet rs = null; Connection con = null; comment = ""; String trainer = ""; individualsessionID = 0; int rows = -1; try {con = DriverManager.getConnection(login.connectionString, login.name, login.password); PreparedStatement memberStmt = con.prepareStatement("insert into note " + "(comment,individualSessionID ) values (?,?) "); memberStmt.setString(1, comment); memberStmt.setInt(2, individualsessionID); //rows = memberStmt.executeUpdate(); memberStmt.executeUpdate(); memberStmt.close(); } catch (SQLException e){ e.printStackTrace(); if (con != null) { try { System.out.print("Transaction is being rolled back"); con.rollback(); } catch(SQLException e2) { System.out.println(e2.getMessage()); } } } // return rows; } public int checkIfNoteExists(int individualsessionID){ String query = "select count(note.ID) as Count from note where individualSessionID = ?"; ResultSet rs = null; ResultSet rs2 = null; Connection con = null; String comment = "", theCommentAndNr = ""; individualsessionID = 0; int rows = -1; try {con = DriverManager.getConnection(login.connectionString, login.name, login.password); // PreparedStatement noteStmt = con.prepareStatement("select note.comment as 'FullComment', " // + "note.individualSessionID as IndividualSessionID, \n" + //"trainer.name as Trainer, individualSession.attendance as Attendance, session.scheduled from note\n" + //"inner join individualSession on individualSession.ID = note.individualSessionID\n" + //"inner join member on member.ID = individualSession.memberID\n" + //"inner join session on session.ID = individualSession.sessionID\n" + //"inner join trainer on trainer.ID = session.trainerID\n" + //"where individualSession.ID = ?"); PreparedStatement noteStmt2 = con.prepareStatement(query); // noteStmt.setInt(1,individualsessionID); noteStmt2.setInt(1,individualsessionID); // rs = noteStmt.executeQuery(); // System.out.println("utanför "); // while (rs.next()) { // // } rs2 = noteStmt2.executeQuery(); while(rs2.next()) { if (rs2.getInt("Count") > 0) { individualsessionID = 0 ; } } // System.out.println("Comment: " + comment + "IndividualSessionID " + individualsessionID ); // theCommentAndNr = comment; } catch (SQLException e){ e.printStackTrace(); if (con != null) { try { System.out.print("Transaction is being rolled back"); con.rollback(); } catch(SQLException e2) { System.out.println(e2.getMessage()); } } } return individualsessionID; } public class FindID { public int findID(String customerNr, String pnr){ int i = 1; if(customerNr.equals(pnr)){ i =1; } else i=2; return i; } } public Trainer logIn(String trainerName) { Trainer trainer = new Trainer(); String query = "select * from trainer where name like ?"; try(Connection con = DriverManager.getConnection(login.connectionString, login.name, login.password); PreparedStatement stmt = con.prepareStatement(query); ){ stmt.setString(1, trainerName); ResultSet rs = stmt.executeQuery(); while(rs.next()) { trainer.setID(rs.getInt("ID")); trainer.setName(rs.getString("name")); } } catch (SQLException e) { e.printStackTrace(); } return trainer; } }
[ "margaretaoch@gmail.com" ]
margaretaoch@gmail.com
2fe4ea8779161ca3f563b300b8d2da1462bed9b7
accbf013935110d317a9abbaa6314b5a29c7b130
/src/main/java/vn/com/mta/science/module/schema/ClassificationCreate.java
e0fa542a12063d0f62baa6e7c10eaaf9ce541cc2
[]
no_license
LanHuong1598/science
b5c871b0f70cadcef530365a607fc607aec2b92c
520ad068c291f9b23f17812813731b38bfe37d04
refs/heads/master
2023-06-07T03:13:13.240434
2021-06-20T02:40:28
2021-06-20T02:40:28
296,624,444
0
0
null
null
null
null
UTF-8
Java
false
false
661
java
package vn.com.mta.science.module.schema; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import vn.com.itechcorp.base.repository.service.detail.schema.GeneratedIDSchemaCreate; import vn.com.mta.science.module.model.Classification; @Getter @Setter @NoArgsConstructor public class ClassificationCreate extends GeneratedIDSchemaCreate<Classification> { private String name; private String description; @Override public Classification toEntry() { Classification newGroup = new Classification(); newGroup.setName(name); newGroup.setDescription(description); return newGroup; } }
[ "huong.nguyen@itechcorp.com.vn" ]
huong.nguyen@itechcorp.com.vn
fe6db9d9f47c0177040e1d2bcd356f0f297ec870
8b06ff5283407a80359e273e4a5455ae4c2fbfba
/src/test/java/com/muffinsoft/alexa/skills/samuraichef/tests/handlers/GameIntentHandler.java
36ff5065dde1a767c7978af86b5e8885b831c68a
[]
no_license
muffinsoft/samurai-chef-alexa-skill
814259b320c9acd1038a2a6daf35df2ba60a2d47
d494628c63b5f7e01bb0fc2c66f0a05c70cb8257
refs/heads/master
2021-07-17T08:12:12.573303
2019-05-24T07:39:57
2019-05-24T07:39:57
152,308,679
0
0
null
null
null
null
UTF-8
Java
false
false
723
java
package com.muffinsoft.alexa.skills.samuraichef.tests.handlers; import com.amazon.ask.model.Intent; import com.amazon.ask.model.Slot; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; import java.lang.reflect.Field; import java.util.Collections; import java.util.Map; class GameIntentHandler { @Test void testField() throws NoSuchFieldException, IllegalAccessException { Intent intent = Intent.builder().build(); Map<String, Slot> slots = Collections.emptyMap(); Field field = intent.getClass().getDeclaredField("slots"); field.setAccessible(true); field.set(intent, slots); Assertions.assertEquals(intent.getSlots(), slots); } }
[ "oleksandr.solodovnikov@gmail.com" ]
oleksandr.solodovnikov@gmail.com
dca00cf1ec961d527ef822dfc5b421bd6c86d6a7
fff8d45864fdca7f43e6d65acbe4c1f469531877
/erp_desktop_all/src_inventario/com/bydan/erp/inventario/presentation/swing/jinternalframes/TipoDetalleMovimientoInventarioJInternalFrame.java
6f8938bdf2080e1c64978e48f371fe199a28aabc
[ "Apache-2.0" ]
permissive
jarocho105/pre2
26b04cc91ff1dd645a6ac83966a74768f040f418
f032fc63741b6deecdfee490e23dfa9ef1f42b4f
refs/heads/master
2020-09-27T16:16:52.921372
2016-09-01T04:34:56
2016-09-01T04:34:56
67,095,806
1
0
null
null
null
null
UTF-8
Java
false
false
174,796
java
/* *AVISO LEGAL © Copyright *Este programa esta protegido por la ley de derechos de autor. *La reproduccion o distribucion ilicita de este programa o de cualquiera de *sus partes esta penado por la ley con severas sanciones civiles y penales, *y seran objeto de todas las sanciones legales que correspondan. *Su contenido no puede copiarse para fines comerciales o de otras, *ni puede mostrarse, incluso en una version modificada, en otros sitios Web. Solo esta permitido colocar hipervinculos al sitio web. */ package com.bydan.erp.inventario.presentation.swing.jinternalframes; import com.bydan.erp.seguridad.presentation.swing.jinternalframes.*; import com.bydan.erp.contabilidad.presentation.swing.jinternalframes.*; import com.bydan.erp.inventario.presentation.web.jsf.sessionbean.*;//; import com.bydan.erp.inventario.presentation.swing.jinternalframes.*; import com.bydan.erp.inventario.presentation.swing.jinternalframes.auxiliar.*; import com.bydan.erp.seguridad.presentation.web.jsf.sessionbean.*; import com.bydan.erp.contabilidad.presentation.web.jsf.sessionbean.*; import com.bydan.erp.seguridad.business.entity.*; import com.bydan.erp.contabilidad.business.entity.*; //import com.bydan.erp.inventario.presentation.report.source.*; import com.bydan.framework.erp.business.entity.Reporte; import com.bydan.erp.seguridad.business.entity.Modulo; import com.bydan.erp.seguridad.business.entity.Opcion; import com.bydan.erp.seguridad.business.entity.Usuario; import com.bydan.erp.seguridad.business.entity.ResumenUsuario; import com.bydan.erp.seguridad.business.entity.ParametroGeneralSg; import com.bydan.erp.seguridad.business.entity.ParametroGeneralUsuario; import com.bydan.erp.seguridad.util.SistemaParameterReturnGeneral; import com.bydan.erp.inventario.business.entity.*; import com.bydan.erp.inventario.util.TipoDetalleMovimientoInventarioConstantesFunciones; import com.bydan.erp.inventario.business.logic.*; import com.bydan.framework.erp.business.entity.DatoGeneral; import com.bydan.framework.erp.business.entity.OrderBy; import com.bydan.framework.erp.business.entity.Mensajes; import com.bydan.framework.erp.business.entity.Classe; import com.bydan.framework.erp.business.logic.*; import com.bydan.framework.erp.presentation.desktop.swing.DateConverter; import com.bydan.framework.erp.presentation.desktop.swing.DateConverterFromDate; import com.bydan.framework.erp.presentation.desktop.swing.FuncionesSwing; import com.bydan.framework.erp.presentation.desktop.swing.JInternalFrameBase; import com.bydan.framework.erp.presentation.desktop.swing.*; import com.bydan.framework.erp.util.*; import java.util.Date; import java.util.List; import java.util.ArrayList; import java.io.File; import java.util.HashMap; import java.util.Map; import java.io.PrintWriter; import java.sql.SQLException; import java.sql.*; import net.sf.jasperreports.engine.JRException; import net.sf.jasperreports.engine.JRRuntimeException; import net.sf.jasperreports.engine.JasperFillManager; import net.sf.jasperreports.engine.JasperPrint; import net.sf.jasperreports.engine.JasperReport; import net.sf.jasperreports.engine.util.JRLoader; import net.sf.jasperreports.engine.export.JRHtmlExporter; import net.sf.jasperreports.j2ee.servlets.BaseHttpServlet; import net.sf.jasperreports.engine.JRExporterParameter; import net.sf.jasperreports.engine.data.JRBeanArrayDataSource; import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource; import javax.swing.*; import java.awt.*; import javax.swing.border.EtchedBorder; import javax.swing.border.Border; import javax.swing.border.TitledBorder; import java.awt.event.*; import javax.swing.event.*; import javax.swing.GroupLayout.Alignment; import javax.swing.table.TableColumn; import com.toedter.calendar.JDateChooser; @SuppressWarnings("unused") public class TipoDetalleMovimientoInventarioJInternalFrame extends TipoDetalleMovimientoInventarioBeanSwingJInternalFrameAdditional { private static final long serialVersionUID = 1L; //protected Usuario usuarioActual=null; public JToolBar jTtoolBarTipoDetalleMovimientoInventario; protected JMenuBar jmenuBarTipoDetalleMovimientoInventario; protected JMenu jmenuTipoDetalleMovimientoInventario; protected JMenu jmenuDatosTipoDetalleMovimientoInventario; protected JMenu jmenuArchivoTipoDetalleMovimientoInventario; protected JMenu jmenuAccionesTipoDetalleMovimientoInventario; protected JPanel jContentPane = null; protected JPanel jPanelBusquedasParametrosTipoDetalleMovimientoInventario = new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true);//new JPanel(); protected GridBagLayout gridaBagLayoutTipoDetalleMovimientoInventario; protected GridBagConstraints gridBagConstraintsTipoDetalleMovimientoInventario; //protected JInternalFrameBase jInternalFrameParent; public TipoDetalleMovimientoInventarioDetalleFormJInternalFrame jInternalFrameDetalleFormTipoDetalleMovimientoInventario; protected ReporteDinamicoJInternalFrame jInternalFrameReporteDinamicoTipoDetalleMovimientoInventario; protected ImportacionJInternalFrame jInternalFrameImportacionTipoDetalleMovimientoInventario; //VENTANAS PARA ACTUALIZAR Y BUSCAR FK public TipoDetalleMovimientoInventarioSessionBean tipodetallemovimientoinventarioSessionBean; //protected JDesktopPane jDesktopPane; public List<TipoDetalleMovimientoInventario> tipodetallemovimientoinventarios; public List<TipoDetalleMovimientoInventario> tipodetallemovimientoinventariosEliminados; public List<TipoDetalleMovimientoInventario> tipodetallemovimientoinventariosAux; protected OrderByJInternalFrame jInternalFrameOrderByTipoDetalleMovimientoInventario; protected JButton jButtonAbrirOrderByTipoDetalleMovimientoInventario; //protected JPanel jPanelOrderByTipoDetalleMovimientoInventario; //public JScrollPane jScrollPanelOrderByTipoDetalleMovimientoInventario; //protected JButton jButtonCerrarOrderByTipoDetalleMovimientoInventario; public ArrayList<OrderBy> arrOrderBy= new ArrayList<OrderBy>(); public TipoDetalleMovimientoInventarioLogic tipodetallemovimientoinventarioLogic; public JScrollPane jScrollPanelDatosTipoDetalleMovimientoInventario; public JScrollPane jScrollPanelDatosEdicionTipoDetalleMovimientoInventario; public JScrollPane jScrollPanelDatosGeneralTipoDetalleMovimientoInventario; //public JScrollPane jScrollPanelDatosTipoDetalleMovimientoInventarioOrderBy; //public JScrollPane jScrollPanelReporteDinamicoTipoDetalleMovimientoInventario; //public JScrollPane jScrollPanelImportacionTipoDetalleMovimientoInventario; protected JPanel jPanelAccionesTipoDetalleMovimientoInventario; protected JPanel jPanelPaginacionTipoDetalleMovimientoInventario; protected JPanel jPanelParametrosReportesTipoDetalleMovimientoInventario; protected JPanel jPanelParametrosReportesAccionesTipoDetalleMovimientoInventario; ; protected JPanel jPanelParametrosAuxiliar1TipoDetalleMovimientoInventario; protected JPanel jPanelParametrosAuxiliar2TipoDetalleMovimientoInventario; protected JPanel jPanelParametrosAuxiliar3TipoDetalleMovimientoInventario; protected JPanel jPanelParametrosAuxiliar4TipoDetalleMovimientoInventario; //protected JPanel jPanelParametrosAuxiliar5TipoDetalleMovimientoInventario; //protected JPanel jPanelReporteDinamicoTipoDetalleMovimientoInventario; //protected JPanel jPanelImportacionTipoDetalleMovimientoInventario; public JTable jTableDatosTipoDetalleMovimientoInventario; //public JTable jTableDatosTipoDetalleMovimientoInventarioOrderBy; //ELEMENTOS TABLAS PARAMETOS //ELEMENTOS TABLAS PARAMETOS_FIN protected JButton jButtonNuevoTipoDetalleMovimientoInventario; protected JButton jButtonDuplicarTipoDetalleMovimientoInventario; protected JButton jButtonCopiarTipoDetalleMovimientoInventario; protected JButton jButtonVerFormTipoDetalleMovimientoInventario; protected JButton jButtonNuevoRelacionesTipoDetalleMovimientoInventario; protected JButton jButtonModificarTipoDetalleMovimientoInventario; protected JButton jButtonGuardarCambiosTablaTipoDetalleMovimientoInventario; protected JButton jButtonCerrarTipoDetalleMovimientoInventario; protected JButton jButtonRecargarInformacionTipoDetalleMovimientoInventario; protected JButton jButtonProcesarInformacionTipoDetalleMovimientoInventario; protected JButton jButtonAnterioresTipoDetalleMovimientoInventario; protected JButton jButtonSiguientesTipoDetalleMovimientoInventario; protected JButton jButtonNuevoGuardarCambiosTipoDetalleMovimientoInventario; //protected JButton jButtonGenerarReporteDinamicoTipoDetalleMovimientoInventario; //protected JButton jButtonCerrarReporteDinamicoTipoDetalleMovimientoInventario; //protected JButton jButtonGenerarExcelReporteDinamicoTipoDetalleMovimientoInventario; //protected JButton jButtonAbrirImportacionTipoDetalleMovimientoInventario; //protected JButton jButtonGenerarImportacionTipoDetalleMovimientoInventario; //protected JButton jButtonCerrarImportacionTipoDetalleMovimientoInventario; //protected JFileChooser jFileChooserImportacionTipoDetalleMovimientoInventario; //protected File fileImportacionTipoDetalleMovimientoInventario; //TOOLBAR protected JButton jButtonNuevoToolBarTipoDetalleMovimientoInventario; protected JButton jButtonDuplicarToolBarTipoDetalleMovimientoInventario; protected JButton jButtonNuevoRelacionesToolBarTipoDetalleMovimientoInventario; public JButton jButtonGuardarCambiosToolBarTipoDetalleMovimientoInventario; protected JButton jButtonCopiarToolBarTipoDetalleMovimientoInventario; protected JButton jButtonVerFormToolBarTipoDetalleMovimientoInventario; public JButton jButtonGuardarCambiosTablaToolBarTipoDetalleMovimientoInventario; protected JButton jButtonMostrarOcultarTablaToolBarTipoDetalleMovimientoInventario; protected JButton jButtonCerrarToolBarTipoDetalleMovimientoInventario; protected JButton jButtonRecargarInformacionToolBarTipoDetalleMovimientoInventario; protected JButton jButtonProcesarInformacionToolBarTipoDetalleMovimientoInventario; protected JButton jButtonAnterioresToolBarTipoDetalleMovimientoInventario; protected JButton jButtonSiguientesToolBarTipoDetalleMovimientoInventario; protected JButton jButtonNuevoGuardarCambiosToolBarTipoDetalleMovimientoInventario; protected JButton jButtonAbrirOrderByToolBarTipoDetalleMovimientoInventario; //TOOLBAR //MENU protected JMenuItem jMenuItemNuevoTipoDetalleMovimientoInventario; protected JMenuItem jMenuItemDuplicarTipoDetalleMovimientoInventario; protected JMenuItem jMenuItemNuevoRelacionesTipoDetalleMovimientoInventario; protected JMenuItem jMenuItemGuardarCambiosTipoDetalleMovimientoInventario; protected JMenuItem jMenuItemCopiarTipoDetalleMovimientoInventario; protected JMenuItem jMenuItemVerFormTipoDetalleMovimientoInventario; protected JMenuItem jMenuItemGuardarCambiosTablaTipoDetalleMovimientoInventario; protected JMenuItem jMenuItemCerrarTipoDetalleMovimientoInventario; protected JMenuItem jMenuItemDetalleCerrarTipoDetalleMovimientoInventario; protected JMenuItem jMenuItemDetalleAbrirOrderByTipoDetalleMovimientoInventario; protected JMenuItem jMenuItemDetalleMostarOcultarTipoDetalleMovimientoInventario; protected JMenuItem jMenuItemRecargarInformacionTipoDetalleMovimientoInventario; protected JMenuItem jMenuItemProcesarInformacionTipoDetalleMovimientoInventario; protected JMenuItem jMenuItemAnterioresTipoDetalleMovimientoInventario; protected JMenuItem jMenuItemSiguientesTipoDetalleMovimientoInventario; protected JMenuItem jMenuItemNuevoGuardarCambiosTipoDetalleMovimientoInventario; protected JMenuItem jMenuItemAbrirOrderByTipoDetalleMovimientoInventario; protected JMenuItem jMenuItemMostrarOcultarTipoDetalleMovimientoInventario; //MENU protected JLabel jLabelAccionesTipoDetalleMovimientoInventario; protected JCheckBox jCheckBoxSeleccionarTodosTipoDetalleMovimientoInventario; protected JCheckBox jCheckBoxSeleccionadosTipoDetalleMovimientoInventario; protected JCheckBox jCheckBoxConAltoMaximoTablaTipoDetalleMovimientoInventario; protected JCheckBox jCheckBoxConGraficoReporteTipoDetalleMovimientoInventario; @SuppressWarnings("rawtypes") protected JComboBox jComboBoxTiposArchivosReportesTipoDetalleMovimientoInventario; @SuppressWarnings("rawtypes") protected JComboBox jComboBoxTiposReportesTipoDetalleMovimientoInventario; //@SuppressWarnings("rawtypes") //protected JComboBox jComboBoxTiposArchivosReportesDinamicoTipoDetalleMovimientoInventario; //@SuppressWarnings("rawtypes") //protected JComboBox jComboBoxTiposReportesDinamicoTipoDetalleMovimientoInventario; @SuppressWarnings("rawtypes") protected JComboBox jComboBoxTiposGraficosReportesTipoDetalleMovimientoInventario; @SuppressWarnings("rawtypes") protected JComboBox jComboBoxTiposPaginacionTipoDetalleMovimientoInventario; @SuppressWarnings("rawtypes") protected JComboBox jComboBoxTiposRelacionesTipoDetalleMovimientoInventario; @SuppressWarnings("rawtypes") protected JComboBox jComboBoxTiposAccionesTipoDetalleMovimientoInventario; @SuppressWarnings("rawtypes") protected JComboBox jComboBoxTiposSeleccionarTipoDetalleMovimientoInventario; protected JTextField jTextFieldValorCampoGeneralTipoDetalleMovimientoInventario; //REPORTE DINAMICO //@SuppressWarnings("rawtypes") //public JLabel jLabelColumnasSelectReporteTipoDetalleMovimientoInventario; //public JList<Reporte> jListColumnasSelectReporteTipoDetalleMovimientoInventario; //public JScrollPane jScrollColumnasSelectReporteTipoDetalleMovimientoInventario; //public JLabel jLabelRelacionesSelectReporteTipoDetalleMovimientoInventario; //public JList<Reporte> jListRelacionesSelectReporteTipoDetalleMovimientoInventario; //public JScrollPane jScrollRelacionesSelectReporteTipoDetalleMovimientoInventario; //public JLabel jLabelConGraficoDinamicoTipoDetalleMovimientoInventario; //protected JCheckBox jCheckBoxConGraficoDinamicoTipoDetalleMovimientoInventario; //public JLabel jLabelGenerarExcelReporteDinamicoTipoDetalleMovimientoInventario; //public JLabel jLabelTiposArchivoReporteDinamicoTipoDetalleMovimientoInventario; //public JLabel jLabelArchivoImportacionTipoDetalleMovimientoInventario; //public JLabel jLabelPathArchivoImportacionTipoDetalleMovimientoInventario; //protected JTextField jTextFieldPathArchivoImportacionTipoDetalleMovimientoInventario; //public JLabel jLabelColumnaCategoriaGraficoTipoDetalleMovimientoInventario; //@SuppressWarnings("rawtypes") //protected JComboBox jComboBoxColumnaCategoriaGraficoTipoDetalleMovimientoInventario; //public JLabel jLabelColumnaCategoriaValorTipoDetalleMovimientoInventario; //@SuppressWarnings("rawtypes") //protected JComboBox jComboBoxColumnaCategoriaValorTipoDetalleMovimientoInventario; //public JLabel jLabelColumnasValoresGraficoTipoDetalleMovimientoInventario; //public JList<Reporte> jListColumnasValoresGraficoTipoDetalleMovimientoInventario; //public JScrollPane jScrollColumnasValoresGraficoTipoDetalleMovimientoInventario; //public JLabel jLabelTiposGraficosReportesDinamicoTipoDetalleMovimientoInventario; //@SuppressWarnings("rawtypes") //protected JComboBox jComboBoxTiposGraficosReportesDinamicoTipoDetalleMovimientoInventario; protected Boolean conMaximoRelaciones=true; protected Boolean conFuncionalidadRelaciones=true; public Boolean conCargarMinimo=false; public Boolean cargarRelaciones=false; public Boolean conMostrarAccionesCampo=false; public Boolean permiteRecargarForm=false;//PARA NUEVO PREPARAR Y MANEJO DE EVENTOS, EVITAR QUE SE EJECUTE AL CARGAR VENTANA O LOAD public Boolean conCargarFormDetalle=false; //ELEMENTOS TABLAS PARAMETOS //ELEMENTOS TABLAS PARAMETOS_FIN public static int openFrameCount = 0; public static final int xOffset = 10, yOffset = 35; //LOS DATOS DE NUEVO Y EDICION ACTUAL APARECEN EN OTRA VENTANA(true) O NO(false) public static Boolean CON_DATOS_FRAME=true; public static Boolean ISBINDING_MANUAL=true; public static Boolean ISLOAD_FKLOTE=true; public static Boolean ISBINDING_MANUAL_TABLA=true; public static Boolean CON_CARGAR_MEMORIA_INICIAL=true; //Al final no se utilizan, se inicializan desde JInternalFrameBase, desde ParametroGeneralUsuario public static String STIPO_TAMANIO_GENERAL="NORMAL"; public static String STIPO_TAMANIO_GENERAL_TABLA="NORMAL"; public static Boolean CONTIPO_TAMANIO_MANUAL=false; public static Boolean CON_LLAMADA_SIMPLE=true; public static Boolean CON_LLAMADA_SIMPLE_TOTAL=true; public static Boolean ESTA_CARGADO_PORPARTE=false; public int iWidthScroll=0;//(screenSize.width-screenSize.width/2)+(250*0); public int iHeightScroll=0;//(screenSize.height-screenSize.height/Constantes.ISWING_RESTOPARTE_DIFERENCIA_ALTO); //public int iWidthFormulario=450;//(screenSize.width-screenSize.width/2)+(250*0); //public int iHeightFormulario=418;//(screenSize.height-screenSize.height/Constantes.ISWING_RESTOPARTE_DIFERENCIA_ALTO); //Esto va en DetalleForm //public int iHeightFormularioMaximo=0; //public int iWidthFormularioMaximo=0; public int iWidthTableDefinicion=0; public double dStart = 0; public double dEnd = 0; public double dDif = 0; /* double start=(double)System.currentTimeMillis(); double end=0; double dif=0; end=(double)System.currentTimeMillis(); dif=end - start; start=(double)System.currentTimeMillis(); System.out.println("Tiempo(ms) Carga TEST 1_2 DetalleMovimientoInventario: " + dif); */ public SistemaParameterReturnGeneral sistemaReturnGeneral; public List<Opcion> opcionsRelacionadas=new ArrayList<Opcion>(); //ES AUXILIAR PARA WINDOWS FORMS public TipoDetalleMovimientoInventarioJInternalFrame() throws Exception { super(PaginaTipo.PRINCIPAL); //super("TipoDetalleMovimientoInventario No " + (++openFrameCount),true, /*resizable*/true, /*closable*/true, /*maximizable*/true);//iconifiable try { //Boolean cargarRelaciones=false; initialize(null,false,false,false/*cargarRelaciones*/,null,null,null,null,null,null,PaginaTipo.PRINCIPAL); } catch(Exception e) { FuncionesSwing.manageException(this, e, null); } } public TipoDetalleMovimientoInventarioJInternalFrame(Boolean cargarRelaciones,PaginaTipo paginaTipo) throws Exception { super(paginaTipo); //super("TipoDetalleMovimientoInventario No " + (++openFrameCount),true, /*resizable*/true, /*closable*/true, /*maximizable*/true);//iconifiable try { initialize(null,false,false,cargarRelaciones,null,null,null,null,null,null,paginaTipo); } catch(Exception e) { FuncionesSwing.manageException(this, e, null); } } public TipoDetalleMovimientoInventarioJInternalFrame(Boolean conGuardarRelaciones,Boolean esGuardarRelacionado,Boolean cargarRelaciones,PaginaTipo paginaTipo) throws Exception { super(paginaTipo); //super("TipoDetalleMovimientoInventario No " + (++openFrameCount),true, /*resizable*/true, /*closable*/true, /*maximizable*/true);//iconifiable try { initialize(null,conGuardarRelaciones,esGuardarRelacionado,cargarRelaciones,null,null,null,null,null,null,paginaTipo); } catch(Exception e) { FuncionesSwing.manageException(this, e, null); } } public TipoDetalleMovimientoInventarioJInternalFrame(JDesktopPane jdesktopPane,Boolean conGuardarRelaciones,Boolean esGuardarRelacionado,Boolean cargarRelaciones,Usuario usuarioActual,ResumenUsuario resumenUsuarioActual,Modulo moduloActual,Opcion opcionActual,ParametroGeneralSg parametroGeneralSg,ParametroGeneralUsuario parametroGeneralUsuario,PaginaTipo paginaTipo) throws Exception { super(paginaTipo);//,jdesktopPane this.jDesktopPane=jdesktopPane; this.dStart=(double)System.currentTimeMillis(); //super("TipoDetalleMovimientoInventario No " + (++openFrameCount),true, /*resizable*/true, /*closable*/true, /*maximizable*/true);//iconifiable try { long start_time=0; long end_time=0; if(Constantes2.ISDEVELOPING2) { start_time = System.currentTimeMillis(); } initialize(jdesktopPane,conGuardarRelaciones,esGuardarRelacionado,cargarRelaciones,usuarioActual,resumenUsuarioActual,moduloActual,opcionActual,parametroGeneralSg,parametroGeneralUsuario,paginaTipo); if(Constantes2.ISDEVELOPING2) { end_time = System.currentTimeMillis(); String sTipo="Clase Padre Ventana"; Funciones2.getMensajeTiempoEjecucion(start_time, end_time, sTipo,false); } } catch(Exception e) { FuncionesSwing.manageException(this, e, null); } } public JInternalFrameBase getJInternalFrameParent() { return jInternalFrameParent; } public void setJInternalFrameParent(JInternalFrameBase internalFrameParent) { jInternalFrameParent = internalFrameParent; } public void setjButtonRecargarInformacion(JButton jButtonRecargarInformacionTipoDetalleMovimientoInventario) { this.jButtonRecargarInformacionTipoDetalleMovimientoInventario = jButtonRecargarInformacionTipoDetalleMovimientoInventario; } public JButton getjButtonProcesarInformacionTipoDetalleMovimientoInventario() { return this.jButtonProcesarInformacionTipoDetalleMovimientoInventario; } public void setjButtonProcesarInformacion(JButton jButtonProcesarInformacionTipoDetalleMovimientoInventario) { this.jButtonProcesarInformacionTipoDetalleMovimientoInventario = jButtonProcesarInformacionTipoDetalleMovimientoInventario; } public JButton getjButtonRecargarInformacionTipoDetalleMovimientoInventario() { return this.jButtonRecargarInformacionTipoDetalleMovimientoInventario; } public List<TipoDetalleMovimientoInventario> gettipodetallemovimientoinventarios() { return this.tipodetallemovimientoinventarios; } public void settipodetallemovimientoinventarios(List<TipoDetalleMovimientoInventario> tipodetallemovimientoinventarios) { this.tipodetallemovimientoinventarios = tipodetallemovimientoinventarios; } public List<TipoDetalleMovimientoInventario> gettipodetallemovimientoinventariosAux() { return this.tipodetallemovimientoinventariosAux; } public void settipodetallemovimientoinventariosAux(List<TipoDetalleMovimientoInventario> tipodetallemovimientoinventariosAux) { this.tipodetallemovimientoinventariosAux = tipodetallemovimientoinventariosAux; } public List<TipoDetalleMovimientoInventario> gettipodetallemovimientoinventariosEliminados() { return this.tipodetallemovimientoinventariosEliminados; } public void setTipoDetalleMovimientoInventariosEliminados(List<TipoDetalleMovimientoInventario> tipodetallemovimientoinventariosEliminados) { this.tipodetallemovimientoinventariosEliminados = tipodetallemovimientoinventariosEliminados; } @SuppressWarnings("rawtypes") public JComboBox getjComboBoxTiposSeleccionarTipoDetalleMovimientoInventario() { return jComboBoxTiposSeleccionarTipoDetalleMovimientoInventario; } @SuppressWarnings("rawtypes") public void setjComboBoxTiposSeleccionarTipoDetalleMovimientoInventario( JComboBox jComboBoxTiposSeleccionarTipoDetalleMovimientoInventario) { this.jComboBoxTiposSeleccionarTipoDetalleMovimientoInventario = jComboBoxTiposSeleccionarTipoDetalleMovimientoInventario; } public void setBorderResaltarTiposSeleccionarTipoDetalleMovimientoInventario() { Border borderResaltar=Funciones2.getBorderResaltar(this.getParametroGeneralUsuario(),"PARAMETRO"); this.jTtoolBarTipoDetalleMovimientoInventario.setBorder(borderResaltar); this.jComboBoxTiposSeleccionarTipoDetalleMovimientoInventario .setBorder(borderResaltar); } public JTextField getjTextFieldValorCampoGeneralTipoDetalleMovimientoInventario() { return jTextFieldValorCampoGeneralTipoDetalleMovimientoInventario; } public void setjTextFieldValorCampoGeneralTipoDetalleMovimientoInventario( JTextField jTextFieldValorCampoGeneralTipoDetalleMovimientoInventario) { this.jTextFieldValorCampoGeneralTipoDetalleMovimientoInventario = jTextFieldValorCampoGeneralTipoDetalleMovimientoInventario; } public void setBorderResaltarValorCampoGeneralTipoDetalleMovimientoInventario() { Border borderResaltar=Funciones2.getBorderResaltar(this.getParametroGeneralUsuario(),"PARAMETRO"); this.jTtoolBarTipoDetalleMovimientoInventario.setBorder(borderResaltar); this.jTextFieldValorCampoGeneralTipoDetalleMovimientoInventario .setBorder(borderResaltar); } public JCheckBox getjCheckBoxSeleccionarTodosTipoDetalleMovimientoInventario() { return this.jCheckBoxSeleccionarTodosTipoDetalleMovimientoInventario; } public void setjCheckBoxSeleccionarTodosTipoDetalleMovimientoInventario( JCheckBox jCheckBoxSeleccionarTodosTipoDetalleMovimientoInventario) { this.jCheckBoxSeleccionarTodosTipoDetalleMovimientoInventario = jCheckBoxSeleccionarTodosTipoDetalleMovimientoInventario; } public void setBorderResaltarSeleccionarTodosTipoDetalleMovimientoInventario() { Border borderResaltar=Funciones2.getBorderResaltar(this.getParametroGeneralUsuario(),"PARAMETRO"); this.jTtoolBarTipoDetalleMovimientoInventario.setBorder(borderResaltar); this.jCheckBoxSeleccionarTodosTipoDetalleMovimientoInventario .setBorder(borderResaltar); } public JCheckBox getjCheckBoxSeleccionadosTipoDetalleMovimientoInventario() { return this.jCheckBoxSeleccionadosTipoDetalleMovimientoInventario; } public void setjCheckBoxSeleccionadosTipoDetalleMovimientoInventario( JCheckBox jCheckBoxSeleccionadosTipoDetalleMovimientoInventario) { this.jCheckBoxSeleccionadosTipoDetalleMovimientoInventario = jCheckBoxSeleccionadosTipoDetalleMovimientoInventario; } public void setBorderResaltarSeleccionadosTipoDetalleMovimientoInventario() { Border borderResaltar=Funciones2.getBorderResaltar(this.getParametroGeneralUsuario(),"PARAMETRO"); this.jTtoolBarTipoDetalleMovimientoInventario.setBorder(borderResaltar); this.jCheckBoxSeleccionadosTipoDetalleMovimientoInventario .setBorder(borderResaltar); } @SuppressWarnings("rawtypes") public JComboBox getjComboBoxTiposArchivosReportesTipoDetalleMovimientoInventario() { return this.jComboBoxTiposArchivosReportesTipoDetalleMovimientoInventario; } @SuppressWarnings("rawtypes") public void setjComboBoxTiposArchivosReportesTipoDetalleMovimientoInventario( JComboBox jComboBoxTiposArchivosReportesTipoDetalleMovimientoInventario) { this.jComboBoxTiposArchivosReportesTipoDetalleMovimientoInventario = jComboBoxTiposArchivosReportesTipoDetalleMovimientoInventario; } public void setBorderResaltarTiposArchivosReportesTipoDetalleMovimientoInventario() { Border borderResaltar=Funciones2.getBorderResaltar(this.getParametroGeneralUsuario(),"PARAMETRO"); this.jTtoolBarTipoDetalleMovimientoInventario.setBorder(borderResaltar); this.jComboBoxTiposArchivosReportesTipoDetalleMovimientoInventario .setBorder(borderResaltar); } @SuppressWarnings("rawtypes") public JComboBox getjComboBoxTiposReportesTipoDetalleMovimientoInventario() { return this.jComboBoxTiposReportesTipoDetalleMovimientoInventario; } @SuppressWarnings("rawtypes") public void setjComboBoxTiposReportesTipoDetalleMovimientoInventario( JComboBox jComboBoxTiposReportesTipoDetalleMovimientoInventario) { this.jComboBoxTiposReportesTipoDetalleMovimientoInventario = jComboBoxTiposReportesTipoDetalleMovimientoInventario; } //@SuppressWarnings("rawtypes") //public JComboBox getjComboBoxTiposReportesDinamicoTipoDetalleMovimientoInventario() { // return jComboBoxTiposReportesDinamicoTipoDetalleMovimientoInventario; //} //@SuppressWarnings("rawtypes") //public void setjComboBoxTiposReportesDinamicoTipoDetalleMovimientoInventario( // JComboBox jComboBoxTiposReportesDinamicoTipoDetalleMovimientoInventario) { // this.jComboBoxTiposReportesDinamicoTipoDetalleMovimientoInventario = jComboBoxTiposReportesDinamicoTipoDetalleMovimientoInventario; //} //@SuppressWarnings("rawtypes") //public JComboBox getjComboBoxTiposArchivosReportesDinamicoTipoDetalleMovimientoInventario() { // return jComboBoxTiposArchivosReportesDinamicoTipoDetalleMovimientoInventario; //} //@SuppressWarnings("rawtypes") //public void setjComboBoxTiposArchivosReportesDinamicoTipoDetalleMovimientoInventario( // JComboBox jComboBoxTiposArchivosReportesDinamicoTipoDetalleMovimientoInventario) { // this.jComboBoxTiposArchivosReportesDinamicoTipoDetalleMovimientoInventario = jComboBoxTiposArchivosReportesDinamicoTipoDetalleMovimientoInventario; //} public void setBorderResaltarTiposReportesTipoDetalleMovimientoInventario() { Border borderResaltar=Funciones2.getBorderResaltar(this.getParametroGeneralUsuario(),"PARAMETRO"); this.jTtoolBarTipoDetalleMovimientoInventario.setBorder(borderResaltar); this.jComboBoxTiposReportesTipoDetalleMovimientoInventario .setBorder(borderResaltar); } @SuppressWarnings("rawtypes") public JComboBox getjComboBoxTiposGraficosReportesTipoDetalleMovimientoInventario() { return this.jComboBoxTiposGraficosReportesTipoDetalleMovimientoInventario; } @SuppressWarnings("rawtypes") public void setjComboBoxTiposGraficosReportesTipoDetalleMovimientoInventario( JComboBox jComboBoxTiposGraficosReportesTipoDetalleMovimientoInventario) { this.jComboBoxTiposGraficosReportesTipoDetalleMovimientoInventario = jComboBoxTiposGraficosReportesTipoDetalleMovimientoInventario; } public void setBorderResaltarTiposGraficosReportesTipoDetalleMovimientoInventario() { Border borderResaltar=Funciones2.getBorderResaltar(this.getParametroGeneralUsuario(),"PARAMETRO"); this.jTtoolBarTipoDetalleMovimientoInventario.setBorder(borderResaltar); this.jComboBoxTiposGraficosReportesTipoDetalleMovimientoInventario .setBorder(borderResaltar); } @SuppressWarnings("rawtypes") public JComboBox getjComboBoxTiposPaginacionTipoDetalleMovimientoInventario() { return this.jComboBoxTiposPaginacionTipoDetalleMovimientoInventario; } @SuppressWarnings("rawtypes") public void setjComboBoxTiposPaginacionTipoDetalleMovimientoInventario( JComboBox jComboBoxTiposPaginacionTipoDetalleMovimientoInventario) { this.jComboBoxTiposPaginacionTipoDetalleMovimientoInventario = jComboBoxTiposPaginacionTipoDetalleMovimientoInventario; } public void setBorderResaltarTiposPaginacionTipoDetalleMovimientoInventario() { Border borderResaltar=Funciones2.getBorderResaltar(this.getParametroGeneralUsuario(),"PARAMETRO"); this.jTtoolBarTipoDetalleMovimientoInventario.setBorder(borderResaltar); this.jComboBoxTiposPaginacionTipoDetalleMovimientoInventario .setBorder(borderResaltar); } @SuppressWarnings("rawtypes") public JComboBox getjComboBoxTiposRelacionesTipoDetalleMovimientoInventario() { return this.jComboBoxTiposRelacionesTipoDetalleMovimientoInventario; } @SuppressWarnings("rawtypes") public JComboBox getjComboBoxTiposAccionesTipoDetalleMovimientoInventario() { return this.jComboBoxTiposAccionesTipoDetalleMovimientoInventario; } @SuppressWarnings("rawtypes") public void setjComboBoxTiposRelacionesTipoDetalleMovimientoInventario( JComboBox jComboBoxTiposRelacionesTipoDetalleMovimientoInventario) { this.jComboBoxTiposRelacionesTipoDetalleMovimientoInventario = jComboBoxTiposRelacionesTipoDetalleMovimientoInventario; } @SuppressWarnings("rawtypes") public void setjComboBoxTiposAccionesTipoDetalleMovimientoInventario( JComboBox jComboBoxTiposAccionesTipoDetalleMovimientoInventario) { this.jComboBoxTiposAccionesTipoDetalleMovimientoInventario = jComboBoxTiposAccionesTipoDetalleMovimientoInventario; } public void setBorderResaltarTiposRelacionesTipoDetalleMovimientoInventario() { Border borderResaltar=Funciones2.getBorderResaltar(this.getParametroGeneralUsuario(),"PARAMETRO"); this.jTtoolBarTipoDetalleMovimientoInventario.setBorder(borderResaltar); this.jComboBoxTiposRelacionesTipoDetalleMovimientoInventario .setBorder(borderResaltar); } public void setBorderResaltarTiposAccionesTipoDetalleMovimientoInventario() { Border borderResaltar=Funciones2.getBorderResaltar(this.getParametroGeneralUsuario(),"PARAMETRO"); this.jTtoolBarTipoDetalleMovimientoInventario.setBorder(borderResaltar); this.jComboBoxTiposAccionesTipoDetalleMovimientoInventario .setBorder(borderResaltar); } //public JCheckBox getjCheckBoxConGraficoDinamicoTipoDetalleMovimientoInventario() { // return jCheckBoxConGraficoDinamicoTipoDetalleMovimientoInventario; //} //public void setjCheckBoxConGraficoDinamicoTipoDetalleMovimientoInventario( // JCheckBox jCheckBoxConGraficoDinamicoTipoDetalleMovimientoInventario) { // this.jCheckBoxConGraficoDinamicoTipoDetalleMovimientoInventario = jCheckBoxConGraficoDinamicoTipoDetalleMovimientoInventario; //} //public void setBorderResaltarConGraficoDinamicoTipoDetalleMovimientoInventario() { // Border borderResaltar=Funciones2.getBorderResaltar(this.getParametroGeneralUsuario(),"PARAMETRO"); // this.jTtoolBarTipoDetalleMovimientoInventario.setBorder(borderResaltar); // this.jCheckBoxConGraficoDinamicoTipoDetalleMovimientoInventario .setBorder(borderResaltar); //} /* public JDesktopPane getJDesktopPane() { return jDesktopPane; } public void setJDesktopPane(JDesktopPane desktopPane) { jDesktopPane = desktopPane; } */ private void initialize(JDesktopPane jdesktopPane,Boolean conGuardarRelaciones,Boolean esGuardarRelacionado,Boolean cargarRelaciones,Usuario usuarioActual,ResumenUsuario resumenUsuarioActual,Modulo moduloActual,Opcion opcionActual,ParametroGeneralSg parametroGeneralSg,ParametroGeneralUsuario parametroGeneralUsuario,PaginaTipo paginaTipo) throws Exception { this.tipodetallemovimientoinventarioSessionBean=new TipoDetalleMovimientoInventarioSessionBean(); this.tipodetallemovimientoinventarioSessionBean.setConGuardarRelaciones(conGuardarRelaciones); this.tipodetallemovimientoinventarioSessionBean.setEsGuardarRelacionado(esGuardarRelacionado); this.conCargarMinimo=this.tipodetallemovimientoinventarioSessionBean.getEsGuardarRelacionado(); this.cargarRelaciones=cargarRelaciones; if(!this.conCargarMinimo) { } //this.sTipoTamanioGeneral=TipoDetalleMovimientoInventarioJInternalFrame.STIPO_TAMANIO_GENERAL; //this.sTipoTamanioGeneralTabla=TipoDetalleMovimientoInventarioJInternalFrame.STIPO_TAMANIO_GENERAL_TABLA; this.sTipoTamanioGeneral=FuncionesSwing.getTipoTamanioGeneral(this,parametroGeneralUsuario,conGuardarRelaciones,esGuardarRelacionado); this.sTipoTamanioGeneralTabla=FuncionesSwing.getTipoTamanioGeneralTabla(this,parametroGeneralUsuario,conGuardarRelaciones,esGuardarRelacionado); this.conTipoTamanioManual=FuncionesSwing.getConTipoTamanioManual(this,parametroGeneralUsuario,conGuardarRelaciones,esGuardarRelacionado); this.conTipoTamanioTodo=FuncionesSwing.getConTipoTamanioTodo(this,parametroGeneralUsuario,conGuardarRelaciones,esGuardarRelacionado); TipoDetalleMovimientoInventarioJInternalFrame.STIPO_TAMANIO_GENERAL=this.sTipoTamanioGeneral; TipoDetalleMovimientoInventarioJInternalFrame.STIPO_TAMANIO_GENERAL_TABLA=this.sTipoTamanioGeneralTabla; TipoDetalleMovimientoInventarioJInternalFrame.CONTIPO_TAMANIO_MANUAL=this.conTipoTamanioManual; Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); int iWidth=(screenSize.width-screenSize.width/Constantes.ISWING_RESTOPARTE_DIFERENCIA_ANCHO); int iHeight=(screenSize.height-screenSize.height/Constantes.ISWING_RESTOPARTE_DIFERENCIA_ALTO); //this.setTitle(Funciones.GetTituloSistema(this.parametroGeneralSg,this.moduloActual,this.opcionActual,this.usuarioActual,"Tipo Costo MANTENIMIENTO")); if(iWidth > 650) { iWidth=650; } if(iHeight > 910) { iHeight=910; } this.setSize(iWidth,iHeight); this.setFrameIcon(new ImageIcon(FuncionesSwing.getImagenBackground(Constantes2.S_ICON_IMAGE))); this.setContentPane(this.getJContentPane(iWidth,iHeight,jdesktopPane,cargarRelaciones,usuarioActual,resumenUsuarioActual,moduloActual,opcionActual,parametroGeneralSg,parametroGeneralUsuario,paginaTipo)); if(!this.tipodetallemovimientoinventarioSessionBean.getEsGuardarRelacionado()) { this.setResizable(true); this.setClosable(true); this.setMaximizable(true); this.iconable=true; setLocation(xOffset*openFrameCount, yOffset*openFrameCount); if(Constantes.CON_VARIAS_VENTANAS) { openFrameCount++; if(openFrameCount==Constantes.INUM_MAX_VENTANAS) { openFrameCount=0; } } } TipoDetalleMovimientoInventarioJInternalFrame.ESTA_CARGADO_PORPARTE=true; //super("TipoDetalleMovimientoInventario No " + (++openFrameCount),true, /*resizable*/true, /*closable*/true, /*maximizable*/true);//iconifiable //SwingUtilities.updateComponentTreeUI(this); } public void inicializarToolBar() { this.jTtoolBarTipoDetalleMovimientoInventario= new JToolBar("MENU PRINCIPAL"); //TOOLBAR //PRINCIPAL this.jButtonNuevoToolBarTipoDetalleMovimientoInventario=FuncionesSwing.getButtonToolBarGeneral(this.jButtonNuevoToolBarTipoDetalleMovimientoInventario,this.jTtoolBarTipoDetalleMovimientoInventario, "nuevo","nuevo","Nuevo"+" "+TipoDetalleMovimientoInventarioConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("NUEVO"),"Nuevo",false); this.jButtonNuevoGuardarCambiosToolBarTipoDetalleMovimientoInventario=FuncionesSwing.getButtonToolBarGeneral(this.jButtonNuevoGuardarCambiosToolBarTipoDetalleMovimientoInventario,this.jTtoolBarTipoDetalleMovimientoInventario, "nuevoguardarcambios","nuevoguardarcambios","Nuevo" + FuncionesSwing.getKeyMensaje("NUEVO_TABLA"),"Nuevo",false); this.jButtonGuardarCambiosTablaToolBarTipoDetalleMovimientoInventario=FuncionesSwing.getButtonToolBarGeneral(this.jButtonGuardarCambiosTablaToolBarTipoDetalleMovimientoInventario,this.jTtoolBarTipoDetalleMovimientoInventario, "guardarcambiostabla","guardarcambiostabla","Guardar"+" "+TipoDetalleMovimientoInventarioConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("GUARDAR_CAMBIOS"),"Guardar",false); this.jButtonDuplicarToolBarTipoDetalleMovimientoInventario=FuncionesSwing.getButtonToolBarGeneral(this.jButtonDuplicarToolBarTipoDetalleMovimientoInventario,this.jTtoolBarTipoDetalleMovimientoInventario, "duplicar","duplicar","Duplicar"+" "+TipoDetalleMovimientoInventarioConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("DUPLICAR"),"Duplicar",false); this.jButtonCopiarToolBarTipoDetalleMovimientoInventario=FuncionesSwing.getButtonToolBarGeneral(this.jButtonCopiarToolBarTipoDetalleMovimientoInventario,this.jTtoolBarTipoDetalleMovimientoInventario, "copiar","copiar","Copiar"+" "+TipoDetalleMovimientoInventarioConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("COPIAR"),"Copiar",false); this.jButtonVerFormToolBarTipoDetalleMovimientoInventario=FuncionesSwing.getButtonToolBarGeneral(this.jButtonVerFormToolBarTipoDetalleMovimientoInventario,this.jTtoolBarTipoDetalleMovimientoInventario, "ver_form","ver_form","Ver"+" "+TipoDetalleMovimientoInventarioConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("VER_FORM"),"Ver",false); this.jButtonRecargarInformacionToolBarTipoDetalleMovimientoInventario=FuncionesSwing.getButtonToolBarGeneral(this.jButtonRecargarInformacionToolBarTipoDetalleMovimientoInventario,this.jTtoolBarTipoDetalleMovimientoInventario, "recargar","recargar","Recargar"+" "+TipoDetalleMovimientoInventarioConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("RECARGAR"),"Recargar",false); this.jButtonAnterioresToolBarTipoDetalleMovimientoInventario=FuncionesSwing.getButtonToolBarGeneral(this.jButtonRecargarInformacionToolBarTipoDetalleMovimientoInventario,this.jTtoolBarTipoDetalleMovimientoInventario, "anteriores","anteriores","Anteriores Datos" + FuncionesSwing.getKeyMensaje("ANTERIORES"),"<<",false); this.jButtonSiguientesToolBarTipoDetalleMovimientoInventario=FuncionesSwing.getButtonToolBarGeneral(this.jButtonRecargarInformacionToolBarTipoDetalleMovimientoInventario,this.jTtoolBarTipoDetalleMovimientoInventario, "siguientes","siguientes","Siguientes Datos" + FuncionesSwing.getKeyMensaje("SIGUIENTES"),">>",false); this.jButtonAbrirOrderByToolBarTipoDetalleMovimientoInventario=FuncionesSwing.getButtonToolBarGeneral(this.jButtonAbrirOrderByToolBarTipoDetalleMovimientoInventario,this.jTtoolBarTipoDetalleMovimientoInventario, "orden","orden","Orden" + FuncionesSwing.getKeyMensaje("ORDEN"),"Orden",false); this.jButtonNuevoRelacionesToolBarTipoDetalleMovimientoInventario=FuncionesSwing.getButtonToolBarGeneral(this.jButtonNuevoRelacionesToolBarTipoDetalleMovimientoInventario,this.jTtoolBarTipoDetalleMovimientoInventario, "nuevo_relaciones","nuevo_relaciones","NUEVO RELACIONES" + FuncionesSwing.getKeyMensaje("NUEVO_RELACIONES"),"NUEVO RELACIONES",false); this.jButtonMostrarOcultarTablaToolBarTipoDetalleMovimientoInventario=FuncionesSwing.getButtonToolBarGeneral(this.jButtonMostrarOcultarTablaToolBarTipoDetalleMovimientoInventario,this.jTtoolBarTipoDetalleMovimientoInventario, "mostrar_ocultar","mostrar_ocultar","Mostrar Ocultar"+" "+TipoDetalleMovimientoInventarioConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("MOSTRAR_OCULTAR"),"Mostrar Ocultar",false); this.jButtonCerrarToolBarTipoDetalleMovimientoInventario=FuncionesSwing.getButtonToolBarGeneral(this.jButtonCerrarToolBarTipoDetalleMovimientoInventario,this.jTtoolBarTipoDetalleMovimientoInventario, "cerrar","cerrar","Salir"+" "+TipoDetalleMovimientoInventarioConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("CERRAR"),"Salir",false); //this.jButtonNuevoRelacionesToolBarTipoDetalleMovimientoInventario=new JButtonMe(); //protected JButton jButtonNuevoRelacionesToolBarTipoDetalleMovimientoInventario; this.jButtonProcesarInformacionToolBarTipoDetalleMovimientoInventario=new JButtonMe(); //protected JButton jButtonProcesarInformacionToolBarTipoDetalleMovimientoInventario; //protected JButton jButtonModificarToolBarTipoDetalleMovimientoInventario; //PRINCIPAL //DETALLE //DETALLE_FIN } public void cargarMenus() { this.jmenuBarTipoDetalleMovimientoInventario=new JMenuBarMe(); //PRINCIPAL this.jmenuTipoDetalleMovimientoInventario=new JMenuMe("General"); this.jmenuArchivoTipoDetalleMovimientoInventario=new JMenuMe("Archivo"); this.jmenuAccionesTipoDetalleMovimientoInventario=new JMenuMe("Acciones"); this.jmenuDatosTipoDetalleMovimientoInventario=new JMenuMe("Datos"); //PRINCIPAL_FIN //DETALLE //DETALLE_FIN this.jMenuItemNuevoTipoDetalleMovimientoInventario= new JMenuItem("Nuevo" + FuncionesSwing.getKeyMensaje("NUEVO")); this.jMenuItemNuevoTipoDetalleMovimientoInventario.setActionCommand("Nuevo"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemNuevoTipoDetalleMovimientoInventario,"nuevo_button","Nuevo"); FuncionesSwing.setBoldMenuItem(this.jMenuItemNuevoTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemDuplicarTipoDetalleMovimientoInventario= new JMenuItem("Duplicar" + FuncionesSwing.getKeyMensaje("DUPLICAR")); this.jMenuItemDuplicarTipoDetalleMovimientoInventario.setActionCommand("Duplicar"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemDuplicarTipoDetalleMovimientoInventario,"duplicar_button","Duplicar"); FuncionesSwing.setBoldMenuItem(this.jMenuItemDuplicarTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemNuevoRelacionesTipoDetalleMovimientoInventario= new JMenuItem("Nuevo Rel" + FuncionesSwing.getKeyMensaje("NUEVO_TABLA")); this.jMenuItemNuevoRelacionesTipoDetalleMovimientoInventario.setActionCommand("Nuevo Rel"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemNuevoRelacionesTipoDetalleMovimientoInventario,"nuevorelaciones_button","Nuevo Rel"); FuncionesSwing.setBoldMenuItem(this.jMenuItemNuevoRelacionesTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemGuardarCambiosTipoDetalleMovimientoInventario= new JMenuItem("Guardar" + FuncionesSwing.getKeyMensaje("GUARDAR_CAMBIOS")); this.jMenuItemGuardarCambiosTipoDetalleMovimientoInventario.setActionCommand("Guardar"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemGuardarCambiosTipoDetalleMovimientoInventario,"guardarcambios_button","Guardar"); FuncionesSwing.setBoldMenuItem(this.jMenuItemGuardarCambiosTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemCopiarTipoDetalleMovimientoInventario= new JMenuItem("Copiar" + FuncionesSwing.getKeyMensaje("COPIAR")); this.jMenuItemCopiarTipoDetalleMovimientoInventario.setActionCommand("Copiar"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemCopiarTipoDetalleMovimientoInventario,"copiar_button","Copiar"); FuncionesSwing.setBoldMenuItem(this.jMenuItemCopiarTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemVerFormTipoDetalleMovimientoInventario= new JMenuItem("Ver" + FuncionesSwing.getKeyMensaje("VER_FORM")); this.jMenuItemVerFormTipoDetalleMovimientoInventario.setActionCommand("Ver"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemVerFormTipoDetalleMovimientoInventario,"ver_form_button","Ver"); FuncionesSwing.setBoldMenuItem(this.jMenuItemVerFormTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemGuardarCambiosTablaTipoDetalleMovimientoInventario= new JMenuItem("Guardar Tabla" + FuncionesSwing.getKeyMensaje("GUARDAR_CAMBIOS")); this.jMenuItemGuardarCambiosTablaTipoDetalleMovimientoInventario.setActionCommand("Guardar Tabla"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemGuardarCambiosTablaTipoDetalleMovimientoInventario,"guardarcambiostabla_button","Guardar Tabla"); FuncionesSwing.setBoldMenuItem(this.jMenuItemGuardarCambiosTablaTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemCerrarTipoDetalleMovimientoInventario= new JMenuItem("Salir" + FuncionesSwing.getKeyMensaje("CERRAR")); this.jMenuItemCerrarTipoDetalleMovimientoInventario.setActionCommand("Cerrar"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemCerrarTipoDetalleMovimientoInventario,"cerrar_button","Salir"); FuncionesSwing.setBoldMenuItem(this.jMenuItemCerrarTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemRecargarInformacionTipoDetalleMovimientoInventario= new JMenuItem("Recargar" + FuncionesSwing.getKeyMensaje("RECARGAR")); this.jMenuItemRecargarInformacionTipoDetalleMovimientoInventario.setActionCommand("Recargar"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemRecargarInformacionTipoDetalleMovimientoInventario,"recargar_button","Recargar"); FuncionesSwing.setBoldMenuItem(this.jMenuItemRecargarInformacionTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemProcesarInformacionTipoDetalleMovimientoInventario= new JMenuItem("Procesar Informacion"); this.jMenuItemProcesarInformacionTipoDetalleMovimientoInventario.setActionCommand("Procesar Informacion"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemProcesarInformacionTipoDetalleMovimientoInventario,"procesar_button","Procesar Informacion"); this.jMenuItemAnterioresTipoDetalleMovimientoInventario= new JMenuItem("Anteriores" + FuncionesSwing.getKeyMensaje("ANTERIORES")); this.jMenuItemAnterioresTipoDetalleMovimientoInventario.setActionCommand("Anteriores"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemAnterioresTipoDetalleMovimientoInventario,"anteriores_button","Anteriores"); FuncionesSwing.setBoldMenuItem(this.jMenuItemAnterioresTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemSiguientesTipoDetalleMovimientoInventario= new JMenuItem("Siguientes" + FuncionesSwing.getKeyMensaje("SIGUIENTES")); this.jMenuItemSiguientesTipoDetalleMovimientoInventario.setActionCommand("Siguientes"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemSiguientesTipoDetalleMovimientoInventario,"siguientes_button","Siguientes"); FuncionesSwing.setBoldMenuItem(this.jMenuItemSiguientesTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemAbrirOrderByTipoDetalleMovimientoInventario= new JMenuItem("Orden" + FuncionesSwing.getKeyMensaje("ORDEN")); this.jMenuItemAbrirOrderByTipoDetalleMovimientoInventario.setActionCommand("Orden"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemAbrirOrderByTipoDetalleMovimientoInventario,"orden_button","Orden"); FuncionesSwing.setBoldMenuItem(this.jMenuItemAbrirOrderByTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemMostrarOcultarTipoDetalleMovimientoInventario= new JMenuItem("Mostrar Ocultar" + FuncionesSwing.getKeyMensaje("MOSTRAR_OCULTAR")); this.jMenuItemMostrarOcultarTipoDetalleMovimientoInventario.setActionCommand("Mostrar Ocultar"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemMostrarOcultarTipoDetalleMovimientoInventario,"mostrar_ocultar_button","Mostrar Ocultar"); FuncionesSwing.setBoldMenuItem(this.jMenuItemMostrarOcultarTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemDetalleAbrirOrderByTipoDetalleMovimientoInventario= new JMenuItem("Orden" + FuncionesSwing.getKeyMensaje("ORDEN")); this.jMenuItemDetalleAbrirOrderByTipoDetalleMovimientoInventario.setActionCommand("Orden"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemDetalleAbrirOrderByTipoDetalleMovimientoInventario,"orden_button","Orden"); FuncionesSwing.setBoldMenuItem(this.jMenuItemDetalleAbrirOrderByTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemDetalleMostarOcultarTipoDetalleMovimientoInventario= new JMenuItem("Mostrar Ocultar" + FuncionesSwing.getKeyMensaje("MOSTRAR_OCULTAR")); this.jMenuItemDetalleMostarOcultarTipoDetalleMovimientoInventario.setActionCommand("Mostrar Ocultar"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemDetalleMostarOcultarTipoDetalleMovimientoInventario,"mostrar_ocultar_button","Mostrar Ocultar"); FuncionesSwing.setBoldMenuItem(this.jMenuItemDetalleMostarOcultarTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemNuevoGuardarCambiosTipoDetalleMovimientoInventario= new JMenuItem("Nuevo Tabla" + FuncionesSwing.getKeyMensaje("NUEVO_TABLA")); this.jMenuItemNuevoGuardarCambiosTipoDetalleMovimientoInventario.setActionCommand("Nuevo Tabla"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemNuevoGuardarCambiosTipoDetalleMovimientoInventario,"nuevoguardarcambios_button","Nuevo"); FuncionesSwing.setBoldMenuItem(this.jMenuItemNuevoGuardarCambiosTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this); //PRINCIPAL if(!this.conCargarMinimo) { this.jmenuArchivoTipoDetalleMovimientoInventario.add(this.jMenuItemCerrarTipoDetalleMovimientoInventario); this.jmenuAccionesTipoDetalleMovimientoInventario.add(this.jMenuItemNuevoTipoDetalleMovimientoInventario); this.jmenuAccionesTipoDetalleMovimientoInventario.add(this.jMenuItemNuevoGuardarCambiosTipoDetalleMovimientoInventario); this.jmenuAccionesTipoDetalleMovimientoInventario.add(this.jMenuItemNuevoRelacionesTipoDetalleMovimientoInventario); this.jmenuAccionesTipoDetalleMovimientoInventario.add(this.jMenuItemGuardarCambiosTablaTipoDetalleMovimientoInventario); this.jmenuAccionesTipoDetalleMovimientoInventario.add(this.jMenuItemDuplicarTipoDetalleMovimientoInventario); this.jmenuAccionesTipoDetalleMovimientoInventario.add(this.jMenuItemCopiarTipoDetalleMovimientoInventario); this.jmenuAccionesTipoDetalleMovimientoInventario.add(this.jMenuItemVerFormTipoDetalleMovimientoInventario); this.jmenuDatosTipoDetalleMovimientoInventario.add(this.jMenuItemRecargarInformacionTipoDetalleMovimientoInventario); this.jmenuDatosTipoDetalleMovimientoInventario.add(this.jMenuItemAnterioresTipoDetalleMovimientoInventario); this.jmenuDatosTipoDetalleMovimientoInventario.add(this.jMenuItemSiguientesTipoDetalleMovimientoInventario); this.jmenuDatosTipoDetalleMovimientoInventario.add(this.jMenuItemAbrirOrderByTipoDetalleMovimientoInventario); this.jmenuDatosTipoDetalleMovimientoInventario.add(this.jMenuItemMostrarOcultarTipoDetalleMovimientoInventario); } //PRINCIPAL_FIN //DETALLE //this.jmenuDetalleAccionesTipoDetalleMovimientoInventario.add(this.jMenuItemGuardarCambiosTipoDetalleMovimientoInventario); //DETALLE_FIN //RELACIONES //RELACIONES //PRINCIPAL if(!this.conCargarMinimo) { FuncionesSwing.setBoldMenu(this.jmenuArchivoTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this); FuncionesSwing.setBoldMenu(this.jmenuAccionesTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this); FuncionesSwing.setBoldMenu(this.jmenuDatosTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this); this.jmenuBarTipoDetalleMovimientoInventario.add(this.jmenuArchivoTipoDetalleMovimientoInventario); this.jmenuBarTipoDetalleMovimientoInventario.add(this.jmenuAccionesTipoDetalleMovimientoInventario); this.jmenuBarTipoDetalleMovimientoInventario.add(this.jmenuDatosTipoDetalleMovimientoInventario); } //PRINCIPAL_FIN //DETALLE //DETALLE_FIN //AGREGA MENU A PANTALLA if(!this.conCargarMinimo) { this.setJMenuBar(this.jmenuBarTipoDetalleMovimientoInventario); } //AGREGA MENU DETALLE A PANTALLA } public void inicializarElementosBusquedasTipoDetalleMovimientoInventario() { //BYDAN_BUSQUEDAS //INDICES BUSQUEDA //INDICES BUSQUEDA_FIN } //JPanel //@SuppressWarnings({"unchecked" })//"rawtypes" public JScrollPane getJContentPane(int iWidth,int iHeight,JDesktopPane jDesktopPane,Boolean cargarRelaciones,Usuario usuarioActual,ResumenUsuario resumenUsuarioActual,Modulo moduloActual,Opcion opcionActual,ParametroGeneralSg parametroGeneralSg,ParametroGeneralUsuario parametroGeneralUsuario,PaginaTipo paginaTipo) throws Exception { //PARA TABLA PARAMETROS String sKeyStrokeName=""; KeyStroke keyStrokeControl=null; this.jContentPane = new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true);//new JPanel(); this.usuarioActual=usuarioActual; this.resumenUsuarioActual=resumenUsuarioActual; this.opcionActual=opcionActual; this.moduloActual=moduloActual; this.parametroGeneralSg=parametroGeneralSg; this.parametroGeneralUsuario=parametroGeneralUsuario; this.jDesktopPane=jDesktopPane; this.conFuncionalidadRelaciones=parametroGeneralUsuario.getcon_guardar_relaciones(); int iGridyPrincipal=0; this.inicializarToolBar(); //CARGAR MENUS if(this.conCargarFormDetalle) { //true) { //this.jInternalFrameDetalleTipoDetalleMovimientoInventario = new TipoDetalleMovimientoInventarioDetalleJInternalFrame(paginaTipo);//JInternalFrameBase("Tipo Costo DATOS"); this.jInternalFrameDetalleFormTipoDetalleMovimientoInventario = new TipoDetalleMovimientoInventarioDetalleFormJInternalFrame(jDesktopPane,this.tipodetallemovimientoinventarioSessionBean.getConGuardarRelaciones(),this.tipodetallemovimientoinventarioSessionBean.getEsGuardarRelacionado(),cargarRelaciones,usuarioActual,resumenUsuarioActual,moduloActual,opcionActual,parametroGeneralSg,parametroGeneralUsuario,paginaTipo); } else { this.jInternalFrameDetalleFormTipoDetalleMovimientoInventario = null;//new TipoDetalleMovimientoInventarioDetalleFormJInternalFrame("MINIMO"); } this.cargarMenus(); this.gridaBagLayoutTipoDetalleMovimientoInventario= new GridBagLayout(); this.jTableDatosTipoDetalleMovimientoInventario = new JTableMe(); String sToolTipTipoDetalleMovimientoInventario=""; sToolTipTipoDetalleMovimientoInventario=TipoDetalleMovimientoInventarioConstantesFunciones.SCLASSWEBTITULO; if(Constantes.ISDEVELOPING) { sToolTipTipoDetalleMovimientoInventario+="(Inventario.TipoDetalleMovimientoInventario)"; } if(!this.tipodetallemovimientoinventarioSessionBean.getEsGuardarRelacionado()) { sToolTipTipoDetalleMovimientoInventario+="_"+this.opcionActual.getId(); } this.jTableDatosTipoDetalleMovimientoInventario.setToolTipText(sToolTipTipoDetalleMovimientoInventario); //SE DEFINE EN DETALLE //FuncionesSwing.setBoldLabelTable(this.jTableDatosTipoDetalleMovimientoInventario); this.jTableDatosTipoDetalleMovimientoInventario.setAutoCreateRowSorter(true); this.jTableDatosTipoDetalleMovimientoInventario.setRowHeight(Constantes.ISWING_ALTO_FILA_TABLA + Constantes.ISWING_ALTO_FILA_TABLA_EXTRA_FECHA); //MULTIPLE SELECTION this.jTableDatosTipoDetalleMovimientoInventario.setRowSelectionAllowed(true); this.jTableDatosTipoDetalleMovimientoInventario.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); FuncionesSwing.setBoldTable(jTableDatosTipoDetalleMovimientoInventario,STIPO_TAMANIO_GENERAL,false,true,this); this.jButtonNuevoTipoDetalleMovimientoInventario = new JButtonMe(); this.jButtonDuplicarTipoDetalleMovimientoInventario = new JButtonMe(); this.jButtonCopiarTipoDetalleMovimientoInventario = new JButtonMe(); this.jButtonVerFormTipoDetalleMovimientoInventario = new JButtonMe(); this.jButtonNuevoRelacionesTipoDetalleMovimientoInventario = new JButtonMe(); this.jButtonGuardarCambiosTablaTipoDetalleMovimientoInventario = new JButtonMe(); this.jButtonCerrarTipoDetalleMovimientoInventario = new JButtonMe(); this.jScrollPanelDatosTipoDetalleMovimientoInventario = new JScrollPane(); this.jScrollPanelDatosGeneralTipoDetalleMovimientoInventario = new JScrollPane(); this.jPanelAccionesTipoDetalleMovimientoInventario = new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true); //if(!this.conCargarMinimo) { ; //} this.sPath=" <---> Acceso: Tipo Costo"; if(!this.tipodetallemovimientoinventarioSessionBean.getEsGuardarRelacionado()) { this.jScrollPanelDatosTipoDetalleMovimientoInventario.setBorder(javax.swing.BorderFactory.createTitledBorder("Datos Tipo Costos" + this.sPath)); } else { this.jScrollPanelDatosTipoDetalleMovimientoInventario.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); } this.jScrollPanelDatosGeneralTipoDetalleMovimientoInventario.setBorder(javax.swing.BorderFactory.createTitledBorder("Edicion Datos")); this.jPanelAccionesTipoDetalleMovimientoInventario.setBorder(javax.swing.BorderFactory.createTitledBorder("Acciones")); this.jPanelAccionesTipoDetalleMovimientoInventario.setToolTipText("Acciones"); this.jPanelAccionesTipoDetalleMovimientoInventario.setName("Acciones"); FuncionesSwing.setBoldScrollPanel(this.jScrollPanelDatosGeneralTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,false,this); FuncionesSwing.setBoldScrollPanel(this.jScrollPanelDatosTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,false,this); //if(!this.conCargarMinimo) { ; //} //ELEMENTOS TABLAS PARAMETOS if(!this.conCargarMinimo) { } //ELEMENTOS TABLAS PARAMETOS_FIN if(!this.conCargarMinimo) { //REPORTE DINAMICO //NO CARGAR INICIALMENTE, EN BOTON AL ABRIR //this.jInternalFrameReporteDinamicoTipoDetalleMovimientoInventario=new ReporteDinamicoJInternalFrame(TipoDetalleMovimientoInventarioConstantesFunciones.SCLASSWEBTITULO,this); //this.cargarReporteDinamicoTipoDetalleMovimientoInventario(); //IMPORTACION //NO CARGAR INICIALMENTE, EN BOTON AL ABRIR //this.jInternalFrameImportacionTipoDetalleMovimientoInventario=new ImportacionJInternalFrame(TipoDetalleMovimientoInventarioConstantesFunciones.SCLASSWEBTITULO,this); //this.cargarImportacionTipoDetalleMovimientoInventario(); } String sMapKey = ""; InputMap inputMap =null; this.jButtonAbrirOrderByTipoDetalleMovimientoInventario = new JButtonMe(); this.jButtonAbrirOrderByTipoDetalleMovimientoInventario.setText("Orden"); this.jButtonAbrirOrderByTipoDetalleMovimientoInventario.setToolTipText("Orden"+FuncionesSwing.getKeyMensaje("ORDEN")); FuncionesSwing.addImagenButtonGeneral(this.jButtonAbrirOrderByTipoDetalleMovimientoInventario,"orden_button","Orden"); FuncionesSwing.setBoldButton(this.jButtonAbrirOrderByTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this);; sMapKey = "AbrirOrderBySistema"; inputMap = this.jButtonAbrirOrderByTipoDetalleMovimientoInventario.getInputMap(FuncionesSwing.getTipoFocusedKeyEvent("NORMAL")); inputMap.put(KeyStroke.getKeyStroke(FuncionesSwing.getKeyEvent("ORDEN") , FuncionesSwing.getMaskKey("ORDEN")), sMapKey); this.jButtonAbrirOrderByTipoDetalleMovimientoInventario.getActionMap().put(sMapKey,new ButtonAbstractAction(this,"AbrirOrderBySistema")); if(!this.conCargarMinimo) { //NO CARGAR INICIALMENTE, EN BOTON AL ABRIR //this.jInternalFrameOrderByTipoDetalleMovimientoInventario=new OrderByJInternalFrame(STIPO_TAMANIO_GENERAL,this.jButtonAbrirOrderByTipoDetalleMovimientoInventario,false,this); //this.cargarOrderByTipoDetalleMovimientoInventario(false); } else { //NO CARGAR INICIALMENTE, EN BOTON AL ABRIR //this.jInternalFrameOrderByTipoDetalleMovimientoInventario=new OrderByJInternalFrame(STIPO_TAMANIO_GENERAL,this.jButtonAbrirOrderByTipoDetalleMovimientoInventario,true,this); //this.cargarOrderByTipoDetalleMovimientoInventario(true); } //VALORES PARA DISENO /* this.jTableDatosTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(400,50));//430 this.jTableDatosTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(400,50));//430 this.jTableDatosTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(400,50));//430 this.jScrollPanelDatosTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(400,50)); this.jScrollPanelDatosTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(400,50)); this.jScrollPanelDatosTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(400,50)); */ this.jButtonNuevoTipoDetalleMovimientoInventario.setText("Nuevo"); this.jButtonDuplicarTipoDetalleMovimientoInventario.setText("Duplicar"); this.jButtonCopiarTipoDetalleMovimientoInventario.setText("Copiar"); this.jButtonVerFormTipoDetalleMovimientoInventario.setText("Ver"); this.jButtonNuevoRelacionesTipoDetalleMovimientoInventario.setText("Nuevo Rel"); this.jButtonGuardarCambiosTablaTipoDetalleMovimientoInventario.setText("Guardar"); this.jButtonCerrarTipoDetalleMovimientoInventario.setText("Salir"); FuncionesSwing.addImagenButtonGeneral(this.jButtonNuevoTipoDetalleMovimientoInventario,"nuevo_button","Nuevo",this.tipodetallemovimientoinventarioSessionBean.getEsGuardarRelacionado()); FuncionesSwing.addImagenButtonGeneral(this.jButtonDuplicarTipoDetalleMovimientoInventario,"duplicar_button","Duplicar",this.tipodetallemovimientoinventarioSessionBean.getEsGuardarRelacionado()); FuncionesSwing.addImagenButtonGeneral(this.jButtonCopiarTipoDetalleMovimientoInventario,"copiar_button","Copiar",this.tipodetallemovimientoinventarioSessionBean.getEsGuardarRelacionado()); FuncionesSwing.addImagenButtonGeneral(this.jButtonVerFormTipoDetalleMovimientoInventario,"ver_form","Ver",this.tipodetallemovimientoinventarioSessionBean.getEsGuardarRelacionado()); FuncionesSwing.addImagenButtonGeneral(this.jButtonNuevoRelacionesTipoDetalleMovimientoInventario,"nuevorelaciones_button","Nuevo Rel",this.tipodetallemovimientoinventarioSessionBean.getEsGuardarRelacionado()); FuncionesSwing.addImagenButtonGeneral(this.jButtonGuardarCambiosTablaTipoDetalleMovimientoInventario,"guardarcambiostabla_button","Guardar",this.tipodetallemovimientoinventarioSessionBean.getEsGuardarRelacionado()); FuncionesSwing.addImagenButtonGeneral(this.jButtonCerrarTipoDetalleMovimientoInventario,"cerrar_button","Salir",this.tipodetallemovimientoinventarioSessionBean.getEsGuardarRelacionado()); FuncionesSwing.setBoldButton(this.jButtonNuevoTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this); FuncionesSwing.setBoldButton(this.jButtonDuplicarTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this); FuncionesSwing.setBoldButton(this.jButtonCopiarTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this); FuncionesSwing.setBoldButton(this.jButtonVerFormTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this); FuncionesSwing.setBoldButton(this.jButtonNuevoRelacionesTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this); FuncionesSwing.setBoldButton(this.jButtonGuardarCambiosTablaTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this); FuncionesSwing.setBoldButton(this.jButtonCerrarTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this); this.jButtonNuevoTipoDetalleMovimientoInventario.setToolTipText("Nuevo"+" "+TipoDetalleMovimientoInventarioConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("NUEVO")); this.jButtonDuplicarTipoDetalleMovimientoInventario.setToolTipText("Duplicar"+" "+TipoDetalleMovimientoInventarioConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("DUPLICAR")); this.jButtonCopiarTipoDetalleMovimientoInventario.setToolTipText("Copiar"+" "+TipoDetalleMovimientoInventarioConstantesFunciones.SCLASSWEBTITULO+ FuncionesSwing.getKeyMensaje("COPIAR")); this.jButtonVerFormTipoDetalleMovimientoInventario.setToolTipText("Ver"+" "+TipoDetalleMovimientoInventarioConstantesFunciones.SCLASSWEBTITULO+ FuncionesSwing.getKeyMensaje("VER_FORM")); this.jButtonNuevoRelacionesTipoDetalleMovimientoInventario.setToolTipText("Nuevo Rel"+" "+TipoDetalleMovimientoInventarioConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("NUEVO_RELACIONES")); this.jButtonGuardarCambiosTablaTipoDetalleMovimientoInventario.setToolTipText("Guardar"+" "+TipoDetalleMovimientoInventarioConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("GUARDAR_CAMBIOS")); this.jButtonCerrarTipoDetalleMovimientoInventario.setToolTipText("Salir"+" "+TipoDetalleMovimientoInventarioConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("CERRAR")); //HOT KEYS /* N->Nuevo N->Alt + Nuevo Relaciones (ANTES R) A->Actualizar E->Eliminar S->Cerrar C->->Mayus + Cancelar (ANTES Q->Quit) G->Guardar Cambios D->Duplicar C->Alt + Cop?ar O->Orden N->Nuevo Tabla R->Recargar Informacion Inicial (ANTES I) Alt + Pag.Down->Siguientes Alt + Pag.Up->Anteriores NO UTILIZADOS M->Modificar */ //String sMapKey = ""; //InputMap inputMap =null; //NUEVO sMapKey = "NuevoTipoDetalleMovimientoInventario"; inputMap = this.jButtonNuevoTipoDetalleMovimientoInventario.getInputMap(FuncionesSwing.getTipoFocusedKeyEvent("NORMAL")); inputMap.put(KeyStroke.getKeyStroke(FuncionesSwing.getKeyEvent("NUEVO") , FuncionesSwing.getMaskKey("NUEVO")), sMapKey); this.jButtonNuevoTipoDetalleMovimientoInventario.getActionMap().put(sMapKey, new ButtonAbstractAction(this,"NuevoTipoDetalleMovimientoInventario")); //DUPLICAR sMapKey = "DuplicarTipoDetalleMovimientoInventario"; inputMap = this.jButtonDuplicarTipoDetalleMovimientoInventario.getInputMap(FuncionesSwing.getTipoFocusedKeyEvent("NORMAL")); inputMap.put(KeyStroke.getKeyStroke(FuncionesSwing.getKeyEvent("DUPLICAR") , FuncionesSwing.getMaskKey("DUPLICAR")), sMapKey); this.jButtonDuplicarTipoDetalleMovimientoInventario.getActionMap().put(sMapKey, new ButtonAbstractAction(this,"DuplicarTipoDetalleMovimientoInventario")); //COPIAR sMapKey = "CopiarTipoDetalleMovimientoInventario"; inputMap = this.jButtonCopiarTipoDetalleMovimientoInventario.getInputMap(FuncionesSwing.getTipoFocusedKeyEvent("NORMAL")); inputMap.put(KeyStroke.getKeyStroke(FuncionesSwing.getKeyEvent("COPIAR") , FuncionesSwing.getMaskKey("COPIAR")), sMapKey); this.jButtonCopiarTipoDetalleMovimientoInventario.getActionMap().put(sMapKey, new ButtonAbstractAction(this,"CopiarTipoDetalleMovimientoInventario")); //VEr FORM sMapKey = "VerFormTipoDetalleMovimientoInventario"; inputMap = this.jButtonVerFormTipoDetalleMovimientoInventario.getInputMap(FuncionesSwing.getTipoFocusedKeyEvent("NORMAL")); inputMap.put(KeyStroke.getKeyStroke(FuncionesSwing.getKeyEvent("VER_FORM") , FuncionesSwing.getMaskKey("VER_FORM")), sMapKey); this.jButtonVerFormTipoDetalleMovimientoInventario.getActionMap().put(sMapKey, new ButtonAbstractAction(this,"VerFormTipoDetalleMovimientoInventario")); //NUEVO RELACIONES sMapKey = "NuevoRelacionesTipoDetalleMovimientoInventario"; inputMap = this.jButtonNuevoRelacionesTipoDetalleMovimientoInventario.getInputMap(FuncionesSwing.getTipoFocusedKeyEvent("NORMAL")); inputMap.put(KeyStroke.getKeyStroke(FuncionesSwing.getKeyEvent("NUEVO_RELACIONES") , FuncionesSwing.getMaskKey("NUEVO_RELACIONES")), sMapKey); this.jButtonNuevoRelacionesTipoDetalleMovimientoInventario.getActionMap().put(sMapKey,new ButtonAbstractAction(this,"NuevoRelacionesTipoDetalleMovimientoInventario")); //MODIFICAR /* sMapKey = "ModificarTipoDetalleMovimientoInventario"; inputMap = this.jButtonModificarTipoDetalleMovimientoInventario.getInputMap(FuncionesSwing.getTipoFocusedKeyEvent("NORMAL")); inputMap.put(KeyStroke.getKeyStroke(FuncionesSwing.getKeyEvent("MODIFICAR") , FuncionesSwing.getMaskKey("MODIFICAR")), sMapKey); this.jButtonModificarTipoDetalleMovimientoInventario.getActionMap().put(sMapKey,new ButtonAbstractAction(this,"ModificarTipoDetalleMovimientoInventario")); */ //CERRAR sMapKey = "CerrarTipoDetalleMovimientoInventario"; inputMap = this.jButtonCerrarTipoDetalleMovimientoInventario.getInputMap(FuncionesSwing.getTipoFocusedKeyEvent("NORMAL")); inputMap.put(KeyStroke.getKeyStroke(FuncionesSwing.getKeyEvent("CERRAR") , FuncionesSwing.getMaskKey("CERRAR")), sMapKey); this.jButtonCerrarTipoDetalleMovimientoInventario.getActionMap().put(sMapKey,new ButtonAbstractAction(this,"CerrarTipoDetalleMovimientoInventario")); //GUARDAR CAMBIOS sMapKey = "GuardarCambiosTablaTipoDetalleMovimientoInventario"; inputMap = this.jButtonGuardarCambiosTablaTipoDetalleMovimientoInventario.getInputMap(FuncionesSwing.getTipoFocusedKeyEvent("NORMAL")); inputMap.put(KeyStroke.getKeyStroke(FuncionesSwing.getKeyEvent("GUARDAR_CAMBIOS") , FuncionesSwing.getMaskKey("GUARDAR_CAMBIOS")), sMapKey); this.jButtonGuardarCambiosTablaTipoDetalleMovimientoInventario.getActionMap().put(sMapKey,new ButtonAbstractAction(this,"GuardarCambiosTablaTipoDetalleMovimientoInventario")); //ABRIR ORDER BY if(!this.conCargarMinimo) { } //HOT KEYS this.jPanelParametrosReportesTipoDetalleMovimientoInventario = new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true);//new JPanel(); this.jPanelParametrosReportesAccionesTipoDetalleMovimientoInventario = new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true);//new JPanel(); this.jPanelPaginacionTipoDetalleMovimientoInventario = new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true);//new JPanel(); this.jPanelParametrosAuxiliar1TipoDetalleMovimientoInventario= new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true);//new JPanel(); this.jPanelParametrosAuxiliar2TipoDetalleMovimientoInventario= new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true);//new JPanel(); this.jPanelParametrosAuxiliar3TipoDetalleMovimientoInventario= new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true);//new JPanel(); this.jPanelParametrosAuxiliar4TipoDetalleMovimientoInventario= new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true);//new JPanel(); //this.jPanelParametrosAuxiliar5TipoDetalleMovimientoInventario= new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true);//new JPanel(); this.jPanelParametrosReportesTipoDetalleMovimientoInventario.setBorder(javax.swing.BorderFactory.createTitledBorder("Parametros Reportes-Acciones")); this.jPanelParametrosReportesTipoDetalleMovimientoInventario.setName("jPanelParametrosReportesTipoDetalleMovimientoInventario"); this.jPanelParametrosReportesAccionesTipoDetalleMovimientoInventario.setBorder(javax.swing.BorderFactory.createTitledBorder("Parametros Acciones")); //this.jPanelParametrosReportesAccionesTipoDetalleMovimientoInventario.setBorder(javax.swing.BorderFactory.createEtchedBorder(EtchedBorder.LOWERED)); this.jPanelParametrosReportesAccionesTipoDetalleMovimientoInventario.setName("jPanelParametrosReportesAccionesTipoDetalleMovimientoInventario"); FuncionesSwing.setBoldPanel(this.jPanelParametrosReportesTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,false,this); FuncionesSwing.setBoldPanel(this.jPanelParametrosReportesAccionesTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,false,this); this.jButtonRecargarInformacionTipoDetalleMovimientoInventario = new JButtonMe(); this.jButtonRecargarInformacionTipoDetalleMovimientoInventario.setText("Recargar"); this.jButtonRecargarInformacionTipoDetalleMovimientoInventario.setToolTipText("Recargar"+" "+TipoDetalleMovimientoInventarioConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("RECARGAR")); FuncionesSwing.addImagenButtonGeneral(this.jButtonRecargarInformacionTipoDetalleMovimientoInventario,"recargar_button","Recargar"); this.jButtonProcesarInformacionTipoDetalleMovimientoInventario = new JButtonMe(); this.jButtonProcesarInformacionTipoDetalleMovimientoInventario.setText("Procesar"); this.jButtonProcesarInformacionTipoDetalleMovimientoInventario.setToolTipText("Procesar"+" "+TipoDetalleMovimientoInventarioConstantesFunciones.SCLASSWEBTITULO); this.jButtonProcesarInformacionTipoDetalleMovimientoInventario.setVisible(false); this.jButtonProcesarInformacionTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(185,25)); this.jButtonProcesarInformacionTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(185,25)); this.jButtonProcesarInformacionTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(185,25)); this.jComboBoxTiposArchivosReportesTipoDetalleMovimientoInventario = new JComboBoxMe(); //this.jComboBoxTiposArchivosReportesTipoDetalleMovimientoInventario.setText("TIPO"); this.jComboBoxTiposArchivosReportesTipoDetalleMovimientoInventario.setToolTipText("Tipos De Archivo"); this.jComboBoxTiposReportesTipoDetalleMovimientoInventario = new JComboBoxMe(); //this.jComboBoxTiposArchivosReportesTipoDetalleMovimientoInventario.setText("TIPO"); this.jComboBoxTiposReportesTipoDetalleMovimientoInventario.setToolTipText("Tipos De Reporte"); this.jComboBoxTiposGraficosReportesTipoDetalleMovimientoInventario = new JComboBoxMe(); //this.jComboBoxTiposArchivosReportesTipoDetalleMovimientoInventario.setText("TIPO"); this.jComboBoxTiposGraficosReportesTipoDetalleMovimientoInventario.setToolTipText("Tipos De Reporte"); this.jComboBoxTiposPaginacionTipoDetalleMovimientoInventario = new JComboBoxMe(); //this.jComboBoxTiposPaginacionTipoDetalleMovimientoInventario.setText("Paginacion"); this.jComboBoxTiposPaginacionTipoDetalleMovimientoInventario.setToolTipText("Tipos De Paginacion"); this.jComboBoxTiposRelacionesTipoDetalleMovimientoInventario = new JComboBoxMe(); //this.jComboBoxTiposRelacionesTipoDetalleMovimientoInventario.setText("Accion"); this.jComboBoxTiposRelacionesTipoDetalleMovimientoInventario.setToolTipText("Tipos de Relaciones"); this.jComboBoxTiposAccionesTipoDetalleMovimientoInventario = new JComboBoxMe(); //this.jComboBoxTiposAccionesTipoDetalleMovimientoInventario.setText("Accion"); this.jComboBoxTiposAccionesTipoDetalleMovimientoInventario.setToolTipText("Tipos de Acciones"); this.jComboBoxTiposSeleccionarTipoDetalleMovimientoInventario = new JComboBoxMe(); //this.jComboBoxTiposSeleccionarTipoDetalleMovimientoInventario.setText("Accion"); this.jComboBoxTiposSeleccionarTipoDetalleMovimientoInventario.setToolTipText("Tipos de Seleccion"); this.jTextFieldValorCampoGeneralTipoDetalleMovimientoInventario=new JTextFieldMe(); this.jTextFieldValorCampoGeneralTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(100,Constantes.ISWING_ALTO_CONTROL)); this.jTextFieldValorCampoGeneralTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(100,Constantes.ISWING_ALTO_CONTROL)); this.jTextFieldValorCampoGeneralTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(100,Constantes.ISWING_ALTO_CONTROL)); this.jLabelAccionesTipoDetalleMovimientoInventario = new JLabelMe(); this.jLabelAccionesTipoDetalleMovimientoInventario.setText("Acciones"); this.jLabelAccionesTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelAccionesTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelAccionesTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jCheckBoxSeleccionarTodosTipoDetalleMovimientoInventario = new JCheckBoxMe(); this.jCheckBoxSeleccionarTodosTipoDetalleMovimientoInventario.setText("Sel. Todos"); this.jCheckBoxSeleccionarTodosTipoDetalleMovimientoInventario.setToolTipText("Sel. Todos"); this.jCheckBoxSeleccionadosTipoDetalleMovimientoInventario = new JCheckBoxMe(); //this.jCheckBoxSeleccionadosTipoDetalleMovimientoInventario.setText("Seleccionados"); this.jCheckBoxSeleccionadosTipoDetalleMovimientoInventario.setToolTipText("SELECCIONAR SELECCIONADOS"); this.jCheckBoxConAltoMaximoTablaTipoDetalleMovimientoInventario = new JCheckBoxMe(); //this.jCheckBoxConAltoMaximoTablaTipoDetalleMovimientoInventario.setText("Con Maximo Alto Tabla"); this.jCheckBoxConAltoMaximoTablaTipoDetalleMovimientoInventario.setToolTipText("Con Maximo Alto Tabla"); this.jCheckBoxConGraficoReporteTipoDetalleMovimientoInventario = new JCheckBoxMe(); this.jCheckBoxConGraficoReporteTipoDetalleMovimientoInventario.setText("Graf."); this.jCheckBoxConGraficoReporteTipoDetalleMovimientoInventario.setToolTipText("Con Grafico"); this.jButtonAnterioresTipoDetalleMovimientoInventario = new JButtonMe(); //this.jButtonAnterioresTipoDetalleMovimientoInventario.setText("<<"); this.jButtonAnterioresTipoDetalleMovimientoInventario.setToolTipText("Anteriores Datos" + FuncionesSwing.getKeyMensaje("ANTERIORES")); FuncionesSwing.addImagenButtonGeneral(this.jButtonAnterioresTipoDetalleMovimientoInventario,"anteriores_button","<<"); FuncionesSwing.setBoldButton(this.jButtonAnterioresTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this); this.jButtonSiguientesTipoDetalleMovimientoInventario = new JButtonMe(); //this.jButtonSiguientesTipoDetalleMovimientoInventario.setText(">>"); this.jButtonSiguientesTipoDetalleMovimientoInventario.setToolTipText("Siguientes Datos" + FuncionesSwing.getKeyMensaje("SIGUIENTES")); FuncionesSwing.addImagenButtonGeneral(this.jButtonSiguientesTipoDetalleMovimientoInventario,"siguientes_button",">>"); FuncionesSwing.setBoldButton(this.jButtonSiguientesTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this); this.jButtonNuevoGuardarCambiosTipoDetalleMovimientoInventario = new JButtonMe(); this.jButtonNuevoGuardarCambiosTipoDetalleMovimientoInventario.setText("Nue"); this.jButtonNuevoGuardarCambiosTipoDetalleMovimientoInventario.setToolTipText("Nuevo" + FuncionesSwing.getKeyMensaje("NUEVO_TABLA")); FuncionesSwing.addImagenButtonGeneral(this.jButtonNuevoGuardarCambiosTipoDetalleMovimientoInventario,"nuevoguardarcambios_button","Nue",this.tipodetallemovimientoinventarioSessionBean.getEsGuardarRelacionado()); FuncionesSwing.setBoldButton(this.jButtonNuevoGuardarCambiosTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this); //HOT KEYS2 /* T->Nuevo Tabla */ //NUEVO GUARDAR CAMBIOS O NUEVO TABLA sMapKey = "NuevoGuardarCambiosTipoDetalleMovimientoInventario"; inputMap = this.jButtonNuevoGuardarCambiosTipoDetalleMovimientoInventario.getInputMap(FuncionesSwing.getTipoFocusedKeyEvent("NORMAL")); inputMap.put(KeyStroke.getKeyStroke(FuncionesSwing.getKeyEvent("NUEVO_TABLA") , FuncionesSwing.getMaskKey("NUEVO_TABLA")), sMapKey); this.jButtonNuevoGuardarCambiosTipoDetalleMovimientoInventario.getActionMap().put(sMapKey,new ButtonAbstractAction(this,"NuevoGuardarCambiosTipoDetalleMovimientoInventario")); //RECARGAR sMapKey = "RecargarInformacionTipoDetalleMovimientoInventario"; inputMap = this.jButtonRecargarInformacionTipoDetalleMovimientoInventario.getInputMap(FuncionesSwing.getTipoFocusedKeyEvent("NORMAL")); inputMap.put(KeyStroke.getKeyStroke(FuncionesSwing.getKeyEvent("RECARGAR") , FuncionesSwing.getMaskKey("RECARGAR")), sMapKey); this.jButtonRecargarInformacionTipoDetalleMovimientoInventario.getActionMap().put(sMapKey,new ButtonAbstractAction(this,"RecargarInformacionTipoDetalleMovimientoInventario")); //SIGUIENTES sMapKey = "SiguientesTipoDetalleMovimientoInventario"; inputMap = this.jButtonSiguientesTipoDetalleMovimientoInventario.getInputMap(FuncionesSwing.getTipoFocusedKeyEvent("NORMAL")); inputMap.put(KeyStroke.getKeyStroke(FuncionesSwing.getKeyEvent("SIGUIENTES") , FuncionesSwing.getMaskKey("SIGUIENTES")), sMapKey); this.jButtonSiguientesTipoDetalleMovimientoInventario.getActionMap().put(sMapKey,new ButtonAbstractAction(this,"SiguientesTipoDetalleMovimientoInventario")); //ANTERIORES sMapKey = "AnterioresTipoDetalleMovimientoInventario"; inputMap = this.jButtonAnterioresTipoDetalleMovimientoInventario.getInputMap(FuncionesSwing.getTipoFocusedKeyEvent("NORMAL")); inputMap.put(KeyStroke.getKeyStroke(FuncionesSwing.getKeyEvent("ANTERIORES") , FuncionesSwing.getMaskKey("ANTERIORES")), sMapKey); this.jButtonAnterioresTipoDetalleMovimientoInventario.getActionMap().put(sMapKey,new ButtonAbstractAction(this,"AnterioresTipoDetalleMovimientoInventario")); //HOT KEYS2 //DETALLE //TOOLBAR //INDICES BUSQUEDA //INDICES BUSQUEDA_FIN //INDICES BUSQUEDA if(!this.conCargarMinimo) { this.inicializarElementosBusquedasTipoDetalleMovimientoInventario(); } //INDICES BUSQUEDA_FIN //ELEMENTOS TABLAS PARAMETOS if(!this.conCargarMinimo) { } //ELEMENTOS TABLAS PARAMETOS_FIN //ELEMENTOS TABLAS PARAMETOS_FIN //ESTA EN BEAN /* this.jTabbedPaneRelacionesTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(this.getWidth(),TipoDetalleMovimientoInventarioBean.ALTO_TABPANE_RELACIONES + FuncionesSwing.getValorProporcion(TipoDetalleMovimientoInventarioBean.ALTO_TABPANE_RELACIONES,0))); this.jTabbedPaneRelacionesTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(this.getWidth(),TipoDetalleMovimientoInventarioBean.ALTO_TABPANE_RELACIONES + FuncionesSwing.getValorProporcion(TipoDetalleMovimientoInventarioBean.ALTO_TABPANE_RELACIONES,0))); this.jTabbedPaneRelacionesTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(this.getWidth(),TipoDetalleMovimientoInventarioBean.ALTO_TABPANE_RELACIONES + FuncionesSwing.getValorProporcion(TipoDetalleMovimientoInventarioBean.ALTO_TABPANE_RELACIONES,0))); */ int iPosXAccionPaginacion=0; GridBagLayout gridaBagLayoutPaginacionTipoDetalleMovimientoInventario = new GridBagLayout(); this.jPanelPaginacionTipoDetalleMovimientoInventario.setLayout(gridaBagLayoutPaginacionTipoDetalleMovimientoInventario); this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.anchor = GridBagConstraints.EAST; this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = 0; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iPosXAccionPaginacion++; this.jPanelPaginacionTipoDetalleMovimientoInventario.add(this.jButtonAnterioresTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iPosXAccionPaginacion++; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = 0; this.jPanelPaginacionTipoDetalleMovimientoInventario.add(this.jButtonNuevoGuardarCambiosTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.anchor = GridBagConstraints.WEST; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iPosXAccionPaginacion++; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = 0; this.jPanelPaginacionTipoDetalleMovimientoInventario.add(this.jButtonSiguientesTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); iPosXAccionPaginacion=0; this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = 1; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iPosXAccionPaginacion++; this.jPanelPaginacionTipoDetalleMovimientoInventario.add(this.jButtonNuevoTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); if(this.conFuncionalidadRelaciones) { this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = 1; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iPosXAccionPaginacion++; this.jPanelPaginacionTipoDetalleMovimientoInventario.add(this.jButtonNuevoRelacionesTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); } if(!this.tipodetallemovimientoinventarioSessionBean.getEsGuardarRelacionado() && !this.conCargarMinimo) { this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = 1; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iPosXAccionPaginacion++; this.jPanelPaginacionTipoDetalleMovimientoInventario.add(this.jButtonGuardarCambiosTablaTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); } this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = 1; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iPosXAccionPaginacion++; this.jPanelPaginacionTipoDetalleMovimientoInventario.add(this.jButtonDuplicarTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = 1; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iPosXAccionPaginacion++; this.jPanelPaginacionTipoDetalleMovimientoInventario.add(this.jButtonCopiarTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = 1; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iPosXAccionPaginacion++; this.jPanelPaginacionTipoDetalleMovimientoInventario.add(this.jButtonVerFormTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = 1; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iPosXAccionPaginacion++; this.jPanelPaginacionTipoDetalleMovimientoInventario.add(this.jButtonCerrarTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); this.jButtonRecargarInformacionTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(95,25)); this.jButtonRecargarInformacionTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(95,25)); this.jButtonRecargarInformacionTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(95,25)); FuncionesSwing.setBoldButton(this.jButtonRecargarInformacionTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this); this.jComboBoxTiposArchivosReportesTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(105,20)); this.jComboBoxTiposArchivosReportesTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(105,20)); this.jComboBoxTiposArchivosReportesTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(105,20)); FuncionesSwing.setBoldComboBox(this.jComboBoxTiposArchivosReportesTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this);; this.jComboBoxTiposReportesTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(100,20)); this.jComboBoxTiposReportesTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(100,20)); this.jComboBoxTiposReportesTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(100,20)); FuncionesSwing.setBoldComboBox(this.jComboBoxTiposReportesTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this);; this.jComboBoxTiposGraficosReportesTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(80,20)); this.jComboBoxTiposGraficosReportesTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(80,20)); this.jComboBoxTiposGraficosReportesTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(80,20)); FuncionesSwing.setBoldComboBox(this.jComboBoxTiposGraficosReportesTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this);; this.jComboBoxTiposPaginacionTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(80,20)); this.jComboBoxTiposPaginacionTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(80,20)); this.jComboBoxTiposPaginacionTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(80,20)); FuncionesSwing.setBoldComboBox(this.jComboBoxTiposPaginacionTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this);; this.jComboBoxTiposRelacionesTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(145,20)); this.jComboBoxTiposRelacionesTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(145,20)); this.jComboBoxTiposRelacionesTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(145,20)); FuncionesSwing.setBoldComboBox(this.jComboBoxTiposRelacionesTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this);; this.jComboBoxTiposAccionesTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(145,20)); this.jComboBoxTiposAccionesTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(145,20)); this.jComboBoxTiposAccionesTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(145,20)); FuncionesSwing.setBoldComboBox(this.jComboBoxTiposAccionesTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this);; this.jComboBoxTiposSeleccionarTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(145,20)); this.jComboBoxTiposSeleccionarTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(145,20)); this.jComboBoxTiposSeleccionarTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(145,20)); FuncionesSwing.setBoldComboBox(this.jComboBoxTiposSeleccionarTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this);; this.jCheckBoxConAltoMaximoTablaTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(20,20)); this.jCheckBoxConAltoMaximoTablaTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(20,20)); this.jCheckBoxConAltoMaximoTablaTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(20,20)); FuncionesSwing.setBoldCheckBox(this.jCheckBoxConAltoMaximoTablaTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this);; this.jCheckBoxConGraficoReporteTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(60,20)); this.jCheckBoxConGraficoReporteTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(60,20)); this.jCheckBoxConGraficoReporteTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(60,20)); FuncionesSwing.setBoldCheckBox(this.jCheckBoxConGraficoReporteTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this); this.jCheckBoxSeleccionarTodosTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(100,20)); this.jCheckBoxSeleccionarTodosTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(100,20)); this.jCheckBoxSeleccionarTodosTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(100,20)); FuncionesSwing.setBoldCheckBox(this.jCheckBoxSeleccionarTodosTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this);; this.jCheckBoxSeleccionadosTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(20,20)); this.jCheckBoxSeleccionadosTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(20,20)); this.jCheckBoxSeleccionadosTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(20,20)); FuncionesSwing.setBoldCheckBox(this.jCheckBoxSeleccionadosTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this);; GridBagLayout gridaBagParametrosReportesTipoDetalleMovimientoInventario = new GridBagLayout(); GridBagLayout gridaBagParametrosReportesAccionesTipoDetalleMovimientoInventario = new GridBagLayout(); GridBagLayout gridaBagParametrosAuxiliar1TipoDetalleMovimientoInventario = new GridBagLayout(); GridBagLayout gridaBagParametrosAuxiliar2TipoDetalleMovimientoInventario = new GridBagLayout(); GridBagLayout gridaBagParametrosAuxiliar3TipoDetalleMovimientoInventario = new GridBagLayout(); GridBagLayout gridaBagParametrosAuxiliar4TipoDetalleMovimientoInventario = new GridBagLayout(); int iGridxParametrosReportes=0; int iGridyParametrosReportes=0; int iGridxParametrosAuxiliar=0; int iGridyParametrosAuxiliar=0; this.jPanelParametrosReportesTipoDetalleMovimientoInventario.setLayout(gridaBagParametrosReportesTipoDetalleMovimientoInventario); this.jPanelParametrosReportesAccionesTipoDetalleMovimientoInventario.setLayout(gridaBagParametrosReportesAccionesTipoDetalleMovimientoInventario); this.jPanelParametrosAuxiliar1TipoDetalleMovimientoInventario.setLayout(gridaBagParametrosAuxiliar1TipoDetalleMovimientoInventario); this.jPanelParametrosAuxiliar2TipoDetalleMovimientoInventario.setLayout(gridaBagParametrosAuxiliar2TipoDetalleMovimientoInventario); this.jPanelParametrosAuxiliar3TipoDetalleMovimientoInventario.setLayout(gridaBagParametrosAuxiliar3TipoDetalleMovimientoInventario); this.jPanelParametrosAuxiliar4TipoDetalleMovimientoInventario.setLayout(gridaBagParametrosAuxiliar4TipoDetalleMovimientoInventario); //this.jPanelParametrosAuxiliar5TipoDetalleMovimientoInventario.setLayout(gridaBagParametrosAuxiliar2TipoDetalleMovimientoInventario); this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iGridyParametrosReportes; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iGridxParametrosReportes++; this.jPanelParametrosReportesTipoDetalleMovimientoInventario.add(this.jButtonRecargarInformacionTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); //PAGINACION this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.anchor = GridBagConstraints.WEST; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iGridyParametrosAuxiliar;//iGridyParametrosReportes; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iGridxParametrosAuxiliar++;//iGridxParametrosReportes++; //this.jPanelParametrosReportes this.jPanelParametrosAuxiliar1TipoDetalleMovimientoInventario.add(this.jComboBoxTiposPaginacionTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); //CON ALTO MAXIMO TABLA this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.anchor = GridBagConstraints.WEST; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iGridyParametrosAuxiliar;//iGridyParametrosReportes; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iGridxParametrosAuxiliar++;//iGridxParametrosReportes++; //this.jPanelParametrosReportes this.jPanelParametrosAuxiliar1TipoDetalleMovimientoInventario.add(this.jCheckBoxConAltoMaximoTablaTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); //TIPOS ARCHIVOS REPORTES this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.anchor = GridBagConstraints.WEST; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iGridyParametrosAuxiliar;//iGridyParametrosReportes; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iGridxParametrosAuxiliar++;//iGridxParametrosReportes++; //this.jPanelParametrosReportes this.jPanelParametrosAuxiliar1TipoDetalleMovimientoInventario.add(this.jComboBoxTiposArchivosReportesTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); //USANDO AUXILIAR this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.anchor = GridBagConstraints.WEST; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iGridyParametrosReportes; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iGridxParametrosReportes++; //this.jPanelParametrosReportes this.jPanelParametrosReportesTipoDetalleMovimientoInventario.add(this.jPanelParametrosAuxiliar1TipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); //USANDO AUXILIAR FIN //AUXILIAR4 TIPOS REPORTES Y TIPOS GRAFICOS REPORTES iGridxParametrosAuxiliar=0; iGridyParametrosAuxiliar=0; this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.anchor = GridBagConstraints.WEST; this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy =iGridxParametrosAuxiliar;//iGridyParametrosReportes; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx =iGridyParametrosAuxiliar++;//iGridxParametrosReportes++; //this.jPanelParametrosReportes this.jPanelParametrosAuxiliar4TipoDetalleMovimientoInventario.add(this.jComboBoxTiposReportesTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); //AUXILIAR4 TIPOS REPORTES Y TIPOS GRAFICOS REPORTES //USANDO AUXILIAR 4 this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.anchor = GridBagConstraints.WEST; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iGridyParametrosReportes; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iGridxParametrosReportes++; //this.jPanelParametrosReportes this.jPanelParametrosReportesTipoDetalleMovimientoInventario.add(this.jPanelParametrosAuxiliar4TipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); //USANDO AUXILIAR 4 FIN //TIPOS REPORTES /* this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.anchor = GridBagConstraints.WEST; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iGridyParametrosReportes;//iGridyParametrosReportes; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iGridxParametrosReportes++;//iGridxParametrosReportes++; //this.jPanelParametrosReportes this.jPanelParametrosReportesTipoDetalleMovimientoInventario.add(this.jComboBoxTiposReportesTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); */ //GENERAR REPORTE (jCheckBoxExportar) /* this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.anchor = GridBagConstraints.WEST; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iGridyParametrosReportes; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iGridxParametrosReportes++; this.jPanelParametrosReportesTipoDetalleMovimientoInventario.add(this.jCheckBoxGenerarReporteTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); */ iGridxParametrosAuxiliar=0; iGridyParametrosAuxiliar=0; //USANDO AUXILIAR this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.anchor = GridBagConstraints.WEST; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iGridyParametrosReportes; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iGridxParametrosReportes++; //this.jPanelParametrosReportes this.jPanelParametrosReportesTipoDetalleMovimientoInventario.add(this.jPanelParametrosAuxiliar2TipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); //USANDO AUXILIAR FIN //PARAMETROS ACCIONES //iGridxParametrosReportes=1; iGridxParametrosReportes=0; iGridyParametrosReportes=1; /* this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iGridyParametrosReportes; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx =iGridxParametrosReportes++; this.jPanelParametrosReportesTipoDetalleMovimientoInventario.add(this.jLabelAccionesTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); */ //PARAMETROS_ACCIONES-PARAMETROS_REPORTES //ORDER BY if(!this.conCargarMinimo) { this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iGridyParametrosReportes; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iGridxParametrosReportes++; this.jPanelParametrosReportesTipoDetalleMovimientoInventario.add(this.jButtonAbrirOrderByTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); } //PARAMETROS_ACCIONES-PARAMETROS_REPORTES this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iGridyParametrosReportes; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iGridxParametrosReportes++; this.jPanelParametrosReportesTipoDetalleMovimientoInventario.add(this.jComboBoxTiposSeleccionarTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); /* this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iGridyParametrosReportes; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx =iGridxParametrosReportes++; this.jPanelParametrosReportesTipoDetalleMovimientoInventario.add(this.jCheckBoxSeleccionarTodosTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); */ iGridxParametrosAuxiliar=0; iGridyParametrosAuxiliar=0; this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.anchor = GridBagConstraints.WEST; this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy =iGridxParametrosAuxiliar;//iGridyParametrosReportes; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx =iGridyParametrosAuxiliar++;//iGridxParametrosReportes++; //this.jPanelParametrosReportes this.jPanelParametrosAuxiliar3TipoDetalleMovimientoInventario.add(this.jCheckBoxSeleccionarTodosTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.anchor = GridBagConstraints.WEST; this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy =iGridxParametrosAuxiliar;//iGridyParametrosReportes; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx =iGridyParametrosAuxiliar++;//iGridxParametrosReportes++; //this.jPanelParametrosReportes this.jPanelParametrosAuxiliar3TipoDetalleMovimientoInventario.add(this.jCheckBoxSeleccionadosTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); //USANDO AUXILIAR3 this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.anchor = GridBagConstraints.WEST; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iGridyParametrosReportes; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iGridxParametrosReportes++; //this.jPanelParametrosReportes this.jPanelParametrosReportesTipoDetalleMovimientoInventario.add(this.jPanelParametrosAuxiliar3TipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); //USANDO AUXILIAR3 FIN this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iGridyParametrosReportes; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iGridxParametrosReportes++; this.jPanelParametrosReportesTipoDetalleMovimientoInventario.add(this.jComboBoxTiposRelacionesTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iGridyParametrosReportes; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iGridxParametrosReportes++; this.jPanelParametrosReportesTipoDetalleMovimientoInventario.add(this.jComboBoxTiposAccionesTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); ; //ELEMENTOS TABLAS PARAMETOS //SUBPANELES POR CAMPO if(!this.conCargarMinimo) { //SUBPANELES EN PANEL CAMPOS } //ELEMENTOS TABLAS PARAMETOS_FIN /* GridBagLayout gridaBagLayoutDatosTipoDetalleMovimientoInventario = new GridBagLayout(); this.jScrollPanelDatosTipoDetalleMovimientoInventario.setLayout(gridaBagLayoutDatosTipoDetalleMovimientoInventario); this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = 0; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = 0; this.jScrollPanelDatosTipoDetalleMovimientoInventario.add(this.jTableDatosTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); */ this.redimensionarTablaDatos(-1); this.jScrollPanelDatosTipoDetalleMovimientoInventario.setViewportView(this.jTableDatosTipoDetalleMovimientoInventario); this.jTableDatosTipoDetalleMovimientoInventario.setFillsViewportHeight(true); this.jTableDatosTipoDetalleMovimientoInventario.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); Integer iGridXParametrosAccionesFormulario=0; Integer iGridYParametrosAccionesFormulario=0; GridBagLayout gridaBagLayoutAccionesTipoDetalleMovimientoInventario= new GridBagLayout(); this.jPanelAccionesTipoDetalleMovimientoInventario.setLayout(gridaBagLayoutAccionesTipoDetalleMovimientoInventario); /* this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = 0; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = 0; this.jPanelAccionesTipoDetalleMovimientoInventario.add(this.jButtonNuevoTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); */ int iPosXAccion=0; //this.setJProgressBarToJPanel(); GridBagLayout gridaBagLayoutTipoDetalleMovimientoInventario = new GridBagLayout(); this.jContentPane.setLayout(gridaBagLayoutTipoDetalleMovimientoInventario); if(this.parametroGeneralUsuario.getcon_botones_tool_bar() && !this.tipodetallemovimientoinventarioSessionBean.getEsGuardarRelacionado()) { this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iGridyPrincipal++; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = 0; //this.gridBagConstraintsTipoDetalleMovimientoInventario.fill =GridBagConstraints.VERTICAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.anchor = GridBagConstraints.CENTER;//.CENTER;NORTH this.gridBagConstraintsTipoDetalleMovimientoInventario.ipadx = 100; this.jContentPane.add(this.jTtoolBarTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); } //PROCESANDO EN OTRA PANTALLA /* this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iGridyPrincipal++; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = 0; //this.gridBagConstraintsTipoDetalleMovimientoInventario.fill =GridBagConstraints.VERTICAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.anchor = GridBagConstraints.CENTER; this.gridBagConstraintsTipoDetalleMovimientoInventario.ipadx = 100; this.jContentPane.add(this.jPanelProgressProcess, this.gridBagConstraintsTipoDetalleMovimientoInventario); */ int iGridxBusquedasParametros=0; //PARAMETROS TABLAS PARAMETROS if(!this.conCargarMinimo) { } //PARAMETROS TABLAS PARAMETROS_FIN //PARAMETROS REPORTES this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iGridyPrincipal++; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = 0; this.jContentPane.add(this.jPanelParametrosReportesTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); /* this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iGridyPrincipal++; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = 0; this.jContentPane.add(this.jPanelParametrosReportesAccionesTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); */ this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy =iGridyPrincipal++; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx =0; this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.BOTH; //this.gridBagConstraintsTipoDetalleMovimientoInventario.ipady =150; this.jContentPane.add(this.jScrollPanelDatosTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iGridyPrincipal++; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = 0; this.jContentPane.add(this.jPanelPaginacionTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); iWidthScroll=(screenSize.width-screenSize.width/Constantes.ISWING_RESTOPARTE_DIFERENCIA_ANCHO_RELSCROLL)+(250*0); iHeightScroll=(screenSize.height-screenSize.height/Constantes.ISWING_RESTOPARTE_DIFERENCIA_ALTO_RELSCROLL); //iWidthFormulario=iWidthScroll; //iHeightFormulario=iHeightScroll; if(TipoDetalleMovimientoInventarioJInternalFrame.CON_DATOS_FRAME) { this.jPanelBusquedasParametrosTipoDetalleMovimientoInventario= new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true);//new JPanel(); int iGridyRelaciones=0; GridBagLayout gridaBagLayoutBusquedasParametrosTipoDetalleMovimientoInventario = new GridBagLayout(); this.jPanelBusquedasParametrosTipoDetalleMovimientoInventario.setLayout(gridaBagLayoutBusquedasParametrosTipoDetalleMovimientoInventario); if(this.parametroGeneralUsuario.getcon_botones_tool_bar()) { } this.jScrollPanelDatosGeneralTipoDetalleMovimientoInventario= new JScrollPane(jContentPane,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); this.jScrollPanelDatosGeneralTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(iWidthScroll,iHeightScroll)); this.jScrollPanelDatosGeneralTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(iWidthScroll,iHeightScroll)); this.jScrollPanelDatosGeneralTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(iWidthScroll,iHeightScroll)); this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); //if(!this.conCargarMinimo) { //} this.conMaximoRelaciones=true; if(this.parametroGeneralUsuario.getcon_cargar_por_parte()) { } Boolean tieneColumnasOcultas=false; if(!Constantes.ISDEVELOPING) { } else { if(tieneColumnasOcultas) { } } } else { //DISENO_DETALLE COMENTAR Y //DISENO_DETALLE(Solo Descomentar Seccion Inferior) //NOTA-DISENO_DETALLE(Si cambia lo de abajo, cambiar lo comentado, Al final no es lo mismo) } //DISENO_DETALLE-(Descomentar) /* this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iGridyPrincipal++; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = 0; this.jContentPane.add(this.jPanelCamposTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iGridyPrincipal++; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = 0; this.jContentPane.add(this.jPanelCamposOcultosTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy =iGridyPrincipal++; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx =0; this.jContentPane.add(this.jPanelAccionesTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); */ //pack(); return this.jScrollPanelDatosGeneralTipoDetalleMovimientoInventario;//jContentPane; } /* public void cargarReporteDinamicoTipoDetalleMovimientoInventario() throws Exception { int iWidthReporteDinamico=350; int iHeightReporteDinamico=450;//250;400; int iPosXReporteDinamico=0; int iPosYReporteDinamico=0; GridBagLayout gridaBagLayoutReporteDinamicoTipoDetalleMovimientoInventario = new GridBagLayout(); //PANEL this.jPanelReporteDinamicoTipoDetalleMovimientoInventario = new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true); this.jPanelReporteDinamicoTipoDetalleMovimientoInventario.setBorder(javax.swing.BorderFactory.createTitledBorder("Campos")); this.jPanelReporteDinamicoTipoDetalleMovimientoInventario.setName("jPanelReporteDinamicoTipoDetalleMovimientoInventario"); this.jPanelReporteDinamicoTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(iWidthReporteDinamico,iHeightReporteDinamico)); this.jPanelReporteDinamicoTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(iWidthReporteDinamico,iHeightReporteDinamico)); this.jPanelReporteDinamicoTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(iWidthReporteDinamico,iHeightReporteDinamico)); this.jPanelReporteDinamicoTipoDetalleMovimientoInventario.setLayout(gridaBagLayoutReporteDinamicoTipoDetalleMovimientoInventario); this.jInternalFrameReporteDinamicoTipoDetalleMovimientoInventario= new ReporteDinamicoJInternalFrame(); this.jScrollPanelReporteDinamicoTipoDetalleMovimientoInventario = new JScrollPane(); //PANEL_CONTROLES //this.jScrollColumnasSelectReporteTipoDetalleMovimientoInventario= new JScrollPane(); //JINTERNAL FRAME this.jInternalFrameReporteDinamicoTipoDetalleMovimientoInventario.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE); this.jInternalFrameReporteDinamicoTipoDetalleMovimientoInventario.setjInternalFrameParent(this); this.jInternalFrameReporteDinamicoTipoDetalleMovimientoInventario.setTitle("REPORTE DINAMICO"); this.jInternalFrameReporteDinamicoTipoDetalleMovimientoInventario.setSize(iWidthReporteDinamico+70,iHeightReporteDinamico+100); this.jInternalFrameReporteDinamicoTipoDetalleMovimientoInventario.setLocation(xOffset*(openFrameCount + Constantes.INUM_MAX_VENTANAS_DET_X), yOffset*(openFrameCount+Constantes.INUM_MAX_VENTANAS_DET_Y)); this.jInternalFrameReporteDinamicoTipoDetalleMovimientoInventario.setResizable(true); this.jInternalFrameReporteDinamicoTipoDetalleMovimientoInventario.setClosable(true); this.jInternalFrameReporteDinamicoTipoDetalleMovimientoInventario.setMaximizable(true); //SCROLL PANEL //this.jScrollPanelReporteDinamicoTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(iWidthReporteDinamico,iHeightReporteDinamico)); //this.jScrollPanelReporteDinamicoTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(iWidthReporteDinamico,iHeightReporteDinamico)); //this.jScrollPanelReporteDinamicoTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(iWidthReporteDinamico,iHeightReporteDinamico)); //this.jScrollPanelReporteDinamicoTipoDetalleMovimientoInventario.setBorder(javax.swing.BorderFactory.createTitledBorder("Datos Tipo Costos")); //CONTROLES-ELEMENTOS //LABEL SELECT COLUMNAS this.jLabelColumnasSelectReporteTipoDetalleMovimientoInventario = new JLabelMe(); this.jLabelColumnasSelectReporteTipoDetalleMovimientoInventario.setText("Columnas Seleccion"); this.jLabelColumnasSelectReporteTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelColumnasSelectReporteTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelColumnasSelectReporteTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); iPosXReporteDinamico=0; iPosYReporteDinamico=0; this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iPosYReporteDinamico; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iPosXReporteDinamico++; this.jPanelReporteDinamicoTipoDetalleMovimientoInventario.add(this.jLabelColumnasSelectReporteTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); //LISTA SELECT COLUMNAS this.jListColumnasSelectReporteTipoDetalleMovimientoInventario = new JList<Reporte>(); this.jListColumnasSelectReporteTipoDetalleMovimientoInventario.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); this.jListColumnasSelectReporteTipoDetalleMovimientoInventario.setToolTipText("Tipos de Seleccion"); this.jListColumnasSelectReporteTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(145,300)); this.jListColumnasSelectReporteTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(145,300)); this.jListColumnasSelectReporteTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(145,300)); //SCROLL_PANEL_CONTROL this.jScrollColumnasSelectReporteTipoDetalleMovimientoInventario=new JScrollPane(this.jListColumnasSelectReporteTipoDetalleMovimientoInventario); this.jScrollColumnasSelectReporteTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(180,150)); this.jScrollColumnasSelectReporteTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(180,150)); this.jScrollColumnasSelectReporteTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(180,150)); this.jScrollColumnasSelectReporteTipoDetalleMovimientoInventario.setBorder(javax.swing.BorderFactory.createTitledBorder("COLUMNAS")); this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iPosYReporteDinamico; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iPosXReporteDinamico++; //this.jPanelReporteDinamicoTipoDetalleMovimientoInventario.add(this.jListColumnasSelectReporteTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); this.jPanelReporteDinamicoTipoDetalleMovimientoInventario.add(this.jScrollColumnasSelectReporteTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); //LABEL SELECT RELACIONES this.jLabelRelacionesSelectReporteTipoDetalleMovimientoInventario = new JLabelMe(); this.jLabelRelacionesSelectReporteTipoDetalleMovimientoInventario.setText("Relaciones Seleccion"); this.jLabelRelacionesSelectReporteTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelRelacionesSelectReporteTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelRelacionesSelectReporteTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); iPosXReporteDinamico=0; iPosYReporteDinamico++; this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iPosYReporteDinamico; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iPosXReporteDinamico++; this.jPanelReporteDinamicoTipoDetalleMovimientoInventario.add(this.jLabelRelacionesSelectReporteTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); //LABEL SELECT RELACIONES_FIN //LISTA SELECT RELACIONES this.jListRelacionesSelectReporteTipoDetalleMovimientoInventario = new JList<Reporte>(); this.jListRelacionesSelectReporteTipoDetalleMovimientoInventario.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); this.jListRelacionesSelectReporteTipoDetalleMovimientoInventario.setToolTipText("Tipos de Seleccion"); this.jListRelacionesSelectReporteTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(145,300)); this.jListRelacionesSelectReporteTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(145,300)); this.jListRelacionesSelectReporteTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(145,300)); //SCROLL_PANEL_CONTROL this.jScrollRelacionesSelectReporteTipoDetalleMovimientoInventario=new JScrollPane(this.jListRelacionesSelectReporteTipoDetalleMovimientoInventario); this.jScrollRelacionesSelectReporteTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(180,120)); this.jScrollRelacionesSelectReporteTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(180,120)); this.jScrollRelacionesSelectReporteTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(180,120)); this.jScrollRelacionesSelectReporteTipoDetalleMovimientoInventario.setBorder(javax.swing.BorderFactory.createTitledBorder("RELACIONES")); this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iPosYReporteDinamico; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iPosXReporteDinamico++; //this.jPanelReporteDinamicoTipoDetalleMovimientoInventario.add(this.jListRelacionesSelectReporteTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); this.jPanelReporteDinamicoTipoDetalleMovimientoInventario.add(this.jScrollRelacionesSelectReporteTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); //LISTA SELECT RELACIONES_FIN this.jCheckBoxConGraficoDinamicoTipoDetalleMovimientoInventario = new JCheckBoxMe(); this.jComboBoxColumnaCategoriaGraficoTipoDetalleMovimientoInventario = new JComboBoxMe(); this.jListColumnasValoresGraficoTipoDetalleMovimientoInventario = new JList<Reporte>(); //COMBO TIPOS REPORTES this.jComboBoxTiposReportesDinamicoTipoDetalleMovimientoInventario = new JComboBoxMe(); this.jComboBoxTiposReportesDinamicoTipoDetalleMovimientoInventario.setToolTipText("Tipos De Reporte"); this.jComboBoxTiposReportesDinamicoTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(100,20)); this.jComboBoxTiposReportesDinamicoTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(100,20)); this.jComboBoxTiposReportesDinamicoTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(100,20)); FuncionesSwing.setBoldComboBox(this.jComboBoxTiposReportesDinamicoTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this);; //COMBO TIPOS REPORTES //COMBO TIPOS ARCHIVOS this.jComboBoxTiposArchivosReportesDinamicoTipoDetalleMovimientoInventario = new JComboBoxMe(); this.jComboBoxTiposArchivosReportesDinamicoTipoDetalleMovimientoInventario.setToolTipText("Tipos Archivos"); this.jComboBoxTiposArchivosReportesDinamicoTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(100,20)); this.jComboBoxTiposArchivosReportesDinamicoTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(100,20)); this.jComboBoxTiposArchivosReportesDinamicoTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(100,20)); FuncionesSwing.setBoldComboBox(this.jComboBoxTiposArchivosReportesDinamicoTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this);; //COMBO TIPOS ARCHIVOS //LABEL GENERAR EXCEL this.jLabelGenerarExcelReporteDinamicoTipoDetalleMovimientoInventario = new JLabelMe(); this.jLabelGenerarExcelReporteDinamicoTipoDetalleMovimientoInventario.setText("Tipos de Reporte"); this.jLabelGenerarExcelReporteDinamicoTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelGenerarExcelReporteDinamicoTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelGenerarExcelReporteDinamicoTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); iPosXReporteDinamico=0; iPosYReporteDinamico++; this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iPosYReporteDinamico; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iPosXReporteDinamico++; this.jPanelReporteDinamicoTipoDetalleMovimientoInventario.add(this.jLabelGenerarExcelReporteDinamicoTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); //BOTON GENERAR EXCEL this.jButtonGenerarExcelReporteDinamicoTipoDetalleMovimientoInventario = new JButtonMe(); this.jButtonGenerarExcelReporteDinamicoTipoDetalleMovimientoInventario.setText("Generar Excel"); FuncionesSwing.addImagenButtonGeneral(this.jButtonGenerarExcelReporteDinamicoTipoDetalleMovimientoInventario,"generar_excel_reporte_dinamico_button","Generar EXCEL"); this.jButtonGenerarExcelReporteDinamicoTipoDetalleMovimientoInventario.setToolTipText("Generar EXCEL"+" "+TipoDetalleMovimientoInventarioConstantesFunciones.SCLASSWEBTITULO); //this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); //this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.VERTICAL; //this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iPosYReporteDinamico; //this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iPosXReporteDinamico++; //this.jPanelReporteDinamicoTipoDetalleMovimientoInventario.add(this.jButtonGenerarExcelReporteDinamicoTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); //COMBO TIPOS REPORTES this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iPosYReporteDinamico; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iPosXReporteDinamico++; this.jPanelReporteDinamicoTipoDetalleMovimientoInventario.add(this.jComboBoxTiposReportesDinamicoTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); //LABEL TIPOS DE ARCHIVO this.jLabelTiposArchivoReporteDinamicoTipoDetalleMovimientoInventario = new JLabelMe(); this.jLabelTiposArchivoReporteDinamicoTipoDetalleMovimientoInventario.setText("Tipos de Archivo"); this.jLabelTiposArchivoReporteDinamicoTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelTiposArchivoReporteDinamicoTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelTiposArchivoReporteDinamicoTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); iPosXReporteDinamico=0; iPosYReporteDinamico++; this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iPosYReporteDinamico; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iPosXReporteDinamico++; this.jPanelReporteDinamicoTipoDetalleMovimientoInventario.add(this.jLabelTiposArchivoReporteDinamicoTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); //COMBO TIPOS ARCHIVOS this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iPosYReporteDinamico; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iPosXReporteDinamico++; this.jPanelReporteDinamicoTipoDetalleMovimientoInventario.add(this.jComboBoxTiposArchivosReportesDinamicoTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); //BOTON GENERAR this.jButtonGenerarReporteDinamicoTipoDetalleMovimientoInventario = new JButtonMe(); this.jButtonGenerarReporteDinamicoTipoDetalleMovimientoInventario.setText("Generar"); FuncionesSwing.addImagenButtonGeneral(this.jButtonGenerarReporteDinamicoTipoDetalleMovimientoInventario,"generar_reporte_dinamico_button","Generar"); this.jButtonGenerarReporteDinamicoTipoDetalleMovimientoInventario.setToolTipText("Generar"+" "+TipoDetalleMovimientoInventarioConstantesFunciones.SCLASSWEBTITULO); iPosXReporteDinamico=0; iPosYReporteDinamico++; this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iPosYReporteDinamico; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iPosXReporteDinamico++; this.jPanelReporteDinamicoTipoDetalleMovimientoInventario.add(this.jButtonGenerarReporteDinamicoTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); //BOTON CERRAR this.jButtonCerrarReporteDinamicoTipoDetalleMovimientoInventario = new JButtonMe(); this.jButtonCerrarReporteDinamicoTipoDetalleMovimientoInventario.setText("Cancelar"); FuncionesSwing.addImagenButtonGeneral(this.jButtonCerrarReporteDinamicoTipoDetalleMovimientoInventario,"cerrar_reporte_dinamico_button","Cancelar"); this.jButtonCerrarReporteDinamicoTipoDetalleMovimientoInventario.setToolTipText("Cancelar"+" "+TipoDetalleMovimientoInventarioConstantesFunciones.SCLASSWEBTITULO); this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iPosYReporteDinamico; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iPosXReporteDinamico++; this.jPanelReporteDinamicoTipoDetalleMovimientoInventario.add(this.jButtonCerrarReporteDinamicoTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); //GLOBAL AGREGAR PANELES GridBagLayout gridaBagLayoutReporteDinamicoPrincipalTipoDetalleMovimientoInventario = new GridBagLayout(); this.jScrollPanelReporteDinamicoTipoDetalleMovimientoInventario= new JScrollPane(jPanelReporteDinamicoTipoDetalleMovimientoInventario,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); this.jScrollPanelReporteDinamicoTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(iWidthReporteDinamico+90,iHeightReporteDinamico+90)); this.jScrollPanelReporteDinamicoTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(iWidthReporteDinamico+90,iHeightReporteDinamico+90)); this.jScrollPanelReporteDinamicoTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(iWidthReporteDinamico+90,iHeightReporteDinamico+90)); this.jScrollPanelReporteDinamicoTipoDetalleMovimientoInventario.setBorder(javax.swing.BorderFactory.createTitledBorder("Datos Tipo Costos")); iPosXReporteDinamico=0; iPosYReporteDinamico=0; this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy =iPosYReporteDinamico; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx =iPosXReporteDinamico; this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.BOTH; this.jInternalFrameReporteDinamicoTipoDetalleMovimientoInventario.setContentPane(new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true)); this.jInternalFrameReporteDinamicoTipoDetalleMovimientoInventario.getContentPane().setLayout(gridaBagLayoutReporteDinamicoPrincipalTipoDetalleMovimientoInventario); this.jInternalFrameReporteDinamicoTipoDetalleMovimientoInventario.getContentPane().add(this.jScrollPanelReporteDinamicoTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); } */ /* public void cargarImportacionTipoDetalleMovimientoInventario() throws Exception { int iWidthImportacion=350; int iHeightImportacion=250;//400; int iPosXImportacion=0; int iPosYImportacion=0; GridBagLayout gridaBagLayoutImportacionTipoDetalleMovimientoInventario = new GridBagLayout(); //PANEL this.jPanelImportacionTipoDetalleMovimientoInventario = new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true); this.jPanelImportacionTipoDetalleMovimientoInventario.setBorder(javax.swing.BorderFactory.createTitledBorder("Campos")); this.jPanelImportacionTipoDetalleMovimientoInventario.setName("jPanelImportacionTipoDetalleMovimientoInventario"); this.jPanelImportacionTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(iWidthImportacion,iHeightImportacion)); this.jPanelImportacionTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(iWidthImportacion,iHeightImportacion)); this.jPanelImportacionTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(iWidthImportacion,iHeightImportacion)); this.jPanelImportacionTipoDetalleMovimientoInventario.setLayout(gridaBagLayoutImportacionTipoDetalleMovimientoInventario); this.jInternalFrameImportacionTipoDetalleMovimientoInventario= new ImportacionJInternalFrame(); //this.jInternalFrameImportacionTipoDetalleMovimientoInventario= new ImportacionJInternalFrame(); this.jScrollPanelImportacionTipoDetalleMovimientoInventario = new JScrollPane(); //PANEL_CONTROLES //this.jScrollColumnasSelectReporteTipoDetalleMovimientoInventario= new JScrollPane(); //JINTERNAL FRAME this.jInternalFrameImportacionTipoDetalleMovimientoInventario.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE); this.jInternalFrameImportacionTipoDetalleMovimientoInventario.setjInternalFrameParent(this); this.jInternalFrameImportacionTipoDetalleMovimientoInventario.setTitle("REPORTE DINAMICO"); this.jInternalFrameImportacionTipoDetalleMovimientoInventario.setSize(iWidthImportacion+70,iHeightImportacion+100); this.jInternalFrameImportacionTipoDetalleMovimientoInventario.setLocation(xOffset*(openFrameCount + Constantes.INUM_MAX_VENTANAS_DET_X), yOffset*(openFrameCount+Constantes.INUM_MAX_VENTANAS_DET_Y)); this.jInternalFrameImportacionTipoDetalleMovimientoInventario.setResizable(true); this.jInternalFrameImportacionTipoDetalleMovimientoInventario.setClosable(true); this.jInternalFrameImportacionTipoDetalleMovimientoInventario.setMaximizable(true); //JINTERNAL FRAME IMPORTACION this.jInternalFrameImportacionTipoDetalleMovimientoInventario.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE); this.jInternalFrameImportacionTipoDetalleMovimientoInventario.setjInternalFrameParent(this); this.jInternalFrameImportacionTipoDetalleMovimientoInventario.setTitle("IMPORTACION"); this.jInternalFrameImportacionTipoDetalleMovimientoInventario.setSize(iWidthImportacion+70,iHeightImportacion+100); this.jInternalFrameImportacionTipoDetalleMovimientoInventario.setLocation(xOffset*(openFrameCount + Constantes.INUM_MAX_VENTANAS_DET_X), yOffset*(openFrameCount+Constantes.INUM_MAX_VENTANAS_DET_Y)); this.jInternalFrameImportacionTipoDetalleMovimientoInventario.setResizable(true); this.jInternalFrameImportacionTipoDetalleMovimientoInventario.setClosable(true); this.jInternalFrameImportacionTipoDetalleMovimientoInventario.setMaximizable(true); //SCROLL PANEL this.jScrollPanelImportacionTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(iWidthImportacion,iHeightImportacion)); this.jScrollPanelImportacionTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(iWidthImportacion,iHeightImportacion)); this.jScrollPanelImportacionTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(iWidthImportacion,iHeightImportacion)); this.jScrollPanelImportacionTipoDetalleMovimientoInventario.setBorder(javax.swing.BorderFactory.createTitledBorder("Datos Tipo Costos")); //LABEL ARCHIVO IMPORTACION this.jLabelArchivoImportacionTipoDetalleMovimientoInventario = new JLabelMe(); this.jLabelArchivoImportacionTipoDetalleMovimientoInventario.setText("ARCHIVO IMPORTACION"); this.jLabelArchivoImportacionTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelArchivoImportacionTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelArchivoImportacionTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); iPosXImportacion=0; iPosYImportacion++; this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iPosYImportacion; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iPosXImportacion++; this.jPanelImportacionTipoDetalleMovimientoInventario.add(this.jLabelArchivoImportacionTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); //BOTON ABRIR IMPORTACION this.jFileChooserImportacionTipoDetalleMovimientoInventario = new JFileChooser(); this.jFileChooserImportacionTipoDetalleMovimientoInventario.setToolTipText("ESCOGER ARCHIVO"+" "+TipoDetalleMovimientoInventarioConstantesFunciones.SCLASSWEBTITULO); this.jButtonAbrirImportacionTipoDetalleMovimientoInventario = new JButtonMe(); this.jButtonAbrirImportacionTipoDetalleMovimientoInventario.setText("ESCOGER"); FuncionesSwing.addImagenButtonGeneral(this.jButtonAbrirImportacionTipoDetalleMovimientoInventario,"generar_importacion_button","ESCOGER"); this.jButtonAbrirImportacionTipoDetalleMovimientoInventario.setToolTipText("Generar"+" "+TipoDetalleMovimientoInventarioConstantesFunciones.SCLASSWEBTITULO); this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iPosYImportacion; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iPosXImportacion++; this.jPanelImportacionTipoDetalleMovimientoInventario.add(this.jButtonAbrirImportacionTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); //LABEL PATH IMPORTACION this.jLabelPathArchivoImportacionTipoDetalleMovimientoInventario = new JLabelMe(); this.jLabelPathArchivoImportacionTipoDetalleMovimientoInventario.setText("PATH ARCHIVO"); this.jLabelPathArchivoImportacionTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelPathArchivoImportacionTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelPathArchivoImportacionTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); iPosXImportacion=0; iPosYImportacion++; this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iPosYImportacion; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iPosXImportacion++; this.jPanelImportacionTipoDetalleMovimientoInventario.add(this.jLabelPathArchivoImportacionTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); //PATH IMPORTACION this.jTextFieldPathArchivoImportacionTipoDetalleMovimientoInventario=new JTextFieldMe(); this.jTextFieldPathArchivoImportacionTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(150,Constantes.ISWING_ALTO_CONTROL)); this.jTextFieldPathArchivoImportacionTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(150,Constantes.ISWING_ALTO_CONTROL)); this.jTextFieldPathArchivoImportacionTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(150,Constantes.ISWING_ALTO_CONTROL)); this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iPosYImportacion; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iPosXImportacion++; this.jPanelImportacionTipoDetalleMovimientoInventario.add(this.jTextFieldPathArchivoImportacionTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); //BOTON IMPORTACION this.jButtonGenerarImportacionTipoDetalleMovimientoInventario = new JButtonMe(); this.jButtonGenerarImportacionTipoDetalleMovimientoInventario.setText("IMPORTAR"); FuncionesSwing.addImagenButtonGeneral(this.jButtonGenerarImportacionTipoDetalleMovimientoInventario,"generar_importacion_button","IMPORTAR"); this.jButtonGenerarImportacionTipoDetalleMovimientoInventario.setToolTipText("Generar"+" "+TipoDetalleMovimientoInventarioConstantesFunciones.SCLASSWEBTITULO); iPosXImportacion=0; iPosYImportacion++; this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iPosYImportacion; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iPosXImportacion++; this.jPanelImportacionTipoDetalleMovimientoInventario.add(this.jButtonGenerarImportacionTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); //BOTON CERRAR this.jButtonCerrarImportacionTipoDetalleMovimientoInventario = new JButtonMe(); this.jButtonCerrarImportacionTipoDetalleMovimientoInventario.setText("Cancelar"); FuncionesSwing.addImagenButtonGeneral(this.jButtonCerrarImportacionTipoDetalleMovimientoInventario,"cerrar_reporte_dinamico_button","Cancelar"); this.jButtonCerrarImportacionTipoDetalleMovimientoInventario.setToolTipText("Cancelar"+" "+TipoDetalleMovimientoInventarioConstantesFunciones.SCLASSWEBTITULO); this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iPosYImportacion; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iPosXImportacion++; this.jPanelImportacionTipoDetalleMovimientoInventario.add(this.jButtonCerrarImportacionTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); //GLOBAL AGREGAR PANELES GridBagLayout gridaBagLayoutImportacionPrincipalTipoDetalleMovimientoInventario = new GridBagLayout(); this.jScrollPanelImportacionTipoDetalleMovimientoInventario= new JScrollPane(jPanelImportacionTipoDetalleMovimientoInventario,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); iPosXImportacion=0; iPosYImportacion=0; this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy =iPosYImportacion; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx =iPosXImportacion; this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.BOTH; this.jInternalFrameImportacionTipoDetalleMovimientoInventario.setContentPane(new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true)); this.jInternalFrameImportacionTipoDetalleMovimientoInventario.getContentPane().setLayout(gridaBagLayoutImportacionPrincipalTipoDetalleMovimientoInventario); this.jInternalFrameImportacionTipoDetalleMovimientoInventario.getContentPane().add(this.jScrollPanelImportacionTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); } */ /* public void cargarOrderByTipoDetalleMovimientoInventario(Boolean cargaMinima) throws Exception { String sMapKey = ""; InputMap inputMap =null; int iWidthOrderBy=350; int iHeightOrderBy=300;//400; int iPosXOrderBy=0; int iPosYOrderBy=0; if(!cargaMinima) { this.jButtonAbrirOrderByTipoDetalleMovimientoInventario = new JButtonMe(); this.jButtonAbrirOrderByTipoDetalleMovimientoInventario.setText("Orden"); this.jButtonAbrirOrderByTipoDetalleMovimientoInventario.setToolTipText("Orden"+FuncionesSwing.getKeyMensaje("ORDEN")); FuncionesSwing.addImagenButtonGeneral(this.jButtonAbrirOrderByTipoDetalleMovimientoInventario,"orden_button","Orden"); FuncionesSwing.setBoldButton(this.jButtonAbrirOrderByTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this);; sMapKey = "AbrirOrderByTipoDetalleMovimientoInventario"; inputMap = this.jButtonAbrirOrderByTipoDetalleMovimientoInventario.getInputMap(FuncionesSwing.getTipoFocusedKeyEvent("NORMAL")); inputMap.put(KeyStroke.getKeyStroke(FuncionesSwing.getKeyEvent("ORDEN") , FuncionesSwing.getMaskKey("ORDEN")), sMapKey); this.jButtonAbrirOrderByTipoDetalleMovimientoInventario.getActionMap().put(sMapKey,new ButtonAbstractAction(this,"AbrirOrderByTipoDetalleMovimientoInventario")); GridBagLayout gridaBagLayoutOrderByTipoDetalleMovimientoInventario = new GridBagLayout(); //PANEL this.jPanelOrderByTipoDetalleMovimientoInventario = new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true); this.jPanelOrderByTipoDetalleMovimientoInventario.setBorder(javax.swing.BorderFactory.createTitledBorder("Campos")); this.jPanelOrderByTipoDetalleMovimientoInventario.setName("jPanelOrderByTipoDetalleMovimientoInventario"); this.jPanelOrderByTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(iWidthOrderBy,iHeightOrderBy)); this.jPanelOrderByTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(iWidthOrderBy,iHeightOrderBy)); this.jPanelOrderByTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(iWidthOrderBy,iHeightOrderBy)); FuncionesSwing.setBoldPanel(this.jPanelOrderByTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this);; this.jPanelOrderByTipoDetalleMovimientoInventario.setLayout(gridaBagLayoutOrderByTipoDetalleMovimientoInventario); this.jTableDatosTipoDetalleMovimientoInventarioOrderBy = new JTableMe(); this.jTableDatosTipoDetalleMovimientoInventarioOrderBy.setAutoCreateRowSorter(true); FuncionesSwing.setBoldTable(jTableDatosTipoDetalleMovimientoInventarioOrderBy,STIPO_TAMANIO_GENERAL,false,true,this); this.jScrollPanelDatosTipoDetalleMovimientoInventarioOrderBy = new JScrollPane(); this.jScrollPanelDatosTipoDetalleMovimientoInventarioOrderBy.setBorder(javax.swing.BorderFactory.createTitledBorder("Orden")); this.jScrollPanelDatosTipoDetalleMovimientoInventarioOrderBy.setViewportView(this.jTableDatosTipoDetalleMovimientoInventarioOrderBy); this.jTableDatosTipoDetalleMovimientoInventarioOrderBy.setFillsViewportHeight(true); this.jTableDatosTipoDetalleMovimientoInventarioOrderBy.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); this.jInternalFrameOrderByTipoDetalleMovimientoInventario= new OrderByJInternalFrame(); this.jInternalFrameOrderByTipoDetalleMovimientoInventario= new OrderByJInternalFrame(); this.jScrollPanelOrderByTipoDetalleMovimientoInventario = new JScrollPane(); //PANEL_CONTROLES //this.jScrollColumnasSelectReporteTipoDetalleMovimientoInventario= new JScrollPane(); //JINTERNAL FRAME OrderBy this.jInternalFrameOrderByTipoDetalleMovimientoInventario.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE); this.jInternalFrameOrderByTipoDetalleMovimientoInventario.setjInternalFrameParent(this); this.jInternalFrameOrderByTipoDetalleMovimientoInventario.setTitle("Orden"); this.jInternalFrameOrderByTipoDetalleMovimientoInventario.setSize(iWidthOrderBy+70,iHeightOrderBy+100); this.jInternalFrameOrderByTipoDetalleMovimientoInventario.setLocation(xOffset*(openFrameCount + Constantes.INUM_MAX_VENTANAS_DET_X), yOffset*(openFrameCount+Constantes.INUM_MAX_VENTANAS_DET_Y)); this.jInternalFrameOrderByTipoDetalleMovimientoInventario.setResizable(true); this.jInternalFrameOrderByTipoDetalleMovimientoInventario.setClosable(true); this.jInternalFrameOrderByTipoDetalleMovimientoInventario.setMaximizable(true); //FuncionesSwing.setBoldPanel(this.jInternalFrameOrderByTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this);; //SCROLL PANEL this.jScrollPanelOrderByTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(iWidthOrderBy,iHeightOrderBy)); this.jScrollPanelOrderByTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(iWidthOrderBy,iHeightOrderBy)); this.jScrollPanelOrderByTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(iWidthOrderBy,iHeightOrderBy)); FuncionesSwing.setBoldScrollPanel(this.jScrollPanelOrderByTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this);; this.jScrollPanelOrderByTipoDetalleMovimientoInventario.setBorder(javax.swing.BorderFactory.createTitledBorder("Datos Tipo Costos")); //DATOS TOTALES this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy =iPosYOrderBy++; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx =iPosXOrderBy; this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.BOTH; //this.gridBagConstraintsTipoDetalleMovimientoInventario.ipady =150; this.jPanelOrderByTipoDetalleMovimientoInventario.add(jScrollPanelDatosTipoDetalleMovimientoInventarioOrderBy, this.gridBagConstraintsTipoDetalleMovimientoInventario);//this.jTableDatosTipoDetalleMovimientoInventarioTotales //BOTON CERRAR this.jButtonCerrarOrderByTipoDetalleMovimientoInventario = new JButtonMe(); this.jButtonCerrarOrderByTipoDetalleMovimientoInventario.setText("Salir"); FuncionesSwing.addImagenButtonGeneral(this.jButtonCerrarOrderByTipoDetalleMovimientoInventario,"cerrar","Salir");//cerrar_reporte_dinamico_button this.jButtonCerrarOrderByTipoDetalleMovimientoInventario.setToolTipText("Cancelar"+" "+TipoDetalleMovimientoInventarioConstantesFunciones.SCLASSWEBTITULO); FuncionesSwing.setBoldButton(this.jButtonCerrarOrderByTipoDetalleMovimientoInventario, STIPO_TAMANIO_GENERAL,false,true,this);; this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy = iPosYOrderBy++; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx = iPosXOrderBy; this.jPanelOrderByTipoDetalleMovimientoInventario.add(this.jButtonCerrarOrderByTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); //GLOBAL AGREGAR PANELES GridBagLayout gridaBagLayoutOrderByPrincipalTipoDetalleMovimientoInventario = new GridBagLayout(); this.jScrollPanelOrderByTipoDetalleMovimientoInventario= new JScrollPane(jPanelOrderByTipoDetalleMovimientoInventario,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); iPosXOrderBy=0; iPosYOrderBy=0; this.gridBagConstraintsTipoDetalleMovimientoInventario = new GridBagConstraints(); this.gridBagConstraintsTipoDetalleMovimientoInventario.gridy =iPosYOrderBy; this.gridBagConstraintsTipoDetalleMovimientoInventario.gridx =iPosXOrderBy; this.gridBagConstraintsTipoDetalleMovimientoInventario.fill = GridBagConstraints.BOTH; this.jInternalFrameOrderByTipoDetalleMovimientoInventario.setContentPane(new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true)); this.jInternalFrameOrderByTipoDetalleMovimientoInventario.getContentPane().setLayout(gridaBagLayoutOrderByPrincipalTipoDetalleMovimientoInventario); this.jInternalFrameOrderByTipoDetalleMovimientoInventario.getContentPane().add(this.jScrollPanelOrderByTipoDetalleMovimientoInventario, this.gridBagConstraintsTipoDetalleMovimientoInventario); } else { this.jButtonAbrirOrderByTipoDetalleMovimientoInventario = new JButtonMe(); } } */ public void redimensionarTablaDatos(int iNumFilas) { this.redimensionarTablaDatos(iNumFilas,0); } public void redimensionarTablaDatos(int iNumFilas,int iTamanioFilaTabla) { Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); int iWidthTable=screenSize.width*2;//screenSize.width - (screenSize.width/8); int iWidthTableScroll=screenSize.width - (screenSize.width/8); int iWidthTableCalculado=0;//830 int iHeightTable=0;//screenSize.height/3; int iHeightTableTotal=0; //ANCHO COLUMNAS SIMPLES iWidthTableCalculado+=430; //ANCHO COLUMNAS OCULTAS if(Constantes.ISDEVELOPING) { iWidthTableCalculado+=300; } //ANCHO COLUMNAS RELACIONES iWidthTableCalculado+=100; //ESPACION PARA SELECT RELACIONES if(this.conMaximoRelaciones && this.tipodetallemovimientoinventarioSessionBean.getConGuardarRelaciones() ) { if(this.conFuncionalidadRelaciones) { iWidthTableCalculado+=Constantes.ISWING_ANCHO_COLUMNA; } } //SI CALCULADO ES MENOR QUE MAXIMO /* if(iWidthTableCalculado<=iWidthTable) { iWidthTable=iWidthTableCalculado; } */ //SI TABLA ES MENOR QUE SCROLL if(iWidthTableCalculado<=iWidthTableScroll) { iWidthTableScroll=iWidthTableCalculado; } //NO VALE SIEMPRE PONE TAMANIO COLUMNA 200 /* int iTotalWidth=0; int iWidthColumn=0; int iCountColumns=this.jTableDatosTipoDetalleMovimientoInventario.getColumnModel().getColumnCount(); if(iCountColumns>0) { for(int i = 0; i < this.jTableDatosTipoDetalleMovimientoInventario.getColumnModel().getColumnCount(); i++) { TableColumn column = this.jTableDatosTipoDetalleMovimientoInventario.getColumnModel().getColumn(i); iWidthColumn=column.getWidth(); iTotalWidth+=iWidthColumn; } //iWidthTableCalculado=iTotalWidth; } */ if(iTamanioFilaTabla<=0) { iTamanioFilaTabla=this.jTableDatosTipoDetalleMovimientoInventario.getRowHeight();//TipoDetalleMovimientoInventarioConstantesFunciones.ITAMANIOFILATABLA; } if(iNumFilas>0) { iHeightTable=(iNumFilas * iTamanioFilaTabla); } else { iHeightTable=iTamanioFilaTabla; } iHeightTableTotal=iHeightTable; if(!this.tipodetallemovimientoinventarioSessionBean.getEsGuardarRelacionado()) { if(iHeightTable > TipoDetalleMovimientoInventarioConstantesFunciones.TAMANIO_ALTO_MAXIMO_TABLADATOS) { //Constantes.ISWING_TAMANIOMAXIMO_TABLADATOS) { //SI SE SELECCIONA MAXIMO TABLA SE AMPLIA A ALTO MAXIMO DE SCROLL, PARA QUE SCROLL NO SEA TAN PEQUE?O if(!this.jCheckBoxConAltoMaximoTablaTipoDetalleMovimientoInventario.isSelected()) { iHeightTable=TipoDetalleMovimientoInventarioConstantesFunciones.TAMANIO_ALTO_MAXIMO_TABLADATOS; //Constantes.ISWING_TAMANIOMAXIMO_TABLADATOS; } else { iHeightTable=iHeightTableTotal + FuncionesSwing.getValorProporcion(iHeightTableTotal,30); } } else { if(iHeightTable < TipoDetalleMovimientoInventarioConstantesFunciones.TAMANIO_ALTO_MINIMO_TABLADATOS) {//Constantes.ISWING_TAMANIOMINIMO_TABLADATOS) { iHeightTable=TipoDetalleMovimientoInventarioConstantesFunciones.TAMANIO_ALTO_MINIMO_TABLADATOS; //Constantes.ISWING_TAMANIOMINIMO_TABLADATOS; } } } else { if(iHeightTable > TipoDetalleMovimientoInventarioConstantesFunciones.TAMANIO_ALTO_MAXIMO_TABLADATOSREL) { //Constantes.ISWING_TAMANIOMAXIMO_TABLADATOS) { //SI SE SELECCIONA MAXIMO TABLA SE AMPLIA A ALTO MAXIMO DE SCROLL, PARA QUE SCROLL NO SEA TAN PEQUE?O if(!this.jCheckBoxConAltoMaximoTablaTipoDetalleMovimientoInventario.isSelected()) { iHeightTable=TipoDetalleMovimientoInventarioConstantesFunciones.TAMANIO_ALTO_MAXIMO_TABLADATOSREL; //Constantes.ISWING_TAMANIOMAXIMO_TABLADATOS; } else { iHeightTable=iHeightTableTotal + FuncionesSwing.getValorProporcion(iHeightTableTotal,30); } } else { if(iHeightTable < TipoDetalleMovimientoInventarioConstantesFunciones.TAMANIO_ALTO_MINIMO_TABLADATOSREL) {//Constantes.ISWING_TAMANIOMINIMO_TABLADATOS) { iHeightTable=TipoDetalleMovimientoInventarioConstantesFunciones.TAMANIO_ALTO_MINIMO_TABLADATOSREL; //Constantes.ISWING_TAMANIOMINIMO_TABLADATOS; } } } //OJO:SE DESHABILITA CALCULADO //NO SE UTILIZA CALCULADO SI POR DEFINICION if(iWidthTableDefinicion>0) { iWidthTableCalculado=iWidthTableDefinicion; } this.jTableDatosTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(iWidthTableCalculado,iHeightTableTotal)); this.jTableDatosTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(iWidthTableCalculado,iHeightTableTotal)); this.jTableDatosTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(iWidthTableCalculado,iHeightTableTotal));//iWidthTable this.jScrollPanelDatosTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(iWidthTableScroll,iHeightTable)); this.jScrollPanelDatosTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(iWidthTableScroll,iHeightTable)); this.jScrollPanelDatosTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(iWidthTableScroll,iHeightTable)); //ORDER BY //OrderBy int iHeightTableOrderBy=0; int iNumFilasOrderBy=this.arrOrderBy.size(); int iTamanioFilaTablaOrderBy=0; if(this.jInternalFrameOrderByTipoDetalleMovimientoInventario!=null && this.jInternalFrameOrderByTipoDetalleMovimientoInventario.getjTableDatosOrderBy()!=null) { //if(!this.tipodetallemovimientoinventarioSessionBean.getEsGuardarRelacionado()) { iTamanioFilaTablaOrderBy=this.jInternalFrameOrderByTipoDetalleMovimientoInventario.getjTableDatosOrderBy().getRowHeight(); if(iNumFilasOrderBy>0) { iHeightTableOrderBy=iNumFilasOrderBy * iTamanioFilaTablaOrderBy; } else { iHeightTableOrderBy=iTamanioFilaTablaOrderBy; } this.jInternalFrameOrderByTipoDetalleMovimientoInventario.getjTableDatosOrderBy().setMinimumSize(new Dimension(Constantes2.ISWING_TAMANIO_ANCHO_TABLADATOS_ORDERBY,iHeightTableOrderBy));//iWidthTableCalculado/4 this.jInternalFrameOrderByTipoDetalleMovimientoInventario.getjTableDatosOrderBy().setMaximumSize(new Dimension(Constantes2.ISWING_TAMANIO_ANCHO_TABLADATOS_ORDERBY,iHeightTableOrderBy)); this.jInternalFrameOrderByTipoDetalleMovimientoInventario.getjTableDatosOrderBy().setPreferredSize(new Dimension(Constantes2.ISWING_TAMANIO_ANCHO_TABLADATOS_ORDERBY,iHeightTableOrderBy));//iWidthTable this.jInternalFrameOrderByTipoDetalleMovimientoInventario.getjScrollPanelDatosOrderBy().setMinimumSize(new Dimension(Constantes2.ISWING_TAMANIO_ANCHO_TABLADATOS_ORDERBY+30,Constantes2.ISWING_TAMANIO_ALTO_TABLADATOS_ORDERBY));//iHeightTableOrderBy,iWidthTableScroll this.jInternalFrameOrderByTipoDetalleMovimientoInventario.getjScrollPanelDatosOrderBy().setMaximumSize(new Dimension(Constantes2.ISWING_TAMANIO_ANCHO_TABLADATOS_ORDERBY+30,Constantes2.ISWING_TAMANIO_ALTO_TABLADATOS_ORDERBY)); this.jInternalFrameOrderByTipoDetalleMovimientoInventario.getjScrollPanelDatosOrderBy().setPreferredSize(new Dimension(Constantes2.ISWING_TAMANIO_ANCHO_TABLADATOS_ORDERBY+30,Constantes2.ISWING_TAMANIO_ALTO_TABLADATOS_ORDERBY)); } //ORDER BY //this.jScrollPanelDatosTipoDetalleMovimientoInventario.setMinimumSize(new Dimension(iWidthTableScroll,iHeightTable)); //this.jScrollPanelDatosTipoDetalleMovimientoInventario.setMaximumSize(new Dimension(iWidthTableScroll,iHeightTable)); //this.jScrollPanelDatosTipoDetalleMovimientoInventario.setPreferredSize(new Dimension(iWidthTableScroll,iHeightTable)); //VERSION 0 /* //SI CALCULADO ES MENOR QUE MAXIMO if(iWidthTableCalculado<=iWidthTable) { iWidthTable=iWidthTableCalculado; } //SI TABLA ES MENOR QUE SCROLL if(iWidthTable<=iWidthTableScroll) { iWidthTableScroll=iWidthTable; } */ } public void redimensionarTablaDatosConTamanio(int iTamanioFilaTabla) throws Exception { int iSizeTabla=0; //ARCHITECTURE if(Constantes.ISUSAEJBLOGICLAYER) { iSizeTabla=tipodetallemovimientoinventarioLogic.getTipoDetalleMovimientoInventarios().size(); } else if(Constantes.ISUSAEJBREMOTE || Constantes.ISUSAEJBHOME) { iSizeTabla=tipodetallemovimientoinventarios.size(); } //ARCHITECTURE this.redimensionarTablaDatos(iSizeTabla,iTamanioFilaTabla); } //PARA REPORTES public static List<TipoDetalleMovimientoInventario> TraerTipoDetalleMovimientoInventarioBeans(List<TipoDetalleMovimientoInventario> tipodetallemovimientoinventarios,ArrayList<Classe> classes)throws Exception { try { for(TipoDetalleMovimientoInventario tipodetallemovimientoinventario:tipodetallemovimientoinventarios) { if(!(TipoDetalleMovimientoInventarioConstantesFunciones.S_TIPOREPORTE_EXTRA.equals(Constantes2.S_REPORTE_EXTRA_GROUP_GENERICO) || TipoDetalleMovimientoInventarioConstantesFunciones.S_TIPOREPORTE_EXTRA.equals(Constantes2.S_REPORTE_EXTRA_GROUP_TOTALES_GENERICO)) ) { tipodetallemovimientoinventario.setsDetalleGeneralEntityReporte(TipoDetalleMovimientoInventarioConstantesFunciones.getTipoDetalleMovimientoInventarioDescripcion(tipodetallemovimientoinventario)); if(tipodetallemovimientoinventario.getDetalleMovimientoInventarios()!=null && Funciones.existeClass(classes,DetalleMovimientoInventario.class)) { try{tipodetallemovimientoinventario.setdetallemovimientoinventariosDescripcionReporte(new JRBeanCollectionDataSource(DetalleMovimientoInventarioJInternalFrame.TraerDetalleMovimientoInventarioBeans(tipodetallemovimientoinventario.getDetalleMovimientoInventarios(),classes)));}catch(Exception e){e.printStackTrace();} } } else { //tipodetallemovimientoinventario.setsDetalleGeneralEntityReporte(tipodetallemovimientoinventario.getsDetalleGeneralEntityReporte()); } //tipodetallemovimientoinventariobeans.add(tipodetallemovimientoinventariobean); } } catch(Exception ex) { throw ex; } return tipodetallemovimientoinventarios; } //PARA REPORTES FIN }
[ "byrondanilo10@hotmail.com" ]
byrondanilo10@hotmail.com
1ad6cecc0757bb7d7f9822c74d06635905123525
98d37ce9835324201d11edfb14901b07e6963a57
/org.xtext.example.mydsl/src-gen/org/xtext/example/mydsl/myDsl/additive_expression.java
cea2560725c0fa6d07958750d5380c6ac36056a0
[]
no_license
diegodpgs/projetoCOMP
18f42d25c7336dea3dc60856878cf28445409f3b
e18725eb72b0a667ec270b22dd7534fea441166d
refs/heads/master
2020-12-31T07:19:59.782705
2016-05-14T17:38:39
2016-05-14T17:38:39
58,821,294
0
0
null
null
null
null
UTF-8
Java
false
false
4,236
java
/** * generated by Xtext 2.9.2 */ package org.xtext.example.mydsl.myDsl; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>additive expression</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * <ul> * <li>{@link org.xtext.example.mydsl.myDsl.additive_expression#getShift_expressionR <em>Shift expression R</em>}</li> * <li>{@link org.xtext.example.mydsl.myDsl.additive_expression#getMultiplicative_expression <em>Multiplicative expression</em>}</li> * <li>{@link org.xtext.example.mydsl.myDsl.additive_expression#getAdditive_expressionR <em>Additive expression R</em>}</li> * </ul> * </p> * * @see org.xtext.example.mydsl.myDsl.MyDslPackage#getadditive_expression() * @model * @generated */ public interface additive_expression extends shift_expression { /** * Returns the value of the '<em><b>Shift expression R</b></em>' containment reference. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Shift expression R</em>' containment reference isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Shift expression R</em>' containment reference. * @see #setShift_expressionR(shift_expressionR) * @see org.xtext.example.mydsl.myDsl.MyDslPackage#getadditive_expression_Shift_expressionR() * @model containment="true" * @generated */ shift_expressionR getShift_expressionR(); /** * Sets the value of the '{@link org.xtext.example.mydsl.myDsl.additive_expression#getShift_expressionR <em>Shift expression R</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Shift expression R</em>' containment reference. * @see #getShift_expressionR() * @generated */ void setShift_expressionR(shift_expressionR value); /** * Returns the value of the '<em><b>Multiplicative expression</b></em>' containment reference. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Multiplicative expression</em>' containment reference isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Multiplicative expression</em>' containment reference. * @see #setMultiplicative_expression(multiplicative_expression) * @see org.xtext.example.mydsl.myDsl.MyDslPackage#getadditive_expression_Multiplicative_expression() * @model containment="true" * @generated */ multiplicative_expression getMultiplicative_expression(); /** * Sets the value of the '{@link org.xtext.example.mydsl.myDsl.additive_expression#getMultiplicative_expression <em>Multiplicative expression</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Multiplicative expression</em>' containment reference. * @see #getMultiplicative_expression() * @generated */ void setMultiplicative_expression(multiplicative_expression value); /** * Returns the value of the '<em><b>Additive expression R</b></em>' containment reference. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Additive expression R</em>' containment reference isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Additive expression R</em>' containment reference. * @see #setAdditive_expressionR(additive_expressionR) * @see org.xtext.example.mydsl.myDsl.MyDslPackage#getadditive_expression_Additive_expressionR() * @model containment="true" * @generated */ additive_expressionR getAdditive_expressionR(); /** * Sets the value of the '{@link org.xtext.example.mydsl.myDsl.additive_expression#getAdditive_expressionR <em>Additive expression R</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Additive expression R</em>' containment reference. * @see #getAdditive_expressionR() * @generated */ void setAdditive_expressionR(additive_expressionR value); } // additive_expression
[ "diegopedro@Diegos-MacBook-Air.local" ]
diegopedro@Diegos-MacBook-Air.local
147a3c791ce01878e50f8de751397724e6ad94b1
daebfc69b00b3f3269c0203775851cc9db07111e
/src/com/broadsoft/sipp/parser/SippMonitorParser.java
c1d6d30a20fec214da778ea4392254103ed85466
[]
no_license
pvanderhoeven/SippMonitor
fbf23cc0377db511e93102816d5e9b219d9c3fd5
e0c69672f6147e33701c1a56f55190556ec68d3d
refs/heads/master
2021-01-10T04:44:00.869558
2016-03-29T20:33:38
2016-03-29T20:33:38
55,008,691
0
0
null
null
null
null
UTF-8
Java
false
false
21,867
java
package com.broadsoft.sipp.parser; import org.antlr.v4.runtime.atn.*; import org.antlr.v4.runtime.dfa.DFA; import org.antlr.v4.runtime.*; import org.antlr.v4.runtime.misc.*; import org.antlr.v4.runtime.tree.*; import java.util.List; import java.util.Iterator; import java.util.ArrayList; @SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) public class SippMonitorParser extends Parser { static { RuntimeMetaData.checkVersion("4.5", RuntimeMetaData.VERSION); } protected static final DFA[] _decisionToDFA; protected static final PredictionContextCache _sharedContextCache = new PredictionContextCache(); public static final int DIRECTION=1, BYTES=2, DIRECTION_LINE=3, YEAR=4, MONTH=5, DAY=6, HOUR=7, MINUTE=8, SECOND=9, MILLIS=10, NANOS=11, DATE=12, TIME=13, TIME_STAMP=14, RESPONSE_LINE=15, DIGIT=16, RESPONSE_CODE=17, METHOD=18, REQUEST_LINE=19, NEWLINE=20, SIP_VERSION=21, NOT_SPACE=22, SIP_URL=23, SIP_HEADER=24, HEADER=25, SDP_LINE=26, WS=27; public static final int RULE_sippLog = 0, RULE_sippItem = 1, RULE_directionLine = 2, RULE_timeStamp = 3, RULE_sipMessage = 4, RULE_sipResponse = 5, RULE_responseLine = 6, RULE_sipRequest = 7, RULE_requestLine = 8, RULE_sipHeader = 9, RULE_sdp = 10, RULE_sdpLine = 11; public static final String[] ruleNames = { "sippLog", "sippItem", "directionLine", "timeStamp", "sipMessage", "sipResponse", "responseLine", "sipRequest", "requestLine", "sipHeader", "sdp", "sdpLine" }; private static final String[] _LITERAL_NAMES = { null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, "'SIP/2.0'" }; private static final String[] _SYMBOLIC_NAMES = { null, "DIRECTION", "BYTES", "DIRECTION_LINE", "YEAR", "MONTH", "DAY", "HOUR", "MINUTE", "SECOND", "MILLIS", "NANOS", "DATE", "TIME", "TIME_STAMP", "RESPONSE_LINE", "DIGIT", "RESPONSE_CODE", "METHOD", "REQUEST_LINE", "NEWLINE", "SIP_VERSION", "NOT_SPACE", "SIP_URL", "SIP_HEADER", "HEADER", "SDP_LINE", "WS" }; public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); /** * @deprecated Use {@link #VOCABULARY} instead. */ @Deprecated public static final String[] tokenNames; static { tokenNames = new String[_SYMBOLIC_NAMES.length]; for (int i = 0; i < tokenNames.length; i++) { tokenNames[i] = VOCABULARY.getLiteralName(i); if (tokenNames[i] == null) { tokenNames[i] = VOCABULARY.getSymbolicName(i); } if (tokenNames[i] == null) { tokenNames[i] = "<INVALID>"; } } } @Override @Deprecated public String[] getTokenNames() { return tokenNames; } @Override @NotNull public Vocabulary getVocabulary() { return VOCABULARY; } @Override public String getGrammarFileName() { return "SippMonitor.g4"; } @Override public String[] getRuleNames() { return ruleNames; } @Override public String getSerializedATN() { return _serializedATN; } @Override public ATN getATN() { return _ATN; } public SippMonitorParser(TokenStream input) { super(input); _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); } public static class SippMonitorContext extends ParserRuleContext { public List<SippItemContext> sippItem() { return getRuleContexts(SippItemContext.class); } public SippItemContext sippItem(int i) { return getRuleContext(SippItemContext.class,i); } public SippMonitorContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_sippLog; } @Override public void enterRule(ParseTreeListener listener) { if ( listener instanceof SippMonitorListener ) ((SippMonitorListener)listener).enterSippMonitor(this); } @Override public void exitRule(ParseTreeListener listener) { if ( listener instanceof SippMonitorListener ) ((SippMonitorListener)listener).exitSippMonitor(this); } } public final SippMonitorContext sippLog() throws RecognitionException { SippMonitorContext _localctx = new SippMonitorContext(_ctx, getState()); enterRule(_localctx, 0, RULE_sippLog); int _la; try { enterOuterAlt(_localctx, 1); { setState(25); _errHandler.sync(this); _la = _input.LA(1); do { { { setState(24); sippItem(); } } setState(27); _errHandler.sync(this); _la = _input.LA(1); } while ( (((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << DIRECTION_LINE) | (1L << TIME_STAMP) | (1L << RESPONSE_LINE) | (1L << REQUEST_LINE))) != 0) ); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class SippItemContext extends ParserRuleContext { public TimeStampContext timeStamp() { return getRuleContext(TimeStampContext.class,0); } public DirectionLineContext directionLine() { return getRuleContext(DirectionLineContext.class,0); } public SipMessageContext sipMessage() { return getRuleContext(SipMessageContext.class,0); } public SippItemContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_sippItem; } @Override public void enterRule(ParseTreeListener listener) { if ( listener instanceof SippMonitorListener ) ((SippMonitorListener)listener).enterSippItem(this); } @Override public void exitRule(ParseTreeListener listener) { if ( listener instanceof SippMonitorListener ) ((SippMonitorListener)listener).exitSippItem(this); } } public final SippItemContext sippItem() throws RecognitionException { SippItemContext _localctx = new SippItemContext(_ctx, getState()); enterRule(_localctx, 2, RULE_sippItem); try { setState(32); switch (_input.LA(1)) { case TIME_STAMP: enterOuterAlt(_localctx, 1); { setState(29); timeStamp(); } break; case DIRECTION_LINE: enterOuterAlt(_localctx, 2); { setState(30); directionLine(); } break; case RESPONSE_LINE: case REQUEST_LINE: enterOuterAlt(_localctx, 3); { setState(31); sipMessage(); } break; default: throw new NoViableAltException(this); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class DirectionLineContext extends ParserRuleContext { public TerminalNode DIRECTION_LINE() { return getToken(SippMonitorParser.DIRECTION_LINE, 0); } public DirectionLineContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_directionLine; } @Override public void enterRule(ParseTreeListener listener) { if ( listener instanceof SippMonitorListener ) ((SippMonitorListener)listener).enterDirectionLine(this); } @Override public void exitRule(ParseTreeListener listener) { if ( listener instanceof SippMonitorListener ) ((SippMonitorListener)listener).exitDirectionLine(this); } } public final DirectionLineContext directionLine() throws RecognitionException { DirectionLineContext _localctx = new DirectionLineContext(_ctx, getState()); enterRule(_localctx, 4, RULE_directionLine); try { enterOuterAlt(_localctx, 1); { setState(34); match(DIRECTION_LINE); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class TimeStampContext extends ParserRuleContext { public TerminalNode TIME_STAMP() { return getToken(SippMonitorParser.TIME_STAMP, 0); } public TimeStampContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_timeStamp; } @Override public void enterRule(ParseTreeListener listener) { if ( listener instanceof SippMonitorListener ) ((SippMonitorListener)listener).enterTimeStamp(this); } @Override public void exitRule(ParseTreeListener listener) { if ( listener instanceof SippMonitorListener ) ((SippMonitorListener)listener).exitTimeStamp(this); } } public final TimeStampContext timeStamp() throws RecognitionException { TimeStampContext _localctx = new TimeStampContext(_ctx, getState()); enterRule(_localctx, 6, RULE_timeStamp); try { enterOuterAlt(_localctx, 1); { setState(36); match(TIME_STAMP); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class SipMessageContext extends ParserRuleContext { public SipResponseContext sipResponse() { return getRuleContext(SipResponseContext.class,0); } public SipRequestContext sipRequest() { return getRuleContext(SipRequestContext.class,0); } public SipMessageContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_sipMessage; } @Override public void enterRule(ParseTreeListener listener) { if ( listener instanceof SippMonitorListener ) ((SippMonitorListener)listener).enterSipMessage(this); } @Override public void exitRule(ParseTreeListener listener) { if ( listener instanceof SippMonitorListener ) ((SippMonitorListener)listener).exitSipMessage(this); } } public final SipMessageContext sipMessage() throws RecognitionException { SipMessageContext _localctx = new SipMessageContext(_ctx, getState()); enterRule(_localctx, 8, RULE_sipMessage); try { setState(40); switch (_input.LA(1)) { case RESPONSE_LINE: enterOuterAlt(_localctx, 1); { setState(38); sipResponse(); } break; case REQUEST_LINE: enterOuterAlt(_localctx, 2); { setState(39); sipRequest(); } break; default: throw new NoViableAltException(this); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class SipResponseContext extends ParserRuleContext { public ResponseLineContext responseLine() { return getRuleContext(ResponseLineContext.class,0); } public List<SipHeaderContext> sipHeader() { return getRuleContexts(SipHeaderContext.class); } public SipHeaderContext sipHeader(int i) { return getRuleContext(SipHeaderContext.class,i); } public SdpContext sdp() { return getRuleContext(SdpContext.class,0); } public SipResponseContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_sipResponse; } @Override public void enterRule(ParseTreeListener listener) { if ( listener instanceof SippMonitorListener ) ((SippMonitorListener)listener).enterSipResponse(this); } @Override public void exitRule(ParseTreeListener listener) { if ( listener instanceof SippMonitorListener ) ((SippMonitorListener)listener).exitSipResponse(this); } } public final SipResponseContext sipResponse() throws RecognitionException { SipResponseContext _localctx = new SipResponseContext(_ctx, getState()); enterRule(_localctx, 10, RULE_sipResponse); int _la; try { enterOuterAlt(_localctx, 1); { setState(42); responseLine(); setState(44); _errHandler.sync(this); _la = _input.LA(1); do { { { setState(43); sipHeader(); } } setState(46); _errHandler.sync(this); _la = _input.LA(1); } while ( _la==SIP_HEADER ); setState(49); _la = _input.LA(1); if (_la==SDP_LINE) { { setState(48); sdp(); } } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class ResponseLineContext extends ParserRuleContext { public TerminalNode RESPONSE_LINE() { return getToken(SippMonitorParser.RESPONSE_LINE, 0); } public ResponseLineContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_responseLine; } @Override public void enterRule(ParseTreeListener listener) { if ( listener instanceof SippMonitorListener ) ((SippMonitorListener)listener).enterResponseLine(this); } @Override public void exitRule(ParseTreeListener listener) { if ( listener instanceof SippMonitorListener ) ((SippMonitorListener)listener).exitResponseLine(this); } } public final ResponseLineContext responseLine() throws RecognitionException { ResponseLineContext _localctx = new ResponseLineContext(_ctx, getState()); enterRule(_localctx, 12, RULE_responseLine); try { enterOuterAlt(_localctx, 1); { setState(51); match(RESPONSE_LINE); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class SipRequestContext extends ParserRuleContext { public RequestLineContext requestLine() { return getRuleContext(RequestLineContext.class,0); } public List<SipHeaderContext> sipHeader() { return getRuleContexts(SipHeaderContext.class); } public SipHeaderContext sipHeader(int i) { return getRuleContext(SipHeaderContext.class,i); } public SdpContext sdp() { return getRuleContext(SdpContext.class,0); } public SipRequestContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_sipRequest; } @Override public void enterRule(ParseTreeListener listener) { if ( listener instanceof SippMonitorListener ) ((SippMonitorListener)listener).enterSipRequest(this); } @Override public void exitRule(ParseTreeListener listener) { if ( listener instanceof SippMonitorListener ) ((SippMonitorListener)listener).exitSipRequest(this); } } public final SipRequestContext sipRequest() throws RecognitionException { SipRequestContext _localctx = new SipRequestContext(_ctx, getState()); enterRule(_localctx, 14, RULE_sipRequest); int _la; try { enterOuterAlt(_localctx, 1); { setState(53); requestLine(); setState(55); _errHandler.sync(this); _la = _input.LA(1); do { { { setState(54); sipHeader(); } } setState(57); _errHandler.sync(this); _la = _input.LA(1); } while ( _la==SIP_HEADER ); setState(60); _la = _input.LA(1); if (_la==SDP_LINE) { { setState(59); sdp(); } } } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class RequestLineContext extends ParserRuleContext { public TerminalNode REQUEST_LINE() { return getToken(SippMonitorParser.REQUEST_LINE, 0); } public RequestLineContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_requestLine; } @Override public void enterRule(ParseTreeListener listener) { if ( listener instanceof SippMonitorListener ) ((SippMonitorListener)listener).enterRequestLine(this); } @Override public void exitRule(ParseTreeListener listener) { if ( listener instanceof SippMonitorListener ) ((SippMonitorListener)listener).exitRequestLine(this); } } public final RequestLineContext requestLine() throws RecognitionException { RequestLineContext _localctx = new RequestLineContext(_ctx, getState()); enterRule(_localctx, 16, RULE_requestLine); try { enterOuterAlt(_localctx, 1); { setState(62); match(REQUEST_LINE); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class SipHeaderContext extends ParserRuleContext { public TerminalNode SIP_HEADER() { return getToken(SippMonitorParser.SIP_HEADER, 0); } public SipHeaderContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_sipHeader; } @Override public void enterRule(ParseTreeListener listener) { if ( listener instanceof SippMonitorListener ) ((SippMonitorListener)listener).enterSipHeader(this); } @Override public void exitRule(ParseTreeListener listener) { if ( listener instanceof SippMonitorListener ) ((SippMonitorListener)listener).exitSipHeader(this); } } public final SipHeaderContext sipHeader() throws RecognitionException { SipHeaderContext _localctx = new SipHeaderContext(_ctx, getState()); enterRule(_localctx, 18, RULE_sipHeader); try { enterOuterAlt(_localctx, 1); { setState(64); match(SIP_HEADER); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class SdpContext extends ParserRuleContext { public List<SdpLineContext> sdpLine() { return getRuleContexts(SdpLineContext.class); } public SdpLineContext sdpLine(int i) { return getRuleContext(SdpLineContext.class,i); } public SdpContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_sdp; } @Override public void enterRule(ParseTreeListener listener) { if ( listener instanceof SippMonitorListener ) ((SippMonitorListener)listener).enterSdp(this); } @Override public void exitRule(ParseTreeListener listener) { if ( listener instanceof SippMonitorListener ) ((SippMonitorListener)listener).exitSdp(this); } } public final SdpContext sdp() throws RecognitionException { SdpContext _localctx = new SdpContext(_ctx, getState()); enterRule(_localctx, 20, RULE_sdp); int _la; try { enterOuterAlt(_localctx, 1); { setState(67); _errHandler.sync(this); _la = _input.LA(1); do { { { setState(66); sdpLine(); } } setState(69); _errHandler.sync(this); _la = _input.LA(1); } while ( _la==SDP_LINE ); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static class SdpLineContext extends ParserRuleContext { public TerminalNode SDP_LINE() { return getToken(SippMonitorParser.SDP_LINE, 0); } public SdpLineContext(ParserRuleContext parent, int invokingState) { super(parent, invokingState); } @Override public int getRuleIndex() { return RULE_sdpLine; } @Override public void enterRule(ParseTreeListener listener) { if ( listener instanceof SippMonitorListener ) ((SippMonitorListener)listener).enterSdpLine(this); } @Override public void exitRule(ParseTreeListener listener) { if ( listener instanceof SippMonitorListener ) ((SippMonitorListener)listener).exitSdpLine(this); } } public final SdpLineContext sdpLine() throws RecognitionException { SdpLineContext _localctx = new SdpLineContext(_ctx, getState()); enterRule(_localctx, 22, RULE_sdpLine); try { enterOuterAlt(_localctx, 1); { setState(71); match(SDP_LINE); } } catch (RecognitionException re) { _localctx.exception = re; _errHandler.reportError(this, re); _errHandler.recover(this, re); } finally { exitRule(); } return _localctx; } public static final String _serializedATN = "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3\35L\4\2\t\2\4\3\t"+ "\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t\13\4"+ "\f\t\f\4\r\t\r\3\2\6\2\34\n\2\r\2\16\2\35\3\3\3\3\3\3\5\3#\n\3\3\4\3\4"+ "\3\5\3\5\3\6\3\6\5\6+\n\6\3\7\3\7\6\7/\n\7\r\7\16\7\60\3\7\5\7\64\n\7"+ "\3\b\3\b\3\t\3\t\6\t:\n\t\r\t\16\t;\3\t\5\t?\n\t\3\n\3\n\3\13\3\13\3\f"+ "\6\fF\n\f\r\f\16\fG\3\r\3\r\3\r\2\2\16\2\4\6\b\n\f\16\20\22\24\26\30\2"+ "\2H\2\33\3\2\2\2\4\"\3\2\2\2\6$\3\2\2\2\b&\3\2\2\2\n*\3\2\2\2\f,\3\2\2"+ "\2\16\65\3\2\2\2\20\67\3\2\2\2\22@\3\2\2\2\24B\3\2\2\2\26E\3\2\2\2\30"+ "I\3\2\2\2\32\34\5\4\3\2\33\32\3\2\2\2\34\35\3\2\2\2\35\33\3\2\2\2\35\36"+ "\3\2\2\2\36\3\3\2\2\2\37#\5\b\5\2 #\5\6\4\2!#\5\n\6\2\"\37\3\2\2\2\" "+ "\3\2\2\2\"!\3\2\2\2#\5\3\2\2\2$%\7\5\2\2%\7\3\2\2\2&\'\7\20\2\2\'\t\3"+ "\2\2\2(+\5\f\7\2)+\5\20\t\2*(\3\2\2\2*)\3\2\2\2+\13\3\2\2\2,.\5\16\b\2"+ "-/\5\24\13\2.-\3\2\2\2/\60\3\2\2\2\60.\3\2\2\2\60\61\3\2\2\2\61\63\3\2"+ "\2\2\62\64\5\26\f\2\63\62\3\2\2\2\63\64\3\2\2\2\64\r\3\2\2\2\65\66\7\21"+ "\2\2\66\17\3\2\2\2\679\5\22\n\28:\5\24\13\298\3\2\2\2:;\3\2\2\2;9\3\2"+ "\2\2;<\3\2\2\2<>\3\2\2\2=?\5\26\f\2>=\3\2\2\2>?\3\2\2\2?\21\3\2\2\2@A"+ "\7\25\2\2A\23\3\2\2\2BC\7\32\2\2C\25\3\2\2\2DF\5\30\r\2ED\3\2\2\2FG\3"+ "\2\2\2GE\3\2\2\2GH\3\2\2\2H\27\3\2\2\2IJ\7\34\2\2J\31\3\2\2\2\n\35\"*"+ "\60\63;>G"; public static final ATN _ATN = new ATNDeserializer().deserialize(_serializedATN.toCharArray()); static { _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); } } }
[ "peter@ioma.nl" ]
peter@ioma.nl
90f44b2f1a377a85634e5a57e971e98be1db61f7
86fa67369e29c0086601fad2d5502322f539a321
/runtime/doovos/sites/sousse/sys/tmp/jjit/src/jjit/local/jnt/scimark2/Random/nextDoubles__D_V_9D9925F2/nextDoubles_023.java
a78ef774328b65902b85080e37a5ffdaa0f3c31f
[]
no_license
thevpc/doovos
05a4ce98825bf3dbbdc7972c43cd15fc18afdabb
1ae822549a3a546381dbf3b722814e0be1002b11
refs/heads/master
2021-01-12T14:56:52.283641
2020-08-22T12:37:40
2020-08-22T12:37:40
72,081,680
1
0
null
null
null
null
UTF-8
Java
false
false
4,076
java
package jjit.local.jnt.scimark2.Random.nextDoubles__D_V_9D9925F2; import org.doovos.kernel.api.jvm.interpreter.*; import org.doovos.kernel.api.jvm.interpreter.KFrame; import org.doovos.kernel.api.jvm.reflect.KClass; import org.doovos.kernel.api.jvm.reflect.KClassRepository; import org.doovos.kernel.api.jvm.reflect.KField; import org.doovos.kernel.api.memory.*; import org.doovos.kernel.api.memory.KMemoryManager; import org.doovos.kernel.api.memory.KRegister; import org.doovos.kernel.api.process.KLocalThread; import org.doovos.kernel.api.process.KProcess; import org.doovos.kernel.vanilla.jvm.interpreter.jjit.instr.*; import org.doovos.kernel.vanilla.jvm.interpreter.jjit.instr.JJITInstruction; /** * jnt.scimark2.Random * nextDoubles([D)V * [count=9] [135] ALOAD(1) [136] ILOAD(4) [137] ALOAD(0) [138] GETFIELD(jnt.scimark2.Random,dm1,D) [139] ILOAD(5) [140] I2D [141] DMUL [142] DASTORE [143] IINC(4,1) */ public final class nextDoubles_023 extends JJITAbstractInstruction implements Cloneable{ private KField c_dm1 = null; private KClassRepository c_repo; private KClass c_CRandom = null; private KMemoryManager c_memman; private JJITInstruction c_next; public JJITInstruction run(KFrame frame) throws Exception { // **REMOVED Unused Var** KRegister s0; // **REMOVED Unused Var** KRegister s1; // **REMOVED Unused Var** KRegister s2; // **REMOVED Unused Var** KRegister s3; // **REMOVED Unused Var** double m_d; // **REMOVED Unused Var** int index = 0; // **REMOVED Unused Var** double m_d2; // this_ref 0 ; r=1/w=0 : NotCached // local_1 1 ; r=1/w=0 : NotCached // local_4 4 ; r=2/w=1 : Cached int local_4 = frame.getLocal(4).intValue(); // local_5 5 ; r=1/w=0 : NotCached // *********[135] ALOAD(1) // **REMOVED Substitution** s0 = frame.getLocal(1); // *********[136] ILOAD(4) // **REMOVED Substitution** s1 = new KInteger(local_4); // *********[137] ALOAD(0) // **REMOVED Substitution** s2 = frame.getLocal(0); // *********[138] GETFIELD(jnt.scimark2.Random,dm1,D) // **REMOVED Substitution** s2 = new KDouble(c_dm1.getInstanceDouble(((KReference)frame.getLocal(0)))); // *********[139] ILOAD(5) // **REMOVED Substitution** s3 = frame.getLocal(5); // *********[140] I2D // **REMOVED Substitution** s3 = new KDouble(frame.getLocal(5).intValue()); // *********[141] DMUL // **REMOVED Substitution** m_d = frame.getLocal(5).doubleValue(); // **REMOVED Substitution** s2 = new KDouble((c_dm1.getInstanceDouble(((KReference)frame.getLocal(0))) * frame.getLocal(5).doubleValue())); // *********[142] DASTORE // **REMOVED Substitution** m_d2 = (c_dm1.getInstanceDouble(((KReference)frame.getLocal(0))) * frame.getLocal(5).doubleValue()); // **REMOVED Substitution** index = local_4; c_memman.setDoubleArray(((KReference)frame.getLocal(1)),local_4,(c_dm1.getInstanceDouble(((KReference)frame.getLocal(0))) * frame.getLocal(5).doubleValue())); // *********[143] IINC(4,1) // **REMOVED Substitution** local_4 = (local_4 + 1); frame.setLocal(4,new KInteger((local_4 + 1))); return c_next; } public void init(int index,JJITInstruction[] instructions,KRegister[] constants,KProcess process) throws Exception { // *********[135] ALOAD(1) // *********[136] ILOAD(4) // *********[137] ALOAD(0) // *********[138] GETFIELD(jnt.scimark2.Random,dm1,D) c_repo = process.getClassRepository(); c_CRandom = c_repo.getClassByName("jnt.scimark2.Random"); c_dm1 = c_CRandom.getField("dm1",true); // *********[139] ILOAD(5) // *********[140] I2D // *********[141] DMUL // *********[142] DASTORE c_memman = process.getMemoryManager(); // *********[143] IINC(4,1) c_next = instructions[(index + 1)]; } }
[ "taha.bensalah@gmail.com" ]
taha.bensalah@gmail.com
a297a5dad642db1cf9774146501cb127afe62a7d
a7267160d848c32bd5134d1d4feabea41c297798
/workspace/Idea_workspace/myframe/src/test/gg.java
4b6002e632dd0399a7f6979ab5bb10490efa6d8d
[]
no_license
MellowCo/java_demo
4512c7c8890ecfccee5046db3f51190edc8d34be
71940fabec00b8e8b6589ffa2ad818edda38ba6b
refs/heads/main
2022-12-31T15:22:18.351896
2020-10-20T07:31:59
2020-10-20T07:31:59
303,027,728
0
0
null
null
null
null
UTF-8
Java
false
false
3,525
java
package test; import java.awt.BorderLayout; import java.awt.EventQueue; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.border.EmptyBorder; import javax.swing.GroupLayout; import javax.swing.GroupLayout.Alignment; import javax.swing.JLabel; import javax.swing.LayoutStyle.ComponentPlacement; import javax.swing.JTextField; public class gg extends JFrame { private JPanel contentPane; private JTextField textField; private JTextField textField_1; /** * Launch the application. */ public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { try { gg frame = new gg(); frame.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } }); } /** * Create the frame. */ public gg() { setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setBounds(100, 100, 450, 300); contentPane = new JPanel(); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); setContentPane(contentPane); JLabel lblNewLabel = new JLabel("New label"); JLabel lblNewLabel_1 = new JLabel("New label"); textField = new JTextField(); textField.setColumns(10); textField_1 = new JTextField(); textField_1.setColumns(10); GroupLayout gl_contentPane = new GroupLayout(contentPane); gl_contentPane.setHorizontalGroup( gl_contentPane.createParallelGroup(Alignment.LEADING) .addGroup(gl_contentPane.createSequentialGroup() .addGap(28) .addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING) .addGroup(gl_contentPane.createSequentialGroup() .addComponent(lblNewLabel_1) .addPreferredGap(ComponentPlacement.UNRELATED) .addComponent(textField_1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addGroup(gl_contentPane.createSequentialGroup() .addComponent(lblNewLabel) .addPreferredGap(ComponentPlacement.UNRELATED) .addComponent(textField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))) .addContainerGap(266, Short.MAX_VALUE)) ); gl_contentPane.setVerticalGroup( gl_contentPane.createParallelGroup(Alignment.LEADING) .addGroup(gl_contentPane.createSequentialGroup() .addGap(30) .addGroup(gl_contentPane.createParallelGroup(Alignment.BASELINE) .addComponent(lblNewLabel) .addComponent(textField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(ComponentPlacement.RELATED) .addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING) .addComponent(lblNewLabel_1) .addComponent(textField_1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)) .addContainerGap(173, Short.MAX_VALUE)) ); contentPane.setLayout(gl_contentPane); } }
[ "799478052@qq.com" ]
799478052@qq.com
75423ac43f3a5fe4b2118430d05e49160487de74
bb87d199bdea6b0692fe63c0ca7a52b1461e27c3
/src/com/vengood/model/WeiXinInfo.java
c8dda496a1e2219058da8c32f1d2980bc19468e2
[]
no_license
TuWei1992/VengoodShop
510eb7bcac4a4afdae6abf07cea5b0a769d76c26
4b54d878f10112332daf53fbbe2e04af98f7cae4
refs/heads/master
2020-12-26T01:50:45.482345
2016-07-12T06:47:22
2016-07-12T06:47:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,836
java
package com.vengood.model; /** * 类名:WeiXinInfo.java * 注释:微信登录回值实体类 * 日期:2016年4月25日 * 作者:王超 */ public class WeiXinInfo { private String openid = null; private String nickname = null; private int sex = 0; private String language = null; private String city = null; private String province = null; private String country = null; private String headimgurl = null; private String[] privilege = null; private String unionid = null; public String getOpenid() { return openid; } public void setOpenid(String openid) { this.openid = openid; } public String getNickname() { return nickname; } public void setNickname(String nickname) { this.nickname = nickname; } public int getSex() { return sex; } public void setSex(int sex) { this.sex = sex; } public String getLanguage() { return language; } public void setLanguage(String language) { this.language = language; } public String getCity() { return city; } public void setCity(String city) { this.city = city; } public String getProvince() { return province; } public void setProvince(String province) { this.province = province; } public String getCountry() { return country; } public void setCountry(String country) { this.country = country; } public String getHeadimgurl() { return headimgurl; } public void setHeadimgurl(String headimgurl) { this.headimgurl = headimgurl; } public String[] getPrivilege() { return privilege; } public void setPrivilege(String[] privilege) { this.privilege = privilege; } public String getUnionid() { return unionid; } public void setUnionid(String unionid) { this.unionid = unionid; } }
[ "123!@#asd" ]
123!@#asd
fc6c7ec9a6f38c0ea1c59185b87b6b6b35010497
1c109d3b97dcdc01cdf50f7bdbdc4255077254bb
/src/com/zhanjixun/views/DoubleButtonMessageDialog.java
4a3154ba6c84d180612df540f8bbd352239f7f06
[]
no_license
Imissyou1314/MissfishShop
7649e98d3b996e6829be57f3e4571ad1a5012b12
ef9de8ef70310ebbbb66f576b19cc850f17d6e93
refs/heads/master
2022-05-25T00:03:56.911750
2016-01-13T14:31:33
2016-01-13T14:31:33
48,944,394
1
0
null
2022-05-08T10:53:12
2016-01-03T12:12:05
Java
GB18030
Java
false
false
634
java
package com.zhanjixun.views; import android.content.Context; import android.view.View.OnClickListener; /** * 双按钮提示信息对话框 * * @author 詹命天子 * */ public class DoubleButtonMessageDialog extends MessageDialog { public DoubleButtonMessageDialog(Context context, String msg) { super(context, msg); } public void setPositiveButton(String text, OnClickListener l) { dialog.setPositiveButton(text, l); } @Override public void setCancelable(boolean flag) { super.setCancelable(flag); } public void setNegativeButton(String text, OnClickListener l) { dialog.setNegativeButton(text, l); } }
[ "1255418233@qq.com" ]
1255418233@qq.com
b4040f8ecd5e1d1e4a5038df1a3a0b0e9d1c3af7
62e42590a2fcbfab0bdbdce38e12e079fdffc94c
/tools/java/org.hl7.fhir.igtools/src/org/hl7/fhir/igtools/openapi/PathItemWriter.java
1db4b1a5b3cccedfa9453e539af0f7509d59763e
[ "BSD-3-Clause" ]
permissive
fhir-ru/fhir-ru
97f2ab4e46496e9e4d7ac21d86d72e7c5bf7215c
5046061d15f40accdaf13707a683c8463f37f806
refs/heads/master
2023-02-22T13:46:54.829135
2021-01-21T15:09:57
2021-01-21T15:09:57
20,682,990
5
4
NOASSERTION
2020-04-28T12:31:08
2014-06-10T11:37:02
Java
UTF-8
Java
false
false
602
java
package org.hl7.fhir.igtools.openapi; import com.google.gson.JsonObject; public class PathItemWriter extends BaseWriter { public PathItemWriter(JsonObject object) { super(object); } public PathItemWriter summary(String value) { object.addProperty("summary", value); return this; } public PathItemWriter description(String value) { object.addProperty("description", value); return this; } public OperationWriter operation(String op) { return new OperationWriter(ensureMapObject(op)); } }
[ "grahameg@2f0db536-2c49-4257-a3fa-e771ed206c19" ]
grahameg@2f0db536-2c49-4257-a3fa-e771ed206c19
816486291c41623cec220ea99f11e3f4cf869bb5
148ff9d4b36282acd199f87e58428d60335185f5
/higgs-agent/higgs-agent-plugin/higgs-thrift-plugin/src/main/java/io/vilada/higgs/plugin/thrift/ThriftPlugin.java
71a7d5844a3c76f1ff02e05a77e1ed5caecb0c20
[ "Apache-2.0" ]
permissive
gitter-badger/higgs
3f60a68d8ab62b476a57e0790659c4bdbc1b11f8
7b2c8e9e90e231455e53232d9ad148d319ead10b
refs/heads/master
2020-04-01T08:52:51.106664
2018-10-12T05:51:08
2018-10-12T05:51:08
153,050,668
1
1
Apache-2.0
2018-10-15T03:56:25
2018-10-15T03:56:25
null
UTF-8
Java
false
false
10,520
java
/* * Copyright 2018 The Higgs Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.vilada.higgs.plugin.thrift; import io.vilada.higgs.agent.common.config.ProfilerConfig; import io.vilada.higgs.agent.common.instrument.transformer.DefaultTransformCallback; import io.vilada.higgs.agent.common.instrument.transformer.TransformCallback; import io.vilada.higgs.agent.common.instrument.transformer.TransformTemplate; import io.vilada.higgs.agent.common.plugin.ProfilerPlugin; import io.vilada.higgs.agent.common.trace.HiggsContinuationAccessor; import io.vilada.higgs.plugin.thrift.interceptor.client.*; import io.vilada.higgs.plugin.thrift.interceptor.protocol.*; import io.vilada.higgs.plugin.thrift.interceptor.server.*; /** * @author cyp */ public class ThriftPlugin implements ProfilerPlugin { private TransformTemplate transformTemplate; public void setup(ProfilerConfig profilerConfig, TransformTemplate transformTemplate) { this.transformTemplate = transformTemplate; addInterceptorsForServerServe(); addInterceptorsForSynchronousClients(); addInterceptorsForAsynchronousClients(); addInterceptorsForSynchronousProcessors(); addInterceptorsForAsynchronousProcessors(); //addInterceptorsForRetrievingSocketAddresses(); addTProtocolEditors(); } private void addInterceptorsForServerServe() { String[] targetArr = new String[]{"org.apache.thrift.server.AbstractNonblockingServer", "org.apache.thrift.server.TSimpleServer", "org.apache.thrift.server.TThreadPoolServer"}; String servInterceptor = ServerServeInterceptor.class.getName(); for (String target : targetArr) { TransformCallback callback = new DefaultTransformCallback(target); callback.addInterceptor("serve", "()V", servInterceptor); transformTemplate.transform(callback); } } private void addInterceptorsForSynchronousClients() { TransformCallback callback = new DefaultTransformCallback("org.apache.thrift.TServiceClient"); callback.addInterceptor("sendBase", "(Ljava/lang/String;Lorg/apache/thrift/TBase;)V", SyncSendBaseInterceptor.class.getName()); callback.addInterceptor("receiveBase", "(Lorg/apache/thrift/TBase;Ljava/lang/String;)V", SyncReceiveBaseInterceptor.class.getName()); transformTemplate.transform(callback); } private void addInterceptorsForAsynchronousClients() { TransformCallback callback = new DefaultTransformCallback("org.apache.thrift.async.TAsyncClientManager"); callback.addInterceptor("call", "(Lorg/apache/thrift/async/TAsyncMethodCall;)V", AsyncManagerCallInterceptor.class.getName()); transformTemplate.transform(callback); callback = new DefaultTransformCallback("org.apache.thrift.async.TAsyncMethodCall"); callback.addField(HiggsContinuationAccessor.class.getName()); callback.addInterceptor("cleanUpAndFireCallback", "(Ljava/nio/channels/SelectionKey;)V", AsyncCleanUpAndFireCallbackInterceptor.class.getName()); callback.addInterceptor("onError", "(Ljava/lang/Exception;)V", AsyncCallOnErrorInterceptor.class.getName()); callback.addInterceptor("start", "(Ljava/nio/channels/Selector;)V", AsyncCallStartInterceptor.class.getName()); transformTemplate.transform(callback); } // Processor - synchronous private void addInterceptorsForSynchronousProcessors() { TransformCallback callback = new DefaultTransformCallback("org.apache.thrift.TBaseProcessor"); callback.addInterceptor("process", "(Lorg/apache/thrift/protocol/TProtocol;Lorg/apache/thrift/protocol/TProtocol;)Z", SyncProcessorInterceptor.class.getName()); transformTemplate.transform(callback); callback = new DefaultTransformCallback("org.apache.thrift.ProcessFunction"); callback.addInterceptor("process", "(ILorg/apache/thrift/protocol/TProtocol;Lorg/apache/thrift/protocol/TProtocol;Ljava/lang/Object;)V", SyncFunctionInterceptor.class.getName()); transformTemplate.transform(callback); } // Processor - asynchronous private void addInterceptorsForAsynchronousProcessors() { TransformCallback callback = new DefaultTransformCallback("org.apache.thrift.TBaseAsyncProcessor"); callback.addInterceptor("process", "(Lorg/apache/thrift/protocol/TProtocol;Lorg/apache/thrift/protocol/TProtocol;)Z", AsyncProcessorInterceptor.class.getName()); transformTemplate.transform(callback); // transformTemplate.transform("org.apache.thrift.AsyncProcessFunction", new DefaultTransformCallback() { // public void doInTransform(Instrumenter instrumenter, byte[] classfileBuffer) { // instrumenter.instrumentMethod(AsyncFunctionInterceptor.class.getName(), "start", "int", // "org.apache.thrift.protocol.TProtocol", "org.apache.thrift.protocol.TProtocol", // "java.lang.Object"); // } // }); } // // Common // private void addInterceptorsForRetrievingSocketAddresses() { // TransformCallback callback = new DefaultTransformCallback("org.apache.thrift.transport.TSocket"); // callback.addInterceptor("<init>", "(Ljava/net/TSocket;)V", SocketConstructInterceptor.class.getName()); // callback.addInterceptor("<init>", "(Ljava/lang/String;II)V", SocketConstructInterceptor.class.getName()); // transformTemplate.transform(callback); // // callback = new DefaultTransformCallback("org.apache.thrift.transport.TFramedTransport"); // callback.addInterceptor("<init>", "(Lorg/apache/thrift/transport/TTransport;)V", SocketConstructInterceptor.class.getName()); // callback.addInterceptor("<init>", "(Lorg/apache/thrift/transport/TTransport;I)V", SocketFramedTransportConstructInterceptor.class.getName()); // transformTemplate.transform(callback); // // callback = new DefaultTransformCallback("org.apache.thrift.transport.TFastFramedTransport"); // callback.addInterceptor("<init>", "(Lorg/apache/thrift/transport/TTransport;II)V", SocketFastFramedTransportConstructInterceptor.class.getName()); // transformTemplate.transform(callback); // // callback = new DefaultTransformCallback("org.apache.thrift.transport.TSaslClientTransport"); // callback.addInterceptor("<init>", "(Lorg/apache/thrift/transport/TTransport;)V", SocketSaslTransportConstructInterceptor.class.getName()); // callback.addInterceptor("<init>", "(Ljavax/security/sasl/SaslClient;Lorg/apache/thrift/transport/TTransport;)V", SocketSaslTransportConstructInterceptor.class.getName()); // transformTemplate.transform(callback); // //// transformTemplate.transform("org.apache.thrift.transport.TMemoryInputTransport", new DefaultTransformCallback() { //// public void doInTransform(Instrumenter instrumenter, byte[] classfileBuffer) { //// //instrumenter.addField("FIELD_ACCESSOR_SOCKET"); //// } //// }); //// //// transformTemplate.transform("org.apache.thrift.transport.TIOStreamTransport", new DefaultTransformCallback() { //// public void doInTransform(Instrumenter instrumenter, byte[] classfileBuffer) { //// //instrumenter.addField("FIELD_ACCESSOR_SOCKET"); //// } //// }); // // nonblocking // callback = new DefaultTransformCallback("org.apache.thrift.transport.TNonblockingSocket"); // callback.addInterceptor("<init>", "(Ljava/nio/channels/SocketChannel;ILjava/net/SocketAddress;)V", SocketSaslTransportConstructInterceptor.class.getName()); // transformTemplate.transform(callback); // // addFrameBufferEditor(); // } // private void addFrameBufferEditor() { // transformTemplate.transform(new DefaultTransformCallback("org.apache.thrift.server.AbstractNonblockingServer$FrameBuffer") { // public void doInTransform(Instrumenter instrumenter, byte[] classfileBuffer) { // //instrumenter.addField(ThriftConstants.FIELD_ACCESSOR_SOCKET); // //instrumenter.addGetter(ThriftConstants.FIELD_GETTER_T_NON_BLOCKING_TRANSPORT,ThriftConstants.FRAME_BUFFER_FIELD_TRANS_); // if(instrumenter.getInstrumentClass().hasField(ThriftConstants.FRAME_BUFFER_FIELD_IN_TRANS_)){ // //instrumenter.addGetter(ThriftConstants.FIELD_GETTER_T_TRANSPORT,ThriftConstants.FRAME_BUFFER_FIELD_IN_TRANS_); // instrumenter.instrumentConstructor(ServerSpanAroundInterceptor.class.getName(), // "org.apache.thrift.server.AbstractNonblockingServer", // "org.apache.thrift.transport.TNonblockingTransport", // "org.apache.thrift.server.AbstractNonblockingServer$AbstractSelectThread" // ); // } // if(instrumenter.getInstrumentClass().hasMethod("getInputTransport", "org.apache.thrift.transport.TTransport")){ // //instrumenter.addGetter(ThriftConstants.FIELD_GETTER_T_TRANSPORT,ThriftConstants.FRAME_BUFFER_FIELD_IN_TRANS_); // instrumenter.instrumentMethod(ServerSpanAroundInterceptor.class.getName(), "getInputTransport","org.apache.thrift.transport.TTransport"); // } // } // }); // } // Common - protocols private void addTProtocolEditors() { String[] targetArr = new String[]{"org.apache.thrift.protocol.TBinaryProtocol", "org.apache.thrift.protocol.TCompactProtocol","org.apache.thrift.protocol.TJSONProtocol"}; for(String target : targetArr) { TransformCallback callback = new DefaultTransformCallback(target); callback.addInterceptor("writeFieldStop", "()V", ProtocolWriteFieldStopInterceptor.class.getName()); callback.addInterceptor("writeMessageBegin", "(Lorg/apache/thrift/protocol/TMessage;)V", ProtocolWriteMessageBeginInterceptor.class.getName()); callback.addInterceptor("readFieldBegin", "()Lorg/apache/thrift/protocol/TField;", ProtocolReadFieldBeginInterceptor.class.getName()); callback.addInterceptor("readBinary", "()Ljava/nio/ByteBuffer;", ProtocolReadTTypeInterceptor.class.getName()); callback.addInterceptor("readMessageEnd", "()V", ProtocolReadMessageEndInterceptor.class.getName()); callback.addInterceptor("readMessageBegin", "()Lorg/apache/thrift/protocol/TMessage;", ProtocolReadMessageBeginInterceptor.class.getName()); transformTemplate.transform(callback); } } }
[ "mjolnir.vilada@gmail.com" ]
mjolnir.vilada@gmail.com
383a93372034c08e93d72d28c83faf3e8b4236dd
0cc9b2aebcb06b09d389e7718a6e87630d5a46cf
/src/main/java/cors/CorsRequestFilter.java
d13b7093db4450ed431b582c78b6780332d6510f
[]
no_license
Lars-m/semesterSeedJAX-RS-Backend
1a35cafdfb011c0c9a2667820f558465625fbec3
b9e609b50b709e04b3814c76471f8a9a1610fe1b
refs/heads/master
2020-05-22T21:24:34.022544
2017-10-14T16:11:09
2017-10-14T16:11:09
84,725,431
0
2
null
null
null
null
UTF-8
Java
false
false
1,033
java
package cors; import java.io.IOException; import java.util.logging.Logger; import javax.ws.rs.container.ContainerRequestContext; import javax.ws.rs.container.ContainerRequestFilter; import javax.ws.rs.container.PreMatching; import javax.ws.rs.core.Response; import javax.ws.rs.ext.Provider; @Provider //This will ensure that the filter is used "automatically" @PreMatching public class CorsRequestFilter implements ContainerRequestFilter { private final static Logger log = Logger.getLogger(CorsRequestFilter.class.getName()); @Override public void filter(ContainerRequestContext requestCtx) throws IOException { // When HttpMethod comes as OPTIONS, just acknowledge that it accepts... if (requestCtx.getRequest().getMethod().equals("OPTIONS")) { log.info("HTTP Method (OPTIONS) - Detected!"); // Just send a OK response back to the browser. // The response goes through the chain of applicable response filters. requestCtx.abortWith(Response.status(Response.Status.OK).build()); } } }
[ "lam@cphbusiness.dk" ]
lam@cphbusiness.dk
45bb0fe100071f06385efdf3a961c552c7e2f0c0
c8e686108e881a8497df4ded908ea1f34f99a60f
/src/main/java/corp/tarta/nerfertum/Controls/ClientDialogPane.java
27b34937c58de9f0e77f4578e3882840167ca539
[]
no_license
GuillermoOsterwalder/Nerfertum
4472823123dfa38f6bd7d2f311254b28163560c5
f79bc54834953d5c190496b075de9c45cecce018
refs/heads/master
2020-12-07T15:21:11.233038
2017-07-06T21:59:52
2017-07-06T21:59:52
95,497,576
0
1
null
2017-07-06T21:59:53
2017-06-26T23:19:16
Java
UTF-8
Java
false
false
4,460
java
package corp.tarta.nerfertum.Controls; import corp.tarta.nerfertum.MainPane; import corp.tarta.nerfertum.View.GridView; import javafx.geometry.Insets; import javafx.scene.control.Button; import javafx.scene.control.Label; import javafx.scene.layout.GridPane; import javafx.scene.text.Font; /** * Created by Tarta on 06/07/2017. */ public class ClientDialogPane extends GridView { private Label title; private Button cancel; private Button save; public ClientDialogPane(){ super(12,17); this.getStylesheets().remove(ComponentStyleElements.DEFAULT_STYLESHEET.getPath()); this.getStylesheets().add(ComponentStyleElements.CLIENTDIALOG_STYLESHEET.getPath()); this.getStyleClass().add(ComponentStyleElements.CLIENTDIALOG_CLASS.getPath()); inicThings(); inicClientView(); } private void inicThings() { title = new Label("Carga de Clientes"); title.getStyleClass().add("title"); title.setFont(Font.font ("Verdana", 24)); addChild(title,4,1,8,1); cancel = new Button("Cancelar"); cancel.getStyleClass().add("boton"); cancel.setFont(Font.font("Verdana", 16)); addChild(cancel, 7, 8, 2, 1); cancel.setOnAction(e -> MainPane.getInstance().toClientView()); save = new Button("Cargar"); save.getStyleClass().add("boton"); save.setFont(Font.font("Verdana", 16)); addChild(save, 7, 6, 2, 1); } private void inicClientView(){ GridPane grid = new GridPane(); grid.setPadding(new Insets(10, 10, 10, 10)); grid.setVgap(5); grid.setHgap(5); Label idLabel = new Label("Codigo del cliente:"); idLabel.setFont(Font.font("Verdana", 16)); addChild(idLabel, 1, 5, 2, 1); final RestrictiveTextField id = new IntField(9999l,4); id.setPromptText("Ingrese el código del cliente"); id.setPrefColumnCount(10); id.getText(); GridPane.setConstraints(id, 0, 0); grid.getChildren().add(id); addChild(id,1,6,2,1); Label nameLabel = new Label("Nombre del cliente:"); nameLabel.setFont(Font.font("Verdana", 16)); addChild(nameLabel, 1, 8, 2, 1); final RestrictiveTextField name = new StringField(20); name.setPromptText("Ingrese nombre del cliente"); name.setPrefColumnCount(10); name.getText(); GridPane.setConstraints(name, 0, 0); grid.getChildren().add(name); addChild(name,1,9,2,1); Label lastnameLabel = new Label("Apellido del cliente"); lastnameLabel.setFont(Font.font("Verdana", 16)); addChild(lastnameLabel, 1, 11, 2, 1); final RestrictiveTextField lastname = new StringField(20); lastname.setPromptText("Ingrese el apellido del cliente"); lastname.setPrefColumnCount(10); lastname.getText(); GridPane.setConstraints(lastname, 0, 0); grid.getChildren().add(lastname); addChild(lastname,1,12,2,1); Label adressLabel = new Label("Dirección del cliente:"); adressLabel.setFont(Font.font("Verdana", 16)); addChild(adressLabel, 4, 5, 2, 1); final RestrictiveTextField adress = new StringField(50); adress.setPromptText("Ingrese la direccion del cliente"); adress.setPrefColumnCount(10); adress.getText(); GridPane.setConstraints(adress, 0, 0); grid.getChildren().add(adress); addChild(adress,4,6,2,1); Label phoneLabel = new Label("Telefono del cliente:"); phoneLabel.setFont(Font.font("Verdana", 16)); addChild(phoneLabel, 4, 8, 2, 1); final RestrictiveTextField phone = new StringField(20); phone.setPromptText("Ingrese el Telefono del cliente"); phone.setPrefColumnCount(10); phone.getText(); GridPane.setConstraints(phone, 0, 0); grid.getChildren().add(phone); addChild(phone,4,9,2,1); Label mailLabel = new Label("Mail del cliente:"); mailLabel.setFont(Font.font("Verdana", 16)); addChild(mailLabel, 4, 11, 2, 1); final RestrictiveTextField mail = new StringField(30); mail.setPromptText("Ingrese el mail del cliente"); mail.setPrefColumnCount(10); mail.getText(); GridPane.setConstraints(mail, 0, 0); grid.getChildren().add(mail); addChild(mail,4,12,2,1); } }
[ "eltarta@gmail.com" ]
eltarta@gmail.com
38b01d21c50cec2acc751eb73ce6138f86d4f7dc
c59595ed3e142591f6668d6cf68267ee6378bf58
/android/src/main/java/com/google/api/client/googleapis/auth/clientlogin/AuthKeyValueParser.java
908e8b707f6c2cec7f0236f100b2ea953321ebdf
[]
no_license
BBPL/ardrone
4c713a2e4808ddc54ae23c3bcaa4252d0f7b4b36
712c277850477b1115d5245885a4c5a6de3d57dc
refs/heads/master
2021-04-30T05:08:05.372486
2018-02-13T16:46:48
2018-02-13T16:46:48
121,408,031
1
1
null
null
null
null
UTF-8
Java
false
false
4,657
java
package com.google.api.client.googleapis.auth.clientlogin; import com.google.api.client.http.HttpResponse; import com.google.api.client.util.ClassInfo; import com.google.api.client.util.FieldInfo; import com.google.api.client.util.GenericData; import com.google.api.client.util.ObjectParser; import com.google.api.client.util.Types; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.Reader; import java.lang.reflect.Field; import java.lang.reflect.Type; import java.nio.charset.Charset; import java.util.Map; final class AuthKeyValueParser implements ObjectParser { public static final AuthKeyValueParser INSTANCE = new AuthKeyValueParser(); private AuthKeyValueParser() { } public String getContentType() { return "text/plain"; } public <T> T parse(HttpResponse httpResponse, Class<T> cls) throws IOException { httpResponse.setContentLoggingLimit(0); InputStream content = httpResponse.getContent(); try { T parse = parse(content, (Class) cls); return parse; } finally { content.close(); } } public <T> T parse(InputStream inputStream, Class<T> cls) throws IOException { ClassInfo of = ClassInfo.of(cls); T newInstance = Types.newInstance(cls); BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream)); while (true) { String readLine = bufferedReader.readLine(); if (readLine == null) { return newInstance; } int indexOf = readLine.indexOf(61); String substring = readLine.substring(0, indexOf); String substring2 = readLine.substring(indexOf + 1); Field field = of.getField(substring); if (field != null) { Object valueOf; Class type = field.getType(); if (type == Boolean.TYPE || type == Boolean.class) { valueOf = Boolean.valueOf(substring2); } else { readLine = substring2; } FieldInfo.setFieldValue(field, newInstance, valueOf); } else if (GenericData.class.isAssignableFrom(cls)) { ((GenericData) newInstance).set(substring, substring2); } else if (Map.class.isAssignableFrom(cls)) { ((Map) newInstance).put(substring, substring2); } } } public <T> T parseAndClose(InputStream inputStream, Charset charset, Class<T> cls) throws IOException { return parseAndClose(new InputStreamReader(inputStream, charset), (Class) cls); } public Object parseAndClose(InputStream inputStream, Charset charset, Type type) { throw new UnsupportedOperationException("Type-based parsing is not yet supported -- use Class<T> instead"); } public <T> T parseAndClose(Reader reader, Class<T> cls) throws IOException { try { ClassInfo of = ClassInfo.of(cls); T newInstance = Types.newInstance(cls); BufferedReader bufferedReader = new BufferedReader(reader); while (true) { String readLine = bufferedReader.readLine(); if (readLine == null) { break; } int indexOf = readLine.indexOf(61); String substring = readLine.substring(0, indexOf); String substring2 = readLine.substring(indexOf + 1); Field field = of.getField(substring); if (field != null) { Object valueOf; Class type = field.getType(); if (type == Boolean.TYPE || type == Boolean.class) { valueOf = Boolean.valueOf(substring2); } else { readLine = substring2; } FieldInfo.setFieldValue(field, newInstance, valueOf); } else if (GenericData.class.isAssignableFrom(cls)) { ((GenericData) newInstance).set(substring, substring2); } else if (Map.class.isAssignableFrom(cls)) { ((Map) newInstance).put(substring, substring2); } } return newInstance; } finally { reader.close(); } } public Object parseAndClose(Reader reader, Type type) { throw new UnsupportedOperationException("Type-based parsing is not yet supported -- use Class<T> instead"); } }
[ "feber.sm@gmail.com" ]
feber.sm@gmail.com
f2894c35ffed9c993eb438291c2c9ed11abc746c
7852965856eb8dccc839cae9ba444dd1403f4196
/src/main/java/net/pterodactylus/util/template/Filter.java
886e0e466ab872c785c410a211cf76e68b895ff3
[]
no_license
Bombe/utils
736ea9705cddbdd87813405e3b457d4232340241
34bdf5715414d1e69176e9e8044059849335dcc7
refs/heads/master
2021-01-19T01:10:38.194616
2019-11-29T09:04:11
2019-11-29T09:04:11
384,957
4
9
null
2020-10-13T09:51:36
2009-11-25T08:19:10
Java
UTF-8
Java
false
false
1,368
java
/* * utils - Filter.java - Copyright © 2010–2019 David Roden * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package net.pterodactylus.util.template; import java.util.Map; /** * Filters can be used to transform the contents of a variable into some other * representation. * * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a> */ public interface Filter { /** * Formats the given data object. * * @param templateContext * The current template context * @param data * The data to format * @param parameters * Parameters for the filter * @return The formatted data */ public Object format(TemplateContext templateContext, Object data, Map<String, Object> parameters); }
[ "bombe@pterodactylus.net" ]
bombe@pterodactylus.net
12ffa14938d1c29f6b4743cce3448934661e12c3
db1ec105d3bf4729e1b8005e37ad057c712b29d1
/app/build/generated/source/r/debug/android/support/v7/recyclerview/R.java
09f5c077a55e972083600a8f116461485d4c7966
[]
no_license
anuragkachhala/AIIMSProject
3fc40c1a1b090f57086d522972888f8843c0f90e
391bafe21e7a27a90075075647191de8419ab8a3
refs/heads/master
2020-04-30T21:49:19.453843
2019-03-22T08:41:40
2019-03-22T08:41:40
176,716,033
0
0
null
null
null
null
UTF-8
Java
false
false
14,281
java
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * gradle plugin from the resource data it found. It * should not be modified by hand. */ package android.support.v7.recyclerview; public final class R { public static final class attr { public static final int alpha = 0x7f040027; public static final int coordinatorLayoutStyle = 0x7f0400a4; public static final int fastScrollEnabled = 0x7f0400d0; public static final int fastScrollHorizontalThumbDrawable = 0x7f0400d1; public static final int fastScrollHorizontalTrackDrawable = 0x7f0400d2; public static final int fastScrollVerticalThumbDrawable = 0x7f0400d3; public static final int fastScrollVerticalTrackDrawable = 0x7f0400d4; public static final int font = 0x7f0400d7; public static final int fontProviderAuthority = 0x7f0400d9; public static final int fontProviderCerts = 0x7f0400da; public static final int fontProviderFetchStrategy = 0x7f0400db; public static final int fontProviderFetchTimeout = 0x7f0400dc; public static final int fontProviderPackage = 0x7f0400dd; public static final int fontProviderQuery = 0x7f0400de; public static final int fontStyle = 0x7f0400df; public static final int fontVariationSettings = 0x7f0400e0; public static final int fontWeight = 0x7f0400e1; public static final int keylines = 0x7f04010d; public static final int layoutManager = 0x7f040111; public static final int layout_anchor = 0x7f040112; public static final int layout_anchorGravity = 0x7f040113; public static final int layout_behavior = 0x7f040114; public static final int layout_dodgeInsetEdges = 0x7f040140; public static final int layout_insetEdge = 0x7f040149; public static final int layout_keyline = 0x7f04014a; public static final int reverseLayout = 0x7f040185; public static final int spanCount = 0x7f04019a; public static final int stackFromEnd = 0x7f0401a0; public static final int statusBarBackground = 0x7f0401a6; public static final int ttcIndex = 0x7f040208; } public static final class color { public static final int notification_action_color_filter = 0x7f060075; public static final int notification_icon_bg_color = 0x7f060076; public static final int ripple_material_light = 0x7f060080; public static final int secondary_text_default_material_light = 0x7f060082; } public static final class dimen { public static final int compat_button_inset_horizontal_material = 0x7f070050; public static final int compat_button_inset_vertical_material = 0x7f070051; public static final int compat_button_padding_horizontal_material = 0x7f070052; public static final int compat_button_padding_vertical_material = 0x7f070053; public static final int compat_control_corner_material = 0x7f070054; public static final int compat_notification_large_icon_max_height = 0x7f070055; public static final int compat_notification_large_icon_max_width = 0x7f070056; public static final int fastscroll_default_thickness = 0x7f07008f; public static final int fastscroll_margin = 0x7f070090; public static final int fastscroll_minimum_range = 0x7f070091; public static final int item_touch_helper_max_drag_scroll_per_frame = 0x7f07009f; public static final int item_touch_helper_swipe_escape_max_velocity = 0x7f0700a0; public static final int item_touch_helper_swipe_escape_velocity = 0x7f0700a1; public static final int notification_action_icon_size = 0x7f0700d6; public static final int notification_action_text_size = 0x7f0700d7; public static final int notification_big_circle_margin = 0x7f0700d8; public static final int notification_content_margin_start = 0x7f0700d9; public static final int notification_large_icon_height = 0x7f0700da; public static final int notification_large_icon_width = 0x7f0700db; public static final int notification_main_column_padding_top = 0x7f0700dc; public static final int notification_media_narrow_margin = 0x7f0700dd; public static final int notification_right_icon_size = 0x7f0700de; public static final int notification_right_side_padding_top = 0x7f0700df; public static final int notification_small_icon_background_padding = 0x7f0700e0; public static final int notification_small_icon_size_as_large = 0x7f0700e1; public static final int notification_subtext_size = 0x7f0700e2; public static final int notification_top_pad = 0x7f0700e3; public static final int notification_top_pad_large_text = 0x7f0700e4; } public static final class drawable { public static final int notification_action_background = 0x7f080077; public static final int notification_bg = 0x7f080078; public static final int notification_bg_low = 0x7f080079; public static final int notification_bg_low_normal = 0x7f08007a; public static final int notification_bg_low_pressed = 0x7f08007b; public static final int notification_bg_normal = 0x7f08007c; public static final int notification_bg_normal_pressed = 0x7f08007d; public static final int notification_icon_background = 0x7f08007e; public static final int notification_template_icon_bg = 0x7f08007f; public static final int notification_template_icon_low_bg = 0x7f080080; public static final int notification_tile_bg = 0x7f080081; public static final int notify_panel_notification_icon_bg = 0x7f080082; } public static final class id { public static final int action_container = 0x7f09000d; public static final int action_divider = 0x7f09000f; public static final int action_image = 0x7f090012; public static final int action_text = 0x7f090018; public static final int actions = 0x7f09001a; public static final int async = 0x7f090020; public static final int blocking = 0x7f090024; public static final int bottom = 0x7f090025; public static final int chronometer = 0x7f090033; public static final int end = 0x7f090049; public static final int forever = 0x7f09006a; public static final int icon = 0x7f090071; public static final int icon_group = 0x7f090072; public static final int info = 0x7f090075; public static final int italic = 0x7f090077; public static final int item_touch_helper_previous_elevation = 0x7f090078; public static final int left = 0x7f0900a4; public static final int line1 = 0x7f0900a5; public static final int line3 = 0x7f0900a6; public static final int none = 0x7f0900b3; public static final int normal = 0x7f0900b4; public static final int notification_background = 0x7f0900b5; public static final int notification_main_column = 0x7f0900b6; public static final int notification_main_column_container = 0x7f0900b7; public static final int right = 0x7f0900d4; public static final int right_icon = 0x7f0900d5; public static final int right_side = 0x7f0900d6; public static final int start = 0x7f090100; public static final int tag_transition_group = 0x7f090105; public static final int tag_unhandled_key_event_manager = 0x7f090106; public static final int tag_unhandled_key_listeners = 0x7f090107; public static final int text = 0x7f090108; public static final int text2 = 0x7f090109; public static final int time = 0x7f090111; public static final int title = 0x7f090112; public static final int top = 0x7f090116; } public static final class integer { public static final int status_bar_notification_info_maxnum = 0x7f0a000e; } public static final class layout { public static final int notification_action = 0x7f0c0038; public static final int notification_action_tombstone = 0x7f0c0039; public static final int notification_template_custom_big = 0x7f0c003a; public static final int notification_template_icon_group = 0x7f0c003b; public static final int notification_template_part_chronometer = 0x7f0c003c; public static final int notification_template_part_time = 0x7f0c003d; } public static final class string { public static final int status_bar_notification_info_overflow = 0x7f0f0093; } public static final class style { public static final int TextAppearance_Compat_Notification = 0x7f10011d; public static final int TextAppearance_Compat_Notification_Info = 0x7f10011e; public static final int TextAppearance_Compat_Notification_Line2 = 0x7f10011f; public static final int TextAppearance_Compat_Notification_Time = 0x7f100120; public static final int TextAppearance_Compat_Notification_Title = 0x7f100121; public static final int Widget_Compat_NotificationActionContainer = 0x7f1001ca; public static final int Widget_Compat_NotificationActionText = 0x7f1001cb; public static final int Widget_Support_CoordinatorLayout = 0x7f1001fa; } public static final class styleable { public static final int[] ColorStateListItem = { 0x010101a5, 0x0101031f, 0x7f040027 }; public static final int ColorStateListItem_android_color = 0; public static final int ColorStateListItem_android_alpha = 1; public static final int ColorStateListItem_alpha = 2; public static final int[] CoordinatorLayout = { 0x7f04010d, 0x7f0401a6 }; public static final int CoordinatorLayout_keylines = 0; public static final int CoordinatorLayout_statusBarBackground = 1; public static final int[] CoordinatorLayout_Layout = { 0x010100b3, 0x7f040112, 0x7f040113, 0x7f040114, 0x7f040140, 0x7f040149, 0x7f04014a }; public static final int CoordinatorLayout_Layout_android_layout_gravity = 0; public static final int CoordinatorLayout_Layout_layout_anchor = 1; public static final int CoordinatorLayout_Layout_layout_anchorGravity = 2; public static final int CoordinatorLayout_Layout_layout_behavior = 3; public static final int CoordinatorLayout_Layout_layout_dodgeInsetEdges = 4; public static final int CoordinatorLayout_Layout_layout_insetEdge = 5; public static final int CoordinatorLayout_Layout_layout_keyline = 6; public static final int[] FontFamily = { 0x7f0400d9, 0x7f0400da, 0x7f0400db, 0x7f0400dc, 0x7f0400dd, 0x7f0400de }; public static final int FontFamily_fontProviderAuthority = 0; public static final int FontFamily_fontProviderCerts = 1; public static final int FontFamily_fontProviderFetchStrategy = 2; public static final int FontFamily_fontProviderFetchTimeout = 3; public static final int FontFamily_fontProviderPackage = 4; public static final int FontFamily_fontProviderQuery = 5; public static final int[] FontFamilyFont = { 0x01010532, 0x01010533, 0x0101053f, 0x0101056f, 0x01010570, 0x7f0400d7, 0x7f0400df, 0x7f0400e0, 0x7f0400e1, 0x7f040208 }; public static final int FontFamilyFont_android_font = 0; public static final int FontFamilyFont_android_fontWeight = 1; public static final int FontFamilyFont_android_fontStyle = 2; public static final int FontFamilyFont_android_ttcIndex = 3; public static final int FontFamilyFont_android_fontVariationSettings = 4; public static final int FontFamilyFont_font = 5; public static final int FontFamilyFont_fontStyle = 6; public static final int FontFamilyFont_fontVariationSettings = 7; public static final int FontFamilyFont_fontWeight = 8; public static final int FontFamilyFont_ttcIndex = 9; public static final int[] GradientColor = { 0x0101019d, 0x0101019e, 0x010101a1, 0x010101a2, 0x010101a3, 0x010101a4, 0x01010201, 0x0101020b, 0x01010510, 0x01010511, 0x01010512, 0x01010513 }; public static final int GradientColor_android_startColor = 0; public static final int GradientColor_android_endColor = 1; public static final int GradientColor_android_type = 2; public static final int GradientColor_android_centerX = 3; public static final int GradientColor_android_centerY = 4; public static final int GradientColor_android_gradientRadius = 5; public static final int GradientColor_android_tileMode = 6; public static final int GradientColor_android_centerColor = 7; public static final int GradientColor_android_startX = 8; public static final int GradientColor_android_startY = 9; public static final int GradientColor_android_endX = 10; public static final int GradientColor_android_endY = 11; public static final int[] GradientColorItem = { 0x010101a5, 0x01010514 }; public static final int GradientColorItem_android_color = 0; public static final int GradientColorItem_android_offset = 1; public static final int[] RecyclerView = { 0x010100c4, 0x010100f1, 0x7f0400d0, 0x7f0400d1, 0x7f0400d2, 0x7f0400d3, 0x7f0400d4, 0x7f040111, 0x7f040185, 0x7f04019a, 0x7f0401a0 }; public static final int RecyclerView_android_orientation = 0; public static final int RecyclerView_android_descendantFocusability = 1; public static final int RecyclerView_fastScrollEnabled = 2; public static final int RecyclerView_fastScrollHorizontalThumbDrawable = 3; public static final int RecyclerView_fastScrollHorizontalTrackDrawable = 4; public static final int RecyclerView_fastScrollVerticalThumbDrawable = 5; public static final int RecyclerView_fastScrollVerticalTrackDrawable = 6; public static final int RecyclerView_layoutManager = 7; public static final int RecyclerView_reverseLayout = 8; public static final int RecyclerView_spanCount = 9; public static final int RecyclerView_stackFromEnd = 10; } }
[ "kachhalaanurag@gmail.com" ]
kachhalaanurag@gmail.com
0776b80cf88888f252b71cb989a984388bf078d4
633c2d7562756038acaba58c7463e889ec3a055d
/workspace/myMethod/src/com/itpractice5/MethodTest3.java
b2af03b4f8b5fcc2c2183d5a69aaf8aa0e5eee32
[]
no_license
fl1125/Java-practice
b2de3f87f4b61420762312556947429fea7ca421
5de863de11d57cd089faa37513a90b24a5b6567d
refs/heads/master
2021-05-21T07:41:27.468396
2020-05-21T13:51:44
2020-05-21T13:51:44
252,603,605
0
0
null
null
null
null
GB18030
Java
false
false
442
java
package com.itpractice5; /* * 写一个方法,用于对数组进行求和,并调用方法 * * * */ public class MethodTest3 { public static void main(String[] args) { int[] arr ={1,2,3,4}; int sum = sum(arr); System.out.println("sum:"+sum); } public static int sum(int arr[]){ int sum = 0; for(int x=0; x<arr.length; x++){ sum += arr[x]; } return sum; } }
[ "1245791351@qq.com" ]
1245791351@qq.com
a77d7b99c656d94540641924f56de48c7a21268e
ce2135ec796703a04478f81890cc84d2ec0d9285
/Tzg-rest/src/main/java/com/tzg/rest/controller/kff/MiningActivityController.java
05cbb8d62115d5b20d780503cbf973f5978ae41f
[]
no_license
killman0019/qufen_backend
30673acb905d38bc24dda09b17e42c153413386b
09241fd5f0c3616a42816d1b2a6df453e9ba787a
refs/heads/master
2021-09-23T15:22:16.417361
2018-09-21T09:10:51
2018-09-21T09:10:51
155,846,117
0
1
null
2018-11-02T09:48:54
2018-11-02T09:48:54
null
UTF-8
Java
false
false
18,141
java
package com.tzg.rest.controller.kff; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Random; import javax.servlet.http.HttpServletRequest; import org.apache.log4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import com.alibaba.fastjson.JSONObject; import com.tzg.common.enums.UserOperation; import com.tzg.common.page.PageResult; import com.tzg.common.page.PaginationQuery; import com.tzg.common.utils.StringUtil; import com.tzg.common.utils.sysGlobals; import com.tzg.entitys.kff.activity.ExplainActivity; import com.tzg.entitys.kff.activity.MiningActivity; import com.tzg.entitys.kff.activity.PostShare; import com.tzg.entitys.kff.activity.RewardDetail; import com.tzg.entitys.kff.evaluation.Evaluation; import com.tzg.entitys.kff.follow.Follow; import com.tzg.entitys.kff.project.KFFProject; import com.tzg.entitys.kff.user.KFFUser; import com.tzg.entitys.leopard.system.SystemParam; import com.tzg.rest.controller.BaseController; import com.tzg.rest.exception.rest.RestErrorCode; import com.tzg.rest.exception.rest.RestServiceException; import com.tzg.rest.vo.BaseResponseEntity; import com.tzg.rmi.service.EvaluationRmiService; import com.tzg.rmi.service.ExplainActivityRmiService; import com.tzg.rmi.service.FollowRmiService; import com.tzg.rmi.service.KFFProjectPostRmiService; import com.tzg.rmi.service.KFFUserRmiService; import com.tzg.rmi.service.MiningActivityRmiService; import com.tzg.rmi.service.PostShareRmiService; import com.tzg.rmi.service.RewardDetailRmiService; import com.tzg.rmi.service.SystemParamRmiService; /** * @ClassName: MiningActivityController * @Description: TODO<挖矿活动controller> * @author linj<作者> * @date 2018年7月5日 下午1:23:02 * @version v1.0.0 */ @Controller @RequestMapping("/kff/miningActivity") public class MiningActivityController extends BaseController { private static Logger logger = Logger.getLogger(MiningActivityController.class); @Autowired private MiningActivityRmiService miningActivityRmiService; @Autowired private ExplainActivityRmiService explainActivityRmiService; @Autowired private EvaluationRmiService evaluationRmiService; @Autowired private FollowRmiService followRmiService; @Autowired private PostShareRmiService postShareRmiService; @Autowired private RewardDetailRmiService rewardDetailRmiService; @Autowired private KFFProjectPostRmiService projectPostRmiService; @Autowired private KFFUserRmiService userRmiService; @Autowired private SystemParamRmiService systemParamRmiService; /** * @Description: 随机抽取集合中值 * @author: linj * @date: 2017/04/29 17:12:00 * @param list */ private static Integer getProjectListArr(List<KFFProject> list){ if(list.isEmpty()){ return null; } Random ran = new Random(); int con=ran.nextInt(list.size()); return con; } /** * @Description: 随机抽取集合中值 * @author: linj * @date: 2017/04/29 17:12:00 * @param list */ private static Integer getUserListArr(List<KFFUser> list){ if(list.isEmpty()){ return null; } Random ran = new Random(); int con=ran.nextInt(list.size()); return con; } /** * @Title: getHotProjectAndHotUser * @Description: TODO <发现页面取热门项目,活跃用户> * @author linj <方法创建作者> * @create 下午7:59:09 * @param @param request * @param @return <参数说明> * @return BaseResponseEntity * @throws * @update 下午7:59:09 * @updator <修改人 修改后更新修改时间,不同人修改再添加> * @updateContext <修改内容> */ @ResponseBody @RequestMapping(value = "/getHotProjectAndHotUser", method = { RequestMethod.POST, RequestMethod.GET }) public BaseResponseEntity getHotProjectAndHotUser(HttpServletRequest request) { BaseResponseEntity bre = new BaseResponseEntity(); HashMap<String,Object> reMap = new HashMap<String,Object>(); try { Map<String,Object> map = new HashMap<String,Object>(); SystemParam sysParm = systemParamRmiService.findByCode(sysGlobals.HOT_USER); map.clear(); map.put("hotUser", Integer.valueOf(sysParm.getVcParamValue())); map.put("DYPostNumAll", 5); List<KFFUser> users = userRmiService.findListByMap(map); List<Map<String,Object>> userList = new ArrayList<Map<String,Object>>(); if(!users.isEmpty()) { if(users.size()<11) { for (KFFUser kffUser : users) { Map<String,Object> seMap = new HashMap<String,Object>(); seMap.put("userName", kffUser.getUserName()); seMap.put("icon", kffUser.getIcon()); seMap.put("userId", kffUser.getUserId()); userList.add(seMap); } }else { List<Integer> usList = new ArrayList<Integer>(); for (int i = 0; i < 10; i++) { boolean flag = false; while (!flag) { Integer usArr = getUserListArr(users); if(!usList.contains(usArr)) { usList.add(usArr); flag = true; } } } for (int i = 0; i < usList.size(); i++) { KFFUser kffUser = users.get(usList.get(i)); Map<String,Object> seMap = new HashMap<String,Object>(); seMap.put("userName", kffUser.getUserName()); seMap.put("icon", kffUser.getIcon()); seMap.put("userId", kffUser.getUserId()); userList.add(seMap); } } } SystemParam sysParmc = systemParamRmiService.findByCode(sysGlobals.HOT_PROJECT); map.clear(); map.put("hotProject", Integer.valueOf(sysParmc.getVcParamValue())); List<KFFProject> projects = projectPostRmiService.findListByMap(map); List<Map<String,Object>> projectList = new ArrayList<Map<String,Object>>(); if(!projects.isEmpty()) { if(projects.size()<11) { for (KFFProject kffProject : projects) { Map<String,Object> seMap = new HashMap<String,Object>(); seMap.put("projectChineseName", kffProject.getProjectChineseName()); seMap.put("projectIcon", kffProject.getProjectIcon()); seMap.put("projectId", kffProject.getProjectId()); projectList.add(seMap); } }else { List<Integer> usList = new ArrayList<Integer>(); for (int i = 0; i < 10; i++) { boolean flag = false; while (!flag) { Integer usArr = getProjectListArr(projects); if(!usList.contains(usArr)) { usList.add(usArr); flag = true; } } } for (int i = 0; i < usList.size(); i++) { KFFProject kffProject = projects.get(usList.get(i)); Map<String,Object> seMap = new HashMap<String,Object>(); seMap.put("projectChineseName", kffProject.getProjectChineseName()); seMap.put("projectIcon", kffProject.getProjectIcon()); seMap.put("projectId", kffProject.getProjectId()); projectList.add(seMap); } } } reMap.put("users", userList); reMap.put("projects", projectList); bre.setData(reMap); } catch (RestServiceException e) { logger.error("HomeController articleDetail:{}", e); return this.resResult(e.getErrorCode(), e.getMessage()); } catch (Exception e) { logger.error("HomeController articleDetail:{}", e); return this.resResult(RestErrorCode.SYS_ERROR, e.getMessage()); } return bre; } /** * @Title: getActivityStatus * @Description: TODO <前端页面判断活动是否开始> * @author linj <方法创建作者> * @create 下午2:39:47 * @param @param request * @param @return <参数说明> * @return BaseResponseEntity * @throws * @update 下午2:39:47 * @updator <修改人 修改后更新修改时间,不同人修改再添加> * @updateContext <修改内容> */ @ResponseBody @RequestMapping(value = "/getActivityStatus", method = { RequestMethod.POST, RequestMethod.GET }) public BaseResponseEntity getActivityStatus(HttpServletRequest request) { BaseResponseEntity bre = new BaseResponseEntity(); try { miningActivityRmiService.manualActivity(); } catch (RestServiceException e) { logger.error("HomeController articleDetail:{}", e); return this.resResult(e.getErrorCode(), e.getMessage()); } catch (Exception e) { logger.error("HomeController articleDetail:{}", e); return this.resResult(RestErrorCode.SYS_ERROR, e.getMessage()); } return bre; } /** * @Title: getExplainActivity * @Description: TODO <点评挖矿活动说明接口> * @author linj <方法创建作者> * @create 下午5:42:57 * @param @param request * @param @return <参数说明> * @return BaseResponseEntity * @throws * @update 下午5:42:57 * @updator <修改人 修改后更新修改时间,不同人修改再添加> * @updateContext <修改内容> */ @ResponseBody @RequestMapping(value = "/getExplainActivity", method = { RequestMethod.POST, RequestMethod.GET }) public BaseResponseEntity getExplainActivity(HttpServletRequest request) { BaseResponseEntity bre = new BaseResponseEntity(); try { miningActivityRmiService.manualActivity(); Map<String, Object> seMap = new HashMap<String, Object>(); seMap.put("status", sysGlobals.ENABLE); List<ExplainActivity> explainActivity = explainActivityRmiService.findListByAttr(seMap); bre.setData(explainActivity); } catch (RestServiceException e) { logger.error("HomeController articleDetail:{}", e); return this.resResult(e.getErrorCode(), e.getMessage()); } catch (Exception e) { logger.error("HomeController articleDetail:{}", e); return this.resResult(RestErrorCode.SYS_ERROR, e.getMessage()); } return bre; } /** * @Title: getMiningActivityPageList * @Description: TODO <点评挖矿列表接口> * @author linj <方法创建作者> * @create 下午7:39:39 * @param @param request * @param @param state 0-进行中(查询进行中,未开始,已挖完),1-已结束(查询终止,已结束) * @param @return <参数说明> * @return BaseResponseEntity * @throws * @update 下午7:39:39 * @updator <修改人 修改后更新修改时间,不同人修改再添加> * @updateContext <修改内容> */ @ResponseBody @RequestMapping(value="/getMiningActivityPageList") public BaseResponseEntity getMiningActivityPageList(HttpServletRequest request) { BaseResponseEntity bre = new BaseResponseEntity(); HashMap<String, Object> map = new HashMap<String, Object>(); try { miningActivityRmiService.manualActivity(); JSONObject policyJson = getParamJsonFromRequestPolicy(request); PaginationQuery query = new PaginationQuery(); Integer state = (Integer)policyJson.get("state"); if(null==state) { throw new RestServiceException(RestErrorCode.MISSING_ARGS); } if(state==0) { query.addQueryData("status1", 0); query.addQueryData("status2", 1); // query.addQueryData("status3", 4); } if(state==1) { query.addQueryData("status4", 2); } Integer curPage = (Integer)policyJson.get("pageIndex"); Integer pageSize = (Integer)policyJson.get("pageSize"); curPage=curPage==null||curPage<1?1:curPage; pageSize=pageSize==null||pageSize<1?15:pageSize; query.setPageIndex(curPage); query.setRowsPerPage(pageSize); PageResult<MiningActivity> data = miningActivityRmiService.findMiningActivityPage(query); if(state!=1) { if(data==null) { PaginationQuery queryc = new PaginationQuery(); queryc.addQueryData("status3", 4); queryc.setPageIndex(curPage); queryc.setRowsPerPage(pageSize); data = miningActivityRmiService.findMiningActivityPage(queryc); }else { List<MiningActivity> rows = data.getRows(); if(!rows.isEmpty()&&rows.size()<pageSize) { PaginationQuery queryc = new PaginationQuery(); queryc.addQueryData("status3", 4); queryc.setPageIndex(curPage); queryc.setRowsPerPage(pageSize); PageResult<MiningActivity> datac = miningActivityRmiService.findMiningActivityPage(queryc); if(null!=datac && datac.getRows().size()>0) { List<MiningActivity> rowsc = datac.getRows(); for (MiningActivity miningActivity : rowsc) { rows.add(miningActivity); } } } } } map.put("data", data); bre.setData(map); } catch (RestServiceException e) { logger.error("NewsFlashController getNewsFlashPageList:{}", e); return this.resResult(e.getErrorCode(), e.getMessage()); } catch (Exception e) { logger.error("NewsFlashController getNewsFlashPageList:{}", e); return this.resResult(RestErrorCode.SYS_ERROR,e.getMessage()); } return bre; } /** * @Title: getMiningActivityDetail * @Description: TODO <点评挖矿活动详情页面> * @author linj <方法创建作者> * @create 下午1:55:20 * @param @param request * @param @param id 活动id * @param @param token 用户登录的token * @param @return <参数说明> * @return BaseResponseEntity * @throws * @update 下午1:55:20 * @updator <修改人 修改后更新修改时间,不同人修改再添加> * @updateContext <修改内容> */ @ResponseBody @RequestMapping(value="/getMiningActivityDetail") public BaseResponseEntity getMiningActivityDetail(HttpServletRequest request) { BaseResponseEntity bre = new BaseResponseEntity(); HashMap<String, Object> map = new HashMap<String, Object>(); try { miningActivityRmiService.manualActivity(); JSONObject policyJson = getParamJsonFromRequestPolicy(request); PaginationQuery query = new PaginationQuery(); Integer id = (Integer)policyJson.get("id"); if(null==id) { throw new RestServiceException(RestErrorCode.MISSING_ARGS); } String token = (String) policyJson.get("token"); if(StringUtil.isBlank(token)) { throw new RestServiceException(RestErrorCode.MISSING_ARGS); } Integer userId = getUserIdByToken(token); query.addQueryData("id", id); MiningActivity mnAct = miningActivityRmiService.findById(id); if(null==mnAct) { throw new RestServiceException(RestErrorCode.NO_DATA_MSG); } MiningActivity mnActt = arrangeMiningActivity(mnAct, userId); map.put("data", mnActt); bre.setData(map); } catch (RestServiceException e) { logger.error("NewsFlashController getNewsFlashPageList:{}", e); return this.resResult(e.getErrorCode(), e.getMessage()); } catch (Exception e) { logger.error("NewsFlashController getNewsFlashPageList:{}", e); return this.resResult(RestErrorCode.SYS_ERROR,e.getMessage()); } return bre; } /** * @Title: arrangeMiningActivity * @Description: TODO <查看在规定时间内用户是否关注了,点评了,分享了项目> * @author linj <方法创建作者> * @create 下午1:52:54 * @param @param mnAct * @param @param userId * @param @return <参数说明> * @return MiningActivity * @throws * @update 下午1:52:54 * @updator <修改人 修改后更新修改时间,不同人修改再添加> * @updateContext <修改内容> */ public MiningActivity arrangeMiningActivity(MiningActivity mnAct,Integer userId) { String startTime = mnAct.getBeginDt(); String endTime = mnAct.getEndDt(); String activityStep = mnAct.getActivityStep(); String[] actp = activityStep.split(","); boolean stepOne = false; boolean stepTwo = false; boolean stepThree = false; if(actp.length==3) { if(StringUtil.isNotBlank(actp[0])) { stepOne = true; } if(StringUtil.isNotBlank(actp[1])) { stepTwo = true; } if(StringUtil.isNotBlank(actp[2])) { stepThree = true; } } //活动步骤:0-关注项目,1-点评项目,2-分享活动 if(actp.length==2) { String actp1 = actp[0]; String actp2 = actp[1]; if(actp1.equals("0")) { stepOne = true; } if(actp1.equals("1")) { stepTwo = true; } if(actp2.equals("1")) { stepTwo = true; } if(actp2.equals("2")) { stepThree = true; } } if(actp.length==1) { String actp1 = actp[0]; if(actp1.equals("0")) { stepOne = true; } if(actp1.equals("1")) { stepTwo = true; } if(actp1.equals("2")) { stepThree = true; } } //判断用户是否已经关注了该项目 Map<String, Object> seMap = new HashMap<String, Object>(); if(stepOne) { seMap.put("followType", 1); seMap.put("followUserId", userId); seMap.put("followedId", mnAct.getProjectId()); seMap.put("status", 1); List<Follow> flw = followRmiService.findListByAttr(seMap); if(flw.isEmpty()) { mnAct.setFollowType(UserOperation.UNOPERATION.getValue()); }else { mnAct.setFollowType(UserOperation.OPERATIONING.getValue()); } } //判断用户是否在活动时间内点评过该项目 if(stepTwo) { seMap.clear(); seMap.put("status", 1); seMap.put("projectId", mnAct.getProjectId()); seMap.put("createUserId", userId); seMap.put("startTime", startTime); seMap.put("endTime", endTime); List<Evaluation> eval = evaluationRmiService.findListByAttr(seMap); if(eval.isEmpty()) { mnAct.setCommentType(UserOperation.UNOPERATION.getValue()); }else { mnAct.setCommentType(UserOperation.OPERATIONING.getValue()); } } //判断在活动时间内用户是否分享过该项目 if(stepThree) { seMap.clear(); seMap.put("startTime", startTime); seMap.put("endTime", endTime); seMap.put("userId", userId); seMap.put("activityId", mnAct.getId()); List<PostShare> share = postShareRmiService.findListByAttr(seMap); if(share.isEmpty()) { mnAct.setShareType(UserOperation.UNOPERATION.getValue()); }else { mnAct.setShareType(UserOperation.OPERATIONING.getValue()); } } //判断在活动时间内用户是否领取过该项目的奖励 seMap.clear(); seMap.put("activityId", mnAct.getId()); seMap.put("userId", userId); List<RewardDetail> reDet = rewardDetailRmiService.findListByAttr(seMap); if(reDet.isEmpty()) { mnAct.setReceiveType(UserOperation.UNOPERATION.getValue()); }else { mnAct.setReceiveType(UserOperation.OPERATIONING.getValue()); } return mnAct; } }
[ "664678659@qq.com" ]
664678659@qq.com
3c027b4ad39236dcf63b06cb15613de444e6340d
50fb9c74b2071f21972c6b008e9a3b575ac5539f
/master/technofutur-formation/Java (advanced)/Java OO/OOPExerciceGenericity/src/be/technofutur/oopgenerecity/Iterator.java
ac7f9b967759c715028d0d2eb0105dce1a992305
[]
no_license
MonkeyTime/technofutur-formation
ffc3c8fdaaad775890a6711e9b2f11ba55071e3b
09cffdcc13f70ee21634285819c0e7d67bf79200
refs/heads/master
2021-01-01T15:55:44.392100
2015-02-10T16:10:03
2015-02-10T16:10:03
22,337,449
0
0
null
null
null
null
UTF-8
Java
false
false
104
java
package be.technofutur.oopgenerecity; public interface Iterator<T> { T next(); boolean hasNext(); }
[ "gitmonkeytime@gmail.com" ]
gitmonkeytime@gmail.com
463324b5ab3d427f59732094289096185dbf29ac
f1efefbe7d28f12af5f58f8e480d41c9d12970fb
/src/main/java/com/nsi/invisee/otp/util/DateTimeUtil.java
956ceadc1b7fc4ee90b1c4bedd68480bba9bad84
[]
no_license
hpalino/otp_client
682b7be02a689c015353cf6b34ef3d92c67aae19
59dbea0bf1924286a2ddf64ed5a4f9661bde8c72
refs/heads/master
2020-03-19T20:01:30.684413
2018-06-11T06:42:39
2018-06-11T06:42:39
136,884,737
0
0
null
null
null
null
UTF-8
Java
false
false
10,471
java
package com.nsi.invisee.otp.util; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.Locale; public class DateTimeUtil { public static String DDMMYYYY = "ddMMyyyy"; public static String YYYYMMDDHHMMSS = "yyyyMMddHHmmss"; public static String YYYYMMDDHHMMSSSSS = "yyyyMMddHHmmssSSS"; public static String YYMMDDHHMMSS = "yyMMddHHmmss"; public static String DD_MMM_YYYY = "dd MMM yyyy"; public static String DD_MMM_YY = "dd MMM yy"; public static String DDMMMYY = "ddMMMyy"; public static String YYYYMMDD = "yyyyMMdd"; public static String YYMMDD = "yyMMdd"; public static String DDMMYY = "ddMMyy"; public static String HHMMSS = "HHmmss"; public static String REPORTDATE = "dd/MM/yyyy HH:mm:ss"; public static String REPORTDATE2 = "yyyy-MM-dd HH:mm:ss"; public static String WEBDATE = "MM/dd/yyyy"; public static String WEBDATEKAI = "dd/MM/yyyy"; public static final Date convertStringToDateCustomized(String date, String pattern) { DateFormat df = new SimpleDateFormat(pattern); Date result = null; if(date != null) { try { result = df.parse(date); } catch (ParseException e) { result = null; //e.printStackTrace(); } return result; } else { return null; } } public static final String convertDateToStringCustomized(Date date, String pattern) { try { if(date != null) { String dateEng = new SimpleDateFormat(pattern).format(date).toUpperCase(); dateEng = dateEng.replaceAll("JAN", "JANUARI"); dateEng = dateEng.replaceAll("FEB", "FEBRUARI"); dateEng = dateEng.replaceAll("APR", "APRIL"); dateEng = dateEng.replaceAll("MAY", "MEI"); dateEng = dateEng.replaceAll("JUN", "JUNI"); dateEng = dateEng.replaceAll("JUL", "JULI"); dateEng = dateEng.replaceAll("SEP", "SEPTEMBER"); dateEng = dateEng.replaceAll("NOV", "NOVEMBER"); dateEng = dateEng.replaceAll("AUG", "AGUSTUS"); dateEng = dateEng.replaceAll("OCT", "OKTOBER"); dateEng = dateEng.replaceAll("DEC", "DESEMBER"); return dateEng; } else { return null; } } catch (Exception e) { return ""; } } public static final String convertDateToStringCustomized(Date date, String pattern, int amount) { try { date = getCustomDate(date, amount); return convertDateToStringCustomized(date, pattern); } catch (Exception e) { return ""; } } public static final Date maxDateWeb(String date) { return maxDateWeb(date, 0); } public static final Date maxDateWeb(Date date) { String dateStr = convertDateToStringCustomized(date, WEBDATE); return convertStringToDateCustomized(dateStr+" 235959", WEBDATE+" HHmmss"); } public static final Date maxDateWeb(String date, int day) { Date datz = convertStringToDateCustomized(date+" 235959", WEBDATE+" HHmmss"); if(day != 0) { return getCustomDate(datz, day); } else return datz; } public static final Date minDateWeb(String date) { return minDateWeb(date, 0); } public static final Date minDateWeb(String date, int day) { Date datz = convertStringToDateCustomized(date+" 000000", WEBDATE+" HHmmss"); if(day != 0) { return getCustomDate(datz, day); } else return datz; } public static final Date minDateWeb(Date date) { String dateStr = convertDateToStringCustomized(date, WEBDATE); return convertStringToDateCustomized(dateStr+" 000000", WEBDATE+" HHmmss"); } public static final String convertStringToStringFormaterCustomized(String date, String patternFrom, String patternTo) { try { Date date2 = convertStringToDateCustomized(date, patternFrom); return convertDateToStringCustomized(date2, patternTo); } catch (Exception e) { return ""; } } public static final String convertIndoDate(Date date) { String dayOfWeek = new SimpleDateFormat("EEEE", Locale.ENGLISH).format(date); if(dayOfWeek.equals("Monday")) dayOfWeek = "Senin"; else if(dayOfWeek.equals("Tuesday")) dayOfWeek = "Selasa"; else if(dayOfWeek.equals("Wednesday")) dayOfWeek = "Rabu"; else if(dayOfWeek.equals("Thursday")) dayOfWeek = "Kamis"; else if(dayOfWeek.equals("Friday")) dayOfWeek = "Jum'at"; else if(dayOfWeek.equals("Saturday")) dayOfWeek = "Sabtu"; else if(dayOfWeek.equals("Sunday")) dayOfWeek = "Minggu"; String dat = convertDateToStringCustomized(date, "ddMMyyyy"); if(dat.substring(2,4).equals("01")) dat = dat.substring(0,2) +" Januari " + dat.substring(4); else if(dat.substring(2,4).equals("02")) dat = dat.substring(0,2) +" Februari " + dat.substring(4); else if(dat.substring(2,4).equals("03")) dat = dat.substring(0,2) +" Maret " + dat.substring(4); else if(dat.substring(2,4).equals("04")) dat = dat.substring(0,2) +" April " + dat.substring(4); else if(dat.substring(2,4).equals("05")) dat = dat.substring(0,2) +" Mei " + dat.substring(4); else if(dat.substring(2,4).equals("06")) dat = dat.substring(0,2) +" Juni " + dat.substring(4); else if(dat.substring(2,4).equals("07")) dat = dat.substring(0,2) +" Juli " + dat.substring(4); else if(dat.substring(2,4).equals("08")) dat = dat.substring(0,2) +" Agustus " + dat.substring(4); else if(dat.substring(2,4).equals("09")) dat = dat.substring(0,2) +" September " + dat.substring(4); else if(dat.substring(2,4).equals("10")) dat = dat.substring(0,2) +" Oktober " + dat.substring(4); else if(dat.substring(2,4).equals("11")) dat = dat.substring(0,2) +" November " + dat.substring(4); else if(dat.substring(2,4).equals("12")) dat = dat.substring(0,2) +" Desember " + dat.substring(4); return dayOfWeek + ", " + dat; } public static final String convertMonth(String value) { try { String tahun = "201" + value.substring(0,1); String bulan = value.substring(1); if(bulan.equals("01")) return "Januari " + tahun; if(bulan.equals("02")) return "Januari " + tahun; if(bulan.equals("03")) return "Januari " + tahun; if(bulan.equals("04")) return "Januari " + tahun; if(bulan.equals("05")) return "Januari " + tahun; if(bulan.equals("06")) return "Januari " + tahun; if(bulan.equals("07")) return "Januari " + tahun; if(bulan.equals("08")) return "Januari " + tahun; if(bulan.equals("09")) return "Januari " + tahun; if(bulan.equals("10")) return "Januari " + tahun; if(bulan.equals("11")) return "Januari " + tahun; if(bulan.equals("12")) return "Januari " + tahun; else return ""; } catch (Exception e) { return ""; } } public static Date getCustomDate(Date date, int amount) { Calendar calendar = Calendar.getInstance(); if (date != null) calendar.setTime(date); calendar.add(Calendar.DATE, amount); return calendar.getTime(); } public static Date getCustomYears(Date date, int amount) { Calendar calendar = Calendar.getInstance(); if (date != null) calendar.setTime(date); calendar.add(Calendar.YEAR, amount); return calendar.getTime(); } public static Date getCustomSecond(Date date, int amount) { Calendar calendar = Calendar.getInstance(); if (date != null) calendar.setTime(date); calendar.add(Calendar.SECOND, amount); return calendar.getTime(); } public static Date getMaxDateInMonth(Date date) { Calendar calendar = Calendar.getInstance(); if (date != null) calendar.setTime(date); int maxDay = calendar.getActualMaximum(Calendar.DAY_OF_MONTH); calendar.set(Calendar.DATE, maxDay); return calendar.getTime(); } public static Date getMinDateInMonth(Date date) { Calendar calendar = Calendar.getInstance(); if (date != null) calendar.setTime(date); calendar.set(Calendar.DATE, 1); return calendar.getTime(); } public static Date getPrevMonth(Date date) { Calendar calendar = Calendar.getInstance(); if (date != null) calendar.setTime(date); calendar.add(Calendar.MONTH, -1); return calendar.getTime(); } public static Date getNextMonth(Date date) { Calendar calendar = Calendar.getInstance(); if (date != null) calendar.setTime(date); calendar.add(Calendar.MONTH, 1); return calendar.getTime(); } public static Date getCostumMinuteDate(Date date, int amount) { Calendar calendar = Calendar.getInstance(); if (date != null) calendar.setTime(date); calendar.add(Calendar.MINUTE, amount); return calendar.getTime(); } public static Date getCostumHoursDate(Date date, int amount) { Calendar calendar = Calendar.getInstance(); if (date != null) calendar.setTime(date); calendar.add(Calendar.HOUR, amount); return calendar.getTime(); } public static Date getCostumSecondDate(Date date, int amount) { Calendar calendar = Calendar.getInstance(); if (date != null) calendar.setTime(date); calendar.add(Calendar.SECOND, amount); return calendar.getTime(); } public static Date getCostumHourDate(Date date, int amount) { Calendar calendar = Calendar.getInstance(); if (date != null) calendar.setTime(date); calendar.add(Calendar.HOUR, amount); return calendar.getTime(); } public static String hasilWaktu(Date waktubesar, Date waktukecil) { long second = selisihWaktu(waktubesar, waktukecil); long jam = second / 3600; long menit = (second % 3600) / 60; long detik = (second % 3600) % 60; return jam+" jam, "+menit+" menit, "+detik+" detik"; } public static Long[] secondToDate(long second) { long jam = second / 3600; long menit = (second % 3600) / 60; long detik = (second % 3600) % 60; return new Long[]{jam, menit, detik}; } public static long selisihWaktu(Date waktubesar, Date waktukecil) { Calendar dablek = Calendar.getInstance(); dablek.setTime(waktubesar); Long i1 = dablek.getTimeInMillis(); Calendar dablek2 = Calendar.getInstance(); dablek2.setTime(waktukecil); Long i2 = dablek2.getTimeInMillis(); long result = (int) ((i1-i2)/1000); return result; } }
[ "hpalino@gmail.com" ]
hpalino@gmail.com
6718b589eeeac7ae227adfcdd79d7c10b02e76f5
4f97e774200f0e55063e3d7d9307317bc83f5dad
/Tiralabra_maven/src/test/java/com/mycompany/tiralabra_maven/logiikka/algoritmi/GreedyBestFirstAlgoritmiTest.java
71545a839dfd3240e59de441eeab26a63c48883a
[]
no_license
kumikumi/TiraLabra
82ca754745a90ab97d2576ed55da396576e47994
8de19da509d632d4c3302beefe0d4192ffd37e2c
refs/heads/master
2021-01-17T21:57:59.802584
2014-09-07T20:22:31
2014-09-07T20:22:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
910
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.mycompany.tiralabra_maven.logiikka.algoritmi; import com.mycompany.tiralabra_maven.AlgoritmiTyyppi; import org.junit.*; /** * * @author mikko */ public class GreedyBestFirstAlgoritmiTest { private AlgoritmiTest testi; @Before public void setUp() { testi = new AlgoritmiTest(AlgoritmiTyyppi.GREEDY_BEST_FIRST); } @Test public void algoritmiLoytaaSuoranReitinPerille() { testi.algoritmiLoytaaSuoranReitinPerille(); } @Test public void algoritmiLoytaaReitinPerilleNopeasti() { testi.algoritmiLoytaaReitinPerilleNopeasti(90, 500); } @Test public void algoritmiOsaaKiertaaSeinan() { testi.algoritmiOsaaKiertaaSeinan(); } }
[ "mikko.kumara@gmail.com" ]
mikko.kumara@gmail.com
b17061e38a0fe77138b88e099691cad2c1af3a59
0022c0a8e7913e1f4dd531e89d83d5a8707f023d
/src/main/java/jblog/service/UserService.java
ed79488973c80808a34ee8445b03a5dab83263d8
[]
no_license
Brilliant-Kwon/Spring_MVC_jblog_intellij
d7fc3ad7c4ab952a1974f3ae5ec41e5e0d7c561e
69ab6e64a4f32ed18bade2c2cf5e519801c3ffa2
refs/heads/master
2020-04-29T01:01:54.637197
2019-03-20T07:23:56
2019-03-20T07:23:56
175,716,646
0
0
null
null
null
null
UTF-8
Java
false
false
255
java
package jblog.service; import jblog.vo.UserVo; public interface UserService { public boolean join(UserVo vo);//회원 가입 public UserVo getUser(String id);//중복 검사 public UserVo getUser(String id, String password);//로그인 }
[ "k1212keun@skuniv.ac.kr" ]
k1212keun@skuniv.ac.kr
6d76db2167b3bc0e978616101a6416c57c11e417
d4dee91a2f18192dbc08fd895f2689c4a1690941
/src/main/java/com/clevertap/apns/ApnsClient.java
0daa01edfab2be07d18573a486a33cba6d8a2497
[ "BSD-3-Clause" ]
permissive
CleverTap/apns-http2
9a623c19750d5dbe040ac8d7206cbe565761f88b
dd69b83b3c087c884f00bb98cff310db5176d819
refs/heads/master
2023-08-04T07:22:10.537987
2023-07-24T13:04:41
2023-07-24T13:04:41
49,942,319
236
127
BSD-3-Clause
2023-07-24T13:04:43
2016-01-19T09:41:35
Java
UTF-8
Java
false
false
2,895
java
/* * Copyright (c) 2016, CleverTap * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * - Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * - Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * - Neither the name of CleverTap nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package com.clevertap.apns; import okhttp3.OkHttpClient; /** * Interface for general purpose APNS clients. */ public interface ApnsClient { /** * Checks whether the client supports synchronous operations. * <p> * This is specified when building the client using * * @return Whether the client supports synchronous operations */ boolean isSynchronous(); /** * Sends a notification asynchronously to the Apple Push Notification Service. * * @param notification The notification built using * {@link Notification.Builder} * @param listener The listener to be called after the request is complete */ void push(Notification notification, NotificationResponseListener listener); /** * Sends a notification synchronously to the Apple Push Notification Service. * * @param notification The notification built using * {@link Notification.Builder} * @return The notification response */ NotificationResponse push(Notification notification); /** * Returns the underlying OkHttpClient instance. * This can be used for further customizations such as using proxies. * * @return The underlying OkHttpClient instance */ OkHttpClient getHttpClient(); }
[ "judebpereira@gmail.com" ]
judebpereira@gmail.com
d9d8d7d95a77ddeb3e86a65e35e662528c99bc9f
b18db33809161b3083ad1fe3f4dfcd7b1cc37314
/src/ru/progwards/java1/lessons/io1/CharFilter.java
ad1095632867eb4f7c868bd8a8ff55749a0bd56b
[]
no_license
liskotlas/java1
f74ec373695a92ff6b00967f9d6f2c129ff256a5
50bdfb7ecc41d32fd1928dd68a2a063eb6cc64e2
refs/heads/master
2020-09-09T19:30:24.697019
2020-05-20T14:24:44
2020-05-20T14:24:44
221,543,272
1
0
null
null
null
null
UTF-8
Java
false
false
1,979
java
package ru.progwards.java1.lessons.io1; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.util.Arrays; import java.util.Scanner; public class CharFilter { public static void filterFile(String inFileName, String outFileName, String filter) throws IOException { char [] b = filter.toCharArray(); String string = ""; try { FileReader reader = new FileReader(inFileName); try { Scanner scanner = new Scanner(reader); while (scanner.hasNextLine()){ char [] a = scanner.nextLine().toCharArray(); for (int i = 0; i < a.length; i++) { for (int f = 0; f < b.length; f++) { if (a[i] == b[f]) { char[] c = new char[a.length - 1]; System.arraycopy(a, 0, c, 0, i); System.arraycopy(a, i + 1, c, i, a.length - i - 1); a = Arrays.copyOf(c, c.length); --i; } } } for (int i = 0; i < a.length; i++){ string += a [i]; } } } finally { reader.close(); } } catch (IOException e){ throw e; } try { FileWriter writer = new FileWriter(outFileName); try{ writer.write(string); } finally { writer.close(); } } catch (IOException e){ throw e; } } public static void main(String[] args) { try { filterFile("in", "E:\\Java\\Education\\src\\ru\\progwards\\java1\\lessons\\io1\\out", "! ,"); } catch (IOException e){ System.out.println(e.getMessage()); } } }
[ "lis_kotlas@mail.ru" ]
lis_kotlas@mail.ru
d87fdc7a409b47b699a7e89b59d53a01cd6242d7
32164d02d18b583ff92aea26d68b428a7d49bb9f
/monitor/src/main/java/com/cqx/monitor/security/SecuritySecureConfig.java
2dada7da6644a21f88af19f63f3f7f2a463fa0d6
[]
no_license
chenqixiang321/spring-boot-cloud-master
549f4bfff2833c26d0a929b6c8af2845a68e8d85
50966a94b53133a24ad8efa3a6c4c459a1e24113
refs/heads/master
2022-12-01T16:42:41.960432
2020-08-05T02:35:16
2020-08-05T02:35:16
285,152,219
0
0
null
null
null
null
UTF-8
Java
false
false
2,365
java
package com.cqx.monitor.security; import de.codecentric.boot.admin.server.config.AdminServerProperties; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler; import org.springframework.security.web.csrf.CookieCsrfTokenRepository; @Configuration public class SecuritySecureConfig extends WebSecurityConfigurerAdapter { private final String adminContextPath; public SecuritySecureConfig(AdminServerProperties adminServerProperties) { this.adminContextPath = adminServerProperties.getContextPath(); } @Override protected void configure(HttpSecurity http) throws Exception { // @formatter:off SavedRequestAwareAuthenticationSuccessHandler successHandler = new SavedRequestAwareAuthenticationSuccessHandler(); successHandler.setTargetUrlParameter("redirectTo"); successHandler.setDefaultTargetUrl(adminContextPath + "/"); http.authorizeRequests() //授予对所有静态资产和登录页面的公共访问权限。 .antMatchers(adminContextPath + "/assets/**").permitAll() .antMatchers(adminContextPath + "/login.html").permitAll() //必须对每个其他请求进行身份验证 .anyRequest().authenticated() .and() // 配置登录和注销。 .formLogin().loginPage(adminContextPath + "/login.html").successHandler(successHandler).and() .logout().logoutUrl(adminContextPath + "/logout").and() //启用HTTP-Basic支持。这是Spring Boot Admin Client注册所必需的 .httpBasic().and() .csrf() //使用Cookie启用CSRF保护 .csrfTokenRepository(CookieCsrfTokenRepository.withHttpOnlyFalse()) .ignoringAntMatchers( adminContextPath + "/instances", //禁用CRSF-Protection Spring Boot Admin Client用于注册的端点。 adminContextPath + "/actuator/**" // ); // @formatter:on } }
[ "" ]
13e8e62f41d282fb4cf33e997a9a0f5699c86dfa
16459f47485df73404e77f52e2b27f9e68cb1f09
/app/src/main/java/tg/geek228/supfile/Utils/FileUtils.java
0356463bdc334703505a4a3e73d84d9ef554804e
[]
no_license
iFaroukGN/supfile_mobile
97074dd3d461c82fa0c09c96bd373352d6456a8b
77010744814e738b36fd89aea743587030854243
refs/heads/master
2021-04-15T14:57:55.222783
2018-06-10T09:16:14
2018-06-10T09:16:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
17,382
java
package tg.geek228.supfile.Utils; /* * Copyright (C) 2007-2008 OpenIntents.org * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import android.content.ContentResolver; import android.content.ContentUris; import android.content.Context; import android.content.Intent; import android.database.Cursor; import android.database.DatabaseUtils; import android.graphics.Bitmap; import android.net.Uri; import android.os.Build; import android.os.Environment; import android.provider.DocumentsContract; import android.provider.MediaStore; import android.util.Log; import android.webkit.MimeTypeMap; import java.io.File; import java.io.FileFilter; import java.text.DecimalFormat; import java.util.Comparator; /** * @version 2009-07-03 * @author Peli * @version 2013-12-11 * @author paulburke (ipaulpro) */ public class FileUtils { private FileUtils() {} //private constructor to enforce Singleton pattern /** TAG for log messages. */ static final String TAG = "FileUtils"; private static final boolean DEBUG = false; // Set to true to enable logging public static final String MIME_TYPE_AUDIO = "audio/*"; public static final String MIME_TYPE_TEXT = "text/*"; public static final String MIME_TYPE_IMAGE = "image/*"; public static final String MIME_TYPE_VIDEO = "video/*"; public static final String MIME_TYPE_APP = "application/*"; public static final String HIDDEN_PREFIX = "."; /** * Gets the extension of a file name, like ".png" or ".jpg". * * @param uri * @return Extension including the dot("."); "" if there is no extension; * null if uri was null. */ public static String getExtension(String uri) { if (uri == null) { return null; } int dot = uri.lastIndexOf("."); if (dot >= 0) { return uri.substring(dot); } else { // No extension. return ""; } } /** * @return Whether the URI is a local one. */ public static boolean isLocal(String url) { if (url != null && !url.startsWith("http://") && !url.startsWith("https://")) { return true; } return false; } /** * @return True if Uri is a MediaStore Uri. * @author paulburke */ public static boolean isMediaUri(Uri uri) { return "media".equalsIgnoreCase(uri.getAuthority()); } /** * Convert File into Uri. * * @param file * @return uri */ public static Uri getUri(File file) { if (file != null) { return Uri.fromFile(file); } return null; } /** * Returns the path only (without file name). * * @param file * @return */ public static File getPathWithoutFilename(File file) { if (file != null) { if (file.isDirectory()) { // no file to be split off. Return everything return file; } else { String filename = file.getName(); String filepath = file.getAbsolutePath(); // Construct path without file name. String pathwithoutname = filepath.substring(0, filepath.length() - filename.length()); if (pathwithoutname.endsWith("/")) { pathwithoutname = pathwithoutname.substring(0, pathwithoutname.length() - 1); } return new File(pathwithoutname); } } return null; } /** * @return The MIME type for the given file. */ public static String getMimeType(File file) { String extension = getExtension(file.getName()); if (extension.length() > 0) return MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension.substring(1)); return "application/octet-stream"; } /** * @return The MIME type for the give Uri. */ public static String getMimeType(Context context, Uri uri) { File file = new File(getPath(context, uri)); return getMimeType(file); } /** * @param uri The Uri to check. * @return Whether the Uri authority is {@link LocalStorageProvider}. * @author paulburke */ public static boolean isLocalStorageDocument(Uri uri) { //return LocalStorageProvider.AUTHORITY.equals(uri.getAuthority()); return false; } /** * @param uri The Uri to check. * @return Whether the Uri authority is ExternalStorageProvider. * @author paulburke */ public static boolean isExternalStorageDocument(Uri uri) { return "com.android.externalstorage.documents".equals(uri.getAuthority()); } /** * @param uri The Uri to check. * @return Whether the Uri authority is DownloadsProvider. * @author paulburke */ public static boolean isDownloadsDocument(Uri uri) { return "com.android.providers.downloads.documents".equals(uri.getAuthority()); } /** * @param uri The Uri to check. * @return Whether the Uri authority is MediaProvider. * @author paulburke */ public static boolean isMediaDocument(Uri uri) { return "com.android.providers.media.documents".equals(uri.getAuthority()); } /** * @param uri The Uri to check. * @return Whether the Uri authority is Google Photos. */ public static boolean isGooglePhotosUri(Uri uri) { return "com.google.android.apps.photos.content".equals(uri.getAuthority()); } /** * Get the value of the data column for this Uri. This is useful for * MediaStore Uris, and other file-based ContentProviders. * * @param context The context. * @param uri The Uri to query. * @param selection (Optional) Filter used in the query. * @param selectionArgs (Optional) Selection arguments used in the query. * @return The value of the _data column, which is typically a file path. * @author paulburke */ public static String getDataColumn(Context context, Uri uri, String selection, String[] selectionArgs) { Cursor cursor = null; final String column = "_data"; final String[] projection = { column }; try { cursor = context.getContentResolver().query(uri, projection, selection, selectionArgs, null); if (cursor != null && cursor.moveToFirst()) { if (DEBUG) DatabaseUtils.dumpCursor(cursor); final int column_index = cursor.getColumnIndexOrThrow(column); return cursor.getString(column_index); } } finally { if (cursor != null) cursor.close(); } return null; } /** * Get a file path from a Uri. This will get the the path for Storage Access * Framework Documents, as well as the _data field for the MediaStore and * other file-based ContentProviders.<br> * <br> * Callers should check whether the path is local before assuming it * represents a local file. * * @param context The context. * @param uri The Uri to query. * @see #isLocal(String) * @see #getFile(Context, Uri) * @author paulburke */ public static String getPath(final Context context, final Uri uri) { if (DEBUG) Log.d(TAG + " File -", "Authority: " + uri.getAuthority() + ", Fragment: " + uri.getFragment() + ", Port: " + uri.getPort() + ", Query: " + uri.getQuery() + ", Scheme: " + uri.getScheme() + ", Host: " + uri.getHost() + ", Segments: " + uri.getPathSegments().toString() ); final boolean isKitKat = Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT; // DocumentProvider if (isKitKat && DocumentsContract.isDocumentUri(context, uri)) { // LocalStorageProvider if (isLocalStorageDocument(uri)) { // The path is the id return DocumentsContract.getDocumentId(uri); } // ExternalStorageProvider else if (isExternalStorageDocument(uri)) { final String docId = DocumentsContract.getDocumentId(uri); final String[] split = docId.split(":"); final String type = split[0]; if ("primary".equalsIgnoreCase(type)) { return Environment.getExternalStorageDirectory() + "/" + split[1]; } // TODO handle non-primary volumes } // DownloadsProvider else if (isDownloadsDocument(uri)) { final String id = DocumentsContract.getDocumentId(uri); final Uri contentUri = ContentUris.withAppendedId( Uri.parse("content://downloads/public_downloads"), Long.valueOf(id)); return getDataColumn(context, contentUri, null, null); } // MediaProvider else if (isMediaDocument(uri)) { final String docId = DocumentsContract.getDocumentId(uri); final String[] split = docId.split(":"); final String type = split[0]; Uri contentUri = null; if ("image".equals(type)) { contentUri = MediaStore.Images.Media.EXTERNAL_CONTENT_URI; } else if ("video".equals(type)) { contentUri = MediaStore.Video.Media.EXTERNAL_CONTENT_URI; } else if ("audio".equals(type)) { contentUri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI; } final String selection = "_id=?"; final String[] selectionArgs = new String[] { split[1] }; return getDataColumn(context, contentUri, selection, selectionArgs); } } // MediaStore (and general) else if ("content".equalsIgnoreCase(uri.getScheme())) { // Return the remote address if (isGooglePhotosUri(uri)) return uri.getLastPathSegment(); return getDataColumn(context, uri, null, null); } // File else if ("file".equalsIgnoreCase(uri.getScheme())) { return uri.getPath(); } return null; } /** * Convert Uri into File, if possible. * * @return file A local file that the Uri was pointing to, or null if the * Uri is unsupported or pointed to a remote resource. * @see #getPath(Context, Uri) * @author paulburke */ public static File getFile(Context context, Uri uri) { if (uri != null) { String path = getPath(context, uri); if (path != null && isLocal(path)) { return new File(path); } } return null; } /** * Get the file size in a human-readable string. * * @param size * @return * @author paulburke */ public static String getReadableFileSize(int size) { final int BYTES_IN_KILOBYTES = 1024; final DecimalFormat dec = new DecimalFormat("###.#"); final String KILOBYTES = " KB"; final String MEGABYTES = " MB"; final String GIGABYTES = " GB"; float fileSize = 0; String suffix = KILOBYTES; if (size > BYTES_IN_KILOBYTES) { fileSize = size / BYTES_IN_KILOBYTES; if (fileSize > BYTES_IN_KILOBYTES) { fileSize = fileSize / BYTES_IN_KILOBYTES; if (fileSize > BYTES_IN_KILOBYTES) { fileSize = fileSize / BYTES_IN_KILOBYTES; suffix = GIGABYTES; } else { suffix = MEGABYTES; } } } return String.valueOf(dec.format(fileSize) + suffix); } /** * Attempt to retrieve the thumbnail of given File from the MediaStore. This * should not be called on the UI thread. * * @param context * @param file * @return * @author paulburke */ public static Bitmap getThumbnail(Context context, File file) { return getThumbnail(context, getUri(file), getMimeType(file)); } /** * Attempt to retrieve the thumbnail of given Uri from the MediaStore. This * should not be called on the UI thread. * * @param context * @param uri * @return * @author paulburke */ public static Bitmap getThumbnail(Context context, Uri uri) { return getThumbnail(context, uri, getMimeType(context, uri)); } /** * Attempt to retrieve the thumbnail of given Uri from the MediaStore. This * should not be called on the UI thread. * * @param context * @param uri * @param mimeType * @return * @author paulburke */ public static Bitmap getThumbnail(Context context, Uri uri, String mimeType) { if (DEBUG) Log.d(TAG, "Attempting to get thumbnail"); if (!isMediaUri(uri)) { Log.e(TAG, "You can only retrieve thumbnails for images and videos."); return null; } Bitmap bm = null; if (uri != null) { final ContentResolver resolver = context.getContentResolver(); Cursor cursor = null; try { cursor = resolver.query(uri, null, null, null, null); if (cursor.moveToFirst()) { final int id = cursor.getInt(0); if (DEBUG) Log.d(TAG, "Got thumb ID: " + id); if (mimeType.contains("video")) { bm = MediaStore.Video.Thumbnails.getThumbnail( resolver, id, MediaStore.Video.Thumbnails.MINI_KIND, null); } else if (mimeType.contains(FileUtils.MIME_TYPE_IMAGE)) { bm = MediaStore.Images.Thumbnails.getThumbnail( resolver, id, MediaStore.Images.Thumbnails.MINI_KIND, null); } } } catch (Exception e) { if (DEBUG) Log.e(TAG, "getThumbnail", e); } finally { if (cursor != null) cursor.close(); } } return bm; } /** * File and folder comparator. TODO Expose sorting option method * * @author paulburke */ public static Comparator<File> sComparator = new Comparator<File>() { @Override public int compare(File f1, File f2) { // Sort alphabetically by lower case, which is much cleaner return f1.getName().toLowerCase().compareTo( f2.getName().toLowerCase()); } }; /** * File (not directories) filter. * * @author paulburke */ public static FileFilter sFileFilter = new FileFilter() { @Override public boolean accept(File file) { final String fileName = file.getName(); // Return files only (not directories) and skip hidden files return file.isFile() && !fileName.startsWith(HIDDEN_PREFIX); } }; /** * Folder (directories) filter. * * @author paulburke */ public static FileFilter sDirFilter = new FileFilter() { @Override public boolean accept(File file) { final String fileName = file.getName(); // Return directories only and skip hidden directories return file.isDirectory() && !fileName.startsWith(HIDDEN_PREFIX); } }; /** * Get the Intent for selecting content to be used in an Intent Chooser. * * @return The intent for opening a file with Intent.createChooser() * @author paulburke */ public static Intent createGetContentIntent() { // Implicitly allow the user to select a particular kind of data final Intent intent = new Intent(Intent.ACTION_GET_CONTENT); // The MIME data type filter intent.setType("*/*"); // Only return URIs that can be opened with ContentResolver intent.addCategory(Intent.CATEGORY_OPENABLE); return intent; } }
[ "farouk@appsolute.fr" ]
farouk@appsolute.fr
cc8ecc712de2c8f8430d5df0f3e722226e311fd7
93f136e88c4d15df7273c30c3d1e2dd5aaec24eb
/baselibrary/src/main/java/com/hjq/baselibrary/listener/OnItemLongClickListener.java
a42d63403ce14d7424e830b4699d6ec27b13fa50
[ "Apache-2.0" ]
permissive
1107220736/AndroidProject-master
bd618dc6b3affef8a6e9e25f7868deeed61fde94
58f1b0b8f91112144ec922c5d93b1b8c580327f3
refs/heads/master
2020-04-24T14:32:50.399206
2019-02-22T08:19:01
2019-02-22T08:19:01
172,024,167
0
0
null
null
null
null
UTF-8
Java
false
false
562
java
package com.hjq.baselibrary.listener; import android.view.View; /** * author : HJQ * github : https://github.com/getActivity/AndroidProject * time : 2018/10/18 * desc : RecyclerView条目长按监听类 */ public interface OnItemLongClickListener { /** * 当RecyclerView某个条目被长按时回调 * * @param itemView 被点击的条目对象 * @param position 被点击的条目位置 * @return 是否拦截事件 */ boolean onItemLongClick(View itemView, int position); }
[ "1107220736@qq.com" ]
1107220736@qq.com
186922fec3d21ffa0df420e9e77bd7edbb95310e
7374cc4466967f693b43cdf2ef82227ace26452a
/src/com/jeecms/cms/web/FrontUtils.java
a905ee887f670b72c3fd9dfd75985831ba558ccc
[]
no_license
biizheng/jeecms5
f8c17bde74caf03d153c989777a59f9ea441e48c
d637c08f07aa96bb11e16512492c3a2b31d9cd06
refs/heads/master
2023-03-20T03:14:59.975804
2015-10-31T23:35:26
2015-10-31T23:35:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
13,743
java
package com.jeecms.cms.web; import static com.jeecms.cms.Constants.RES_PATH; import static com.jeecms.cms.Constants.TPLDIR_COMMON; import static com.jeecms.cms.Constants.TPLDIR_STYLE_LIST; import static com.jeecms.cms.Constants.TPLDIR_TAG; import static com.jeecms.cms.Constants.TPL_STYLE_PAGE_CHANNEL; import static com.jeecms.cms.Constants.TPL_SUFFIX; import static com.jeecms.common.web.Constants.MESSAGE; import static com.jeecms.common.web.Constants.UTF8; import static com.jeecms.common.web.ProcessTimeFilter.START_TIME; import static com.jeecms.common.web.freemarker.DirectiveUtils.PARAM_TPL_SUB; import static com.jeecms.core.action.front.LoginAct.PROCESS_URL; import java.io.IOException; import java.util.Locale; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang.StringUtils; import org.springframework.beans.propertyeditors.LocaleEditor; import org.springframework.context.MessageSource; import com.jeecms.cms.entity.main.CmsSite; import com.jeecms.cms.entity.main.CmsUser; import com.jeecms.common.web.RequestUtils; import com.jeecms.common.web.freemarker.DirectiveUtils; import com.jeecms.common.web.springmvc.MessageResolver; import com.jeecms.core.web.front.URLHelper; import com.jeecms.core.web.front.URLHelper.PageInfo; import freemarker.core.Environment; import freemarker.template.AdapterTemplateModel; import freemarker.template.TemplateException; import freemarker.template.TemplateModel; import freemarker.template.TemplateModelException; import freemarker.template.TemplateNumberModel; /** * 前台工具类 */ public class FrontUtils { /** * 页面没有找到 */ public static final String PAGE_NOT_FOUND = "pageNotFound"; /** * 操作成功页面 */ public static final String SUCCESS_PAGE = "successPage"; /** * 操作失败页面 */ public static final String ERROR_PAGE = "errorPage"; /** * 信息提示页面 */ public static final String MESSAGE_PAGE = "messagePage"; /** * 系统资源路径 */ public static final String RES_SYS = "resSys"; /** * 模板资源路径 */ public static final String RES_TPL = "res"; /** * 模板资源表达式 */ public static final String RES_EXP = "${res}"; /** * 部署路径 */ public static final String BASE = "base"; /** * 站点 */ public static final String SITE = "site"; /** * 用户 */ public static final String USER = "user"; /** * 页码 */ public static final String PAGE_NO = "pageNo"; /** * 总条数 */ public static final String COUNT = "count"; /** * 起始条数 */ public static final String FIRST = "first"; /** * 页面完整地址 */ public static final String LOCATION = "location"; /** * 页面翻页地址 */ public static final String HREF = "href"; /** * href前半部(相对于分页) */ public static final String HREF_FORMER = "hrefFormer"; /** * href后半部(相对于分页) */ public static final String HREF_LATTER = "hrefLatter"; /** * 传入参数,列表样式。 */ public static final String PARAM_STYLE_LIST = "styleList"; /** * 传入参数,系统预定义翻页。 */ public static final String PARAM_SYS_PAGE = "sysPage"; /** * 传入参数,用户自定义翻页。 */ public static final String PARAM_USER_PAGE = "userPage"; /** * 返回页面 */ public static final String RETURN_URL = "returnUrl"; /** * 国际化参数 */ public static final String ARGS = "args"; /** * 获得模板路径。将对模板文件名称进行本地化处理。 * * @param request * @param solution * 方案路径 * @param dir * 模板目录。不本地化处理。 * @param name * 模板名称。本地化处理。 * @return */ public static String getTplPath(HttpServletRequest request, String solution, String dir, String name) { return solution + "/" + dir + "/"+ name + TPL_SUFFIX; } /** * 获得模板路径。将对模板文件名称进行本地化处理。 * * @param messageSource * @param lang * 本地化语言 * @param solution * 方案路径 * @param dir * 模板目录。不本地化处理。 * @param name * 模板名称。本地化处理。 * @return */ public static String getTplPath(MessageSource messageSource, String lang, String solution, String dir, String name) { LocaleEditor localeEditor = new LocaleEditor(); localeEditor.setAsText(lang); Locale locale = (Locale) localeEditor.getValue(); return solution + "/" + dir + "/" + messageSource.getMessage(name, null, locale) + TPL_SUFFIX; } /** * 获得模板路径。不对模板文件进行本地化处理。 * * @param solution * 方案路径 * @param dir * 模板目录。不本地化处理。 * @param name * 模板名称。不本地化处理。 * @return */ public static String getTplPath(String solution, String dir, String name) { return solution + "/" + dir + "/" + name + TPL_SUFFIX; } /** * 页面没有找到 * * @param request * @param response * @return 返回“页面没有找到”的模板 */ public static String pageNotFound(HttpServletRequest request, HttpServletResponse response, Map<String, Object> model) { response.setStatus(HttpServletResponse.SC_NOT_FOUND); CmsSite site = CmsUtils.getSite(request); frontData(request, model, site); return getTplPath(request, site.getSolutionPath(), TPLDIR_COMMON, PAGE_NOT_FOUND); } /** * 成功提示页面 * * @param request * @param model * @return */ public static String showSuccess(HttpServletRequest request, Map<String, Object> model, String nextUrl) { CmsSite site = CmsUtils.getSite(request); frontData(request, model, site); if (!StringUtils.isBlank(nextUrl)) { model.put("nextUrl", nextUrl); } return getTplPath(request, site.getSolutionPath(), TPLDIR_COMMON, SUCCESS_PAGE); } /** * 错误提示页面 * * @param request * @param response * @param model * @return */ public static String showError(HttpServletRequest request, HttpServletResponse response, Map<String, Object> model, WebErrors errors) { CmsSite site = CmsUtils.getSite(request); frontData(request, model, site); errors.toModel(model); return getTplPath(request, site.getSolutionPath(), TPLDIR_COMMON, ERROR_PAGE); } /** * 信息提示页面 * * @param request * @param model * @param message * 进行国际化处理 * @return */ public static String showMessage(HttpServletRequest request, Map<String, Object> model, String message, String... args) { CmsSite site = CmsUtils.getSite(request); frontData(request, model, site); model.put(MESSAGE, message); if (args != null) { model.put(ARGS, args); } return getTplPath(request, site.getSolutionPath(), TPLDIR_COMMON, MESSAGE_PAGE); } /** * 显示登录页面 * * @param request * @param model * @param site * @param message * @return */ public static String showLogin(HttpServletRequest request, Map<String, Object> model, CmsSite site, String message) { if (!StringUtils.isBlank(message)) { model.put(MESSAGE, message); } StringBuilder buff = new StringBuilder("redirect:"); buff.append(site.getLoginUrl()).append("?"); buff.append(RETURN_URL).append("="); buff.append(RequestUtils.getLocation(request)); if (!StringUtils.isBlank(site.getProcessUrl())) { buff.append("&").append(PROCESS_URL).append(site.getProcessUrl()); } return buff.toString(); } /** * 显示登录页面 * * @param request * @param model * @param site * @return */ public static String showLogin(HttpServletRequest request, Map<String, Object> model, CmsSite site) { return showLogin(request, model, site, "true"); } /** * 为前台模板设置公用数据 * * @param request * @param model */ public static void frontData(HttpServletRequest request, Map<String, Object> map, CmsSite site) { CmsUser user = CmsUtils.getUser(request); String location = RequestUtils.getLocation(request); Long startTime = (Long) request.getAttribute(START_TIME); frontData(map, site, user, location, startTime); } public static void frontData(Map<String, Object> map, CmsSite site, CmsUser user, String location, Long startTime) { if (startTime != null) { map.put(START_TIME, startTime); } if (user != null) { map.put(USER, user); } map.put(SITE, site); String ctx = site.getContextPath() == null ? "" : site.getContextPath(); map.put(BASE, ctx); map.put(RES_SYS, ctx + RES_PATH); String res = ctx + RES_PATH + "/" + site.getPath() + "/" + site.getTplSolution(); // res路径需要去除第一个字符'/' map.put(RES_TPL, res.substring(1)); map.put(LOCATION, location); } public static void putLocation(Map<String, Object> map, String location) { map.put(LOCATION, location); } /** * 为前台模板设置分页相关数据 * * @param request * @param map */ public static void frontPageData(HttpServletRequest request, Map<String, Object> map) { int pageNo = URLHelper.getPageNo(request); PageInfo info = URLHelper.getPageInfo(request); String href = info.getHref(); String hrefFormer = info.getHrefFormer(); String hrefLatter = info.getHrefLatter(); frontPageData(pageNo, href, hrefFormer, hrefLatter, map); } /** * 为前台模板设置分页相关数据 * * @param pageNo * @param href * @param urlFormer * @param urlLatter * @param map */ public static void frontPageData(int pageNo, String href, String hrefFormer, String hrefLatter, Map<String, Object> map) { map.put(PAGE_NO, pageNo); map.put(HREF, href); map.put(HREF_FORMER, hrefFormer); map.put(HREF_LATTER, hrefLatter); } /** * 标签中获得站点 * * @param env * @return * @throws TemplateModelException */ public static CmsSite getSite(Environment env) throws TemplateModelException { TemplateModel model = env.getGlobalVariable(SITE); if (model instanceof AdapterTemplateModel) { return (CmsSite) ((AdapterTemplateModel) model) .getAdaptedObject(CmsSite.class); } else { throw new TemplateModelException("'" + SITE + "' not found in DataModel"); } } /** * 标签中获得页码 * * @param env * @return * @throws TemplateException */ public static int getPageNo(Environment env) throws TemplateException { TemplateModel pageNo = env.getGlobalVariable(PAGE_NO); if (pageNo instanceof TemplateNumberModel) { return ((TemplateNumberModel) pageNo).getAsNumber().intValue(); } else { throw new TemplateModelException("'" + PAGE_NO + "' not found in DataModel."); } } public static int getFirst(Map<String, TemplateModel> params) throws TemplateException { Integer first = DirectiveUtils.getInt(FIRST, params); if (first == null || first <= 0) { return 0; } else { return first - 1; } } /** * 标签参数中获得条数。 * * @param params * @return 如果不存在,或者小于等于0,或者大于5000则返回5000;否则返回条数。 * @throws TemplateException */ public static int getCount(Map<String, TemplateModel> params) throws TemplateException { Integer count = DirectiveUtils.getInt(COUNT, params); if (count == null || count <= 0 || count >= 5000) { return 5000; } else { return count; } } public static void includePagination(CmsSite site, Map<String, TemplateModel> params, Environment env) throws TemplateException, IOException { String sysPage = DirectiveUtils.getString(PARAM_SYS_PAGE, params); String userPage = DirectiveUtils.getString(PARAM_USER_PAGE, params); if (!StringUtils.isBlank(sysPage)) { String tpl = TPL_STYLE_PAGE_CHANNEL + sysPage + TPL_SUFFIX; env.include(tpl, UTF8, true); } else if (!StringUtils.isBlank(userPage)) { String tpl = getTplPath(site.getSolutionPath(), TPLDIR_STYLE_LIST, userPage); env.include(tpl, UTF8, true); } else { // 没有包含分页 } } /** * 标签中包含页面 * * @param tplName * @param site * @param params * @param env * @throws IOException * @throws TemplateException */ public static void includeTpl(String tplName, CmsSite site, Map<String, TemplateModel> params, Environment env) throws IOException, TemplateException { String subTpl = DirectiveUtils.getString(PARAM_TPL_SUB, params); String tpl; if (StringUtils.isBlank(subTpl)) { tpl = getTplPath(site.getSolutionPath(), TPLDIR_TAG, tplName); } else { tpl = getTplPath(site.getSolutionPath(), TPLDIR_TAG, tplName + "_" + subTpl); } env.include(tpl, UTF8, true); } /** * 标签中包含用户预定义列表样式模板 * * @param listStyle * @param site * @param env * @throws IOException * @throws TemplateException */ public static void includeTpl(String listStyle, CmsSite site, Environment env) throws IOException, TemplateException { String tpl = getTplPath(site.getSolutionPath(), TPLDIR_STYLE_LIST, listStyle); env.include(tpl, UTF8, true); } }
[ "ily_hxy@163.com" ]
ily_hxy@163.com
6a36a2c04977eedd354884c241dd6ee9208c470c
66ebec702568839505dca19baa02ef450fff893c
/hitel/src/hctaEpc/mmeSgsn/interface_/ss7/MmeTcapProfile.java
27efbde95f3b4145df3f49aa77333b235e54fbde
[ "Apache-2.0" ]
permissive
jnpr-shinma/yangfile
bbdaa7a3d61a85ed6acc8e939d35195ff74868d7
ee9082577a13c8527a3fbc34389abcb48ae28525
refs/heads/master
2020-05-03T19:53:48.052282
2015-03-06T08:30:22
2015-03-06T08:30:22
31,529,695
0
0
null
null
null
null
UTF-8
Java
false
false
39,275
java
/* * @(#)MmeTcapProfile.java 1.0 09/12/14 * * This file has been auto-generated by JNC, the * Java output format plug-in of pyang. * Origin: module "hcta-epc", revision: "2014-09-18". */ package hctaEpc.mmeSgsn.interface_.ss7; import Element; import Epc; import JNCException; import com.tailf.jnc.YangElement; import com.tailf.jnc.YangEnumeration; import com.tailf.jnc.YangString; import com.tailf.jnc.YangUInt16; import com.tailf.jnc.YangUInt8; /** * This class represents an element from * the namespace http://hitachi-cta.com/ns/epc * generated to "src/hctaEpc/mmeSgsn/interface_/ss7/mme-tcap-profile" * <p> * See line 19 in * tcapConfig.yang * * @version 1.0 2014-12-09 * @author Auto Generated */ public class MmeTcapProfile extends YangElement { private static final long serialVersionUID = 1L; /** * Constructor for an empty MmeTcapProfile object. */ public MmeTcapProfile() { super(Epc.NAMESPACE, "mme-tcap-profile"); } /** * Clones this object, returning an exact copy. * @return A clone of the object. */ public MmeTcapProfile clone() { return (MmeTcapProfile)cloneContent(new MmeTcapProfile()); } /** * Clones this object, returning a shallow copy. * @return A clone of the object. Children are not included. */ public MmeTcapProfile cloneShallow() { return (MmeTcapProfile)cloneShallowContent(new MmeTcapProfile()); } /** * @return An array with the identifiers of any key children */ public String[] keyNames() { return null; } /** * @return An array with the identifiers of any children, in order. */ public String[] childrenNames() { return new String[] { "nature-of-address", "sccp-class-of-operation", "e164-trans-type", "e164-mofsm-trans-type", "e212-trans-type", "e214-trans-type", "sccp-return-option", "hop-counter", "xudt-option", "max-map-transactions", "max-map-invokes", "max-cap-transactions", "max-cap-invokes", }; } /* Access methods for optional leaf child: "nature-of-address". */ /** * Gets the value for child leaf "nature-of-address". * @return The value of the leaf. */ public YangEnumeration getNatureOfAddressValue() throws JNCException { YangEnumeration natureOfAddress = (YangEnumeration)getValue("nature-of-address"); if (natureOfAddress == null) { natureOfAddress = new YangEnumeration("intl-num", new String[] { // default "sub-num", "res-national-use", "nat-spec-num", "intl-num", }); } return natureOfAddress; } /** * Sets the value for child leaf "nature-of-address", * using instance of generated typedef class. * @param natureOfAddressValue The value to set. * @param natureOfAddressValue used during instantiation. */ public void setNatureOfAddressValue(YangEnumeration natureOfAddressValue) throws JNCException { setLeafValue(Epc.NAMESPACE, "nature-of-address", natureOfAddressValue, childrenNames()); } /** * Sets the value for child leaf "nature-of-address", * using a String value. * @param natureOfAddressValue used during instantiation. */ public void setNatureOfAddressValue(String natureOfAddressValue) throws JNCException { setNatureOfAddressValue(new YangEnumeration(natureOfAddressValue, new String[] { "sub-num", "res-national-use", "nat-spec-num", "intl-num", })); } /** * Unsets the value for child leaf "nature-of-address". */ public void unsetNatureOfAddressValue() throws JNCException { delete("nature-of-address"); } /** * This method is used for creating a subtree filter. * The added "nature-of-address" leaf will not have a value. */ public void addNatureOfAddress() throws JNCException { setLeafValue(Epc.NAMESPACE, "nature-of-address", null, childrenNames()); } /** * Marks the leaf "nature-of-address" with operation "replace". */ public void markNatureOfAddressReplace() throws JNCException { markLeafReplace("natureOfAddress"); } /** * Marks the leaf "nature-of-address" with operation "merge". */ public void markNatureOfAddressMerge() throws JNCException { markLeafMerge("natureOfAddress"); } /** * Marks the leaf "nature-of-address" with operation "create". */ public void markNatureOfAddressCreate() throws JNCException { markLeafCreate("natureOfAddress"); } /** * Marks the leaf "nature-of-address" with operation "delete". */ public void markNatureOfAddressDelete() throws JNCException { markLeafDelete("natureOfAddress"); } /* Access methods for optional leaf child: "sccp-class-of-operation". */ /** * Gets the value for child leaf "sccp-class-of-operation". * @return The value of the leaf. */ public YangEnumeration getSccpClassOfOperationValue() throws JNCException { YangEnumeration sccpClassOfOperation = (YangEnumeration)getValue("sccp-class-of-operation"); if (sccpClassOfOperation == null) { sccpClassOfOperation = new YangEnumeration("sequenced", new String[] { // default "non-sequenced", "sequenced", }); } return sccpClassOfOperation; } /** * Sets the value for child leaf "sccp-class-of-operation", * using instance of generated typedef class. * @param sccpClassOfOperationValue The value to set. * @param sccpClassOfOperationValue used during instantiation. */ public void setSccpClassOfOperationValue(YangEnumeration sccpClassOfOperationValue) throws JNCException { setLeafValue(Epc.NAMESPACE, "sccp-class-of-operation", sccpClassOfOperationValue, childrenNames()); } /** * Sets the value for child leaf "sccp-class-of-operation", * using a String value. * @param sccpClassOfOperationValue used during instantiation. */ public void setSccpClassOfOperationValue(String sccpClassOfOperationValue) throws JNCException { setSccpClassOfOperationValue(new YangEnumeration(sccpClassOfOperationValue, new String[] { "non-sequenced", "sequenced", })); } /** * Unsets the value for child leaf "sccp-class-of-operation". */ public void unsetSccpClassOfOperationValue() throws JNCException { delete("sccp-class-of-operation"); } /** * This method is used for creating a subtree filter. * The added "sccp-class-of-operation" leaf will not have a value. */ public void addSccpClassOfOperation() throws JNCException { setLeafValue(Epc.NAMESPACE, "sccp-class-of-operation", null, childrenNames()); } /** * Marks the leaf "sccp-class-of-operation" with operation "replace". */ public void markSccpClassOfOperationReplace() throws JNCException { markLeafReplace("sccpClassOfOperation"); } /** * Marks the leaf "sccp-class-of-operation" with operation "merge". */ public void markSccpClassOfOperationMerge() throws JNCException { markLeafMerge("sccpClassOfOperation"); } /** * Marks the leaf "sccp-class-of-operation" with operation "create". */ public void markSccpClassOfOperationCreate() throws JNCException { markLeafCreate("sccpClassOfOperation"); } /** * Marks the leaf "sccp-class-of-operation" with operation "delete". */ public void markSccpClassOfOperationDelete() throws JNCException { markLeafDelete("sccpClassOfOperation"); } /* Access methods for optional leaf child: "e164-trans-type". */ /** * Gets the value for child leaf "e164-trans-type". * @return The value of the leaf. */ public YangString getE164TransTypeValue() throws JNCException { YangString e164TransType = (YangString)getValue("e164-trans-type"); if (e164TransType == null) { e164TransType = new YangString("auto-config"); // default } return e164TransType; } /** * Sets the value for child leaf "e164-trans-type", * using instance of generated typedef class. * @param e164TransTypeValue The value to set. * @param e164TransTypeValue used during instantiation. */ public void setE164TransTypeValue(YangString e164TransTypeValue) throws JNCException { setLeafValue(Epc.NAMESPACE, "e164-trans-type", e164TransTypeValue, childrenNames()); } /** * Sets the value for child leaf "e164-trans-type", * using a String value. * @param e164TransTypeValue used during instantiation. */ public void setE164TransTypeValue(String e164TransTypeValue) throws JNCException { setE164TransTypeValue(new YangString(e164TransTypeValue)); } /** * Unsets the value for child leaf "e164-trans-type". */ public void unsetE164TransTypeValue() throws JNCException { delete("e164-trans-type"); } /** * This method is used for creating a subtree filter. * The added "e164-trans-type" leaf will not have a value. */ public void addE164TransType() throws JNCException { setLeafValue(Epc.NAMESPACE, "e164-trans-type", null, childrenNames()); } /** * Marks the leaf "e164-trans-type" with operation "replace". */ public void markE164TransTypeReplace() throws JNCException { markLeafReplace("e164TransType"); } /** * Marks the leaf "e164-trans-type" with operation "merge". */ public void markE164TransTypeMerge() throws JNCException { markLeafMerge("e164TransType"); } /** * Marks the leaf "e164-trans-type" with operation "create". */ public void markE164TransTypeCreate() throws JNCException { markLeafCreate("e164TransType"); } /** * Marks the leaf "e164-trans-type" with operation "delete". */ public void markE164TransTypeDelete() throws JNCException { markLeafDelete("e164TransType"); } /* Access methods for optional leaf child: "e164-mofsm-trans-type". */ /** * Gets the value for child leaf "e164-mofsm-trans-type". * @return The value of the leaf. */ public YangString getE164MofsmTransTypeValue() throws JNCException { YangString e164MofsmTransType = (YangString)getValue("e164-mofsm-trans-type"); if (e164MofsmTransType == null) { e164MofsmTransType = new YangString("auto-config"); // default } return e164MofsmTransType; } /** * Sets the value for child leaf "e164-mofsm-trans-type", * using instance of generated typedef class. * @param e164MofsmTransTypeValue The value to set. * @param e164MofsmTransTypeValue used during instantiation. */ public void setE164MofsmTransTypeValue(YangString e164MofsmTransTypeValue) throws JNCException { setLeafValue(Epc.NAMESPACE, "e164-mofsm-trans-type", e164MofsmTransTypeValue, childrenNames()); } /** * Sets the value for child leaf "e164-mofsm-trans-type", * using a String value. * @param e164MofsmTransTypeValue used during instantiation. */ public void setE164MofsmTransTypeValue(String e164MofsmTransTypeValue) throws JNCException { setE164MofsmTransTypeValue(new YangString(e164MofsmTransTypeValue)); } /** * Unsets the value for child leaf "e164-mofsm-trans-type". */ public void unsetE164MofsmTransTypeValue() throws JNCException { delete("e164-mofsm-trans-type"); } /** * This method is used for creating a subtree filter. * The added "e164-mofsm-trans-type" leaf will not have a value. */ public void addE164MofsmTransType() throws JNCException { setLeafValue(Epc.NAMESPACE, "e164-mofsm-trans-type", null, childrenNames()); } /** * Marks the leaf "e164-mofsm-trans-type" with operation "replace". */ public void markE164MofsmTransTypeReplace() throws JNCException { markLeafReplace("e164MofsmTransType"); } /** * Marks the leaf "e164-mofsm-trans-type" with operation "merge". */ public void markE164MofsmTransTypeMerge() throws JNCException { markLeafMerge("e164MofsmTransType"); } /** * Marks the leaf "e164-mofsm-trans-type" with operation "create". */ public void markE164MofsmTransTypeCreate() throws JNCException { markLeafCreate("e164MofsmTransType"); } /** * Marks the leaf "e164-mofsm-trans-type" with operation "delete". */ public void markE164MofsmTransTypeDelete() throws JNCException { markLeafDelete("e164MofsmTransType"); } /* Access methods for optional leaf child: "e212-trans-type". */ /** * Gets the value for child leaf "e212-trans-type". * @return The value of the leaf. */ public YangString getE212TransTypeValue() throws JNCException { YangString e212TransType = (YangString)getValue("e212-trans-type"); if (e212TransType == null) { e212TransType = new YangString("auto-config"); // default } return e212TransType; } /** * Sets the value for child leaf "e212-trans-type", * using instance of generated typedef class. * @param e212TransTypeValue The value to set. * @param e212TransTypeValue used during instantiation. */ public void setE212TransTypeValue(YangString e212TransTypeValue) throws JNCException { setLeafValue(Epc.NAMESPACE, "e212-trans-type", e212TransTypeValue, childrenNames()); } /** * Sets the value for child leaf "e212-trans-type", * using a String value. * @param e212TransTypeValue used during instantiation. */ public void setE212TransTypeValue(String e212TransTypeValue) throws JNCException { setE212TransTypeValue(new YangString(e212TransTypeValue)); } /** * Unsets the value for child leaf "e212-trans-type". */ public void unsetE212TransTypeValue() throws JNCException { delete("e212-trans-type"); } /** * This method is used for creating a subtree filter. * The added "e212-trans-type" leaf will not have a value. */ public void addE212TransType() throws JNCException { setLeafValue(Epc.NAMESPACE, "e212-trans-type", null, childrenNames()); } /** * Marks the leaf "e212-trans-type" with operation "replace". */ public void markE212TransTypeReplace() throws JNCException { markLeafReplace("e212TransType"); } /** * Marks the leaf "e212-trans-type" with operation "merge". */ public void markE212TransTypeMerge() throws JNCException { markLeafMerge("e212TransType"); } /** * Marks the leaf "e212-trans-type" with operation "create". */ public void markE212TransTypeCreate() throws JNCException { markLeafCreate("e212TransType"); } /** * Marks the leaf "e212-trans-type" with operation "delete". */ public void markE212TransTypeDelete() throws JNCException { markLeafDelete("e212TransType"); } /* Access methods for optional leaf child: "e214-trans-type". */ /** * Gets the value for child leaf "e214-trans-type". * @return The value of the leaf. */ public YangUInt8 getE214TransTypeValue() throws JNCException { YangUInt8 e214TransType = (YangUInt8)getValue("e214-trans-type"); if (e214TransType == null) { e214TransType = new YangUInt8("0"); // default } return e214TransType; } /** * Sets the value for child leaf "e214-trans-type", * using instance of generated typedef class. * @param e214TransTypeValue The value to set. * @param e214TransTypeValue used during instantiation. */ public void setE214TransTypeValue(YangUInt8 e214TransTypeValue) throws JNCException { setLeafValue(Epc.NAMESPACE, "e214-trans-type", e214TransTypeValue, childrenNames()); } /** * Sets the value for child leaf "e214-trans-type", * using Java primitive values. * @param e214TransTypeValue used during instantiation. */ public void setE214TransTypeValue(short e214TransTypeValue) throws JNCException { setE214TransTypeValue(new YangUInt8(e214TransTypeValue)); } /** * Sets the value for child leaf "e214-trans-type", * using a String value. * @param e214TransTypeValue used during instantiation. */ public void setE214TransTypeValue(String e214TransTypeValue) throws JNCException { setE214TransTypeValue(new YangUInt8(e214TransTypeValue)); } /** * Unsets the value for child leaf "e214-trans-type". */ public void unsetE214TransTypeValue() throws JNCException { delete("e214-trans-type"); } /** * This method is used for creating a subtree filter. * The added "e214-trans-type" leaf will not have a value. */ public void addE214TransType() throws JNCException { setLeafValue(Epc.NAMESPACE, "e214-trans-type", null, childrenNames()); } /** * Marks the leaf "e214-trans-type" with operation "replace". */ public void markE214TransTypeReplace() throws JNCException { markLeafReplace("e214TransType"); } /** * Marks the leaf "e214-trans-type" with operation "merge". */ public void markE214TransTypeMerge() throws JNCException { markLeafMerge("e214TransType"); } /** * Marks the leaf "e214-trans-type" with operation "create". */ public void markE214TransTypeCreate() throws JNCException { markLeafCreate("e214TransType"); } /** * Marks the leaf "e214-trans-type" with operation "delete". */ public void markE214TransTypeDelete() throws JNCException { markLeafDelete("e214TransType"); } /* Access methods for optional leaf child: "sccp-return-option". */ /** * Gets the value for child leaf "sccp-return-option". * @return The value of the leaf. */ public YangEnumeration getSccpReturnOptionValue() throws JNCException { YangEnumeration sccpReturnOption = (YangEnumeration)getValue("sccp-return-option"); if (sccpReturnOption == null) { sccpReturnOption = new YangEnumeration("return", new String[] { // default "no-return", "return", }); } return sccpReturnOption; } /** * Sets the value for child leaf "sccp-return-option", * using instance of generated typedef class. * @param sccpReturnOptionValue The value to set. * @param sccpReturnOptionValue used during instantiation. */ public void setSccpReturnOptionValue(YangEnumeration sccpReturnOptionValue) throws JNCException { setLeafValue(Epc.NAMESPACE, "sccp-return-option", sccpReturnOptionValue, childrenNames()); } /** * Sets the value for child leaf "sccp-return-option", * using a String value. * @param sccpReturnOptionValue used during instantiation. */ public void setSccpReturnOptionValue(String sccpReturnOptionValue) throws JNCException { setSccpReturnOptionValue(new YangEnumeration(sccpReturnOptionValue, new String[] { "no-return", "return", })); } /** * Unsets the value for child leaf "sccp-return-option". */ public void unsetSccpReturnOptionValue() throws JNCException { delete("sccp-return-option"); } /** * This method is used for creating a subtree filter. * The added "sccp-return-option" leaf will not have a value. */ public void addSccpReturnOption() throws JNCException { setLeafValue(Epc.NAMESPACE, "sccp-return-option", null, childrenNames()); } /** * Marks the leaf "sccp-return-option" with operation "replace". */ public void markSccpReturnOptionReplace() throws JNCException { markLeafReplace("sccpReturnOption"); } /** * Marks the leaf "sccp-return-option" with operation "merge". */ public void markSccpReturnOptionMerge() throws JNCException { markLeafMerge("sccpReturnOption"); } /** * Marks the leaf "sccp-return-option" with operation "create". */ public void markSccpReturnOptionCreate() throws JNCException { markLeafCreate("sccpReturnOption"); } /** * Marks the leaf "sccp-return-option" with operation "delete". */ public void markSccpReturnOptionDelete() throws JNCException { markLeafDelete("sccpReturnOption"); } /* Access methods for optional leaf child: "hop-counter". */ /** * Gets the value for child leaf "hop-counter". * @return The value of the leaf. */ public YangUInt8 getHopCounterValue() throws JNCException { YangUInt8 hopCounter = (YangUInt8)getValue("hop-counter"); if (hopCounter == null) { hopCounter = new YangUInt8("15"); // default } return hopCounter; } /** * Sets the value for child leaf "hop-counter", * using instance of generated typedef class. * @param hopCounterValue The value to set. * @param hopCounterValue used during instantiation. */ public void setHopCounterValue(YangUInt8 hopCounterValue) throws JNCException { setLeafValue(Epc.NAMESPACE, "hop-counter", hopCounterValue, childrenNames()); } /** * Sets the value for child leaf "hop-counter", * using Java primitive values. * @param hopCounterValue used during instantiation. */ public void setHopCounterValue(short hopCounterValue) throws JNCException { setHopCounterValue(new YangUInt8(hopCounterValue)); } /** * Sets the value for child leaf "hop-counter", * using a String value. * @param hopCounterValue used during instantiation. */ public void setHopCounterValue(String hopCounterValue) throws JNCException { setHopCounterValue(new YangUInt8(hopCounterValue)); } /** * Unsets the value for child leaf "hop-counter". */ public void unsetHopCounterValue() throws JNCException { delete("hop-counter"); } /** * This method is used for creating a subtree filter. * The added "hop-counter" leaf will not have a value. */ public void addHopCounter() throws JNCException { setLeafValue(Epc.NAMESPACE, "hop-counter", null, childrenNames()); } /** * Marks the leaf "hop-counter" with operation "replace". */ public void markHopCounterReplace() throws JNCException { markLeafReplace("hopCounter"); } /** * Marks the leaf "hop-counter" with operation "merge". */ public void markHopCounterMerge() throws JNCException { markLeafMerge("hopCounter"); } /** * Marks the leaf "hop-counter" with operation "create". */ public void markHopCounterCreate() throws JNCException { markLeafCreate("hopCounter"); } /** * Marks the leaf "hop-counter" with operation "delete". */ public void markHopCounterDelete() throws JNCException { markLeafDelete("hopCounter"); } /* Access methods for optional leaf child: "xudt-option". */ /** * Gets the value for child leaf "xudt-option". * @return The value of the leaf. */ public YangEnumeration getXudtOptionValue() throws JNCException { YangEnumeration xudtOption = (YangEnumeration)getValue("xudt-option"); if (xudtOption == null) { xudtOption = new YangEnumeration("off", new String[] { // default "on", "off", }); } return xudtOption; } /** * Sets the value for child leaf "xudt-option", * using instance of generated typedef class. * @param xudtOptionValue The value to set. * @param xudtOptionValue used during instantiation. */ public void setXudtOptionValue(YangEnumeration xudtOptionValue) throws JNCException { setLeafValue(Epc.NAMESPACE, "xudt-option", xudtOptionValue, childrenNames()); } /** * Sets the value for child leaf "xudt-option", * using a String value. * @param xudtOptionValue used during instantiation. */ public void setXudtOptionValue(String xudtOptionValue) throws JNCException { setXudtOptionValue(new YangEnumeration(xudtOptionValue, new String[] { "on", "off", })); } /** * Unsets the value for child leaf "xudt-option". */ public void unsetXudtOptionValue() throws JNCException { delete("xudt-option"); } /** * This method is used for creating a subtree filter. * The added "xudt-option" leaf will not have a value. */ public void addXudtOption() throws JNCException { setLeafValue(Epc.NAMESPACE, "xudt-option", null, childrenNames()); } /** * Marks the leaf "xudt-option" with operation "replace". */ public void markXudtOptionReplace() throws JNCException { markLeafReplace("xudtOption"); } /** * Marks the leaf "xudt-option" with operation "merge". */ public void markXudtOptionMerge() throws JNCException { markLeafMerge("xudtOption"); } /** * Marks the leaf "xudt-option" with operation "create". */ public void markXudtOptionCreate() throws JNCException { markLeafCreate("xudtOption"); } /** * Marks the leaf "xudt-option" with operation "delete". */ public void markXudtOptionDelete() throws JNCException { markLeafDelete("xudtOption"); } /* Access methods for optional leaf child: "max-map-transactions". */ /** * Gets the value for child leaf "max-map-transactions". * @return The value of the leaf. */ public YangUInt16 getMaxMapTransactionsValue() throws JNCException { YangUInt16 maxMapTransactions = (YangUInt16)getValue("max-map-transactions"); if (maxMapTransactions == null) { maxMapTransactions = new YangUInt16("2000"); // default } return maxMapTransactions; } /** * Sets the value for child leaf "max-map-transactions", * using instance of generated typedef class. * @param maxMapTransactionsValue The value to set. * @param maxMapTransactionsValue used during instantiation. */ public void setMaxMapTransactionsValue(YangUInt16 maxMapTransactionsValue) throws JNCException { setLeafValue(Epc.NAMESPACE, "max-map-transactions", maxMapTransactionsValue, childrenNames()); } /** * Sets the value for child leaf "max-map-transactions", * using Java primitive values. * @param maxMapTransactionsValue used during instantiation. */ public void setMaxMapTransactionsValue(int maxMapTransactionsValue) throws JNCException { setMaxMapTransactionsValue(new YangUInt16(maxMapTransactionsValue)); } /** * Sets the value for child leaf "max-map-transactions", * using a String value. * @param maxMapTransactionsValue used during instantiation. */ public void setMaxMapTransactionsValue(String maxMapTransactionsValue) throws JNCException { setMaxMapTransactionsValue(new YangUInt16(maxMapTransactionsValue)); } /** * Unsets the value for child leaf "max-map-transactions". */ public void unsetMaxMapTransactionsValue() throws JNCException { delete("max-map-transactions"); } /** * This method is used for creating a subtree filter. * The added "max-map-transactions" leaf will not have a value. */ public void addMaxMapTransactions() throws JNCException { setLeafValue(Epc.NAMESPACE, "max-map-transactions", null, childrenNames()); } /** * Marks the leaf "max-map-transactions" with operation "replace". */ public void markMaxMapTransactionsReplace() throws JNCException { markLeafReplace("maxMapTransactions"); } /** * Marks the leaf "max-map-transactions" with operation "merge". */ public void markMaxMapTransactionsMerge() throws JNCException { markLeafMerge("maxMapTransactions"); } /** * Marks the leaf "max-map-transactions" with operation "create". */ public void markMaxMapTransactionsCreate() throws JNCException { markLeafCreate("maxMapTransactions"); } /** * Marks the leaf "max-map-transactions" with operation "delete". */ public void markMaxMapTransactionsDelete() throws JNCException { markLeafDelete("maxMapTransactions"); } /* Access methods for optional leaf child: "max-map-invokes". */ /** * Gets the value for child leaf "max-map-invokes". * @return The value of the leaf. */ public YangUInt16 getMaxMapInvokesValue() throws JNCException { YangUInt16 maxMapInvokes = (YangUInt16)getValue("max-map-invokes"); if (maxMapInvokes == null) { maxMapInvokes = new YangUInt16("3000"); // default } return maxMapInvokes; } /** * Sets the value for child leaf "max-map-invokes", * using instance of generated typedef class. * @param maxMapInvokesValue The value to set. * @param maxMapInvokesValue used during instantiation. */ public void setMaxMapInvokesValue(YangUInt16 maxMapInvokesValue) throws JNCException { setLeafValue(Epc.NAMESPACE, "max-map-invokes", maxMapInvokesValue, childrenNames()); } /** * Sets the value for child leaf "max-map-invokes", * using Java primitive values. * @param maxMapInvokesValue used during instantiation. */ public void setMaxMapInvokesValue(int maxMapInvokesValue) throws JNCException { setMaxMapInvokesValue(new YangUInt16(maxMapInvokesValue)); } /** * Sets the value for child leaf "max-map-invokes", * using a String value. * @param maxMapInvokesValue used during instantiation. */ public void setMaxMapInvokesValue(String maxMapInvokesValue) throws JNCException { setMaxMapInvokesValue(new YangUInt16(maxMapInvokesValue)); } /** * Unsets the value for child leaf "max-map-invokes". */ public void unsetMaxMapInvokesValue() throws JNCException { delete("max-map-invokes"); } /** * This method is used for creating a subtree filter. * The added "max-map-invokes" leaf will not have a value. */ public void addMaxMapInvokes() throws JNCException { setLeafValue(Epc.NAMESPACE, "max-map-invokes", null, childrenNames()); } /** * Marks the leaf "max-map-invokes" with operation "replace". */ public void markMaxMapInvokesReplace() throws JNCException { markLeafReplace("maxMapInvokes"); } /** * Marks the leaf "max-map-invokes" with operation "merge". */ public void markMaxMapInvokesMerge() throws JNCException { markLeafMerge("maxMapInvokes"); } /** * Marks the leaf "max-map-invokes" with operation "create". */ public void markMaxMapInvokesCreate() throws JNCException { markLeafCreate("maxMapInvokes"); } /** * Marks the leaf "max-map-invokes" with operation "delete". */ public void markMaxMapInvokesDelete() throws JNCException { markLeafDelete("maxMapInvokes"); } /* Access methods for optional leaf child: "max-cap-transactions". */ /** * Gets the value for child leaf "max-cap-transactions". * @return The value of the leaf. */ public YangUInt16 getMaxCapTransactionsValue() throws JNCException { YangUInt16 maxCapTransactions = (YangUInt16)getValue("max-cap-transactions"); if (maxCapTransactions == null) { maxCapTransactions = new YangUInt16("2000"); // default } return maxCapTransactions; } /** * Sets the value for child leaf "max-cap-transactions", * using instance of generated typedef class. * @param maxCapTransactionsValue The value to set. * @param maxCapTransactionsValue used during instantiation. */ public void setMaxCapTransactionsValue(YangUInt16 maxCapTransactionsValue) throws JNCException { setLeafValue(Epc.NAMESPACE, "max-cap-transactions", maxCapTransactionsValue, childrenNames()); } /** * Sets the value for child leaf "max-cap-transactions", * using Java primitive values. * @param maxCapTransactionsValue used during instantiation. */ public void setMaxCapTransactionsValue(int maxCapTransactionsValue) throws JNCException { setMaxCapTransactionsValue(new YangUInt16(maxCapTransactionsValue)); } /** * Sets the value for child leaf "max-cap-transactions", * using a String value. * @param maxCapTransactionsValue used during instantiation. */ public void setMaxCapTransactionsValue(String maxCapTransactionsValue) throws JNCException { setMaxCapTransactionsValue(new YangUInt16(maxCapTransactionsValue)); } /** * Unsets the value for child leaf "max-cap-transactions". */ public void unsetMaxCapTransactionsValue() throws JNCException { delete("max-cap-transactions"); } /** * This method is used for creating a subtree filter. * The added "max-cap-transactions" leaf will not have a value. */ public void addMaxCapTransactions() throws JNCException { setLeafValue(Epc.NAMESPACE, "max-cap-transactions", null, childrenNames()); } /** * Marks the leaf "max-cap-transactions" with operation "replace". */ public void markMaxCapTransactionsReplace() throws JNCException { markLeafReplace("maxCapTransactions"); } /** * Marks the leaf "max-cap-transactions" with operation "merge". */ public void markMaxCapTransactionsMerge() throws JNCException { markLeafMerge("maxCapTransactions"); } /** * Marks the leaf "max-cap-transactions" with operation "create". */ public void markMaxCapTransactionsCreate() throws JNCException { markLeafCreate("maxCapTransactions"); } /** * Marks the leaf "max-cap-transactions" with operation "delete". */ public void markMaxCapTransactionsDelete() throws JNCException { markLeafDelete("maxCapTransactions"); } /* Access methods for optional leaf child: "max-cap-invokes". */ /** * Gets the value for child leaf "max-cap-invokes". * @return The value of the leaf. */ public YangUInt16 getMaxCapInvokesValue() throws JNCException { YangUInt16 maxCapInvokes = (YangUInt16)getValue("max-cap-invokes"); if (maxCapInvokes == null) { maxCapInvokes = new YangUInt16("3000"); // default } return maxCapInvokes; } /** * Sets the value for child leaf "max-cap-invokes", * using instance of generated typedef class. * @param maxCapInvokesValue The value to set. * @param maxCapInvokesValue used during instantiation. */ public void setMaxCapInvokesValue(YangUInt16 maxCapInvokesValue) throws JNCException { setLeafValue(Epc.NAMESPACE, "max-cap-invokes", maxCapInvokesValue, childrenNames()); } /** * Sets the value for child leaf "max-cap-invokes", * using Java primitive values. * @param maxCapInvokesValue used during instantiation. */ public void setMaxCapInvokesValue(int maxCapInvokesValue) throws JNCException { setMaxCapInvokesValue(new YangUInt16(maxCapInvokesValue)); } /** * Sets the value for child leaf "max-cap-invokes", * using a String value. * @param maxCapInvokesValue used during instantiation. */ public void setMaxCapInvokesValue(String maxCapInvokesValue) throws JNCException { setMaxCapInvokesValue(new YangUInt16(maxCapInvokesValue)); } /** * Unsets the value for child leaf "max-cap-invokes". */ public void unsetMaxCapInvokesValue() throws JNCException { delete("max-cap-invokes"); } /** * This method is used for creating a subtree filter. * The added "max-cap-invokes" leaf will not have a value. */ public void addMaxCapInvokes() throws JNCException { setLeafValue(Epc.NAMESPACE, "max-cap-invokes", null, childrenNames()); } /** * Marks the leaf "max-cap-invokes" with operation "replace". */ public void markMaxCapInvokesReplace() throws JNCException { markLeafReplace("maxCapInvokes"); } /** * Marks the leaf "max-cap-invokes" with operation "merge". */ public void markMaxCapInvokesMerge() throws JNCException { markLeafMerge("maxCapInvokes"); } /** * Marks the leaf "max-cap-invokes" with operation "create". */ public void markMaxCapInvokesCreate() throws JNCException { markLeafCreate("maxCapInvokes"); } /** * Marks the leaf "max-cap-invokes" with operation "delete". */ public void markMaxCapInvokesDelete() throws JNCException { markLeafDelete("maxCapInvokes"); } /** * Support method for addChild. * Adds a child to this object. * * @param child The child to add */ public void addChild(Element child) { super.addChild(child); } }
[ "shinma@juniper.net" ]
shinma@juniper.net
74db0873684d5978479f02be1170e4ade21aef4b
234f40fff23013b5a833dca80708c33e6ac3a228
/project/plugin_new/src/main/java/com/xia/plugin/Configurable.java
fd86a2593bfafeb8b9191ec000aba8a77169226e
[]
no_license
lemonzone2010/calvin
c6655dd15c3518cf1877870bb1fdc7140a40374f
1ecc9d5bec48650c711b1c0a9d7ccaf3a83214ea
refs/heads/master
2022-12-23T17:26:31.147996
2012-07-17T08:49:32
2012-07-17T08:49:32
36,861,037
0
0
null
2022-12-15T23:58:25
2015-06-04T09:28:54
Java
UTF-8
Java
false
false
1,116
java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.xia.plugin; /** Something that may be configured with a {@link Configuration}. */ public interface Configurable { /** Set the configuration to be used by this object. */ void setConf(Configuration conf); /** Return the configuration used by this object. */ Configuration getConf(); }
[ "hsiayong@96a9805f-92f8-c556-2e62-a92eab900872" ]
hsiayong@96a9805f-92f8-c556-2e62-a92eab900872
be8d85d86b548bddc9a463c594015d9a3a81aadb
11b9a30ada6672f428c8292937dec7ce9f35c71b
/src/main/java/java/rmi/server/SkeletonMismatchException.java
ef859aa061e323b26e0bf6f4b74d04e850184f4c
[]
no_license
bogle-zhao/jdk8
5b0a3978526723b3952a0c5d7221a3686039910b
8a66f021a824acfb48962721a20d27553523350d
refs/heads/master
2022-12-13T10:44:17.426522
2020-09-27T13:37:00
2020-09-27T13:37:00
299,039,533
0
0
null
null
null
null
UTF-8
Java
false
false
1,772
java
/***** Lobxxx Translate Finished ******/ /* * Copyright (c) 1996, 2004, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package java.rmi.server; import java.rmi.RemoteException; /** * This exception is thrown when a call is received that does not * match the available skeleton. It indicates either that the * remote method names or signatures in this interface have changed or * that the stub class used to make the call and the skeleton * receiving the call were not generated by the same version of * the stub compiler (<code>rmic</code>). * * <p> *  当接收到与可用骨架不匹配的调用时,抛出此异常。 * 它指示该接口中的远程方法名称或签名已更改,或者用于进行调用的存根类和接收调用的框架不是由相同版本的存根编译器生成的(<code> rmic </code >)。 * * * @author Roger Riggs * @since JDK1.1 * @deprecated no replacement. Skeletons are no longer required for remote * method calls in the Java 2 platform v1.2 and greater. */ @Deprecated public class SkeletonMismatchException extends RemoteException { /* indicate compatibility with JDK 1.1.x version of class */ private static final long serialVersionUID = -7780460454818859281L; /** * Constructs a new <code>SkeletonMismatchException</code> with * a specified detail message. * * <p> * * @param s the detail message * @since JDK1.1 * @deprecated no replacement */ @Deprecated public SkeletonMismatchException(String s) { super(s); } }
[ "zhaobo@MacBook-Pro.local" ]
zhaobo@MacBook-Pro.local
83ae23cb465b10b8e480d7d4d93e26b69237ba8b
bda463bf88b40904c0eab54a45520c505f22d4a3
/Player2.java
9b0dcb085b2b2ac29c5df2a5bdf904fb0118da5e
[]
no_license
cpt-fuzzy/towerpower
d002202afe86a126c6877f7e6229773b03477242
f51f5986e6050e3bbf94b88eaa7ab5a0807387f7
refs/heads/master
2021-06-14T10:05:52.638877
2017-01-03T09:09:13
2017-01-03T09:09:13
null
0
0
null
null
null
null
ISO-8859-1
Java
false
false
6,101
java
package towerPower; import java.awt.Rectangle; /** * * @author Tim & Niko * @version 1.0 * * Diese Klasse ist quasi eine leere Hülle des Player1. Hier werden die * Informationen die vom anderen Spieler kommen gespeichert. Sie werden * dann wieder ausgelesen um die Bewegungen des anderen Spielers nach * zu machen und das Spielen übers Netzwerk zu ermöglichen. */ public class Player2 { /** * Die vordefinierten Spawn koordinaten des Player2 damit es nicht zu Anfang * zu ungewollten kollisionen kommt */ private int spawnx = 10; private int spawny = 10; /** * Die Größe auf der X und Y Achse, also die Breite und Höhe */ private int sizeX = 20; private int sizeY = 20; /** * Dieses boolean gibt an ob der Pfeil bei einem Treffer zu einem Punkt * führt */ private boolean deadly = false; /** * Die aktuellen X und Y Koordinaten des Spielers */ private int xCoordinate = spawnx; private int yCoordinate = spawny; /** * Die aktuellen X und Y Koordinaten des Pfeils */ private int arrowXCoordinate = xCoordinate; private int arrowYCoordinate = yCoordinate + 8; private Game game; /** * * @param game * im Construktor wird nur das Game an sich übergeben um methoden * aus Game aufrufen zu können */ public Player2(Game game) { this.game = game; } /** * * @return gibt die X Koordinate des Player2 zurück */ public int getxCoordinate() { return xCoordinate; } /** * * @param xCoordinate * hier wird die X Kooridnate des Player 2 beschrieben, die * Koordinate kommt dann über das Netzwerk vom anderen Spieler */ public void setxCoordinate(int xCoordinate) { this.xCoordinate = xCoordinate; } /** * * @return gibt die Göße auf der X Achse / die Breite der Spielfigur zurück */ public int getSizeX() { return sizeX; } /** * * @return gibt die Göße auf der Y Achse / die Höhe der Spielfigur zurück */ public int getSizeY() { return sizeY; } /** * * @return gibt die Y Koordinate des Player 2 wieder */ public int getyCoordinate() { return yCoordinate; } /** * * @param yCoordinate * hier wird die Y Kooridnate des Player 2 beschrieben, die * Koordinate kommt dann über das Netzwerk vom anderen Spieler */ public void setyCoordinate(int yCoordinate) { this.yCoordinate = yCoordinate; } /** * * @param enemyFeet * die Füße des Player1 Wenn man auf den Player 2 springt wird * das Spiel neu gestartet und der Player 1 bekommt einen Punkt */ public void checkJumpedOn(Rectangle enemyFeet) { if (getRectPlayerHead().intersects(enemyFeet)) { game.restart(2); } } /** * * @return gibt die X Koordinate des Pfeils wieder */ public int getArrowXCoordinate() { return arrowXCoordinate; } /** * * @param arrowXCoordinate * hier wird die X Kooridnate des Pfeils beschrieben, die * Koordinate kommt dann über das Netzwerk vom anderen Spieler. */ public void setArrowXCoordinate(int arrowXCoordinate) { this.arrowXCoordinate = arrowXCoordinate; } /** * * @return gibt die y Koordinate des Pfeils wieder */ public int getArrowYCoordinate() { return arrowYCoordinate; } /** * * @param arrowYCoordinate * hier wird die Y Kooridnate des Pfeils beschrieben, die * Koordinate kommt dann über das Netzwerk vom anderen Spieler. */ public void setArrowYCoordinate(int arrowYCoordinate) { this.arrowYCoordinate = arrowYCoordinate; } /** * * @return gibt das Rectangle des Pfeils für die Collsions abfrage mit der * Umgebung aus */ public Rectangle getRectArrow() { return new Rectangle(arrowXCoordinate, arrowYCoordinate, 15, 1); } /** * * @param deadly, wenn deadly auf True gesetzt wird und dann der Player1 vom * Pfeil von Player2 getroffen wird zählt das als Treffer. Der * Wert kommt auch hier über das Netzwerk vom Player2. */ public void setDeadly(boolean deadly) { this.deadly = deadly; } /** * * @return gibt das Rectangle für die Kollsionsabfrage mit dem Player1 * wieder. Wenn deadly gesetzt ist ist es das Rectangle was man auch * sieht, wenn nicht wird ein Rectangle außerhalb des Spiels erzeugt * um ein Intersect mit dem Player1 zu vermeiden */ public Rectangle getRectArrowEnemy() { if (deadly) { return new Rectangle(arrowXCoordinate, arrowYCoordinate, 15, 3); } else { return new Rectangle(-15, -15, 0, 0); } } /** * * @return gibt das Rectangle des Player2 aus. */ public Rectangle getRectPlayer() { return new Rectangle(xCoordinate, yCoordinate, sizeX, sizeY); } /** * * @return gibt den oberen mittigen Teil des Player2 als Rectangle aus, dies * ist Quasi der Collider für den Kopf */ public Rectangle getRectPlayerHead() { return new Rectangle(xCoordinate + 6, yCoordinate, 8, 5); } /** * * @return gibt den unteren mittleren Teil des Player2 als Rectangle aus, * dies ist Quasi der Collider für die Füße */ public Rectangle getRectPlayerFeet() { return new Rectangle(xCoordinate + 1, yCoordinate + 19, sizeX - 1, 3); } /** * * @return gibt den mittleren teil des Player2 als Rectangle aus, dies ist * Quasi der Collider für den Bauch. */ public Rectangle getRectPlayerBody() { return new Rectangle(xCoordinate, yCoordinate + 5, sizeX, 5); } /** * * @param feindPfeil * wenn Player2 vom Pfeil Rectangle von Player1 getroffen wird * wird das Spiel neu gestartet und der Player1 bekommt einen * Punkt */ public void checkCollisionArrow(Rectangle feindPfeil) { if (getRectPlayer().intersects(feindPfeil)) { game.restart(2); } } /** * Bei einem neustart werden die Koordinaten des Player2 wieder auf den * Anfang gesetzt */ public void reset() { xCoordinate = spawnx; yCoordinate = spawny; } }
[ "tim heesch" ]
tim heesch
22d3a959c302feb916f54ce1d491090a30c4586f
5c6c3107f20d27bad13ea899c94c13496cf1702c
/Vega/src/com/pearl/teachers/TeachersList.java
866c73d377354ee3b932fe077a4b7977f73b2451
[]
no_license
kishore-aerravelly-hoap/moca-andoid
dae0809feb7877b7b43bfa79cdb566eb781a0013
81db264ab07ca4203578d72e6158494c445737f8
refs/heads/master
2022-12-21T03:40:59.432688
2020-09-27T06:22:59
2020-09-27T06:22:59
298,966,210
0
0
null
null
null
null
UTF-8
Java
false
false
670
java
package com.pearl.teachers; import java.util.List; import com.pearl.ui.models.Teacher; // TODO: Auto-generated Javadoc /** * The Class TeachersList. */ public class TeachersList { /** The _teachers list. */ List<Teacher> _teachersList; /** * Gets the _teachers list. * * @return the _teachers list */ public List<Teacher> get_teachersList() { return _teachersList; } /** * Sets the _teachers list. * * @param _teachersList the new _teachers list */ public void set_teachersList(List<Teacher> _teachersList) { this._teachersList = _teachersList; } }
[ "kaerravelly@culinda.com" ]
kaerravelly@culinda.com
f75b1b599213050740f8204d80631b1ef67bdec7
0d1f3298bd45cb43073499fd721a03693f142397
/app/src/main/java/com/lindabot/torchpaint/MainActivity.java
8b1bb0d97c14a59434431376e51a34f678b63fd8
[]
no_license
LindaBot/TorchPaint
cf433566f806450758699f327859f6b63f54df3b
913ff74bcf17f037d54f40ea4c91e2a43be89685
refs/heads/master
2020-04-04T22:32:13.397473
2018-11-06T04:54:40
2018-11-06T04:54:40
156,327,371
0
0
null
null
null
null
UTF-8
Java
false
false
1,585
java
package com.lindabot.torchpaint; import android.hardware.camera2.CameraManager; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.view.KeyEvent; import android.widget.Toast; public class MainActivity extends AppCompatActivity { CameraManager cameraManager; String cameraID; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); cameraManager = (CameraManager) getSystemService(CAMERA_SERVICE); try{ cameraID = cameraManager.getCameraIdList()[0]; } catch (Exception e) { Log.d("Error", "No camera found"); } } @Override public boolean onKeyUp(int keyCode, KeyEvent event) { super.onKeyUp(keyCode, event); if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN || keyCode == KeyEvent.KEYCODE_VOLUME_UP) { SetTorch(false); return true; } return false; } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { super.onKeyDown(keyCode, event); if (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN || keyCode == KeyEvent.KEYCODE_VOLUME_UP) { SetTorch(true); return true; } return false; } public void SetTorch(boolean state){ try{ cameraManager.setTorchMode(cameraID, state); } catch (Exception e) { Log.d("Error", "Can't turn on torch"); } } }
[ "voidnullbot@outlook.com" ]
voidnullbot@outlook.com
628aaf0d9db9490843ab91f575e045aa07689d3e
ac3a7a8d120d4e281431329c8c9d388fcfb94342
/src/test/java/com/leetcode/algorithm/medium/triangle/SolutionTest.java
2c7bf143269cfe31967037d35b1aec2e96295ee6
[ "MIT" ]
permissive
paulxi/LeetCodeJava
c69014c24cda48f80a25227b7ac09c6c5d6cfadc
10b4430629314c7cfedaae02c7dc4c2318ea6256
refs/heads/master
2021-04-03T08:03:16.305484
2021-03-02T06:20:24
2021-03-02T06:20:24
125,126,097
3
3
null
null
null
null
UTF-8
Java
false
false
471
java
package com.leetcode.algorithm.medium.triangle; import org.junit.jupiter.api.Test; import java.util.Arrays; import static org.junit.jupiter.api.Assertions.assertEquals; public class SolutionTest { @Test public void testCase1() { Solution solution = new Solution(); assertEquals(11, solution.minimumTotal(Arrays.asList( Arrays.asList(2), Arrays.asList(3, 4), Arrays.asList(6, 5, 7), Arrays.asList(4, 1, 8, 3) ))); } }
[ "paulxi@gmail.com" ]
paulxi@gmail.com
96facae1a628d5e9cb704a52faad8e648bdd0177
35aaaa628f40ef9eadddd0b86351dea6455fbfe7
/app/src/main/java/com/example/dell/carz/PagerAdapter.java
94f93378191b2d4fc74b8d2116c8987ae608dea7
[]
no_license
farhan9545/Carz
bb50037e4572a0e261839cac06dfc453ca584b23
5d1c0f67f2525ea74cb087f11d2f62179f9d6660
refs/heads/master
2020-04-23T22:12:44.792679
2019-02-19T15:00:39
2019-02-19T15:00:39
171,494,216
0
0
null
null
null
null
UTF-8
Java
false
false
1,028
java
package com.example.dell.carz; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; public class PagerAdapter extends FragmentPagerAdapter { int noOfTabs; Home h; Favorites f; My_ads m; Setting s; public PagerAdapter(FragmentManager fm, int noOfTabs) { super(fm); this.noOfTabs=noOfTabs; h= new Home(); f= new Favorites(); m= new My_ads(); s = new Setting(); } @Override public Fragment getItem(int position) { switch(position) { case 0: return h; case 1: return m; case 2: return f; case 3: return s; } return null; } public Home getH() { return h; } public void setH(Home h) { this.h = h; } @Override public int getCount() { return noOfTabs; } }
[ "farhanazhar507@gmail.com" ]
farhanazhar507@gmail.com
e5e83a53ad23f09e86197ae8f8cc657d2b60b2ed
dbb1266d87d160b24f3e4412ffcafca75982ed94
/app/src/main/java/com/conversionappandroid/HistoryFragment.java
20ed8877b492e956cc5f161f0c4343e44af18157
[]
no_license
DustinsCode/ConversionAppAndroidPart3
b6e3180c1c9da13be62407052f571fa20d87b890
4fd3e73465cfebb2e53198fa1dc231a984b06eee
refs/heads/master
2020-04-04T20:43:13.275889
2018-11-07T18:35:40
2018-11-07T18:35:40
156,258,311
0
0
null
null
null
null
UTF-8
Java
false
false
3,920
java
package com.conversionappandroid; import android.content.Context; import android.os.Bundle; import android.app.Fragment; import android.support.v7.widget.DividerItemDecoration; import android.support.v7.widget.GridLayoutManager; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.conversionappandroid.dummy.HistoryContent; import com.conversionappandroid.dummy.HistoryContent.HistoryItem; /** * A fragment representing a list of Items. * <p/> * Activities containing this fragment MUST implement the {@link OnListFragmentInteractionListener} * interface. */ public class HistoryFragment extends Fragment { // TODO: Customize parameter argument names private static final String ARG_COLUMN_COUNT = "column-count"; // TODO: Customize parameters private int mColumnCount = 1; private OnListFragmentInteractionListener mListener; /** * Mandatory empty constructor for the fragment manager to instantiate the * fragment (e.g. upon screen orientation changes). */ public HistoryFragment() { } // TODO: Customize parameter initialization @SuppressWarnings("unused") public static HistoryFragment newInstance(int columnCount) { HistoryFragment fragment = new HistoryFragment(); Bundle args = new Bundle(); args.putInt(ARG_COLUMN_COUNT, columnCount); fragment.setArguments(args); return fragment; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (getArguments() != null) { mColumnCount = getArguments().getInt(ARG_COLUMN_COUNT); } } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_history_list, container, false); // Set the adapter if (view instanceof RecyclerView) { Context context = view.getContext(); RecyclerView recyclerView = (RecyclerView) view; if (mColumnCount <= 1) { recyclerView.setLayoutManager(new LinearLayoutManager(context)); } else { recyclerView.setLayoutManager(new GridLayoutManager(context, mColumnCount)); } recyclerView.setAdapter(new HistoryAdapter(HistoryContent.ITEMS, mListener)); DividerItemDecoration did = new DividerItemDecoration(recyclerView.getContext(), DividerItemDecoration.VERTICAL); recyclerView.addItemDecoration(did); } return view; } @Override public void onAttach(Context context) { super.onAttach(context); if (context instanceof OnListFragmentInteractionListener) { mListener = (OnListFragmentInteractionListener) context; } else { throw new RuntimeException(context.toString() + " must implement OnListFragmentInteractionListener"); } } @Override public void onDetach() { super.onDetach(); mListener = null; } /** * This interface must be implemented by activities that contain this * fragment to allow an interaction in this fragment to be communicated * to the activity and potentially other fragments contained in that * activity. * <p/> * See the Android Training lesson <a href= * "http://developer.android.com/training/basics/fragments/communicating.html" * >Communicating with Other Fragments</a> for more information. */ public interface OnListFragmentInteractionListener { // TODO: Update argument type and name void onListFragmentInteraction(HistoryItem item); } }
[ "dthurston1996@gmail.com" ]
dthurston1996@gmail.com
8894f49f44e893288f7f916fe2c4367d0872191d
28081c1723844429eb47ce58e7674474160c36c8
/app/src/main/java/com/eswaraj/app/eswaraj/events/GetCategoriesImagesEvent.java
3a54e0b0b5b14fe436a133896d008af02d4e820c
[]
no_license
eswaraj/eswaraj-android-old
3ac153c493c47f5ed0f6a0d14c3e22bc02e9fcb9
5df9140db995bd48d2f3c0f8f4ec4ea8952c2f9d
refs/heads/master
2020-12-30T09:57:43.392971
2014-12-24T22:03:59
2014-12-24T22:03:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
213
java
package com.eswaraj.app.eswaraj.events; import com.eswaraj.app.eswaraj.base.BaseEvent; public class GetCategoriesImagesEvent extends BaseEvent { public GetCategoriesImagesEvent() { super(); } }
[ "vaibhavsinh@gmail.com" ]
vaibhavsinh@gmail.com
a8dfc3880833c99bc319fda5ad25fe3c719392d8
fb3909df9d6a2bb463a84317a5f4aa510d203b19
/src/com/company/Main.java
df1d35ed5366a654b626f88ff6ab00ea4316e9e9
[]
no_license
antialkash90210/JavaClasswork-8---hw-inner-for
fe5dcf584592fba8c659c03fa50addfe88dd9bb1
13b2b549dc99631c8829d0a57c4985c8525d215d
refs/heads/main
2023-05-07T18:56:00.658776
2021-05-28T18:17:46
2021-05-28T18:17:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
879
java
package com.company; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in); int countPersons = 10; int sum = 0; int currentMoney = 0; boolean isRun = true; for (int i = 0; i < countPersons && isRun == true; i++) { System.out.print("Input current money: "); currentMoney = input.nextInt(); sum += currentMoney; if (sum >= 200) { isRun = false; } } /*for (int i = 0; i < countPersons; i++) { System.out.print("Input current money: "); currentMoney = input.nextInt(); sum += currentMoney; if (sum >= 200) { break; } }*/ System.out.print("Sum money: " + sum); } }
[ "alek.kalashnikov32@yandex.ru" ]
alek.kalashnikov32@yandex.ru
d6c0fffbc752b5e77122d4fb41694440f928a46c
8c24826b10828de7d6bdedea5870a438313153da
/src/main/java/com/example/addressbook/Address.java
48f886b01a27f847737fdec512756c008e081e20
[]
no_license
Christina71/addressbook
a55ab0a58ddc59bf8a9ceda4e07b9488f79f4626
96ab63ecac75e49c62b5f6cc020b9f4024095898
refs/heads/master
2021-05-09T00:02:17.890876
2018-02-01T16:14:32
2018-02-01T16:14:32
119,732,709
0
0
null
null
null
null
UTF-8
Java
false
false
1,280
java
package com.example.addressbook; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; @Entity public class Address { @Id @GeneratedValue(strategy= GenerationType.AUTO) private long id; @NotNull @Size(min=2) private String name; @NotNull @Size(min=5) private String address1; @NotNull @Size(min=10) private String phone; @NotNull @Size(min=2) private String email; public long getId() { return id; } public void setId(long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getAddress1() { return address1; } public void setAddress1(String address1) { this.address1 = address1; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } }
[ "mariachristina71@yahoo.com" ]
mariachristina71@yahoo.com
750cd8c1a2bf5db610b66c7d532d7756238c5a69
b5923c7001feee565f7f62245f5b3fa3c0949295
/src/Sailboat.java
e8bd5b122a7af39be7d4938e24272984dab3291e
[]
no_license
Gekter/OOP_lab4
387847ab465a0ffde8d0badfd7337dcce8d24713
700cf60fa0a65572000656df38d2bd4aaa4d375a
refs/heads/master
2023-01-22T13:44:34.563026
2020-11-18T16:09:53
2020-11-18T16:09:53
313,987,709
0
0
null
null
null
null
UTF-8
Java
false
false
452
java
public class Sailboat extends Ship { private int amountOfMasts; public Sailboat(int amountOfMasts, String name) { this.amountOfMasts = amountOfMasts; this.name = name; this.speed = (float) 13.5; this.type = "Sailboat"; this.cost = 300; } @Override public String getShipFeatures() { return String.format("Количество мачт коробля - %s\n", amountOfMasts); } }
[ "vorobev.slava.17.01.02@mail.ru" ]
vorobev.slava.17.01.02@mail.ru
aaf977eac7c4815f479d62a2da8a6b15f7722398
02d739c5ce9d3ef8bf90e1612ccbf2bd3ffcca4a
/app/src/main/java/edu/umd/cs/treemap/AbstractMapLayout.java
a26f73847c935523122f99df244aeb75746b24f7
[]
no_license
adonayz/AlcoContextualizer
58f66525c9ac17e3d48114dba320e6128f7e9502
9cbe3b4762c99fef889a3d8ac3a55ea19abb5e37
refs/heads/master
2021-06-29T05:10:19.733406
2017-09-24T02:39:28
2017-09-24T02:39:28
104,611,913
0
0
null
null
null
null
UTF-8
Java
false
false
2,884
java
package edu.umd.cs.treemap; /** * Abstract class holding utility routines that several * implementations of MapLayout use. */ public abstract class AbstractMapLayout implements MapLayout { // Flags for type of rectangle division // and sort orders. public static final int VERTICAL = 0, HORIZONTAL = 1; public static final int ASCENDING = 0, DESCENDING = 1; /** * Subclasses implement this method themselves. */ public abstract void layout(Mappable[] items, Rect bounds); public void layout(MapModel model, Rect bounds) { layout(model.getItems(), bounds); } public static double totalSize(Mappable[] items) { return totalSize(items, 0, items.length - 1); } public static double totalSize(Mappable[] items, int start, int end) { double sum = 0; for (int i = start; i <= end; i++) sum += items[i].getSize(); return sum; } // For a production system, use a quicksort... public Mappable[] sortDescending(Mappable[] items) { Mappable[] s = new Mappable[items.length]; System.arraycopy(items, 0, s, 0, items.length); int n = s.length; boolean outOfOrder = true; while (outOfOrder) { outOfOrder = false; for (int i = 0; i < n - 1; i++) { boolean wrong = (s[i].getSize() < s[i + 1].getSize()); if (wrong) { Mappable temp = s[i]; s[i] = s[i + 1]; s[i + 1] = temp; outOfOrder = true; } } } return s; } public static void sliceLayout(Mappable[] items, int start, int end, Rect bounds, int orientation) { sliceLayout(items, start, end, bounds, orientation, ASCENDING); } public static void sliceLayout(Mappable[] items, int start, int end, Rect bounds, int orientation, int order) { double total = totalSize(items, start, end); double a = 0; boolean vertical = orientation == VERTICAL; for (int i = start; i <= end; i++) { Rect r = new Rect(); double b = items[i].getSize() / total; if (vertical) { r.x = bounds.x; r.w = bounds.w; if (order == ASCENDING) r.y = bounds.y + bounds.h * a; else r.y = bounds.y + bounds.h * (1 - a - b); r.h = bounds.h * b; } else { if (order == ASCENDING) r.x = bounds.x + bounds.w * a; else r.x = bounds.x + bounds.w * (1 - a - b); r.w = bounds.w * b; r.y = bounds.y; r.h = bounds.h; } items[i].setBounds(r); a += b; } } }
[ "adonayzenebe1000@gmail.com" ]
adonayzenebe1000@gmail.com
55b840b8d43167aabd20b0c04f701a7ea325a40a
10a9cf79e5a4a0a12cc4eda75e9bc25d778c75b0
/627_longest-palindrome/longest-palindrome.java
e2c4778e0859e5c05125d055224fa781411774ce
[]
no_license
SilverDestiny/LintCode
d1cd06bf7c218e61a9410dadbf03bbb47f0ce167
eb4e3ba601675e37511635c0be307706db4f19c4
refs/heads/master
2020-12-02T18:10:48.963573
2017-07-07T15:45:55
2017-07-07T15:45:55
96,489,141
0
4
null
null
null
null
UTF-8
Java
false
false
843
java
/* @Copyright:LintCode @Author: yun16 @Problem: http://www.lintcode.com/problem/longest-palindrome @Language: Java @Datetime: 17-02-23 00:10 */ public class Solution { /** * @param s a string which consists of lowercase or uppercase letters * @return the length of the longest palindromes that can be built */ public int longestPalindrome(String s) { // Write your code here int[] count = new int[256]; for (char c : s.toCharArray()) { count[c]++; } boolean hasOdd = false; int sum = 0; for (int i = 0; i < 256; i++) { if (count[i] % 2 == 0) { sum += count[i]; } else { hasOdd = true; sum += count[i] - 1; } } return hasOdd ? sum + 1 : sum; } }
[ "ly890611@gmail.com" ]
ly890611@gmail.com
d086f1920c25c8985f5601aad6fc3826862a2d73
900da577a8468b5289ed3e61331cf41643ee0506
/src/main/java/com/shoppingcart/dto/Item.java
f25151c7f5118d5334f21ad4632fcb87ff5d437a
[]
no_license
luisaoxxy/shopping-cart-sales-taxes
b01b3c941f4abf16ad7aacd563b774784e4b9ae0
00299f8e6fd867ebb0b0d51daf00c1d8ba00a843
refs/heads/master
2020-09-12T13:30:59.461612
2019-11-18T12:45:06
2019-11-18T12:45:06
222,440,885
0
0
null
null
null
null
UTF-8
Java
false
false
1,847
java
package com.shoppingcart.dto; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; public class Item { private int amount; private String name; private boolean imported; private boolean exempt; private double price; private double saleTax; public String getName() { return name; } public int getAmount() { return amount; } public boolean isImported() { return imported; } public boolean isExempt() { return exempt; } public double getPrice() { return this.price; } public double getTotalPrice() { return this.price + saleTax; } public void setSaleTax(double tax) { this.saleTax = tax; } public double getSaleTax() { return saleTax; } public static class Builder { private final Item object; public Builder withName(String value) { object.name = value; return this; } public Builder withImported(boolean value) { object.imported = value; return this; } public Builder withExempt(boolean value) { object.exempt = value; return this; } public Builder withAmount(int value) { object.amount = value; return this; } public Builder withPrice(double value) { object.price = value; return this; } public Builder withSaleTax(double value) { object.saleTax = value; return this; } public Builder() { object = new Item(); } public Item build() { return object; } } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Item aItem = (Item) o; return new EqualsBuilder().append(name, aItem.name) .append(imported, aItem.imported).isEquals(); } @Override public int hashCode() { return new HashCodeBuilder(7, 37) .append(name).append(imported).toHashCode(); } }
[ "luis.cabezas@talentum.com.es" ]
luis.cabezas@talentum.com.es
977eb3bf930bbb988f5028da671800031770a7c6
6bddc6756d26508f8b33249ca25009fa6c1ec309
/src/main/java/org/example/redistest/Application.java
acb87c678363fc92a3dde18f3a45c31b234923e8
[]
no_license
avaness/redis-test
92b5de1f9aef26fecfcd42ac6e2aee998b4c8ab6
681c0e681a7519cf7cdd4473a555f9262a9821ae
refs/heads/main
2023-03-22T13:43:05.675896
2021-03-07T19:55:07
2021-03-07T19:55:07
342,095,951
0
0
null
null
null
null
UTF-8
Java
false
false
302
java
package org.example.redistest; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class Application { public static void main(String[] args) { SpringApplication.run(Application.class, args); } }
[ "ivan.lazarev@gmail.com" ]
ivan.lazarev@gmail.com
c2f9b7eed4e0eab406335bbcb72bb482a1a048ac
fc7e432794876a636854cf241ecf42cdc2b4e32e
/teacherProj/src/io_p/FileMain.java
a9dcaa21c5bd461721d328b05dd967cafaf2ec04
[]
no_license
jx007/proj1
dfb14f096b925e36e7df0b8af10272e1efb44ced
61da89cb69227e97b5810f4b5b8b3d64488c48a4
refs/heads/master
2021-01-04T14:08:43.677205
2017-04-17T03:08:24
2017-04-17T03:08:24
88,452,896
0
0
null
null
null
null
UTF-8
Java
false
false
1,146
java
package io_p; import java.io.File; import java.text.SimpleDateFormat; public class FileMain { public static void main(String[] args) { // TODO Auto-generated method stub File ff = new File("fff/vvv/yyy"); System.out.println(ff.exists()); System.out.println(ff.getName()); System.out.println(ff.isDirectory()); System.out.println(ff.isFile()); System.out.println(ff.getPath()); System.out.println(ff.getAbsolutePath()); System.out.println(ff.getParent()); System.out.println(ff.delete()); //System.out.println(ff.mkdir()); System.out.println(ff.mkdirs()); System.out.println("---------------"); ff = new File("fff"); File [] files = ff.listFiles(); SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss"); for(File f : files) { String attr = ""; if(f.isDirectory()) attr="[dir]"; else{ attr = f.length()+" "; attr+= f.canRead() ? "R":" "; attr+= f.canWrite() ? "W":" "; attr+= f.isHidden() ? "H":" "; } System.out.println(f.getName()+"\t"+attr+"\t"+ sdf.format(f.lastModified())); } } }
[ "user@user-pc" ]
user@user-pc
66be90f29ec9964c494c728f368abcb4336b5cbf
f417dbb7856d987373c1588014b9aed059235015
/spring-expression/src/main/java/org/springframework/expression/spel/ast/OpEQ.java
b79e045b62b59100c60f1b61e661de733bac9476
[ "Apache-2.0" ]
permissive
MonsterCodingJ/spring-framework
975c0bc44247cfbd367bdb35da67146c0d7e3971
5f152cb1530ea88485efef115e0ff05687301792
refs/heads/master
2022-12-05T04:43:08.831380
2020-08-28T00:47:56
2020-08-28T00:47:56
290,420,347
0
0
null
null
null
null
UTF-8
Java
false
false
3,522
java
/* * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.expression.spel.ast; import org.springframework.asm.MethodVisitor; import org.springframework.expression.EvaluationContext; import org.springframework.expression.EvaluationException; import org.springframework.expression.spel.CodeFlow; import org.springframework.expression.spel.ExpressionState; import org.springframework.expression.spel.support.BooleanTypedValue; /** * Implements the equality operator. * * @author Andy Clement * @since 3.0 */ public class OpEQ extends Operator { public OpEQ(int pos, SpelNodeImpl... operands) { super("==", pos, operands); this.exitTypeDescriptor = "Z"; } @Override public BooleanTypedValue getValueInternal(ExpressionState state) throws EvaluationException { Object left = getLeftOperand().getValueInternal(state).getValue(); Object right = getRightOperand().getValueInternal(state).getValue(); this.leftActualDescriptor = CodeFlow.toDescriptorFromObject(left); this.rightActualDescriptor = CodeFlow.toDescriptorFromObject(right); return BooleanTypedValue.forValue(equalityCheck(state.getEvaluationContext(), left, right)); } // This check is different to the one in the other numeric operators (OpLt/etc) // because it allows for simple object comparison @Override public boolean isCompilable() { SpelNodeImpl left = getLeftOperand(); SpelNodeImpl right = getRightOperand(); if (!left.isCompilable() || !right.isCompilable()) { return false; } String leftDesc = left.exitTypeDescriptor; String rightDesc = right.exitTypeDescriptor; DescriptorComparison dc = DescriptorComparison.checkNumericCompatibility(leftDesc, rightDesc, this.leftActualDescriptor, this.rightActualDescriptor); return (!dc.areNumbers || dc.areCompatible); } @Override public void generateCode(MethodVisitor mv, CodeFlow cf) { cf.loadEvaluationContext(mv); String leftDesc = getLeftOperand().exitTypeDescriptor; String rightDesc = getRightOperand().exitTypeDescriptor; boolean leftPrim = CodeFlow.isPrimitive(leftDesc); boolean rightPrim = CodeFlow.isPrimitive(rightDesc); cf.enterCompilationScope(); getLeftOperand().generateCode(mv, cf); cf.exitCompilationScope(); if (leftPrim) { CodeFlow.insertBoxIfNecessary(mv, leftDesc.charAt(0)); } cf.enterCompilationScope(); getRightOperand().generateCode(mv, cf); cf.exitCompilationScope(); if (rightPrim) { CodeFlow.insertBoxIfNecessary(mv, rightDesc.charAt(0)); } String operatorClassName = Operator.class.getName().replace('.', '/'); String evaluationContextClassName = EvaluationContext.class.getName().replace('.', '/'); mv.visitMethodInsn(INVOKESTATIC, operatorClassName, "equalityCheck", "(L" + evaluationContextClassName + ";Ljava/lang/Object;Ljava/lang/Object;)Z", false); cf.pushDescriptor("Z"); } }
[ "459997077@qq.com" ]
459997077@qq.com
255236da9596807f9c9327afcf9747bab584d4f4
fcec9fda6e70d19499fa078d2246189df31dfeac
/src/main/java/com/topicos/fatec/turma/Service.java
a31c0d49a76900180aecd020d1694cc89a935f7f
[]
no_license
Lucas-Chaves/projeto-topicos-especiais
8d919785db106ec0f73f54b168efe9d1b40d5352
86b5460ad708b9dd949c6b80869cccd5119616bb
refs/heads/master
2020-07-10T06:29:50.238772
2019-09-03T01:39:08
2019-09-03T01:39:08
204,193,538
0
1
null
2019-08-24T20:49:04
2019-08-24T17:58:31
Java
UTF-8
Java
false
false
363
java
package com.topicos.fatec.turma; import org.springframework.http.ResponseEntity; import java.util.List; public interface Service { public List<Turma> buscaTurma(String nome); public ResponseEntity<Object> criaTurma(Turma turma); public ResponseEntity<Object> criaProfessor(Long id, Professor professor); public Professor buscaProfessor(String nome); }
[ "lucas.limachaves@outlook.com" ]
lucas.limachaves@outlook.com
d78dec771f68f64baad1b2f377250fa26dac8034
81d110494ef7d33fbf84faf4170652d06eb73c4e
/src/com/catolicasc/footballpool/ActionPaginaInicial.java
0eb6d11899466a11725eaa52eb8dfee8541b45cc
[]
no_license
eduardobarbiero/FootBallPool
82f4e62f45ffcc0c73d51c4a2239b060abcd0c0e
04fb7adcb02cef3f469400d3fc83998c4667d04e
refs/heads/master
2021-01-17T13:16:50.803068
2016-08-05T23:43:15
2016-08-05T23:43:15
64,888,156
0
0
null
null
null
null
UTF-8
Java
false
false
515
java
package com.catolicasc.footballpool; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; public class ActionPaginaInicial implements Action { @Override public String execute(HttpServletRequest request, HttpServletResponse response) throws Exception { ClientSoapConnect client = new ClientSoapConnect(); request.setAttribute("teams", client.getTeams()); return "/WEB-INF/Team/team-list.jsp"; } }
[ "eduardombarbiero@gmail.com" ]
eduardombarbiero@gmail.com
b6f2557d9bab53cc74f7226c6bd380ea65df19ef
2bd953cedbc6322ea0beb86e66bf859b3414be7e
/src/test/java/com/elte/soulmate/registration/repository/timezone/DateTimeWrapper.java
55fbf4e714a29d62e3044cc7e79808642f6de87f
[]
no_license
raufhacizade/soulmate-registration
d7f39f82dbdbe205707367e3a1924518a5804385
dd446d8e7251dc2e2cbfc9401cb8b40855821113
refs/heads/master
2023-04-21T07:35:34.554596
2021-05-14T12:19:42
2021-05-14T12:19:42
367,353,815
0
0
null
null
null
null
UTF-8
Java
false
false
3,111
java
package com.elte.soulmate.registration.repository.timezone; import java.io.Serializable; import java.time.*; import java.util.Objects; import javax.persistence.*; @Entity @Table(name = "jhi_date_time_wrapper") public class DateTimeWrapper implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; @Column(name = "instant") private Instant instant; @Column(name = "local_date_time") private LocalDateTime localDateTime; @Column(name = "offset_date_time") private OffsetDateTime offsetDateTime; @Column(name = "zoned_date_time") private ZonedDateTime zonedDateTime; @Column(name = "local_time") private LocalTime localTime; @Column(name = "offset_time") private OffsetTime offsetTime; @Column(name = "local_date") private LocalDate localDate; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Instant getInstant() { return instant; } public void setInstant(Instant instant) { this.instant = instant; } public LocalDateTime getLocalDateTime() { return localDateTime; } public void setLocalDateTime(LocalDateTime localDateTime) { this.localDateTime = localDateTime; } public OffsetDateTime getOffsetDateTime() { return offsetDateTime; } public void setOffsetDateTime(OffsetDateTime offsetDateTime) { this.offsetDateTime = offsetDateTime; } public ZonedDateTime getZonedDateTime() { return zonedDateTime; } public void setZonedDateTime(ZonedDateTime zonedDateTime) { this.zonedDateTime = zonedDateTime; } public LocalTime getLocalTime() { return localTime; } public void setLocalTime(LocalTime localTime) { this.localTime = localTime; } public OffsetTime getOffsetTime() { return offsetTime; } public void setOffsetTime(OffsetTime offsetTime) { this.offsetTime = offsetTime; } public LocalDate getLocalDate() { return localDate; } public void setLocalDate(LocalDate localDate) { this.localDate = localDate; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } DateTimeWrapper dateTimeWrapper = (DateTimeWrapper) o; return !(dateTimeWrapper.getId() == null || getId() == null) && Objects.equals(getId(), dateTimeWrapper.getId()); } @Override public int hashCode() { return Objects.hashCode(getId()); } // prettier-ignore @Override public String toString() { return "TimeZoneTest{" + "id=" + id + ", instant=" + instant + ", localDateTime=" + localDateTime + ", offsetDateTime=" + offsetDateTime + ", zonedDateTime=" + zonedDateTime + '}'; } }
[ "hrauf1000@gmail.com" ]
hrauf1000@gmail.com
b7065ad846432915bbe4c45b45d8ac5fae5de868
28e511d6aad2bbd6c0e5e481fdf162beb36f9f7e
/2 período/Programação Modular/Herança_03/src/applicationFive/Employee.java
facbec0f246a749bf749d2d7f935c6787caa58b1
[]
no_license
mcarneirobug/EngenhariaDeSoftware
a9dbd0aebdc480fb243d3ba0e374cce7b11b7ac1
37f77955a52b54fefe0b8cb5c2e70309593ea61e
refs/heads/master
2022-11-21T14:50:56.911830
2020-06-25T12:34:34
2020-06-25T12:34:34
191,658,442
0
0
null
null
null
null
UTF-8
Java
false
false
909
java
package applicationFive; public class Employee extends NaturalPerson { private String office; private double salary; public Employee(String name, String address, long phone, long zipCode, String city, String uf, long cpf, int age, char genre, String office, double salary) { super(name, address, phone, zipCode, city, uf, cpf, age, genre); this.setOffice(office); this.setSalary(salary); }//end constructor() public String getOffice() { return this.office; }//end getOffice() public void setOffice(String office) { this.office = office; }//end setOffice() public double getSalary() { return this.salary; }//end getSalary() public void setSalary(double salary) { this.salary = salary; }//end setSalary() }//end class Employee()
[ "mcarneiro@sga.pucminas.br" ]
mcarneiro@sga.pucminas.br
ef067ebb7e7d19e9ed2caee7e9aa23eee795b935
b6e5164a2d1ec8d84e2a056c123f8377ed76781b
/스프링 JPA활용1/springjpa1/src/main/java/jpabook/youji/controller/OrderController.java
34068a536d79622794cf2cbb9d5fc42a978a40c1
[]
no_license
YOUJI2/SringJPA
274d6b0d258d77688bb70ddd3595f6ed92464a97
512fb8e2cad1b9fe1dae1fbd2b2b7a29611de976
refs/heads/master
2023-03-03T13:17:05.809237
2021-02-13T19:55:12
2021-02-13T19:55:12
338,637,497
0
0
null
null
null
null
UTF-8
Java
false
false
1,832
java
package jpabook.youji.controller; import jpabook.youji.domain.Member; import jpabook.youji.domain.Order; import jpabook.youji.domain.item.Item; import jpabook.youji.repository.OrderSearch; import jpabook.youji.service.ItemService; import jpabook.youji.service.MemberService; import jpabook.youji.service.OrderService; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.*; import java.util.List; @Controller @RequiredArgsConstructor public class OrderController { private final OrderService orderService; private final MemberService memberService; private final ItemService itemService; @GetMapping("/order") public String createForm(Model model){ List<Member> members = memberService.findMembers(); List<Item> items = itemService.findItems(); model.addAttribute("members",members); model.addAttribute("items",items); return "order/orderForm"; } @PostMapping("/order") public String order(@RequestParam("memberId") Long memberId, @RequestParam("itemId") Long itemID, @RequestParam("count") int count){ orderService.order(memberId, itemID, count); return "redirect:/orders"; } @GetMapping("/orders") public String orderList(@ModelAttribute("orderSearch")OrderSearch orderSearch , Model model){ List<Order> orders = orderService.findOrders(orderSearch); model.addAttribute("orders", orders); return "order/orderList"; } @PostMapping("/orders/{orderId}/cancel") public String cancelOrder(@PathVariable("orderId") Long orderId){ orderService.cancelOrder(orderId); return "redirect:/orders"; } }
[ "dbwlgna98@naver.com" ]
dbwlgna98@naver.com
36af8324d8cd0dab22dc6ceff321443f58b8a4e4
c41c33fd4f90300c667ab4e6fa53a23abcb69615
/exam1/hw2/Text.java
7d1bb7a61d83c07454e442e1d09421239a505dd9
[]
no_license
XiaofanLinUS/CS151
f166dbb7545e79e445419253e8e5b0c20dc043b6
fa12c45dcad987423910a09ff122d0689f1acf7d
refs/heads/master
2021-06-08T13:13:33.158002
2016-12-16T22:25:45
2016-12-16T22:25:45
66,685,875
0
0
null
null
null
null
UTF-8
Java
false
false
51
java
public interface Text { String getContent(); }
[ "xiaofanlinus@gmail.com" ]
xiaofanlinus@gmail.com
769fe992474946bde5d2544b16c87c6568379a44
f01d3c4fbf415c0828024b5c4ae1d992c8805e77
/src/test/java/edu/smith/cs/csc212/sorting/SelectionSortTest.java
663bb4f58b94d8696da416dd447d8b66a9193137
[]
no_license
taliajs/CSC212Sorting
9e3f3a6dfef4b95379de0cdaf0ada7f3608fe0f4
4f31c2e1579a1983b778dc23f3c7bb6f1817aea2
refs/heads/master
2020-09-01T19:10:04.460470
2019-11-08T20:09:14
2019-11-08T20:09:14
219,033,854
0
0
null
2019-11-01T17:39:32
2019-11-01T17:39:31
null
UTF-8
Java
false
false
994
java
package edu.smith.cs.csc212.sorting; import java.util.Arrays; import java.util.List; import java.util.Random; import org.junit.Assert; import org.junit.Test; import me.jjfoley.adt.ListADT; import me.jjfoley.adt.impl.JavaList; @SuppressWarnings("javadoc") public class SelectionSortTest { @Test public void testSelectionSort() { ListADT<Integer> sortMe = new JavaList<>(); for (int y : SortTestingHelpers.data) { sortMe.addBack(y); } SelectionSort.sort(sortMe); Assert.assertTrue(SortTestingHelpers.checkSorted(sortMe, SortTestingHelpers.data.length)); Random rand = new Random(13); // For good measure, let's shuffle it and sort it again to see if that works, too. sortMe.shuffle(rand); SelectionSort.sort(sortMe); Assert.assertTrue(SortTestingHelpers.checkSorted(sortMe, SortTestingHelpers.data.length)); // check it is the original size Assert.assertEquals(sortMe.size(), SortTestingHelpers.data.length); } }
[ "tj.seshaiah@gmail.com" ]
tj.seshaiah@gmail.com
daf4216f853219846658158f3a96e25039b15a76
307c96177195afafc1277b6bbc99f2220fb37584
/src/main/java/com/laptrinhjavaweb/dto/RoleDto.java
bc22d495a297343251957fadf5c5c604fd2e161b
[]
no_license
taivtse/estate-jsp-servlet-project
d71c853a2922acdcf8b3967a121d0cf4534e0d73
a21de2c317feb64f38c76109b1e0e90fab081909
refs/heads/master
2020-04-22T10:18:21.461926
2019-05-07T10:52:02
2019-05-07T10:52:02
170,300,543
0
0
null
null
null
null
UTF-8
Java
false
false
513
java
package com.laptrinhjavaweb.dto; public class RoleDto { private Integer id; private String code; private String name; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
[ "taivtse@gmail.com" ]
taivtse@gmail.com
32d8b06b2685ac74b884f83491507cab27788827
f7ebfbc6277c4d88a57fee1ed3211bda3621b820
/chatbot2.0/src/service/ClienteService.java
299002a570558e363c6076ff4597ae09867ea1a0
[]
no_license
ccop2anprojeto/Chatbot
ab36658f69132eb93b86904dfce537974ec9f6f2
d2f5bf937c47230aa35f8400abcf3cffd8084356
refs/heads/master
2021-07-11T04:07:21.857239
2018-06-21T20:06:26
2018-06-21T20:06:26
124,788,609
0
0
null
null
null
null
UTF-8
Java
false
false
522
java
package service; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import dao.ConnectionFactory; import dao.ClienteDAO; import model.Cliente; public class ClienteService { ClienteDAO dao = new ClienteDAO(); public int criar(Cliente cliente) { return dao.criar(cliente); } public Cliente buscar(String cpf){ return dao.buscar(cpf); } public Cliente buscarId(int idC){ return dao.buscarId(idC); } }
[ "ccop2anprojeto@gmail.com" ]
ccop2anprojeto@gmail.com
8f47479fd3ae9a8034d1f2889d8d132bfb34adb7
8512eead220d0ff9365961954fec9bbbe6a1dbf9
/src/main/java/org/car_rental/config/DateTimeFormatConfiguration.java
8188f392128e9e8bd3b1935d8f047cf29b1c9755
[]
no_license
BelhassenZ/car_rental
8f52e35e4951118ecd6bcc42ce4f250b5269e495
0198b583faf15fdf1b8eab25f53eaf895c90bbdf
refs/heads/master
2021-07-01T02:25:34.360153
2018-03-07T13:42:44
2018-03-07T13:42:44
124,234,825
0
1
null
2020-09-18T14:57:08
2018-03-07T12:46:27
Java
UTF-8
Java
false
false
652
java
package org.car_rental.config; import org.springframework.context.annotation.Configuration; import org.springframework.format.FormatterRegistry; import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar; import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; @Configuration public class DateTimeFormatConfiguration extends WebMvcConfigurerAdapter { @Override public void addFormatters(FormatterRegistry registry) { DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar(); registrar.setUseIsoFormat(true); registrar.registerFormatters(registry); } }
[ "zinelabidineb@gmail.com" ]
zinelabidineb@gmail.com
0ad7191105adda97e239547beee43464f269ba20
5a516dfe0f5c350abbf3f88e2639f594039f20c8
/src/main/java/com/cloudberry/cloudberry/properties/ApiPropertyRepository.java
c231d845d7cb235c73e30f48bc9afdd485aee143
[ "MIT" ]
permissive
olliekrk/cloud-berry
9e3799022a5a1b18a94e15e122d4b1422a5e4e43
8b39fb0b4f8772348fb50c0c1d0200c96df03cbe
refs/heads/master
2023-01-21T21:46:50.524793
2020-12-02T21:29:47
2020-12-02T21:29:47
251,077,744
0
0
null
null
null
null
UTF-8
Java
false
false
369
java
package com.cloudberry.cloudberry.properties; import com.cloudberry.cloudberry.properties.model.ApiProperty; import org.jetbrains.annotations.NotNull; import org.springframework.data.repository.CrudRepository; import java.util.List; public interface ApiPropertyRepository extends CrudRepository<ApiProperty, String> { @NotNull List<ApiProperty> findAll(); }
[ "krolik.olgierd@gmail.com" ]
krolik.olgierd@gmail.com
284fcacb5547d691467a5ef229c6f13be5195b93
8b404a081cea61e1024e980fe3da4e2d62dcaed8
/app/src/main/java/yyl/rabbitcloud/slash/SplashPresenter.java
0f95fbb28c9cf12fbbfea60cb6499f6da2f5106a
[ "Apache-2.0" ]
permissive
yiwuxue/RabbitCloud
97eae781825dd23cbc7ad22195e9f9ec7c33e369
1939198870a9393ee87c878d9ee46da3565412ef
refs/heads/master
2020-12-02T08:02:38.751811
2017-07-06T13:47:40
2017-07-06T13:47:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,248
java
package yyl.rabbitcloud.slash; import javax.inject.Inject; import io.reactivex.annotations.NonNull; import io.reactivex.disposables.Disposable; import io.reactivex.functions.Consumer; import io.reactivex.functions.Function; import yyl.rabbitcloud.App; import yyl.rabbitcloud.base.RxPresenter; import yyl.rabbitcloud.bean.SplashScreenBean; import yyl.rabbitcloud.http.RabbitApi; /** * Created by yyl on 2017/6/15. */ public class SplashPresenter extends RxPresenter<SplashContract.View> implements SplashContract.Presenter<SplashContract.View> { private RabbitApi mRabbitApi; @Inject SplashPresenter(RabbitApi rabbitApi) { this.mRabbitApi = rabbitApi; } @Override public void getSplashData() { Disposable disposable = mRabbitApi.getSplashData() .subscribe(new Consumer<SplashScreenBean>() { @Override public void accept(@NonNull SplashScreenBean splashScreenBean) throws Exception { if (splashScreenBean != null && mView != null) { mView.showSplashData(splashScreenBean); } } }); addDisposable(disposable); } }
[ "yin_yiliang66@163.com" ]
yin_yiliang66@163.com
119ce99cf14de3f2bf9ccf299cc404104680a05b
d1ecb29c2592701a8ffe4e47a3be87ee8a734a50
/src/main/java/com/blockchainlove/vow/controller/UserManagerController.java
278e371e28c6c91647b3571f78d9a78570ecf259
[]
no_license
Silentttttt/authwords
a0bc744892f411a03f6bc77c2cbd2dbb876e0c22
1ee639b2102dd557af99a7193f62c09d4fb8cdcf
refs/heads/master
2020-03-15T20:29:29.675279
2018-05-20T14:15:28
2018-05-20T14:15:28
132,333,647
0
0
null
null
null
null
UTF-8
Java
false
false
8,989
java
/** * Alipay.com Inc. * Copyright (c) 2004-2018 All Rights Reserved. */ package com.blockchainlove.vow.controller; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import com.blockchainlove.vow.common.basemodel.SingleQueryResult; import com.blockchainlove.vow.common.constant.CommonConstant; import com.blockchainlove.vow.common.enums.BaseExceptionEnum; import com.blockchainlove.vow.common.exception.BaseException; import com.blockchainlove.vow.common.utils.LoggerUtil; import com.blockchainlove.vow.dao.VowUserMapper; import com.blockchainlove.vow.domain.entity.VowUser; import com.blockchainlove.vow.service.CAPTCHAService; import com.blockchainlove.vow.service.SendSmsService; import com.blockchainlove.vow.service.VowUserService; import com.blockchainlove.vow.vo.request.CaptchaRequest; import com.blockchainlove.vow.vo.request.LoginRequest; import com.blockchainlove.vow.vo.request.SmsVerifyCodeRequest; import com.blockchainlove.vow.vo.request.UserLoginRequest; import com.blockchainlove.vow.vo.response.UserInfo; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * 用户注册流程,通过人机校验,发送短信验证码,创建用户 * * @author zhangyu * @version $Id: UserManagerController.java, v 0.1 2018年04月30日 下午9:17 zhangyu Exp $ */ @RestController @RequestMapping("/userManager") public class UserManagerController { private final Logger logger = LoggerFactory.getLogger(this.getClass()); @Autowired @Qualifier("CAPTCHAServiceX") private CAPTCHAService captchaService; @Autowired @Qualifier("sendSmsServiceX") private SendSmsService sendSmsService; @Autowired @Qualifier("VowUserServiceX") private VowUserService vowUserService; @Autowired private VowUserMapper vowUserMapper; @RequestMapping("/getCAPTCHA") public SingleQueryResult<String> getCAPTCHA(@RequestBody CaptchaRequest bizRequest) { SingleQueryResult result = new SingleQueryResult(); try { if (null == bizRequest) { throw new BaseException(BaseExceptionEnum.ILLEGAL_PARAMETER); } String phone = bizRequest.getPhone(); if (StringUtils.isBlank(phone)) { throw new BaseException(BaseExceptionEnum.ILLEGAL_PARAMETER); } Map map = captchaService.getCode(); String code = (String) map.get("code"); String url = (String) map.get("codeUrl"); vowUserService.updateCaptchaCodeByPhone(code, phone); //HttpSession session = request.getSession(); //session.setAttribute("code", code); result.setValue(url); return result; } catch (BaseException e) { result.setSuccess(false); result.setErrorCode(e.getErrorEnum().getCode()); result.setErrorMsg(e.getErrorEnum().getDesc()); LoggerUtil.error(e, logger, "UserManagerController.getCAPTCHA出现业务异常,bizRequest={0}", bizRequest); } catch (Exception e) { result.setSuccess(false); result.setErrorCode(BaseExceptionEnum.SYSTEM_ERROR.getCode()); result.setErrorMsg(BaseExceptionEnum.SYSTEM_ERROR.getDesc()); LoggerUtil.error(e, logger, "UserManagerController.getCAPTCHA出现系统异常,bizRequest={0}", bizRequest); } return null; } @RequestMapping("/sendSmsVerifyCode") public SingleQueryResult<String> sendSmsVerifyCode(@RequestBody SmsVerifyCodeRequest bizRequest) { SingleQueryResult result = new SingleQueryResult(); try { if (null == bizRequest) { throw new BaseException(BaseExceptionEnum.ILLEGAL_PARAMETER); } String phone = bizRequest.getPhone(); if (StringUtils.isBlank(phone)) { throw new BaseException(BaseExceptionEnum.ILLEGAL_PARAMETER); } String captchaCode = bizRequest.getCaptchaCode(); if (StringUtils.isBlank(captchaCode)) { throw new BaseException(BaseExceptionEnum.ILLEGAL_PARAMETER); } VowUser vowUser = vowUserMapper.queryUserByPhone(bizRequest.getPhone()); if (null == vowUser) { throw new BaseException(BaseExceptionEnum.ILLEGAL_PARAMETER); } //人机识别码有效期5分钟,超过时间需要重新生成 if (System.currentTimeMillis() - vowUser.getCaptchaCodeCreateTime().getTime() > 5 * 60 * 1000) { throw new BaseException(BaseExceptionEnum.CAPTCHA_CODE_TIMEOUT); } if (!StringUtils.equals(vowUser.getCaptchaCode(), captchaCode)) { throw new BaseException(BaseExceptionEnum.CAPTCHA_CODE_NOT_MATCH); } //短信码一分钟内只能生成一次 if (System.currentTimeMillis() - vowUser.getCaptchaCodeCreateTime().getTime() < 1 * 60 * 1000) { throw new BaseException(BaseExceptionEnum.CAPTCHA_CODE_TIMEOUT); } String smsVerifyCode = sendSmsService.getSMSVerifyCode(phone); vowUserService.updateSMSVerifyCodeByPhone(smsVerifyCode, phone); return result; } catch (BaseException e) { result.setSuccess(false); result.setErrorCode(e.getErrorEnum().getCode()); result.setErrorMsg(e.getErrorEnum().getDesc()); LoggerUtil.error(e, logger, "UserManagerController.sendSmsVerifyCode出现业务异常,bizRequest={0}", bizRequest); } catch (Exception e) { result.setSuccess(false); result.setErrorCode(BaseExceptionEnum.SYSTEM_ERROR.getCode()); result.setErrorMsg(BaseExceptionEnum.SYSTEM_ERROR.getDesc()); LoggerUtil.error(e, logger, "UserManagerController.sendSmsVerifyCode出现系统异常,bizRequest={0}", bizRequest); } return null; } @RequestMapping("/createUser") public SingleQueryResult<UserInfo> createUser(UserLoginRequest request) { return null; } @RequestMapping("/sendSMSAuthCode") public SingleQueryResult<UserInfo> sendSMSAuthCode(UserLoginRequest request) { return null; } @RequestMapping("/login") public SingleQueryResult<String> login(@RequestBody LoginRequest bizRequest, HttpServletRequest httpRequest) { SingleQueryResult result = new SingleQueryResult(); try { if (null == bizRequest) { throw new BaseException(BaseExceptionEnum.ILLEGAL_PARAMETER); } String phone = bizRequest.getPhone(); if (StringUtils.isBlank(phone)) { throw new BaseException(BaseExceptionEnum.ILLEGAL_PARAMETER); } String smsVerifyCode = bizRequest.getSmsVerifyCode(); if (StringUtils.isBlank(smsVerifyCode)) { throw new BaseException(BaseExceptionEnum.ILLEGAL_PARAMETER); } VowUser vowUser = vowUserMapper.queryUserByPhone(bizRequest.getPhone()); if (null == vowUser) { throw new BaseException(BaseExceptionEnum.ILLEGAL_PARAMETER); } //短信验证码有效期5分钟,超过时间需要重新生成 if (System.currentTimeMillis() - vowUser.getSmsVerifyCodeCreateTime().getTime() > 5 * 60 * 1000) { throw new BaseException(BaseExceptionEnum.SMS_VERIFY_CODE_TIMEOUT); } if (!StringUtils.equals(vowUser.getSmsVerifyCode(), smsVerifyCode)) { throw new BaseException(BaseExceptionEnum.SMS_VERIFY_CODE_NOT_MATCH); } HttpSession session = httpRequest.getSession(); session.setAttribute(CommonConstant.LOGIN_ATTR_KEY, vowUser.getId()); return result; } catch (BaseException e) { result.setSuccess(false); result.setErrorCode(e.getErrorEnum().getCode()); result.setErrorMsg(e.getErrorEnum().getDesc()); LoggerUtil.error(e, logger, "UserManagerController.sendSmsVerifyCode出现业务异常,bizRequest={0}", bizRequest); } catch (Exception e) { result.setSuccess(false); result.setErrorCode(BaseExceptionEnum.SYSTEM_ERROR.getCode()); result.setErrorMsg(BaseExceptionEnum.SYSTEM_ERROR.getDesc()); LoggerUtil.error(e, logger, "UserManagerController.sendSmsVerifyCode出现系统异常,bizRequest={0}", bizRequest); } return null; } }
[ "zy134897@antfin.com" ]
zy134897@antfin.com
85b4f9aec52bce05553064a351ce3f2d5daf5d09
21bd0851e88735ea7db3bed7530444e4dd0cfb36
/app/src/main/java/com/mark/darkskyforecast/fragments/BasicForecastFrag.java
c6507fa16dbbcda6eeaa74aebaa36f9197621ec5
[]
no_license
marcosbmariano/DarkSkyForecast
6630c1f363261240b7b8eb96e2ac1869dc70aa52
a965b0c936e93adbe2ca382455df36644075e4fd
refs/heads/master
2021-01-10T07:53:22.990823
2016-01-04T22:26:32
2016-01-04T22:26:32
48,682,413
0
0
null
null
null
null
UTF-8
Java
false
false
648
java
package com.mark.darkskyforecast.fragments; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.mark.darkskyforecast.R; /** * Created by mark on 12/22/15. */ public class BasicForecastFrag extends Fragment{ @Nullable @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { ViewGroup rootView = (ViewGroup)inflater.inflate(R.layout.basic_forecast_layout, container, false); return rootView; } }
[ "marcosbmariano29@gmail.com" ]
marcosbmariano29@gmail.com
d36117d3f2de40f9325904507824831a591fca87
881d43b5ee517b253a0ac2e9152fc3edd3add5f1
/jLeetCode/src/main/java/me/sevenleaves/study/sortList/AbstractSort.java
baf117289d474a9018ce32944f2e4ba82cd75e69
[]
no_license
MonkeyDeKing/leetCode
45f1a322210f9b496c956f0b8b40b667ef9d2847
193d72133129e5000e1da52f992634f93cce70bf
refs/heads/master
2021-01-19T22:40:17.448184
2017-06-02T14:49:21
2017-06-02T14:49:21
88,836,677
0
0
null
null
null
null
UTF-8
Java
false
false
1,357
java
/** * @author Victor Young */ package me.sevenleaves.study.sortList; import java.util.Random; /** * @author Victor Young * @Todo: The root class of all simple sort algorithms on lists. */ public abstract class AbstractSort { public abstract void sort (ListNode head); public boolean less (ListNode n1, ListNode n2) { return n1.val < n2.val; } /** * Print the array in one line at console . */ public void show (ListNode head) { if (head == null) return; ListNode t = head; while (t.next != null) { System.out.print(t.val + " "); t = t.next; } System.out.print(t.val + " "); System.out.println(); } /** * the array is sorted until each a[i] greater than a[i-1]. */ public boolean isSorted (ListNode head) { if (head == null || head.next == null) return true; ListNode t = head; while (t.next != null) { if (t.val > t.next.val) return false; t = t.next; } return true; } public ListNode createList () { return createList(10); } public ListNode createList (int length) { Random rdm = new Random(System.currentTimeMillis()); ListNode head = new ListNode(rdm.nextInt(100)); ListNode cur = head; for (int i = 1; i < length; i++) { cur.next = new ListNode(rdm.nextInt(100)); cur = cur.next; } return head; } } // end of class.
[ "13272436992@163.com" ]
13272436992@163.com
d00e4d5e398188bedf77c306148e594d55268a4e
64bec4928c75d29e94dc90403c20f37db1c1f2ac
/nLayeredDemo/src/nLayeredDemo/dataAccess/concretes/HibernateProductDao.java
6915728c8a9dd8458b79bdd1e6347d14ade405be
[ "MIT" ]
permissive
ozkanakkaya/JavaKamp
bcdb3c8e9ff75f3664a4db9bd4a617a722a8ce42
6a208d402ba23d992fa2ee29cb2c6357e482c9db
refs/heads/main
2023-05-27T12:58:41.183946
2021-06-15T02:03:54
2021-06-15T02:03:54
365,392,028
2
0
null
null
null
null
UTF-8
Java
false
false
736
java
package nLayeredDemo.dataAccess.concretes; import java.util.List; import nLayeredDemo.dataAccess.abstracts.ProductDao; import nLayeredDemo.entities.concretes.Product; public class HibernateProductDao implements ProductDao { @Override public void add(Product product) { System.out.println("Hibernate ile eklendi "+product.getName()); } @Override public void update(Product product) { // TODO Auto-generated method stub } @Override public void delete(Product product) { // TODO Auto-generated method stub } @Override public Product get(int id) { // TODO Auto-generated method stub return null; } @Override public List<Product> getAll() { // TODO Auto-generated method stub return null; } }
[ "ozkanakkaya@hotmail.com.tr" ]
ozkanakkaya@hotmail.com.tr
ac59ce4c202f014b50989fa18ee5f1d9c01e453b
7b8cab091371062b82c85193062dc5742e4f50e0
/app/src/main/java/min3d/test/com/surfaceview/min3d/core/Object3dContainer.java
c5b402e6f8f78e07073730039b94183488cd278b
[]
no_license
leedobin/qq
babf48cea5c19b384681a160c22a29cc82f7dd0c
b2137c34bef43ac2488d0a703ee23946f5099e18
refs/heads/master
2021-05-02T07:08:50.103636
2018-02-11T05:50:56
2018-02-11T05:50:56
120,870,014
0
0
null
null
null
null
UTF-8
Java
false
false
2,794
java
package min3d.test.com.surfaceview.min3d.core; import java.util.ArrayList; import min3d.test.com.surfaceview.min3d.interfaces.IObject3dContainer; public class Object3dContainer extends Object3d implements IObject3dContainer { protected ArrayList<Object3d> _children = new ArrayList<Object3d>(); public Object3dContainer() { super(0, 0, false, false, false); } /** * Adds container functionality to Object3d. * * Subclass Object3dContainer instead of Object3d if you * believe you may want to add children to that object. */ public Object3dContainer(int $maxVerts, int $maxFaces) { super($maxVerts, $maxFaces, true,true,true); } public Object3dContainer(int $maxVerts, int $maxFaces, Boolean $useUvs, Boolean $useNormals, Boolean $useVertexColors) { super($maxVerts, $maxFaces, $useUvs,$useNormals,$useVertexColors); } /** * This constructor is convenient for cloning purposes */ public Object3dContainer(Vertices $vertices, FacesBufferedList $faces, TextureList $textures) { super($vertices, $faces, $textures); } public void addChild(Object3d $o) { _children.add($o); $o.parent(this); $o.scene(this.scene()); } public void addChildAt(Object3d $o, int $index) { _children.add($index, $o); $o.parent(this); $o.scene(this.scene()); } public boolean removeChild(Object3d $o) { boolean b = _children.remove($o); if (b) { $o.parent(null); $o.scene(null); } return b; } public Object3d removeChildAt(int $index) { Object3d o = _children.remove($index); if (o != null) { o.parent(null); o.scene(null); } return o; } public Object3d getChildAt(int $index) { return _children.get($index); } /** * TODO: Use better lookup */ public Object3d getChildByName(String $name) { for (int i = 0; i < _children.size(); i++) { if (_children.get(i).name().equals($name)) return _children.get(i); } return null; } public int getChildIndexOf(Object3d $o) { return _children.indexOf($o); } public int numChildren() { return _children.size(); } /*package-private*/ ArrayList<Object3d> children() { return _children; } public Object3dContainer clone() { Vertices v = _vertices.clone(); FacesBufferedList f = _faces.clone(); Object3dContainer clone = new Object3dContainer(v, f, _textures); clone.position().x = position().x; clone.position().y = position().y; clone.position().z = position().z; clone.rotation().x = rotation().x; clone.rotation().y = rotation().y; clone.rotation().z = rotation().z; clone.scale().x = scale().x; clone.scale().y = scale().y; clone.scale().z = scale().z; for(int i = 0; i< this.numChildren();i++) { clone.addChild(this.getChildAt(i)); } return clone; } }
[ "dlehqls369@naver.com" ]
dlehqls369@naver.com
8e29526bffe877fe17f5ca0cd8b77c66965f06dc
0f8eee12155f3fe9bbaced728ced71272a3c35b3
/app/src/main/java/com/ihateflyingbugs/hsmd/OfflineLesson/OLFragment/YoutubeFragment.java
3bcfd57de7baeb6fae9e4d0368763902dc193dbe
[]
no_license
kyconlyone/remembervoca
5b82379e5d2b7d58a2c95cb6c1c81f281bedcf62
0cd13bbde219c842d5436d63b411764239886795
refs/heads/master
2020-06-28T13:37:05.820691
2016-08-18T07:35:31
2016-08-18T07:38:55
65,974,296
1
0
null
null
null
null
UTF-8
Java
false
false
4,015
java
package com.ihateflyingbugs.hsmd.OfflineLesson.OLFragment; /** * Created by 영철 on 2016-06-28. */ import android.os.Bundle; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentTransaction; import android.util.Log; import android.view.InflateException; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.FrameLayout; import android.widget.LinearLayout; import com.google.android.youtube.player.YouTubeInitializationResult; import com.google.android.youtube.player.YouTubePlayer; import com.google.android.youtube.player.YouTubePlayerSupportFragment; import com.ihateflyingbugs.hsmd.R; import com.ihateflyingbugs.hsmd.VOCAconfig; public class YoutubeFragment extends Fragment implements YouTubePlayer.OnInitializedListener{ private static final int RECOVERY_DIALOG_REQUEST = 1; private static String VIDEO_ID = "EGy39OMyHzw"; public YoutubeFragment newInstance(){ YoutubeFragment youtubeFragment = new YoutubeFragment(); if (youTubePlayerFragment != null) { init(); } return youtubeFragment; } static private View view; static YouTubePlayerSupportFragment youTubePlayerFragment; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { if (view != null) { ViewGroup parent = (ViewGroup) view.getParent(); if (parent != null) parent.removeView(view); } try { view = inflater.inflate(R.layout.fragment_youtube, container, false); } catch (InflateException e) { /* map is already there, just return view as it is */ } LinearLayout linearLayout = (LinearLayout)view.findViewById(R.id.ll_youtube_list); FragmentTransaction transaction = getChildFragmentManager().beginTransaction(); for(int i=1; i<11;i++){ FrameLayout frameLayout = new FrameLayout(getActivity().getApplicationContext()); frameLayout.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.WRAP_CONTENT)); frameLayout.setId((R.id.youtubeframelayout)+i); YouTubePlayerSupportFragment youTubePlayerFragment = new YouTubePlayerSupportFragment(); transaction.add(frameLayout.getId(), youTubePlayerFragment); youTubePlayerFragment.initialize(VOCAconfig.DEVELOPER_KEY, this); linearLayout.addView(frameLayout); } transaction.commit(); // YouTubePlayerSupportFragment youTubePlayerFragment = new YouTubePlayerSupportFragment(); // // YouTubePlayerSupportFragment youTubePlayerFragment1 = new YouTubePlayerSupportFragment(); // // transaction.add(R.id.youtube_layout1, youTubePlayerFragment1); // transaction.add(R.id.youtube_layout, youTubePlayerFragment).commit(); // youTubePlayerFragment.initialize(VOCAconfig.DEVELOPER_KEY, this); // youTubePlayerFragment1.initialize(VOCAconfig.DEVELOPER_KEY, this); return view; } @Override public void onDestroy() { super.onDestroy(); Log.e("test_youtube", "onDestroy" ); } private void init(){ } @Override public void onStart() { super.onStart(); Log.e("test_youtube", "onStart" ); } @Override public void onStop() { super.onStop(); Log.e("test_youtube", "onStop" ); } @Override public void onInitializationSuccess(YouTubePlayer.Provider provider, YouTubePlayer youTubePlayer, boolean b) { if (!b) { youTubePlayer.setPlayerStyle(YouTubePlayer.PlayerStyle.DEFAULT); youTubePlayer.loadVideo(VIDEO_ID); //youTubePlayer.play(); } } @Override public void onInitializationFailure(YouTubePlayer.Provider provider, YouTubeInitializationResult youTubeInitializationResult) { } }
[ "youngchul_kim@daum.net" ]
youngchul_kim@daum.net
0107bbd55ee6047166734f680f7d40c5f3c9ed81
483cb7d5dea8e71005ca2d69a647a9853b4d924b
/src/ca/uqac/lif/crv/MarQTokenFeeder.java
c88f5a7c58d60c5fcf3ef51c2b34731229feff08
[]
no_license
phoenixxie/crv-beepbeep
1cb28c808cff927115aeec5ee5acba0f151e4892
0df52214cb818f6e4c3343494e3658e1b693737f
refs/heads/master
2021-01-17T17:16:24.668230
2016-07-16T03:33:12
2016-07-16T03:33:12
63,299,907
0
0
null
null
null
null
UTF-8
Java
false
false
1,012
java
package ca.uqac.lif.crv; import ca.uqac.lif.cep.Processor; import ca.uqac.lif.cep.input.TokenFeeder; public class MarQTokenFeeder extends TokenFeeder { public static class Token { public String func; public String[] args; } public MarQTokenFeeder() { this.m_separatorBegin = ""; this.m_separatorEnd = System.getProperty("line.separator"); } @Override protected Object createTokenFromInput(String token) { token = token.trim(); if(!token.isEmpty() && !token.startsWith("#")) { String[] parts = token.split(","); Token t = new Token(); t.func = parts[0]; t.args = new String[parts.length - 1]; for (int i = 0; i < parts.length - 1; ++i) { t.args[i] = parts[i + 1]; } return t; } else { return new NoToken(); } } @Override public Processor clone() { return new MarQTokenFeeder(); } }
[ "phoenix.xie@gmail.com" ]
phoenix.xie@gmail.com
baf374e8c90cbf184e5f18b76520b4e0d93dfebd
735e359d1378149dcbf6b50a86b0a2fb6b89544b
/src/main/java/team404/project/security/CustomAuthenticationSuccessHandler.java
223981ac4465897acead0ab41cc6c96920ea3bce
[]
no_license
MarselAhmetov/DebtCounter
10300bc52bb40f6edc4f953da69d6c2cccb8fd6f
daa9a280b67a95cf5d382277f49e734521fd5259
refs/heads/master
2022-12-23T10:26:46.731311
2020-05-17T17:04:16
2020-05-17T17:04:16
244,470,398
0
0
null
null
null
null
UTF-8
Java
false
false
1,550
java
package team404.project.security; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.Authentication; import org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler; import org.springframework.stereotype.Component; import team404.project.model.Session; import team404.project.repository.interfaces.SessionRepository; import javax.servlet.ServletException; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.time.LocalDateTime; import java.util.UUID; @Component("customAuthenticationSuccessHandler") public class CustomAuthenticationSuccessHandler extends SimpleUrlAuthenticationSuccessHandler { @Autowired SessionRepository sessionRepository; @Override public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException { Cookie sessionCookie = new Cookie("SESSION", UUID.randomUUID().toString()); sessionCookie.setMaxAge(-1); response.addCookie(sessionCookie); Session session = Session.builder() .username(authentication.getName()) .sessionId(sessionCookie.getValue()) .localDateTime(LocalDateTime.now()) .build(); sessionRepository.save(session); super.onAuthenticationSuccess(request, response, authentication); } }
[ "marsel5027@gmail.com" ]
marsel5027@gmail.com
1fc31efabae88de1d4159c2299ce4161d90406bc
4842a908cc35ddd12e23b6b3832bf98b7954156d
/mvp-lib/src/main/java/online/u148/mvp/base/lce/MvpLceView.java
10d47750a0be744bfa8d8c72ab6e0f235aa96847
[]
no_license
forever4313/U14
e9ecdf0853969a2cddaf4befc8269b16f630c3e2
bf6e412615e56a3432e15f3c812961d336d60919
refs/heads/master
2021-01-01T04:38:44.778953
2017-07-14T09:44:16
2017-07-14T09:44:16
97,217,868
0
0
null
null
null
null
UTF-8
Java
false
false
2,895
java
/* * Copyright 2015 Hannes Dorfmann. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package online.u148.mvp.base.lce; import online.u148.mvp.base.MvpView; /** * A {@link MvpView} that assumes that there are 3 display operation: * <ul> * <li>{@link #showLoading(boolean)}: Display a loading animation while loading data in background * by * invoking the corresponding presenter method</li> * * <li>{@link #showError(Throwable, boolean)}: Display a error view (a TextView) on the screen if * an error has occurred while loading data. You can distinguish between a pull-to-refresh error by * checking the boolean parameter and display the error message in another, more suitable way like * a * Toast</li> * * <li>{@link #showContent()}: After the content has been loaded the presenter calls {@link * #setData(Object)} to fill the view with data. Afterwards, the presenter calls {@link * #showContent()} to display the data</li> * </ul> * * @param <M> The underlying data model * @author Hannes Dorfmann * @since 1.0.0 */ public interface MvpLceView<M> extends MvpView { /** * Display a loading view while loading data in background. * <b>The loading view must have the id = R.id.loadingView</b> * * @param pullToRefresh true, if pull-to-refresh has been invoked loading. */ public void showLoading(boolean pullToRefresh); /** * Show the content view. * * <b>The content view must have the id = R.id.contentView</b> */ public void showContent(); /** * Show the error view. * <b>The error view must be a TextView with the id = R.id.errorView</b> * * @param e The Throwable that has caused this error * @param pullToRefresh true, if the exception was thrown during pull-to-refresh, otherwise * false. */ public void showError(Throwable e, boolean pullToRefresh); /** * The data that should be displayed with {@link #showContent()} */ public void setData(M data); /** * Load the data. Typically invokes the presenter method to load the desired data. * <p> * <b>Should not be called from presenter</b> to prevent infinity loops. The method is declared * in * the views interface to add support for view state easily. * </p> * * @param pullToRefresh true, if triggered by a pull to refresh. Otherwise false. */ public void loadData(boolean pullToRefresh); }
[ "dongkai@nodescm.com" ]
dongkai@nodescm.com
a2566a91a77206af922e7ead46d6e4525cfb8541
f93b916ae7e4c7167dd976288efdbde56d6db40f
/jsoagger-core-ioc/src/main/java/io/github/jsoagger/core/i18n/MessageSource.java
b0aabe8a32c0768d86cab190183f386aa53306aa
[ "Apache-2.0" ]
permissive
jsoagger/jsoagger-core
c036f1078918f84f9e75fcb391a4e0202a2265de
d6305315a7188fbf453dfbe942010af42a77506f
refs/heads/master
2022-12-23T12:00:24.417172
2021-07-11T13:36:28
2021-07-11T13:36:28
204,711,001
0
0
Apache-2.0
2022-12-16T04:39:08
2019-08-27T13:37:32
Java
UTF-8
Java
false
false
3,675
java
/** * */ package io.github.jsoagger.core.i18n; import java.text.MessageFormat; import java.util.ArrayList; import java.util.List; import java.util.Locale; import java.util.MissingResourceException; import java.util.ResourceBundle; /** * @author Ramilafananana VONJISOA * */ public class MessageSource { private List<String> basenames = new ArrayList<>(); private List<ResourceBundle> resourcesBundles = new ArrayList<>(); private Locale defaultOne = Locale.getDefault(); private boolean initialized = false; private boolean useCodeAsDefaultMessage; private String defaultEncoding = "UTF-8"; private MessageSource parentMessageSource; /** * Constructor. */ public MessageSource() {} /** * Load bundles */ private void initialise() { for (String location : basenames) { try { ResourceBundle bundle = ResourceBundle.getBundle(location, defaultOne, new UTF8Control()); resourcesBundles.add(bundle); } catch (MissingResourceException e) { // System.out.println("ERROR - ERROR Missing resource bundle " + location); } } initialized = true; } /** * @param key * @return */ public String getWithKeys(String key, Object... args) { if (!initialized) { initialise(); } String message = key; for (ResourceBundle resourcesBundle : resourcesBundles) { try { message = resourcesBundle.getString(key); if (args.length > 0) { message = MessageFormat.format(message, args); } return message; } catch (MissingResourceException e) { } } if (message.equals(key) && parentMessageSource != null) { message = parentMessageSource.get(key); } return message.trim(); } /** * @param key * @return */ public String get(String key) { return getWithKeys(key); } /** * @param key * @param defaultMessage * @param locale * @return */ public String getOrDefault(String key, String defaultMessage, Locale locale, Object... keys) { String message = getWithKeys(key, keys); return message == null ? defaultMessage : message; } /** * @param key * @param defaultMessage * @return */ public String getOrDefault(String key, String defaultMessage, Object... keys) { String message = getWithKeys(key, keys); return message == null ? defaultMessage : message; } /** * @return the basenames */ public List<String> getBasenames() { return basenames; } /** * @param basenames the basenames to set */ public void setBasenames(List<String> basenames) { this.basenames = basenames; } /** * @return the useCodeAsDefaultMessage */ public boolean isUseCodeAsDefaultMessage() { return useCodeAsDefaultMessage; } /** * @param useCodeAsDefaultMessage the useCodeAsDefaultMessage to set */ public void setUseCodeAsDefaultMessage(boolean useCodeAsDefaultMessage) { this.useCodeAsDefaultMessage = useCodeAsDefaultMessage; } /** * @return the defaultEncoding */ public String getDefaultEncoding() { return defaultEncoding; } /** * @param defaultEncoding the defaultEncoding to set */ public void setDefaultEncoding(String defaultEncoding) { this.defaultEncoding = defaultEncoding; } /** * @return the parentMessageSource */ public MessageSource getParentMessageSource() { return parentMessageSource; } /** * @param parentMessageSource the parentMessageSource to set */ public void setParentMessageSource(MessageSource parentMessageSource) { this.parentMessageSource = parentMessageSource; } }
[ "rmvonji@gmail.com" ]
rmvonji@gmail.com
0abf81ddff528bbf3f324788bb1335e31efed298
63823e047533961ab967c0fc00a0b226a45597d4
/src/main/java/cn/qz/domain/User.java
994d9983bd949386c83e01b257e152cebb0e1206
[]
no_license
Close2wind/test-git
ae7322a5d9077d14748b3d5e4cf55fef3875725f
8986098c9eb2e30158e6c9a97a95f23a3e768db1
refs/heads/master
2020-07-29T12:12:30.339400
2019-09-20T13:43:07
2019-09-20T13:43:07
209,795,887
0
0
null
null
null
null
UTF-8
Java
false
false
484
java
package cn.qz.domain; /** * @Author Q Z * @date 2019/9/20-21:13 */ public class User { private String name; private Integer age; private String address; private String gender; private Integer password; public String getName() { return name; } public void setName(String name) { this.name = name; } public Integer getAge() { return age; } public void setAge(Integer age) { this.age = age; } }
[ "HelloWorld_glb@uestc.cn" ]
HelloWorld_glb@uestc.cn
cb9c89c67efd4755af7e061c2149ff9f2ce9850d
bbbb796e33982b9c1e6a52d1c02f9c9328481afa
/core/src/mx/itesm/lightsgone/Cinematica.java
a5b3d43744ff6f8c3908cf75635dd351de7783b6
[]
no_license
OAllan/LightsGone
0fb9a1b61c0f565046d61a83643788beec6bffde
92a3e011ee2845debfcfd7c22d2b545b9a802a62
refs/heads/master
2021-01-24T11:06:15.103167
2017-01-12T16:54:13
2017-01-12T16:54:13
70,007,528
0
0
null
null
null
null
UTF-8
Java
false
false
21,256
java
package mx.itesm.lightsgone; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.assets.AssetManager; import com.badlogic.gdx.audio.Music; import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.Animation; import com.badlogic.gdx.graphics.g2d.Sprite; import com.badlogic.gdx.graphics.g2d.SpriteBatch; import com.badlogic.gdx.graphics.g2d.TextureRegion; import com.badlogic.gdx.utils.Array; /** * Created by allanruiz on 19/11/16. */ public abstract class Cinematica { protected float timer; protected Sprite sprite,transicionFundido; protected AssetManager manager; protected LightsGone.Transicion transicion; protected float alpha, velocidadTransicion; public Cinematica(){ timer = 0; velocidadTransicion = LightsGone.TRANSICIONNEUTRAL; transicion = LightsGone.Transicion.AUMENTANDO; } public abstract void play(SpriteBatch batch); public abstract boolean finished(); public abstract void dispose(); protected void start(){ switch (transicion){ case AUMENTANDO: alpha = 1; transicion = LightsGone.Transicion.DISMINUYENDO; break; case DISMINUYENDO: alpha-= velocidadTransicion; if (alpha<=0) { alpha = 0; } break; } } private void cargarTexturas() { manager = new AssetManager(); manager.load("nivel.png", Texture.class); manager.finishLoading(); transicionFundido = new Sprite((Texture) manager.get("nivel.png")); transicionFundido.setSize(LightsGone.ANCHO_MUNDO, LightsGone.ALTO_MUNDO); } static class Inicio extends Cinematica{ private Abner abner; private Texture inicio, inicio6, inicio7, inicio11; private Animation corriendo, escapando; private Escena escena; private boolean finished; private Texto texto; private Music grito, pasos; { super.cargarTexturas(); cargarTexturas(); } private void cargarTexturas() { manager.load("CinematicaInicio1.png",Texture.class); manager.load("CinematicaInicio2.png", Texture.class); manager.load("CinematicaInicio3.png", Texture.class); manager.load("CinematicaInicio4.png", Texture.class); manager.load("CinematicaInicio5.png", Texture.class); manager.load("CinematicaInicio6.png", Texture.class); manager.load("CinematicaInicio7.png", Texture.class); manager.load("CinematicaInicio8.png", Texture.class); manager.load("CinematicaInicio9.png", Texture.class); manager.load("CinematicaInicio10.png", Texture.class); manager.load("CinematicaInicio11.png", Texture.class); manager.load("rugido.mp3", Music.class); manager.load("Run Grass.mp3", Music.class); manager.finishLoading(); inicio = manager.get("CinematicaInicio1.png"); corriendo = new Animation(0.1f, new TextureRegion((Texture)manager.get("CinematicaInicio2.png")),new TextureRegion((Texture)manager.get("CinematicaInicio3.png")),new TextureRegion((Texture)manager.get("CinematicaInicio4.png")),new TextureRegion((Texture)manager.get("CinematicaInicio5.png"))); inicio6 = manager.get("CinematicaInicio6.png"); inicio7 = manager.get("CinematicaInicio7.png"); escapando = new Animation(0.3f, new TextureRegion((Texture)manager.get("CinematicaInicio8.png")),new TextureRegion((Texture)manager.get("CinematicaInicio9.png")), new TextureRegion((Texture)manager.get("CinematicaInicio10.png"))); inicio11 = manager.get("CinematicaInicio11.png"); grito = manager.get("rugido.mp3"); pasos = manager.get("Run Grass.mp3"); pasos.setLooping(true); } public Inicio(Abner abner){ this.abner = abner; this.sprite = new Sprite(inicio); escena = Escena.FUNDIDO; finished = false; alpha = 1; texto = new Texto("font.fnt", LightsGone.ANCHO_MUNDO/2, 100); } @Override public void play(SpriteBatch batch) { sprite.draw(batch); transicionFundido.draw(batch); transicionFundido.setAlpha(alpha); switch (escena){ case FUNDIDO: start(); if(alpha<=0){ escena = Escena.INICIO; } break; case INICIO: timer += Gdx.graphics.getDeltaTime(); if(timer>=1.5){ escena = Escena.CORRIENDO; timer=0; pasos.play(); } break; case CORRIENDO: timer += Gdx.graphics.getDeltaTime(); sprite.setTexture(corriendo.getKeyFrame(timer).getTexture()); if(timer>=corriendo.getAnimationDuration()){ escena = Escena.NEUTRAL; timer = 0; pasos.stop(); } break; case NEUTRAL: timer += Gdx.graphics.getDeltaTime(); sprite.setTexture(inicio6); texto.mostrarMensaje(batch,"Mom?...Dad?"); if(timer>=2){ escena = Escena.GRITO; timer = 0; grito.play(); } break; case GRITO: timer += Gdx.graphics.getDeltaTime(); sprite.setTexture(inicio7); if(timer>=2.5){ escena = Escena.ESCAPE; timer = 0; } break; case ESCAPE: timer += Gdx.graphics.getDeltaTime(); sprite.setTexture(escapando.getKeyFrame(timer).getTexture()); if(timer>=escapando.getAnimationDuration()){ escena = Escena.FIN; timer = 0; } break; case FIN: timer += Gdx.graphics.getDeltaTime(); sprite.setTexture(inicio11); if(timer>=1.5){ finished = true; timer = 0; abner.setX(1845); } break; } } @Override public boolean finished() { return finished; } @Override public void dispose() { inicio.dispose(); inicio6.dispose(); inicio7.dispose(); inicio11.dispose(); manager.dispose(); grito.dispose(); pasos.dispose(); } private enum Escena{ FUNDIDO, INICIO, CORRIENDO, NEUTRAL, GRITO, ESCAPE, FIN } } static class Pelea extends Cinematica{ private Texture antes5, antes8, antes11, antes12; private Animation inicio, volteando, lanzando,saltando; private Escena escena; private Abner abner; private boolean finished; private Music grito, caldera; { super.cargarTexturas(); cargarTexturas(); } private void cargarTexturas(){ manager.load("CinematicaAntesCoco1.png", Texture.class); manager.load("CinematicaAntesCoco2.png", Texture.class); manager.load("CinematicaAntesCoco3.png", Texture.class); manager.load("CinematicaAntesCoco4.png", Texture.class); manager.load("CinematicaAntesCoco5.png", Texture.class); manager.load("CinematicaAntesCoco6.png", Texture.class); manager.load("CinematicaAntesCoco7.png", Texture.class); manager.load("CinematicaAntesCoco8.png", Texture.class); manager.load("CinematicaAntesCoco9.png", Texture.class); manager.load("CinematicaAntesCoco10.png", Texture.class); manager.load("CinematicaAntesCoco11.png", Texture.class); manager.load("CinematicaAntesCoco12.png", Texture.class); manager.load("rugido.mp3", Music.class); manager.load("caldera.mp3", Music.class); manager.finishLoading(); inicio = new Animation(0.4f, new TextureRegion((Texture)manager.get("CinematicaAntesCoco1.png")),new TextureRegion((Texture)manager.get("CinematicaAntesCoco2.png"))); inicio.setPlayMode(Animation.PlayMode.LOOP); volteando = new Animation(0.15f, new TextureRegion((Texture)manager.get("CinematicaAntesCoco3.png")),new TextureRegion((Texture)manager.get("CinematicaAntesCoco4.png"))); antes5 = manager.get("CinematicaAntesCoco5.png"); lanzando = new Animation(0.25f, new TextureRegion((Texture)manager.get("CinematicaAntesCoco6.png")), new TextureRegion((Texture)manager.get("CinematicaAntesCoco7.png"))); antes8 = manager.get("CinematicaAntesCoco8.png"); saltando = new Animation(0.2f, new TextureRegion((Texture)manager.get("CinematicaAntesCoco9.png")), new TextureRegion((Texture)manager.get("CinematicaAntesCoco10.png"))); antes11 = manager.get("CinematicaAntesCoco11.png"); antes12 = manager.get("CinematicaAntesCoco12.png"); grito = manager.get("rugido.mp3"); caldera = manager.get("caldera.mp3"); caldera.setLooping(true); } public Pelea(Abner abner){ this.abner = abner; this.sprite = new Sprite(inicio.getKeyFrame(0).getTexture()); escena = Escena.FUNDIDO; finished = false; alpha = 1; caldera.play(); } @Override public void play(SpriteBatch batch) { sprite.draw(batch); transicionFundido.draw(batch); transicionFundido.setAlpha(alpha); switch(escena){ case FUNDIDO: start(); if(alpha<=0){ alpha = 0; escena = Escena.INICIO; } break; case INICIO: timer += Gdx.graphics.getDeltaTime(); sprite.setTexture(inicio.getKeyFrame(timer).getTexture()); if(timer>=5){ timer = 0; escena = Escena.CORRIENDO; } break; case CORRIENDO: timer += Gdx.graphics.getDeltaTime(); sprite.setTexture(volteando.getKeyFrame(timer).getTexture()); if(timer>=volteando.getAnimationDuration()){ timer = 0; escena = Escena.VUELTA; } break; case VUELTA: timer+=Gdx.graphics.getDeltaTime(); sprite.setTexture(antes5); if(timer>=2){ timer = 0; escena = Escena.ENOJADO; caldera.stop(); } break; case ENOJADO: timer+=Gdx.graphics.getDeltaTime(); sprite.setTexture(lanzando.getKeyFrame(timer).getTexture()); if(timer>=lanzando.getAnimationDuration()){ timer = 0; escena = Escena.SALTO; } break; case SALTO: timer += Gdx.graphics.getDeltaTime(); sprite.setTexture(antes8); if(timer>=0.5){ timer = 0; escena = Escena.SALTANDO; } break; case SALTANDO: timer += Gdx.graphics.getDeltaTime(); sprite.setTexture(saltando.getKeyFrame(timer).getTexture()); if(timer>=saltando.getAnimationDuration()){ timer = 0; escena = Escena.NEUTRAL; } break; case NEUTRAL: timer += Gdx.graphics.getDeltaTime(); sprite.setTexture(antes11); if(timer>=1){ timer = 0; escena = Escena.GRITO; grito.play(); } break; case GRITO: timer += Gdx.graphics.getDeltaTime(); sprite.setTexture(antes12); if(timer>=2.5){ finished = true; abner.setX(1035); } break; } } @Override public boolean finished() { return finished; } @Override public void dispose() { antes5.dispose(); antes8.dispose(); antes11.dispose(); antes12.dispose(); manager.dispose(); grito.dispose(); } private enum Escena{ FUNDIDO, INICIO, CORRIENDO, VUELTA, ENOJADO, SALTO, SALTANDO, NEUTRAL, GRITO } } static class Final extends Cinematica{ private Texture final1, final2, final3, final4, final5, final6, lightsgone, erick, hector, luis,allan,rafa, fin; private boolean finished; private Escena escena; private int imagenActual; private Array<Texture> creditos; private Music musicFinal; { super.cargarTexturas(); cargarTexturas(); } private void cargarTexturas(){ manager.load("CinematicaFinal1.png", Texture.class); manager.load("CinematicaFinal2.png", Texture.class); manager.load("CinematicaFinal3.png", Texture.class); manager.load("CinematicaFinal4.png", Texture.class); manager.load("CinematicaFinal5.png", Texture.class); manager.load("CinematicaFinal6.png", Texture.class); manager.load("CinematicaFinal7.png", Texture.class); manager.load("CinematicaFinal8.png", Texture.class); manager.load("CinematicaFinal9.png", Texture.class); manager.load("CinematicaFinal10.png", Texture.class); manager.load("CinematicaFinal11.png", Texture.class); manager.load("CinematicaFinal12.png", Texture.class); manager.load("CinematicaFinal13.png", Texture.class); manager.load("CocoMuerteFondo.png", Texture.class); manager.load("final.mp3", Music.class); manager.finishLoading(); transicionFundido.setTexture((Texture)manager.get("CocoMuerteFondo.png")); final1 = manager.get("CinematicaFinal1.png", Texture.class); final2 = manager.get("CinematicaFinal2.png", Texture.class); final3 = manager.get("CinematicaFinal3.png", Texture.class); final4 = manager.get("CinematicaFinal4.png", Texture.class); final5 = manager.get("CinematicaFinal5.png", Texture.class); final6 = manager.get("CinematicaFinal6.png", Texture.class); lightsgone = manager.get("CinematicaFinal7.png", Texture.class); erick = manager.get("CinematicaFinal8.png", Texture.class); hector = manager.get("CinematicaFinal9.png", Texture.class); luis = manager.get("CinematicaFinal10.png", Texture.class); allan = manager.get("CinematicaFinal11.png", Texture.class); rafa = manager.get("CinematicaFinal12.png", Texture.class); fin = manager.get("CinematicaFinal13.png", Texture.class); creditos = new Array<Texture>(); creditos.add(erick); creditos.add(hector); creditos.add(luis); creditos.add(allan); creditos.add(rafa); creditos.add(fin); musicFinal = manager.get("final.mp3"); musicFinal.setLooping(true); } public Final(){ this.sprite = new Sprite(final1); this.escena = Escena.FUNDIDO; finished = false; alpha = 0; } public void start(SpriteBatch batch){ switch (transicion){ case AUMENTANDO: alpha+=velocidadTransicion/2; if(alpha>=1){ alpha=1; transicion = LightsGone.Transicion.DISMINUYENDO; } break; case DISMINUYENDO: alpha -= velocidadTransicion; sprite.draw(batch); if(alpha<=0){ alpha = 0; escena = Escena.INICIO; musicFinal.play(); } } transicionFundido.setAlpha(alpha); transicionFundido.draw(batch); } @Override public void play(SpriteBatch batch) { switch (escena){ case FUNDIDO: start(batch); break; case INICIO: timer += Gdx.graphics.getDeltaTime(); sprite.setTexture(final1); if(timer>=2){ sprite.setTexture(final2); escena = Escena.ESCENA1; timer = 0; } break; case ESCENA1: timer += Gdx.graphics.getDeltaTime(); sprite.setTexture(final3); if(timer>=1){ escena = Escena.ESCENA2; timer = 0; } break; case ESCENA2: timer += Gdx.graphics.getDeltaTime(); sprite.setTexture(final4); if(timer>=1){ escena = Escena.ESCENA3; timer = 0; } break; case ESCENA3: timer += Gdx.graphics.getDeltaTime(); sprite.setTexture(final5); if(timer>=1){ escena = Escena.ESCENA4; timer = 0; } break; case ESCENA4: timer += Gdx.graphics.getDeltaTime(); sprite.setTexture(final6); if(timer>=3){ escena = Escena.LIGHTSGONE; timer = 0; transicionFundido.setTexture(lightsgone); } break; case LIGHTSGONE: sprite.draw(batch); alpha+=Gdx.graphics.getDeltaTime(); if(alpha>=1){ alpha =1; timer += Gdx.graphics.getDeltaTime(); if(timer>=2){ timer = 0; escena = Escena.CREDITOS; } } transicionFundido.setAlpha(alpha); transicionFundido.draw(batch); break; case CREDITOS: timer += Gdx.graphics.getDeltaTime(); transicionFundido.setTexture(creditos.get(imagenActual)); if(imagenActual==creditos.size-1&&timer>=7){ finished = true; musicFinal.stop(); } else if(imagenActual!= creditos.size-1 && timer>=4){ imagenActual++; timer = 0; } transicionFundido.draw(batch); break; } if(escena!=Escena.FUNDIDO&&escena != Escena.CREDITOS&&escena!=Escena.LIGHTSGONE){ sprite.draw(batch); } } @Override public boolean finished() { return finished; } @Override public void dispose() { } private enum Escena{ FUNDIDO, INICIO, ESCENA1, ESCENA2, ESCENA3, ESCENA4, LIGHTSGONE, CREDITOS } } }
[ "a01376200@itesm.mx" ]
a01376200@itesm.mx
1696494049844128402466d37c1959d57e162832
d3d8126333825e76116d5b560489fb2697e28ff4
/Computer_Programming/자바/Lab10/src/Shape/Rectangle.java
922d176302eb24de5c1ea1f3c677fca66b422c6f
[]
no_license
sht3898/Lecture
45b179a7505fa52a80760a61af54b1b5c0a583e1
3df4134b82f0ff3952b1d50432a9adabd2701f2d
refs/heads/master
2022-12-04T15:36:39.289042
2020-08-24T10:47:34
2020-08-24T10:47:34
285,512,584
0
0
null
null
null
null
UTF-8
Java
false
false
275
java
package Shape; public class Rectangle extends Shape { int width, length; public Rectangle(int w, int l){ width=w; length=l; } @Override public void draw() { System.out.println("Rectangle Draw"); } @Override public double area() { return width*length; } }
[ "sehyunteg@naver.com" ]
sehyunteg@naver.com
e383e2a92ada4cb3a4bf89e8008b01678ee29791
e65dd7ac1a4625bf00bd54ca18ea789266322ea0
/src/main/java/ar/edu/itba/pod/legajo50453/message/SimilarRequest.java
f1fb50fb61c9ba5c8bc103c5ddc3cbd7bd97759a
[]
no_license
champo/tpe-pod
f20bcb27966a55954e46354ec684d62c818711fc
b56046ed38ffaf917b8a764d22ce611433c571d8
refs/heads/master
2016-09-05T10:14:31.345907
2012-11-12T20:58:02
2012-11-12T20:58:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
492
java
/** * */ package ar.edu.itba.pod.legajo50453.message; import java.io.Serializable; import ar.edu.itba.pod.api.Signal; /** * @author champo * */ public class SimilarRequest implements Serializable { private static final long serialVersionUID = -2615886564458131472L; private final Signal signal; /** * @param signal */ public SimilarRequest(Signal signal) { this.signal = signal; } /** * @return the signal */ public Signal getSignal() { return signal; } }
[ "elementohb@gmail.com" ]
elementohb@gmail.com
444939e02157ccc559489c3026672dc6d1e5d1e9
8b8589cfca39469d8b7ea30c4d3802456ce044b4
/src/com/example/e17apidemo/SysService.java
bf7fab21bf2d1ec1d13f9093486e1919b2b00ab8
[]
no_license
iseever/eapi
7b15362d6bb75e0db44942f9b083ce7314411698
634996fb171c2d57958594107b348265e6b970cd
refs/heads/master
2021-01-10T10:24:28.754354
2015-12-10T07:14:59
2015-12-10T07:14:59
47,744,734
0
0
null
null
null
null
GB18030
Java
false
false
8,943
java
package com.example.e17apidemo; import java.util.List; import com.navisoft.navi.service.DGConnection; import com.navisoft.navi.service.NaviListener; import com.shinco.Event.DeviceListener; import com.shinco.Event.GetDeviceStatus; import com.shinco.Interface.IDeviceListener.IInfoListener; import com.shinco.Interface.IDeviceListener.IStatusListener; import com.shinco.Service.SysConnection; import com.shinco.Service.SysError; import com.shinco.Service.SysListener; import android.app.ActivityManager; import android.app.Service; import android.content.Context; import android.content.Intent; import android.os.Handler; import android.os.IBinder; import android.os.Message; import android.util.Log; public class SysService extends Service { private static final String TAG = "SysService"; private static IVinfoListener mIVinfoListener = null; private static Context mContext; private boolean bNaviBind = false; private static boolean bServiceCreate = false; static Handler mHandler = new Handler() { @Override public void handleMessage(Message msg) { switch (msg.what) { case 0x01: boolean bFire = (msg.arg1 == 0x01) ? true : false; if (mIVinfoListener != null) { Log.d(TAG, "bFire:" + bFire); SysService.this.mIVinfoListener.fireStatus(bFire); } else { Log.d(TAG, "mIVinfoListener is null"); } break; case 0x02: int speed = msg.arg1; if (SysService.this.mIVinfoListener != null) { Log.d(TAG, "speed:" + speed); SysService.this.mIVinfoListener.drivingInfoSpeed(speed); } else { Log.d(TAG, "mIVinfoListener is null"); } break; case 0x03: int type = msg.arg1; if (SysService.this.mIVinfoListener != null) { Log.d(TAG, "type:" + type); SysService.this.mIVinfoListener.roadType(type); } else { Log.d(TAG, "mIVinfoListener is null"); } break; case 0x04: int mileage = msg.arg1; if (SysService.this.mIVinfoListener != null) { Log.d(TAG, "mileage:" + mileage); SysService.this.mIVinfoListener.carMileage(mileage); } else { Log.d(TAG, "mIVinfoListener is null"); } break; case 0x05: if (SysService.this.mIVinfoListener != null) { SysService.this.mIVinfoListener.requestFail(); } else { Log.d(TAG, "mIVinfoListener is null"); } break; default: break; } super.handleMessage(msg); } }; @Override public IBinder onBind(Intent arg0) { return null; } @Override public void onCreate() { super.onCreate(); mContext = getBaseContext(); registerSysInfoReceiver(); SysConnection.getInstance(getBaseContext()).prepare(mSysListener); DGConnection.getInstance(getBaseContext()).prepare(mNaviListener); } public static Runnable mRequestCarMileage = new Runnable() { @Override public void run() { requestCarMileage(); } }; public static void MainRequestCarMileage() { mHandler.removeCallbacks(mRequestCarMileage); mHandler.postDelayed(mRequestCarMileage, 500L); } private SysListener mSysListener = new SysListener() { @Override public void onSysInited(int arg0) { if (arg0 == SysError.Bind_OK) { Log.d(TAG, "Sys Inited bind ok"); // 请求里程 mHandler.removeCallbacks(mRequestCarMileage); mHandler.postDelayed(mRequestCarMileage, 500L); } else if (arg0 == SysError.Bind_Null) { Log.d(TAG, "Sys Inited bind null"); SysConnection.getInstance(getBaseContext()).initService(); } } }; private NaviListener mNaviListener = new NaviListener() { @Override public void onSysInited(int arg0) { if (arg0 == SysError.Bind_OK) { Log.d(TAG, "Navi Inited bind ok"); SysService.this.bNaviBind = true; int type = DGConnection.getInstance(getBaseContext()) .getRoadType(); SysService.this.mHandler.sendMessage(SysService.this.mHandler .obtainMessage(0x03, type, 0x0)); } else if (arg0 == SysError.Bind_Null) { Log.d(TAG, "Navi Inited bind null"); SysService.this.bNaviBind = false; } } }; @Override public void onDestroy() { // TODO Auto-generated method stub super.onDestroy(); unRegisterSysInfoReceiver(); SysConnection.getInstance(getBaseContext()).destroy(); DGConnection.getInstance(getBaseContext()).destroy(); } public static void setIVlistener(IVinfoListener l) { mIVinfoListener = l; } private DeviceListener dl = null; private static int mCurVehicleKeyStatus = 0x0; private int mLastVehicleKeyStatus = 0x0; private static int mCarMileage = -1; /** * register */ public void registerSysInfoReceiver() { if (dl == null) { dl = new DeviceListener(this); // 钥匙状态 // 初始值 mCurVehicleKeyStatus = GetDeviceStatus.getVehicleKeyStatus(); dl.onVehicleKeyStatusChange(new IStatusListener() { @Override public void onChange(int arg0) { /** * 车钥匙状态有四种(0x0:钥匙初始位置,0x01:,0x02:,0x03:点火位置) */ mLastVehicleKeyStatus = mCurVehicleKeyStatus; mCurVehicleKeyStatus = arg0; // 点火 if (0x03 == mLastVehicleKeyStatus && 0x02 == mCurVehicleKeyStatus) { SysService.this.mHandler .sendMessage(SysService.this.mHandler .obtainMessage(0x01, 0x01, 0x0)); Log.i(TAG, "点火"); } // 熄火 if ((0x02 == mLastVehicleKeyStatus && 0x00 == mCurVehicleKeyStatus) || (0x02 == mLastVehicleKeyStatus && 0x01 == mCurVehicleKeyStatus)) { SysService.this.mHandler .sendMessage(SysService.this.mHandler .obtainMessage(0x01, 0x02, 0x0)); Log.i(TAG, "熄火"); } } }); // 行车速度 (km/h) dl.onDrivingInfoCome(new IInfoListener() { @Override public void onInfoCome(Object arg0) { DrivingInfo drivingInfo = (DrivingInfo) arg0; SysService.this.mHandler.sendMessage(SysService.this.mHandler .obtainMessage(0x02, drivingInfo.speed, 0x0)); Log.i(TAG, "当前车速:" + drivingInfo.speed + "km/h"); /** * 获取当前道路类型 * * 无效值(-1),未匹配到道路(0),道路类型(1-更次要道路 ,2-次要道路, 3-主要道路, 4-省道 * ,5-国道 ,6-城市快速, 7-高速) */ if (SysService.this.bNaviBind) { int type = DGConnection.getInstance(getBaseContext()) .getRoadType(); SysService.this.mHandler .sendMessage(SysService.this.mHandler .obtainMessage(0x03, type, 0x0)); } else if (CheckServiceRunning(mContext, Common.NaviClassName)) { DGConnection.getInstance(getBaseContext()) .initService(); } } }); } } /** * unregister */ public void unRegisterSysInfoReceiver() { if (dl != null) { dl.clearListener(); dl = null; } } public static int getCarMileage() { return mCarMileage; } public static int getCurVehicleKeyStatus() { return mCurVehicleKeyStatus; } /** * 请求更新里程 ----在开启车机时,如果请求到的里程不为-1,则可以认为已经点火;此情况发生在车机已经点火而监听程序还未启动的情况下 */ public static void requestCarMileage() { // 里程请求 int count = 3; mCarMileage = -1; while (mCarMileage == -1 && count > 0) { mCarMileage = GetDeviceStatus.getMileage(); if (mCarMileage == -1) { SysConnection.getInstance(mContext).requestCarMileage(); try { Thread.sleep(500L); } catch (InterruptedException e) { e.printStackTrace(); } } count--; } // 获取行驶里程数 if (mCarMileage != -1) { mCarMileage = ((mCarMileage & 0xFFFFFFFF) >> 6); mHandler.sendMessage(mHandler.obtainMessage(0x04, mCarMileage, 0x0)); Log.i(TAG, "当前里程:" + mCarMileage + "Km"); } else { mHandler.sendEmptyMessage(0x05); } // 开机时如果不等于-1,则认为是已经点火 if (mCarMileage != -1) { mCurVehicleKeyStatus = 0x02; mHandler.sendMessage(mHandler.obtainMessage(0x01, 0x01, 0x0)); Log.i(TAG, "点火"); } } // 检查导航服务是否运行 private static boolean CheckServiceRunning(Context mContext, String className) { boolean isRunning = false; ActivityManager activityManager = (ActivityManager) mContext .getSystemService(Context.ACTIVITY_SERVICE); List<ActivityManager.RunningServiceInfo> serviceList = activityManager .getRunningServices(100); if (!(serviceList.size() > 0)) { return false; } for (int i = 0; i < serviceList.size(); i++) { if (serviceList.get(i).service.getClassName().equals(className) == true) { isRunning = true; break; } } return isRunning; } }
[ "iseever@sina.com" ]
iseever@sina.com
7980ea49a4361ea34e8c836ce38d152b94388816
7b6f89311adf9f178ce2e6877c21d074be157cd6
/juseppe-core/src/test/java/ru/lanwen/jenkins/juseppe/util/JuseppeMatchers.java
17df629bb1797e25ad7695a48fa2c822fcc20eef
[ "Apache-2.0" ]
permissive
jenkinsci/juseppe
41a746ebe9ebd2657b32767214fc256f99d35cdc
c7b9b3bb8b666b0bf17901bef71186ae29fc38ab
refs/heads/master
2023-08-31T19:58:27.321859
2019-07-04T13:40:23
2019-07-04T13:40:23
29,594,751
27
13
Apache-2.0
2019-07-04T13:40:24
2015-01-21T14:58:52
Java
UTF-8
Java
false
false
838
java
package ru.lanwen.jenkins.juseppe.util; import org.hamcrest.Description; import org.hamcrest.Matcher; import org.hamcrest.TypeSafeDiagnosingMatcher; import java.io.File; /** * @author lanwen (Merkushev Kirill) */ public final class JuseppeMatchers { private JuseppeMatchers() { } public static Matcher<File> exists() { return new TypeSafeDiagnosingMatcher<File>() { @Override protected boolean matchesSafely(File item, Description mismatchDescription) { mismatchDescription.appendValue(item.getAbsolutePath()).appendText(" not exists"); return item.exists(); } @Override public void describeTo(Description description) { description.appendText("file should exist"); } }; } }
[ "lanwen@yandex-team.ru" ]
lanwen@yandex-team.ru
77661b455e10b388057a1a22acfa73e91eac5c44
c894a51d200f0f88363feba21b535b98686f3e79
/src/Controlador/Usuarios/ImpresionDao.java
fabace9f2a89b6b9e3455b27c7eb2ca70ffd1479
[]
no_license
jimmyhomero/Sofi3
9c880970705b07e36cf5025a516619d68b2b5a15
46da1de610b7bc7aaedfffe48b967e831a6990a6
refs/heads/master
2022-12-10T23:10:44.237411
2022-12-07T19:03:10
2022-12-07T19:03:10
189,910,727
1
0
null
null
null
null
UTF-8
Java
false
false
19,339
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package Controlador.Usuarios; import ClasesAuxiliares.DaoEmpresaImpl; import ClasesAuxiliares.debug.Deb; import Controlador.Coneccion; import Modelo.Clientes; import Modelo.DetalleFactura; import Modelo.Facturas; import Modelo.Tickets; import Modelo.Usuarios; import Vista.Principal; import Vista.Usuarios.Crear_Productos; import static Vista.Usuarios.Modal_CrearFacturas.tipoDocumento; import static Vista.Usuarios.Modal_CrearFacturas.txt_cedula; import static Vista.Usuarios.Modal_CrearFacturas.txt_celular; import static Vista.Usuarios.Modal_CrearFacturas.txt_dir; import static Vista.Usuarios.Modal_CrearFacturas.txt_nombres; import Vista.Usuarios.Modal_CrearFacturas; import Vista.Usuarios.rep; import Vlidaciones.ProgressBar; import impresoras.ServicioDeImpresion; import java.awt.BorderLayout; import java.net.URL; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.logging.Level; import java.util.logging.Logger; import javafx.scene.layout.Pane; import javax.print.Doc; import javax.print.DocPrintJob; import javax.print.PrintException; import javax.print.PrintService; import javax.print.SimpleDoc; import javax.swing.JFrame; import javax.swing.JInternalFrame; import javax.swing.JPanel; import login.login; import net.sf.jasperreports.engine.JRException; import net.sf.jasperreports.engine.JRExporterParameter; import net.sf.jasperreports.engine.JasperExportManager; import net.sf.jasperreports.engine.JasperFillManager; import net.sf.jasperreports.engine.JasperPrint; import net.sf.jasperreports.engine.JasperPrintManager; import net.sf.jasperreports.engine.JasperReport; import net.sf.jasperreports.engine.export.JRPrintServiceExporter; import net.sf.jasperreports.engine.export.JRPrintServiceExporterParameter; import net.sf.jasperreports.engine.util.JRLoader; import net.sf.jasperreports.view.JRViewer; import net.sf.jasperreports.view.JasperViewer; /** * * @author USUARIO */ public class ImpresionDao extends Coneccion { ProgressBar msg = new ProgressBar(1000, "Mensaje Inicial"); // public JPanel getdetallesmovimiento(Map parametros, String rutaInforme) { // JPanel jpContainer = new JPanel(); // try { // //archivo jasper // // URL jasperUrl = this.getClass().getResource(rutaInforme); // // JasperReport report = (JasperReport) JRLoader.loadObject(jasperUrl); // // JasperPrint jasperPrint = JasperFillManager.fillReport(rutaInforme, parametros, this.getCnx()); // //se crea el visor con el reporte // JRViewer jRViewer = new JRViewer(jasperPrint); // //se elimina elementos del contenedor JPanel // jpContainer.removeAll(); // //para el tamaño del reporte se agrega un BorderLayout // jpContainer.setLayout(new BorderLayout()); // jpContainer.add(jRViewer, BorderLayout.CENTER); // jRViewer.setVisible(true); // jpContainer.repaint(); // jpContainer.revalidate(); // } catch (JRException ex) { // System.err.println(ex.getMessage()); // } // return jpContainer; // } public void getShowReport(Map parametros, String rutaInforme) { try { this.conectar(); Deb.consola("Vista.Usuarios.Crear_Facturas.jButton1ActionPerformed()empez la impresionnnn"); // String rutaInforme = "C:\\Users\\USUARIO\\OneDrive\\NetBeansProjects\\Sofi\\src\\Reportes\\Ticket.jasper"; // Map parametros = new HashMap(); //parametros.put("numeroFactura", secuenciaFac); Deb.consola("Vista.Usuarios.Crear_Facturas.jButton1ActionPerformed()secuencia :" + parametros); Deb.consola("Vista.Usuarios.Crear_Facturas.jButton1ActionPerformed()rurainorme :" + rutaInforme); JasperPrint informe = JasperFillManager.fillReport(rutaInforme, parametros, this.getCnx()); JasperViewer jv = new JasperViewer(informe, false); // JasperPrintManager.printReport(informe, true); jv.setVisible(true); } catch (JRException ex) { Deb.consola("Vista.Usuarios.Crear_Facturas.jButton1ActionPerformed()" + ex); // Logger.getLogger(Crear_Facturas.class.getName()).log(Level.SEVERE, null, ex); } finally { this.cerrar(); } } public void impresionShowReport(Map parametros, String rutaInforme) { try { this.conectar(); Deb.consola("Vista.Usuarios.Crear_Facturas.jButton1ActionPerformed()empez la impresionnnn"); // String rutaInforme = "C:\\Users\\USUARIO\\OneDrive\\NetBeansProjects\\Sofi\\src\\Reportes\\Ticket.jasper"; // Map parametros = new HashMap(); //parametros.put("numeroFactura", secuenciaFac); Deb.consola("Vista.Usuarios.Crear_Facturas.jButton1ActionPerformed()secuencia :" + parametros); JasperPrint informe = JasperFillManager.fillReport(rutaInforme, parametros, this.getCnx()); JasperViewer jv = new JasperViewer(informe, false); JasperPrintManager.printReport(informe, true); jv.setVisible(true); } catch (JRException ex) { Deb.consola("Vista.Usuarios.Crear_Facturas.jButton1ActionPerformed()" + ex); // Logger.getLogger(Crear_Facturas.class.getName()).log(Level.SEVERE, null, ex); } finally { this.cerrar(); } } public void impresionzZebra(Doc doc) { try { ServicioDeImpresion imprime = new ServicioDeImpresion(); PrintService jb = imprime.getJobPrinter(); DocPrintJob job = jb.createPrintJob(); job.print(doc, null); } catch (PrintException ex) { Logger.getLogger(ImpresionDao.class.getName()).log(Level.SEVERE, null, ex); Deb.consola("Controlador.Usuarios.ImpresionDao.impresionzZebra(): " + ex); } } public ResultSet geteresulset(String secuenca) { ResultSet rs = null; PreparedStatement st = null; try { this.conectar(); st = this.getCnx().prepareCall("SELECT u.Nombres AS usuario, c.Cedula AS ruc, c.Nombres AS cliente ,c.Direccion,c.Telefono,c.Celular, t.*,dt.* FROM usuarios u INNER JOIN clientes c INNER JOIN facturaS t INNER JOIN detallefactura dt ON( t.Codigo=dt.Factura_Codigo ) WHERE (t.secuencia='" + secuenca + "' AND t.Usuarios_Codigo=u.codigo AND t.tipo_documento=\"FACTURA\" ) AND t.Clientes_codigo=c.codigo"); rs = st.executeQuery(); } catch (Exception ex) { Deb.consola("Controlador.CUsuarios.BuscarConId() impresionticketssxdfsdfsdfeeeeszzzdda" + ex); } finally { this.cerrar(); } return rs; } // public void setProgressBar_mensajae(String mensaje) { public void impresionEnTirillasFaturas(String secuenca) { Thread t = new Thread() { public void run() { String subtotalsinIVA = ""; String subtotalConIVA = ""; String IVAValor = ""; String Total = ""; //////////// ServicioDeImpresion imprime = new ServicioDeImpresion(); PrintService jb = imprime.getJobPrinter(); ResultSet rs = null; Facturas f = new Facturas(); FacturasDao facdao = new FacturasDao(); f = facdao.buscarXSecuancia(secuenca); List<DetalleFactura> df; DetalleFacturaDao dfDao = new DetalleFacturaDao(); df = dfDao.buscarConIDFact(f.getCodigo()); ClientesDao cl = new ClientesDao(); Clientes c = new Clientes(); c = cl.buscarConID(f.getClientes_codigo()); Usuarios u = new Usuarios(); UsuariosDao udao = new UsuariosDao(); u = udao.buscarConID(f.getUsuarios_Codigo()); rs = geteresulset(equipo);// st.executeQuery(); for (int i = 0; i < Integer.parseInt(Principal.numerovecseimpresionFactura); i++) { int a = 1; for (DetalleFactura d : df) { if (a == 1) { //////////IMPRIME ENCABEZADO////// String nombreEm = imprime.centrarTexto(login.nombreEmpresa, 40); imprime.imprimirGenerico(nombreEm, jb); String tipo = imprime.centrarTexto(f.getTipo_documento(), 40); imprime.imprimirGenerico(tipo, jb); imprime.imprimirGenerico("RUC: " + login.rucEmpresa, jb); imprime.imprimirGenerico("TELEFONOS: " + login.telefonoEmpresa, jb); imprime.imprimirGenerico("DIRECCION: " + login.direccionEmpresa, jb); //imprime.imprimirGenerico(""); imprime.imprimirGenerico("OBLIGADO A LLEVAR CONTABILIDAD: " + login.ObligadoSiNOEmpresa, jb); imprime.imprimirGenerico("", jb); imprime.imprimirGenerico(f.getTipo_documento() + ": " + secuenca, jb); imprime.imprimirGenerico("FECHA: " + f.getFechain(), jb); imprime.imprimirGenerico("USUARIO: " + u.getNombre(), jb); imprime.imprimirGenerico("---------------------------------------", jb); imprime.imprimirGenerico("CLIENTE: " + c.getNombre(), jb); imprime.imprimirGenerico("RUC: " + c.getCedula(), jb); imprime.imprimirGenerico("DIRECCION: " + c.getDireccion(), jb); String telef = ""; if (c.getCelular().equalsIgnoreCase("") && c.getTelefono().equalsIgnoreCase("")) { telef = "999999999"; } else if (c.getTelefono().equalsIgnoreCase("")) { telef = c.getTelefono(); } else { telef = c.getCelular(); } imprime.imprimirGenerico("TELF: " + telef, jb); imprime.imprimirGenerico("---------------------------------------", jb); // Deb.consola("numero de filas: " + jTable1.getRowCount()); String detalle = ""; //////////// } // a++; Integer tamano = null; try { tamano = Integer.parseInt(Principal.anchoimpresionticket); } catch (Exception e) { Deb.consola("Controlador.Usuarios.ImpresionDao.impresionEnTirillasFaturas()sssErrorx TAMANO IMPRESION: " + tamano); Deb.consola("Controlador.Usuarios.ImpresionDao.impresionEnTirillasFaturas()sssErrorx TAMANO IMPRESION: " + tamano); } String cantidad = d.getCantidad().toString(); String pu = d.getValorUnitario().toString(); String pt = d.getValorTotal(); subtotalsinIVA = f.getSubtotal_sin_iva(); subtotalConIVA = f.getSubtotaI_con_iva(); IVAValor = f.getIva_valor(); Total = f.getTotal(); Integer tamanototalpermitido = 40; Integer sumachar = 0; Integer cant = cantidad.length(); Integer pux = pu.length(); Integer ptx = pt.length(); String detalle = d.getDetalle(); Integer detallex = detalle.length(); Integer espaciosadd = 0; Integer numerostamano = 0; sumachar = detallex + cant + pux + ptx + 3; numerostamano = pux + ptx + cant; if (sumachar < 40) { espaciosadd = 40 - sumachar; } else { } imprime.imprimirGenerico( Double.parseDouble(cantidad) + imprime.recortar(detalle, 23) + " " + pu + " " + pt, jb); a++; } //imprime.imprimirGenerico("1234567890qwertyuiopasdfghjklzxcvbnm1234567890", jb); //imprime.imprimirGenerico("1234567890QWERTYUIOPASDFGHJKLZXCVBNM1234567890", jb); imprime.imprimirGenerico("---------------------------------------", jb); imprime.imprimirGenerico("SUBTOTAL: " + subtotalsinIVA, jb); imprime.imprimirGenerico("SUBTOTAL " + Principal.iva + "%: " + subtotalConIVA, jb); imprime.imprimirGenerico("IVA " + Principal.iva + "%: " + IVAValor, jb); imprime.imprimirGenerico("TOTAL A CANCELAR: " + Total, jb); imprime.imprimirGenerico("", jb); imprime.imprimirGenerico("---------GRACIAS POR PREFERIRNOS-----------", jb); imprime.imprimirGenerico("", jb); imprime.imprimirGenerico("", jb); imprime.imprimirGenerico("", jb); imprime.imprimirGenerico("", jb); imprime.imprimirGenerico("", jb); imprime.imprimirGenerico("", jb); } } }; t.start(); } public void impresionDontShowReport(Map parametros, String rutaInforme) { try { String impresoraConfigurada = ""; if (Principal.facturatiriiasoGrande.equalsIgnoreCase("ROLLO")) { impresoraConfigurada = Principal.impresoraTicket; } else { impresoraConfigurada = Principal.impresoraFactura; } ServicioDeImpresion imprime = new ServicioDeImpresion(); PrintService jb = imprime.getJobPrinterImpresoraDefinida(impresoraConfigurada); this.conectar(); Deb.consola("Vista.Usuarios.Crear_Facturas.jButton1ActionPerformed()empez la impresionnnn"); // String rutaInforme = "C:\\Users\\USUARIO\\OneDrive\\NetBeansProjects\\Sofi\\src\\Reportes\\Ticket.jasper"; // Map parametros = new HashMap(); //parametros.put("numeroFactura", secuenciaFac); Deb.consola("Vista.Usuarios.Crear_Facturas.jButton1ActionPerformed()secuencia :" + parametros); JasperPrint informe = JasperFillManager.fillReport(rutaInforme, parametros, this.getCnx()); //JasperViewer jv = new JasperViewer(informe, false); //JasperPrintManager.printReport(informe, false); for (int i = 0; i < Integer.parseInt(Principal.numerovecseimpresionFactura); i++) { JRPrintServiceExporter jrprintServiceExporter = new JRPrintServiceExporter(); jrprintServiceExporter.setParameter(JRExporterParameter.JASPER_PRINT, informe); jrprintServiceExporter.setParameter(JRPrintServiceExporterParameter.PRINT_SERVICE, jb); jrprintServiceExporter.setParameter(JRPrintServiceExporterParameter.DISPLAY_PRINT_DIALOG, Boolean.TRUE); jrprintServiceExporter.exportReport(); } } catch (JRException ex) { Deb.consola("Errora impresionx" + ex); // Logger.getLogger(Crear_Facturas.class.getName()).log(Level.SEVERE, null, ex); } finally { this.cerrar(); } } public void ExportPDF(Map parametros, String rutaInforme) { try { this.conectar(); Deb.consola("Vista.Usuarios.Crear_Facturas.jButton1ActionPerformed()empez la impresionnnn"); // String rutaInforme = "C:\\Users\\USUARIO\\OneDrive\\NetBeansProjects\\Sofi\\src\\Reportes\\Ticket.jasper"; // Map parametros = new HashMap(); //parametros.put("numeroFactura", secuenciaFac); Deb.consola("Vista.Usuarios.Crear_Facturas.jButton1ActionPerformed()secuencia :" + parametros); JasperPrint informe = JasperFillManager.fillReport(rutaInforme, parametros, this.getCnx()); JasperExportManager.exportReportToPdfFile(informe, "src/prueba.pdf"); //JasperExportManager.exportRepor(informe, "src/prueba.html"); // JasperViewer jv = new JasperViewer(informe,false); // JasperPrintManager.printReport(informe, false); // jv.setVisible(true); } catch (JRException ex) { Deb.consola("Vista.Usuarios.Crear_Facturas.jButton1ActionPerformed()" + ex); // Logger.getLogger(Crear_Facturas.class.getName()).log(Level.SEVERE, null, ex); } finally { this.cerrar(); } } public void ExportHtml(Map parametros, String rutaInforme) { try { this.conectar(); Deb.consola("Vista.Usuarios.Crear_Facturas.jButton1ActionPerformed()empez la impresionnnn"); // String rutaInforme = "C:\\Users\\USUARIO\\OneDrive\\NetBeansProjects\\Sofi\\src\\Reportes\\Ticket.jasper"; // Map parametros = new HashMap(); //parametros.put("numeroFactura", secuenciaFac); Deb.consola("Vista.Usuarios.Crear_Facturas.jButton1ActionPerformed()secuencia :" + parametros); JasperPrint informe = JasperFillManager.fillReport(rutaInforme, parametros, this.getCnx()); JasperExportManager.exportReportToHtmlFile(informe, "src/prueba2.html"); //JasperExportManager.exportRepor(informe, "src/prueba.html"); // JasperViewer jv = new JasperViewer(informe,false); // JasperPrintManager.printReport(informe, false); // jv.setVisible(true); } catch (JRException ex) { Deb.consola("Vista.Usuarios.Crear_Facturas.jButton1ActionPerformed()" + ex); // Logger.getLogger(Crear_Facturas.class.getName()).log(Level.SEVERE, null, ex); } finally { this.cerrar(); } } }
[ "USUARIO@DESKTOP-T00QBA8" ]
USUARIO@DESKTOP-T00QBA8
acd82c249b7d909e11056b0ccfaeb5392903a1c5
03de79a956968ea640d25ec0f2b1780e86097253
/Rellen.java
10039370ff04926cc66f8409dfb528195663264d
[]
no_license
TimSijstermans/FloodRace
8f4e30cd5569c0d76edf904e0a83fb4bd9cf011e
4e3773936c91c1ce8e56244caa8f645a7d96994f
refs/heads/master
2020-06-14T17:06:30.177595
2014-05-15T11:02:07
2014-05-15T11:02:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
501
java
/** * Write a description of class brand here. * * @author (your name) * @version (a version number or a date) */ public class Rellen extends Calimiteiten { public Rellen(boolean fake) { super(); _IsFake = fake; if (!_IsFake) { _Fakes = new Rellen[3]; _Fakes[0] = new Rellen(true); _Fakes[1] = new Rellen(true); _Fakes[2] = new Rellen(true); } } public void act() { super.act(); } }
[ "timsijstermans@gmail.com" ]
timsijstermans@gmail.com
ba981d6fce1f57e27c0fc5a550b51d9e7ebd3ca3
b11248eb8d38355e10861c6c19750c55b4530e38
/src/main/java/hu/akarnokd/rxjava2/operators/ObservableMapAsync.java
9e8b4c71dd7252d46cbdeb7c72f1b7d7b189a16c
[ "Apache-2.0" ]
permissive
tomdotbradshaw/RxJava2Extensions
2d50d14aff39a1ddb4fe6a32352aebecc4e8d68d
254fead58021bb8304aa1c343cc776e7b5a3168d
refs/heads/master
2020-04-06T16:48:30.122024
2018-11-15T03:29:15
2018-11-15T03:30:42
157,635,134
0
0
Apache-2.0
2018-11-15T01:36:50
2018-11-15T01:36:50
null
UTF-8
Java
false
false
9,815
java
/* * Copyright 2016-2018 David Karnok * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package hu.akarnokd.rxjava2.operators; import java.util.concurrent.atomic.*; import io.reactivex.*; import io.reactivex.disposables.Disposable; import io.reactivex.exceptions.Exceptions; import io.reactivex.functions.*; import io.reactivex.internal.disposables.DisposableHelper; import io.reactivex.internal.functions.ObjectHelper; import io.reactivex.internal.queue.SpscLinkedArrayQueue; import io.reactivex.internal.util.*; import io.reactivex.plugins.RxJavaPlugins; /** * Maps each upstream element into the single result of an inner Observable while * keeping the order of items and combines the original and inner item into the output * value for the downstream. * * @param <T> the upstream value type * @param <U> the inner Observable's element type * @param <R> the result element type * @since 0.20.4 */ final class ObservableMapAsync<T, U, R> extends Observable<R> implements ObservableTransformer<T, R> { final ObservableSource<T> source; final Function<? super T, ? extends ObservableSource<? extends U>> mapper; final BiFunction<? super T, ? super U, ? extends R> combiner; final int capacityHint; ObservableMapAsync(ObservableSource<T> source, Function<? super T, ? extends ObservableSource<? extends U>> mapper, BiFunction<? super T, ? super U, ? extends R> combiner, int capacityHint) { super(); this.source = source; this.mapper = mapper; this.combiner = combiner; this.capacityHint = capacityHint; } @Override public ObservableSource<R> apply(Observable<T> upstream) { return new ObservableMapAsync<T, U, R>(upstream, mapper, combiner, capacityHint); } @Override protected void subscribeActual(Observer<? super R> observer) { source.subscribe(new MapAsyncObserver<T, U, R>(observer, mapper, combiner, capacityHint)); } static final class MapAsyncObserver<T, U, R> extends AtomicInteger implements Observer<T>, Disposable { private static final long serialVersionUID = -204261674817426393L; final Observer<? super R> downstream; final Function<? super T, ? extends ObservableSource<? extends U>> mapper; final BiFunction<? super T, ? super U, ? extends R> combiner; final SpscLinkedArrayQueue<T> queue; final AtomicThrowable errors; final AtomicReference<Disposable> innerDisposable; Disposable upstream; volatile boolean done; volatile boolean disposed; T current; volatile int state; U inner; static final int STATE_FRESH = 0; static final int STATE_RUNNING = 1; static final int STATE_SUCCESS = 2; static final int STATE_EMPTY = 3; MapAsyncObserver( Observer<? super R> downstream, Function<? super T, ? extends ObservableSource<? extends U>> mapper, BiFunction<? super T, ? super U, ? extends R> combiner, int capacityHint) { this.downstream = downstream; this.mapper = mapper; this.combiner = combiner; this.queue = new SpscLinkedArrayQueue<T>(capacityHint); this.errors = new AtomicThrowable(); this.innerDisposable = new AtomicReference<Disposable>(); } @Override public void dispose() { disposed = true; upstream.dispose(); DisposableHelper.dispose(innerDisposable); drain(); } @Override public boolean isDisposed() { return disposed; } @Override public void onSubscribe(Disposable d) { if (DisposableHelper.validate(upstream, d)) { this.upstream = d; downstream.onSubscribe(this); } } @Override public void onNext(T t) { queue.offer(t); drain(); } @Override public void onError(Throwable e) { DisposableHelper.dispose(innerDisposable); if (errors.addThrowable(e)) { done = true; drain(); } else { RxJavaPlugins.onError(e); } } @Override public void onComplete() { done = true; drain(); } public void drain() { if (getAndIncrement() != 0) { return; } int missed = 1; for (;;) { if (disposed) { current = null; inner = null; queue.clear(); } else { if (errors.get() != null) { Throwable ex = errors.terminate(); disposed = true; downstream.onError(ex); continue; } int s = state; if (s == STATE_FRESH) { boolean d = done; T item = queue.poll(); boolean empty = item == null; if (d && empty) { downstream.onComplete(); } else if (!empty) { current = item; ObservableSource<? extends U> innerSource; try { innerSource = ObjectHelper.requireNonNull(mapper.apply(item), "The mapper returned a null ObservableSource"); } catch (Throwable ex) { Exceptions.throwIfFatal(ex); upstream.dispose(); errors.addThrowable(ex); ex = errors.terminate(); disposed = true; downstream.onError(ex); continue; } state = STATE_RUNNING; innerSource.subscribe(new InnerObserver()); } } else if (s == STATE_SUCCESS) { T mainItem = current; current = null; U innerItem = inner; inner = null; R result; try { result = ObjectHelper.requireNonNull(combiner.apply(mainItem, innerItem), "The combiner returned a null value"); } catch (Throwable ex) { Exceptions.throwIfFatal(ex); upstream.dispose(); errors.addThrowable(ex); ex = errors.terminate(); disposed = true; downstream.onError(ex); continue; } downstream.onNext(result); state = STATE_FRESH; continue; } else if (s == STATE_EMPTY) { current = null; state = STATE_FRESH; continue; } } missed = addAndGet(-missed); if (missed == 0) { break; } } } void innerSuccess(U item) { inner = item; state = STATE_SUCCESS; DisposableHelper.replace(innerDisposable, null); drain(); } void innerError(Throwable ex) { if (errors.addThrowable(ex)) { state = STATE_EMPTY; DisposableHelper.replace(innerDisposable, null); upstream.dispose(); drain(); } else { RxJavaPlugins.onError(ex); } } void innerComplete() { state = STATE_EMPTY; DisposableHelper.replace(innerDisposable, null); drain(); } final class InnerObserver implements Observer<U> { boolean once; @Override public void onSubscribe(Disposable d) { DisposableHelper.setOnce(innerDisposable, d); } @Override public void onNext(U t) { if (!once) { once = true; innerDisposable.get().dispose(); innerSuccess(t); } } @Override public void onError(Throwable e) { if (!once) { innerError(e); } else { RxJavaPlugins.onError(e); } } @Override public void onComplete() { if (!once) { innerComplete(); } } } } }
[ "akarnokd@gmail.com" ]
akarnokd@gmail.com
c20eaae9bd5209d6f940d0c3b00e5d3d39539765
83efb0a0154952635eb412604c0f89c217a2e238
/src/main/java/zi/chef/y16/feb/CyclicWords.java
bd5a1b90b6c66e52280e8fd980647a69d00f8d94
[]
no_license
balaudt/zi
94b626380677f4e16e1ae3cc8f8cfa9149b4bd4c
0a5882e693aa1072af69127fb9ced83a069dd380
refs/heads/master
2022-10-11T05:54:06.157950
2022-09-02T13:43:05
2022-09-02T13:43:20
36,622,670
0
0
null
2022-05-20T20:52:03
2015-05-31T21:20:01
Java
UTF-8
Java
false
false
1,676
java
package zi.chef.y16.feb; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * Created by balaudt on 9/4/16. */ public class CyclicWords { public static final int P = (int) (1e7 + 1); public int differentCW(String[] words) { Map<char[], Integer> uniqueWords = new HashMap<>(); for (int i = 0; i < words.length; i++) { char[] w = words[i].toCharArray(); char[] curWord = new char[w.length * 2]; System.arraycopy(w, 0, curWord, 0, w.length); System.arraycopy(w, 0, curWord, w.length, w.length); boolean isUnique = true; for (Map.Entry<char[], Integer> entry : uniqueWords.entrySet()) { char[] uniqWord = entry.getKey(); if (uniqWord.length * 2 != curWord.length) { continue; } Integer hash = entry.getValue(); int rollHash = hash(curWord, false); for (int j = w.length; j < curWord.length; j++) { if (rollHash == hash) break; } } if (isUnique) { uniqueWords.put(w, hash(w, true)); } } return uniqueWords.size(); } private int hash(char[] in, boolean isFull) { int length = isFull ? in.length : in.length / 2; int hash = 0; for (int i = 0; i < length; i++) { hash *= 31; hash %= P; hash += in[i]; hash %= P; } return hash; } public static void main(String[] args) { } }
[ "balachandranudt@gmail.com" ]
balachandranudt@gmail.com
e0ed249df7769c3908ef3ef13076c6dae68e09e6
dc89d6a9e99b081293bd50ae682d5ffd5b891f27
/src/java_erp/dto/Department.java
f44b89fe928e1b8a356bb2eeae20f0ed8e6e7f00
[]
no_license
seungaseo01/java_erp
4c81d230da6a53803e28df535377ab28a09d1dc0
4bf93941fecf79d895bdf61be47e771eaf2f4470
refs/heads/master
2023-07-13T15:56:30.172319
2021-08-30T08:41:28
2021-08-30T08:41:28
400,435,096
0
0
null
null
null
null
UTF-8
Java
false
false
965
java
package java_erp.dto; public class Department { private int deptNo; //부서번호 private String deptName;//부서명 private int floor; //위치 public Department() { // TODO Auto-generated constructor stub } public Department(int deptNo) { this.deptNo = deptNo; } public Department(int deptNo, String deptName, int floor) { this.deptNo = deptNo; this.deptName = deptName; this.floor = floor; } public int getDeptNo() { return deptNo; } public void setDeptNo(int deptNo) { this.deptNo = deptNo; } public String getDeptName() { return deptName; } public void setDeptName(String deptName) { this.deptName = deptName; } public int getFloor() { return floor; } public void setFloor(int floor) { this.floor = floor; } @Override public String toString() { return String.format("department [deptNo=%s, deptName=%s, floor=%s]", deptNo, deptName, floor); } }
[ "tmddk6522@naver.com" ]
tmddk6522@naver.com
a817871e1733b89c74497b5b0125d3b75fb00876
81ed384d5c8c1ebf8c06119f374d6a932551a9d9
/tesla-auth/tesla-oauth2-server/src/main/java/io/github/tesla/auth/server/system/domain/UserOnlineDO.java
f7f5cdecffc4d20c7b513acccfe843c7c78a42cb
[ "Apache-2.0" ]
permissive
globotree/tesla-1
613bf472405e51690c9eb1dfe863c55333e9ce09
356a1822561dce64ed7b68cb549a2d6582b5bd6f
refs/heads/master
2020-12-21T21:42:20.470234
2020-01-27T19:22:16
2020-01-27T19:22:16
236,572,205
0
0
Apache-2.0
2020-01-27T19:22:17
2020-01-27T19:15:55
Java
UTF-8
Java
false
false
2,524
java
package io.github.tesla.auth.server.system.domain; import java.util.Date; public class UserOnlineDO { /** */ private String id; private String userId; private String username; /** * 用户主机地址 */ private String host; /** * 用户登录时系统IP */ private String systemHost; /** * 用户浏览器类型 */ private String userAgent; /** * 在线状态 */ private String status = "on_line"; /** * session创建时间 */ private Date startTimestamp; /** * session最后访问时间 */ private Date lastAccessTime; /** * 超时时间 */ private Long timeout; /** * 备份的当前用户会话 */ private String onlineSession; public String getId() { return id; } public void setId(String id) { this.id = id; } public Date getStartTimestamp() { return startTimestamp; } public void setStartTimestamp(Date startTimestamp) { this.startTimestamp = startTimestamp; } public Date getLastAccessTime() { return lastAccessTime; } public void setLastAccessTime(Date lastAccessTime) { this.lastAccessTime = lastAccessTime; } public Long getTimeout() { return timeout; } public void setTimeout(Long timeout) { this.timeout = timeout; } public String getHost() { return host; } public void setHost(String host) { this.host = host; } public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getUserAgent() { return userAgent; } public void setUserAgent(String userAgent) { this.userAgent = userAgent; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getOnlineSession() { return onlineSession; } public void setOnlineSession(String onlineSession) { this.onlineSession = onlineSession; } public String getSystemHost() { return systemHost; } public void setSystemHost(String systemHost) { this.systemHost = systemHost; } }
[ "zhip.zhang001@bkjk.com" ]
zhip.zhang001@bkjk.com
c3e18c75c49ae5a65399bc441576010a3235e883
d11733d14fa31ddb145fd7ac0ba33a4d05d039ab
/study-springCloud-distribute-lock/study-springCloud-distribute-lock-redisson/src/main/java/com/ldg/study/springCloud/distribute/lock/redisson/byService/RedissonProperties.java
f8db7c279c1e21179e36deb7afcc120b4057535a
[]
no_license
lidegui46/study-springcloud
e1deba9cea3bee62cd054e3b8acc5cab1b706aa0
412e7704247a51a35fd5bfa66cd7e1cac445c69d
refs/heads/master
2022-12-22T19:40:05.555457
2020-05-02T01:35:55
2020-05-02T01:35:55
144,539,363
0
0
null
2022-12-12T21:41:55
2018-08-13T06:39:55
Java
UTF-8
Java
false
false
2,356
java
package com.ldg.study.springCloud.distribute.lock.redisson.byService; import org.springframework.boot.context.properties.ConfigurationProperties; @ConfigurationProperties(prefix = "redisson") public class RedissonProperties { private int timeout = 3000; private String address; private String password; private int connectionPoolSize = 64; private int connectionMinimumIdleSize=10; private int slaveConnectionPoolSize = 250; private int masterConnectionPoolSize = 250; private String[] sentinelAddresses; private String masterName; public int getTimeout() { return timeout; } public void setTimeout(int timeout) { this.timeout = timeout; } public int getSlaveConnectionPoolSize() { return slaveConnectionPoolSize; } public void setSlaveConnectionPoolSize(int slaveConnectionPoolSize) { this.slaveConnectionPoolSize = slaveConnectionPoolSize; } public int getMasterConnectionPoolSize() { return masterConnectionPoolSize; } public void setMasterConnectionPoolSize(int masterConnectionPoolSize) { this.masterConnectionPoolSize = masterConnectionPoolSize; } public String[] getSentinelAddresses() { return sentinelAddresses; } public void setSentinelAddresses(String sentinelAddresses) { this.sentinelAddresses = sentinelAddresses.split(","); } public String getMasterName() { return masterName; } public void setMasterName(String masterName) { this.masterName = masterName; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public int getConnectionPoolSize() { return connectionPoolSize; } public void setConnectionPoolSize(int connectionPoolSize) { this.connectionPoolSize = connectionPoolSize; } public int getConnectionMinimumIdleSize() { return connectionMinimumIdleSize; } public void setConnectionMinimumIdleSize(int connectionMinimumIdleSize) { this.connectionMinimumIdleSize = connectionMinimumIdleSize; } }
[ "lidegui46@163.com" ]
lidegui46@163.com
646f8a20517443cb1e31650aeac0da1e1fd6e518
725779fd5a348954e9e5f5786bd5da2b97784188
/Trabalho_ADS_2018_2/CleanCarServer/src/main/java/br/edu/iftm/Extensao/facade/rs/EstabelecimentoFacade.java
de5087caf45995b8ee7787486c673c2c34952b6a
[]
no_license
WandersonColatino/Trabalho_ADS_2018_2
3b349e755ec22098972b730e50a6b355d2abfe2b
3f59e74bbfbd36c07884d8c6e2924d7200dd054e
refs/heads/master
2020-03-22T12:31:13.513729
2018-07-07T12:21:08
2018-07-07T12:21:08
140,044,899
0
0
null
null
null
null
UTF-8
Java
false
false
1,514
java
package br.edu.iftm.Extensao.facade.rs; import java.util.List; import javax.inject.Inject; import javax.ws.rs.Consumes; import javax.ws.rs.DELETE; import javax.ws.rs.GET; import javax.ws.rs.POST; import javax.ws.rs.PUT; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import br.edu.iftm.Extensao.dao.EstabelecimentoDao; import br.edu.iftm.Extensao.domain.Estabelecimento; @Path(value="/estabelecimento") @Consumes({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML}) @Produces({MediaType.APPLICATION_JSON,MediaType.APPLICATION_XML}) public class EstabelecimentoFacade { @Inject private EstabelecimentoDao estabelecimentoDao; @GET public List<Estabelecimento> getEstabelecimento() { List<Estabelecimento> estabelecimentos = estabelecimentoDao.getEstabelecimento(); return estabelecimentos; } @GET @Path("/{codigo}") public Estabelecimento getEstabelecimentoId(@PathParam(value="codigo") Integer id) { return estabelecimentoDao.getEstabelecimentoId(id); } @DELETE @Path("/{codigo}") public void excluirEstabelecimento(@PathParam(value="codigo") Integer id) { estabelecimentoDao.excluirEstabelecimento(id); } @POST public void salvarEstabelecimento(Estabelecimento estabelecimento) { estabelecimentoDao.inserirEstabelecimento(estabelecimento); } @PUT public void atualizarEstabelecimento(Estabelecimento estabelecimento) { estabelecimentoDao.atualizarEstabelecimento(estabelecimento); } }
[ "Wanderson@DESKTOP-RCO5IFE" ]
Wanderson@DESKTOP-RCO5IFE
4442629200f3d3038c6d86329bbf04caa203e86b
8ca7d9b945e9e1406dbb07f9fe629b45a6fe81b9
/mafia-client/src/main/java/ru/serega6531/mafia/client/LocalSession.java
30b9552d58a9358c0c467caf6aaa23365bd3cba5
[]
no_license
serega6531/Mafia
ed2e5f65c4732d0247e5dd403b4560c452d07e4f
7e93c48f433e62bc5272c1ca83fc91db6d4792a0
refs/heads/master
2022-07-03T05:02:18.097882
2022-06-16T16:45:17
2022-06-16T16:45:17
202,013,184
0
0
null
null
null
null
UTF-8
Java
false
false
412
java
package ru.serega6531.mafia.client; import lombok.Data; import ru.serega6531.mafia.RoleInfo; import ru.serega6531.mafia.SessionInitialParameters; import java.util.List; @Data public class LocalSession { private final int id; private final SessionInitialParameters parameters; private final int playerNumber; private final List<String> players; private final List<RoleInfo> knownRoles; }
[ "shk@nextbi.ru" ]
shk@nextbi.ru
9eaa7cc10837bf035f109e3aabbff4ce52b671d5
d7eb852e1e5280a8c1516aa21668586f79d6cf11
/src/main/java/localOps/DatabaseGenerator.java
840f976f0457abed3bed38140b3ac900766f8817
[]
no_license
CosmicAnemone/Projeto-2021-1-server
0447c55cd9377ae9ae831419ac92b3df98ceb615
bd70b007de59ca8ec46ce5f96ee165c3357ebe26
refs/heads/master
2023-03-22T09:58:50.399483
2021-03-18T12:40:22
2021-03-18T12:40:22
333,040,778
0
0
null
null
null
null
UTF-8
Java
false
false
1,714
java
package localOps; import com.mongodb.client.model.Filters; import com.mongodb.client.model.ReplaceOptions; import com.mongodb.client.result.UpdateResult; import com.mongodb.reactivestreams.client.MongoClient; import com.mongodb.reactivestreams.client.MongoClients; import com.mongodb.reactivestreams.client.MongoCollection; import com.mongodb.reactivestreams.client.MongoDatabase; import data.Empresa; import data.Field; import org.bson.Document; import utils.EnvUtils; import java.util.LinkedList; import static database.DatabaseCommons.*; class DatabaseGenerator { private static MongoCollection<Document> empresas; private static MongoClient mongoClient; static void init() { mongoClient = MongoClients.create(EnvUtils.DB_connection_string); MongoDatabase database = mongoClient.getDatabase(EnvUtils.database_name); LinkedList<String> collectionNames = getAll(database.listCollectionNames()); empresas = getCollection(database, collectionEmpresasName, collectionNames); //No need to store the 'funcionarios' collection since we aren't going to use it here. getCollection(database, collectionFuncionariosName, collectionNames); } private static MongoCollection<Document> getCollection( MongoDatabase database, String collectionName, LinkedList<String> collectionNames) { if (!collectionNames.contains(collectionName)) { getFirst(database.createCollection(collectionName)); } return database.getCollection(collectionName); } static UpdateResult registerEmpresa(Empresa empresa){ return getFirst(empresas.replaceOne(Filters.eq(Field.nome, empresa.nome), empresa.save(), new ReplaceOptions().upsert(true))); } static void close() { mongoClient.close(); } }
[ "matheus29672967@hotmail.com" ]
matheus29672967@hotmail.com
4c9a6ca8d70131a589ca510409334519ebd64c8f
a3a5fd845a1bb244014b2b7f184f0e1099b6268f
/app/src/main/java/com/example/jiyin/common/widget/detail/CommentDetailBean.java
baf02a03ef178434c17a413b2d6f1438be103367
[]
no_license
niuwenxing/MyApplication
4b2efd4167759e7b48d6db5b4e08a486e2ec2773
dd8c40ddd411493ae9b90f2c774bc54cf4ecc6f2
refs/heads/master
2020-08-18T01:38:35.650769
2019-12-31T09:27:30
2019-12-31T09:27:30
215,732,948
1
1
null
null
null
null
UTF-8
Java
false
false
2,071
java
package com.example.jiyin.common.widget.detail; import java.util.List; /** * Created by moos on 2018/4/20. */ public class CommentDetailBean { private int cid; private String username; private String avatar; private String content; private String zan; private String ifzan; private int replyTotal; private String createDate; private String time; private List<ReplyDetailBean> sublist; public String getTime() { return time; } public void setTime(String time) { this.time = time; } public String getIfzan() { return ifzan; } public void setIfzan(String ifzan) { this.ifzan = ifzan; } public int getCid() { return cid; } public void setCid(int cid) { this.cid = cid; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getAvatar() { return avatar; } public void setAvatar(String avatar) { this.avatar = avatar; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public String getZan() { return zan; } public void setZan(String zan) { this.zan = zan; } public List<ReplyDetailBean> getSublist() { return sublist; } public void setSublist(List<ReplyDetailBean> sublist) { this.sublist = sublist; } public void setReplyTotal(int replyTotal) { this.replyTotal = replyTotal; } public int getReplyTotal() { return replyTotal; } public void setCreateDate(String createDate) { this.createDate = createDate; } public String getCreateDate() { return createDate; } public void setReplyList(List<ReplyDetailBean> replyList) { this.sublist = replyList; } public List<ReplyDetailBean> getReplyList() { return sublist; } }
[ "813307883@qq.com" ]
813307883@qq.com
839863d27af0a49d7feb69938681c315d4b5c32e
ada0c214b3177a816222ba3c5a54664887be8a22
/app/src/main/java/ru/divizdev/wallpapergallery/data/ManagerImageDownloader.java
f817bf815e7e59e3d4d0af687684302ca12359f4
[]
no_license
divizdev/WallpaperGallery
8829c69190d61b50f825ed72849cfb9118bcdfe1
4d52c087810a6938817b749d433056e335019dc9
refs/heads/master
2020-03-13T16:24:17.849848
2019-11-13T19:07:50
2019-11-13T19:07:50
131,196,862
1
0
null
null
null
null
UTF-8
Java
false
false
673
java
package ru.divizdev.wallpapergallery.data; import android.content.Context; import android.os.AsyncTask; import java.lang.ref.WeakReference; import ru.divizdev.wallpapergallery.entities.ImageUI; public class ManagerImageDownloader { private final WeakReference<Context> _contextWeakReference; public ManagerImageDownloader(Context context) { _contextWeakReference = new WeakReference<>(context); } public AsyncTask<ImageUI, Void, String> getImageDownloaderTask(){ Context context = _contextWeakReference.get(); if (context != null) { return new ImageDownloaderTask(context); } return null; } }
[ "diviz.dev@gmail.com" ]
diviz.dev@gmail.com
35ced5880dd0b9b705f7d55f2f485213e8df0d3c
b044d76114b41c9b1fa0480467df6fa0e005e382
/04.Model2MVCShop(Business Logic,MyBatis Spring)/src/com/model2/mvc/service/product/test/ProductTest_JUnit4.java
ed0c629a125d54f2f6f4ffe110ab5f9cdd1fe2e5
[]
no_license
KimCG1130/refactor
764a77dc8b7a3154df5999c7c1e8117d670ac0b6
fc1da3141b4cc5a45d029c4b1c53b4eff1434e41
refs/heads/master
2023-01-27T17:32:24.991147
2020-12-10T05:56:06
2020-12-10T05:56:06
316,201,573
0
0
null
null
null
null
UHC
Java
false
false
8,298
java
package com.model2.mvc.service.product.test; import java.util.List; import java.util.Map; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import com.model2.mvc.common.Search; import com.model2.mvc.service.domain.Product; import com.model2.mvc.service.product.ProductService; /* * FileName : ProductServiceTest.java * ㅇ JUnit4 (Test Framework) 과 Spring Framework 통합 Test( Unit Test) * ㅇ Spring 은 JUnit 4를 위한 지원 클래스를 통해 스프링 기반 통합 테스트 코드를 작성 할 수 있다. * ㅇ @RunWith : Meta-data 를 통한 wiring(생성,DI) 할 객체 구현체 지정 * ㅇ @ContextConfiguration : Meta-data location 지정 * ㅇ @Test : 테스트 실행 소스 지정 */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = { "classpath:config/commonservice.xml" }) public class ProductTest_JUnit4 { //==>@RunWith,@ContextConfiguration 이용 Wiring, Test 할 instance DI @Autowired @Qualifier("productServiceImpl") private ProductService productService; @Test public void testAddProduct() throws Exception { Product product = new Product(); product.setProdName("JUnit"); product.setProdDetail("JUnit단일 테스트를 시작합니다"); product.setManuDate("2000-01-01"); product.setPrice(12345); product.setFileName("junit"); productService.addProduct(product); //product = productService.getProduct(10000); //junit이 아닌 삼성센스라 fail(원하는 결과x) product = productService.getProduct(10124);//junit // 디버깅 System.out.println(product); // ==> API 확인:각 Assert 구문은 어떤 조건이 참인지 검증하는 방법이다. 단언한 조건이 참이 아니면 테스트는 그 자리에서 멈추고 실패한다. Assert.assertEquals("JUnit", product.getProdName()); Assert.assertEquals("JUnit단일 테스트를 시작합니다", product.getProdDetail()); Assert.assertEquals("2000-01-01", product.getManuDate()); Assert.assertEquals(12345, product.getPrice()); Assert.assertEquals("junit", product.getFileName()); } @Test public void testGetProduct() throws Exception { Product product = new Product(); product = productService.getProduct(10124); // ==> console 확인 System.out.println(product); // ==> API 확인 Assert.assertEquals("JUnit", product.getProdName()); Assert.assertEquals("JUnit단일 테스트를 시작합니다", product.getProdDetail()); Assert.assertEquals("2000-01-01", product.getManuDate()); Assert.assertEquals(12345, product.getPrice()); Assert.assertEquals("junit", product.getFileName()); Assert.assertNotNull(productService.getProduct(10124)); //Assert.assertNotNull(productService.getProduct(10002)); } //@Test public void testUpdateProduct() throws Exception { Product product = productService.getProduct(10143); Assert.assertNotNull(product); Assert.assertEquals("JUnit", product.getProdName()); Assert.assertEquals("JUnit단일 테스트를 시작합니다", product.getProdDetail()); Assert.assertEquals("2000-01-01", product.getManuDate()); Assert.assertEquals(12345, product.getPrice()); Assert.assertEquals("junit", product.getFileName()); product.setProdName("바꿔"); product.setProdDetail("모두 바꿔"); product.setManuDate("1234-01-01"); product.setPrice(10000); product.setFileName("junit"); productService.updateProduct(product); product = productService.getProduct(10124); Assert.assertNotNull(product); //==> console 확인 //System.out.println(product); //==> API 확인 Assert.assertEquals("바꿔", product.getProdName()); Assert.assertEquals("모두 바꿔", product.getProdDetail()); Assert.assertEquals("1234-01-01", product.getManuDate()); Assert.assertEquals(10000, product.getPrice()); Assert.assertEquals("junit", product.getFileName()); } //@Test public void testDeleteProduct() throws Exception { productService.deleteProduct(30000); Product product = productService.getProduct(30000); Assert.assertNotNull(product); } @Test public void testGetProductListAll() throws Exception { Search search = new Search(); search.setCurrentPage(1); search.setPageSize(3); Map <String, Object> map = productService.getProductList(search); List<Object> list = (List<Object>)map.get("list"); Assert.assertEquals(3, list.size()); //==> console 확인 System.out.println(list); Integer totalCount = (Integer)map.get("totalCount"); System.out.println(totalCount); System.out.println("======================================="); search.setCurrentPage(1); search.setPageSize(3); search.setSearchCondition("0"); search.setSearchKeyword(""); map = productService.getProductList(search); list = (List<Object>)map.get("list"); Assert.assertEquals(3, list.size()); totalCount = (Integer)map.get("totalCount"); System.out.println(totalCount); } //@Test public void testGetProductListByProdNo() throws Exception { Search search = new Search(); search.setCurrentPage(1); search.setPageSize(3); search.setSearchCondition("0"); search.setSearchKeyword("10143"); Map <String, Object> map = productService.getProductList(search); List <Object> list = (List <Object>) map.get("list"); Assert.assertEquals(0, list.size()); //success //Assert.assertEquals(3, list.size()); //fail //==> console 확인 System.out.println(list); Integer totalCount = (Integer)map.get("totalCount"); System.out.println(totalCount); System.out.println("======================================="); search.setSearchCondition("0"); search.setSearchKeyword(""+System.currentTimeMillis()); map = productService.getProductList(search); list = (List <Object>) map.get("list"); Assert.assertEquals(0, list.size()); //==> console 확인 System.out.println(list); totalCount = (Integer)map.get("totalCount"); System.out.println(totalCount); } //@Test public void testGetProductListByProdName() throws Exception { Search search = new Search(); search.setCurrentPage(1); search.setPageSize(3); search.setSearchCondition("1"); search.setSearchKeyword("a"); Map <String, Object> map = productService.getProductList(search); List <Object> list = (List <Object>) map.get("list"); Assert.assertEquals(3, list.size()); //==> console 확인 System.out.println(list); Integer totalCount = (Integer)map.get("totalCount"); System.out.println(totalCount); System.out.println("======================================="); search.setSearchCondition("1"); search.setSearchKeyword(""+System.currentTimeMillis()); map = productService.getProductList(search); list = (List<Object>)map.get("list"); Assert.assertEquals(0, list.size()); //==> console 확인 System.out.println(list); totalCount = (Integer)map.get("totalCount"); System.out.println(totalCount); } //@Test public void testGetProductListByProdPrice() throws Exception { Search search = new Search(); search.setCurrentPage(1); search.setPageSize(3); search.setSearchCondition("2"); search.setSearchKeyword("12"); Map<String, Object> map = productService.getProductList(search); List<Object> list = (List<Object>) map.get("list"); Assert.assertEquals(3, list.size()); // ==> console 확인 System.out.println(list); Integer totalCount = (Integer) map.get("totalCount"); System.out.println(totalCount); System.out.println("======================================="); search.setSearchCondition("2"); search.setSearchKeyword("" + System.currentTimeMillis()); map = productService.getProductList(search); list = (List<Object>) map.get("list"); Assert.assertEquals(0, list.size()); // ==> console 확인 System.out.println(list); totalCount = (Integer) map.get("totalCount"); System.out.println(totalCount); } }
[ "bitcamp@DESKTOP-IP3OFRT" ]
bitcamp@DESKTOP-IP3OFRT
cb2b3fd9bde80c3f2409c9e90637d68a4e2110f4
16a99868dc3e302d45caa31919e82dbdcd7d35b7
/jsica-ejb/src/main/java/com/project/jsica/ejb/dao/UbigeoFacadeLocal.java
b0c4cf86485fcaf64d8e1cc6775e6e7b3c7c98ad
[]
no_license
fesquivelc/jsica.project
7551adfca0c2b9c69ce498eb7f34370f9742bfee
f9fda8aa4124d0c7ccde6389a3f02eb1f4aa5dcf
refs/heads/master
2016-09-09T21:58:31.188738
2014-10-06T22:33:46
2014-10-06T22:33:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
872
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.project.jsica.ejb.dao; import com.project.jsica.ejb.entidades.Ubigeo; import java.util.List; import java.util.Map; import javax.ejb.Local; /** * * @author RyuujiMD */ @Local public interface UbigeoFacadeLocal { void create(Ubigeo ubigeo); void edit(Ubigeo ubigeo); void remove(Ubigeo ubigeo); Ubigeo find(Object id); List<Ubigeo> findAll(); List<Ubigeo> findRange(int[] range); List<Ubigeo> search(String namedQuery); List<Ubigeo> search(String namedQuery, Map<String, Object> parametros); List<Ubigeo> search(String namedQuery, Map<String, Object> parametros, int inicio, int tamanio); int count(); }
[ "fesquivelc@gmail.com" ]
fesquivelc@gmail.com
b2b5e1922fff527e09964ed359e827eb1ded375f
8801220ff35ce4d9a08cb6ada6e28bd4f470af11
/src/main/java/com/larissa/util/CriaTabelas.java
8030239ad4700ee0d90129855791bbb708214855
[ "Apache-2.0" ]
permissive
larissapontesmachado/consorcio
56f186a66b02d79232f2706db72341c100240e57
d2be92f1c60c4576635c13e3bffce670854862c3
refs/heads/master
2021-08-07T07:30:14.225769
2017-11-07T20:26:41
2017-11-07T20:26:41
109,598,854
0
0
null
null
null
null
UTF-8
Java
false
false
196
java
package com.larissa.util; import javax.persistence.Persistence; public class CriaTabelas { public static void main (String[] args){ Persistence.createEntityManagerFactory("consorcio"); } }
[ "larissapontesm@gmail.com" ]
larissapontesm@gmail.com
83abcdfcfc5bb3c0ede08d08083a713c46832cfd
3f58bd82ca5d5fe7e54806f153130e8940c04f5c
/app/src/main/java/com/walton/internetdataplan/activities/BanglalinkActivity.java
255f39aa8da347f9722e7e2eebc11e6f8214a049
[ "Apache-2.0" ]
permissive
skbipulr/BDDataPlan
ecede60cc3ae6f2308ab647c8d4ccbce540be15a
2a3fe45715ed24b9149a7c0437efc6b78c0d8910
refs/heads/master
2020-04-24T04:56:36.913355
2019-02-22T15:48:07
2019-02-22T15:48:07
171,720,377
0
0
null
null
null
null
UTF-8
Java
false
false
41,178
java
/* * Copyright (C) 2015 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.walton.internetdataplan.activities; import android.app.Activity; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.support.design.widget.NavigationView; import android.support.design.widget.TabLayout; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; import android.support.v4.view.GravityCompat; import android.support.v4.view.ViewPager; import android.support.v4.view.ViewPager.OnPageChangeListener; import android.support.v4.widget.DrawerLayout; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.KeyEvent; import android.view.MenuItem; import android.view.View; import android.view.View.OnClickListener; import android.view.View.OnKeyListener; import android.view.inputmethod.InputMethodManager; import android.widget.EditText; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.RelativeLayout; import android.widget.TextView; import android.widget.Toast; import com.facebook.ads.Ad; import com.facebook.ads.AdError; import com.facebook.ads.AdListener; import com.facebook.ads.AdSize; import com.facebook.ads.AdView; import com.facebook.ads.InterstitialAd; import com.facebook.ads.InterstitialAdListener; import com.walton.internetdataplan.AppManager; import com.walton.internetdataplan.R; import com.walton.internetdataplan.adapters.BLPostPaidAdapter; import com.walton.internetdataplan.adapters.BLPrepaidAdapter; import com.walton.internetdataplan.fragments.BLFnFFragment; import com.walton.internetdataplan.fragments.BLMigrationFragment; import com.walton.internetdataplan.fragments.BLMiscFragment; import com.walton.internetdataplan.fragments.BLPostPaidFragment; import com.walton.internetdataplan.fragments.BLPrepaidFragment; import com.walton.internetdataplan.utitls.AppsSettings; import com.walton.internetdataplan.utitls.KeyBoard; import com.walton.internetdataplan.utitls.WHelper; import java.util.ArrayList; import java.util.List; /** * TODO */ public class BanglalinkActivity extends AppCompatActivity { public NavigationView navigationView; public AdView adView; public RelativeLayout adViewContainer; String mSearchItemValue = ""; public static TextView mTitleBar, headerTitleBar; public static EditText mSearchItem; public static ImageView mSearchAction; public static LinearLayout mSearchActionL; public static LinearLayout mSearchState; public static LinearLayout mNormalState; public ImageView mDrawer_action; private DrawerLayout mDrawerLayout; public Context mContext; public static final String TAG = "BanglalinkActivity"; public Activity mActivity; public InterstitialAd interstitialAd; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.bl_activity); mContext = this; mActivity = this; // add inits ads // interstitialAd = new InterstitialAd(this, "1453443504734328_1453471424731536"); interstitialAd.setAdListener(new InterstitialAdListener() { @Override public void onInterstitialDisplayed(Ad ad) { } @Override public void onInterstitialDismissed(Ad ad) { } @Override public void onError(Ad ad, AdError adError) { } @Override public void onAdLoaded(Ad ad) { } @Override public void onAdClicked(Ad ad) { } @Override public void onLoggingImpression(Ad ad) { } }); interstitialAd.loadAd(); // end of add inits ads // // add facebook benner ads // adViewContainer = (RelativeLayout) findViewById(R.id.adViewContainer); adView = new AdView(mContext, "1453443504734328_1463947387017273", AdSize.BANNER_HEIGHT_50); adViewContainer.addView(adView); adView.setAdListener(new AdListener() { @Override public void onError(Ad ad, AdError adError) { Log.e("facebook_benner_ads","::error:"+adError.getErrorMessage()); } @Override public void onAdLoaded(Ad ad) { Log.e("facebook_benner_ads","::error:"+ad.getPlacementId()); } @Override public void onAdClicked(Ad ad) { } @Override public void onLoggingImpression(Ad ad) { } }); adView.loadAd(); // end of add facebook benner ads // KeyBoard.hideKeyBoard(mActivity); /* Inside the activity */ // Sets the Toolbar to act as the ActionBar for this Activity window. // Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); // setSupportActionBar(toolbar); // Remove default title text // getSupportActionBar().setDisplayShowTitleEnabled(false); // Get access to the custom title view mTitleBar = (TextView) findViewById(R.id.titleBar); mTitleBar.setText("" + getResources().getString(R.string.bl)); mSearchItem = (EditText) findViewById(R.id.searchItem); mDrawer_action = (ImageView) findViewById(R.id.drawer_action); mSearchState = (LinearLayout) findViewById(R.id.searchState); mNormalState = (LinearLayout) findViewById(R.id.normalState); mSearchAction = (ImageView) findViewById(R.id.searchAction); mSearchActionL = (LinearLayout) findViewById(R.id.searchActionL); if (AppsSettings.getAppsSettings(mContext).getLanguage().equals("eng")) { convertEnglish(); } else { convertBangla(); } // ************************* just preload Prepaid Fragment *****************************************// mNormalState.setVisibility(View.VISIBLE); mTitleBar.setVisibility(View.VISIBLE); mSearchItem.setText(""); // Enter key press detect // mSearchItem.setOnKeyListener(new OnKeyListener() { public boolean onKey(View v, int keyCode, KeyEvent event) { if (event.getAction() == KeyEvent.ACTION_DOWN) { switch (keyCode) { case KeyEvent.KEYCODE_DPAD_CENTER: case KeyEvent.KEYCODE_ENTER: mSearchItemValue = mSearchItem.getText().toString(); if (mSearchItemValue.equals("") || mSearchItemValue.trim().length() <= 1) { if (AppsSettings.getAppsSettings(mContext).getLanguage().equals("eng")) { Toast.makeText( mContext, "" + getResources().getString(R.string.min_press_2_chars), Toast.LENGTH_SHORT).show(); } else { Toast.makeText( mContext, "" + getResources().getString(R.string.min_press_2_chars_bn), Toast.LENGTH_SHORT).show(); } } else { InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(v.getWindowToken(), 0); AppManager.getInstance(mContext).retrieveBLPrepaidDataPackList(mContext, mSearchItemValue); BLPrepaidAdapter gpAdapter1 = new BLPrepaidAdapter(mContext, AppManager.mBLPrepaidDataPackList, true); BLPrepaidFragment.recyclerView.setAdapter(gpAdapter1); } return true; default: break; } } return false; } }); // End of Enter key press detect // mSearchAction.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { if (mSearchItem.isShown()) { mSearchItemValue = mSearchItem.getText().toString(); if (mSearchItemValue.equals("") || mSearchItemValue.trim().length() <= 1) { if (AppsSettings.getAppsSettings(mContext).getLanguage().equals("eng")) { Toast.makeText( mContext, "" + getResources().getString(R.string.min_press_2_chars), Toast.LENGTH_SHORT).show(); } else { Toast.makeText( mContext, "" + getResources().getString(R.string.min_press_2_chars_bn), Toast.LENGTH_SHORT).show(); } } else { InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(view.getWindowToken(), 0); AppManager.getInstance(mContext).retrieveBLPrepaidDataPackList(mContext, mSearchItemValue); BLPrepaidAdapter gpAdapter1 = new BLPrepaidAdapter(mContext, AppManager.mBLPrepaidDataPackList, true); BLPrepaidFragment.recyclerView.setAdapter(gpAdapter1); // start change // mNormalState.setVisibility(View.VISIBLE); mTitleBar.setVisibility(View.VISIBLE); mSearchState.setVisibility(View.GONE); mSearchItem.setText(""); mSearchAction.setImageResource(R.drawable.refresh_96); // end of start change // } } else { mSearchItem.setText(""); if (AppManager.mBLPrepaidDataPackList.size() == 17) { } else { AppManager.getInstance(mContext).retrieveBLPrepaidDataPackList(mContext, ""); BLPrepaidAdapter gpAdapter1 = new BLPrepaidAdapter(mContext, AppManager.mBLPrepaidDataPackList, true); BLPrepaidFragment.recyclerView.setAdapter(gpAdapter1); } if (AppsSettings.getAppsSettings(mContext).getLanguage().equals("eng")) { mSearchItem.setHint(getResources().getString(R.string.edittext_hint)); } else { mSearchItem.setHint(getResources().getString(R.string.edittext_hint_bn)); } mNormalState.setVisibility(View.GONE); mSearchState.setVisibility(View.VISIBLE); mSearchAction.setImageResource(R.drawable.search_96); } } }); // ************************* just preload Prepaid Fragment *****************************************// mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout); navigationView = (NavigationView) findViewById(R.id.nav_view); navigationView.setItemIconTintList(null); // SETTING NAVIGATION MENU // navigationView.getMenu().clear(); //clear old inflated items. if (AppsSettings.getAppsSettings(mContext).getLanguage().equals("eng")) { navigationView.inflateMenu(R.menu.drawer_view); View hea = navigationView.getHeaderView(0); headerTitleBar = (TextView) hea.findViewById(R.id.headerTitleBar); headerTitleBar.setText(getResources().getString(R.string.bl)); } else { navigationView.inflateMenu(R.menu.drawer_view_bn); //inflate new items. View hea = navigationView.getHeaderView(0); headerTitleBar = (TextView) hea.findViewById(R.id.headerTitleBar); headerTitleBar.setText(getResources().getString(R.string.bl_bn)); } // END OF SETTING NAVIGATION MENU // if (navigationView != null) { // set selected item navigationView.getMenu().getItem(2).setChecked(true); setupDrawerContent(); } mDrawer_action.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { mDrawerLayout.openDrawer(GravityCompat.START); } }); ViewPager viewPager = (ViewPager) findViewById(R.id.viewpager); viewPager.setOffscreenPageLimit(5); if (viewPager != null) { setupViewPager(viewPager); } TabLayout tabLayout = (TabLayout) findViewById(R.id.tabs); tabLayout.setupWithViewPager(viewPager); //*************************** omor code *********************************/ //*************************** End of omor code *********************************/ // ********************* changing here...................... viewPager.addOnPageChangeListener(new OnPageChangeListener() { @Override public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { // Log.e("ontest",":onPageScrolled:"); } @Override public void onPageSelected(int position) { Log.e("ontest", ":onPageSelected:"); if (position == 0 || position == 1) { mNormalState.setVisibility(View.VISIBLE); mTitleBar.setVisibility(View.VISIBLE); mSearchItem.setText(""); // for prepaid if (position == 0) { mSearchAction.setImageResource(R.drawable.search_96); mSearchState.setVisibility(View.GONE); mSearchActionL.setVisibility(View.VISIBLE); if (AppManager.mBLPrepaidDataPackList.size() == 17) { mSearchAction.setImageResource(R.drawable.search_96); } else { mSearchAction.setImageResource(R.drawable.refresh_96); // AppManager.getInstance(mContext).retrieveBLPrepaidDataPackList(mContext, ""); // BLPrepaidAdapter gpAdapter = new BLPrepaidAdapter(mContext, AppManager.mBLPrepaidDataPackList, false); // BLPrepaidFragment.recyclerView.setAdapter(gpAdapter); } // // set load first time // AppsSettings.getAppsSettings(mContext).setBLPrepaidLoad(true); // Enter key press detect // mSearchItem.setOnKeyListener(new OnKeyListener() { public boolean onKey(View v, int keyCode, KeyEvent event) { if (event.getAction() == KeyEvent.ACTION_DOWN) { switch (keyCode) { case KeyEvent.KEYCODE_DPAD_CENTER: case KeyEvent.KEYCODE_ENTER: mSearchItemValue = mSearchItem.getText().toString(); if (mSearchItemValue.equals("") || mSearchItemValue.trim().length() <= 1) { if (AppsSettings.getAppsSettings(mContext).getLanguage().equals("eng")) { Toast.makeText( mContext, "" + getResources().getString(R.string.min_press_2_chars), Toast.LENGTH_SHORT).show(); } else { Toast.makeText( mContext, "" + getResources().getString(R.string.min_press_2_chars_bn), Toast.LENGTH_SHORT).show(); } } else { InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(v.getWindowToken(), 0); AppManager.getInstance(mContext).retrieveBLPrepaidDataPackList(mContext, mSearchItemValue); BLPrepaidAdapter gpAdapter = new BLPrepaidAdapter(mContext, AppManager.mBLPrepaidDataPackList, true); BLPrepaidFragment.recyclerView.setAdapter(gpAdapter); // start change // mNormalState.setVisibility(View.VISIBLE); mTitleBar.setVisibility(View.VISIBLE); mSearchState.setVisibility(View.GONE); mSearchItem.setText(""); mSearchAction.setImageResource(R.drawable.refresh_96); // end of start change // } return true; default: break; } } return false; } }); // End of Enter key press detect // mSearchAction.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { if (mSearchItem.isShown()) { mSearchItemValue = mSearchItem.getText().toString(); if (mSearchItemValue.equals("") || mSearchItemValue.trim().length() <= 1) { if (AppsSettings.getAppsSettings(mContext).getLanguage().equals("eng")) { Toast.makeText( mContext, "" + getResources().getString(R.string.min_press_2_chars), Toast.LENGTH_SHORT).show(); } else { Toast.makeText( mContext, "" + getResources().getString(R.string.min_press_2_chars_bn), Toast.LENGTH_SHORT).show(); } } else { InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(view.getWindowToken(), 0); AppManager.getInstance(mContext).retrieveBLPrepaidDataPackList(mContext, mSearchItemValue); BLPrepaidAdapter gpAdapter = new BLPrepaidAdapter(mContext, AppManager.mBLPrepaidDataPackList, true); BLPrepaidFragment.recyclerView.setAdapter(gpAdapter); // start change // mNormalState.setVisibility(View.VISIBLE); mTitleBar.setVisibility(View.VISIBLE); mSearchState.setVisibility(View.GONE); mSearchItem.setText(""); mSearchAction.setImageResource(R.drawable.refresh_96); // end of start change // } } else { mSearchItem.setText(""); if (AppManager.mBLPrepaidDataPackList.size() == 17) { } else { AppManager.getInstance(mContext).retrieveBLPrepaidDataPackList(mContext, ""); BLPrepaidAdapter gpAdapter1 = new BLPrepaidAdapter(mContext, AppManager.mBLPrepaidDataPackList, true); BLPrepaidFragment.recyclerView.setAdapter(gpAdapter1); } if (AppsSettings.getAppsSettings(mContext).getLanguage().equals("eng")) { mSearchItem.setHint(getResources().getString(R.string.edittext_hint)); } else { mSearchItem.setHint(getResources().getString(R.string.edittext_hint_bn)); } mNormalState.setVisibility(View.GONE); mSearchState.setVisibility(View.VISIBLE); mSearchAction.setImageResource(R.drawable.search_96); } } }); } else if (position == 1) { mSearchAction.setImageResource(R.drawable.search_96); mSearchState.setVisibility(View.GONE); mSearchActionL.setVisibility(View.VISIBLE); if (AppManager.mBLPostpaidDataPackList.size() == 16) { mSearchAction.setImageResource(R.drawable.search_96); } else { mSearchAction.setImageResource(R.drawable.refresh_96); // AppManager.getInstance(mContext).retrieveBLPostpaidDataPackList(mContext, ""); // BLPostPaidAdapter gpAdapter = new BLPostPaidAdapter(mContext, AppManager.mBLPostpaidDataPackList, false); // BLPostPaidFragment.recyclerView.setAdapter(gpAdapter); } // // set load first time // AppsSettings.getAppsSettings(mContext).setBLPostpaidLoad(true); // Enter key press detect // mSearchItem.setOnKeyListener(new OnKeyListener() { public boolean onKey(View v, int keyCode, KeyEvent event) { if (event.getAction() == KeyEvent.ACTION_DOWN) { switch (keyCode) { case KeyEvent.KEYCODE_DPAD_CENTER: case KeyEvent.KEYCODE_ENTER: mSearchItemValue = mSearchItem.getText().toString(); if (mSearchItemValue.equals("") || mSearchItemValue.trim().length() <= 1) { if (AppsSettings.getAppsSettings(mContext).getLanguage().equals("eng")) { Toast.makeText( mContext, "" + getResources().getString(R.string.min_press_2_chars), Toast.LENGTH_SHORT).show(); } else { Toast.makeText( mContext, "" + getResources().getString(R.string.min_press_2_chars_bn), Toast.LENGTH_SHORT).show(); } } else { InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(v.getWindowToken(), 0); AppManager.getInstance(mContext).retrieveBLPostpaidDataPackList(mContext, mSearchItemValue); BLPostPaidAdapter gpAdapter = new BLPostPaidAdapter(mContext, AppManager.mBLPostpaidDataPackList, true); BLPostPaidFragment.recyclerView.setAdapter(gpAdapter); // start change // mNormalState.setVisibility(View.VISIBLE); mTitleBar.setVisibility(View.VISIBLE); mSearchState.setVisibility(View.GONE); mSearchItem.setText(""); mSearchAction.setImageResource(R.drawable.refresh_96); // end of start change // } return true; default: break; } } return false; } }); // End of Enter key press detect // mSearchAction.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { if (mSearchItem.isShown()) { mSearchItemValue = mSearchItem.getText().toString(); if (mSearchItemValue.equals("") || mSearchItemValue.trim().length() <= 1) { if (AppsSettings.getAppsSettings(mContext).getLanguage().equals("eng")) { Toast.makeText( mContext, "" + getResources().getString(R.string.min_press_2_chars), Toast.LENGTH_SHORT).show(); } else { Toast.makeText( mContext, "" + getResources().getString(R.string.min_press_2_chars_bn), Toast.LENGTH_SHORT).show(); } } else { InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(view.getWindowToken(), 0); AppManager.getInstance(mContext).retrieveBLPostpaidDataPackList(mContext, mSearchItemValue); BLPostPaidAdapter gpAdapter = new BLPostPaidAdapter(mContext, AppManager.mBLPostpaidDataPackList, true); BLPostPaidFragment.recyclerView.setAdapter(gpAdapter); // start change // mNormalState.setVisibility(View.VISIBLE); mTitleBar.setVisibility(View.VISIBLE); mSearchState.setVisibility(View.GONE); mSearchItem.setText(""); mSearchAction.setImageResource(R.drawable.refresh_96); // end of start change // } } else { mSearchItem.setText(""); if (AppManager.mBLPostpaidDataPackList.size() == 16) { } else { AppManager.getInstance(mContext).retrieveBLPostpaidDataPackList(mContext, ""); BLPostPaidAdapter gpAdapter = new BLPostPaidAdapter(mContext, AppManager.mBLPostpaidDataPackList, true); BLPostPaidFragment.recyclerView.setAdapter(gpAdapter); } if (AppsSettings.getAppsSettings(mContext).getLanguage().equals("eng")) { mSearchItem.setHint(getResources().getString(R.string.edittext_hint)); } else { mSearchItem.setHint(getResources().getString(R.string.edittext_hint_bn)); } mNormalState.setVisibility(View.GONE); mSearchState.setVisibility(View.VISIBLE); mSearchAction.setImageResource(R.drawable.search_96); } } }); } else { mSearchAction.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { mNormalState.setVisibility(View.GONE); mSearchState.setVisibility(View.VISIBLE); } }); mSearchActionL.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { mNormalState.setVisibility(View.GONE); mSearchState.setVisibility(View.VISIBLE); } }); } } else { KeyBoard.hideKeyBoard(mActivity); mSearchActionL.setVisibility(View.INVISIBLE); mSearchState.setVisibility(View.GONE); mNormalState.setVisibility(View.VISIBLE); } } @Override public void onPageScrollStateChanged(int state) { } }); // >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> } @Override protected void onResume() { super.onResume(); // END OF SETTING NAVIGATION MENU // if (navigationView != null) { // set selected item navigationView.getMenu().getItem(2).setChecked(true); setupDrawerContent(); } KeyBoard.hideKeyBoard(mActivity); } private void convertEnglish() { mTitleBar.setText("" + getResources().getString(R.string.bl)); } private void convertBangla() { mTitleBar.setText("" + getResources().getString(R.string.bl_bn)); } private void setupViewPager(ViewPager viewPager) { if (AppsSettings.getAppsSettings(mContext).getLanguage().equals("eng")) { Adapter adapter = new Adapter(getSupportFragmentManager()); adapter.addFragment(new BLPrepaidFragment(), "" + getResources().getString(R.string.prepaid)); adapter.addFragment(new BLPostPaidFragment(), "" + getResources().getString(R.string.postpaid)); adapter.addFragment(new BLMigrationFragment(), "" + getResources().getString(R.string.package_migration)); adapter.addFragment(new BLMiscFragment(), "" + getResources().getString(R.string.miscellaneous)); adapter.addFragment(new BLFnFFragment(), "" + getResources().getString(R.string.fnf_service)); viewPager.setAdapter(adapter); } else { Adapter adapter = new Adapter(getSupportFragmentManager()); adapter.addFragment(new BLPrepaidFragment(), "" + getResources().getString(R.string.prepaid_bn)); adapter.addFragment(new BLPostPaidFragment(), "" + getResources().getString(R.string.postpaid_bn)); adapter.addFragment(new BLMigrationFragment(), "" + getResources().getString(R.string.package_migration_bn)); adapter.addFragment(new BLMiscFragment(), "" + getResources().getString(R.string.miscellaneous_bn)); adapter.addFragment(new BLFnFFragment(), "" + getResources().getString(R.string.fnf_service_bn)); viewPager.setAdapter(adapter); } } private void setupDrawerContent() { //Setting Navigation View Item Selected Listener to handle the item click of the navigation menu navigationView.setNavigationItemSelectedListener(new NavigationView.OnNavigationItemSelectedListener() { // This method will trigger on item Click of navigation menu @Override public boolean onNavigationItemSelected(MenuItem menuItem) { //Checking if the item is in checked state or not, if not make it in checked state if (menuItem.isChecked()) menuItem.setChecked(false); else menuItem.setChecked(true); //Closing drawer on item click mDrawerLayout.closeDrawers(); //Check to see which item was being clicked and perform appropriate action switch (menuItem.getItemId()) { //Replacing the main content with ContentFragment Which is our Inbox View; case R.id.nav_home: Intent i = new Intent(mContext, MainActivity.class); i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(i); // ContentFragment fragment = new ContentFragment(); // android.support.v4.app.FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction(); // fragmentTransaction.replace(R.id.frame,fragment); // fragmentTransaction.commit(); return true; // For rest of the options we just show a tohhast on click case R.id.grameenphone: Intent gphone = new Intent(mContext, GrameenphoneActivity.class); gphone.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(gphone); return true; case R.id.banglalink: Intent blhone = new Intent(mContext, BanglalinkActivity.class); blhone.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(blhone); return true; case R.id.airtel: Intent airtel = new Intent(mContext, AirtelActivity.class); airtel.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(airtel); return true; case R.id.robi: Intent robi = new Intent(mContext, RobiActivity.class); robi.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(robi); return true; case R.id.teletalk: Intent teletalk = new Intent(mContext, TeletalkActivity.class); teletalk.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(teletalk); return true; case R.id.setting: // Setting Intent setting = new Intent(mContext, SettingsActivity.class); setting.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(setting); return true; case R.id.share: WHelper.getInstance(mContext).share(); return true; case R.id.about: // about Intent about = new Intent(mContext, AboutActivity.class); about.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(about); return true; default: Intent de = new Intent(mContext, MainActivity.class); de.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(de); return true; } } }); } static class Adapter extends FragmentPagerAdapter { private final List<Fragment> mFragments = new ArrayList<>(); private final List<String> mFragmentTitles = new ArrayList<>(); public Adapter(FragmentManager fm) { super(fm); } public void addFragment(Fragment fragment, String title) { mFragments.add(fragment); mFragmentTitles.add(title); } @Override public Fragment getItem(int position) { return mFragments.get(position); } @Override public int getCount() { return mFragments.size(); } @Override public CharSequence getPageTitle(int position) { return mFragmentTitles.get(position); } } @Override public void onBackPressed() { if (interstitialAd.isAdLoaded()) { interstitialAd.show(); } closeAlert(); // super.onBackPressed(); } public void quit() { Intent intent = new Intent(getApplicationContext(), MainActivity.class); intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); intent.putExtra("EXIT", true); startActivity(intent); } private void closeAlert() { new AlertDialog.Builder(mContext) .setTitle("Exit ") .setMessage("Are you sure to close?") .setCancelable(false) .setPositiveButton("Yes", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { quit(); } }) .setNegativeButton("No", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { finish(); } }) .show(); } @Override protected void onDestroy() { if (adView != null) { adView.destroy(); } if (interstitialAd != null) { interstitialAd.destroy(); } super.onDestroy(); } }
[ "skbipulr@gmail.com" ]
skbipulr@gmail.com