hexsha
stringlengths
40
40
size
int64
3
1.05M
ext
stringclasses
1 value
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
5
1.02k
max_stars_repo_name
stringlengths
4
126
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
list
max_stars_count
float64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
5
1.02k
max_issues_repo_name
stringlengths
4
114
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
list
max_issues_count
float64
1
92.2k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
5
1.02k
max_forks_repo_name
stringlengths
4
136
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
list
max_forks_count
float64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
avg_line_length
float64
2.55
99.9
max_line_length
int64
3
1k
alphanum_fraction
float64
0.25
1
index
int64
0
1M
content
stringlengths
3
1.05M
92404f15d7c6221235e6acc29e307b430165eb2f
3,936
java
Java
src/test/java/endtoend/fluentfunctions/getters/WaitUntilGettersTest.java
privatejava/seleniumQuery
629b8ff16468a41d9f362f5672c3a6bb58673e2d
[ "Apache-2.0" ]
72
2015-03-10T13:05:55.000Z
2021-05-02T08:37:31.000Z
src/test/java/endtoend/fluentfunctions/getters/WaitUntilGettersTest.java
privatejava/seleniumQuery
629b8ff16468a41d9f362f5672c3a6bb58673e2d
[ "Apache-2.0" ]
153
2015-01-09T19:34:00.000Z
2019-05-02T02:59:50.000Z
src/test/java/endtoend/fluentfunctions/getters/WaitUntilGettersTest.java
privatejava/seleniumQuery
629b8ff16468a41d9f362f5672c3a6bb58673e2d
[ "Apache-2.0" ]
30
2015-03-04T22:00:44.000Z
2021-01-22T10:00:35.000Z
32.262295
113
0.708841
1,001,472
/* * Copyright (c) 2016 seleniumQuery 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 endtoend.fluentfunctions.getters; import static io.github.seleniumquery.SeleniumQuery.$; import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertThat; import java.util.List; import org.junit.Before; import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; import org.openqa.selenium.WebElement; import io.github.seleniumquery.SeleniumQueryWaitAndOrThen; import testinfrastructure.junitrule.SetUpAndTearDownDriver; import testinfrastructure.junitrule.annotation.JavaScriptEnabledOnly; public class WaitUntilGettersTest { @ClassRule @Rule public static SetUpAndTearDownDriver setUpAndTearDownDriverRule = new SetUpAndTearDownDriver(); private List<WebElement> divs; @Before public void setUp() throws Exception { divs = $("#d1,#d2").get(); } @Test public void size_getter() { assertThat($("div").waitUntil().size().isEqualTo(2).then().get(), is(divs)); } @Test @JavaScriptEnabledOnly public void attr_getter() { assertThat($("div").waitUntil().attr("data-attr").isEqualTo("data-attr-value").then().get(), is(divs)); } @Test @JavaScriptEnabledOnly public void prop_getter() { assertThat($("div").waitUntil().prop("tagName").isEqualTo("DIV").then().get(), is(divs)); } @Test public void html_getter() { assertThat($("div").waitUntil().html().isEqualTo("&gt;&lt;").then().get(), is(divs)); } @Test public void text_getter() { assertThat($("div").waitUntil().text().isEqualTo(">< ><").then().get(), is(divs)); } @Test public void size_getter_toString() { // when SeleniumQueryWaitAndOrThen waitAndOrThen = $("div").waitUntil().size().isEqualTo(2); // then String expectedToString = "$(\"div\")"; assertThat(waitAndOrThen.toString(), is(expectedToString)); assertThat(waitAndOrThen.then().toString(), is(expectedToString)); } @Test @JavaScriptEnabledOnly public void attr_getter_toString() { // when SeleniumQueryWaitAndOrThen waitAndOrThen = $("div").waitUntil().attr("data-attr").isEqualTo("data-attr-value"); // then String expectedToString = "$(\"div\")"; assertThat(waitAndOrThen.toString(), is(expectedToString)); assertThat(waitAndOrThen.then().toString(), is(expectedToString)); } @Test @JavaScriptEnabledOnly public void prop_getter_toString() { // when SeleniumQueryWaitAndOrThen waitAndOrThen = $("div").waitUntil().prop("tagName").isEqualTo("DIV"); // then String expectedToString = "$(\"div\")"; assertThat(waitAndOrThen.toString(), is(expectedToString)); assertThat(waitAndOrThen.then().toString(), is(expectedToString)); } @Test public void html_getter_toString() { // when SeleniumQueryWaitAndOrThen waitAndOrThen = $("div").waitUntil().html().isEqualTo("&gt;&lt;"); // then String expectedToString = "$(\"div\")"; assertThat(waitAndOrThen.toString(), is(expectedToString)); assertThat(waitAndOrThen.then().toString(), is(expectedToString)); } @Test public void text_getter_toString() { // when SeleniumQueryWaitAndOrThen waitAndOrThen = $("div").waitUntil().text().contains("< >"); // then String expectedToString = "$(\"div\")"; assertThat(waitAndOrThen.toString(), is(expectedToString)); assertThat(waitAndOrThen.then().toString(), is(expectedToString)); } }
92404f76290571946c629de68d0e16b8534b5fd5
1,932
java
Java
sdk/monitor/mgmt-v2019_11_01/src/main/java/com/microsoft/azure/management/monitor/v2019_11_01/DiagnosticSettings.java
yiliuTo/azure-sdk-for-java
4536b6e99ded1b2b77f79bc2c31f42566c97b704
[ "MIT" ]
3
2021-09-15T16:25:19.000Z
2021-12-17T05:41:00.000Z
sdk/monitor/mgmt-v2019_11_01/src/main/java/com/microsoft/azure/management/monitor/v2019_11_01/DiagnosticSettings.java
yiliuTo/azure-sdk-for-java
4536b6e99ded1b2b77f79bc2c31f42566c97b704
[ "MIT" ]
12
2019-07-17T16:18:54.000Z
2019-07-17T21:30:02.000Z
sdk/monitor/mgmt-v2019_11_01/src/main/java/com/microsoft/azure/management/monitor/v2019_11_01/DiagnosticSettings.java
yiliuTo/azure-sdk-for-java
4536b6e99ded1b2b77f79bc2c31f42566c97b704
[ "MIT" ]
1
2022-01-31T19:22:33.000Z
2022-01-31T19:22:33.000Z
37.882353
148
0.754658
1,001,473
/** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for * license information. * * Code generated by Microsoft (R) AutoRest Code Generator. */ package com.microsoft.azure.management.monitor.v2019_11_01; import com.microsoft.azure.arm.collection.SupportsCreating; import rx.Completable; import rx.Observable; import com.microsoft.azure.management.monitor.v2019_11_01.implementation.DiagnosticSettingsInner; import com.microsoft.azure.arm.model.HasInner; /** * Type representing DiagnosticSettings. */ public interface DiagnosticSettings extends SupportsCreating<DiagnosticSettingsResource.DefinitionStages.Blank>, HasInner<DiagnosticSettingsInner> { /** * Gets the active diagnostic settings for the specified resource. * * @param resourceUri The identifier of the resource. * @param name The name of the diagnostic setting. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ Observable<DiagnosticSettingsResource> getAsync(String resourceUri, String name); /** * Deletes existing diagnostic settings for the specified resource. * * @param resourceUri The identifier of the resource. * @param name The name of the diagnostic setting. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ Completable deleteAsync(String resourceUri, String name); /** * Gets the active diagnostic settings list for the specified resource. * * @param resourceUri The identifier of the resource. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the observable for the request */ Observable<DiagnosticSettingsResourceCollection> listAsync(String resourceUri); }
92404fc91b6d3ad866cd47f08d061c16452502a5
4,374
java
Java
disco-test/disco-normal-code-tests/src/test/java/uk/co/exemel/disco/tests/updatedcomponenttests/standardtesting/soap/SOAPRequestTypesDateTimeMapNoOffsetSpecifiedTest.java
eswdd/cougar
fb463dd084fe7aaead0896fee52ae124d34c3c7a
[ "Apache-2.0" ]
null
null
null
disco-test/disco-normal-code-tests/src/test/java/uk/co/exemel/disco/tests/updatedcomponenttests/standardtesting/soap/SOAPRequestTypesDateTimeMapNoOffsetSpecifiedTest.java
eswdd/cougar
fb463dd084fe7aaead0896fee52ae124d34c3c7a
[ "Apache-2.0" ]
null
null
null
disco-test/disco-normal-code-tests/src/test/java/uk/co/exemel/disco/tests/updatedcomponenttests/standardtesting/soap/SOAPRequestTypesDateTimeMapNoOffsetSpecifiedTest.java
eswdd/cougar
fb463dd084fe7aaead0896fee52ae124d34c3c7a
[ "Apache-2.0" ]
1
2018-04-21T06:05:18.000Z
2018-04-21T06:05:18.000Z
53.353659
325
0.749257
1,001,474
/* * Copyright 2013, The Sporting Exchange Limited * Copyright 2014, Simon Matić Langford * * 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. */ // Originally from UpdatedComponentTests/StandardTesting/SOAP/SOAP_RequestTypes_DateTimeMap_NoOffsetSpecified.xls; package uk.co.exemel.disco.tests.updatedcomponenttests.standardtesting.soap; import uk.co.exemel.testing.utils.disco.misc.TimingHelpers; import uk.co.exemel.testing.utils.disco.misc.XMLHelpers; import uk.co.exemel.testing.utils.disco.assertions.AssertionUtils; import uk.co.exemel.testing.utils.disco.beans.HttpCallBean; import uk.co.exemel.testing.utils.disco.beans.HttpResponseBean; import uk.co.exemel.testing.utils.disco.enums.DiscoMessageProtocolResponseTypeEnum; import uk.co.exemel.testing.utils.disco.manager.DiscoManager; import uk.co.exemel.testing.utils.disco.manager.RequestLogRequirement; import org.testng.annotations.Test; import org.w3c.dom.Document; import javax.xml.parsers.DocumentBuilderFactory; import java.io.ByteArrayInputStream; import java.sql.Timestamp; /** * Ensure that when a SOAP request is received, Disco can handle the dateTimeMap datatype containing a date with no offset */ public class SOAPRequestTypesDateTimeMapNoOffsetSpecifiedTest { @Test public void doTest() throws Exception { // Create the SOAP request as an XML Document (with a dateTimeMap parameter containing a date with no offset) XMLHelpers xMLHelpers1 = new XMLHelpers(); Document createAsDocument1 = xMLHelpers1.getXMLObjectFromString("<DateTimeMapOperationRequest><message><dateTimeMap><entry key=\"date1\"><Date>2009-06-01T11:50:00.000Z</Date></entry><entry key=\"date2\"><Date>2009-06-01T12:50:00.000Z</Date></entry></dateTimeMap></message></DateTimeMapOperationRequest>"); // Set up the Http Call Bean to make the request DiscoManager discoManager2 = DiscoManager.getInstance(); HttpCallBean hbean = discoManager2.getNewHttpCallBean("192.168.3.11"); DiscoManager hinstance = discoManager2; hbean.setServiceName("Baseline"); hbean.setVersion("v2"); // Create the date object expected to be returned in the response String date1 = TimingHelpers.convertUTCDateTimeToDiscoFormat((int) 2009, (int) 6, (int) 1, (int) 11, (int) 50, (int) 0, (int) 0); // Create the date object expected to be returned in the response String date2 = TimingHelpers.convertUTCDateTimeToDiscoFormat((int) 2009, (int) 6, (int) 1, (int) 12, (int) 50, (int) 0, (int) 0); // Set the created SOAP request as the PostObject hbean.setPostObjectForRequestType(createAsDocument1, "SOAP"); // Get current time for getting log entries later Timestamp getTimeAsTimeStamp9 = new Timestamp(System.currentTimeMillis()); // Make the SOAP call to the operation hinstance.makeSoapDiscoHTTPCalls(hbean); // Create the expected response object as an XML document (using the date objects created earlier) XMLHelpers xMLHelpers6 = new XMLHelpers(); Document createAsDocument11 = xMLHelpers6.createAsDocument(DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new ByteArrayInputStream(("<response><responseMap><entry key=\"date2\"><Date>"+date2+"</Date></entry><entry key=\"date1\"><Date>"+date1+"</Date></entry></responseMap></response>").getBytes()))); // Check the response is as expected HttpResponseBean response7 = hbean.getResponseObjectsByEnum(DiscoMessageProtocolResponseTypeEnum.SOAP); AssertionUtils.multiAssertEquals(createAsDocument11, response7.getResponseObject()); // generalHelpers.pauseTest(3000L); // Check the log entries are as expected hinstance.verifyRequestLogEntriesAfterDate(getTimeAsTimeStamp9, new RequestLogRequirement("2.8", "dateTimeMapOperation") ); } }
9240501452bc21bd690efedf3d63d693f69ae569
1,811
java
Java
jstorm-core/src/main/java/backtype/storm/task/OutputCollectorCb.java
chenqixu/jstorm
5d6cde22dbca7df3d6e6830bf94f98a6639ab559
[ "Apache-2.0" ]
4,124
2015-01-03T15:58:17.000Z
2022-03-31T11:06:25.000Z
jstorm-core/src/main/java/backtype/storm/task/OutputCollectorCb.java
chenqixu/jstorm
5d6cde22dbca7df3d6e6830bf94f98a6639ab559
[ "Apache-2.0" ]
596
2015-01-05T14:11:02.000Z
2021-08-05T20:44:39.000Z
jstorm-core/src/main/java/backtype/storm/task/OutputCollectorCb.java
chenqixu/jstorm
5d6cde22dbca7df3d6e6830bf94f98a6639ab559
[ "Apache-2.0" ]
2,064
2015-01-04T10:54:02.000Z
2022-03-29T06:55:43.000Z
34.377358
141
0.750274
1,001,475
/** * 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 backtype.storm.task; import backtype.storm.tuple.Tuple; import java.util.Collection; import java.util.List; /** * @author JohnFang ([email protected]). */ public abstract class OutputCollectorCb implements IOutputCollector { protected IOutputCollector delegate; public OutputCollectorCb() { } public OutputCollectorCb(IOutputCollector delegate) { this.delegate = delegate; } public abstract List<Integer> emit(String streamId, Collection<Tuple> anchors, List<Object> tuple, ICollectorCallback callback); public abstract void emitDirect(int taskId, String streamId, Collection<Tuple> anchors, List<Object> tuple, ICollectorCallback callback); public abstract List<Integer> emitCtrl(String streamId, Collection<Tuple> anchors, List<Object> tuple); public abstract void emitDirectCtrl(int taskId, String streamId, Collection<Tuple> anchors, List<Object> tuple); public void flush() { } public void setBatchId(long batchId) { } }
9240502d63bfb3fdb012dd262a1ecf8ad527dd0a
6,069
java
Java
a03-basic/src/main/java/a03/swing/plaf/A03TableCellRenderer.java
draccagni/a03
ea4c0e2d516b7244b2512a4731fc2c0cac4064c1
[ "BSD-3-Clause" ]
null
null
null
a03-basic/src/main/java/a03/swing/plaf/A03TableCellRenderer.java
draccagni/a03
ea4c0e2d516b7244b2512a4731fc2c0cac4064c1
[ "BSD-3-Clause" ]
null
null
null
a03-basic/src/main/java/a03/swing/plaf/A03TableCellRenderer.java
draccagni/a03
ea4c0e2d516b7244b2512a4731fc2c0cac4064c1
[ "BSD-3-Clause" ]
null
null
null
28.763033
127
0.68957
1,001,476
/* * Copyright (c) 2005-2007 Substance Kirill Grouchnikov. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * o Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * o 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. * * o Neither the name of Substance Kirill Grouchnikov 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 OWNER 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 a03.swing.plaf; import java.awt.Component; import java.awt.Graphics; import java.text.SimpleDateFormat; import javax.swing.Icon; import javax.swing.JCheckBox; import javax.swing.JTable; import javax.swing.SwingConstants; import javax.swing.UIManager; import javax.swing.border.Border; import javax.swing.border.EmptyBorder; import javax.swing.table.DefaultTableCellRenderer; import javax.swing.table.TableCellRenderer; /** * @author Kirill Grouchnikov * @author Davide Raccagni (A03 version) */ public class A03TableCellRenderer extends DefaultTableCellRenderer { /** * */ private static final long serialVersionUID = 7799932802450118618L; private static final Border noFocusBorder = new EmptyBorder(2, 1, 1, 2); /** * Renderer for boolean columns. * * @author Kirill Grouchnikov */ public static class BooleanRenderer extends JCheckBox implements TableCellRenderer { /** * */ private static final long serialVersionUID = -4194424044961042536L; /** * Creates a new renderer for boolean columns. */ public BooleanRenderer() { super(); this.setHorizontalAlignment(SwingConstants.CENTER); this.setBorderPainted(true); this.setOpaque(false); } /* * (non-Javadoc) * * @see * javax.swing.table.TableCellRenderer#getTableCellRendererComponent * (javax.swing.JTable, java.lang.Object, boolean, boolean, int, int) */ public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { this.setSelected(((value != null) && ((Boolean) value).booleanValue())); this.setEnabled(table.isEnabled()); this.setBorder(noFocusBorder); return this; } /* * (non-Javadoc) * * @see javax.swing.JComponent#paint(java.awt.Graphics) */ @Override public final void paint(Graphics g) { super.paint(g); } /* * (non-Javadoc) * * @see javax.swing.JComponent#paintComponent(java.awt.Graphics) */ @Override protected final void paintComponent(Graphics g) { super.paintComponent(g); } } public static class IconRenderer extends A03TableCellRenderer { /** * */ private static final long serialVersionUID = -5050808272348452615L; public IconRenderer() { super(); this.setHorizontalAlignment(SwingConstants.CENTER); this.setText(null); } @Override public void setValue(Object value) { this.setIcon((value instanceof Icon) ? (Icon) value : null); } } public static class NumberRenderer extends A03TableCellRenderer { /** * */ private static final long serialVersionUID = 3005802337956053117L; public NumberRenderer() { super(); this.setHorizontalAlignment(SwingConstants.RIGHT); } } public static class DateRenderer extends A03TableCellRenderer { /** * */ private static final long serialVersionUID = -7702255836498522701L; private static final SimpleDateFormat formatter = new SimpleDateFormat(UIManager.getString("Table.cellRendererDateFormat")); @Override public void setValue(Object value) { this.setText((value == null) ? "" : formatter.format(value)); } @Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); setHorizontalAlignment(CENTER); return this; } } public A03TableCellRenderer() { setOpaque(false); } @Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); this.setFont(table.getFont()); this.setValue(value); if (hasFocus) { Border border = null; if (isSelected) { border = UIManager.getBorder("Table.focusSelectedCellHighlightBorder"); } if (border == null) { border = noFocusBorder; } setBorder(border); } else { this.setBorder(noFocusBorder); } return this; } }
924050bb5cf78841288cfe708f327781b229d93f
129
java
Java
admin-infrastructure/src/main/java/cn/edu/hbuas/admin/common/constants/Constants.java
concc/admin
705dbad0c09554480d069c50f37adcb62a384056
[ "Apache-2.0" ]
null
null
null
admin-infrastructure/src/main/java/cn/edu/hbuas/admin/common/constants/Constants.java
concc/admin
705dbad0c09554480d069c50f37adcb62a384056
[ "Apache-2.0" ]
null
null
null
admin-infrastructure/src/main/java/cn/edu/hbuas/admin/common/constants/Constants.java
concc/admin
705dbad0c09554480d069c50f37adcb62a384056
[ "Apache-2.0" ]
null
null
null
12.9
51
0.744186
1,001,477
package cn.edu.hbuas.admin.common.constants; public class Constants { public static final int DEFAULT_PAGE_SIZE = 20; }
924051eb412067d61c04f6c26a2aafb23c78c266
254
java
Java
src/main/java/com/youzan/pfcase/mapper/LoginMapper.java
M18372664243/tgram_server
3b2e9bfaa47004fc0a96dcb1f1196c8707b711b0
[ "MIT" ]
null
null
null
src/main/java/com/youzan/pfcase/mapper/LoginMapper.java
M18372664243/tgram_server
3b2e9bfaa47004fc0a96dcb1f1196c8707b711b0
[ "MIT" ]
null
null
null
src/main/java/com/youzan/pfcase/mapper/LoginMapper.java
M18372664243/tgram_server
3b2e9bfaa47004fc0a96dcb1f1196c8707b711b0
[ "MIT" ]
null
null
null
18.142857
49
0.80315
1,001,478
package com.youzan.pfcase.mapper; import org.springframework.stereotype.Repository; import com.youzan.pfcase.domain.AdminEntity; @Repository public interface LoginMapper { AdminEntity getUser (String name); void insertUser (AdminEntity admin); }
9240540a7fa77221ed2155b3568013846b487911
1,209
java
Java
EasyShopping.API/src/main/java/Recipe.java
mciezczak312/EasyShopping
3708939f8d942548705b0170483f4d8a958e8079
[ "MIT" ]
null
null
null
EasyShopping.API/src/main/java/Recipe.java
mciezczak312/EasyShopping
3708939f8d942548705b0170483f4d8a958e8079
[ "MIT" ]
4
2017-05-24T17:03:11.000Z
2017-05-30T21:00:20.000Z
EasyShopping.API/src/main/java/Recipe.java
Juicy3122/EasyShopping
3708939f8d942548705b0170483f4d8a958e8079
[ "MIT" ]
1
2017-09-07T14:16:06.000Z
2017-09-07T14:16:06.000Z
28.116279
78
0.641026
1,001,479
import com.mongodb.BasicDBObject; import java.util.List; public class Recipe { private String id; private String name; private String category; private String subCategory; private String difficulty; private String prepTime; private String imageURL; private List<Ingredient> ingredients; private List<String> steps; private int liked; public Recipe() { } public Recipe(BasicDBObject dbObject, boolean allValues) { this.id = dbObject.get("_id").toString(); this.name = dbObject.getString("name"); this.liked = Integer.parseInt(dbObject.getString("liked")); this.imageURL = dbObject.getString("imageURL"); if (allValues) { this.category = dbObject.getString("category"); this.subCategory = dbObject.getString("sub_category"); this.difficulty = dbObject.getString("difficulty"); this.prepTime = dbObject.getString("prep_time"); this.steps = (List<String>) dbObject.get("steps"); this.ingredients = (List<Ingredient>) dbObject.get("ingredients"); } } @Override public String toString() { return this.name; } }
924054afacc90f2ab843cb5c908831530528ca48
4,017
java
Java
core/src/main/java/com/kumuluz/ee/metrics/producers/MetricProducer.java
kumuluz/kumuluzee-metrics
734e10e9aa1452d31f03cd4a1fe8ff55c11da95d
[ "MIT" ]
2
2019-09-26T13:51:00.000Z
2020-02-17T21:52:57.000Z
core/src/main/java/com/kumuluz/ee/metrics/producers/MetricProducer.java
kumuluz/kumuluzee-metrics
734e10e9aa1452d31f03cd4a1fe8ff55c11da95d
[ "MIT" ]
4
2017-10-17T11:28:20.000Z
2021-06-10T08:06:42.000Z
core/src/main/java/com/kumuluz/ee/metrics/producers/MetricProducer.java
kumuluz/kumuluzee-metrics
734e10e9aa1452d31f03cd4a1fe8ff55c11da95d
[ "MIT" ]
5
2019-01-22T11:52:32.000Z
2022-01-28T14:11:44.000Z
42.734043
130
0.779188
1,001,480
/* * Copyright (c) 2014-2017 Kumuluz and/or its affiliates * and other contributors as indicated by the @author tags and * the contributor list. * * Licensed under the MIT License (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://opensource.org/licenses/MIT * * The software is provided "AS IS", WITHOUT WARRANTY OF ANY KIND, express or * implied, including but not limited to the warranties of merchantability, * fitness for a particular purpose and noninfringement. in no event shall the * authors or copyright holders be liable for any claim, damages or other * liability, whether in an action of contract, tort or otherwise, arising from, * out of or in connection with the software or the use or other dealings in the * software. See the License for the specific language governing permissions and * limitations under the License. */ package com.kumuluz.ee.metrics.producers; import com.kumuluz.ee.metrics.utils.AnnotationMetadata; import com.kumuluz.ee.metrics.utils.MetadataWithTags; import org.eclipse.microprofile.metrics.*; import javax.annotation.Priority; import javax.enterprise.context.ApplicationScoped; import javax.enterprise.inject.Alternative; import javax.enterprise.inject.Produces; import javax.enterprise.inject.spi.InjectionPoint; import javax.inject.Inject; import javax.interceptor.Interceptor; /** * Producers for Microprofile metrics. * * @author Urban Malc * @author Aljaž Blažej * @since 1.0.0 */ @Alternative @ApplicationScoped @Priority(Interceptor.Priority.LIBRARY_BEFORE) public class MetricProducer { @Inject private MetricRegistry applicationRegistry; @Produces public Meter produceMeter(InjectionPoint injectionPoint) { MetadataWithTags metadataWithTags = AnnotationMetadata.buildProducerMetadata(injectionPoint, MetricType.METERED); return applicationRegistry.meter(metadataWithTags.getMetadata(), metadataWithTags.getTags()); } @Produces public Timer produceTimer(InjectionPoint injectionPoint) { MetadataWithTags metadataWithTags = AnnotationMetadata.buildProducerMetadata(injectionPoint, MetricType.TIMER); return applicationRegistry.timer(metadataWithTags.getMetadata(), metadataWithTags.getTags()); } @Produces public SimpleTimer produceSimpleTimer(InjectionPoint injectionPoint){ MetadataWithTags metadataWithTags = AnnotationMetadata.buildProducerMetadata(injectionPoint, MetricType.SIMPLE_TIMER); return applicationRegistry.simpleTimer(metadataWithTags.getMetadata(), metadataWithTags.getTags()); } @Produces public Counter produceCounter(InjectionPoint injectionPoint) { MetadataWithTags metadataWithTags = AnnotationMetadata.buildProducerMetadata(injectionPoint, MetricType.COUNTER); return applicationRegistry.counter(metadataWithTags.getMetadata(), metadataWithTags.getTags()); } @Produces public ConcurrentGauge produceConcurrentGauge(InjectionPoint injectionPoint) { MetadataWithTags metadataWithTags = AnnotationMetadata.buildProducerMetadata(injectionPoint, MetricType.CONCURRENT_GAUGE); return applicationRegistry.concurrentGauge(metadataWithTags.getMetadata(), metadataWithTags.getTags()); } @Produces public Histogram produceHistogram(InjectionPoint injectionPoint) { MetadataWithTags metadataWithTags = AnnotationMetadata.buildProducerMetadata(injectionPoint, MetricType.HISTOGRAM); return applicationRegistry.histogram(metadataWithTags.getMetadata(), metadataWithTags.getTags()); } @SuppressWarnings("unchecked") @Produces public <T extends Number> Gauge<T> produceGauge(InjectionPoint injectionPoint) { MetadataWithTags metadataWithTags = AnnotationMetadata.buildProducerMetadata(injectionPoint, MetricType.GAUGE); return () -> (T) applicationRegistry.getGauge(metadataWithTags.getMetricID()).getValue(); } }
92405605ae54a0f0550b62d478c6e6bc3a2ea75f
9,115
java
Java
Corpus/ecf/1962.java
masud-technope/BLIZZARD-Replication-Package-ESEC-FSE2018
72aee638779aef7a56295c784a9bcbd902e41593
[ "MIT" ]
15
2018-07-10T09:38:31.000Z
2021-11-29T08:28:07.000Z
Corpus/ecf/1962.java
JamesCao2048/BlizzardData
a524bec4f0d297bb748234eeb1c2fcdee3dce7d7
[ "MIT" ]
3
2018-11-16T02:58:59.000Z
2021-01-20T16:03:51.000Z
Corpus/ecf/1962.java
JamesCao2048/BlizzardData
a524bec4f0d297bb748234eeb1c2fcdee3dce7d7
[ "MIT" ]
6
2018-06-27T20:19:00.000Z
2022-02-19T02:29:53.000Z
46.505102
163
0.665826
1,001,481
/******************************************************************************* * Copyright (c) 2009, 2010 Markus Alexander Kuppe. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Markus Alexander Kuppe (ecf-dev_eclipse.org <at> lemmster <dot> de) - initial API and implementation ******************************************************************************/ package org.eclipse.ecf.tests.provider.discovery; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import org.eclipse.ecf.discovery.IDiscoveryAdvertiser; import org.eclipse.ecf.discovery.IDiscoveryLocator; import org.eclipse.ecf.provider.discovery.CompositeDiscoveryContainer; import org.eclipse.ecf.tests.discovery.Activator; import org.osgi.framework.BundleContext; import org.osgi.framework.ServiceEvent; import org.osgi.framework.ServiceReference; import org.osgi.framework.ServiceRegistration; import org.osgi.framework.hooks.service.EventHook; import org.osgi.framework.hooks.service.FindHook; public abstract class SingleCompositeDiscoveryServiceContainerTest extends CompositeDiscoveryServiceContainerTest { // Whether the OSGi hooks should be de-/registered after and before each // individual test and not just after/before the test class. // E.g. when tests are executed in random order and thus are interleaved // with other tests, setUp/tearDown has to run after each test. Otherwise // expect test failures. // public static boolean SETUP_OSGI_HOOKS_PER_TEST = false; // // private static int testMethods; // private static int testMethodsLeft; // private static ServiceRegistration findHook; // // // count all test methods // static { // Method[] methods = SingleCompositeDiscoveryServiceContainerTest.class.getMethods(); // for (int i = 0; i < methods.length; i++) { // Method method = methods[i]; // if (method.getName().startsWith("test") && method.getModifiers() == Modifier.PUBLIC) { // testMethods++; // } // } // testMethodsLeft = testMethods; // } // // private final String ecfDiscoveryContainerName; // private final String className; // // public SingleCompositeDiscoveryServiceContainerTest(String anECFDiscoveryContainerName, String aClassName) { // ecfDiscoveryContainerName = anECFDiscoveryContainerName; // className = aClassName; // } // // private boolean doSetUp() { // return SETUP_OSGI_HOOKS_PER_TEST || testMethodsLeft == testMethods; // } // // private boolean doTearDown() { // return SETUP_OSGI_HOOKS_PER_TEST || --testMethodsLeft == 0; // } // // /* (non-Javadoc) // * @see org.eclipse.ecf.tests.provider.discovery.CompositeDiscoveryServiceContainerTest#setUp() // */ // protected void setUp() throws Exception { // // HACK: @BeforeClass JUnit4 functionality // if(doSetUp()) { // // HACK: forcefully start the (nested) discovery container if it hasn't been started yet // // assuming the bundle declares a lazy start buddy policy // Class.forName(className); // // // initially close the existing CDC to get rid of other test left overs // Activator.getDefault().closeServiceTracker(containerUnderTest); // // final BundleContext context = Activator.getDefault().getContext(); // final String[] clazzes = new String[]{FindHook.class.getName(), EventHook.class.getName()}; // findHook = context.registerService(clazzes, new DiscoveryContainerFilterHook(ecfDiscoveryContainerName), null); // } // super.setUp(); // } // // /* (non-Javadoc) // * @see org.eclipse.ecf.tests.discovery.DiscoveryTest#tearDown() // */ // protected void tearDown() throws Exception { // super.tearDown(); // // HACK: @BeforeClass JUnit4 functionality // if(doTearDown()) { // if(findHook != null) { // findHook.unregister(); // findHook = null; // } // // close tracker to force creation of a new CDC instance // Activator.getDefault().closeServiceTracker(containerUnderTest); // // // reset so other instances can reuse // testMethodsLeft = testMethods; // } // } // // /* (non-Javadoc) // * @see org.eclipse.ecf.tests.discovery.DiscoveryServiceTest#getDiscoveryLocator() // */ // protected IDiscoveryLocator getDiscoveryLocator() { // final IDiscoveryLocator idl = super.getDiscoveryLocator(); // checkCompositeDiscoveryContainer(className, (CompositeDiscoveryContainer)idl); // return idl; // } // // // /* (non-Javadoc) // * @see org.eclipse.ecf.tests.discovery.DiscoveryServiceTest#getDiscoveryAdvertiser() // */ // protected IDiscoveryAdvertiser getDiscoveryAdvertiser() { // final IDiscoveryAdvertiser ida = super.getDiscoveryAdvertiser(); // checkCompositeDiscoveryContainer(className, (CompositeDiscoveryContainer)ida); // return ida; // } // // // make sure the CDC has only a single IDC registered with the correct type // private static void checkCompositeDiscoveryContainer(final String aClassName, final CompositeDiscoveryContainer cdc) { // final Collection discoveryContainers = cdc.getDiscoveryContainers(); // assertTrue("One IDiscoveryContainer must be registered with the CDC at this point: " + discoveryContainers, discoveryContainers.size() == 1); // for (final Iterator iterator = discoveryContainers.iterator(); iterator.hasNext();) { // final IDiscoveryLocator dl = (IDiscoveryLocator) iterator.next(); // assertEquals(aClassName, dl.getClass().getName()); // } // } // // // Filters the corresponding IDC from the result set that is _not_ supposed to be part of the test // // we need an EventHook too because due to ECF's namespaces the "other" bundle is started asynchronously // // and consequently registered with the CDC // private class DiscoveryContainerFilterHook implements FindHook, EventHook { // // private static final String BUNDLE_UNDER_TEST = "org.eclipse.ecf.provider.discovery"; // rename if bundle name change // private final String containerName; // // public DiscoveryContainerFilterHook(String anECFDiscoveryContainerName) { // containerName = anECFDiscoveryContainerName; // } // // /* (non-Javadoc) // * @see org.osgi.framework.hooks.service.FindHook#find(org.osgi.framework.BundleContext, java.lang.String, java.lang.String, boolean, java.util.Collection) // */ // public void find(BundleContext context, String name, String filter, boolean allServices, Collection references) { // // // is it the composite discovery bundle who tries to find the service? // final String symbolicName = context.getBundle().getSymbolicName(); // final Collection removees = new ArrayList(); // if(BUNDLE_UNDER_TEST.equals(symbolicName)) { // for (final Iterator iterator = references.iterator(); iterator.hasNext();) { // // filter the corresponding container // final ServiceReference serviceReference = (ServiceReference) iterator.next(); // final String property = (String) serviceReference.getProperty(IDiscoveryLocator.CONTAINER_NAME); // if(property != null && property.equals(containerName)) { // removees.add(serviceReference); // System.out.println("Removed reference: " + property); // break; // } // } // references.removeAll(removees); // } // } // // /* (non-Javadoc) // * @see org.osgi.framework.hooks.service.EventHook#event(org.osgi.framework.ServiceEvent, java.util.Collection) // */ // public void event(ServiceEvent aServiceEvent, Collection aCollection) { // if (aServiceEvent.getType() == ServiceEvent.REGISTERED) { // final ServiceReference serviceReference = aServiceEvent.getServiceReference(); // final String property = (String) serviceReference.getProperty(IDiscoveryLocator.CONTAINER_NAME); // if(property != null && property.equals(containerName)) { // final Collection removees = new ArrayList(); // for (Iterator iterator = aCollection.iterator(); iterator.hasNext();) { // final BundleContext bundleContext = (BundleContext) iterator.next(); // final String symbolicName = bundleContext.getBundle().getSymbolicName(); // if(BUNDLE_UNDER_TEST.equals(symbolicName)) { // removees.add(bundleContext); // System.out.println("Filtered reference: " + property); // break; // } // } // aCollection.removeAll(removees); // } // } // } // } }
9240567230cea5079971741f1b035dda51306023
4,714
java
Java
src/psychic/Psychic.java
rub3z/my-java-programs
576a559cf1f4856baeb5fae43ae45a146a265533
[ "MIT" ]
null
null
null
src/psychic/Psychic.java
rub3z/my-java-programs
576a559cf1f4856baeb5fae43ae45a146a265533
[ "MIT" ]
null
null
null
src/psychic/Psychic.java
rub3z/my-java-programs
576a559cf1f4856baeb5fae43ae45a146a265533
[ "MIT" ]
null
null
null
27.406977
147
0.355749
1,001,482
package psychic;////package psychic; // //import java.io.BufferedReader; //import java.io.IOException; //import java.io.InputStreamReader; // ///** // * // * @author Rub3z // */ //public class Psychic { // // /** // * @param args the command line arguments // */ // public static void main(String[] args) throws IOException { // // BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); // String line; // // while ((line = reader.readLine()) != null) { // String input[] = line.split(" "); // // int[] values = new int[input.length]; // // for (int i = 0; i < input.length; i++) { // if (Character.isDigit(input[i].charAt(0))) // values[i] = Character.digit(input[i].charAt(0), 10); // else { // switch (input[i].charAt(0)) { // case 'A': // values[i] = 1; // break; // case 'T': // values[i] = 10; // break; // case 'J': // values[i] = 11; // break; // case 'Q': // values[i] = 12; // break; // case 'K': // values[i] = 13; // break; // default: // break; // } // } // // switch (input[i].charAt(1)) { // case 'C': // values[i] *= 1; // break; // case 'D': // values[i] *= 2; // break; // case 'H': // values[i] *= 3; // break; // case 'S': // values[i] *= 4; // break; // default: // break; // } // // // // int temp = 0; // for(int j = 0; j < values.length; j++) // { // for(int s = 1; s < (values.length - j); s++) // { // if( values[s-1] > values[s]) // { // temp = values[s-1]; // values[s-1] = values[s]; // values[s] = temp; // } // } // } // // // // int[] card = new int[10]; // int[] suit = new int[10]; // // for(int j = 0; j < values.length; j++){ // card[j] = values[j] % 13; // suit[j] = values[j] / 13; // } // // int isStraight = checkStraight(card); // int isFlush = checkFlush(suit); // // if(card[4] == 12 && isStraight == 1 && isFlush == 1) // { // royal++; // //System.out.println("Royal Flush"); // } // else if(isStraight == 1 && isFlush == 1) // { // sflush++; // //System.out.println("Straight Flush"); // } // else if(card[0] == card[1] && card[1] == card[2] && card[2] == card[3] || card[1] == card[2] && card[2] == card[3] && card[3] == card[4]) // { // quads++; // //System.out.println("Quad"); // } // else if(card[0] == card[1] && card[2] == card[3] && card[3] == card[4] || card[0] == card[1] && card[1] == card[2] && card[3] == card[4]) // { // fullh++; // //System.out.println("Full House"); // } // else if(isFlush == 1) // { // flush++; // //System.out.println("Flush"); // } // else if(isStraight == 1) // { // straight++; // //System.out.println("Straight"); // } // else if(card[0] == card[1] && card[1] == card[2] || card[1] == card[2] && card[2] == card[3] || card[2] == card[3] && card[3] == card[4]) // { // triple++; // //System.out.println("Triple"); // } // else if(card[0] == card[1] && card[2] == card[3] || card[0] == card[1] && card[3] == card[4] || card[2] == card[3] && card[3] == card[4]) // { // twoPair++; // //System.out.println("Two Pair"); // } // else if(card[0] == card[1] || card[1] == card[2] || card[2] == card[3] || card[3] == card[4]) // { // onePair++; // //System.out.println("Pair"); // } // else // { // highCard++; // //System.out.println("High Card"); // } // // //Pull the next hand of five cards from the deck // nextHand = nextHand + 5; // } // again++; // } // // // // // // } // // // // // } // // } // // // // // //}
9240568f7d0d85a4a4865bfbb2ada7c6c3e29506
1,830
java
Java
processrunner/src/main/java/com/fortify/processrunner/processor/CompositeProcessor.java
dylanbthomas/FoDBugTrackerUtilityCopy
98ca4e2236c4e620d71c6b3a25bf407ca0a50118
[ "MIT" ]
1
2018-08-21T17:29:37.000Z
2018-08-21T17:29:37.000Z
processrunner/src/main/java/com/fortify/processrunner/processor/CompositeProcessor.java
dylanbthomas/FoDBugTrackerUtilityCopy
98ca4e2236c4e620d71c6b3a25bf407ca0a50118
[ "MIT" ]
null
null
null
processrunner/src/main/java/com/fortify/processrunner/processor/CompositeProcessor.java
dylanbthomas/FoDBugTrackerUtilityCopy
98ca4e2236c4e620d71c6b3a25bf407ca0a50118
[ "MIT" ]
null
null
null
28.59375
73
0.729508
1,001,483
package com.fortify.processrunner.processor; import java.util.ArrayList; import java.util.Arrays; import java.util.List; /** * This {@link IProcessor} implementation allows a list of * individual {@link IProcessor} instances to be configured * using the constructor or {@link #setProcessors(IProcessor...)} * method. Based on functionality provided by * {@link AbstractCompositeProcessor}, each of the configured * processors will be invoked. */ public class CompositeProcessor extends AbstractCompositeProcessor { private List<IProcessor> processors = new ArrayList<IProcessor>(); /** * Default constructor, allowing manual configuration * of the list of {@link IProcessor} instances to be * configured via the {@link #setProcessors(IProcessor...)} * method. */ public CompositeProcessor() {} /** * This constructor allows configuring the list * of {@link IProcessor} instances that make up this * composite processor. * @param processors */ public CompositeProcessor(IProcessor... processors) { setProcessors(processors); } /** * Get the list of configured {@link IProcessor} instances * that make up this composite processor. */ @Override public List<IProcessor> getProcessors() { return processors; } /** * Configure the list of {@link IProcessor} instances * that make up this composite processor. * @param processors */ public void setProcessors(List<IProcessor> processors) { this.processors = processors; } /** * Configure the list of {@link IProcessor} instances * that make up this composite processor. * @param processors */ public void setProcessors(IProcessor... processors) { // We need to wrap this in an ArrayList to allow for later modification this.processors = new ArrayList<IProcessor>(Arrays.asList(processors)); } }
924057051a8296a27d8f7d367de02dba29c526e2
1,550
java
Java
src/main/java/de/komoot/photon/utils/CorsFilter.java
lonvia/photon
de7eedb28bcbb23fbe47a976800006691ded6dbb
[ "Apache-2.0" ]
1,278
2015-01-04T19:37:47.000Z
2022-03-24T12:46:01.000Z
src/main/java/de/komoot/photon/utils/CorsFilter.java
lonvia/photon
de7eedb28bcbb23fbe47a976800006691ded6dbb
[ "Apache-2.0" ]
447
2015-01-05T16:42:22.000Z
2022-03-30T14:13:23.000Z
src/main/java/de/komoot/photon/utils/CorsFilter.java
lonvia/photon
de7eedb28bcbb23fbe47a976800006691ded6dbb
[ "Apache-2.0" ]
249
2015-01-05T14:20:42.000Z
2022-03-25T15:38:41.000Z
36.046512
100
0.647097
1,001,484
package de.komoot.photon.utils; import static spark.Spark.before; import static spark.Spark.options; public class CorsFilter { // /** * Enables CORS on requests. This method is an initialization method and should be called once. * * As a side effect this sets the content type for the response to "application/json" * * @param origin permitted origin * @param methods permitted methods comma separated * @param headers permitted headers comma separated */ public static void enableCORS(final String origin, final String methods, final String headers) { options("/*", (request, response) -> { String accessControlRequestHeaders = request.headers("Access-Control-Request-Headers"); if (accessControlRequestHeaders != null) { response.header("Access-Control-Allow-Headers", accessControlRequestHeaders); } String accessControlRequestMethod = request.headers("Access-Control-Request-Method"); if (accessControlRequestMethod != null) { response.header("Access-Control-Allow-Methods", accessControlRequestMethod); } return "OK"; }); before((request, response) -> { response.header("Access-Control-Allow-Origin", origin); response.header("Access-Control-Request-Method", methods); response.header("Access-Control-Allow-Headers", headers); response.type("application/json; charset=UTF-8"); }); } }
9240577f295e5e546156ddf3b214a698b33797f1
1,984
java
Java
external/jcifs-ng/src/main/java/jcifs/internal/smb2/ioctl/SrvCopychunkCopy.java
goyourfly/NovaCustom
c55265060a84b7b5b1f4b42ae096370205c66ad7
[ "Apache-2.0" ]
null
null
null
external/jcifs-ng/src/main/java/jcifs/internal/smb2/ioctl/SrvCopychunkCopy.java
goyourfly/NovaCustom
c55265060a84b7b5b1f4b42ae096370205c66ad7
[ "Apache-2.0" ]
null
null
null
external/jcifs-ng/src/main/java/jcifs/internal/smb2/ioctl/SrvCopychunkCopy.java
goyourfly/NovaCustom
c55265060a84b7b5b1f4b42ae096370205c66ad7
[ "Apache-2.0" ]
null
null
null
24.493827
76
0.63256
1,001,485
/* * © 2017 AgNO3 Gmbh & Co. KG * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ package jcifs.internal.smb2.ioctl; import jcifs.Encodable; import jcifs.internal.util.SMBUtil; /** * @author mbechler * */ public class SrvCopychunkCopy implements Encodable { private final byte[] sourceKey; private final SrvCopychunk[] chunks; /** * @param sourceKey * @param chunks * */ public SrvCopychunkCopy ( byte[] sourceKey, SrvCopychunk... chunks ) { this.sourceKey = sourceKey; this.chunks = chunks; } /** * {@inheritDoc} * * @see jcifs.Encodable#encode(byte[], int) */ @Override public int encode ( byte[] dst, int dstIndex ) { int start = dstIndex; System.arraycopy(this.sourceKey, 0, dst, dstIndex, 24); dstIndex += 24; SMBUtil.writeInt4(this.chunks.length, dst, dstIndex); dstIndex += 4; dstIndex += 4; // Reserved for ( SrvCopychunk chk : this.chunks ) { dstIndex += chk.encode(dst, dstIndex); } return dstIndex - start; } /** * {@inheritDoc} * * @see jcifs.Encodable#size() */ @Override public int size () { return 32 + this.chunks.length * 24; } }
924057fb3b5a181ab3e6deb0bef99731b00352b8
1,130
java
Java
test-starter/src/main/java/com/example/starter/DubboAutoConfigure.java
xboat/test
3851d78a9ed3d8a01509a0c22a21c9211a013816
[ "Apache-2.0" ]
null
null
null
test-starter/src/main/java/com/example/starter/DubboAutoConfigure.java
xboat/test
3851d78a9ed3d8a01509a0c22a21c9211a013816
[ "Apache-2.0" ]
5
2021-07-02T18:45:16.000Z
2021-12-14T21:17:35.000Z
test-starter/src/main/java/com/example/starter/DubboAutoConfigure.java
xboat/test
3851d78a9ed3d8a01509a0c22a21c9211a013816
[ "Apache-2.0" ]
null
null
null
37.666667
85
0.800885
1,001,486
package com.example.starter; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; /** * @author xboat date 2019-03-05 */ @Configuration @EnableConfigurationProperties(DubboProperties.class) public class DubboAutoConfigure { @Autowired private DubboProperties properties; @Bean @ConditionalOnClass({DubboService.class}) //当classpath下存在该类进行自动配置 @ConditionalOnMissingBean({DubboService.class})//当Spring Context中不存在该Bean时 //当配置文件中dubbo.enabled=true 时 @ConditionalOnProperty(prefix = "dubbo", value = "enabled", havingValue = "true") DubboService exampleService() { System.out.println("dubbo"); return new DubboService(properties); } }
92405807c539e613c3d812910139551d8459ea08
420
java
Java
src/java/seamshop/exception/ImageProcessingException.java
doanhoa93/struts2shop
c0bd38da11c309d95512c96c3be4e39f4f6050b8
[ "Apache-2.0" ]
null
null
null
src/java/seamshop/exception/ImageProcessingException.java
doanhoa93/struts2shop
c0bd38da11c309d95512c96c3be4e39f4f6050b8
[ "Apache-2.0" ]
null
null
null
src/java/seamshop/exception/ImageProcessingException.java
doanhoa93/struts2shop
c0bd38da11c309d95512c96c3be4e39f4f6050b8
[ "Apache-2.0" ]
null
null
null
16.8
58
0.754762
1,001,487
package seamshop.exception; // TODO: Maybe extends RuntimeException? (y) @SuppressWarnings("serial") public class ImageProcessingException extends Exception { public ImageProcessingException() {} public ImageProcessingException(String msg) { super(msg); } public ImageProcessingException(Throwable msg) { super(msg); } public ImageProcessingException(String msg, Throwable ex) { super(msg, ex); } }
92405818628e6a0e497f2fb65dd9494f38f7fad7
3,268
java
Java
scriptnumber-buildbreaker-maven-plugin/src/main/java/com/myorg/buildbreaker/script/service/ScriptLogServiceImpl.java
shaileshre/scriptnumber-buildbreaker
16f1fd88aa89ef7bd13eceda2350e51825d2e053
[ "Apache-2.0" ]
null
null
null
scriptnumber-buildbreaker-maven-plugin/src/main/java/com/myorg/buildbreaker/script/service/ScriptLogServiceImpl.java
shaileshre/scriptnumber-buildbreaker
16f1fd88aa89ef7bd13eceda2350e51825d2e053
[ "Apache-2.0" ]
null
null
null
scriptnumber-buildbreaker-maven-plugin/src/main/java/com/myorg/buildbreaker/script/service/ScriptLogServiceImpl.java
shaileshre/scriptnumber-buildbreaker
16f1fd88aa89ef7bd13eceda2350e51825d2e053
[ "Apache-2.0" ]
null
null
null
38.904762
127
0.695838
1,001,488
package com.myorg.buildbreaker.script.service; import java.util.List; import java.util.Set; import com.google.common.base.Function; import com.google.common.collect.Lists; import com.myorg.buildbreaker.script.factory.ServiceFactory; import com.myorg.plugin.script.entity.BranchScriptList; import com.myorg.plugin.script.entity.PluginReference; import static com.google.common.collect.Lists.newArrayList; import static com.google.common.collect.Lists.transform; import static com.google.common.collect.Sets.newHashSet; import static java.lang.Integer.valueOf; import static java.util.Arrays.asList; import static java.util.Collections.sort; import static java.util.Collections.unmodifiableList; /** * Created by Shailesh on 7/14/16. */ public class ScriptLogServiceImpl implements ScriptLogService { private static final Function<String, Integer> SCRIPT_NUMBER_LIST_FUNCTION = new Function<String, Integer>() { @Override public Integer apply(String input) { return (!input.trim().equalsIgnoreCase("") ? valueOf(input.trim()) : -1); } }; @Override public List<Integer> getAllMergedScriptNumbersAcrossBranches(String logFile) { Set<Integer> allMergedScriptNumberSet = newHashSet(); PluginReference pluginReference = ServiceFactory.getScriptLogFileServiceInstance().getPluginReference(logFile); for(BranchScriptList branchScriptList : pluginReference.getAllBranchScriptList().getBranchScriptList()){ if(branchScriptList != null) { allMergedScriptNumberSet.addAll( transform( asList( branchScriptList.getAllScriptNumberList().split(",")), SCRIPT_NUMBER_LIST_FUNCTION)); } } List<Integer> allMergedScriptNumberList = newArrayList(allMergedScriptNumberSet); sort(allMergedScriptNumberList); return unmodifiableList(allMergedScriptNumberList); } @Override public List<Integer> getAllScriptNumbersFromBranch(String logFile, String branchName) { BranchScriptList branchScriptList = ServiceFactory.getScriptLogFileServiceInstance() .getScriptListByBranch(logFile, branchName); if(branchScriptList != null) { return transform( asList( branchScriptList.getAllScriptNumberList().split(",")), SCRIPT_NUMBER_LIST_FUNCTION); } return unmodifiableList(Lists.<Integer>newArrayList()); } @Override public Integer getLatestScriptNumberAcrossBranches(String logFile) { List<Integer> allMergedScriptNumberList = getAllMergedScriptNumbersAcrossBranches(logFile); return allMergedScriptNumberList.size() > 0 ? allMergedScriptNumberList.get(allMergedScriptNumberList.size() - 1) : -1; } @Override public Integer getLatestScriptNumberFromBranch(String logFile, String branchName) { List<Integer> allScriptNumberList = getAllScriptNumbersFromBranch(logFile, branchName); return allScriptNumberList.size() > 0 ? allScriptNumberList.get(allScriptNumberList.size() - 1) : -1; } }
92405867b93d4a66e1f87b84a69bf14df9fbb4c9
5,004
java
Java
docker/oneM2M/CSE_IPE/org.eclipse.om2m/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/obix/Abstime.java
cloudcomputinghust/IoT
5db3f9078be427fa23549add1747a067c2add767
[ "MIT" ]
2
2017-05-02T06:43:10.000Z
2017-05-30T11:18:03.000Z
docker/oneM2M/CSE_IPE/org.eclipse.om2m/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/obix/Abstime.java
cloudcomputinghust/IoT
5db3f9078be427fa23549add1747a067c2add767
[ "MIT" ]
10
2016-08-09T13:11:00.000Z
2016-11-10T12:33:02.000Z
docker/oneM2M/CSE_IPE/org.eclipse.om2m/org.eclipse.om2m.commons/src/main/java/org/eclipse/om2m/commons/obix/Abstime.java
cloudcomputinghust/IoT
5db3f9078be427fa23549add1747a067c2add767
[ "MIT" ]
5
2016-08-07T17:11:20.000Z
2016-10-22T08:45:42.000Z
18.464945
81
0.623301
1,001,489
/******************************************************************************* * Copyright (c) 2013-2016 LAAS-CNRS (www.laas.fr) * 7 Colonel Roche 31077 Toulouse - France * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Initial Contributors: * Thierry Monteil : Project manager, technical co-manager * Mahdi Ben Alaya : Technical co-manager * Samir Medjiah : Technical co-manager * Khalil Drira : Strategy expert * Guillaume Garzone : Developer * François Aïssaoui : Developer * * New contributors : *******************************************************************************/ package org.eclipse.om2m.commons.obix; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; /** * Abstime oBIX object. * @author Francois Aissaoui * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "abstime") @XmlRootElement public class Abstime extends Obj{ @XmlAttribute(name = "val") @XmlSchemaType(name = "anyURI") protected String val; @XmlAttribute(name = "min") protected Long min; @XmlAttribute(name = "max") protected Long max; @XmlAttribute(name = "tz") protected String tz; @XmlAttribute(name = "displayName") protected String displayName; @XmlAttribute(name = "display") protected String display; @XmlAttribute(name = "icon") @XmlSchemaType(name = "anyURI") protected String icon; @XmlAttribute(name = "precision") protected Integer precision; @XmlAttribute(name = "status") protected Status status; @XmlAttribute(name = "unit") protected String unit; @XmlAttribute(name = "writable") protected Boolean writable; @XmlAttribute(name = "name") protected String name; @XmlAttribute(name = "href") protected String href; @XmlAttribute(name = "null") protected Boolean _null; /** * Default empty contructor */ public Abstime(){} /** * @return the val */ public String getVal() { return val; } /** * @param val the val to set */ public void setVal(String val) { this.val = val; } /** * @return the min */ public Long getMin() { return min; } /** * @param min the min to set */ public void setMin(Long min) { this.min = min; } /** * @return the max */ public Long getMax() { return max; } /** * @param max the max to set */ public void setMax(Long max) { this.max = max; } /** * @return the tz */ public String getTz() { return tz; } /** * @param tz the tz to set */ public void setTz(String tz) { this.tz = tz; } /** * @return the displayName */ public String getDisplayName() { return displayName; } /** * @param displayName the displayName to set */ public void setDisplayName(String displayName) { this.displayName = displayName; } /** * @return the display */ public String getDisplay() { return display; } /** * @param display the display to set */ public void setDisplay(String display) { this.display = display; } /** * @return the icon */ public String getIcon() { return icon; } /** * @param icon the icon to set */ public void setIcon(String icon) { this.icon = icon; } /** * @return the precision */ public Integer getPrecision() { return precision; } /** * @param precision the precision to set */ public void setPrecision(Integer precision) { this.precision = precision; } /** * @return the status */ public Status getStatus() { return status; } /** * @param status the status to set */ public void setStatus(Status status) { this.status = status; } /** * @return the unit */ public String getUnit() { return unit; } /** * @param unit the unit to set */ public void setUnit(String unit) { this.unit = unit; } /** * @return the writable */ public Boolean getWritable() { return writable; } /** * @param writable the writable to set */ public void setWritable(Boolean writable) { this.writable = writable; } /** * @return the name */ public String getName() { return name; } /** * @param name the name to set */ public void setName(String name) { this.name = name; } /** * @return the href */ public String getHref() { return href; } /** * @param href the href to set */ public void setHref(String href) { this.href = href; } /** * @return the _null */ public Boolean get_null() { return _null; } /** * @param _null the _null to set */ public void set_null(Boolean _null) { this._null = _null; } }
92405b0800ee3f2badd8598c93d3ddac880ca06e
282
java
Java
src/main/java/io/github/satya64/powerbi/api/model/SourceReport.java
satya64/powerbi-sdk-java
e457536e9d5e57dc6b09abe739f8d968501214fc
[ "MIT" ]
2
2020-04-24T18:30:56.000Z
2021-09-25T07:57:00.000Z
src/main/java/io/github/satya64/powerbi/api/model/SourceReport.java
satya64/powerbi-sdk-java
e457536e9d5e57dc6b09abe739f8d968501214fc
[ "MIT" ]
1
2020-04-29T12:33:22.000Z
2020-04-29T12:33:22.000Z
src/main/java/io/github/satya64/powerbi/api/model/SourceReport.java
satya64/powerbi-sdk-java
e457536e9d5e57dc6b09abe739f8d968501214fc
[ "MIT" ]
null
null
null
20.142857
44
0.819149
1,001,490
package io.github.satya64.powerbi.api.model; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @Data @AllArgsConstructor @NoArgsConstructor public class SourceReport { private String sourceReportId; private String sourceWorkspaceId; }
92405b76c4cb5628f33486fb05d3d2f0b116e5a4
301
java
Java
forge/src/main/java/org/samo_lego/lakotnik/forge/LakotnikForge.java
samolego/Lakotnik
fb0cbf7951636374b1860ba2e242a499f6faebf8
[ "MIT" ]
1
2022-01-23T11:34:54.000Z
2022-01-23T11:34:54.000Z
forge/src/main/java/org/samo_lego/lakotnik/forge/LakotnikForge.java
samolego/Lakotnik
fb0cbf7951636374b1860ba2e242a499f6faebf8
[ "MIT" ]
null
null
null
forge/src/main/java/org/samo_lego/lakotnik/forge/LakotnikForge.java
samolego/Lakotnik
fb0cbf7951636374b1860ba2e242a499f6faebf8
[ "MIT" ]
1
2022-02-06T13:42:05.000Z
2022-02-06T13:42:05.000Z
20.066667
53
0.754153
1,001,491
package org.samo_lego.lakotnik.forge; import net.minecraftforge.fml.common.Mod; import org.samo_lego.lakotnik.Lakotnik; import static org.samo_lego.lakotnik.Lakotnik.MOD_ID; @Mod(MOD_ID) public class LakotnikForge { public LakotnikForge() { Lakotnik.init(new ForgePlatform()); } }
92405cd5e1c45765bef87b79d988beb6ba317968
1,810
java
Java
sharding-core/src/main/java/io/shardingsphere/core/parsing/parser/sql/dal/show/ShowParserFactory.java
hkpxj/sharding-jdbc
9d1fe6d5ebcc089fb66c6bc58c20d24111bff150
[ "Apache-2.0" ]
1
2018-08-22T06:58:26.000Z
2018-08-22T06:58:26.000Z
sharding-core/src/main/java/io/shardingsphere/core/parsing/parser/sql/dal/show/ShowParserFactory.java
hkpxj/sharding-jdbc
9d1fe6d5ebcc089fb66c6bc58c20d24111bff150
[ "Apache-2.0" ]
1
2022-01-21T23:46:02.000Z
2022-01-21T23:46:02.000Z
sharding-core/src/main/java/io/shardingsphere/core/parsing/parser/sql/dal/show/ShowParserFactory.java
hkpxj/sharding-jdbc
9d1fe6d5ebcc089fb66c6bc58c20d24111bff150
[ "Apache-2.0" ]
1
2018-08-22T06:58:35.000Z
2018-08-22T06:58:35.000Z
34.150943
141
0.71768
1,001,492
/* * Copyright 2016-2018 shardingsphere.io. * <p> * 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. * </p> */ package io.shardingsphere.core.parsing.parser.sql.dal.show; import io.shardingsphere.core.constant.DatabaseType; import io.shardingsphere.core.parsing.lexer.LexerEngine; import io.shardingsphere.core.parsing.parser.dialect.mysql.sql.MySQLShowParser; import io.shardingsphere.core.rule.ShardingRule; import lombok.AccessLevel; import lombok.NoArgsConstructor; /** * Show parser factory. * * @author zhangliang */ @NoArgsConstructor(access = AccessLevel.PRIVATE) public final class ShowParserFactory { /** * Create show parser instance. * * @param dbType database type * @param shardingRule databases and tables sharding rule * @param lexerEngine lexical analysis engine. * @return show parser instance */ public static AbstractShowParser newInstance(final DatabaseType dbType, final ShardingRule shardingRule, final LexerEngine lexerEngine) { switch (dbType) { case H2: case MySQL: return new MySQLShowParser(shardingRule, lexerEngine); default: throw new UnsupportedOperationException(String.format("Cannot support database [%s].", dbType)); } } }
92405ee8edb7c4b7d92be2c4168fe5be2a0a3b2a
2,528
java
Java
yaft/tool/src/java/org/sakaiproject/yaft/tool/entityprovider/StatisticableEntityProvider.java
sadupally/Dev
ead9de3993b7a805199ac254c6fa99d3dda48adf
[ "ECL-2.0" ]
null
null
null
yaft/tool/src/java/org/sakaiproject/yaft/tool/entityprovider/StatisticableEntityProvider.java
sadupally/Dev
ead9de3993b7a805199ac254c6fa99d3dda48adf
[ "ECL-2.0" ]
null
null
null
yaft/tool/src/java/org/sakaiproject/yaft/tool/entityprovider/StatisticableEntityProvider.java
sadupally/Dev
ead9de3993b7a805199ac254c6fa99d3dda48adf
[ "ECL-2.0" ]
null
null
null
30.457831
123
0.769383
1,001,493
/** * Copyright 2009 The Sakai Foundation * * Licensed under the Educational Community License, Version 1.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.opensource.org/licenses/ecl1.php * * 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.sakaiproject.yaft.tool.entityprovider; import java.util.HashMap; import java.util.Locale; import java.util.Map; import org.apache.log4j.Logger; import org.sakaiproject.entitybroker.entityprovider.capabilities.AutoRegisterEntityProvider; import org.sakaiproject.entitybroker.entityprovider.capabilities.Statisticable; import org.sakaiproject.entitybroker.util.AbstractEntityProvider; import org.sakaiproject.util.ResourceLoader; import org.sakaiproject.yaft.api.YaftForumService; public class StatisticableEntityProvider extends AbstractEntityProvider implements AutoRegisterEntityProvider,Statisticable { protected final Logger LOG = Logger.getLogger(getClass()); public final static String ENTITY_PREFIX = "yaft-forum"; //unisa-change: Changed the event names took out the _ss for the events private static final String[] EVENT_KEYS = new String[] { YaftForumService.YAFT_FORUM_CREATED, YaftForumService.YAFT_FORUM_DELETED, YaftForumService.YAFT_DISCUSSION_CREATED, YaftForumService.YAFT_DISCUSSION_DELETED, YaftForumService.YAFT_MESSAGE_CREATED, YaftForumService.YAFT_MESSAGE_DELETED }; public String getEntityPrefix() { return ENTITY_PREFIX; } /** * From Statisticable */ public String getAssociatedToolId() { return "sakai.yaft"; } /** * From Statisticable */ public String[] getEventKeys() { String[] temp = new String[EVENT_KEYS.length]; System.arraycopy(EVENT_KEYS, 0, temp, 0, EVENT_KEYS.length); return temp; } /** * From Statisticable */ public Map<String, String> getEventNames(Locale locale) { Map<String, String> localeEventNames = new HashMap<String, String>(); ResourceLoader msgs = new ResourceLoader("YaftEvents"); msgs.setContextLocale(locale); for (int i = 0; i < EVENT_KEYS.length; i++) { localeEventNames.put(EVENT_KEYS[i], msgs.getString(EVENT_KEYS[i])); } return localeEventNames; } }
9240605258fb11c75e06b6c6f30b3ac540531db3
399
java
Java
ShiroProjects_chapter17_server/src/main/java/com/cmcc/web/controller/IndexController.java
scoldfield/shiro
412301d55c4c3d617b2e0cfee442c59409320f67
[ "MIT" ]
null
null
null
ShiroProjects_chapter17_server/src/main/java/com/cmcc/web/controller/IndexController.java
scoldfield/shiro
412301d55c4c3d617b2e0cfee442c59409320f67
[ "MIT" ]
null
null
null
ShiroProjects_chapter17_server/src/main/java/com/cmcc/web/controller/IndexController.java
scoldfield/shiro
412301d55c4c3d617b2e0cfee442c59409320f67
[ "MIT" ]
null
null
null
18.136364
62
0.704261
1,001,494
package com.cmcc.web.controller; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; /** * <p>User: Zhang Kaitao * <p>Date: 14-2-14 * <p>Version: 1.0 */ @Controller public class IndexController { @RequestMapping("/") public String index(Model model) { return "index"; } }
924060741befa4609f620bcaa349d885af164696
5,239
java
Java
app/src/main/java/com/lee/toollibrary/dialogs/DatePickerDialog.java
leenickcode/ToolLibrary
a6a5d839640ad03c2e3bc094d526d53f393c2e5a
[ "Apache-2.0" ]
1
2021-02-21T11:20:33.000Z
2021-02-21T11:20:33.000Z
app/src/main/java/com/lee/toollibrary/dialogs/DatePickerDialog.java
nicklxz/ToolLibrary
31a05120c111c29d0a9f4092f65b33daedb69285
[ "Apache-2.0" ]
null
null
null
app/src/main/java/com/lee/toollibrary/dialogs/DatePickerDialog.java
nicklxz/ToolLibrary
31a05120c111c29d0a9f4092f65b33daedb69285
[ "Apache-2.0" ]
null
null
null
29.937143
93
0.623401
1,001,495
package com.lee.toollibrary.dialogs; import android.content.Context; import androidx.core.content.ContextCompat; import androidx.appcompat.app.AlertDialog; import android.view.Gravity; import android.view.LayoutInflater; import android.view.View; import android.view.Window; import android.view.WindowManager; import android.widget.Button; import com.lee.toollibrary.R; import com.lee.toollibrary.picker.DatePicker; /** * Created by Administrator on 2019/4/12. * 年月日选择器 * @author Administrator */ public class DatePickerDialog { protected DatePicker mDatePicker; private int mSelectedYear = -1, mSelectedMonth = -1, mSelectedDay = -1; private OnDateChooseListener mOnDateChooseListener; private boolean mIsShowAnimation = true; protected Button btnDecide, btnCancel; private OnDialogBut onDialogBut; private View contentView; private AlertDialog alertDialog; private Context mContext; private long miniDate; private boolean isShowAllBut = false; public DatePickerDialog(Context mContext) { this.mContext = mContext; } public Button getBtnDecide() { return btnDecide; } /** * 初始化控件 */ private void initView() { contentView = LayoutInflater.from(mContext).inflate(R.layout.dialog_date, null); mDatePicker = contentView.findViewById(R.id.dayPicker_dialog); mDatePicker.setSelectedItemTextColor(ContextCompat.getColor(mContext,R.color.green)); btnDecide = contentView.findViewById(R.id.btn_dialog_date_decide); btnCancel = contentView.findViewById(R.id.btn_dialog_date_cancel); mDatePicker.setMinDate(miniDate); if (onDialogBut != null) { onDialogBut.initDatePicker(); } mDatePicker.setOnDateSelectedListener(new DatePicker.OnDateSelectedListener() { @Override public void onDateSelected(int year, int month, int day) { if (mOnDateChooseListener != null) { mOnDateChooseListener.onDateChoose(year, month, day); } if (onDialogBut != null) { onDialogBut.DateSelecte(year, month, day); } } }); btnDecide.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (mOnDateChooseListener != null) { mOnDateChooseListener.onDateChoose(mDatePicker.getYear(), mDatePicker.getMonth(), mDatePicker.getDay()); } if (onDialogBut != null) { onDialogBut.onDateChoose(mDatePicker.getYear(), mDatePicker.getMonth(), mDatePicker.getDay()); } dismiss(); } }); btnCancel.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { dismiss(); } }); if (mSelectedYear > 0) { setSelectedDate(); } } public void show(){ initView(); AlertDialog.Builder builder = new AlertDialog.Builder(mContext); if (contentView != null) { builder.setView(contentView); } alertDialog = builder.show(); //背景透明 alertDialog.getWindow().setBackgroundDrawableResource(R.color.transparent); Window window = alertDialog.getWindow(); if (window != null) { window.getAttributes().windowAnimations = R.style.DatePickerDialogAnim; WindowManager.LayoutParams lp = window.getAttributes(); lp.gravity = Gravity.BOTTOM; // 紧贴底部 lp.width = WindowManager.LayoutParams.MATCH_PARENT; // 宽度持平 lp.dimAmount = 0.35f; window.setAttributes(lp); window.addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND); } alertDialog.show(); } public void dismiss(){ if (alertDialog!=null){ alertDialog.dismiss(); } } public void setSelectedDate(int year, int month, int day) { mSelectedYear = year; mSelectedMonth = month; mSelectedDay = day; setSelectedDate(); } private void setSelectedDate() { if (mDatePicker != null) { mDatePicker.setDate(mSelectedYear, mSelectedMonth, mSelectedDay, false); } } public void setOnDateChooseListener(OnDateChooseListener onDateChooseListener) { mOnDateChooseListener = onDateChooseListener; } public void setOnChoseListener(OnDialogBut onDialogButLisntener, boolean isShowAllBut) { this.onDialogBut = onDialogButLisntener; this.isShowAllBut = isShowAllBut; } public void setMinDate(long miniDate){ this.miniDate=miniDate; } public interface OnDateChooseListener { void onDateChoose(int year, int month, int day); } public interface OnDialogBut extends OnDateChooseListener { //全部按钮的点击事件 void onShowAllDate(); //滚动 void DateSelecte(int year, int month, int data); //初始化 void initDatePicker(); } }
924060f4377af39423d1cd5b4604a1eb38f95149
2,309
java
Java
enhanced/archive/classlib/java6/modules/luni/src/main/java/org/apache/harmony/luni/internal/locale/Country_fi.java
qinFamily/freeVM
9caa0256b4089d74186f84b8fb2afc95a0afc7bc
[ "Apache-2.0" ]
5
2017-03-08T20:32:39.000Z
2021-07-10T10:12:38.000Z
enhanced/archive/classlib/java6/modules/luni/src/main/java/org/apache/harmony/luni/internal/locale/Country_fi.java
qinFamily/freeVM
9caa0256b4089d74186f84b8fb2afc95a0afc7bc
[ "Apache-2.0" ]
null
null
null
enhanced/archive/classlib/java6/modules/luni/src/main/java/org/apache/harmony/luni/internal/locale/Country_fi.java
qinFamily/freeVM
9caa0256b4089d74186f84b8fb2afc95a0afc7bc
[ "Apache-2.0" ]
4
2015-07-07T07:06:59.000Z
2018-06-19T22:38:04.000Z
27.819277
76
0.590732
1,001,496
/* * 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 org.apache.harmony.luni.internal.locale; public class Country_fi extends java.util.ListResourceBundle { protected Object[][] getContents() { Object[][] contents = { {"AE","Yhdistyneet Arabiemiraatit",}, {"AT","It\u00e4valta",}, {"BA","Bosnia",}, {"BE","Belgia",}, {"BR","Brasilia",}, {"BY","Valko-Ven\u00e4j\u00e4",}, {"CA","Kanada",}, {"CH","Sveitsi",}, {"CN","Kiina",}, {"CO","Kolumbia",}, {"CZ","Tsekin tasavalta",}, {"DE","Saksa",}, {"DK","Tanska",}, {"DO","Dominikaaninen tasavalta",}, {"EC","Equador",}, {"EE","Viro",}, {"EG","Egypti",}, {"ES","Espanja",}, {"FI","Suomi",}, {"FR","Ranska",}, {"GB","Iso-Britannia",}, {"GR","Kreikka",}, {"HK","Hongknog, erit.hall.alue",}, {"HR","Kroatia",}, {"HU","Unkari",}, {"IE","Irlanti",}, {"IN","Intia",}, {"IS","Islanti",}, {"IT","Italia",}, {"JO","Jordania",}, {"JP","Japani",}, {"KR","Korea",}, {"LA","Latinalainen Amerikka",}, {"LB","Libanon",}, {"LT","Liettua",}, {"LU","Luxemburg",}, {"MA","Marokko",}, {"MK","Makedonia (FYR)",}, {"MO","Macao, erit.hall.alue",}, {"MX","Meksiko",}, {"NL","Alankomaat",}, {"NO","Norja",}, {"NZ","Uusi Seelanti",}, {"PL","Puola",}, {"PT","Portugali",}, {"RU","Ven\u00e4j\u00e4",}, {"SA","Saudi-Arabia",}, {"SE","Ruotsi",}, {"SY","Syyria",}, {"TH","Thaimaa",}, {"TR","Turkki",}, {"UA","Ukraina",}, {"US","Yhdysvallat",}, {"YE","Jemen",}, {"ZA","Etel\u00e4-Afrikka",}, }; return contents; } }
924061ab0a5b32f8750e7f570f7bfff1061f4811
981
java
Java
fixture-monkey/src/main/java/com/navercorp/fixturemonkey/customizer/ArbitraryCustomizer.java
KoEonYack/fixture-monkey
32d4fdd1796076fe9ab19d4daf34a6efdf45ab18
[ "Apache-2.0" ]
188
2021-10-01T05:11:08.000Z
2022-03-18T16:14:59.000Z
fixture-monkey/src/main/java/com/navercorp/fixturemonkey/customizer/ArbitraryCustomizer.java
G-ONL/fixture-monkey
39179a10a91be65e9a8a1883715748460869b6c8
[ "Apache-2.0" ]
52
2021-10-01T09:34:28.000Z
2022-03-31T14:50:35.000Z
fixture-monkey/src/main/java/com/navercorp/fixturemonkey/customizer/ArbitraryCustomizer.java
G-ONL/fixture-monkey
39179a10a91be65e9a8a1883715748460869b6c8
[ "Apache-2.0" ]
17
2021-10-01T08:50:13.000Z
2022-03-21T14:31:47.000Z
29.727273
81
0.762487
1,001,497
/* * Fixture Monkey * * Copyright (c) 2021-present NAVER Corp. * * 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.navercorp.fixturemonkey.customizer; import javax.annotation.Nullable; import com.navercorp.fixturemonkey.generator.FieldArbitraries; @FunctionalInterface public interface ArbitraryCustomizer<T> { default void customizeFields(Class<T> type, FieldArbitraries fieldArbitraries) { } @Nullable T customizeFixture(@Nullable T object); }
92406282e2d5bb5145de1a2bcf05267ea692f7bf
303
java
Java
ihmc-robotics-toolkit/src/main/java/us/ihmc/robotics/math/trajectories/interfaces/FrameOrientationTrajectoryGenerator.java
ihmcrobotics/ihmc-open-robotics-software
129b261de850e85e1dc78a12e9c075f53c6019a0
[ "Apache-2.0" ]
170
2016-02-01T18:58:50.000Z
2022-03-17T05:28:01.000Z
ihmc-robotics-toolkit/src/main/java/us/ihmc/robotics/math/trajectories/interfaces/FrameOrientationTrajectoryGenerator.java
ihmcrobotics/ihmc-open-robotics-software
129b261de850e85e1dc78a12e9c075f53c6019a0
[ "Apache-2.0" ]
162
2016-01-29T17:04:29.000Z
2022-02-10T16:25:37.000Z
ihmc-robotics-toolkit/src/main/java/us/ihmc/robotics/math/trajectories/interfaces/FrameOrientationTrajectoryGenerator.java
ihmcrobotics/ihmc-open-robotics-software
129b261de850e85e1dc78a12e9c075f53c6019a0
[ "Apache-2.0" ]
83
2016-01-28T22:49:01.000Z
2022-03-28T03:11:24.000Z
37.875
118
0.877888
1,001,498
package us.ihmc.robotics.math.trajectories.interfaces; import us.ihmc.euclid.referenceFrame.interfaces.*; import us.ihmc.robotics.trajectories.providers.FrameOrientationProvider; public interface FrameOrientationTrajectoryGenerator extends FixedFrameOrientationTrajectoryGenerator, FrameChangeable { }
9240643a2997076a2e68aaff47a9a6392da82205
1,479
java
Java
gulimall-search/src/main/java/com/llb/mall/search/controller/ElasticSaveController.java
PopsiCola/guli-mall
970f61918c3a74e78911a4fe79ee6f835d38e994
[ "Apache-2.0" ]
null
null
null
gulimall-search/src/main/java/com/llb/mall/search/controller/ElasticSaveController.java
PopsiCola/guli-mall
970f61918c3a74e78911a4fe79ee6f835d38e994
[ "Apache-2.0" ]
null
null
null
gulimall-search/src/main/java/com/llb/mall/search/controller/ElasticSaveController.java
PopsiCola/guli-mall
970f61918c3a74e78911a4fe79ee6f835d38e994
[ "Apache-2.0" ]
null
null
null
30.183673
127
0.732928
1,001,499
package com.llb.mall.search.controller; import com.llb.common.constant.BizCodeEnum; import com.llb.common.to.es.SkuEsModel; import com.llb.common.utils.R; import com.llb.mall.search.service.ProductSaveService; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.io.IOException; import java.util.List; /** * ElasticSearch服务 * @Author liulebin * @Date 2021/5/16 21:05 */ @Slf4j @RequestMapping("/search/save") @RestController public class ElasticSaveController { @Autowired private ProductSaveService productSaveService; /** * 上架商品 * @param skuEsModels * @return */ @PostMapping("/product") public R productStatusUp(@RequestBody List<SkuEsModel> skuEsModels) { boolean bool = true; try { bool = productSaveService.productStatusUp(skuEsModels); } catch (IOException e) { log.error("ElasticSaveController商品上架错误,{}", e); return R.error(BizCodeEnum.PRODUCT_UP_EXCEPTION.getCode(), BizCodeEnum.PRODUCT_UP_EXCEPTION.getMsg()); } return !bool ? R.ok() : R.error(BizCodeEnum.PRODUCT_UP_EXCEPTION.getCode(), BizCodeEnum.PRODUCT_UP_EXCEPTION.getMsg()); } }
9240645a8dddcf7011cb6476bbf8365ddeb3bb3a
1,491
java
Java
vavr/src/test/java/io/vavr/collection/euler/Euler04Test.java
nicholasren/vavr
19e7cfb08ef1b37026828cd9cdf700a82ddd7ef2
[ "Apache-2.0" ]
null
null
null
vavr/src/test/java/io/vavr/collection/euler/Euler04Test.java
nicholasren/vavr
19e7cfb08ef1b37026828cd9cdf700a82ddd7ef2
[ "Apache-2.0" ]
null
null
null
vavr/src/test/java/io/vavr/collection/euler/Euler04Test.java
nicholasren/vavr
19e7cfb08ef1b37026828cd9cdf700a82ddd7ef2
[ "Apache-2.0" ]
1
2020-01-03T21:48:53.000Z
2020-01-03T21:48:53.000Z
36.365854
100
0.580148
1,001,500
/* __ __ __ __ __ ___ * \ \ / / \ \ / / __/ * \ \/ / /\ \ \/ / / * \____/__/ \__\____/__/.ɪᴏ * ᶜᵒᵖʸʳᶦᵍʰᵗ ᵇʸ ᵛᵃᵛʳ ⁻ ˡᶦᶜᵉⁿˢᵉᵈ ᵘⁿᵈᵉʳ ᵗʰᵉ ᵃᵖᵃᶜʰᵉ ˡᶦᶜᵉⁿˢᵉ ᵛᵉʳˢᶦᵒⁿ ᵗʷᵒ ᵈᵒᵗ ᶻᵉʳᵒ */ package io.vavr.collection.euler; import io.vavr.collection.List; import org.junit.Test; import static org.assertj.core.api.Assertions.assertThat; public class Euler04Test { /** * <strong>Problem 4: Largest palindrome product</strong> * <p> * A palindromic number reads the same both ways. The largest palindrome made * from the product of two 2-digit numbers is 9009 = 91 × 99. * <p> * Find the largest palindrome made from the product of two 3-digit numbers. * <p> * See also <a href="https://projecteuler.net/problem=4">projecteuler.net problem 4</a>. */ @Test public void shouldSolveProblem4() { assertThat(largestPalindromeOfProductsFromFactorsInRange(10, 99)).isEqualTo(9009); assertThat(largestPalindromeOfProductsFromFactorsInRange(100, 999)).isEqualTo(906609); } private static int largestPalindromeOfProductsFromFactorsInRange(final int min, final int max) { return List.rangeClosed(min, max) .crossProduct() .filter(t -> t._1 <= t._2) .map(t -> t._1 * t._2) .filter(Utils::isPalindrome) .max().get(); } }
924065276316d2528c9a745166d5abe78b2fa56d
1,133
java
Java
src/test/java/seedu/address/logic/parser/FilterCommandParserTest.java
yinyin377/tp2
62aea29637ffd9b868f3b46117f6716a007e3e44
[ "MIT" ]
null
null
null
src/test/java/seedu/address/logic/parser/FilterCommandParserTest.java
yinyin377/tp2
62aea29637ffd9b868f3b46117f6716a007e3e44
[ "MIT" ]
78
2022-02-11T07:03:47.000Z
2022-03-31T17:07:07.000Z
src/test/java/seedu/address/logic/parser/FilterCommandParserTest.java
yinyin377/tp2
62aea29637ffd9b868f3b46117f6716a007e3e44
[ "MIT" ]
4
2022-02-10T06:11:43.000Z
2022-02-18T12:31:33.000Z
36.548387
120
0.748455
1,001,501
package seedu.address.logic.parser; import static seedu.address.commons.core.Messages.MESSAGE_INVALID_COMMAND_FORMAT; import static seedu.address.logic.parser.ParserUtilTest.assertParseFailure; import static seedu.address.logic.parser.ParserUtilTest.assertParseSuccess; import java.util.Arrays; import org.junit.jupiter.api.Test; import seedu.address.logic.commands.FilterCommand; import seedu.address.model.person.NameContainsTagPredicate; class FilterCommandParserTest { private FilterCommandParser parser = new FilterCommandParser(); @Test void parse() { // null -> returns parseException assertParseFailure(parser, " ", String.format(MESSAGE_INVALID_COMMAND_FORMAT, FilterCommand.MESSAGE_USAGE)); // test valid args -> returns success FilterCommand expectedCommand = new FilterCommand(new NameContainsTagPredicate(Arrays.asList("g501", "student"))); assertParseSuccess(parser, "g501 student", expectedCommand); // test whitespaces -> returns success assertParseSuccess(parser, " \t g501 \t \t student \t", expectedCommand); } }
9240662a271511d948c6ff37453ed484d740033e
4,720
java
Java
dependencyLibs/Mavlink/src/com/MAVLink/common/msg_param_request_read.java
lixiaowei123/HelloDrone
1795bf1bf26286359fb2e9f6782daf90a6575552
[ "Apache-2.0" ]
210
2015-08-06T21:31:20.000Z
2022-03-23T01:06:12.000Z
dependencyLibs/Mavlink/src/com/MAVLink/common/msg_param_request_read.java
lixiaowei123/HelloDrone
1795bf1bf26286359fb2e9f6782daf90a6575552
[ "Apache-2.0" ]
152
2015-07-30T22:43:55.000Z
2021-01-16T11:45:34.000Z
dependencyLibs/Mavlink/src/com/MAVLink/common/msg_param_request_read.java
lixiaowei123/HelloDrone
1795bf1bf26286359fb2e9f6782daf90a6575552
[ "Apache-2.0" ]
226
2015-08-03T01:58:13.000Z
2022-02-21T01:56:32.000Z
31.891892
463
0.615466
1,001,502
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * java mavlink generator tool. It should not be modified by hand. */ // MESSAGE PARAM_REQUEST_READ PACKING package com.MAVLink.common; import com.MAVLink.MAVLinkPacket; import com.MAVLink.Messages.MAVLinkMessage; import com.MAVLink.Messages.MAVLinkPayload; /** * Request to read the onboard parameter with the param_id string id. Onboard parameters are stored as key[const char*] -> value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also http://qgroundcontrol.org/parameter_interface for a full documentation of QGroundControl and IMU code. */ public class msg_param_request_read extends MAVLinkMessage{ public static final int MAVLINK_MSG_ID_PARAM_REQUEST_READ = 20; public static final int MAVLINK_MSG_LENGTH = 20; private static final long serialVersionUID = MAVLINK_MSG_ID_PARAM_REQUEST_READ; /** * Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored) */ public short param_index; /** * System ID */ public short target_system; /** * Component ID */ public short target_component; /** * Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string */ public byte param_id[] = new byte[16]; /** * Generates the payload for a mavlink message for a message of this type * @return */ public MAVLinkPacket pack(){ MAVLinkPacket packet = new MAVLinkPacket(MAVLINK_MSG_LENGTH); packet.sysid = 255; packet.compid = 190; packet.msgid = MAVLINK_MSG_ID_PARAM_REQUEST_READ; packet.payload.putShort(param_index); packet.payload.putUnsignedByte(target_system); packet.payload.putUnsignedByte(target_component); for (int i = 0; i < param_id.length; i++) { packet.payload.putByte(param_id[i]); } return packet; } /** * Decode a param_request_read message into this class fields * * @param payload The message to decode */ public void unpack(MAVLinkPayload payload) { payload.resetIndex(); this.param_index = payload.getShort(); this.target_system = payload.getUnsignedByte(); this.target_component = payload.getUnsignedByte(); for (int i = 0; i < this.param_id.length; i++) { this.param_id[i] = payload.getByte(); } } /** * Constructor for a new message, just initializes the msgid */ public msg_param_request_read(){ msgid = MAVLINK_MSG_ID_PARAM_REQUEST_READ; } /** * Constructor for a new message, initializes the message with the payload * from a mavlink packet * */ public msg_param_request_read(MAVLinkPacket mavLinkPacket){ this.sysid = mavLinkPacket.sysid; this.compid = mavLinkPacket.compid; this.msgid = MAVLINK_MSG_ID_PARAM_REQUEST_READ; unpack(mavLinkPacket.payload); } /** * Sets the buffer of this message with a string, adds the necessary padding */ public void setParam_Id(String str) { int len = Math.min(str.length(), 16); for (int i=0; i<len; i++) { param_id[i] = (byte) str.charAt(i); } for (int i=len; i<16; i++) { // padding for the rest of the buffer param_id[i] = 0; } } /** * Gets the message, formated as a string */ public String getParam_Id() { StringBuffer buf = new StringBuffer(); for (int i = 0; i < 16; i++) { if (param_id[i] != 0) buf.append((char) param_id[i]); else break; } return buf.toString(); } /** * Returns a string with the MSG name and data */ public String toString(){ return "MAVLINK_MSG_ID_PARAM_REQUEST_READ - sysid:"+sysid+" compid:"+compid+" param_index:"+param_index+" target_system:"+target_system+" target_component:"+target_component+" param_id:"+param_id+""; } }
9240668e420ede3d5b1e5edbdffa1b62feecd29d
935
java
Java
Homework/Homework1/app/src/main/java/com/gmail/demidovich/homework1/hw5/MyService.java
Markus-Demi/AndroidHome
8d0f236f58663b64f2f94885cf98d28c99805a1b
[ "MIT" ]
null
null
null
Homework/Homework1/app/src/main/java/com/gmail/demidovich/homework1/hw5/MyService.java
Markus-Demi/AndroidHome
8d0f236f58663b64f2f94885cf98d28c99805a1b
[ "MIT" ]
null
null
null
Homework/Homework1/app/src/main/java/com/gmail/demidovich/homework1/hw5/MyService.java
Markus-Demi/AndroidHome
8d0f236f58663b64f2f94885cf98d28c99805a1b
[ "MIT" ]
null
null
null
22.261905
92
0.684492
1,001,503
package com.gmail.demidovich.homework1.hw5; import android.app.Service; import android.content.Intent; import android.net.wifi.WifiManager; import android.os.Binder; import android.os.IBinder; import android.support.annotation.Nullable; public class MyService extends Service { private MyBinder mBinder; private WifiManager mWifiManager; public MyService() { } @Override public void onCreate() { super.onCreate(); mWifiManager = (WifiManager) getApplicationContext().getSystemService(WIFI_SERVICE); } public void changeWiFiState() { mWifiManager.setWifiEnabled(!mWifiManager.isWifiEnabled()); } @Nullable @Override public IBinder onBind(Intent intent) { mBinder = new MyBinder(); return mBinder; } public class MyBinder extends Binder { public MyService getService() { return MyService.this; } } }
924066abb3abccc670de3cd7e2a57620697582cf
178
java
Java
app/src/main/java/com/tantd/spyzie/util/rx/SchedulerProvider.java
tantdktmt/Spyzie
07021de1f6c48bc25dcf2c3a8485cb962959c3ee
[ "Apache-2.0" ]
1
2021-02-08T02:14:30.000Z
2021-02-08T02:14:30.000Z
app/src/main/java/com/tantd/spyzie/util/rx/SchedulerProvider.java
tantdktmt/Spyzie
07021de1f6c48bc25dcf2c3a8485cb962959c3ee
[ "Apache-2.0" ]
null
null
null
app/src/main/java/com/tantd/spyzie/util/rx/SchedulerProvider.java
tantdktmt/Spyzie
07021de1f6c48bc25dcf2c3a8485cb962959c3ee
[ "Apache-2.0" ]
null
null
null
13.692308
36
0.713483
1,001,504
package com.tantd.spyzie.util.rx; import io.reactivex.Scheduler; public interface SchedulerProvider { Scheduler ui(); Scheduler computation(); Scheduler io(); }
924066e01e4f8b33da354c49b549efac48589577
3,723
java
Java
src/main/java/com/github/alexfalappa/nbspringboot/navigator/MappedElement.java
blackleg/nb-springboot
2b0426a98178ab8c273fb3bf70355b5ad7a7d070
[ "Apache-2.0" ]
141
2016-05-25T21:00:00.000Z
2022-03-27T12:22:12.000Z
src/main/java/com/github/alexfalappa/nbspringboot/navigator/MappedElement.java
blackleg/nb-springboot
2b0426a98178ab8c273fb3bf70355b5ad7a7d070
[ "Apache-2.0" ]
170
2016-04-22T16:09:50.000Z
2021-08-14T03:01:08.000Z
src/main/java/com/github/alexfalappa/nbspringboot/navigator/MappedElement.java
blackleg/nb-springboot
2b0426a98178ab8c273fb3bf70355b5ad7a7d070
[ "Apache-2.0" ]
37
2016-05-23T18:22:32.000Z
2022-03-06T15:42:30.000Z
36.145631
124
0.659414
1,001,505
/* * Copyright 2016 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 com.github.alexfalappa.nbspringboot.navigator; import javax.lang.model.element.Element; import javax.lang.model.element.ExecutableElement; import javax.lang.model.element.VariableElement; import org.apache.commons.collections4.SetValuedMap; import org.apache.commons.collections4.multimap.HashSetValuedHashMap; import org.netbeans.api.java.source.ElementHandle; import org.openide.filesystems.FileObject; import org.springframework.web.bind.annotation.RequestMethod; import com.github.alexfalappa.nbspringboot.Utils; /** * This is a source code element of kind METHOD which is mapped by {@code @RequestMapping} or derivations thereof. * * @author Michael J. Simons, 2016-09-16 * @author Alessandro Falappa */ public final class MappedElement { private final FileObject fileObject; private final ElementHandle<Element> handle; private final String handlerMethod; private final String resourceUrl; private final RequestMethod requestMethod; public MappedElement(final FileObject fileObject, final Element element, final String url, final RequestMethod method) { this.fileObject = fileObject; this.handle = ElementHandle.create(element); this.handlerMethod = computeHandlerSignature(element); this.resourceUrl = url; this.requestMethod = method; } public FileObject getFileObject() { return fileObject; } public ElementHandle<Element> getHandle() { return handle; } public String getHandlerMethod() { return handlerMethod; } public String getResourceUrl() { return resourceUrl; } public RequestMethod getRequestMethod() { return requestMethod; } private final String computeHandlerSignature(Element element) { StringBuilder sb = new StringBuilder(element.getSimpleName()); if (element instanceof ExecutableElement) { // store arguments with same unqualified type name ExecutableElement eel = (ExecutableElement) element; SetValuedMap<String, String> mm = new HashSetValuedHashMap<>(); for (VariableElement var : eel.getParameters()) { String fullType = var.asType().toString(); mm.put(Utils.shortenJavaType(fullType), fullType); } // build up argument list sb.append('('); for (int i = 0; i < eel.getParameters().size(); i++) { VariableElement var = eel.getParameters().get(i); String fullType = var.asType().toString(); final String shortType = Utils.shortenJavaType(fullType); if (mm.get(shortType).size() > 1) { sb.append(fullType); } else { sb.append(shortType); } if (i < eel.getParameters().size() - 1) { sb.append(", "); } } sb.append(") : "); sb.append(Utils.shortenJavaType(eel.getReturnType().toString())); } return sb.toString(); } }
9240672f83bc68b9f76549230c121e8725595d76
1,366
java
Java
app/src/main/java/com/wendy/fpt/popmov/data/model/TMDBMoviesResponse.java
wendyfu/pop-mov
349b4fc6645e84298c7f3cbc6eea4039e865d50b
[ "WTFPL" ]
2
2018-01-01T02:02:40.000Z
2018-09-13T06:14:26.000Z
app/src/main/java/com/wendy/fpt/popmov/data/model/TMDBMoviesResponse.java
wendyfu/pop-mov
349b4fc6645e84298c7f3cbc6eea4039e865d50b
[ "WTFPL" ]
null
null
null
app/src/main/java/com/wendy/fpt/popmov/data/model/TMDBMoviesResponse.java
wendyfu/pop-mov
349b4fc6645e84298c7f3cbc6eea4039e865d50b
[ "WTFPL" ]
null
null
null
20.69697
96
0.621523
1,001,506
package com.wendy.fpt.popmov.data.model; import com.google.gson.annotations.SerializedName; import java.util.List; public class TMDBMoviesResponse { @SerializedName("page") private int page; @SerializedName("total_results") private int totalResults; @SerializedName("total_pages") private int totalPages; private List<MovieResponse> movies; public int getPage() { return page; } public void setPage(int page) { this.page = page; } public int getTotalResults() { return totalResults; } public void setTotalResults(int totalResults) { this.totalResults = totalResults; } public int getTotalPages() { return totalPages; } public void setTotalPages(int totalPages) { this.totalPages = totalPages; } public List<MovieResponse> getMovies() { return movies; } public void setMovies(List<MovieResponse> movies) { this.movies = movies; } public static class MovieResponse { @SerializedName("id") private int movieId; public int getMovieId() { return movieId; } } @Override public String toString() { return "page=" + page + " total_results=" + totalResults + " total_pages= " + totalPages + movies.toString(); } }
92406838f897339c5108a7634476fc623471b142
11,051
java
Java
metron-platform/metron-writer/metron-writer-common/src/test/java/org/apache/metron/writer/kafka/KafkaWriterTest.java
yeswici/metron
ff811a4e47544e89433de6734ec722e98db76b1d
[ "Apache-2.0" ]
631
2017-05-15T19:43:18.000Z
2022-02-04T12:46:53.000Z
metron-platform/metron-writer/metron-writer-common/src/test/java/org/apache/metron/writer/kafka/KafkaWriterTest.java
yeswici/metron
ff811a4e47544e89433de6734ec722e98db76b1d
[ "Apache-2.0" ]
975
2017-05-12T21:00:19.000Z
2021-02-25T15:09:45.000Z
metron-platform/metron-writer/metron-writer-common/src/test/java/org/apache/metron/writer/kafka/KafkaWriterTest.java
yeswici/metron
ff811a4e47544e89433de6734ec722e98db76b1d
[ "Apache-2.0" ]
396
2017-05-15T03:05:46.000Z
2022-03-30T08:35:32.000Z
45.477366
134
0.686816
1,001,507
/** * 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 org.apache.metron.writer.kafka; import com.google.common.collect.ImmutableMap; import org.apache.kafka.clients.producer.KafkaProducer; import org.apache.kafka.clients.producer.ProducerRecord; import org.apache.kafka.common.errors.InterruptException; import org.apache.metron.common.Constants; import org.apache.metron.common.configuration.ParserConfigurations; import org.apache.metron.common.configuration.SensorParserConfig; import org.apache.metron.common.configuration.writer.ParserWriterConfiguration; import org.apache.metron.common.configuration.writer.WriterConfiguration; import org.apache.metron.common.writer.BulkMessage; import org.apache.metron.common.writer.BulkWriterResponse; import org.apache.metron.common.writer.MessageId; import org.json.simple.JSONObject; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.Mock; import org.mockito.MockitoAnnotations; import java.util.*; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.*; public class KafkaWriterTest { @Mock private KafkaProducer kafkaProducer; public static final String SENSOR_TYPE = "test"; public WriterConfiguration createConfiguration(final Map<String, Object> parserConfig) { ParserConfigurations configurations = new ParserConfigurations(); configurations.updateSensorParserConfig( SENSOR_TYPE , new SensorParserConfig() {{ setParserConfig(parserConfig); }} ); return new ParserWriterConfiguration(configurations); } @BeforeEach public void setup() { MockitoAnnotations.initMocks(this); } @Test public void testHappyPathGlobalConfig() throws Exception { KafkaWriter writer = new KafkaWriter(); WriterConfiguration configuration = createConfiguration( new HashMap<String, Object>() {{ put("kafka.brokerUrl" , "localhost:6667"); put("kafka.topic" , SENSOR_TYPE); put("kafka.producerConfigs" , ImmutableMap.of("key1", 1, "key2", "value2")); }} ); writer.configure(SENSOR_TYPE, configuration); Map<String, Object> producerConfigs = writer.createProducerConfigs(); assertEquals(producerConfigs.get("bootstrap.servers"), "localhost:6667"); assertEquals(producerConfigs.get("key.serializer"), "org.apache.kafka.common.serialization.StringSerializer"); assertEquals(producerConfigs.get("value.serializer"), "org.apache.kafka.common.serialization.StringSerializer"); assertEquals(producerConfigs.get("request.required.acks"), 1); assertEquals(producerConfigs.get("key1"), 1); assertEquals(producerConfigs.get("key2"), "value2"); } @Test public void testHappyPathGlobalConfigWithPrefix() throws Exception { KafkaWriter writer = new KafkaWriter(); writer.withConfigPrefix("prefix"); WriterConfiguration configuration = createConfiguration( new HashMap<String, Object>() {{ put("prefix.kafka.brokerUrl" , "localhost:6667"); put("prefix.kafka.topic" , SENSOR_TYPE); put("prefix.kafka.producerConfigs" , ImmutableMap.of("key1", 1, "key2", "value2")); }} ); writer.configure(SENSOR_TYPE, configuration); Map<String, Object> producerConfigs = writer.createProducerConfigs(); assertEquals(producerConfigs.get("bootstrap.servers"), "localhost:6667"); assertEquals(producerConfigs.get("key.serializer"), "org.apache.kafka.common.serialization.StringSerializer"); assertEquals(producerConfigs.get("value.serializer"), "org.apache.kafka.common.serialization.StringSerializer"); assertEquals(producerConfigs.get("request.required.acks"), 1); assertEquals(producerConfigs.get("key1"), 1); assertEquals(producerConfigs.get("key2"), "value2"); } @Test public void testTopicField_bothTopicAndFieldSpecified() throws Exception { KafkaWriter writer = new KafkaWriter(); WriterConfiguration configuration = createConfiguration( new HashMap<String, Object>() {{ put("kafka.brokerUrl" , "localhost:6667"); put("kafka.topic" , SENSOR_TYPE); put("kafka.topicField" , "kafka_topic"); put("kafka.producerConfigs" , ImmutableMap.of("key1", 1, "key2", "value2")); }} ); writer.configure(SENSOR_TYPE, configuration); assertEquals( "metron" , writer.getKafkaTopic(new JSONObject() {{ put("kafka_topic", "metron"); }}).get() ); assertFalse( writer.getKafkaTopic(new JSONObject()).isPresent() ); } @Test public void testTopicField_onlyFieldSpecified() throws Exception { KafkaWriter writer = new KafkaWriter(); WriterConfiguration configuration = createConfiguration( new HashMap<String, Object>() {{ put("kafka.brokerUrl" , "localhost:6667"); put("kafka.topicField" , "kafka_topic"); put("kafka.producerConfigs" , ImmutableMap.of("key1", 1, "key2", "value2")); }} ); writer.configure(SENSOR_TYPE, configuration); assertEquals( "metron" , writer.getKafkaTopic(new JSONObject() {{ put("kafka_topic", "metron"); }}).get() ); assertFalse( writer.getKafkaTopic(new JSONObject()).isPresent() ); } @Test public void testTopicField_neitherSpecified() throws Exception { KafkaWriter writer = new KafkaWriter(); WriterConfiguration configuration = createConfiguration( new HashMap<String, Object>() {{ put("kafka.brokerUrl" , "localhost:6667"); put("kafka.producerConfigs" , ImmutableMap.of("key1", 1, "key2", "value2")); }} ); writer.configure(SENSOR_TYPE, configuration); assertEquals(Constants.ENRICHMENT_TOPIC , writer.getKafkaTopic(new JSONObject() {{ put("kafka_topic", "metron"); }}).get() ); assertTrue( writer.getKafkaTopic(new JSONObject()).isPresent() ); } @Test public void testWriterShouldReturnResponse() throws Exception { KafkaWriter writer = spy(new KafkaWriter()); writer.setKafkaProducer(kafkaProducer); List<BulkMessage<JSONObject>> messages = new ArrayList<>(); JSONObject successMessage = new JSONObject(); successMessage.put("value", "success"); JSONObject errorMessage = new JSONObject(); errorMessage.put("value", "error"); JSONObject droppedMessage = new JSONObject(); droppedMessage.put("value", "dropped"); messages.add(new BulkMessage<>("successId", successMessage)); messages.add(new BulkMessage<>("errorId", errorMessage)); messages.add(new BulkMessage<>("droppedId", droppedMessage)); doReturn(Optional.of("successTopic")).when(writer).getKafkaTopic(successMessage); doReturn(Optional.of("errorTopic")).when(writer).getKafkaTopic(errorMessage); doReturn(Optional.empty()).when(writer).getKafkaTopic(droppedMessage); Future successFuture = mock(Future.class); Future errorFuture = mock(Future.class); ExecutionException throwable = new ExecutionException(new Exception("kafka error")); when(kafkaProducer.send(new ProducerRecord<String, String>("errorTopic", "{\"value\":\"error\"}"))).thenReturn(errorFuture); when(kafkaProducer.send(new ProducerRecord<String, String>("successTopic", "{\"value\":\"success\"}"))).thenReturn(successFuture); when(errorFuture.get()).thenThrow(throwable); BulkWriterResponse response = new BulkWriterResponse(); response.addSuccess(new MessageId("successId")); response.addError(throwable, new MessageId("errorId")); assertEquals(response, writer.write(SENSOR_TYPE, createConfiguration(new HashMap<>()), messages)); verify(kafkaProducer, times(1)).flush(); verify(kafkaProducer, times(1)).send(new ProducerRecord<String, String>("successTopic", "{\"value\":\"success\"}")); verify(kafkaProducer, times(1)).send(new ProducerRecord<String, String>("errorTopic", "{\"value\":\"error\"}")); verifyNoMoreInteractions(kafkaProducer); } @Test public void testWriteShouldReturnErrorsOnFailedFlush() throws Exception { KafkaWriter writer = spy(new KafkaWriter()); writer.setKafkaProducer(kafkaProducer); List<BulkMessage<JSONObject>> messages = new ArrayList<>(); JSONObject message1 = new JSONObject(); message1.put("value", "message1"); JSONObject message2 = new JSONObject(); message2.put("value", "message2"); messages.add(new BulkMessage<>("messageId1", message1)); messages.add(new BulkMessage<>("messageId2", message2)); doReturn(Optional.of("topic1")).when(writer).getKafkaTopic(message1); doReturn(Optional.of("topic2")).when(writer).getKafkaTopic(message2); Future future1 = mock(Future.class); Future future2 = mock(Future.class); when(kafkaProducer.send(new ProducerRecord<String, String>("topic1", "{\"value\":\"message1\"}"))).thenReturn(future1); when(kafkaProducer.send(new ProducerRecord<String, String>("topic2", "{\"value\":\"message2\"}"))).thenReturn(future2); InterruptException throwable = new InterruptException("kafka flush exception"); doThrow(throwable).when(kafkaProducer).flush(); BulkWriterResponse response = new BulkWriterResponse(); response.addAllErrors(throwable, Arrays.asList(new MessageId("messageId1"), new MessageId("messageId2"))); assertEquals(response, writer.write(SENSOR_TYPE, createConfiguration(new HashMap<>()), messages)); verify(kafkaProducer, times(1)).flush(); verify(kafkaProducer, times(1)).send(new ProducerRecord<String, String>("topic1", "{\"value\":\"message1\"}")); verify(kafkaProducer, times(1)).send(new ProducerRecord<String, String>("topic2", "{\"value\":\"message2\"}")); verifyNoMoreInteractions(kafkaProducer); } }
9240697ac48a02df7876cc9906bf29944e0a0e14
5,689
java
Java
xiaoming-core/src/main/java/cn/chuanwise/xiaoming/recept/ReceptionistManagerImpl.java
TaixueChina/XiaomingBot
848bed326ab6fb2a2c5e768b2c466a612e32c00e
[ "Apache-2.0" ]
14
2021-05-15T14:41:40.000Z
2021-12-09T17:39:05.000Z
xiaoming-core/src/main/java/cn/chuanwise/xiaoming/recept/ReceptionistManagerImpl.java
TaixueChina/XiaomingBot
848bed326ab6fb2a2c5e768b2c466a612e32c00e
[ "Apache-2.0" ]
1
2021-08-16T07:37:40.000Z
2021-08-16T07:37:40.000Z
xiaoming-core/src/main/java/cn/chuanwise/xiaoming/recept/ReceptionistManagerImpl.java
Chuanwise/xiaoming-bot
848bed326ab6fb2a2c5e768b2c466a612e32c00e
[ "Apache-2.0" ]
3
2021-05-01T05:59:39.000Z
2021-05-17T14:35:44.000Z
39.234483
127
0.712252
1,001,508
package cn.chuanwise.xiaoming.recept; import cn.chuanwise.toolkit.sized.SizedResidentConcurrentHashMap; import cn.chuanwise.util.*; import cn.chuanwise.xiaoming.annotation.EventListener; import cn.chuanwise.xiaoming.bot.XiaomingBot; import cn.chuanwise.xiaoming.contact.message.Message; import cn.chuanwise.xiaoming.contact.message.MessageImpl; import cn.chuanwise.xiaoming.event.Listeners; import cn.chuanwise.xiaoming.event.MessageEvent; import cn.chuanwise.xiaoming.listener.ListenerPriority; import cn.chuanwise.xiaoming.object.ModuleObjectImpl; import cn.chuanwise.xiaoming.user.GroupXiaomingUser; import cn.chuanwise.xiaoming.user.MemberXiaomingUser; import cn.chuanwise.xiaoming.user.PrivateXiaomingUser; import cn.chuanwise.xiaoming.user.XiaomingUser; import lombok.Getter; import lombok.extern.slf4j.Slf4j; import net.mamoe.mirai.contact.*; import net.mamoe.mirai.event.EventChannel; import net.mamoe.mirai.event.events.FriendMessageEvent; import net.mamoe.mirai.event.events.GroupMessageEvent; import net.mamoe.mirai.event.events.GroupTempMessageEvent; import net.mamoe.mirai.event.events.MessageRecallEvent; import net.mamoe.mirai.message.code.MiraiCode; import net.mamoe.mirai.message.data.MessageChain; import net.mamoe.mirai.message.data.OnlineMessageSource; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.beans.Transient; import java.util.Map; import java.util.Objects; /** * @author Chuanwise */ @Getter public class ReceptionistManagerImpl extends ModuleObjectImpl implements ReceptionistManager, Listeners { public ReceptionistManagerImpl(XiaomingBot xiaomingBot) { super(xiaomingBot); this.receptionists = new SizedResidentConcurrentHashMap<>(xiaomingBot.getConfiguration().getMaxReceptionistQuantity()); } /** 用户接待员记录器 */ final Map<Long, Receptionist> receptionists; @Override public Receptionist getReceptionist(long code) { return MapUtil.getOrPutSupply(receptionists, code, () -> new ReceptionistImpl(getXiaomingBot(), code)); } @Override @EventListener public void onGroupMessageEvent(GroupMessageEvent event) { final Group group = event.getGroup(); final Member member = event.getSender(); final long accountCode = member.getId(); final Receptionist receptionist = getReceptionist(accountCode); final long groupCode = group.getId(); final GroupXiaomingUser user = receptionist.getGroupXiaomingUser(groupCode).orElseThrow(); final OnlineMessageSource.Incoming.FromGroup source = event.getSource(); final Message message = new MessageImpl(xiaomingBot, event.getMessage(), source.getIds(), source.getInternalIds(), ((long) event.getTime()) * 1000); xiaomingBot.getEventManager().callEventAsync(new MessageEvent(user, message)); xiaomingBot.getStatistician().increaseCallNumber(); } @Override @EventListener public void onPrivateMessageEvent(FriendMessageEvent event) { final Friend friend = event.getFriend(); final long accountCode = friend.getId(); final Receptionist receptionist = getReceptionist(accountCode); final PrivateXiaomingUser user = receptionist.getPrivateXiaomingUser().orElseThrow(); final OnlineMessageSource.Incoming.FromFriend source = event.getSource(); final Message message = new MessageImpl(xiaomingBot, event.getMessage(), source.getIds(), source.getInternalIds(), ((long) event.getTime()) * 1000); xiaomingBot.getEventManager().callEventAsync(new MessageEvent(user, message)); xiaomingBot.getStatistician().increaseCallNumber(); } @Override @EventListener public void onMemberMessageEvent(GroupTempMessageEvent event) { final Group group = event.getGroup(); final NormalMember member = event.getSender(); final long accountCode = member.getId(); final Receptionist receptionist = getReceptionist(accountCode); final long groupCode = group.getId(); final MemberXiaomingUser user = receptionist.getMemberXiaomingUser(groupCode).orElseThrow(); final OnlineMessageSource.Incoming.FromTemp source = event.getSource(); final Message message = new MessageImpl(xiaomingBot, event.getMessage(), source.getIds(), source.getInternalIds(), ((long) event.getTime()) * 1000); xiaomingBot.getEventManager().callEventAsync(new MessageEvent(user, message)); xiaomingBot.getStatistician().increaseCallNumber(); } @EventListener public void onMessageEvent(MessageEvent messageEvent) { final Message message = messageEvent.getMessage(); final XiaomingUser user = messageEvent.getUser(); if (xiaomingBot.getConfiguration().isTrimMessage()) { final String beforeTrim = message.serialize(); final String afterTrim = beforeTrim.trim(); if (!Objects.equals(beforeTrim, afterTrim)) { message.setMessageChain(MiraiCode.deserializeMiraiCode(afterTrim)); } } // 唤醒正在等待这一条消息的线程 xiaomingBot.getContactManager().onNextMessageEvent(messageEvent); if (Objects.nonNull(user.getInteractorContext())) { xiaomingBot.getStatistician().increaseEffectiveCallNumber(); getLogger().info(user.getCompleteName() + "已有交互上下文,不再启动新的接待任务"); return; } xiaomingBot.getScheduler().run(new ReceptionTaskImpl<>(user, message)); } }
92406a3fd88eac91b768e88e1be8468a3bde7765
4,647
java
Java
cxsolution/src/main/java/com/unity/cxsolution/Permission/PermissionTool.java
zengliugen/AndroidCxSolution
bc11e2e20eb9d46d88e0f67a23f7f62dfaf871db
[ "MIT" ]
null
null
null
cxsolution/src/main/java/com/unity/cxsolution/Permission/PermissionTool.java
zengliugen/AndroidCxSolution
bc11e2e20eb9d46d88e0f67a23f7f62dfaf871db
[ "MIT" ]
null
null
null
cxsolution/src/main/java/com/unity/cxsolution/Permission/PermissionTool.java
zengliugen/AndroidCxSolution
bc11e2e20eb9d46d88e0f67a23f7f62dfaf871db
[ "MIT" ]
null
null
null
38.090164
145
0.673122
1,001,509
package com.unity.cxsolution.Permission; import android.app.Activity; import android.content.Context; import android.content.pm.PackageManager; import com.unity.cxsolution.Log.LogTool; import static com.unity.cxsolution.System.SystemTool.GetCurrentActivity; import static com.unity.cxsolution.System.SystemTool.GetCurrentContext; @SuppressWarnings({"WeakerAccess", "unused"}) public class PermissionTool { /** * 检测指定Context对象是否拥有指定权限 * * @param context 待检测的Context对象 * @param permission 权限名称 * @return 是否拥有权限 */ public static boolean CheckPermission(Context context, String permission) { if (context == null || permission == null) { LogTool.e("CheckPermission Fail. Params(context,permission) cant not is null."); return false; } return context.checkCallingOrSelfPermission(permission) == PackageManager.PERMISSION_GRANTED; } /** * 检测当前Context对象是否拥有指定权限 * * @param permission 权限名称 * @return 是否拥有权限 */ public static boolean CheckSelfPermission(String permission) { return CheckPermission(GetCurrentContext(), permission); } /** * 检测指定包名的应用是否拥有指定权限 * * @param packageName 应用包名 * @param permission 权限名称 * @return 是否拥有权限 */ public static boolean CheckAppPermission(String packageName, String permission) { if (packageName == null || permission == null) { LogTool.e("CheckAppPermission Fail. Params(packageName,permission) cant not is null."); return false; } Context context = GetCurrentContext(); if (context == null) { //noinspection SpellCheckingInspection LogTool.e("Get current content fail.Please set (com.unity.cxsolution.Enter.CustomActivity) to MainActivity "); return false; } PackageManager packageManager = context.getPackageManager(); return packageManager.checkPermission(permission, packageName) == PackageManager.PERMISSION_GRANTED; } /** * 在指定Activity对象中进行权限申请(单权限申请) * * @param activity Activity对象 * @param permission 权限名称 * @param permissionsCallBack 权限申请回调 */ public static void RequestPermission(Activity activity, String permission, PermissionInterface.PermissionsCallBack permissionsCallBack) { if (activity == null || permission == null || permissionsCallBack == null) { LogTool.e("RequestPermission Fail. Params(activity,permission,permissionsCallBack) cant not is null."); return; } String[] permissions = new String[]{permission}; PermissionHelper.RequestPermissions(activity, permissions, permissionsCallBack); } /** * 在指定Activity对象中进行权限申请(多权限申请) * * @param activity Activity对象 * @param permissions 权限名称列表 * @param permissionsCallBack 权限申请回调 */ public static void RequestPermissions(Activity activity, String[] permissions, PermissionInterface.PermissionsCallBack permissionsCallBack) { if (activity == null || permissions == null || permissionsCallBack == null) { LogTool.e("RequestPermissions Fail. Params(activity,permissions,permissionsCallBack) cant not is null."); return; } PermissionHelper.RequestPermissions(activity, permissions, permissionsCallBack); } /** * 在当前Activity对象中进行权限申请(单权限申请) * * @param permission 权限名称 * @param permissionsCallBack 权限申请回调 */ public static void RequestSelfPermission(String permission, PermissionInterface.PermissionsCallBack permissionsCallBack) { if (permission == null || permissionsCallBack == null) { LogTool.e("RequestSelfPermission Fail. Params(permission,permissionsCallBack) cant not is null."); return; } String[] permissions = new String[]{permission}; PermissionHelper.RequestPermissions(GetCurrentActivity(), permissions, permissionsCallBack); } /** * 在当前Activity对象中进行权限申请(多权限申请) * * @param permissions 权限名称列表 * @param permissionsCallBack 权限申请回调 */ public static void RequestSelfPermissions(String[] permissions, PermissionInterface.PermissionsCallBack permissionsCallBack) { if (permissions == null || permissionsCallBack == null) { LogTool.e("RequestSelfPermissions Fail. Params(permissions,permissionsCallBack) cant not is null."); return; } PermissionHelper.RequestPermissions(GetCurrentActivity(), permissions, permissionsCallBack); } }
92406aeb72a8e00be68b3f2b1f3342dc5d468473
479
java
Java
src/main/java/weixin/popular/bean/card/qrcode/create/ActionInfoMultipleCard.java
evanyangg/weixin-popular
646afc7e6ef8899c56e8d5db8094f308426d568f
[ "Apache-2.0" ]
2,606
2015-01-15T09:45:11.000Z
2022-03-31T09:22:18.000Z
src/main/java/weixin/popular/bean/card/qrcode/create/ActionInfoMultipleCard.java
evanyangg/weixin-popular
646afc7e6ef8899c56e8d5db8094f308426d568f
[ "Apache-2.0" ]
202
2015-01-06T08:59:45.000Z
2022-02-16T03:18:14.000Z
src/main/java/weixin/popular/bean/card/qrcode/create/ActionInfoMultipleCard.java
evanyangg/weixin-popular
646afc7e6ef8899c56e8d5db8094f308426d568f
[ "Apache-2.0" ]
1,175
2015-01-05T14:36:48.000Z
2022-03-31T02:09:53.000Z
19.16
70
0.720251
1,001,510
package weixin.popular.bean.card.qrcode.create; import java.util.List; import com.alibaba.fastjson.annotation.JSONField; /** * * @author Moyq5 * */ public class ActionInfoMultipleCard { @JSONField(name = "card_list") List<ActionInfoMultipleCardItem> cardList; public List<ActionInfoMultipleCardItem> getCardList() { return cardList; } public void setCardList(List<ActionInfoMultipleCardItem> cardList) { this.cardList = cardList; } }
92406bda686fe80eca1cec3d60bfa50fae6d554f
1,381
java
Java
tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/ImmortalSessionTest.java
zhoulei17/jetty.project
26a425e36006f355223daec715e832bff4fa82b1
[ "Apache-2.0" ]
null
null
null
tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/ImmortalSessionTest.java
zhoulei17/jetty.project
26a425e36006f355223daec715e832bff4fa82b1
[ "Apache-2.0" ]
null
null
null
tests/test-sessions/test-mongodb-sessions/src/test/java/org/eclipse/jetty/nosql/mongodb/ImmortalSessionTest.java
zhoulei17/jetty.project
26a425e36006f355223daec715e832bff4fa82b1
[ "Apache-2.0" ]
null
null
null
32.116279
100
0.609703
1,001,511
// // ======================================================================== // Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. // ------------------------------------------------------------------------ // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // and Apache License v2.0 which accompanies this distribution. // // The Eclipse Public License is available at // http://www.eclipse.org/legal/epl-v10.html // // The Apache License v2.0 is available at // http://www.opensource.org/licenses/apache2.0.php // // You may elect to redistribute this code under either of these licenses. // ======================================================================== // package org.eclipse.jetty.nosql.mongodb; import org.eclipse.jetty.server.session.AbstractImmortalSessionTest; import org.eclipse.jetty.server.session.AbstractTestServer; /** * ImmortalSessionTest * * */ public class ImmortalSessionTest extends AbstractImmortalSessionTest { /** * @see org.eclipse.jetty.server.session.AbstractImmortalSessionTest#createServer(int, int, int) */ @Override public AbstractTestServer createServer(int port, int maxInactiveMs, int scavengeMs) { return new MongoTestServer(port, maxInactiveMs, scavengeMs); } }
92406be8ae8791a463b7728fe6ff2662e7583b64
11,707
java
Java
com/google/appinventor/components/runtime/repackaged/org/json/JSONML.java
Gumbraise/MySadWorld
34e52d7e3b6598d781974fa74ec012ce1b695801
[ "MIT" ]
null
null
null
com/google/appinventor/components/runtime/repackaged/org/json/JSONML.java
Gumbraise/MySadWorld
34e52d7e3b6598d781974fa74ec012ce1b695801
[ "MIT" ]
null
null
null
com/google/appinventor/components/runtime/repackaged/org/json/JSONML.java
Gumbraise/MySadWorld
34e52d7e3b6598d781974fa74ec012ce1b695801
[ "MIT" ]
null
null
null
42.263538
173
0.364654
1,001,512
package com.google.appinventor.components.runtime.repackaged.org.json; import java.util.Iterator; public class JSONML { private static Object parse(XMLTokener x, boolean arrayForm, JSONArray ja) throws JSONException { Object obj; loop0: while (x.more()) { Object token = x.nextContent(); if (token == XML.LT) { Object token2 = x.nextToken(); if (token2 instanceof Character) { if (token2 == XML.SLASH) { Object token3 = x.nextToken(); if (!(token3 instanceof String)) { throw new JSONException(new StringBuffer().append("Expected a closing name instead of '").append(token3).append("'.").toString()); } else if (x.nextToken() == XML.GT) { return token3; } else { throw x.syntaxError("Misshaped close tag"); } } else if (token2 == XML.BANG) { char c = x.next(); if (c == '-') { if (x.next() == '-') { x.skipPast("-->"); } else { x.back(); } } else if (c != '[') { int i = 1; do { Object token4 = x.nextMeta(); if (token4 == null) { throw x.syntaxError("Missing '>' after '<!'."); } else if (token4 == XML.LT) { i++; continue; } else if (token4 == XML.GT) { i--; continue; } else { continue; } } while (i > 0); } else if (!x.nextToken().equals("CDATA") || x.next() != '[') { throw x.syntaxError("Expected 'CDATA['"); } else if (ja != null) { ja.put((Object) x.nextCDATA()); } } else if (token2 == XML.QUEST) { x.skipPast("?>"); } else { throw x.syntaxError("Misshaped tag"); } } else if (!(token2 instanceof String)) { throw x.syntaxError(new StringBuffer().append("Bad tagName '").append(token2).append("'.").toString()); } else { String tagName = (String) token2; JSONArray newja = new JSONArray(); JSONObject newjo = new JSONObject(); if (arrayForm) { newja.put((Object) tagName); if (ja != null) { ja.put((Object) newja); } } else { newjo.put("tagName", (Object) tagName); if (ja != null) { ja.put((Object) newjo); } } Object token5 = null; while (true) { if (token5 == null) { obj = x.nextToken(); } else { obj = token5; } if (obj == null) { throw x.syntaxError("Misshaped tag"); } else if (!(obj instanceof String)) { if (arrayForm && newjo.length() > 0) { newja.put((Object) newjo); } if (obj == XML.SLASH) { if (x.nextToken() != XML.GT) { throw x.syntaxError("Misshaped tag"); } else if (ja == null) { if (arrayForm) { return newja; } return newjo; } } else if (obj != XML.GT) { throw x.syntaxError("Misshaped tag"); } else { String closeTag = (String) parse(x, arrayForm, newja); if (closeTag == null) { continue; } else if (!closeTag.equals(tagName)) { throw x.syntaxError(new StringBuffer().append("Mismatched '").append(tagName).append("' and '").append(closeTag).append("'").toString()); } else { if (!arrayForm && newja.length() > 0) { newjo.put("childNodes", (Object) newja); } if (ja == null) { if (arrayForm) { return newja; } return newjo; } } } } else { String attribute = (String) obj; if (arrayForm || (!"tagName".equals(attribute) && !"childNode".equals(attribute))) { token5 = x.nextToken(); if (token5 == XML.EQ) { Object token6 = x.nextToken(); if (!(token6 instanceof String)) { throw x.syntaxError("Missing value"); } newjo.accumulate(attribute, XML.stringToValue((String) token6)); token5 = null; } else { newjo.accumulate(attribute, ""); } } } } throw x.syntaxError("Reserved attribute."); } } else if (ja != null) { if (token instanceof String) { token = XML.stringToValue((String) token); } ja.put(token); } } throw x.syntaxError("Bad XML"); } public static JSONArray toJSONArray(String string) throws JSONException { return toJSONArray(new XMLTokener(string)); } public static JSONArray toJSONArray(XMLTokener x) throws JSONException { return (JSONArray) parse(x, true, (JSONArray) null); } public static JSONObject toJSONObject(XMLTokener x) throws JSONException { return (JSONObject) parse(x, false, (JSONArray) null); } public static JSONObject toJSONObject(String string) throws JSONException { return toJSONObject(new XMLTokener(string)); } public static String toString(JSONArray ja) throws JSONException { int i; StringBuffer sb = new StringBuffer(); String tagName = ja.getString(0); XML.noSpace(tagName); String tagName2 = XML.escape(tagName); sb.append('<'); sb.append(tagName2); Object object = ja.opt(1); if (object instanceof JSONObject) { i = 2; JSONObject jo = (JSONObject) object; Iterator keys = jo.keys(); while (keys.hasNext()) { String key = keys.next().toString(); XML.noSpace(key); String value = jo.optString(key); if (value != null) { sb.append(' '); sb.append(XML.escape(key)); sb.append('='); sb.append('\"'); sb.append(XML.escape(value)); sb.append('\"'); } } } else { i = 1; } int length = ja.length(); if (i >= length) { sb.append('/'); sb.append('>'); } else { sb.append('>'); do { Object object2 = ja.get(i); i++; if (object2 != null) { if (object2 instanceof String) { sb.append(XML.escape(object2.toString())); continue; } else if (object2 instanceof JSONObject) { sb.append(toString((JSONObject) object2)); continue; } else if (object2 instanceof JSONArray) { sb.append(toString((JSONArray) object2)); continue; } else { continue; } } } while (i < length); sb.append('<'); sb.append('/'); sb.append(tagName2); sb.append('>'); } return sb.toString(); } public static String toString(JSONObject jo) throws JSONException { StringBuffer sb = new StringBuffer(); String tagName = jo.optString("tagName"); if (tagName == null) { return XML.escape(jo.toString()); } XML.noSpace(tagName); String tagName2 = XML.escape(tagName); sb.append('<'); sb.append(tagName2); Iterator keys = jo.keys(); while (keys.hasNext()) { String key = keys.next().toString(); if (!"tagName".equals(key) && !"childNodes".equals(key)) { XML.noSpace(key); String value = jo.optString(key); if (value != null) { sb.append(' '); sb.append(XML.escape(key)); sb.append('='); sb.append('\"'); sb.append(XML.escape(value)); sb.append('\"'); } } } JSONArray ja = jo.optJSONArray("childNodes"); if (ja == null) { sb.append('/'); sb.append('>'); } else { sb.append('>'); int length = ja.length(); for (int i = 0; i < length; i++) { Object object = ja.get(i); if (object != null) { if (object instanceof String) { sb.append(XML.escape(object.toString())); } else if (object instanceof JSONObject) { sb.append(toString((JSONObject) object)); } else if (object instanceof JSONArray) { sb.append(toString((JSONArray) object)); } else { sb.append(object.toString()); } } } sb.append('<'); sb.append('/'); sb.append(tagName2); sb.append('>'); } return sb.toString(); } }
92406c57541e938407e7ca0d48a8a3b2399afbf3
2,424
java
Java
ZimbraSoap/src/java/com/zimbra/soap/account/type/SMIMEPublicCertsInfo.java
fciubotaru/z-pec
82335600341c6fb1bb8a471fd751243a90bc4d57
[ "MIT" ]
5
2019-03-26T07:51:56.000Z
2021-08-30T07:26:05.000Z
ZimbraSoap/src/java/com/zimbra/soap/account/type/SMIMEPublicCertsInfo.java
fciubotaru/z-pec
82335600341c6fb1bb8a471fd751243a90bc4d57
[ "MIT" ]
1
2015-08-18T19:03:32.000Z
2015-08-18T19:03:32.000Z
ZimbraSoap/src/java/com/zimbra/soap/account/type/SMIMEPublicCertsInfo.java
fciubotaru/z-pec
82335600341c6fb1bb8a471fd751243a90bc4d57
[ "MIT" ]
13
2015-03-11T00:26:35.000Z
2020-07-26T16:25:18.000Z
29.204819
76
0.685231
1,001,513
/* * ***** BEGIN LICENSE BLOCK ***** * Zimbra Collaboration Suite Server * Copyright (C) 2011 Zimbra, Inc. * * The contents of this file are subject to the Zimbra Public License * Version 1.3 ("License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://www.zimbra.com/license. * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. * ***** END LICENSE BLOCK ***** */ package com.zimbra.soap.account.type; import com.google.common.base.Objects; import com.google.common.collect.Iterables; import com.google.common.collect.Lists; import java.util.Collections; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; import com.zimbra.common.soap.AccountConstants; @XmlAccessorType(XmlAccessType.NONE) @XmlType(propOrder = {}) public class SMIMEPublicCertsInfo { /** * @zm-api-field-tag certs-email-address * @zm-api-field-description Email address */ @XmlAttribute(name=AccountConstants.A_EMAIL /* email */, required=false) private String email; /** * @zm-api-field-description Certificates */ @XmlElement(name=AccountConstants.E_CERT /* cert */, required=false) private List<SMIMEPublicCertInfo> certs = Lists.newArrayList(); public SMIMEPublicCertsInfo() { } public void setEmail(String email) { this.email = email; } public void setCerts(Iterable <SMIMEPublicCertInfo> certs) { this.certs.clear(); if (certs != null) { Iterables.addAll(this.certs,certs); } } public void addCert(SMIMEPublicCertInfo cert) { this.certs.add(cert); } public String getEmail() { return email; } public List<SMIMEPublicCertInfo> getCerts() { return Collections.unmodifiableList(certs); } public Objects.ToStringHelper addToStringInfo( Objects.ToStringHelper helper) { return helper .add("email", email) .add("certs", certs); } @Override public String toString() { return addToStringInfo(Objects.toStringHelper(this)) .toString(); } }
92406d46e15d0865687eb657b9c0f10fa74e8536
228,219
java
Java
erp_desktop_all/src_facturacion/com/bydan/erp/facturacion/presentation/swing/jinternalframes/report/ProcesoFacturasProductosDetalleFormJInternalFrame.java
jarocho105/pre2
f032fc63741b6deecdfee490e23dfa9ef1f42b4f
[ "Apache-2.0" ]
1
2018-01-05T17:50:03.000Z
2018-01-05T17:50:03.000Z
erp_desktop_all/src_facturacion/com/bydan/erp/facturacion/presentation/swing/jinternalframes/report/ProcesoFacturasProductosDetalleFormJInternalFrame.java
jarocho105/pre2
f032fc63741b6deecdfee490e23dfa9ef1f42b4f
[ "Apache-2.0" ]
null
null
null
erp_desktop_all/src_facturacion/com/bydan/erp/facturacion/presentation/swing/jinternalframes/report/ProcesoFacturasProductosDetalleFormJInternalFrame.java
jarocho105/pre2
f032fc63741b6deecdfee490e23dfa9ef1f42b4f
[ "Apache-2.0" ]
null
null
null
67.162743
393
0.852953
1,001,514
/* *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.facturacion.presentation.swing.jinternalframes.report; import com.bydan.erp.seguridad.presentation.swing.jinternalframes.*; import com.bydan.erp.cartera.presentation.swing.jinternalframes.*; import com.bydan.erp.comisiones.presentation.swing.jinternalframes.*; import com.bydan.erp.facturacion.presentation.web.jsf.sessionbean.*;//.report; import com.bydan.erp.facturacion.presentation.swing.jinternalframes.*; import com.bydan.erp.facturacion.presentation.swing.jinternalframes.auxiliar.report.*; import com.bydan.erp.facturacion.presentation.web.jsf.sessionbean.report.*; import com.bydan.erp.seguridad.presentation.web.jsf.sessionbean.*; import com.bydan.erp.cartera.presentation.web.jsf.sessionbean.*; import com.bydan.erp.comisiones.presentation.web.jsf.sessionbean.*; //import com.bydan.erp.facturacion.presentation.report.source.report.*; 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.facturacion.business.entity.report.*; import com.bydan.erp.facturacion.util.report.ProcesoFacturasProductosConstantesFunciones; import com.bydan.erp.facturacion.business.logic.report.*; 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.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 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 ProcesoFacturasProductosDetalleFormJInternalFrame extends ProcesoFacturasProductosBeanSwingJInternalFrameAdditional { private static final long serialVersionUID = 1L; public JToolBar jTtoolBarDetalleProcesoFacturasProductos; protected JMenuBar jmenuBarDetalleProcesoFacturasProductos; protected JMenu jmenuDetalleProcesoFacturasProductos; protected JMenu jmenuDetalleArchivoProcesoFacturasProductos; protected JMenu jmenuDetalleAccionesProcesoFacturasProductos; protected JMenu jmenuDetalleDatosProcesoFacturasProductos; protected JPanel jContentPane = null; protected JPanel jContentPaneDetalleProcesoFacturasProductos = new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true);//new JPanel(); protected GridBagLayout gridaBagLayoutProcesoFacturasProductos; protected GridBagConstraints gridBagConstraintsProcesoFacturasProductos; //protected JInternalFrameBase jInternalFrameParent; //ESTA EN BASE //protected ProcesoFacturasProductosBeanSwingJInternalFrameAdditional jInternalFrameDetalleProcesoFacturasProductos; //VENTANAS PARA ACTUALIZAR Y BUSCAR FK protected CiudadBeanSwingJInternalFrame ciudadBeanSwingJInternalFrame; public String sFinalQueryGeneral_ciudad=""; protected ZonaBeanSwingJInternalFrame zonaBeanSwingJInternalFrame; public String sFinalQueryGeneral_zona=""; protected GrupoClienteBeanSwingJInternalFrame grupoclienteBeanSwingJInternalFrame; public String sFinalQueryGeneral_grupocliente=""; protected VendedorBeanSwingJInternalFrame vendedorBeanSwingJInternalFrame; public String sFinalQueryGeneral_vendedor=""; public ProcesoFacturasProductosSessionBean procesofacturasproductosSessionBean; public CiudadSessionBean ciudadSessionBean; public ZonaSessionBean zonaSessionBean; public GrupoClienteSessionBean grupoclienteSessionBean; public VendedorSessionBean vendedorSessionBean; public ProcesoFacturasProductosLogic procesofacturasproductosLogic; public JScrollPane jScrollPanelDatosProcesoFacturasProductos; public JScrollPane jScrollPanelDatosEdicionProcesoFacturasProductos; public JScrollPane jScrollPanelDatosGeneralProcesoFacturasProductos; protected JPanel jPanelCamposProcesoFacturasProductos; protected JPanel jPanelCamposOcultosProcesoFacturasProductos; protected JPanel jPanelAccionesProcesoFacturasProductos; protected JPanel jPanelAccionesFormularioProcesoFacturasProductos; protected Integer iXPanelCamposProcesoFacturasProductos=0; protected Integer iYPanelCamposProcesoFacturasProductos=0; protected Integer iXPanelCamposOcultosProcesoFacturasProductos=0; protected Integer iYPanelCamposOcultosProcesoFacturasProductos=0; ; ; //ELEMENTOS TABLAS PARAMETOS //ELEMENTOS TABLAS PARAMETOS_FIN public JButton jButtonNuevoProcesoFacturasProductos; public JButton jButtonModificarProcesoFacturasProductos; public JButton jButtonActualizarProcesoFacturasProductos; public JButton jButtonEliminarProcesoFacturasProductos; public JButton jButtonCancelarProcesoFacturasProductos; public JButton jButtonGuardarCambiosProcesoFacturasProductos; public JButton jButtonGuardarCambiosTablaProcesoFacturasProductos; protected JButton jButtonCerrarProcesoFacturasProductos; protected JButton jButtonProcesarInformacionProcesoFacturasProductos; protected JCheckBox jCheckBoxPostAccionNuevoProcesoFacturasProductos; protected JCheckBox jCheckBoxPostAccionSinCerrarProcesoFacturasProductos; protected JCheckBox jCheckBoxPostAccionSinMensajeProcesoFacturasProductos; //TOOLBAR protected JButton jButtonNuevoToolBarProcesoFacturasProductos; protected JButton jButtonModificarToolBarProcesoFacturasProductos; protected JButton jButtonActualizarToolBarProcesoFacturasProductos; protected JButton jButtonEliminarToolBarProcesoFacturasProductos; protected JButton jButtonCancelarToolBarProcesoFacturasProductos; protected JButton jButtonGuardarCambiosToolBarProcesoFacturasProductos; protected JButton jButtonGuardarCambiosTablaToolBarProcesoFacturasProductos; protected JButton jButtonMostrarOcultarTablaToolBarProcesoFacturasProductos; protected JButton jButtonCerrarToolBarProcesoFacturasProductos; protected JButton jButtonProcesarInformacionToolBarProcesoFacturasProductos; //TOOLBAR //MENU protected JMenuItem jMenuItemNuevoProcesoFacturasProductos; protected JMenuItem jMenuItemModificarProcesoFacturasProductos; protected JMenuItem jMenuItemActualizarProcesoFacturasProductos; protected JMenuItem jMenuItemEliminarProcesoFacturasProductos; protected JMenuItem jMenuItemCancelarProcesoFacturasProductos; protected JMenuItem jMenuItemGuardarCambiosProcesoFacturasProductos; protected JMenuItem jMenuItemGuardarCambiosTablaProcesoFacturasProductos; protected JMenuItem jMenuItemCerrarProcesoFacturasProductos; protected JMenuItem jMenuItemDetalleCerrarProcesoFacturasProductos; protected JMenuItem jMenuItemDetalleMostarOcultarProcesoFacturasProductos; protected JMenuItem jMenuItemProcesarInformacionProcesoFacturasProductos; protected JMenuItem jMenuItemNuevoGuardarCambiosProcesoFacturasProductos; protected JMenuItem jMenuItemMostrarOcultarProcesoFacturasProductos; //MENU protected JLabel jLabelAccionesProcesoFacturasProductos; @SuppressWarnings("rawtypes") protected JComboBox jComboBoxTiposRelacionesProcesoFacturasProductos; @SuppressWarnings("rawtypes") protected JComboBox jComboBoxTiposAccionesProcesoFacturasProductos; @SuppressWarnings("rawtypes") public JComboBox jComboBoxTiposAccionesFormularioProcesoFacturasProductos; protected Boolean conMaximoRelaciones=true; protected Boolean conFuncionalidadRelaciones=true; public Boolean conCargarMinimo=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; public JPanel jPanelidProcesoFacturasProductos; public JLabel jLabelIdProcesoFacturasProductos; public JLabel jLabelidProcesoFacturasProductos; public JButton jButtonidProcesoFacturasProductosBusqueda= new JButtonMe(); public JPanel jPanelcodigoProcesoFacturasProductos; public JLabel jLabelcodigoProcesoFacturasProductos; public JTextField jTextFieldcodigoProcesoFacturasProductos; public JButton jButtoncodigoProcesoFacturasProductosBusqueda= new JButtonMe(); public JPanel jPanelnombre_completoProcesoFacturasProductos; public JLabel jLabelnombre_completoProcesoFacturasProductos; public JTextArea jTextAreanombre_completoProcesoFacturasProductos; public JScrollPane jscrollPanenombre_completoProcesoFacturasProductos; public JButton jButtonnombre_completoProcesoFacturasProductosBusqueda= new JButtonMe(); public JPanel jPanelnombre_provinciaProcesoFacturasProductos; public JLabel jLabelnombre_provinciaProcesoFacturasProductos; public JTextArea jTextAreanombre_provinciaProcesoFacturasProductos; public JScrollPane jscrollPanenombre_provinciaProcesoFacturasProductos; public JButton jButtonnombre_provinciaProcesoFacturasProductosBusqueda= new JButtonMe(); public JPanel jPanelnombre_ciudadProcesoFacturasProductos; public JLabel jLabelnombre_ciudadProcesoFacturasProductos; public JTextArea jTextAreanombre_ciudadProcesoFacturasProductos; public JScrollPane jscrollPanenombre_ciudadProcesoFacturasProductos; public JButton jButtonnombre_ciudadProcesoFacturasProductosBusqueda= new JButtonMe(); public JPanel jPanelnombre_zonaProcesoFacturasProductos; public JLabel jLabelnombre_zonaProcesoFacturasProductos; public JTextField jTextFieldnombre_zonaProcesoFacturasProductos; public JButton jButtonnombre_zonaProcesoFacturasProductosBusqueda= new JButtonMe(); public JPanel jPanelnombre_grupo_clienteProcesoFacturasProductos; public JLabel jLabelnombre_grupo_clienteProcesoFacturasProductos; public JTextArea jTextAreanombre_grupo_clienteProcesoFacturasProductos; public JScrollPane jscrollPanenombre_grupo_clienteProcesoFacturasProductos; public JButton jButtonnombre_grupo_clienteProcesoFacturasProductosBusqueda= new JButtonMe(); public JPanel jPanelcodigo_datoProcesoFacturasProductos; public JLabel jLabelcodigo_datoProcesoFacturasProductos; public JTextField jTextFieldcodigo_datoProcesoFacturasProductos; public JButton jButtoncodigo_datoProcesoFacturasProductosBusqueda= new JButtonMe(); public JPanel jPanelnombre_completo_datoProcesoFacturasProductos; public JLabel jLabelnombre_completo_datoProcesoFacturasProductos; public JTextArea jTextAreanombre_completo_datoProcesoFacturasProductos; public JScrollPane jscrollPanenombre_completo_datoProcesoFacturasProductos; public JButton jButtonnombre_completo_datoProcesoFacturasProductosBusqueda= new JButtonMe(); public JPanel jPanelnumero_pre_impreso_facturaProcesoFacturasProductos; public JLabel jLabelnumero_pre_impreso_facturaProcesoFacturasProductos; public JTextField jTextFieldnumero_pre_impreso_facturaProcesoFacturasProductos; public JButton jButtonnumero_pre_impreso_facturaProcesoFacturasProductosBusqueda= new JButtonMe(); public JPanel jPanelnombre_productoProcesoFacturasProductos; public JLabel jLabelnombre_productoProcesoFacturasProductos; public JTextArea jTextAreanombre_productoProcesoFacturasProductos; public JScrollPane jscrollPanenombre_productoProcesoFacturasProductos; public JButton jButtonnombre_productoProcesoFacturasProductosBusqueda= new JButtonMe(); public JPanel jPanelnombre_unidadProcesoFacturasProductos; public JLabel jLabelnombre_unidadProcesoFacturasProductos; public JTextField jTextFieldnombre_unidadProcesoFacturasProductos; public JButton jButtonnombre_unidadProcesoFacturasProductosBusqueda= new JButtonMe(); public JPanel jPanelprecioProcesoFacturasProductos; public JLabel jLabelprecioProcesoFacturasProductos; public JTextField jTextFieldprecioProcesoFacturasProductos; public JButton jButtonprecioProcesoFacturasProductosBusqueda= new JButtonMe(); public JPanel jPaneltareaProcesoFacturasProductos; public JLabel jLabeltareaProcesoFacturasProductos; public JTextArea jTextAreatareaProcesoFacturasProductos; public JScrollPane jscrollPanetareaProcesoFacturasProductos; public JButton jButtontareaProcesoFacturasProductosBusqueda= new JButtonMe(); public JPanel jPanelid_ciudadProcesoFacturasProductos; public JLabel jLabelid_ciudadProcesoFacturasProductos; @SuppressWarnings("rawtypes") public JComboBox jComboBoxid_ciudadProcesoFacturasProductos; public JButton jButtonid_ciudadProcesoFacturasProductos= new JButtonMe(); public JButton jButtonid_ciudadProcesoFacturasProductosUpdate= new JButtonMe(); public JButton jButtonid_ciudadProcesoFacturasProductosBusqueda= new JButtonMe(); public JPanel jPanelid_zonaProcesoFacturasProductos; public JLabel jLabelid_zonaProcesoFacturasProductos; @SuppressWarnings("rawtypes") public JComboBox jComboBoxid_zonaProcesoFacturasProductos; public JButton jButtonid_zonaProcesoFacturasProductos= new JButtonMe(); public JButton jButtonid_zonaProcesoFacturasProductosUpdate= new JButtonMe(); public JButton jButtonid_zonaProcesoFacturasProductosBusqueda= new JButtonMe(); public JPanel jPanelid_grupo_clienteProcesoFacturasProductos; public JLabel jLabelid_grupo_clienteProcesoFacturasProductos; @SuppressWarnings("rawtypes") public JComboBox jComboBoxid_grupo_clienteProcesoFacturasProductos; public JButton jButtonid_grupo_clienteProcesoFacturasProductos= new JButtonMe(); public JButton jButtonid_grupo_clienteProcesoFacturasProductosUpdate= new JButtonMe(); public JButton jButtonid_grupo_clienteProcesoFacturasProductosBusqueda= new JButtonMe(); public JPanel jPanelid_vendedorProcesoFacturasProductos; public JLabel jLabelid_vendedorProcesoFacturasProductos; @SuppressWarnings("rawtypes") public JComboBox jComboBoxid_vendedorProcesoFacturasProductos; public JButton jButtonid_vendedorProcesoFacturasProductos= new JButtonMe(); public JButton jButtonid_vendedorProcesoFacturasProductosUpdate= new JButtonMe(); public JButton jButtonid_vendedorProcesoFacturasProductosBusqueda= new JButtonMe(); //ELEMENTOS TABLAS PARAMETOS //ELEMENTOS TABLAS PARAMETOS_FIN protected JTabbedPane jTabbedPaneRelacionesProcesoFacturasProductos; 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=false; 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*1); public int iHeightScroll=0;//(screenSize.height-screenSize.height/Constantes.ISWING_RESTOPARTE_DIFERENCIA_ALTO); public int iWidthFormulario=750;//(screenSize.width-screenSize.width/2)+(250*1); public int iHeightFormulario=1034;//(screenSize.height-screenSize.height/Constantes.ISWING_RESTOPARTE_DIFERENCIA_ALTO); public int iHeightFormularioMaximo=0; public int iWidthFormularioMaximo=0; public int iWidthTableDefinicion=0; public double dStart = 0; public double dEnd = 0; public double dDif = 0; public SistemaParameterReturnGeneral sistemaReturnGeneral; public List<Opcion> opcionsRelacionadas=new ArrayList<Opcion>(); public ProcesoFacturasProductosDetalleFormJInternalFrame(String sTipo) throws Exception { super(PaginaTipo.FORMULARIO); try { if(sTipo.equals("MINIMO")) { /* this.jPanelCamposProcesoFacturasProductos=new JPanel(); this.jPanelAccionesFormularioProcesoFacturasProductos=new JPanel(); this.jmenuBarDetalleProcesoFacturasProductos=new JMenuBar(); this.jTtoolBarDetalleProcesoFacturasProductos=new JToolBar(); */ } } catch(Exception e) { FuncionesSwing.manageException(this, e, null); } } public ProcesoFacturasProductosDetalleFormJInternalFrame(PaginaTipo paginaTipo) throws Exception { super(paginaTipo); //super("ProcesoFacturasProductos No " + (++openFrameCount),true, /*resizable*/true, /*closable*/true, /*maximizable*/true);//iconifiable try { Boolean cargarRelaciones=false; this.initialize(null,false,false,cargarRelaciones,null,null,null,null,null,null,PaginaTipo.PRINCIPAL); } catch(Exception e) { FuncionesSwing.manageException(this, e, null); } } //ES AUXILIAR PARA WINDOWS FORMS public ProcesoFacturasProductosDetalleFormJInternalFrame() throws Exception { super(PaginaTipo.FORMULARIO); //super("ProcesoFacturasProductos No " + (++openFrameCount),true, /*resizable*/true, /*closable*/true, /*maximizable*/true);//iconifiable try { Boolean cargarRelaciones=false; this.initialize(null,false,false,cargarRelaciones,null,null,null,null,null,null,PaginaTipo.PRINCIPAL); } catch(Exception e) { FuncionesSwing.manageException(this, e, null); } } public ProcesoFacturasProductosDetalleFormJInternalFrame(Boolean cargarRelaciones,PaginaTipo paginaTipo) throws Exception { super(paginaTipo); //super("ProcesoFacturasProductos No " + (++openFrameCount),true, /*resizable*/true, /*closable*/true, /*maximizable*/true);//iconifiable try { this.initialize(null,false,false,cargarRelaciones,null,null,null,null,null,null,paginaTipo); } catch(Exception e) { FuncionesSwing.manageException(this, e, null); } } public ProcesoFacturasProductosDetalleFormJInternalFrame(Boolean conGuardarRelaciones,Boolean esGuardarRelacionado,Boolean cargarRelaciones,PaginaTipo paginaTipo) throws Exception { super(paginaTipo); //super("ProcesoFacturasProductos No " + (++openFrameCount),true, /*resizable*/true, /*closable*/true, /*maximizable*/true);//iconifiable try { this.initialize(null,conGuardarRelaciones,esGuardarRelacionado,cargarRelaciones,null,null,null,null,null,null,paginaTipo); } catch(Exception e) { FuncionesSwing.manageException(this, e, null); } } public ProcesoFacturasProductosDetalleFormJInternalFrame(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("ProcesoFacturasProductos 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(); } this.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 JButton getjButtonActualizarToolBarProcesoFacturasProductos() { return this.jButtonActualizarToolBarProcesoFacturasProductos; } public JButton getjButtonEliminarToolBarProcesoFacturasProductos() { return this.jButtonEliminarToolBarProcesoFacturasProductos; } public JButton getjButtonCancelarToolBarProcesoFacturasProductos() { return this.jButtonCancelarToolBarProcesoFacturasProductos; } public JButton getjButtonProcesarInformacionProcesoFacturasProductos() { return this.jButtonProcesarInformacionProcesoFacturasProductos; } public void setjButtonProcesarInformacion(JButton jButtonProcesarInformacionProcesoFacturasProductos) { this.jButtonProcesarInformacionProcesoFacturasProductos = jButtonProcesarInformacionProcesoFacturasProductos; } @SuppressWarnings("rawtypes") public JComboBox getjComboBoxTiposAccionesProcesoFacturasProductos() { return this.jComboBoxTiposAccionesProcesoFacturasProductos; } @SuppressWarnings("rawtypes") public void setjComboBoxTiposRelacionesProcesoFacturasProductos( JComboBox jComboBoxTiposRelacionesProcesoFacturasProductos) { this.jComboBoxTiposRelacionesProcesoFacturasProductos = jComboBoxTiposRelacionesProcesoFacturasProductos; } @SuppressWarnings("rawtypes") public void setjComboBoxTiposAccionesProcesoFacturasProductos( JComboBox jComboBoxTiposAccionesProcesoFacturasProductos) { this.jComboBoxTiposAccionesProcesoFacturasProductos = jComboBoxTiposAccionesProcesoFacturasProductos; } @SuppressWarnings("rawtypes") public JComboBox getjComboBoxTiposAccionesFormularioProcesoFacturasProductos() { return this.jComboBoxTiposAccionesFormularioProcesoFacturasProductos; } @SuppressWarnings("rawtypes") public void setjComboBoxTiposAccionesFormularioProcesoFacturasProductos( JComboBox jComboBoxTiposAccionesFormularioProcesoFacturasProductos) { this.jComboBoxTiposAccionesFormularioProcesoFacturasProductos = jComboBoxTiposAccionesFormularioProcesoFacturasProductos; } 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.procesofacturasproductosSessionBean=new ProcesoFacturasProductosSessionBean(); this.procesofacturasproductosSessionBean.setConGuardarRelaciones(conGuardarRelaciones); this.procesofacturasproductosSessionBean.setEsGuardarRelacionado(esGuardarRelacionado); this.conCargarMinimo=this.procesofacturasproductosSessionBean.getEsGuardarRelacionado(); this.conMostrarAccionesCampo=parametroGeneralUsuario.getcon_mostrar_acciones_campo_general() || opcionActual.getcon_mostrar_acciones_campo(); if(!this.conCargarMinimo) { } 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); ProcesoFacturasProductosJInternalFrame.STIPO_TAMANIO_GENERAL=this.sTipoTamanioGeneral; ProcesoFacturasProductosJInternalFrame.STIPO_TAMANIO_GENERAL_TABLA=this.sTipoTamanioGeneralTabla; ProcesoFacturasProductosJInternalFrame.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,"Proceso Facturas Productos MANTENIMIENTO")); if(iWidth > 1950) { iWidth=1950; } if(iHeight > 660) { iHeight=660; } 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.procesofacturasproductosSessionBean.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; } } } ProcesoFacturasProductosJInternalFrame.ESTA_CARGADO_PORPARTE=true; } public void inicializarToolBar() { this.jTtoolBarDetalleProcesoFacturasProductos= new JToolBar("MENU DATOS"); //TOOLBAR //PRINCIPAL this.jButtonProcesarInformacionToolBarProcesoFacturasProductos=new JButtonMe(); this.jButtonModificarToolBarProcesoFacturasProductos=new JButtonMe(); //PRINCIPAL //DETALLE this.jButtonActualizarToolBarProcesoFacturasProductos=FuncionesSwing.getButtonToolBarGeneral(this.jButtonActualizarToolBarProcesoFacturasProductos,this.jTtoolBarDetalleProcesoFacturasProductos, "actualizar","actualizar","Actualizar"+" "+ProcesoFacturasProductosConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("ACTUALIZAR"),"Actualizar",false); this.jButtonEliminarToolBarProcesoFacturasProductos=FuncionesSwing.getButtonToolBarGeneral(this.jButtonEliminarToolBarProcesoFacturasProductos,this.jTtoolBarDetalleProcesoFacturasProductos, "eliminar","eliminar","Eliminar"+" "+ProcesoFacturasProductosConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("ELIMINAR"),"Eliminar",false); this.jButtonCancelarToolBarProcesoFacturasProductos=FuncionesSwing.getButtonToolBarGeneral(this.jButtonCancelarToolBarProcesoFacturasProductos,this.jTtoolBarDetalleProcesoFacturasProductos, "cancelar","cancelar","Cancelar"+" "+ProcesoFacturasProductosConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("CANCELAR"),"Cancelar",false); this.jButtonGuardarCambiosToolBarProcesoFacturasProductos=FuncionesSwing.getButtonToolBarGeneral(this.jButtonGuardarCambiosToolBarProcesoFacturasProductos,this.jTtoolBarDetalleProcesoFacturasProductos, "guardarcambios","guardarcambios","Guardar"+" "+ProcesoFacturasProductosConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("GUARDAR_CAMBIOS"),"Guardar",false); FuncionesSwing.setBoldButtonToolBar(this.jButtonActualizarToolBarProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); FuncionesSwing.setBoldButtonToolBar(this.jButtonEliminarToolBarProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); FuncionesSwing.setBoldButtonToolBar(this.jButtonCancelarToolBarProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); } public void cargarMenus() { this.jmenuBarDetalleProcesoFacturasProductos=new JMenuBarMe(); //DETALLE this.jmenuDetalleProcesoFacturasProductos=new JMenuMe("Datos Relacionados"); this.jmenuDetalleArchivoProcesoFacturasProductos=new JMenuMe("Archivo"); this.jmenuDetalleAccionesProcesoFacturasProductos=new JMenuMe("Acciones"); this.jmenuDetalleDatosProcesoFacturasProductos=new JMenuMe("Datos"); //DETALLE_FIN this.jMenuItemNuevoProcesoFacturasProductos= new JMenuItem("Nuevo" + FuncionesSwing.getKeyMensaje("NUEVO")); this.jMenuItemNuevoProcesoFacturasProductos.setActionCommand("Nuevo"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemNuevoProcesoFacturasProductos,"nuevo_button","Nuevo"); FuncionesSwing.setBoldMenuItem(this.jMenuItemNuevoProcesoFacturasProductos, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemModificarProcesoFacturasProductos= new JMenuItem("Editar" + FuncionesSwing.getKeyMensaje("MODIFICAR")); this.jMenuItemModificarProcesoFacturasProductos.setActionCommand("Editar"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemModificarProcesoFacturasProductos,"modificar_button","Editar"); FuncionesSwing.setBoldMenuItem(this.jMenuItemModificarProcesoFacturasProductos, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemActualizarProcesoFacturasProductos= new JMenuItem("Actualizar" + FuncionesSwing.getKeyMensaje("ACTUALIZAR")); this.jMenuItemActualizarProcesoFacturasProductos.setActionCommand("Actualizar"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemActualizarProcesoFacturasProductos,"actualizar_button","Actualizar"); FuncionesSwing.setBoldMenuItem(this.jMenuItemActualizarProcesoFacturasProductos, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemEliminarProcesoFacturasProductos= new JMenuItem("Eliminar" + FuncionesSwing.getKeyMensaje("ELIMINAR")); this.jMenuItemEliminarProcesoFacturasProductos.setActionCommand("Eliminar"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemEliminarProcesoFacturasProductos,"eliminar_button","Eliminar"); FuncionesSwing.setBoldMenuItem(this.jMenuItemEliminarProcesoFacturasProductos, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemCancelarProcesoFacturasProductos= new JMenuItem("Cancelar" + FuncionesSwing.getKeyMensaje("CANCELAR")); this.jMenuItemCancelarProcesoFacturasProductos.setActionCommand("Cancelar"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemCancelarProcesoFacturasProductos,"cancelar_button","Cancelar"); FuncionesSwing.setBoldMenuItem(this.jMenuItemCancelarProcesoFacturasProductos, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemGuardarCambiosProcesoFacturasProductos= new JMenuItem("Guardar" + FuncionesSwing.getKeyMensaje("GUARDAR_CAMBIOS")); this.jMenuItemGuardarCambiosProcesoFacturasProductos.setActionCommand("Guardar"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemGuardarCambiosProcesoFacturasProductos,"guardarcambios_button","Guardar"); FuncionesSwing.setBoldMenuItem(this.jMenuItemGuardarCambiosProcesoFacturasProductos, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemCerrarProcesoFacturasProductos= new JMenuItem("Salir" + FuncionesSwing.getKeyMensaje("CERRAR")); this.jMenuItemCerrarProcesoFacturasProductos.setActionCommand("Cerrar"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemCerrarProcesoFacturasProductos,"cerrar_button","Salir"); FuncionesSwing.setBoldMenuItem(this.jMenuItemCerrarProcesoFacturasProductos, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemDetalleCerrarProcesoFacturasProductos= new JMenuItem("Salir" + FuncionesSwing.getKeyMensaje("CERRAR")); this.jMenuItemDetalleCerrarProcesoFacturasProductos.setActionCommand("Cerrar"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemDetalleCerrarProcesoFacturasProductos,"cerrar_button","Salir"); FuncionesSwing.setBoldMenuItem(this.jMenuItemDetalleCerrarProcesoFacturasProductos, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemMostrarOcultarProcesoFacturasProductos= new JMenuItem("Mostrar Ocultar" + FuncionesSwing.getKeyMensaje("MOSTRAR_OCULTAR")); this.jMenuItemMostrarOcultarProcesoFacturasProductos.setActionCommand("Mostrar Ocultar"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemMostrarOcultarProcesoFacturasProductos,"mostrar_ocultar_button","Mostrar Ocultar"); FuncionesSwing.setBoldMenuItem(this.jMenuItemMostrarOcultarProcesoFacturasProductos, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemDetalleMostarOcultarProcesoFacturasProductos= new JMenuItem("Mostrar Ocultar" + FuncionesSwing.getKeyMensaje("MOSTRAR_OCULTAR")); this.jMenuItemDetalleMostarOcultarProcesoFacturasProductos.setActionCommand("Mostrar Ocultar"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemDetalleMostarOcultarProcesoFacturasProductos,"mostrar_ocultar_button","Mostrar Ocultar"); FuncionesSwing.setBoldMenuItem(this.jMenuItemDetalleMostarOcultarProcesoFacturasProductos, STIPO_TAMANIO_GENERAL,false,true,this); //DETALLE this.jmenuDetalleArchivoProcesoFacturasProductos.add(this.jMenuItemDetalleCerrarProcesoFacturasProductos); this.jmenuDetalleAccionesProcesoFacturasProductos.add(this.jMenuItemActualizarProcesoFacturasProductos); this.jmenuDetalleAccionesProcesoFacturasProductos.add(this.jMenuItemEliminarProcesoFacturasProductos); this.jmenuDetalleAccionesProcesoFacturasProductos.add(this.jMenuItemCancelarProcesoFacturasProductos); //this.jmenuDetalleDatosProcesoFacturasProductos.add(this.jMenuItemDetalleAbrirOrderByProcesoFacturasProductos); this.jmenuDetalleDatosProcesoFacturasProductos.add(this.jMenuItemDetalleMostarOcultarProcesoFacturasProductos); //this.jmenuDetalleAccionesProcesoFacturasProductos.add(this.jMenuItemGuardarCambiosProcesoFacturasProductos); //DETALLE_FIN //RELACIONES //RELACIONES //DETALLE FuncionesSwing.setBoldMenu(this.jmenuDetalleArchivoProcesoFacturasProductos, STIPO_TAMANIO_GENERAL,false,true,this); FuncionesSwing.setBoldMenu(this.jmenuDetalleAccionesProcesoFacturasProductos, STIPO_TAMANIO_GENERAL,false,true,this); FuncionesSwing.setBoldMenu(this.jmenuDetalleDatosProcesoFacturasProductos, STIPO_TAMANIO_GENERAL,false,true,this); this.jmenuBarDetalleProcesoFacturasProductos.add(this.jmenuDetalleArchivoProcesoFacturasProductos); this.jmenuBarDetalleProcesoFacturasProductos.add(this.jmenuDetalleAccionesProcesoFacturasProductos); this.jmenuBarDetalleProcesoFacturasProductos.add(this.jmenuDetalleDatosProcesoFacturasProductos); //DETALLE_FIN //AGREGA MENU DETALLE A PANTALLA this.setJMenuBar(this.jmenuBarDetalleProcesoFacturasProductos); } public void inicializarElementosCamposProcesoFacturasProductos() { String sKeyStrokeName=""; KeyStroke keyStrokeControl=null; jLabelIdProcesoFacturasProductos = new JLabelMe(); jLabelIdProcesoFacturasProductos.setText(""+Constantes2.S_CODIGO_UNICO+""); jLabelIdProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); jLabelIdProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); jLabelIdProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); FuncionesSwing.setBoldLabel(jLabelIdProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); this.jPanelidProcesoFacturasProductos = new JPanelMe("fondo_formulario",true);//new JPanel(); this.jPanelidProcesoFacturasProductos.setToolTipText(ProcesoFacturasProductosConstantesFunciones.LABEL_ID); this.gridaBagLayoutProcesoFacturasProductos= new GridBagLayout(); this.jPanelidProcesoFacturasProductos.setLayout(this.gridaBagLayoutProcesoFacturasProductos); jLabelidProcesoFacturasProductos = new JLabel(); jLabelidProcesoFacturasProductos.setText("Id"); jLabelidProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); jLabelidProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); jLabelidProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelcodigoProcesoFacturasProductos = new JLabelMe(); this.jLabelcodigoProcesoFacturasProductos.setText(""+ProcesoFacturasProductosConstantesFunciones.LABEL_CODIGO+" : *"); this.jLabelcodigoProcesoFacturasProductos.setToolTipText("Codigo"); this.jLabelcodigoProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); this.jLabelcodigoProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); this.jLabelcodigoProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); FuncionesSwing.setBoldLabel(jLabelcodigoProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); this.jPanelcodigoProcesoFacturasProductos=new JPanelMe("fondo_formulario",true);//new JPanel(); this.jPanelcodigoProcesoFacturasProductos.setToolTipText(ProcesoFacturasProductosConstantesFunciones.LABEL_CODIGO); this.gridaBagLayoutProcesoFacturasProductos = new GridBagLayout(); this.jPanelcodigoProcesoFacturasProductos.setLayout(this.gridaBagLayoutProcesoFacturasProductos); jTextFieldcodigoProcesoFacturasProductos= new JTextFieldMe(); jTextFieldcodigoProcesoFacturasProductos.setEnabled(false); jTextFieldcodigoProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jTextFieldcodigoProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jTextFieldcodigoProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); FuncionesSwing.setBoldTextField(jTextFieldcodigoProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); this.jButtoncodigoProcesoFacturasProductosBusqueda= new JButtonMe(); this.jButtoncodigoProcesoFacturasProductosBusqueda.setMinimumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtoncodigoProcesoFacturasProductosBusqueda.setMaximumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtoncodigoProcesoFacturasProductosBusqueda.setPreferredSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); //this.jButtoncodigoProcesoFacturasProductosBusqueda.setText("U"); this.jButtoncodigoProcesoFacturasProductosBusqueda.setToolTipText("BUSCAR DATOS ("+FuncionesSwing.getKeyNameControl("CONTROL_BUSCAR")+")"); this.jButtoncodigoProcesoFacturasProductosBusqueda.setFocusable(false); FuncionesSwing.addImagenButtonGeneral(this.jButtoncodigoProcesoFacturasProductosBusqueda,"buscardatos","BUSCAR DATOS"); sKeyStrokeName = FuncionesSwing.getKeyNameControl("CONTROL_BUSCAR"); keyStrokeControl=FuncionesSwing.getKeyStrokeControl( "CONTROL_BUSCAR"); jTextFieldcodigoProcesoFacturasProductos.getInputMap().put(keyStrokeControl, sKeyStrokeName); jTextFieldcodigoProcesoFacturasProductos.getActionMap().put(sKeyStrokeName, new ButtonAbstractAction(this,"codigoProcesoFacturasProductosBusqueda")); if(this.procesofacturasproductosSessionBean.getEsGuardarRelacionado() || paginaTipo.equals(PaginaTipo.SECUNDARIO)) { this.jButtoncodigoProcesoFacturasProductosBusqueda.setVisible(false); } this.jLabelnombre_completoProcesoFacturasProductos = new JLabelMe(); this.jLabelnombre_completoProcesoFacturasProductos.setText(""+ProcesoFacturasProductosConstantesFunciones.LABEL_NOMBRECOMPLETO+" : *"); this.jLabelnombre_completoProcesoFacturasProductos.setToolTipText("Nombre Completo"); this.jLabelnombre_completoProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL2,0))); this.jLabelnombre_completoProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL2,0))); this.jLabelnombre_completoProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL2,0))); FuncionesSwing.setBoldLabel(jLabelnombre_completoProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); this.jPanelnombre_completoProcesoFacturasProductos=new JPanelMe("fondo_formulario",true);//new JPanel(); this.jPanelnombre_completoProcesoFacturasProductos.setToolTipText(ProcesoFacturasProductosConstantesFunciones.LABEL_NOMBRECOMPLETO); this.gridaBagLayoutProcesoFacturasProductos = new GridBagLayout(); this.jPanelnombre_completoProcesoFacturasProductos.setLayout(this.gridaBagLayoutProcesoFacturasProductos); jTextAreanombre_completoProcesoFacturasProductos= new JTextAreaMe(); jTextAreanombre_completoProcesoFacturasProductos.setEnabled(false); jTextAreanombre_completoProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jTextAreanombre_completoProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jTextAreanombre_completoProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jTextAreanombre_completoProcesoFacturasProductos.setLineWrap(true); jTextAreanombre_completoProcesoFacturasProductos.setWrapStyleWord(true); jTextAreanombre_completoProcesoFacturasProductos.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); jTextAreanombre_completoProcesoFacturasProductos.setRows(5); FuncionesSwing.setBoldTextArea(jTextAreanombre_completoProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); jscrollPanenombre_completoProcesoFacturasProductos = new JScrollPane(jTextAreanombre_completoProcesoFacturasProductos); jscrollPanenombre_completoProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),70)); jscrollPanenombre_completoProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),70)); jscrollPanenombre_completoProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),70)); this.jButtonnombre_completoProcesoFacturasProductosBusqueda= new JButtonMe(); this.jButtonnombre_completoProcesoFacturasProductosBusqueda.setMinimumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonnombre_completoProcesoFacturasProductosBusqueda.setMaximumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonnombre_completoProcesoFacturasProductosBusqueda.setPreferredSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); //this.jButtonnombre_completoProcesoFacturasProductosBusqueda.setText("U"); this.jButtonnombre_completoProcesoFacturasProductosBusqueda.setToolTipText("BUSCAR DATOS ("+FuncionesSwing.getKeyNameControl("CONTROL_BUSCAR")+")"); this.jButtonnombre_completoProcesoFacturasProductosBusqueda.setFocusable(false); FuncionesSwing.addImagenButtonGeneral(this.jButtonnombre_completoProcesoFacturasProductosBusqueda,"buscardatos","BUSCAR DATOS"); sKeyStrokeName = FuncionesSwing.getKeyNameControl("CONTROL_BUSCAR"); keyStrokeControl=FuncionesSwing.getKeyStrokeControl( "CONTROL_BUSCAR"); jTextAreanombre_completoProcesoFacturasProductos.getInputMap().put(keyStrokeControl, sKeyStrokeName); jTextAreanombre_completoProcesoFacturasProductos.getActionMap().put(sKeyStrokeName, new ButtonAbstractAction(this,"nombre_completoProcesoFacturasProductosBusqueda")); if(this.procesofacturasproductosSessionBean.getEsGuardarRelacionado() || paginaTipo.equals(PaginaTipo.SECUNDARIO)) { this.jButtonnombre_completoProcesoFacturasProductosBusqueda.setVisible(false); } this.jLabelnombre_provinciaProcesoFacturasProductos = new JLabelMe(); this.jLabelnombre_provinciaProcesoFacturasProductos.setText(""+ProcesoFacturasProductosConstantesFunciones.LABEL_NOMBREPROVINCIA+" : *"); this.jLabelnombre_provinciaProcesoFacturasProductos.setToolTipText("Nombre Provincia"); this.jLabelnombre_provinciaProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL2,0))); this.jLabelnombre_provinciaProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL2,0))); this.jLabelnombre_provinciaProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL2,0))); FuncionesSwing.setBoldLabel(jLabelnombre_provinciaProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); this.jPanelnombre_provinciaProcesoFacturasProductos=new JPanelMe("fondo_formulario",true);//new JPanel(); this.jPanelnombre_provinciaProcesoFacturasProductos.setToolTipText(ProcesoFacturasProductosConstantesFunciones.LABEL_NOMBREPROVINCIA); this.gridaBagLayoutProcesoFacturasProductos = new GridBagLayout(); this.jPanelnombre_provinciaProcesoFacturasProductos.setLayout(this.gridaBagLayoutProcesoFacturasProductos); jTextAreanombre_provinciaProcesoFacturasProductos= new JTextAreaMe(); jTextAreanombre_provinciaProcesoFacturasProductos.setEnabled(false); jTextAreanombre_provinciaProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jTextAreanombre_provinciaProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jTextAreanombre_provinciaProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jTextAreanombre_provinciaProcesoFacturasProductos.setLineWrap(true); jTextAreanombre_provinciaProcesoFacturasProductos.setWrapStyleWord(true); jTextAreanombre_provinciaProcesoFacturasProductos.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); jTextAreanombre_provinciaProcesoFacturasProductos.setRows(8); FuncionesSwing.setBoldTextArea(jTextAreanombre_provinciaProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); jscrollPanenombre_provinciaProcesoFacturasProductos = new JScrollPane(jTextAreanombre_provinciaProcesoFacturasProductos); jscrollPanenombre_provinciaProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),70 + FuncionesSwing.getValorProporcion(70,0))); jscrollPanenombre_provinciaProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),70 + FuncionesSwing.getValorProporcion(70,0))); jscrollPanenombre_provinciaProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),70 + FuncionesSwing.getValorProporcion(70,0))); this.jButtonnombre_provinciaProcesoFacturasProductosBusqueda= new JButtonMe(); this.jButtonnombre_provinciaProcesoFacturasProductosBusqueda.setMinimumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonnombre_provinciaProcesoFacturasProductosBusqueda.setMaximumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonnombre_provinciaProcesoFacturasProductosBusqueda.setPreferredSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); //this.jButtonnombre_provinciaProcesoFacturasProductosBusqueda.setText("U"); this.jButtonnombre_provinciaProcesoFacturasProductosBusqueda.setToolTipText("BUSCAR DATOS ("+FuncionesSwing.getKeyNameControl("CONTROL_BUSCAR")+")"); this.jButtonnombre_provinciaProcesoFacturasProductosBusqueda.setFocusable(false); FuncionesSwing.addImagenButtonGeneral(this.jButtonnombre_provinciaProcesoFacturasProductosBusqueda,"buscardatos","BUSCAR DATOS"); sKeyStrokeName = FuncionesSwing.getKeyNameControl("CONTROL_BUSCAR"); keyStrokeControl=FuncionesSwing.getKeyStrokeControl( "CONTROL_BUSCAR"); jTextAreanombre_provinciaProcesoFacturasProductos.getInputMap().put(keyStrokeControl, sKeyStrokeName); jTextAreanombre_provinciaProcesoFacturasProductos.getActionMap().put(sKeyStrokeName, new ButtonAbstractAction(this,"nombre_provinciaProcesoFacturasProductosBusqueda")); if(this.procesofacturasproductosSessionBean.getEsGuardarRelacionado() || paginaTipo.equals(PaginaTipo.SECUNDARIO)) { this.jButtonnombre_provinciaProcesoFacturasProductosBusqueda.setVisible(false); } this.jLabelnombre_ciudadProcesoFacturasProductos = new JLabelMe(); this.jLabelnombre_ciudadProcesoFacturasProductos.setText(""+ProcesoFacturasProductosConstantesFunciones.LABEL_NOMBRECIUDAD+" : *"); this.jLabelnombre_ciudadProcesoFacturasProductos.setToolTipText("Nombre Ciudad"); this.jLabelnombre_ciudadProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); this.jLabelnombre_ciudadProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); this.jLabelnombre_ciudadProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); FuncionesSwing.setBoldLabel(jLabelnombre_ciudadProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); this.jPanelnombre_ciudadProcesoFacturasProductos=new JPanelMe("fondo_formulario",true);//new JPanel(); this.jPanelnombre_ciudadProcesoFacturasProductos.setToolTipText(ProcesoFacturasProductosConstantesFunciones.LABEL_NOMBRECIUDAD); this.gridaBagLayoutProcesoFacturasProductos = new GridBagLayout(); this.jPanelnombre_ciudadProcesoFacturasProductos.setLayout(this.gridaBagLayoutProcesoFacturasProductos); jTextAreanombre_ciudadProcesoFacturasProductos= new JTextAreaMe(); jTextAreanombre_ciudadProcesoFacturasProductos.setEnabled(false); jTextAreanombre_ciudadProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jTextAreanombre_ciudadProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jTextAreanombre_ciudadProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jTextAreanombre_ciudadProcesoFacturasProductos.setLineWrap(true); jTextAreanombre_ciudadProcesoFacturasProductos.setWrapStyleWord(true); jTextAreanombre_ciudadProcesoFacturasProductos.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); jTextAreanombre_ciudadProcesoFacturasProductos.setRows(8); FuncionesSwing.setBoldTextArea(jTextAreanombre_ciudadProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); jscrollPanenombre_ciudadProcesoFacturasProductos = new JScrollPane(jTextAreanombre_ciudadProcesoFacturasProductos); jscrollPanenombre_ciudadProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),70 + FuncionesSwing.getValorProporcion(70,0))); jscrollPanenombre_ciudadProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),70 + FuncionesSwing.getValorProporcion(70,0))); jscrollPanenombre_ciudadProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),70 + FuncionesSwing.getValorProporcion(70,0))); this.jButtonnombre_ciudadProcesoFacturasProductosBusqueda= new JButtonMe(); this.jButtonnombre_ciudadProcesoFacturasProductosBusqueda.setMinimumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonnombre_ciudadProcesoFacturasProductosBusqueda.setMaximumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonnombre_ciudadProcesoFacturasProductosBusqueda.setPreferredSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); //this.jButtonnombre_ciudadProcesoFacturasProductosBusqueda.setText("U"); this.jButtonnombre_ciudadProcesoFacturasProductosBusqueda.setToolTipText("BUSCAR DATOS ("+FuncionesSwing.getKeyNameControl("CONTROL_BUSCAR")+")"); this.jButtonnombre_ciudadProcesoFacturasProductosBusqueda.setFocusable(false); FuncionesSwing.addImagenButtonGeneral(this.jButtonnombre_ciudadProcesoFacturasProductosBusqueda,"buscardatos","BUSCAR DATOS"); sKeyStrokeName = FuncionesSwing.getKeyNameControl("CONTROL_BUSCAR"); keyStrokeControl=FuncionesSwing.getKeyStrokeControl( "CONTROL_BUSCAR"); jTextAreanombre_ciudadProcesoFacturasProductos.getInputMap().put(keyStrokeControl, sKeyStrokeName); jTextAreanombre_ciudadProcesoFacturasProductos.getActionMap().put(sKeyStrokeName, new ButtonAbstractAction(this,"nombre_ciudadProcesoFacturasProductosBusqueda")); if(this.procesofacturasproductosSessionBean.getEsGuardarRelacionado() || paginaTipo.equals(PaginaTipo.SECUNDARIO)) { this.jButtonnombre_ciudadProcesoFacturasProductosBusqueda.setVisible(false); } this.jLabelnombre_zonaProcesoFacturasProductos = new JLabelMe(); this.jLabelnombre_zonaProcesoFacturasProductos.setText(""+ProcesoFacturasProductosConstantesFunciones.LABEL_NOMBREZONA+" : *"); this.jLabelnombre_zonaProcesoFacturasProductos.setToolTipText("Nombre Zona"); this.jLabelnombre_zonaProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); this.jLabelnombre_zonaProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); this.jLabelnombre_zonaProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); FuncionesSwing.setBoldLabel(jLabelnombre_zonaProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); this.jPanelnombre_zonaProcesoFacturasProductos=new JPanelMe("fondo_formulario",true);//new JPanel(); this.jPanelnombre_zonaProcesoFacturasProductos.setToolTipText(ProcesoFacturasProductosConstantesFunciones.LABEL_NOMBREZONA); this.gridaBagLayoutProcesoFacturasProductos = new GridBagLayout(); this.jPanelnombre_zonaProcesoFacturasProductos.setLayout(this.gridaBagLayoutProcesoFacturasProductos); jTextFieldnombre_zonaProcesoFacturasProductos= new JTextFieldMe(); jTextFieldnombre_zonaProcesoFacturasProductos.setEnabled(false); jTextFieldnombre_zonaProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jTextFieldnombre_zonaProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jTextFieldnombre_zonaProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); FuncionesSwing.setBoldTextField(jTextFieldnombre_zonaProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); this.jButtonnombre_zonaProcesoFacturasProductosBusqueda= new JButtonMe(); this.jButtonnombre_zonaProcesoFacturasProductosBusqueda.setMinimumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonnombre_zonaProcesoFacturasProductosBusqueda.setMaximumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonnombre_zonaProcesoFacturasProductosBusqueda.setPreferredSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); //this.jButtonnombre_zonaProcesoFacturasProductosBusqueda.setText("U"); this.jButtonnombre_zonaProcesoFacturasProductosBusqueda.setToolTipText("BUSCAR DATOS ("+FuncionesSwing.getKeyNameControl("CONTROL_BUSCAR")+")"); this.jButtonnombre_zonaProcesoFacturasProductosBusqueda.setFocusable(false); FuncionesSwing.addImagenButtonGeneral(this.jButtonnombre_zonaProcesoFacturasProductosBusqueda,"buscardatos","BUSCAR DATOS"); sKeyStrokeName = FuncionesSwing.getKeyNameControl("CONTROL_BUSCAR"); keyStrokeControl=FuncionesSwing.getKeyStrokeControl( "CONTROL_BUSCAR"); jTextFieldnombre_zonaProcesoFacturasProductos.getInputMap().put(keyStrokeControl, sKeyStrokeName); jTextFieldnombre_zonaProcesoFacturasProductos.getActionMap().put(sKeyStrokeName, new ButtonAbstractAction(this,"nombre_zonaProcesoFacturasProductosBusqueda")); if(this.procesofacturasproductosSessionBean.getEsGuardarRelacionado() || paginaTipo.equals(PaginaTipo.SECUNDARIO)) { this.jButtonnombre_zonaProcesoFacturasProductosBusqueda.setVisible(false); } this.jLabelnombre_grupo_clienteProcesoFacturasProductos = new JLabelMe(); this.jLabelnombre_grupo_clienteProcesoFacturasProductos.setText(""+ProcesoFacturasProductosConstantesFunciones.LABEL_NOMBREGRUPOCLIENTE+" : *"); this.jLabelnombre_grupo_clienteProcesoFacturasProductos.setToolTipText("Nombre Grupo Cliente"); this.jLabelnombre_grupo_clienteProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL2*2 + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL2*2,0))); this.jLabelnombre_grupo_clienteProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL2*2 + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL2*2,0))); this.jLabelnombre_grupo_clienteProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL2*2 + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL2*2,0))); FuncionesSwing.setBoldLabel(jLabelnombre_grupo_clienteProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); this.jPanelnombre_grupo_clienteProcesoFacturasProductos=new JPanelMe("fondo_formulario",true);//new JPanel(); this.jPanelnombre_grupo_clienteProcesoFacturasProductos.setToolTipText(ProcesoFacturasProductosConstantesFunciones.LABEL_NOMBREGRUPOCLIENTE); this.gridaBagLayoutProcesoFacturasProductos = new GridBagLayout(); this.jPanelnombre_grupo_clienteProcesoFacturasProductos.setLayout(this.gridaBagLayoutProcesoFacturasProductos); jTextAreanombre_grupo_clienteProcesoFacturasProductos= new JTextAreaMe(); jTextAreanombre_grupo_clienteProcesoFacturasProductos.setEnabled(false); jTextAreanombre_grupo_clienteProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jTextAreanombre_grupo_clienteProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jTextAreanombre_grupo_clienteProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jTextAreanombre_grupo_clienteProcesoFacturasProductos.setLineWrap(true); jTextAreanombre_grupo_clienteProcesoFacturasProductos.setWrapStyleWord(true); jTextAreanombre_grupo_clienteProcesoFacturasProductos.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); jTextAreanombre_grupo_clienteProcesoFacturasProductos.setRows(5); FuncionesSwing.setBoldTextArea(jTextAreanombre_grupo_clienteProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); jscrollPanenombre_grupo_clienteProcesoFacturasProductos = new JScrollPane(jTextAreanombre_grupo_clienteProcesoFacturasProductos); jscrollPanenombre_grupo_clienteProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),70)); jscrollPanenombre_grupo_clienteProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),70)); jscrollPanenombre_grupo_clienteProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),70)); this.jButtonnombre_grupo_clienteProcesoFacturasProductosBusqueda= new JButtonMe(); this.jButtonnombre_grupo_clienteProcesoFacturasProductosBusqueda.setMinimumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonnombre_grupo_clienteProcesoFacturasProductosBusqueda.setMaximumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonnombre_grupo_clienteProcesoFacturasProductosBusqueda.setPreferredSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); //this.jButtonnombre_grupo_clienteProcesoFacturasProductosBusqueda.setText("U"); this.jButtonnombre_grupo_clienteProcesoFacturasProductosBusqueda.setToolTipText("BUSCAR DATOS ("+FuncionesSwing.getKeyNameControl("CONTROL_BUSCAR")+")"); this.jButtonnombre_grupo_clienteProcesoFacturasProductosBusqueda.setFocusable(false); FuncionesSwing.addImagenButtonGeneral(this.jButtonnombre_grupo_clienteProcesoFacturasProductosBusqueda,"buscardatos","BUSCAR DATOS"); sKeyStrokeName = FuncionesSwing.getKeyNameControl("CONTROL_BUSCAR"); keyStrokeControl=FuncionesSwing.getKeyStrokeControl( "CONTROL_BUSCAR"); jTextAreanombre_grupo_clienteProcesoFacturasProductos.getInputMap().put(keyStrokeControl, sKeyStrokeName); jTextAreanombre_grupo_clienteProcesoFacturasProductos.getActionMap().put(sKeyStrokeName, new ButtonAbstractAction(this,"nombre_grupo_clienteProcesoFacturasProductosBusqueda")); if(this.procesofacturasproductosSessionBean.getEsGuardarRelacionado() || paginaTipo.equals(PaginaTipo.SECUNDARIO)) { this.jButtonnombre_grupo_clienteProcesoFacturasProductosBusqueda.setVisible(false); } this.jLabelcodigo_datoProcesoFacturasProductos = new JLabelMe(); this.jLabelcodigo_datoProcesoFacturasProductos.setText(""+ProcesoFacturasProductosConstantesFunciones.LABEL_CODIGODATO+" : *"); this.jLabelcodigo_datoProcesoFacturasProductos.setToolTipText("Codigo Dato"); this.jLabelcodigo_datoProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); this.jLabelcodigo_datoProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); this.jLabelcodigo_datoProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); FuncionesSwing.setBoldLabel(jLabelcodigo_datoProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); this.jPanelcodigo_datoProcesoFacturasProductos=new JPanelMe("fondo_formulario",true);//new JPanel(); this.jPanelcodigo_datoProcesoFacturasProductos.setToolTipText(ProcesoFacturasProductosConstantesFunciones.LABEL_CODIGODATO); this.gridaBagLayoutProcesoFacturasProductos = new GridBagLayout(); this.jPanelcodigo_datoProcesoFacturasProductos.setLayout(this.gridaBagLayoutProcesoFacturasProductos); jTextFieldcodigo_datoProcesoFacturasProductos= new JTextFieldMe(); jTextFieldcodigo_datoProcesoFacturasProductos.setEnabled(false); jTextFieldcodigo_datoProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jTextFieldcodigo_datoProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jTextFieldcodigo_datoProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); FuncionesSwing.setBoldTextField(jTextFieldcodigo_datoProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); this.jButtoncodigo_datoProcesoFacturasProductosBusqueda= new JButtonMe(); this.jButtoncodigo_datoProcesoFacturasProductosBusqueda.setMinimumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtoncodigo_datoProcesoFacturasProductosBusqueda.setMaximumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtoncodigo_datoProcesoFacturasProductosBusqueda.setPreferredSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); //this.jButtoncodigo_datoProcesoFacturasProductosBusqueda.setText("U"); this.jButtoncodigo_datoProcesoFacturasProductosBusqueda.setToolTipText("BUSCAR DATOS ("+FuncionesSwing.getKeyNameControl("CONTROL_BUSCAR")+")"); this.jButtoncodigo_datoProcesoFacturasProductosBusqueda.setFocusable(false); FuncionesSwing.addImagenButtonGeneral(this.jButtoncodigo_datoProcesoFacturasProductosBusqueda,"buscardatos","BUSCAR DATOS"); sKeyStrokeName = FuncionesSwing.getKeyNameControl("CONTROL_BUSCAR"); keyStrokeControl=FuncionesSwing.getKeyStrokeControl( "CONTROL_BUSCAR"); jTextFieldcodigo_datoProcesoFacturasProductos.getInputMap().put(keyStrokeControl, sKeyStrokeName); jTextFieldcodigo_datoProcesoFacturasProductos.getActionMap().put(sKeyStrokeName, new ButtonAbstractAction(this,"codigo_datoProcesoFacturasProductosBusqueda")); if(this.procesofacturasproductosSessionBean.getEsGuardarRelacionado() || paginaTipo.equals(PaginaTipo.SECUNDARIO)) { this.jButtoncodigo_datoProcesoFacturasProductosBusqueda.setVisible(false); } this.jLabelnombre_completo_datoProcesoFacturasProductos = new JLabelMe(); this.jLabelnombre_completo_datoProcesoFacturasProductos.setText(""+ProcesoFacturasProductosConstantesFunciones.LABEL_NOMBRECOMPLETODATO+" : *"); this.jLabelnombre_completo_datoProcesoFacturasProductos.setToolTipText("Nombre Completo Dato"); this.jLabelnombre_completo_datoProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL2*2 + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL2*2,0))); this.jLabelnombre_completo_datoProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL2*2 + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL2*2,0))); this.jLabelnombre_completo_datoProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL2*2 + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL2*2,0))); FuncionesSwing.setBoldLabel(jLabelnombre_completo_datoProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); this.jPanelnombre_completo_datoProcesoFacturasProductos=new JPanelMe("fondo_formulario",true);//new JPanel(); this.jPanelnombre_completo_datoProcesoFacturasProductos.setToolTipText(ProcesoFacturasProductosConstantesFunciones.LABEL_NOMBRECOMPLETODATO); this.gridaBagLayoutProcesoFacturasProductos = new GridBagLayout(); this.jPanelnombre_completo_datoProcesoFacturasProductos.setLayout(this.gridaBagLayoutProcesoFacturasProductos); jTextAreanombre_completo_datoProcesoFacturasProductos= new JTextAreaMe(); jTextAreanombre_completo_datoProcesoFacturasProductos.setEnabled(false); jTextAreanombre_completo_datoProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jTextAreanombre_completo_datoProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jTextAreanombre_completo_datoProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jTextAreanombre_completo_datoProcesoFacturasProductos.setLineWrap(true); jTextAreanombre_completo_datoProcesoFacturasProductos.setWrapStyleWord(true); jTextAreanombre_completo_datoProcesoFacturasProductos.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); jTextAreanombre_completo_datoProcesoFacturasProductos.setRows(5); FuncionesSwing.setBoldTextArea(jTextAreanombre_completo_datoProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); jscrollPanenombre_completo_datoProcesoFacturasProductos = new JScrollPane(jTextAreanombre_completo_datoProcesoFacturasProductos); jscrollPanenombre_completo_datoProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),70)); jscrollPanenombre_completo_datoProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),70)); jscrollPanenombre_completo_datoProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),70)); this.jButtonnombre_completo_datoProcesoFacturasProductosBusqueda= new JButtonMe(); this.jButtonnombre_completo_datoProcesoFacturasProductosBusqueda.setMinimumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonnombre_completo_datoProcesoFacturasProductosBusqueda.setMaximumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonnombre_completo_datoProcesoFacturasProductosBusqueda.setPreferredSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); //this.jButtonnombre_completo_datoProcesoFacturasProductosBusqueda.setText("U"); this.jButtonnombre_completo_datoProcesoFacturasProductosBusqueda.setToolTipText("BUSCAR DATOS ("+FuncionesSwing.getKeyNameControl("CONTROL_BUSCAR")+")"); this.jButtonnombre_completo_datoProcesoFacturasProductosBusqueda.setFocusable(false); FuncionesSwing.addImagenButtonGeneral(this.jButtonnombre_completo_datoProcesoFacturasProductosBusqueda,"buscardatos","BUSCAR DATOS"); sKeyStrokeName = FuncionesSwing.getKeyNameControl("CONTROL_BUSCAR"); keyStrokeControl=FuncionesSwing.getKeyStrokeControl( "CONTROL_BUSCAR"); jTextAreanombre_completo_datoProcesoFacturasProductos.getInputMap().put(keyStrokeControl, sKeyStrokeName); jTextAreanombre_completo_datoProcesoFacturasProductos.getActionMap().put(sKeyStrokeName, new ButtonAbstractAction(this,"nombre_completo_datoProcesoFacturasProductosBusqueda")); if(this.procesofacturasproductosSessionBean.getEsGuardarRelacionado() || paginaTipo.equals(PaginaTipo.SECUNDARIO)) { this.jButtonnombre_completo_datoProcesoFacturasProductosBusqueda.setVisible(false); } this.jLabelnumero_pre_impreso_facturaProcesoFacturasProductos = new JLabelMe(); this.jLabelnumero_pre_impreso_facturaProcesoFacturasProductos.setText(""+ProcesoFacturasProductosConstantesFunciones.LABEL_NUMEROPREIMPRESOFACTURA+" : *"); this.jLabelnumero_pre_impreso_facturaProcesoFacturasProductos.setToolTipText("Numero Pre Impreso Factura"); this.jLabelnumero_pre_impreso_facturaProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL2*2 + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL2*2,0))); this.jLabelnumero_pre_impreso_facturaProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL2*2 + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL2*2,0))); this.jLabelnumero_pre_impreso_facturaProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL2*2 + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL2*2,0))); FuncionesSwing.setBoldLabel(jLabelnumero_pre_impreso_facturaProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); this.jPanelnumero_pre_impreso_facturaProcesoFacturasProductos=new JPanelMe("fondo_formulario",true);//new JPanel(); this.jPanelnumero_pre_impreso_facturaProcesoFacturasProductos.setToolTipText(ProcesoFacturasProductosConstantesFunciones.LABEL_NUMEROPREIMPRESOFACTURA); this.gridaBagLayoutProcesoFacturasProductos = new GridBagLayout(); this.jPanelnumero_pre_impreso_facturaProcesoFacturasProductos.setLayout(this.gridaBagLayoutProcesoFacturasProductos); jTextFieldnumero_pre_impreso_facturaProcesoFacturasProductos= new JTextFieldMe(); jTextFieldnumero_pre_impreso_facturaProcesoFacturasProductos.setEnabled(false); jTextFieldnumero_pre_impreso_facturaProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jTextFieldnumero_pre_impreso_facturaProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jTextFieldnumero_pre_impreso_facturaProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); FuncionesSwing.setBoldTextField(jTextFieldnumero_pre_impreso_facturaProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); this.jButtonnumero_pre_impreso_facturaProcesoFacturasProductosBusqueda= new JButtonMe(); this.jButtonnumero_pre_impreso_facturaProcesoFacturasProductosBusqueda.setMinimumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonnumero_pre_impreso_facturaProcesoFacturasProductosBusqueda.setMaximumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonnumero_pre_impreso_facturaProcesoFacturasProductosBusqueda.setPreferredSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); //this.jButtonnumero_pre_impreso_facturaProcesoFacturasProductosBusqueda.setText("U"); this.jButtonnumero_pre_impreso_facturaProcesoFacturasProductosBusqueda.setToolTipText("BUSCAR DATOS ("+FuncionesSwing.getKeyNameControl("CONTROL_BUSCAR")+")"); this.jButtonnumero_pre_impreso_facturaProcesoFacturasProductosBusqueda.setFocusable(false); FuncionesSwing.addImagenButtonGeneral(this.jButtonnumero_pre_impreso_facturaProcesoFacturasProductosBusqueda,"buscardatos","BUSCAR DATOS"); sKeyStrokeName = FuncionesSwing.getKeyNameControl("CONTROL_BUSCAR"); keyStrokeControl=FuncionesSwing.getKeyStrokeControl( "CONTROL_BUSCAR"); jTextFieldnumero_pre_impreso_facturaProcesoFacturasProductos.getInputMap().put(keyStrokeControl, sKeyStrokeName); jTextFieldnumero_pre_impreso_facturaProcesoFacturasProductos.getActionMap().put(sKeyStrokeName, new ButtonAbstractAction(this,"numero_pre_impreso_facturaProcesoFacturasProductosBusqueda")); if(this.procesofacturasproductosSessionBean.getEsGuardarRelacionado() || paginaTipo.equals(PaginaTipo.SECUNDARIO)) { this.jButtonnumero_pre_impreso_facturaProcesoFacturasProductosBusqueda.setVisible(false); } this.jLabelnombre_productoProcesoFacturasProductos = new JLabelMe(); this.jLabelnombre_productoProcesoFacturasProductos.setText(""+ProcesoFacturasProductosConstantesFunciones.LABEL_NOMBREPRODUCTO+" : *"); this.jLabelnombre_productoProcesoFacturasProductos.setToolTipText("Nombre Producto"); this.jLabelnombre_productoProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL2,0))); this.jLabelnombre_productoProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL2,0))); this.jLabelnombre_productoProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL2,0))); FuncionesSwing.setBoldLabel(jLabelnombre_productoProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); this.jPanelnombre_productoProcesoFacturasProductos=new JPanelMe("fondo_formulario",true);//new JPanel(); this.jPanelnombre_productoProcesoFacturasProductos.setToolTipText(ProcesoFacturasProductosConstantesFunciones.LABEL_NOMBREPRODUCTO); this.gridaBagLayoutProcesoFacturasProductos = new GridBagLayout(); this.jPanelnombre_productoProcesoFacturasProductos.setLayout(this.gridaBagLayoutProcesoFacturasProductos); jTextAreanombre_productoProcesoFacturasProductos= new JTextAreaMe(); jTextAreanombre_productoProcesoFacturasProductos.setEnabled(false); jTextAreanombre_productoProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jTextAreanombre_productoProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jTextAreanombre_productoProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jTextAreanombre_productoProcesoFacturasProductos.setLineWrap(true); jTextAreanombre_productoProcesoFacturasProductos.setWrapStyleWord(true); jTextAreanombre_productoProcesoFacturasProductos.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); jTextAreanombre_productoProcesoFacturasProductos.setRows(5); FuncionesSwing.setBoldTextArea(jTextAreanombre_productoProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); jscrollPanenombre_productoProcesoFacturasProductos = new JScrollPane(jTextAreanombre_productoProcesoFacturasProductos); jscrollPanenombre_productoProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),70)); jscrollPanenombre_productoProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),70)); jscrollPanenombre_productoProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),70)); this.jButtonnombre_productoProcesoFacturasProductosBusqueda= new JButtonMe(); this.jButtonnombre_productoProcesoFacturasProductosBusqueda.setMinimumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonnombre_productoProcesoFacturasProductosBusqueda.setMaximumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonnombre_productoProcesoFacturasProductosBusqueda.setPreferredSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); //this.jButtonnombre_productoProcesoFacturasProductosBusqueda.setText("U"); this.jButtonnombre_productoProcesoFacturasProductosBusqueda.setToolTipText("BUSCAR DATOS ("+FuncionesSwing.getKeyNameControl("CONTROL_BUSCAR")+")"); this.jButtonnombre_productoProcesoFacturasProductosBusqueda.setFocusable(false); FuncionesSwing.addImagenButtonGeneral(this.jButtonnombre_productoProcesoFacturasProductosBusqueda,"buscardatos","BUSCAR DATOS"); sKeyStrokeName = FuncionesSwing.getKeyNameControl("CONTROL_BUSCAR"); keyStrokeControl=FuncionesSwing.getKeyStrokeControl( "CONTROL_BUSCAR"); jTextAreanombre_productoProcesoFacturasProductos.getInputMap().put(keyStrokeControl, sKeyStrokeName); jTextAreanombre_productoProcesoFacturasProductos.getActionMap().put(sKeyStrokeName, new ButtonAbstractAction(this,"nombre_productoProcesoFacturasProductosBusqueda")); if(this.procesofacturasproductosSessionBean.getEsGuardarRelacionado() || paginaTipo.equals(PaginaTipo.SECUNDARIO)) { this.jButtonnombre_productoProcesoFacturasProductosBusqueda.setVisible(false); } this.jLabelnombre_unidadProcesoFacturasProductos = new JLabelMe(); this.jLabelnombre_unidadProcesoFacturasProductos.setText(""+ProcesoFacturasProductosConstantesFunciones.LABEL_NOMBREUNIDAD+" : *"); this.jLabelnombre_unidadProcesoFacturasProductos.setToolTipText("Nombre Unidad"); this.jLabelnombre_unidadProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); this.jLabelnombre_unidadProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); this.jLabelnombre_unidadProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); FuncionesSwing.setBoldLabel(jLabelnombre_unidadProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); this.jPanelnombre_unidadProcesoFacturasProductos=new JPanelMe("fondo_formulario",true);//new JPanel(); this.jPanelnombre_unidadProcesoFacturasProductos.setToolTipText(ProcesoFacturasProductosConstantesFunciones.LABEL_NOMBREUNIDAD); this.gridaBagLayoutProcesoFacturasProductos = new GridBagLayout(); this.jPanelnombre_unidadProcesoFacturasProductos.setLayout(this.gridaBagLayoutProcesoFacturasProductos); jTextFieldnombre_unidadProcesoFacturasProductos= new JTextFieldMe(); jTextFieldnombre_unidadProcesoFacturasProductos.setEnabled(false); jTextFieldnombre_unidadProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jTextFieldnombre_unidadProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jTextFieldnombre_unidadProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); FuncionesSwing.setBoldTextField(jTextFieldnombre_unidadProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); this.jButtonnombre_unidadProcesoFacturasProductosBusqueda= new JButtonMe(); this.jButtonnombre_unidadProcesoFacturasProductosBusqueda.setMinimumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonnombre_unidadProcesoFacturasProductosBusqueda.setMaximumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonnombre_unidadProcesoFacturasProductosBusqueda.setPreferredSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); //this.jButtonnombre_unidadProcesoFacturasProductosBusqueda.setText("U"); this.jButtonnombre_unidadProcesoFacturasProductosBusqueda.setToolTipText("BUSCAR DATOS ("+FuncionesSwing.getKeyNameControl("CONTROL_BUSCAR")+")"); this.jButtonnombre_unidadProcesoFacturasProductosBusqueda.setFocusable(false); FuncionesSwing.addImagenButtonGeneral(this.jButtonnombre_unidadProcesoFacturasProductosBusqueda,"buscardatos","BUSCAR DATOS"); sKeyStrokeName = FuncionesSwing.getKeyNameControl("CONTROL_BUSCAR"); keyStrokeControl=FuncionesSwing.getKeyStrokeControl( "CONTROL_BUSCAR"); jTextFieldnombre_unidadProcesoFacturasProductos.getInputMap().put(keyStrokeControl, sKeyStrokeName); jTextFieldnombre_unidadProcesoFacturasProductos.getActionMap().put(sKeyStrokeName, new ButtonAbstractAction(this,"nombre_unidadProcesoFacturasProductosBusqueda")); if(this.procesofacturasproductosSessionBean.getEsGuardarRelacionado() || paginaTipo.equals(PaginaTipo.SECUNDARIO)) { this.jButtonnombre_unidadProcesoFacturasProductosBusqueda.setVisible(false); } this.jLabelprecioProcesoFacturasProductos = new JLabelMe(); this.jLabelprecioProcesoFacturasProductos.setText(""+ProcesoFacturasProductosConstantesFunciones.LABEL_PRECIO+" : *"); this.jLabelprecioProcesoFacturasProductos.setToolTipText("Precio"); this.jLabelprecioProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); this.jLabelprecioProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); this.jLabelprecioProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); FuncionesSwing.setBoldLabel(jLabelprecioProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); this.jPanelprecioProcesoFacturasProductos=new JPanelMe("fondo_formulario",true);//new JPanel(); this.jPanelprecioProcesoFacturasProductos.setToolTipText(ProcesoFacturasProductosConstantesFunciones.LABEL_PRECIO); this.gridaBagLayoutProcesoFacturasProductos = new GridBagLayout(); this.jPanelprecioProcesoFacturasProductos.setLayout(this.gridaBagLayoutProcesoFacturasProductos); jTextFieldprecioProcesoFacturasProductos= new JTextFieldMe(); jTextFieldprecioProcesoFacturasProductos.setEnabled(false); jTextFieldprecioProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_VALOR + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_VALOR,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jTextFieldprecioProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_VALOR + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_VALOR,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jTextFieldprecioProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_VALOR + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_VALOR,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); FuncionesSwing.setBoldTextField(jTextFieldprecioProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); jTextFieldprecioProcesoFacturasProductos.setText("0.0"); this.jButtonprecioProcesoFacturasProductosBusqueda= new JButtonMe(); this.jButtonprecioProcesoFacturasProductosBusqueda.setMinimumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonprecioProcesoFacturasProductosBusqueda.setMaximumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonprecioProcesoFacturasProductosBusqueda.setPreferredSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); //this.jButtonprecioProcesoFacturasProductosBusqueda.setText("U"); this.jButtonprecioProcesoFacturasProductosBusqueda.setToolTipText("BUSCAR DATOS ("+FuncionesSwing.getKeyNameControl("CONTROL_BUSCAR")+")"); this.jButtonprecioProcesoFacturasProductosBusqueda.setFocusable(false); FuncionesSwing.addImagenButtonGeneral(this.jButtonprecioProcesoFacturasProductosBusqueda,"buscardatos","BUSCAR DATOS"); sKeyStrokeName = FuncionesSwing.getKeyNameControl("CONTROL_BUSCAR"); keyStrokeControl=FuncionesSwing.getKeyStrokeControl( "CONTROL_BUSCAR"); jTextFieldprecioProcesoFacturasProductos.getInputMap().put(keyStrokeControl, sKeyStrokeName); jTextFieldprecioProcesoFacturasProductos.getActionMap().put(sKeyStrokeName, new ButtonAbstractAction(this,"precioProcesoFacturasProductosBusqueda")); if(this.procesofacturasproductosSessionBean.getEsGuardarRelacionado() || paginaTipo.equals(PaginaTipo.SECUNDARIO)) { this.jButtonprecioProcesoFacturasProductosBusqueda.setVisible(false); } this.jLabeltareaProcesoFacturasProductos = new JLabelMe(); this.jLabeltareaProcesoFacturasProductos.setText(""+ProcesoFacturasProductosConstantesFunciones.LABEL_TAREA+" : *"); this.jLabeltareaProcesoFacturasProductos.setToolTipText("Tarea"); this.jLabeltareaProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); this.jLabeltareaProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); this.jLabeltareaProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); FuncionesSwing.setBoldLabel(jLabeltareaProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); this.jPaneltareaProcesoFacturasProductos=new JPanelMe("fondo_formulario",true);//new JPanel(); this.jPaneltareaProcesoFacturasProductos.setToolTipText(ProcesoFacturasProductosConstantesFunciones.LABEL_TAREA); this.gridaBagLayoutProcesoFacturasProductos = new GridBagLayout(); this.jPaneltareaProcesoFacturasProductos.setLayout(this.gridaBagLayoutProcesoFacturasProductos); jTextAreatareaProcesoFacturasProductos= new JTextAreaMe(); jTextAreatareaProcesoFacturasProductos.setEnabled(false); jTextAreatareaProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jTextAreatareaProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jTextAreatareaProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jTextAreatareaProcesoFacturasProductos.setLineWrap(true); jTextAreatareaProcesoFacturasProductos.setWrapStyleWord(true); jTextAreatareaProcesoFacturasProductos.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5)); jTextAreatareaProcesoFacturasProductos.setRows(9); FuncionesSwing.setBoldTextArea(jTextAreatareaProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); jscrollPanetareaProcesoFacturasProductos = new JScrollPane(jTextAreatareaProcesoFacturasProductos); jscrollPanetareaProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),70 + FuncionesSwing.getValorProporcion(70,0))); jscrollPanetareaProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),70 + FuncionesSwing.getValorProporcion(70,0))); jscrollPanetareaProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),70 + FuncionesSwing.getValorProporcion(70,0))); this.jButtontareaProcesoFacturasProductosBusqueda= new JButtonMe(); this.jButtontareaProcesoFacturasProductosBusqueda.setMinimumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtontareaProcesoFacturasProductosBusqueda.setMaximumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtontareaProcesoFacturasProductosBusqueda.setPreferredSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); //this.jButtontareaProcesoFacturasProductosBusqueda.setText("U"); this.jButtontareaProcesoFacturasProductosBusqueda.setToolTipText("BUSCAR DATOS ("+FuncionesSwing.getKeyNameControl("CONTROL_BUSCAR")+")"); this.jButtontareaProcesoFacturasProductosBusqueda.setFocusable(false); FuncionesSwing.addImagenButtonGeneral(this.jButtontareaProcesoFacturasProductosBusqueda,"buscardatos","BUSCAR DATOS"); sKeyStrokeName = FuncionesSwing.getKeyNameControl("CONTROL_BUSCAR"); keyStrokeControl=FuncionesSwing.getKeyStrokeControl( "CONTROL_BUSCAR"); jTextAreatareaProcesoFacturasProductos.getInputMap().put(keyStrokeControl, sKeyStrokeName); jTextAreatareaProcesoFacturasProductos.getActionMap().put(sKeyStrokeName, new ButtonAbstractAction(this,"tareaProcesoFacturasProductosBusqueda")); if(this.procesofacturasproductosSessionBean.getEsGuardarRelacionado() || paginaTipo.equals(PaginaTipo.SECUNDARIO)) { this.jButtontareaProcesoFacturasProductosBusqueda.setVisible(false); } } public void inicializarElementosCamposForeigKeysProcesoFacturasProductos() { String sKeyStrokeName=""; KeyStroke keyStrokeControl=null; this.jLabelid_ciudadProcesoFacturasProductos = new JLabelMe(); this.jLabelid_ciudadProcesoFacturasProductos.setText(""+ProcesoFacturasProductosConstantesFunciones.LABEL_IDCIUDAD+" : *"); this.jLabelid_ciudadProcesoFacturasProductos.setToolTipText("Ciudad"); this.jLabelid_ciudadProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); this.jLabelid_ciudadProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); this.jLabelid_ciudadProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); FuncionesSwing.setBoldLabel(jLabelid_ciudadProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); this.jPanelid_ciudadProcesoFacturasProductos=new JPanelMe("fondo_formulario",true);//new JPanel(); this.jPanelid_ciudadProcesoFacturasProductos.setToolTipText(ProcesoFacturasProductosConstantesFunciones.LABEL_IDCIUDAD); this.gridaBagLayoutProcesoFacturasProductos = new GridBagLayout(); this.jPanelid_ciudadProcesoFacturasProductos.setLayout(this.gridaBagLayoutProcesoFacturasProductos); jComboBoxid_ciudadProcesoFacturasProductos= new JComboBoxMe(); jComboBoxid_ciudadProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jComboBoxid_ciudadProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jComboBoxid_ciudadProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); FuncionesSwing.setBoldComboBox(jComboBoxid_ciudadProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); this.jButtonid_ciudadProcesoFacturasProductos= new JButtonMe(); this.jButtonid_ciudadProcesoFacturasProductos.setMinimumSize(new Dimension(50,Constantes.ISWING_ALTO_CONTROL)); this.jButtonid_ciudadProcesoFacturasProductos.setMaximumSize(new Dimension(50,Constantes.ISWING_ALTO_CONTROL)); this.jButtonid_ciudadProcesoFacturasProductos.setPreferredSize(new Dimension(50,Constantes.ISWING_ALTO_CONTROL)); this.jButtonid_ciudadProcesoFacturasProductos.setText("Buscar"); this.jButtonid_ciudadProcesoFacturasProductos.setToolTipText("Buscar ("+FuncionesSwing.getKeyNameControl("CONTROL_BUSQUEDA")+")"); this.jButtonid_ciudadProcesoFacturasProductos.setFocusable(false); FuncionesSwing.addImagenButtonGeneral(this.jButtonid_ciudadProcesoFacturasProductos,"buscar_form","Buscar"); sKeyStrokeName = FuncionesSwing.getKeyNameControl("CONTROL_BUSQUEDA"); keyStrokeControl=FuncionesSwing.getKeyStrokeControl( "CONTROL_BUSQUEDA"); jComboBoxid_ciudadProcesoFacturasProductos.getInputMap().put(keyStrokeControl, sKeyStrokeName); jComboBoxid_ciudadProcesoFacturasProductos.getActionMap().put(sKeyStrokeName, new ButtonAbstractAction(this,"id_ciudadProcesoFacturasProductos")); this.jButtonid_ciudadProcesoFacturasProductosBusqueda= new JButtonMe(); this.jButtonid_ciudadProcesoFacturasProductosBusqueda.setMinimumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonid_ciudadProcesoFacturasProductosBusqueda.setMaximumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonid_ciudadProcesoFacturasProductosBusqueda.setPreferredSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); //this.jButtonid_ciudadProcesoFacturasProductosBusqueda.setText("U"); this.jButtonid_ciudadProcesoFacturasProductosBusqueda.setToolTipText("BUSCAR DATOS ("+FuncionesSwing.getKeyNameControl("CONTROL_BUSCAR")+")"); this.jButtonid_ciudadProcesoFacturasProductosBusqueda.setFocusable(false); FuncionesSwing.addImagenButtonGeneral(this.jButtonid_ciudadProcesoFacturasProductosBusqueda,"buscardatos","BUSCAR DATOS"); sKeyStrokeName = FuncionesSwing.getKeyNameControl("CONTROL_BUSCAR"); keyStrokeControl=FuncionesSwing.getKeyStrokeControl( "CONTROL_BUSCAR"); jComboBoxid_ciudadProcesoFacturasProductos.getInputMap().put(keyStrokeControl, sKeyStrokeName); jComboBoxid_ciudadProcesoFacturasProductos.getActionMap().put(sKeyStrokeName, new ButtonAbstractAction(this,"id_ciudadProcesoFacturasProductosBusqueda")); if(this.procesofacturasproductosSessionBean.getEsGuardarRelacionado() || paginaTipo.equals(PaginaTipo.SECUNDARIO)) { this.jButtonid_ciudadProcesoFacturasProductosBusqueda.setVisible(false); } this.jButtonid_ciudadProcesoFacturasProductosUpdate= new JButtonMe(); this.jButtonid_ciudadProcesoFacturasProductosUpdate.setMinimumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonid_ciudadProcesoFacturasProductosUpdate.setMaximumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonid_ciudadProcesoFacturasProductosUpdate.setPreferredSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); //this.jButtonid_ciudadProcesoFacturasProductosUpdate.setText("U"); this.jButtonid_ciudadProcesoFacturasProductosUpdate.setToolTipText("ACTUALIZAR DATOS ("+FuncionesSwing.getKeyNameControl("CONTROL_ACTUALIZAR")+")"); this.jButtonid_ciudadProcesoFacturasProductosUpdate.setFocusable(false); FuncionesSwing.addImagenButtonGeneral(this.jButtonid_ciudadProcesoFacturasProductosUpdate,"actualizardatos","ACTUALIZAR DATOS"); sKeyStrokeName = FuncionesSwing.getKeyNameControl("CONTROL_ACTUALIZAR"); keyStrokeControl=FuncionesSwing.getKeyStrokeControl( "CONTROL_ACTUALIZAR"); jComboBoxid_ciudadProcesoFacturasProductos.getInputMap().put(keyStrokeControl, sKeyStrokeName); jComboBoxid_ciudadProcesoFacturasProductos.getActionMap().put(sKeyStrokeName, new ButtonAbstractAction(this,"id_ciudadProcesoFacturasProductosUpdate")); this.jLabelid_zonaProcesoFacturasProductos = new JLabelMe(); this.jLabelid_zonaProcesoFacturasProductos.setText(""+ProcesoFacturasProductosConstantesFunciones.LABEL_IDZONA+" : *"); this.jLabelid_zonaProcesoFacturasProductos.setToolTipText("Zona"); this.jLabelid_zonaProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); this.jLabelid_zonaProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); this.jLabelid_zonaProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); FuncionesSwing.setBoldLabel(jLabelid_zonaProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); this.jPanelid_zonaProcesoFacturasProductos=new JPanelMe("fondo_formulario",true);//new JPanel(); this.jPanelid_zonaProcesoFacturasProductos.setToolTipText(ProcesoFacturasProductosConstantesFunciones.LABEL_IDZONA); this.gridaBagLayoutProcesoFacturasProductos = new GridBagLayout(); this.jPanelid_zonaProcesoFacturasProductos.setLayout(this.gridaBagLayoutProcesoFacturasProductos); jComboBoxid_zonaProcesoFacturasProductos= new JComboBoxMe(); jComboBoxid_zonaProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jComboBoxid_zonaProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jComboBoxid_zonaProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); FuncionesSwing.setBoldComboBox(jComboBoxid_zonaProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); this.jButtonid_zonaProcesoFacturasProductos= new JButtonMe(); this.jButtonid_zonaProcesoFacturasProductos.setMinimumSize(new Dimension(50,Constantes.ISWING_ALTO_CONTROL)); this.jButtonid_zonaProcesoFacturasProductos.setMaximumSize(new Dimension(50,Constantes.ISWING_ALTO_CONTROL)); this.jButtonid_zonaProcesoFacturasProductos.setPreferredSize(new Dimension(50,Constantes.ISWING_ALTO_CONTROL)); this.jButtonid_zonaProcesoFacturasProductos.setText("Buscar"); this.jButtonid_zonaProcesoFacturasProductos.setToolTipText("Buscar ("+FuncionesSwing.getKeyNameControl("CONTROL_BUSQUEDA")+")"); this.jButtonid_zonaProcesoFacturasProductos.setFocusable(false); FuncionesSwing.addImagenButtonGeneral(this.jButtonid_zonaProcesoFacturasProductos,"buscar_form","Buscar"); sKeyStrokeName = FuncionesSwing.getKeyNameControl("CONTROL_BUSQUEDA"); keyStrokeControl=FuncionesSwing.getKeyStrokeControl( "CONTROL_BUSQUEDA"); jComboBoxid_zonaProcesoFacturasProductos.getInputMap().put(keyStrokeControl, sKeyStrokeName); jComboBoxid_zonaProcesoFacturasProductos.getActionMap().put(sKeyStrokeName, new ButtonAbstractAction(this,"id_zonaProcesoFacturasProductos")); this.jButtonid_zonaProcesoFacturasProductosBusqueda= new JButtonMe(); this.jButtonid_zonaProcesoFacturasProductosBusqueda.setMinimumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonid_zonaProcesoFacturasProductosBusqueda.setMaximumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonid_zonaProcesoFacturasProductosBusqueda.setPreferredSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); //this.jButtonid_zonaProcesoFacturasProductosBusqueda.setText("U"); this.jButtonid_zonaProcesoFacturasProductosBusqueda.setToolTipText("BUSCAR DATOS ("+FuncionesSwing.getKeyNameControl("CONTROL_BUSCAR")+")"); this.jButtonid_zonaProcesoFacturasProductosBusqueda.setFocusable(false); FuncionesSwing.addImagenButtonGeneral(this.jButtonid_zonaProcesoFacturasProductosBusqueda,"buscardatos","BUSCAR DATOS"); sKeyStrokeName = FuncionesSwing.getKeyNameControl("CONTROL_BUSCAR"); keyStrokeControl=FuncionesSwing.getKeyStrokeControl( "CONTROL_BUSCAR"); jComboBoxid_zonaProcesoFacturasProductos.getInputMap().put(keyStrokeControl, sKeyStrokeName); jComboBoxid_zonaProcesoFacturasProductos.getActionMap().put(sKeyStrokeName, new ButtonAbstractAction(this,"id_zonaProcesoFacturasProductosBusqueda")); if(this.procesofacturasproductosSessionBean.getEsGuardarRelacionado() || paginaTipo.equals(PaginaTipo.SECUNDARIO)) { this.jButtonid_zonaProcesoFacturasProductosBusqueda.setVisible(false); } this.jButtonid_zonaProcesoFacturasProductosUpdate= new JButtonMe(); this.jButtonid_zonaProcesoFacturasProductosUpdate.setMinimumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonid_zonaProcesoFacturasProductosUpdate.setMaximumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonid_zonaProcesoFacturasProductosUpdate.setPreferredSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); //this.jButtonid_zonaProcesoFacturasProductosUpdate.setText("U"); this.jButtonid_zonaProcesoFacturasProductosUpdate.setToolTipText("ACTUALIZAR DATOS ("+FuncionesSwing.getKeyNameControl("CONTROL_ACTUALIZAR")+")"); this.jButtonid_zonaProcesoFacturasProductosUpdate.setFocusable(false); FuncionesSwing.addImagenButtonGeneral(this.jButtonid_zonaProcesoFacturasProductosUpdate,"actualizardatos","ACTUALIZAR DATOS"); sKeyStrokeName = FuncionesSwing.getKeyNameControl("CONTROL_ACTUALIZAR"); keyStrokeControl=FuncionesSwing.getKeyStrokeControl( "CONTROL_ACTUALIZAR"); jComboBoxid_zonaProcesoFacturasProductos.getInputMap().put(keyStrokeControl, sKeyStrokeName); jComboBoxid_zonaProcesoFacturasProductos.getActionMap().put(sKeyStrokeName, new ButtonAbstractAction(this,"id_zonaProcesoFacturasProductosUpdate")); this.jLabelid_grupo_clienteProcesoFacturasProductos = new JLabelMe(); this.jLabelid_grupo_clienteProcesoFacturasProductos.setText(""+ProcesoFacturasProductosConstantesFunciones.LABEL_IDGRUPOCLIENTE+" : *"); this.jLabelid_grupo_clienteProcesoFacturasProductos.setToolTipText("Grupo Cliente"); this.jLabelid_grupo_clienteProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); this.jLabelid_grupo_clienteProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); this.jLabelid_grupo_clienteProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); FuncionesSwing.setBoldLabel(jLabelid_grupo_clienteProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); this.jPanelid_grupo_clienteProcesoFacturasProductos=new JPanelMe("fondo_formulario",true);//new JPanel(); this.jPanelid_grupo_clienteProcesoFacturasProductos.setToolTipText(ProcesoFacturasProductosConstantesFunciones.LABEL_IDGRUPOCLIENTE); this.gridaBagLayoutProcesoFacturasProductos = new GridBagLayout(); this.jPanelid_grupo_clienteProcesoFacturasProductos.setLayout(this.gridaBagLayoutProcesoFacturasProductos); jComboBoxid_grupo_clienteProcesoFacturasProductos= new JComboBoxMe(); jComboBoxid_grupo_clienteProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jComboBoxid_grupo_clienteProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jComboBoxid_grupo_clienteProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); FuncionesSwing.setBoldComboBox(jComboBoxid_grupo_clienteProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); this.jButtonid_grupo_clienteProcesoFacturasProductos= new JButtonMe(); this.jButtonid_grupo_clienteProcesoFacturasProductos.setMinimumSize(new Dimension(50,Constantes.ISWING_ALTO_CONTROL)); this.jButtonid_grupo_clienteProcesoFacturasProductos.setMaximumSize(new Dimension(50,Constantes.ISWING_ALTO_CONTROL)); this.jButtonid_grupo_clienteProcesoFacturasProductos.setPreferredSize(new Dimension(50,Constantes.ISWING_ALTO_CONTROL)); this.jButtonid_grupo_clienteProcesoFacturasProductos.setText("Buscar"); this.jButtonid_grupo_clienteProcesoFacturasProductos.setToolTipText("Buscar ("+FuncionesSwing.getKeyNameControl("CONTROL_BUSQUEDA")+")"); this.jButtonid_grupo_clienteProcesoFacturasProductos.setFocusable(false); FuncionesSwing.addImagenButtonGeneral(this.jButtonid_grupo_clienteProcesoFacturasProductos,"buscar_form","Buscar"); sKeyStrokeName = FuncionesSwing.getKeyNameControl("CONTROL_BUSQUEDA"); keyStrokeControl=FuncionesSwing.getKeyStrokeControl( "CONTROL_BUSQUEDA"); jComboBoxid_grupo_clienteProcesoFacturasProductos.getInputMap().put(keyStrokeControl, sKeyStrokeName); jComboBoxid_grupo_clienteProcesoFacturasProductos.getActionMap().put(sKeyStrokeName, new ButtonAbstractAction(this,"id_grupo_clienteProcesoFacturasProductos")); this.jButtonid_grupo_clienteProcesoFacturasProductosBusqueda= new JButtonMe(); this.jButtonid_grupo_clienteProcesoFacturasProductosBusqueda.setMinimumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonid_grupo_clienteProcesoFacturasProductosBusqueda.setMaximumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonid_grupo_clienteProcesoFacturasProductosBusqueda.setPreferredSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); //this.jButtonid_grupo_clienteProcesoFacturasProductosBusqueda.setText("U"); this.jButtonid_grupo_clienteProcesoFacturasProductosBusqueda.setToolTipText("BUSCAR DATOS ("+FuncionesSwing.getKeyNameControl("CONTROL_BUSCAR")+")"); this.jButtonid_grupo_clienteProcesoFacturasProductosBusqueda.setFocusable(false); FuncionesSwing.addImagenButtonGeneral(this.jButtonid_grupo_clienteProcesoFacturasProductosBusqueda,"buscardatos","BUSCAR DATOS"); sKeyStrokeName = FuncionesSwing.getKeyNameControl("CONTROL_BUSCAR"); keyStrokeControl=FuncionesSwing.getKeyStrokeControl( "CONTROL_BUSCAR"); jComboBoxid_grupo_clienteProcesoFacturasProductos.getInputMap().put(keyStrokeControl, sKeyStrokeName); jComboBoxid_grupo_clienteProcesoFacturasProductos.getActionMap().put(sKeyStrokeName, new ButtonAbstractAction(this,"id_grupo_clienteProcesoFacturasProductosBusqueda")); if(this.procesofacturasproductosSessionBean.getEsGuardarRelacionado() || paginaTipo.equals(PaginaTipo.SECUNDARIO)) { this.jButtonid_grupo_clienteProcesoFacturasProductosBusqueda.setVisible(false); } this.jButtonid_grupo_clienteProcesoFacturasProductosUpdate= new JButtonMe(); this.jButtonid_grupo_clienteProcesoFacturasProductosUpdate.setMinimumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonid_grupo_clienteProcesoFacturasProductosUpdate.setMaximumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonid_grupo_clienteProcesoFacturasProductosUpdate.setPreferredSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); //this.jButtonid_grupo_clienteProcesoFacturasProductosUpdate.setText("U"); this.jButtonid_grupo_clienteProcesoFacturasProductosUpdate.setToolTipText("ACTUALIZAR DATOS ("+FuncionesSwing.getKeyNameControl("CONTROL_ACTUALIZAR")+")"); this.jButtonid_grupo_clienteProcesoFacturasProductosUpdate.setFocusable(false); FuncionesSwing.addImagenButtonGeneral(this.jButtonid_grupo_clienteProcesoFacturasProductosUpdate,"actualizardatos","ACTUALIZAR DATOS"); sKeyStrokeName = FuncionesSwing.getKeyNameControl("CONTROL_ACTUALIZAR"); keyStrokeControl=FuncionesSwing.getKeyStrokeControl( "CONTROL_ACTUALIZAR"); jComboBoxid_grupo_clienteProcesoFacturasProductos.getInputMap().put(keyStrokeControl, sKeyStrokeName); jComboBoxid_grupo_clienteProcesoFacturasProductos.getActionMap().put(sKeyStrokeName, new ButtonAbstractAction(this,"id_grupo_clienteProcesoFacturasProductosUpdate")); this.jLabelid_vendedorProcesoFacturasProductos = new JLabelMe(); this.jLabelid_vendedorProcesoFacturasProductos.setText(""+ProcesoFacturasProductosConstantesFunciones.LABEL_IDVENDEDOR+" : *"); this.jLabelid_vendedorProcesoFacturasProductos.setToolTipText("Vendedor"); this.jLabelid_vendedorProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); this.jLabelid_vendedorProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); this.jLabelid_vendedorProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL,0),Constantes2.ISWING_ALTO_CONTROL_LABEL + FuncionesSwing.getValorProporcion(Constantes2.ISWING_ALTO_CONTROL_LABEL,0))); FuncionesSwing.setBoldLabel(jLabelid_vendedorProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); this.jPanelid_vendedorProcesoFacturasProductos=new JPanelMe("fondo_formulario",true);//new JPanel(); this.jPanelid_vendedorProcesoFacturasProductos.setToolTipText(ProcesoFacturasProductosConstantesFunciones.LABEL_IDVENDEDOR); this.gridaBagLayoutProcesoFacturasProductos = new GridBagLayout(); this.jPanelid_vendedorProcesoFacturasProductos.setLayout(this.gridaBagLayoutProcesoFacturasProductos); jComboBoxid_vendedorProcesoFacturasProductos= new JComboBoxMe(); jComboBoxid_vendedorProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jComboBoxid_vendedorProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jComboBoxid_vendedorProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,0),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); FuncionesSwing.setBoldComboBox(jComboBoxid_vendedorProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); this.jButtonid_vendedorProcesoFacturasProductos= new JButtonMe(); this.jButtonid_vendedorProcesoFacturasProductos.setMinimumSize(new Dimension(50,Constantes.ISWING_ALTO_CONTROL)); this.jButtonid_vendedorProcesoFacturasProductos.setMaximumSize(new Dimension(50,Constantes.ISWING_ALTO_CONTROL)); this.jButtonid_vendedorProcesoFacturasProductos.setPreferredSize(new Dimension(50,Constantes.ISWING_ALTO_CONTROL)); this.jButtonid_vendedorProcesoFacturasProductos.setText("Buscar"); this.jButtonid_vendedorProcesoFacturasProductos.setToolTipText("Buscar ("+FuncionesSwing.getKeyNameControl("CONTROL_BUSQUEDA")+")"); this.jButtonid_vendedorProcesoFacturasProductos.setFocusable(false); FuncionesSwing.addImagenButtonGeneral(this.jButtonid_vendedorProcesoFacturasProductos,"buscar_form","Buscar"); sKeyStrokeName = FuncionesSwing.getKeyNameControl("CONTROL_BUSQUEDA"); keyStrokeControl=FuncionesSwing.getKeyStrokeControl( "CONTROL_BUSQUEDA"); jComboBoxid_vendedorProcesoFacturasProductos.getInputMap().put(keyStrokeControl, sKeyStrokeName); jComboBoxid_vendedorProcesoFacturasProductos.getActionMap().put(sKeyStrokeName, new ButtonAbstractAction(this,"id_vendedorProcesoFacturasProductos")); this.jButtonid_vendedorProcesoFacturasProductosBusqueda= new JButtonMe(); this.jButtonid_vendedorProcesoFacturasProductosBusqueda.setMinimumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonid_vendedorProcesoFacturasProductosBusqueda.setMaximumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonid_vendedorProcesoFacturasProductosBusqueda.setPreferredSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); //this.jButtonid_vendedorProcesoFacturasProductosBusqueda.setText("U"); this.jButtonid_vendedorProcesoFacturasProductosBusqueda.setToolTipText("BUSCAR DATOS ("+FuncionesSwing.getKeyNameControl("CONTROL_BUSCAR")+")"); this.jButtonid_vendedorProcesoFacturasProductosBusqueda.setFocusable(false); FuncionesSwing.addImagenButtonGeneral(this.jButtonid_vendedorProcesoFacturasProductosBusqueda,"buscardatos","BUSCAR DATOS"); sKeyStrokeName = FuncionesSwing.getKeyNameControl("CONTROL_BUSCAR"); keyStrokeControl=FuncionesSwing.getKeyStrokeControl( "CONTROL_BUSCAR"); jComboBoxid_vendedorProcesoFacturasProductos.getInputMap().put(keyStrokeControl, sKeyStrokeName); jComboBoxid_vendedorProcesoFacturasProductos.getActionMap().put(sKeyStrokeName, new ButtonAbstractAction(this,"id_vendedorProcesoFacturasProductosBusqueda")); if(this.procesofacturasproductosSessionBean.getEsGuardarRelacionado() || paginaTipo.equals(PaginaTipo.SECUNDARIO)) { this.jButtonid_vendedorProcesoFacturasProductosBusqueda.setVisible(false); } this.jButtonid_vendedorProcesoFacturasProductosUpdate= new JButtonMe(); this.jButtonid_vendedorProcesoFacturasProductosUpdate.setMinimumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonid_vendedorProcesoFacturasProductosUpdate.setMaximumSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); this.jButtonid_vendedorProcesoFacturasProductosUpdate.setPreferredSize(new Dimension(Constantes2.ISWING_ANCHO_CONTROL_BOTONICONO,Constantes2.ISWING_ALTO_CONTROL_BOTONICONO)); //this.jButtonid_vendedorProcesoFacturasProductosUpdate.setText("U"); this.jButtonid_vendedorProcesoFacturasProductosUpdate.setToolTipText("ACTUALIZAR DATOS ("+FuncionesSwing.getKeyNameControl("CONTROL_ACTUALIZAR")+")"); this.jButtonid_vendedorProcesoFacturasProductosUpdate.setFocusable(false); FuncionesSwing.addImagenButtonGeneral(this.jButtonid_vendedorProcesoFacturasProductosUpdate,"actualizardatos","ACTUALIZAR DATOS"); sKeyStrokeName = FuncionesSwing.getKeyNameControl("CONTROL_ACTUALIZAR"); keyStrokeControl=FuncionesSwing.getKeyStrokeControl( "CONTROL_ACTUALIZAR"); jComboBoxid_vendedorProcesoFacturasProductos.getInputMap().put(keyStrokeControl, sKeyStrokeName); jComboBoxid_vendedorProcesoFacturasProductos.getActionMap().put(sKeyStrokeName, new ButtonAbstractAction(this,"id_vendedorProcesoFacturasProductosUpdate")); } public void jButtonActionPerformedTecladoGeneral(String sTipo,ActionEvent evt) { //System.out.println("TRANSFIERE EL MANEJO AL PADRE O FORM PRINCIPAL"); jInternalFrameParent.jButtonActionPerformedTecladoGeneral(sTipo,evt); } //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 //this.jInternalFrameDetalleProcesoFacturasProductos = new ProcesoFacturasProductosBeanSwingJInternalFrameAdditional(paginaTipo);//JInternalFrameBase("Proceso Facturas Productos DATOS"); this.cargarMenus(); this.gridaBagLayoutProcesoFacturasProductos= new GridBagLayout(); String sToolTipProcesoFacturasProductos=""; sToolTipProcesoFacturasProductos=ProcesoFacturasProductosConstantesFunciones.SCLASSWEBTITULO; if(Constantes.ISDEVELOPING) { sToolTipProcesoFacturasProductos+="(Facturacion.ProcesoFacturasProductos)"; } if(!this.procesofacturasproductosSessionBean.getEsGuardarRelacionado()) { sToolTipProcesoFacturasProductos+="_"+this.opcionActual.getId(); } this.jButtonNuevoProcesoFacturasProductos = new JButtonMe(); this.jButtonModificarProcesoFacturasProductos = new JButtonMe(); this.jButtonActualizarProcesoFacturasProductos = new JButtonMe(); this.jButtonEliminarProcesoFacturasProductos = new JButtonMe(); this.jButtonCancelarProcesoFacturasProductos = new JButtonMe(); this.jButtonGuardarCambiosProcesoFacturasProductos = new JButtonMe(); this.jButtonGuardarCambiosTablaProcesoFacturasProductos = new JButtonMe(); this.jButtonCerrarProcesoFacturasProductos = new JButtonMe(); this.jScrollPanelDatosProcesoFacturasProductos = new JScrollPane(); this.jScrollPanelDatosEdicionProcesoFacturasProductos = new JScrollPane(); this.jScrollPanelDatosGeneralProcesoFacturasProductos = new JScrollPane(); this.jPanelCamposProcesoFacturasProductos = new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true); this.jPanelCamposOcultosProcesoFacturasProductos = new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true); this.jPanelAccionesProcesoFacturasProductos = new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true); this.jPanelAccionesFormularioProcesoFacturasProductos = new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true); //if(!this.conCargarMinimo) { ; ; //} this.sPath=" <---> Acceso: Proceso Facturas Productos"; if(!this.procesofacturasproductosSessionBean.getEsGuardarRelacionado()) { this.jScrollPanelDatosProcesoFacturasProductos.setBorder(javax.swing.BorderFactory.createTitledBorder("Datos Proceso Facturas Productoses" + this.sPath)); } else { this.jScrollPanelDatosProcesoFacturasProductos.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); } this.jScrollPanelDatosEdicionProcesoFacturasProductos.setBorder(javax.swing.BorderFactory.createTitledBorder("Edicion Datos")); this.jScrollPanelDatosGeneralProcesoFacturasProductos.setBorder(javax.swing.BorderFactory.createTitledBorder("Edicion Datos")); this.jPanelCamposProcesoFacturasProductos.setBorder(javax.swing.BorderFactory.createTitledBorder("Campos")); this.jPanelCamposProcesoFacturasProductos.setName("jPanelCamposProcesoFacturasProductos"); this.jPanelCamposOcultosProcesoFacturasProductos.setBorder(javax.swing.BorderFactory.createTitledBorder("Campos Ocultos")); this.jPanelCamposOcultosProcesoFacturasProductos.setName("jPanelCamposOcultosProcesoFacturasProductos"); this.jPanelAccionesProcesoFacturasProductos.setBorder(javax.swing.BorderFactory.createTitledBorder("Acciones")); this.jPanelAccionesProcesoFacturasProductos.setToolTipText("Acciones"); this.jPanelAccionesProcesoFacturasProductos.setName("Acciones"); this.jPanelAccionesFormularioProcesoFacturasProductos.setBorder(javax.swing.BorderFactory.createTitledBorder("Acciones Extra/Post")); this.jPanelAccionesFormularioProcesoFacturasProductos.setToolTipText("Acciones"); this.jPanelAccionesFormularioProcesoFacturasProductos.setName("Acciones"); FuncionesSwing.setBoldScrollPanel(this.jScrollPanelDatosEdicionProcesoFacturasProductos, STIPO_TAMANIO_GENERAL,false,false,this); FuncionesSwing.setBoldScrollPanel(this.jScrollPanelDatosGeneralProcesoFacturasProductos, STIPO_TAMANIO_GENERAL,false,false,this); FuncionesSwing.setBoldScrollPanel(this.jScrollPanelDatosProcesoFacturasProductos, STIPO_TAMANIO_GENERAL,false,false,this); FuncionesSwing.setBoldPanel(this.jPanelCamposProcesoFacturasProductos, STIPO_TAMANIO_GENERAL,false,false,this); FuncionesSwing.setBoldPanel(this.jPanelCamposOcultosProcesoFacturasProductos, STIPO_TAMANIO_GENERAL,false,false,this); FuncionesSwing.setBoldPanel(this.jPanelAccionesFormularioProcesoFacturasProductos, STIPO_TAMANIO_GENERAL,false,false,this); //if(!this.conCargarMinimo) { ; ; //} //ELEMENTOS TABLAS PARAMETOS if(!this.conCargarMinimo) { } //ELEMENTOS TABLAS PARAMETOS_FIN this.jButtonNuevoProcesoFacturasProductos.setText("Nuevo"); this.jButtonModificarProcesoFacturasProductos.setText("Editar"); this.jButtonActualizarProcesoFacturasProductos.setText("Actualizar"); this.jButtonEliminarProcesoFacturasProductos.setText("Eliminar"); this.jButtonCancelarProcesoFacturasProductos.setText("Cancelar"); this.jButtonGuardarCambiosProcesoFacturasProductos.setText("Guardar"); this.jButtonGuardarCambiosTablaProcesoFacturasProductos.setText("Guardar"); this.jButtonCerrarProcesoFacturasProductos.setText("Salir"); FuncionesSwing.addImagenButtonGeneral(this.jButtonNuevoProcesoFacturasProductos,"nuevo_button","Nuevo",this.procesofacturasproductosSessionBean.getEsGuardarRelacionado()); FuncionesSwing.addImagenButtonGeneral(this.jButtonModificarProcesoFacturasProductos,"modificar_button","Editar",this.procesofacturasproductosSessionBean.getEsGuardarRelacionado()); FuncionesSwing.addImagenButtonGeneral(this.jButtonActualizarProcesoFacturasProductos,"actualizar_button","Actualizar",this.procesofacturasproductosSessionBean.getEsGuardarRelacionado()); FuncionesSwing.addImagenButtonGeneral(this.jButtonEliminarProcesoFacturasProductos,"eliminar_button","Eliminar",this.procesofacturasproductosSessionBean.getEsGuardarRelacionado()); FuncionesSwing.addImagenButtonGeneral(this.jButtonCancelarProcesoFacturasProductos,"cancelar_button","Cancelar",this.procesofacturasproductosSessionBean.getEsGuardarRelacionado()); FuncionesSwing.addImagenButtonGeneral(this.jButtonGuardarCambiosProcesoFacturasProductos,"guardarcambios_button","Guardar",this.procesofacturasproductosSessionBean.getEsGuardarRelacionado()); FuncionesSwing.addImagenButtonGeneral(this.jButtonGuardarCambiosTablaProcesoFacturasProductos,"guardarcambiostabla_button","Guardar",this.procesofacturasproductosSessionBean.getEsGuardarRelacionado()); FuncionesSwing.addImagenButtonGeneral(this.jButtonCerrarProcesoFacturasProductos,"cerrar_button","Salir",this.procesofacturasproductosSessionBean.getEsGuardarRelacionado()); FuncionesSwing.setBoldButton(this.jButtonNuevoProcesoFacturasProductos, STIPO_TAMANIO_GENERAL,false,true,this); FuncionesSwing.setBoldButton(this.jButtonModificarProcesoFacturasProductos, STIPO_TAMANIO_GENERAL,false,true,this); FuncionesSwing.setBoldButton(this.jButtonGuardarCambiosProcesoFacturasProductos, STIPO_TAMANIO_GENERAL,false,true,this); FuncionesSwing.setBoldButton(this.jButtonGuardarCambiosTablaProcesoFacturasProductos, STIPO_TAMANIO_GENERAL,false,true,this); FuncionesSwing.setBoldButton(this.jButtonCerrarProcesoFacturasProductos, STIPO_TAMANIO_GENERAL,false,true,this); FuncionesSwing.setBoldButton(this.jButtonActualizarProcesoFacturasProductos, STIPO_TAMANIO_GENERAL,false,false,this); FuncionesSwing.setBoldButton(this.jButtonEliminarProcesoFacturasProductos, STIPO_TAMANIO_GENERAL,false,false,this); FuncionesSwing.setBoldButton(this.jButtonCancelarProcesoFacturasProductos, STIPO_TAMANIO_GENERAL,false,false,this); this.jButtonNuevoProcesoFacturasProductos.setToolTipText("Nuevo"+" "+ProcesoFacturasProductosConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("NUEVO")); this.jButtonModificarProcesoFacturasProductos.setToolTipText("Editar"+" "+ProcesoFacturasProductosConstantesFunciones.SCLASSWEBTITULO+"");// + FuncionesSwing.getKeyMensaje("MODIFICAR")) this.jButtonActualizarProcesoFacturasProductos.setToolTipText("Actualizar"+" "+ProcesoFacturasProductosConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("ACTUALIZAR")); this.jButtonEliminarProcesoFacturasProductos.setToolTipText("Eliminar)"+" "+ProcesoFacturasProductosConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("ELIMINAR")); this.jButtonCancelarProcesoFacturasProductos.setToolTipText("Cancelar"+" "+ProcesoFacturasProductosConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("CANCELAR")); this.jButtonGuardarCambiosProcesoFacturasProductos.setToolTipText("Guardar"+" "+ProcesoFacturasProductosConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("GUARDAR_CAMBIOS")); this.jButtonGuardarCambiosTablaProcesoFacturasProductos.setToolTipText("Guardar"+" "+ProcesoFacturasProductosConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("GUARDAR_CAMBIOS")); this.jButtonCerrarProcesoFacturasProductos.setToolTipText("Salir"+" "+ProcesoFacturasProductosConstantesFunciones.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 = "NuevoProcesoFacturasProductos"; inputMap = this.jButtonNuevoProcesoFacturasProductos.getInputMap(FuncionesSwing.getTipoFocusedKeyEvent("NORMAL")); inputMap.put(KeyStroke.getKeyStroke(FuncionesSwing.getKeyEvent("NUEVO") , FuncionesSwing.getMaskKey("NUEVO")), sMapKey); this.jButtonNuevoProcesoFacturasProductos.getActionMap().put(sMapKey, new ButtonAbstractAction(this,"NuevoProcesoFacturasProductos")); //ACTUALIZAR sMapKey = "ActualizarProcesoFacturasProductos"; inputMap = this.jButtonActualizarProcesoFacturasProductos.getInputMap(FuncionesSwing.getTipoFocusedKeyEvent("NORMAL")); inputMap.put(KeyStroke.getKeyStroke(FuncionesSwing.getKeyEvent("ACTUALIZAR") , FuncionesSwing.getMaskKey("ACTUALIZAR")), sMapKey); this.jButtonActualizarProcesoFacturasProductos.getActionMap().put(sMapKey,new ButtonAbstractAction(this,"ActualizarProcesoFacturasProductos")); //ELIMINAR sMapKey = "EliminarProcesoFacturasProductos"; inputMap = this.jButtonEliminarProcesoFacturasProductos.getInputMap(FuncionesSwing.getTipoFocusedKeyEvent("NORMAL")); inputMap.put(KeyStroke.getKeyStroke(FuncionesSwing.getKeyEvent("ELIMINAR") , FuncionesSwing.getMaskKey("ELIMINAR")), sMapKey); this.jButtonEliminarProcesoFacturasProductos.getActionMap().put(sMapKey,new ButtonAbstractAction(this,"EliminarProcesoFacturasProductos")); //CANCELAR sMapKey = "CancelarProcesoFacturasProductos"; inputMap = this.jButtonCancelarProcesoFacturasProductos.getInputMap(FuncionesSwing.getTipoFocusedKeyEvent("NORMAL")); inputMap.put(KeyStroke.getKeyStroke(FuncionesSwing.getKeyEvent("CANCELAR") , FuncionesSwing.getMaskKey("CANCELAR")), sMapKey); this.jButtonCancelarProcesoFacturasProductos.getActionMap().put(sMapKey,new ButtonAbstractAction(this,"CancelarProcesoFacturasProductos")); //CERRAR sMapKey = "CerrarProcesoFacturasProductos"; inputMap = this.jButtonCerrarProcesoFacturasProductos.getInputMap(FuncionesSwing.getTipoFocusedKeyEvent("NORMAL")); inputMap.put(KeyStroke.getKeyStroke(FuncionesSwing.getKeyEvent("CERRAR") , FuncionesSwing.getMaskKey("CERRAR")), sMapKey); this.jButtonCerrarProcesoFacturasProductos.getActionMap().put(sMapKey,new ButtonAbstractAction(this,"CerrarProcesoFacturasProductos")); //GUARDAR CAMBIOS sMapKey = "GuardarCambiosTablaProcesoFacturasProductos"; inputMap = this.jButtonGuardarCambiosTablaProcesoFacturasProductos.getInputMap(FuncionesSwing.getTipoFocusedKeyEvent("NORMAL")); inputMap.put(KeyStroke.getKeyStroke(FuncionesSwing.getKeyEvent("GUARDAR_CAMBIOS") , FuncionesSwing.getMaskKey("GUARDAR_CAMBIOS")), sMapKey); this.jButtonGuardarCambiosTablaProcesoFacturasProductos.getActionMap().put(sMapKey,new ButtonAbstractAction(this,"GuardarCambiosTablaProcesoFacturasProductos")); //HOT KEYS this.jCheckBoxPostAccionNuevoProcesoFacturasProductos = new JCheckBoxMe(); this.jCheckBoxPostAccionNuevoProcesoFacturasProductos.setText("Nuevo"); this.jCheckBoxPostAccionNuevoProcesoFacturasProductos.setToolTipText("Nuevo ProcesoFacturasProductos"); FuncionesSwing.setBoldCheckBox(this.jCheckBoxPostAccionNuevoProcesoFacturasProductos, STIPO_TAMANIO_GENERAL,false,false,this); this.jCheckBoxPostAccionSinCerrarProcesoFacturasProductos = new JCheckBoxMe(); this.jCheckBoxPostAccionSinCerrarProcesoFacturasProductos.setText("Sin Cerrar"); this.jCheckBoxPostAccionSinCerrarProcesoFacturasProductos.setToolTipText("Sin Cerrar Ventana ProcesoFacturasProductos"); FuncionesSwing.setBoldCheckBox(this.jCheckBoxPostAccionSinCerrarProcesoFacturasProductos, STIPO_TAMANIO_GENERAL,false,false,this); this.jCheckBoxPostAccionSinMensajeProcesoFacturasProductos = new JCheckBoxMe(); this.jCheckBoxPostAccionSinMensajeProcesoFacturasProductos.setText("Sin Mensaje"); this.jCheckBoxPostAccionSinMensajeProcesoFacturasProductos.setToolTipText("Sin Mensaje Confirmacion"); FuncionesSwing.setBoldCheckBox(this.jCheckBoxPostAccionSinMensajeProcesoFacturasProductos, STIPO_TAMANIO_GENERAL,false,false,this); this.jComboBoxTiposAccionesProcesoFacturasProductos = new JComboBoxMe(); //this.jComboBoxTiposAccionesProcesoFacturasProductos.setText("Accion"); this.jComboBoxTiposAccionesProcesoFacturasProductos.setToolTipText("Tipos de Acciones"); this.jComboBoxTiposAccionesFormularioProcesoFacturasProductos = new JComboBoxMe(); //this.jComboBoxTiposAccionesFormularioProcesoFacturasProductos.setText("Accion"); this.jComboBoxTiposAccionesFormularioProcesoFacturasProductos.setToolTipText("Tipos de Acciones"); this.jLabelAccionesProcesoFacturasProductos = new JLabelMe(); this.jLabelAccionesProcesoFacturasProductos.setText("Acciones"); this.jLabelAccionesProcesoFacturasProductos.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelAccionesProcesoFacturasProductos.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelAccionesProcesoFacturasProductos.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); //HOT KEYS2 /* T->Nuevo Tabla */ //NUEVO GUARDAR CAMBIOS O NUEVO TABLA //HOT KEYS2 //ELEMENTOS this.inicializarElementosCamposProcesoFacturasProductos(); //ELEMENTOS FK this.inicializarElementosCamposForeigKeysProcesoFacturasProductos(); //ELEMENTOS TABLAS PARAMETOS if(!this.conCargarMinimo) { } //ELEMENTOS TABLAS PARAMETOS_FIN //ELEMENTOS TABLAS PARAMETOS_FIN this.jTabbedPaneRelacionesProcesoFacturasProductos=new JTabbedPane(); this.jTabbedPaneRelacionesProcesoFacturasProductos.setBorder(javax.swing.BorderFactory.createTitledBorder("Datos Relacionados")); //ESTA EN BEAN FuncionesSwing.setBoldTabbedPane(this.jTabbedPaneRelacionesProcesoFacturasProductos,STIPO_TAMANIO_GENERAL,false,false,this); int iPosXAccionPaginacion=0; this.jComboBoxTiposAccionesProcesoFacturasProductos.setMinimumSize(new Dimension(145,20)); this.jComboBoxTiposAccionesProcesoFacturasProductos.setMaximumSize(new Dimension(145,20)); this.jComboBoxTiposAccionesProcesoFacturasProductos.setPreferredSize(new Dimension(145,20)); FuncionesSwing.setBoldComboBox(this.jComboBoxTiposAccionesProcesoFacturasProductos, STIPO_TAMANIO_GENERAL,false,true,this);; this.jComboBoxTiposAccionesFormularioProcesoFacturasProductos.setMinimumSize(new Dimension(145,20)); this.jComboBoxTiposAccionesFormularioProcesoFacturasProductos.setMaximumSize(new Dimension(145,20)); this.jComboBoxTiposAccionesFormularioProcesoFacturasProductos.setPreferredSize(new Dimension(145,20)); FuncionesSwing.setBoldComboBox(this.jComboBoxTiposAccionesFormularioProcesoFacturasProductos, STIPO_TAMANIO_GENERAL,false,false,this); GridBagLayout gridaBagLayoutCamposProcesoFacturasProductos = new GridBagLayout(); GridBagLayout gridaBagLayoutCamposOcultosProcesoFacturasProductos = new GridBagLayout(); this.jPanelCamposProcesoFacturasProductos.setLayout(gridaBagLayoutCamposProcesoFacturasProductos); this.jPanelCamposOcultosProcesoFacturasProductos.setLayout(gridaBagLayoutCamposOcultosProcesoFacturasProductos); ; ; //SUBPANELES SIMPLES //SUBPANELES POR CAMPO this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 0; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelidProcesoFacturasProductos.add(jLabelIdProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 1; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelidProcesoFacturasProductos.add(jLabelidProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 0; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelid_ciudadProcesoFacturasProductos.add(jLabelid_ciudadProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(this.conMostrarAccionesCampo) { this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); //this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 2; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(0, 0, 0, 0); this.jPanelid_ciudadProcesoFacturasProductos.add(jButtonid_ciudadProcesoFacturasProductosBusqueda, this.gridBagConstraintsProcesoFacturasProductos); } if(this.conMostrarAccionesCampo) { this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); //this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 3; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(0, 0, 0, 0); this.jPanelid_ciudadProcesoFacturasProductos.add(jButtonid_ciudadProcesoFacturasProductosUpdate, this.gridBagConstraintsProcesoFacturasProductos); } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 1; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelid_ciudadProcesoFacturasProductos.add(jComboBoxid_ciudadProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 0; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelid_zonaProcesoFacturasProductos.add(jLabelid_zonaProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(this.conMostrarAccionesCampo) { this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); //this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 2; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(0, 0, 0, 0); this.jPanelid_zonaProcesoFacturasProductos.add(jButtonid_zonaProcesoFacturasProductosBusqueda, this.gridBagConstraintsProcesoFacturasProductos); } if(this.conMostrarAccionesCampo) { this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); //this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 3; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(0, 0, 0, 0); this.jPanelid_zonaProcesoFacturasProductos.add(jButtonid_zonaProcesoFacturasProductosUpdate, this.gridBagConstraintsProcesoFacturasProductos); } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 1; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelid_zonaProcesoFacturasProductos.add(jComboBoxid_zonaProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 0; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelid_grupo_clienteProcesoFacturasProductos.add(jLabelid_grupo_clienteProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(this.conMostrarAccionesCampo) { this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); //this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 2; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(0, 0, 0, 0); this.jPanelid_grupo_clienteProcesoFacturasProductos.add(jButtonid_grupo_clienteProcesoFacturasProductosBusqueda, this.gridBagConstraintsProcesoFacturasProductos); } if(this.conMostrarAccionesCampo) { this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); //this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 3; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(0, 0, 0, 0); this.jPanelid_grupo_clienteProcesoFacturasProductos.add(jButtonid_grupo_clienteProcesoFacturasProductosUpdate, this.gridBagConstraintsProcesoFacturasProductos); } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 1; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelid_grupo_clienteProcesoFacturasProductos.add(jComboBoxid_grupo_clienteProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 0; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelid_vendedorProcesoFacturasProductos.add(jLabelid_vendedorProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(this.conMostrarAccionesCampo) { this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); //this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 2; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(0, 0, 0, 0); this.jPanelid_vendedorProcesoFacturasProductos.add(jButtonid_vendedorProcesoFacturasProductosBusqueda, this.gridBagConstraintsProcesoFacturasProductos); } if(this.conMostrarAccionesCampo) { this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); //this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 3; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(0, 0, 0, 0); this.jPanelid_vendedorProcesoFacturasProductos.add(jButtonid_vendedorProcesoFacturasProductosUpdate, this.gridBagConstraintsProcesoFacturasProductos); } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 1; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelid_vendedorProcesoFacturasProductos.add(jComboBoxid_vendedorProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 0; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelcodigoProcesoFacturasProductos.add(jLabelcodigoProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(this.conMostrarAccionesCampo) { this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); //this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 2; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(0, 0, 0, 0); this.jPanelcodigoProcesoFacturasProductos.add(jButtoncodigoProcesoFacturasProductosBusqueda, this.gridBagConstraintsProcesoFacturasProductos); } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 1; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelcodigoProcesoFacturasProductos.add(jTextFieldcodigoProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 0; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelnombre_completoProcesoFacturasProductos.add(jLabelnombre_completoProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(this.conMostrarAccionesCampo) { this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); //this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 2; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(0, 0, 0, 0); this.jPanelnombre_completoProcesoFacturasProductos.add(jButtonnombre_completoProcesoFacturasProductosBusqueda, this.gridBagConstraintsProcesoFacturasProductos); } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 1; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelnombre_completoProcesoFacturasProductos.add(jscrollPanenombre_completoProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 0; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelnombre_provinciaProcesoFacturasProductos.add(jLabelnombre_provinciaProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(this.conMostrarAccionesCampo) { this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); //this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 2; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(0, 0, 0, 0); this.jPanelnombre_provinciaProcesoFacturasProductos.add(jButtonnombre_provinciaProcesoFacturasProductosBusqueda, this.gridBagConstraintsProcesoFacturasProductos); } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 1; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelnombre_provinciaProcesoFacturasProductos.add(jscrollPanenombre_provinciaProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 0; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelnombre_ciudadProcesoFacturasProductos.add(jLabelnombre_ciudadProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(this.conMostrarAccionesCampo) { this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); //this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 2; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(0, 0, 0, 0); this.jPanelnombre_ciudadProcesoFacturasProductos.add(jButtonnombre_ciudadProcesoFacturasProductosBusqueda, this.gridBagConstraintsProcesoFacturasProductos); } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 1; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelnombre_ciudadProcesoFacturasProductos.add(jscrollPanenombre_ciudadProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 0; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelnombre_zonaProcesoFacturasProductos.add(jLabelnombre_zonaProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(this.conMostrarAccionesCampo) { this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); //this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 2; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(0, 0, 0, 0); this.jPanelnombre_zonaProcesoFacturasProductos.add(jButtonnombre_zonaProcesoFacturasProductosBusqueda, this.gridBagConstraintsProcesoFacturasProductos); } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 1; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelnombre_zonaProcesoFacturasProductos.add(jTextFieldnombre_zonaProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 0; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelnombre_grupo_clienteProcesoFacturasProductos.add(jLabelnombre_grupo_clienteProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(this.conMostrarAccionesCampo) { this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); //this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 2; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(0, 0, 0, 0); this.jPanelnombre_grupo_clienteProcesoFacturasProductos.add(jButtonnombre_grupo_clienteProcesoFacturasProductosBusqueda, this.gridBagConstraintsProcesoFacturasProductos); } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 1; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelnombre_grupo_clienteProcesoFacturasProductos.add(jscrollPanenombre_grupo_clienteProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 0; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelcodigo_datoProcesoFacturasProductos.add(jLabelcodigo_datoProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(this.conMostrarAccionesCampo) { this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); //this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 2; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(0, 0, 0, 0); this.jPanelcodigo_datoProcesoFacturasProductos.add(jButtoncodigo_datoProcesoFacturasProductosBusqueda, this.gridBagConstraintsProcesoFacturasProductos); } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 1; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelcodigo_datoProcesoFacturasProductos.add(jTextFieldcodigo_datoProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 0; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelnombre_completo_datoProcesoFacturasProductos.add(jLabelnombre_completo_datoProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(this.conMostrarAccionesCampo) { this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); //this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 2; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(0, 0, 0, 0); this.jPanelnombre_completo_datoProcesoFacturasProductos.add(jButtonnombre_completo_datoProcesoFacturasProductosBusqueda, this.gridBagConstraintsProcesoFacturasProductos); } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 1; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelnombre_completo_datoProcesoFacturasProductos.add(jscrollPanenombre_completo_datoProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 0; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelnumero_pre_impreso_facturaProcesoFacturasProductos.add(jLabelnumero_pre_impreso_facturaProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(this.conMostrarAccionesCampo) { this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); //this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 2; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(0, 0, 0, 0); this.jPanelnumero_pre_impreso_facturaProcesoFacturasProductos.add(jButtonnumero_pre_impreso_facturaProcesoFacturasProductosBusqueda, this.gridBagConstraintsProcesoFacturasProductos); } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 1; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelnumero_pre_impreso_facturaProcesoFacturasProductos.add(jTextFieldnumero_pre_impreso_facturaProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 0; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelnombre_productoProcesoFacturasProductos.add(jLabelnombre_productoProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(this.conMostrarAccionesCampo) { this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); //this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 2; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(0, 0, 0, 0); this.jPanelnombre_productoProcesoFacturasProductos.add(jButtonnombre_productoProcesoFacturasProductosBusqueda, this.gridBagConstraintsProcesoFacturasProductos); } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 1; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelnombre_productoProcesoFacturasProductos.add(jscrollPanenombre_productoProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 0; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelnombre_unidadProcesoFacturasProductos.add(jLabelnombre_unidadProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(this.conMostrarAccionesCampo) { this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); //this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 2; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(0, 0, 0, 0); this.jPanelnombre_unidadProcesoFacturasProductos.add(jButtonnombre_unidadProcesoFacturasProductosBusqueda, this.gridBagConstraintsProcesoFacturasProductos); } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 1; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelnombre_unidadProcesoFacturasProductos.add(jTextFieldnombre_unidadProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 0; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelprecioProcesoFacturasProductos.add(jLabelprecioProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(this.conMostrarAccionesCampo) { this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); //this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 2; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(0, 0, 0, 0); this.jPanelprecioProcesoFacturasProductos.add(jButtonprecioProcesoFacturasProductosBusqueda, this.gridBagConstraintsProcesoFacturasProductos); } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 1; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelprecioProcesoFacturasProductos.add(jTextFieldprecioProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 0; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPaneltareaProcesoFacturasProductos.add(jLabeltareaProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(this.conMostrarAccionesCampo) { this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); //this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 2; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(0, 0, 0, 0); this.jPaneltareaProcesoFacturasProductos.add(jButtontareaProcesoFacturasProductosBusqueda, this.gridBagConstraintsProcesoFacturasProductos); } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = 1; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPaneltareaProcesoFacturasProductos.add(jscrollPanetareaProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); //SUBPANELES SIMPLES //SUBPANELES EN PANEL //SUBPANELES EN PANEL CAMPOS NORMAL this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.NONE; this.gridBagConstraintsProcesoFacturasProductos.anchor = GridBagConstraints.WEST; this.gridBagConstraintsProcesoFacturasProductos.gridy = iYPanelCamposProcesoFacturasProductos; this.gridBagConstraintsProcesoFacturasProductos.gridx = iXPanelCamposProcesoFacturasProductos++; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; //COLSPAN_NUEVAFILA this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelCamposProcesoFacturasProductos.add(this.jPanelidProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(iXPanelCamposProcesoFacturasProductos % 2==0) { iXPanelCamposProcesoFacturasProductos=0; iYPanelCamposProcesoFacturasProductos++; } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.NONE; this.gridBagConstraintsProcesoFacturasProductos.anchor = GridBagConstraints.WEST; this.gridBagConstraintsProcesoFacturasProductos.gridy = iYPanelCamposProcesoFacturasProductos; this.gridBagConstraintsProcesoFacturasProductos.gridx = iXPanelCamposProcesoFacturasProductos++; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; //COLSPAN_NUEVAFILA this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelCamposProcesoFacturasProductos.add(this.jPanelid_ciudadProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(iXPanelCamposProcesoFacturasProductos % 2==0) { iXPanelCamposProcesoFacturasProductos=0; iYPanelCamposProcesoFacturasProductos++; } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.NONE; this.gridBagConstraintsProcesoFacturasProductos.anchor = GridBagConstraints.WEST; this.gridBagConstraintsProcesoFacturasProductos.gridy = iYPanelCamposProcesoFacturasProductos; this.gridBagConstraintsProcesoFacturasProductos.gridx = iXPanelCamposProcesoFacturasProductos++; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; //COLSPAN_NUEVAFILA this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelCamposProcesoFacturasProductos.add(this.jPanelid_zonaProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(iXPanelCamposProcesoFacturasProductos % 2==0) { iXPanelCamposProcesoFacturasProductos=0; iYPanelCamposProcesoFacturasProductos++; } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.NONE; this.gridBagConstraintsProcesoFacturasProductos.anchor = GridBagConstraints.WEST; this.gridBagConstraintsProcesoFacturasProductos.gridy = iYPanelCamposProcesoFacturasProductos; this.gridBagConstraintsProcesoFacturasProductos.gridx = iXPanelCamposProcesoFacturasProductos++; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; //COLSPAN_NUEVAFILA this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelCamposProcesoFacturasProductos.add(this.jPanelid_grupo_clienteProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(iXPanelCamposProcesoFacturasProductos % 2==0) { iXPanelCamposProcesoFacturasProductos=0; iYPanelCamposProcesoFacturasProductos++; } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.NONE; this.gridBagConstraintsProcesoFacturasProductos.anchor = GridBagConstraints.WEST; this.gridBagConstraintsProcesoFacturasProductos.gridy = iYPanelCamposProcesoFacturasProductos; this.gridBagConstraintsProcesoFacturasProductos.gridx = iXPanelCamposProcesoFacturasProductos++; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; //COLSPAN_NUEVAFILA this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelCamposProcesoFacturasProductos.add(this.jPanelid_vendedorProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(iXPanelCamposProcesoFacturasProductos % 2==0) { iXPanelCamposProcesoFacturasProductos=0; iYPanelCamposProcesoFacturasProductos++; } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.NONE; this.gridBagConstraintsProcesoFacturasProductos.anchor = GridBagConstraints.WEST; this.gridBagConstraintsProcesoFacturasProductos.gridy = iYPanelCamposProcesoFacturasProductos; this.gridBagConstraintsProcesoFacturasProductos.gridx = iXPanelCamposProcesoFacturasProductos++; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; //COLSPAN_NUEVAFILA this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelCamposProcesoFacturasProductos.add(this.jPanelcodigoProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(iXPanelCamposProcesoFacturasProductos % 2==0) { iXPanelCamposProcesoFacturasProductos=0; iYPanelCamposProcesoFacturasProductos++; } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.NONE; this.gridBagConstraintsProcesoFacturasProductos.anchor = GridBagConstraints.WEST; this.gridBagConstraintsProcesoFacturasProductos.gridy = iYPanelCamposProcesoFacturasProductos; this.gridBagConstraintsProcesoFacturasProductos.gridx = iXPanelCamposProcesoFacturasProductos++; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; //COLSPAN_NUEVAFILA this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelCamposProcesoFacturasProductos.add(this.jPanelnombre_completoProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(iXPanelCamposProcesoFacturasProductos % 2==0) { iXPanelCamposProcesoFacturasProductos=0; iYPanelCamposProcesoFacturasProductos++; } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.NONE; this.gridBagConstraintsProcesoFacturasProductos.anchor = GridBagConstraints.WEST; this.gridBagConstraintsProcesoFacturasProductos.gridy = iYPanelCamposProcesoFacturasProductos; this.gridBagConstraintsProcesoFacturasProductos.gridx = iXPanelCamposProcesoFacturasProductos++; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; //COLSPAN_NUEVAFILA this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelCamposProcesoFacturasProductos.add(this.jPanelnombre_provinciaProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(iXPanelCamposProcesoFacturasProductos % 2==0) { iXPanelCamposProcesoFacturasProductos=0; iYPanelCamposProcesoFacturasProductos++; } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.NONE; this.gridBagConstraintsProcesoFacturasProductos.anchor = GridBagConstraints.WEST; this.gridBagConstraintsProcesoFacturasProductos.gridy = iYPanelCamposProcesoFacturasProductos; this.gridBagConstraintsProcesoFacturasProductos.gridx = iXPanelCamposProcesoFacturasProductos++; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; //COLSPAN_NUEVAFILA this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelCamposProcesoFacturasProductos.add(this.jPanelnombre_ciudadProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(iXPanelCamposProcesoFacturasProductos % 2==0) { iXPanelCamposProcesoFacturasProductos=0; iYPanelCamposProcesoFacturasProductos++; } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.NONE; this.gridBagConstraintsProcesoFacturasProductos.anchor = GridBagConstraints.WEST; this.gridBagConstraintsProcesoFacturasProductos.gridy = iYPanelCamposProcesoFacturasProductos; this.gridBagConstraintsProcesoFacturasProductos.gridx = iXPanelCamposProcesoFacturasProductos++; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; //COLSPAN_NUEVAFILA this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelCamposProcesoFacturasProductos.add(this.jPanelnombre_zonaProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(iXPanelCamposProcesoFacturasProductos % 2==0) { iXPanelCamposProcesoFacturasProductos=0; iYPanelCamposProcesoFacturasProductos++; } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.NONE; this.gridBagConstraintsProcesoFacturasProductos.anchor = GridBagConstraints.WEST; this.gridBagConstraintsProcesoFacturasProductos.gridy = iYPanelCamposProcesoFacturasProductos; this.gridBagConstraintsProcesoFacturasProductos.gridx = iXPanelCamposProcesoFacturasProductos++; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; //COLSPAN_NUEVAFILA this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelCamposProcesoFacturasProductos.add(this.jPanelnombre_grupo_clienteProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(iXPanelCamposProcesoFacturasProductos % 2==0) { iXPanelCamposProcesoFacturasProductos=0; iYPanelCamposProcesoFacturasProductos++; } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.NONE; this.gridBagConstraintsProcesoFacturasProductos.anchor = GridBagConstraints.WEST; this.gridBagConstraintsProcesoFacturasProductos.gridy = iYPanelCamposProcesoFacturasProductos; this.gridBagConstraintsProcesoFacturasProductos.gridx = iXPanelCamposProcesoFacturasProductos++; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; //COLSPAN_NUEVAFILA this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelCamposProcesoFacturasProductos.add(this.jPanelcodigo_datoProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(iXPanelCamposProcesoFacturasProductos % 2==0) { iXPanelCamposProcesoFacturasProductos=0; iYPanelCamposProcesoFacturasProductos++; } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.NONE; this.gridBagConstraintsProcesoFacturasProductos.anchor = GridBagConstraints.WEST; this.gridBagConstraintsProcesoFacturasProductos.gridy = iYPanelCamposProcesoFacturasProductos; this.gridBagConstraintsProcesoFacturasProductos.gridx = iXPanelCamposProcesoFacturasProductos++; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; //COLSPAN_NUEVAFILA this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelCamposProcesoFacturasProductos.add(this.jPanelnombre_completo_datoProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(iXPanelCamposProcesoFacturasProductos % 2==0) { iXPanelCamposProcesoFacturasProductos=0; iYPanelCamposProcesoFacturasProductos++; } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.NONE; this.gridBagConstraintsProcesoFacturasProductos.anchor = GridBagConstraints.WEST; this.gridBagConstraintsProcesoFacturasProductos.gridy = iYPanelCamposProcesoFacturasProductos; this.gridBagConstraintsProcesoFacturasProductos.gridx = iXPanelCamposProcesoFacturasProductos++; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; //COLSPAN_NUEVAFILA this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelCamposProcesoFacturasProductos.add(this.jPanelnumero_pre_impreso_facturaProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(iXPanelCamposProcesoFacturasProductos % 2==0) { iXPanelCamposProcesoFacturasProductos=0; iYPanelCamposProcesoFacturasProductos++; } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.NONE; this.gridBagConstraintsProcesoFacturasProductos.anchor = GridBagConstraints.WEST; this.gridBagConstraintsProcesoFacturasProductos.gridy = iYPanelCamposProcesoFacturasProductos; this.gridBagConstraintsProcesoFacturasProductos.gridx = iXPanelCamposProcesoFacturasProductos++; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; //COLSPAN_NUEVAFILA this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelCamposProcesoFacturasProductos.add(this.jPanelnombre_productoProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(iXPanelCamposProcesoFacturasProductos % 2==0) { iXPanelCamposProcesoFacturasProductos=0; iYPanelCamposProcesoFacturasProductos++; } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.NONE; this.gridBagConstraintsProcesoFacturasProductos.anchor = GridBagConstraints.WEST; this.gridBagConstraintsProcesoFacturasProductos.gridy = iYPanelCamposProcesoFacturasProductos; this.gridBagConstraintsProcesoFacturasProductos.gridx = iXPanelCamposProcesoFacturasProductos++; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; //COLSPAN_NUEVAFILA this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelCamposProcesoFacturasProductos.add(this.jPanelnombre_unidadProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(iXPanelCamposProcesoFacturasProductos % 2==0) { iXPanelCamposProcesoFacturasProductos=0; iYPanelCamposProcesoFacturasProductos++; } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.NONE; this.gridBagConstraintsProcesoFacturasProductos.anchor = GridBagConstraints.WEST; this.gridBagConstraintsProcesoFacturasProductos.gridy = iYPanelCamposProcesoFacturasProductos; this.gridBagConstraintsProcesoFacturasProductos.gridx = iXPanelCamposProcesoFacturasProductos++; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; //COLSPAN_NUEVAFILA this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelCamposProcesoFacturasProductos.add(this.jPanelprecioProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(iXPanelCamposProcesoFacturasProductos % 2==0) { iXPanelCamposProcesoFacturasProductos=0; iYPanelCamposProcesoFacturasProductos++; } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.NONE; this.gridBagConstraintsProcesoFacturasProductos.anchor = GridBagConstraints.WEST; this.gridBagConstraintsProcesoFacturasProductos.gridy = iYPanelCamposProcesoFacturasProductos; this.gridBagConstraintsProcesoFacturasProductos.gridx = iXPanelCamposProcesoFacturasProductos++; this.gridBagConstraintsProcesoFacturasProductos.ipadx = 0; //COLSPAN_NUEVAFILA this.gridBagConstraintsProcesoFacturasProductos.insets = new Insets(Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING_LEFT, Constantes2.I_CELLSPACING, Constantes2.I_CELLSPACING); this.jPanelCamposProcesoFacturasProductos.add(this.jPaneltareaProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); if(iXPanelCamposProcesoFacturasProductos % 2==0) { iXPanelCamposProcesoFacturasProductos=0; iYPanelCamposProcesoFacturasProductos++; } //SUBPANELES EN PANEL CAMPOS OCULTOS //SUBPANELES EN PANEL CAMPOS INICIO //SUBPANELES EN PANEL CAMPOS FIN //SUBPANELES EN PANEL //ELEMENTOS TABLAS PARAMETOS //SUBPANELES POR CAMPO if(!this.conCargarMinimo) { //SUBPANELES EN PANEL CAMPOS } //ELEMENTOS TABLAS PARAMETOS_FIN Integer iGridXParametrosAccionesFormulario=0; Integer iGridYParametrosAccionesFormulario=0; GridBagLayout gridaBagLayoutAccionesProcesoFacturasProductos= new GridBagLayout(); this.jPanelAccionesProcesoFacturasProductos.setLayout(gridaBagLayoutAccionesProcesoFacturasProductos); GridBagLayout gridaBagLayoutAccionesFormularioProcesoFacturasProductos= new GridBagLayout(); this.jPanelAccionesFormularioProcesoFacturasProductos.setLayout(gridaBagLayoutAccionesFormularioProcesoFacturasProductos); this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.gridy = iGridYParametrosAccionesFormulario; this.gridBagConstraintsProcesoFacturasProductos.gridx = iGridXParametrosAccionesFormulario++; this.jPanelAccionesFormularioProcesoFacturasProductos.add(this.jComboBoxTiposAccionesFormularioProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); int iPosXAccion=0; this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = iPosXAccion++; this.jPanelAccionesProcesoFacturasProductos.add(this.jButtonModificarProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx =iPosXAccion++; this.jPanelAccionesProcesoFacturasProductos.add(this.jButtonEliminarProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = iPosXAccion++; this.jPanelAccionesProcesoFacturasProductos.add(this.jButtonActualizarProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx = iPosXAccion++; this.jPanelAccionesProcesoFacturasProductos.add(this.jButtonGuardarCambiosProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.gridy = 0; this.gridBagConstraintsProcesoFacturasProductos.gridx =iPosXAccion++; this.jPanelAccionesProcesoFacturasProductos.add(this.jButtonCancelarProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); //this.setJProgressBarToJPanel(); GridBagLayout gridaBagLayoutProcesoFacturasProductos = new GridBagLayout(); this.jContentPane.setLayout(gridaBagLayoutProcesoFacturasProductos); if(this.parametroGeneralUsuario.getcon_botones_tool_bar() && !this.procesofacturasproductosSessionBean.getEsGuardarRelacionado()) { this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.gridy = iGridyPrincipal++; this.gridBagConstraintsProcesoFacturasProductos.gridx = 0; //this.gridBagConstraintsProcesoFacturasProductos.fill =GridBagConstraints.VERTICAL; this.gridBagConstraintsProcesoFacturasProductos.anchor = GridBagConstraints.CENTER;//.CENTER;NORTH this.gridBagConstraintsProcesoFacturasProductos.ipadx = 100; } //PROCESANDO EN OTRA PANTALLA int iGridxBusquedasParametros=0; //PARAMETROS TABLAS PARAMETROS if(!this.conCargarMinimo) { //NO BUSQUEDA } //PARAMETROS TABLAS PARAMETROS_FIN //PARAMETROS REPORTES this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.gridy =iGridyPrincipal++; this.gridBagConstraintsProcesoFacturasProductos.gridx =0; this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.BOTH; //this.gridBagConstraintsProcesoFacturasProductos.ipady =150; this.jContentPane.add(this.jScrollPanelDatosProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); iWidthScroll=(screenSize.width-screenSize.width/Constantes.ISWING_RESTOPARTE_DIFERENCIA_ANCHO_RELSCROLL)+(250*1); iHeightScroll=(screenSize.height-screenSize.height/Constantes.ISWING_RESTOPARTE_DIFERENCIA_ALTO_RELSCROLL); //if(ProcesoFacturasProductosJInternalFrame.CON_DATOS_FRAME) { //this.jInternalFrameDetalleProcesoFacturasProductos = new ProcesoFacturasProductosBeanSwingJInternalFrameAdditional();//JInternalFrameBase("Proceso Facturas Productos DATOS"); this.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE); //this.setjInternalFrameParent(this); iHeightFormularioMaximo=(screenSize.height-screenSize.height/Constantes.ISWING_RESTOPARTE_DIFERENCIA_ALTO); if(iHeightFormulario>iHeightFormularioMaximo) { iHeightFormulario=iHeightFormularioMaximo; } iWidthFormularioMaximo=(screenSize.width-screenSize.width/Constantes.ISWING_RESTOPARTE_DIFERENCIA_ANCHO); if(iWidthFormulario>iWidthFormularioMaximo) { iWidthFormulario=iWidthFormularioMaximo; } //this.setTitle("[FOR] - Proceso Facturas Productos DATOS"); this.setTitle(Funciones.GetTituloSistema(this.parametroGeneralSg,this.moduloActual,this.usuarioActual,"Proceso Facturas Productos Formulario",PaginaTipo.FORMULARIO,paginaTipo)); this.setSize(iWidthFormulario,iHeightFormulario); this.setLocation(xOffset*(openFrameCount + Constantes.INUM_MAX_VENTANAS_DET_X), yOffset*(openFrameCount+Constantes.INUM_MAX_VENTANAS_DET_Y)); this.setResizable(true); this.setClosable(true); this.setMaximizable(true); ProcesoFacturasProductosModel procesofacturasproductosModel=new ProcesoFacturasProductosModel(this); //SI USARA CLASE INTERNA //ProcesoFacturasProductosModel.ProcesoFacturasProductosFocusTraversalPolicy procesofacturasproductosFocusTraversalPolicy = procesofacturasproductosModel.new ProcesoFacturasProductosFocusTraversalPolicy(this); //procesofacturasproductosFocusTraversalPolicy.setprocesofacturasproductosJInternalFrame(this); this.setFocusTraversalPolicy(procesofacturasproductosModel); this.jContentPaneDetalleProcesoFacturasProductos = new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true);//new JPanel(); int iGridyRelaciones=0; GridBagLayout gridaBagLayoutDetalleProcesoFacturasProductos = new GridBagLayout(); this.jContentPaneDetalleProcesoFacturasProductos.setLayout(gridaBagLayoutDetalleProcesoFacturasProductos); GridBagLayout gridaBagLayoutBusquedasParametrosProcesoFacturasProductos = new GridBagLayout(); if(this.parametroGeneralUsuario.getcon_botones_tool_bar()) { //AGREGA TOOLBAR DETALLE A PANTALLA this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.gridy = iGridyRelaciones++; this.gridBagConstraintsProcesoFacturasProductos.gridx = 0; this.jContentPaneDetalleProcesoFacturasProductos.add(jTtoolBarDetalleProcesoFacturasProductos, gridBagConstraintsProcesoFacturasProductos); } this.jScrollPanelDatosEdicionProcesoFacturasProductos= new JScrollPane(jContentPaneDetalleProcesoFacturasProductos,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); this.jScrollPanelDatosEdicionProcesoFacturasProductos.setMinimumSize(new Dimension(iWidthScroll,iHeightScroll)); this.jScrollPanelDatosEdicionProcesoFacturasProductos.setMaximumSize(new Dimension(iWidthScroll,iHeightScroll)); this.jScrollPanelDatosEdicionProcesoFacturasProductos.setPreferredSize(new Dimension(iWidthScroll,iHeightScroll)); this.jScrollPanelDatosGeneralProcesoFacturasProductos= new JScrollPane(jContentPane,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); this.jScrollPanelDatosGeneralProcesoFacturasProductos.setMinimumSize(new Dimension(iWidthScroll,iHeightScroll)); this.jScrollPanelDatosGeneralProcesoFacturasProductos.setMaximumSize(new Dimension(iWidthScroll,iHeightScroll)); this.jScrollPanelDatosGeneralProcesoFacturasProductos.setPreferredSize(new Dimension(iWidthScroll,iHeightScroll)); this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.gridy = iGridyRelaciones++; this.gridBagConstraintsProcesoFacturasProductos.gridx = 0; this.jContentPaneDetalleProcesoFacturasProductos.add(jPanelCamposProcesoFacturasProductos, gridBagConstraintsProcesoFacturasProductos); //if(!this.conCargarMinimo) { ; //} this.conMaximoRelaciones=true; if(this.parametroGeneralUsuario.getcon_cargar_por_parte()) { } //CARGA O NO CARGA RELACIONADOS(MAESTRO DETALLE) // ABAJO VIENE DE PARAMETRO GENERAL USUARIO if(conMaximoRelaciones) { // && this.conFuncionalidadRelaciones) { if(!this.conCargarMinimo) { if(cargarRelaciones //&& procesofacturasproductosSessionBean.getConGuardarRelaciones() ) { //paraCargarPorParte es false por defecto(y ejecuta funcion normal cargando detalle en tab panel), si se utiliza funcionalidad es true y carga tab panel auxiliar temporal if(this.procesofacturasproductosSessionBean.getConGuardarRelaciones()) { this.gridBagConstraintsProcesoFacturasProductos= new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.gridy = iGridyRelaciones++; this.gridBagConstraintsProcesoFacturasProductos.gridx = 0; this.jContentPaneDetalleProcesoFacturasProductos.add(this.jTabbedPaneRelacionesProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); } //RELACIONES OTROS AGRUPADOS ; } else { //this.jButtonNuevoRelacionesProcesoFacturasProductos.setVisible(false); } } } Boolean tieneColumnasOcultas=false; if(!Constantes.ISDEVELOPING) { this.jPanelCamposOcultosProcesoFacturasProductos.setVisible(false); } else { if(tieneColumnasOcultas) { this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.fill=GridBagConstraints.NONE; this.gridBagConstraintsProcesoFacturasProductos.anchor = GridBagConstraints.WEST; this.gridBagConstraintsProcesoFacturasProductos.gridy = iGridyRelaciones++; this.gridBagConstraintsProcesoFacturasProductos.gridx = 0; this.jContentPaneDetalleProcesoFacturasProductos.add(jPanelCamposOcultosProcesoFacturasProductos, gridBagConstraintsProcesoFacturasProductos); this.jPanelCamposOcultosProcesoFacturasProductos.setVisible(true); } } this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.gridy = iGridyRelaciones++;//1; this.gridBagConstraintsProcesoFacturasProductos.gridx = 0; this.gridBagConstraintsProcesoFacturasProductos.anchor = GridBagConstraints.CENTER;//WEST; this.jContentPaneDetalleProcesoFacturasProductos.add(this.jPanelAccionesFormularioProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.gridy = iGridyRelaciones;//1; this.gridBagConstraintsProcesoFacturasProductos.gridx = 0; this.jContentPaneDetalleProcesoFacturasProductos.add(this.jPanelAccionesProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); //this.setContentPane(jScrollPanelDatosEdicionProcesoFacturasProductos); //} 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) /* this.jScrollPanelDatosEdicionProcesoFacturasProductos= new JScrollPane(this.jPanelCamposProcesoFacturasProductos,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); this.jScrollPanelDatosEdicionProcesoFacturasProductos.setMinimumSize(new Dimension(iWidthScroll,iHeightScroll)); this.jScrollPanelDatosEdicionProcesoFacturasProductos.setMaximumSize(new Dimension(iWidthScroll,iHeightScroll)); this.jScrollPanelDatosEdicionProcesoFacturasProductos.setPreferredSize(new Dimension(iWidthScroll,iHeightScroll)); this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.gridy = iGridyPrincipal++; this.gridBagConstraintsProcesoFacturasProductos.gridx = 0; this.gridBagConstraintsProcesoFacturasProductos.fill = GridBagConstraints.BOTH; this.gridBagConstraintsProcesoFacturasProductos.ipady = this.getSize().height-yOffset*3; this.gridBagConstraintsProcesoFacturasProductos.anchor = GridBagConstraints.WEST; this.jContentPane.add(this.jScrollPanelDatosEdicionProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); //ACCIONES FORMULARIO this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.gridy =iGridyPrincipal++; this.gridBagConstraintsProcesoFacturasProductos.gridx = 0; this.jContentPane.add(this.jPanelAccionesFormularioProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.gridy =iGridyPrincipal++; this.gridBagConstraintsProcesoFacturasProductos.gridx = 0; this.jContentPane.add(this.jPanelAccionesProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); */ //} //DISENO_DETALLE-(Descomentar) /* this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.gridy = iGridyPrincipal++; this.gridBagConstraintsProcesoFacturasProductos.gridx = 0; this.jContentPane.add(this.jPanelCamposProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.gridy = iGridyPrincipal++; this.gridBagConstraintsProcesoFacturasProductos.gridx = 0; this.jContentPane.add(this.jPanelCamposOcultosProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); this.gridBagConstraintsProcesoFacturasProductos = new GridBagConstraints(); this.gridBagConstraintsProcesoFacturasProductos.gridy =iGridyPrincipal++; this.gridBagConstraintsProcesoFacturasProductos.gridx =0; this.jContentPane.add(this.jPanelAccionesProcesoFacturasProductos, this.gridBagConstraintsProcesoFacturasProductos); */ //pack(); //return this.jScrollPanelDatosGeneralProcesoFacturasProductos;//jContentPane; return jScrollPanelDatosEdicionProcesoFacturasProductos; } /* case "CONTROL_BUSQUEDA": sKeyName="F3"; case "CONTROL_BUSCAR": sKeyName="F4"; case "CONTROL_ARBOL": sKeyName="F5"; case "CONTROL_ACTUALIZAR": sKeyName="F6"; sKeyName="N"; */ }
92406eff294c124668914b1e2e1c6a10ae68d8d4
344
java
Java
pinkong-admin/src/main/java/com/pinkong/dao/PmsProductLadderDao.java
pzTest2015/mall-swarm
5662c3f190478d33c70fd77f5410b494a156c5b4
[ "Apache-2.0" ]
null
null
null
pinkong-admin/src/main/java/com/pinkong/dao/PmsProductLadderDao.java
pzTest2015/mall-swarm
5662c3f190478d33c70fd77f5410b494a156c5b4
[ "Apache-2.0" ]
null
null
null
pinkong-admin/src/main/java/com/pinkong/dao/PmsProductLadderDao.java
pzTest2015/mall-swarm
5662c3f190478d33c70fd77f5410b494a156c5b4
[ "Apache-2.0" ]
null
null
null
19.111111
76
0.715116
1,001,515
package com.pinkong.dao; import com.pinkong.model.PmsProductLadder; import org.apache.ibatis.annotations.Param; import java.util.List; /** * 自定义会员阶梯价格Dao * Created by pinkong on 2018/4/26. */ public interface PmsProductLadderDao { /** * 批量创建 */ int insertList(@Param("list") List<PmsProductLadder> productLadderList); }
92406fb716da45eab9f6681d6b84448aa8567d7f
4,133
java
Java
languages/languageDesign/structure/source_gen/jetbrains/mps/lang/structure/structure/EnumerationDescriptor_ValueOperationMigrationStrategy.java
trespasserw/MPS
dbc5c76496e8ccef46dd420eefcd5089b1bc234b
[ "Apache-2.0" ]
null
null
null
languages/languageDesign/structure/source_gen/jetbrains/mps/lang/structure/structure/EnumerationDescriptor_ValueOperationMigrationStrategy.java
trespasserw/MPS
dbc5c76496e8ccef46dd420eefcd5089b1bc234b
[ "Apache-2.0" ]
null
null
null
languages/languageDesign/structure/source_gen/jetbrains/mps/lang/structure/structure/EnumerationDescriptor_ValueOperationMigrationStrategy.java
trespasserw/MPS
dbc5c76496e8ccef46dd420eefcd5089b1bc234b
[ "Apache-2.0" ]
null
null
null
56.616438
303
0.817808
1,001,516
package jetbrains.mps.lang.structure.structure; /*Generated by MPS */ import jetbrains.mps.smodel.runtime.EnumerationDescriptorBase; import jetbrains.mps.smodel.runtime.EnumerationDescriptor; import jetbrains.mps.lang.smodel.EnumerationLiteralsIndex; import java.util.List; import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.NotNull; public class EnumerationDescriptor_ValueOperationMigrationStrategy extends EnumerationDescriptorBase { public EnumerationDescriptor_ValueOperationMigrationStrategy() { super(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0x5a14f103596433bdL, "ValueOperationMigrationStrategy", "r:00000000-0000-4000-0000-011c89590292(jetbrains.mps.lang.structure.structure)/6491077959634662333"); } private final EnumerationDescriptor.MemberDescriptor myMember_string_name_0 = new EnumerationDescriptor.MemberDescriptor("string_name", "string_name", 0x5a14f103596433beL, "r:00000000-0000-4000-0000-011c89590292(jetbrains.mps.lang.structure.structure)/6491077959634662334"); private final EnumerationDescriptor.MemberDescriptor myMember_string_presentation_0 = new EnumerationDescriptor.MemberDescriptor("string_presentation", "string_presentation", 0x5a14f103596433bfL, "r:00000000-0000-4000-0000-011c89590292(jetbrains.mps.lang.structure.structure)/6491077959634662335"); private final EnumerationDescriptor.MemberDescriptor myMember_boolean_0 = new EnumerationDescriptor.MemberDescriptor("boolean", "boolean", 0x5a14f103596433c6L, "r:00000000-0000-4000-0000-011c89590292(jetbrains.mps.lang.structure.structure)/6491077959634662342"); private final EnumerationDescriptor.MemberDescriptor myMember_int_ordinal_0 = new EnumerationDescriptor.MemberDescriptor("int_ordinal", "int_ordinal", 0x5a14f103596433cbL, "r:00000000-0000-4000-0000-011c89590292(jetbrains.mps.lang.structure.structure)/6491077959634662347"); private final EnumerationDescriptor.MemberDescriptor myMember_int_ordinal_plus_one_0 = new EnumerationDescriptor.MemberDescriptor("int_ordinal_plus_one", "int_ordinal_plus_one", 0x5a14f103596433d1L, "r:00000000-0000-4000-0000-011c89590292(jetbrains.mps.lang.structure.structure)/6491077959634662353"); private final EnumerationDescriptor.MemberDescriptor myMember_by_custom_methods_0 = new EnumerationDescriptor.MemberDescriptor("by_custom_methods", "by_custom_methods", 0x5a14f103596433d8L, "r:00000000-0000-4000-0000-011c89590292(jetbrains.mps.lang.structure.structure)/6491077959634662360"); private final EnumerationLiteralsIndex myIndex = EnumerationLiteralsIndex.build(0xc72da2b97cce4447L, 0x8389f407dc1158b7L, 0x5a14f103596433bdL, 0x5a14f103596433beL, 0x5a14f103596433bfL, 0x5a14f103596433c6L, 0x5a14f103596433cbL, 0x5a14f103596433d1L, 0x5a14f103596433d8L); private final List<EnumerationDescriptor.MemberDescriptor> myMembers = new EnumerationDescriptorBase.MembersList(myIndex, myMember_string_name_0, myMember_string_presentation_0, myMember_boolean_0, myMember_int_ordinal_0, myMember_int_ordinal_plus_one_0, myMember_by_custom_methods_0); @Nullable @Override public EnumerationDescriptor.MemberDescriptor getDefault() { return null; } @NotNull @Override public List<EnumerationDescriptor.MemberDescriptor> getMembers() { return myMembers; } @Nullable @Override public EnumerationDescriptor.MemberDescriptor getMember(@Nullable String memberName) { if (memberName == null) { return null; } switch (memberName) { case "string_name": return myMember_string_name_0; case "string_presentation": return myMember_string_presentation_0; case "boolean": return myMember_boolean_0; case "int_ordinal": return myMember_int_ordinal_0; case "int_ordinal_plus_one": return myMember_int_ordinal_plus_one_0; case "by_custom_methods": return myMember_by_custom_methods_0; } return null; } @Nullable @Override public EnumerationDescriptor.MemberDescriptor getMember(long idValue) { int index = myIndex.index(idValue); if (index == -1) { return null; } return myMembers.get(index); } }
92407044966dfba9838e3fdbbf047bbab3476350
1,728
java
Java
src/test/java/at/uibk/dps/ee/enactables/serverless/FunctionFactoryServerlessTest.java
FedorSmirnov89/EE-Enactables
e96f784eeaf3f741c64b61b2ec5390d0d885648d
[ "Apache-2.0" ]
null
null
null
src/test/java/at/uibk/dps/ee/enactables/serverless/FunctionFactoryServerlessTest.java
FedorSmirnov89/EE-Enactables
e96f784eeaf3f741c64b61b2ec5390d0d885648d
[ "Apache-2.0" ]
null
null
null
src/test/java/at/uibk/dps/ee/enactables/serverless/FunctionFactoryServerlessTest.java
FedorSmirnov89/EE-Enactables
e96f784eeaf3f741c64b61b2ec5390d0d885648d
[ "Apache-2.0" ]
null
null
null
43.2
95
0.795718
1,001,517
package at.uibk.dps.ee.enactables.serverless; import static org.junit.jupiter.api.Assertions.*; import at.uibk.dps.ee.core.function.EnactmentFunction; import at.uibk.dps.ee.enactables.FactoryInputUser; import at.uibk.dps.ee.guice.starter.VertxProvider; import at.uibk.dps.ee.model.properties.PropertyServiceFunctionUser; import at.uibk.dps.ee.model.properties.PropertyServiceMapping; import at.uibk.dps.ee.model.properties.PropertyServiceResourceServerless; import io.vertx.ext.web.client.WebClient; import at.uibk.dps.ee.model.properties.PropertyServiceMapping.EnactmentMode; import net.sf.opendse.model.Mapping; import net.sf.opendse.model.Resource; import net.sf.opendse.model.Task; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; import java.util.HashSet; import org.junit.jupiter.api.Test; public class FunctionFactoryServerlessTest { @Test public void test() { WebClient mockClient = mock(WebClient.class); VertxProvider vProv = mock(VertxProvider.class); when(vProv.getWebClient()).thenReturn(mockClient); FunctionFactoryServerless tested = new FunctionFactoryServerless(new HashSet<>(), vProv); Resource slRes = PropertyServiceResourceServerless.createServerlessResource("res", "link"); Task task = PropertyServiceFunctionUser.createUserTask("task", "addition"); Mapping<Task, Resource> mapping = PropertyServiceMapping.createMapping(task, slRes, EnactmentMode.Serverless, "link"); EnactmentFunction result = tested.makeFunction(new FactoryInputUser(task, mapping)); assertTrue(result instanceof ServerlessFunction); ServerlessFunction slResult = (ServerlessFunction) result; assertEquals("link", slResult.getFaaSUrl()); } }
9240717f9cc0475734394226fe1042515cb40f4e
1,269
java
Java
restclient/src/test/java/io/jaegertracing/qe/restclient/SimpleTest.java
PikBot/jaeger-performance
6bd42922b2c5d1c3cb6c5bcb12e28922d7e2bfd7
[ "Apache-2.0" ]
null
null
null
restclient/src/test/java/io/jaegertracing/qe/restclient/SimpleTest.java
PikBot/jaeger-performance
6bd42922b2c5d1c3cb6c5bcb12e28922d7e2bfd7
[ "Apache-2.0" ]
null
null
null
restclient/src/test/java/io/jaegertracing/qe/restclient/SimpleTest.java
PikBot/jaeger-performance
6bd42922b2c5d1c3cb6c5bcb12e28922d7e2bfd7
[ "Apache-2.0" ]
null
null
null
33.394737
100
0.725768
1,001,518
/** * Copyright 2018 The Jaeger 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.jaegertracing.qe.restclient; import io.jaegertracing.qe.restclient.model.Datum; import java.util.Arrays; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import org.junit.Ignore; import org.junit.Test; public class SimpleTest { @Ignore @Test public void simpleTest() { SimpleRestClient simpleRestClient = new SimpleRestClient(); Map<String, List<String>> queryParameters = new LinkedHashMap<>(); queryParameters.put("limit", Arrays.asList("1")); List<Datum> traces = simpleRestClient.getTraces(queryParameters, 1); System.out.println("Got " + traces.size() + " Traces "); } }
924071cac90e466c5829e2fd474b12b526acc83f
7,516
java
Java
app/src/main/java/com/andyccs/ntucsrepo/ResourceListFragment.java
Andyccs/ntucs-android
90ab3b5a47bd4e0dc03c980b002cd7071ef2befb
[ "MIT" ]
null
null
null
app/src/main/java/com/andyccs/ntucsrepo/ResourceListFragment.java
Andyccs/ntucs-android
90ab3b5a47bd4e0dc03c980b002cd7071ef2befb
[ "MIT" ]
null
null
null
app/src/main/java/com/andyccs/ntucsrepo/ResourceListFragment.java
Andyccs/ntucs-android
90ab3b5a47bd4e0dc03c980b002cd7071ef2befb
[ "MIT" ]
null
null
null
34.635945
93
0.727382
1,001,519
package com.andyccs.ntucsrepo; import com.google.firebase.crash.FirebaseCrash; import com.google.firebase.database.DataSnapshot; import com.google.firebase.database.DatabaseError; import com.google.firebase.database.DatabaseReference; import com.google.firebase.database.FirebaseDatabase; import com.google.firebase.database.GenericTypeIndicator; import com.google.firebase.database.ValueEventListener; import android.content.Context; import android.content.Intent; import android.net.ConnectivityManager; import android.net.NetworkInfo; import android.net.Uri; import android.os.Bundle; import android.support.design.widget.Snackbar; import android.support.v4.app.Fragment; 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 android.widget.LinearLayout; import com.andyccs.ntucsrepo.models.ResourceModel; import com.andyccs.ntucsrepo.shares.CommonActivityMethods; import com.andyccs.ntucsrepo.shares.RecycleItemClickListener; import com.andyccs.ntucsrepo.shares.ResourceType; import java.util.List; public class ResourceListFragment extends Fragment { private static final String RESOURCE_TYPE_PARAM = "resource_type"; private OnResourceSelectedListener onResourceSelectedListener; private CommonActivityMethods commonActivityMethods; private ResourceListAdapter resourceListAdapter; private LinearLayout progressLayout; private String resourceType; public ResourceListFragment() { // Required empty public constructor } /** * Use this factory method to create a new instance of * this fragment using the provided parameters. * * @param resourceType Parameter 1. * @return A new instance of fragment ResourceListFragment. */ public static ResourceListFragment newInstance(String resourceType) { ResourceListFragment fragment = new ResourceListFragment(); Bundle args = new Bundle(); args.putString(RESOURCE_TYPE_PARAM, resourceType); fragment.setArguments(args); return fragment; } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (getArguments() == null) { RuntimeException exception = new NullPointerException( "You must provide resource type param to ResourceListFragment"); FirebaseCrash.report(exception); throw exception; } resourceType = getArguments().getString(RESOURCE_TYPE_PARAM); if (resourceType == null) { RuntimeException exception = new NullPointerException( "You must provide resource type param to ResourceListFragment"); FirebaseCrash.report(exception); throw exception; } } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { commonActivityMethods.setToolbarTitle(ResourceType.getName(getActivity(), resourceType)); View view = inflater.inflate(R.layout.fragment_resource_list, container, false); progressLayout = (LinearLayout) view.findViewById(R.id.progress_layout); RecyclerView resourceList = (RecyclerView) view.findViewById(R.id.resource_list); resourceList.setHasFixedSize(true); LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getActivity()); resourceList.setLayoutManager(linearLayoutManager); resourceListAdapter = new ResourceListAdapter(getActivity()); resourceList.setAdapter(resourceListAdapter); RecycleItemClickListener.OnItemClickListener onItemClickListener = new RecycleItemClickListener.OnItemClickListener() { @Override public void onItemClick(View view, int position) { ResourceModel selectedResouce = resourceListAdapter.getItem(position); onResourceSelectedListener.onResourceSelected(selectedResouce); String link = null; if (selectedResouce.getLink() != null) { link = selectedResouce.getLink(); } else if (selectedResouce.getGithub() != null) { link = selectedResouce.getGithub(); } if (link == null) { Snackbar.make(view, getString(R.string.no_resource_found), Snackbar.LENGTH_SHORT).show(); return; } Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(link)); startActivity(browserIntent); } }; resourceList.addOnItemTouchListener( new RecycleItemClickListener(getActivity(), onItemClickListener)); checkNetworkAndReadData(); return view; } private void checkNetworkAndReadData() { if (!isNetworkAvailable()) { Snackbar snackbar = Snackbar.make( getActivity().findViewById(android.R.id.content), getString(R.string.no_internet_connection), Snackbar.LENGTH_LONG); snackbar.show(); } readFromDatabase(); } private void readFromDatabase() { FirebaseDatabase database = FirebaseDatabase.getInstance(); DatabaseReference databaseReference = database.getReference(resourceType); ValueEventListener valueEventListener = new ValueEventListener() { @Override public void onDataChange(DataSnapshot dataSnapshot) { progressLayout.setVisibility(View.GONE); GenericTypeIndicator<List<ResourceModel>> type = new GenericTypeIndicator<List<ResourceModel>>() { }; List<ResourceModel> resourceModels = dataSnapshot.getValue(type); resourceListAdapter.addAll(resourceModels); resourceListAdapter.notifyDataSetChanged(); } @Override public void onCancelled(DatabaseError databaseError) { // Failed to read value FirebaseCrash.report(databaseError.toException()); progressLayout.setVisibility(View.GONE); Snackbar.make( getActivity().findViewById(android.R.id.content), getString(R.string.try_again), Snackbar.LENGTH_LONG).show(); } }; databaseReference.addListenerForSingleValueEvent(valueEventListener); } @Override public void onAttach(Context context) { super.onAttach(context); if (context instanceof OnResourceSelectedListener) { onResourceSelectedListener = (OnResourceSelectedListener) context; } else { RuntimeException exception = new RuntimeException(context.toString() + " must implement OnResourceSelectedListener"); FirebaseCrash.report(exception); throw exception; } if (context instanceof CommonActivityMethods) { commonActivityMethods = (CommonActivityMethods) context; } else { RuntimeException exception = new RuntimeException(context.toString() + " must implement SetToolbarTitle"); FirebaseCrash.report(exception); throw exception; } } @Override public void onDetach() { super.onDetach(); onResourceSelectedListener = null; } private boolean isNetworkAvailable() { ConnectivityManager connectivityManager = (ConnectivityManager) getActivity().getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo activeNetworkInfo = connectivityManager.getActiveNetworkInfo(); return activeNetworkInfo != null && activeNetworkInfo.isConnected(); } public interface OnResourceSelectedListener { void onResourceSelected(ResourceModel resourceModel); } }
924071d8cb761086baf570c11f264314883735b1
18,406
java
Java
projects/OG-Bloomberg/src/main/java/com/opengamma/bbg/component/BloombergBpipePermissionCheckProviderComponentFactory.java
UbuntuEvangelist/OG-Platform
0aac9675ff92fd702d2e53a991de085388bfdc83
[ "Apache-2.0" ]
12
2017-03-10T13:56:52.000Z
2021-10-03T01:21:20.000Z
projects/OG-Bloomberg/src/main/java/com/opengamma/bbg/component/BloombergBpipePermissionCheckProviderComponentFactory.java
UbuntuEvangelist/OG-Platform
0aac9675ff92fd702d2e53a991de085388bfdc83
[ "Apache-2.0" ]
1
2021-08-02T17:20:43.000Z
2021-08-02T17:20:43.000Z
projects/OG-Bloomberg/src/main/java/com/opengamma/bbg/component/BloombergBpipePermissionCheckProviderComponentFactory.java
UbuntuEvangelist/OG-Platform
0aac9675ff92fd702d2e53a991de085388bfdc83
[ "Apache-2.0" ]
16
2017-01-12T10:31:58.000Z
2019-04-19T08:17:33.000Z
37.950515
151
0.691296
1,001,520
/** * Copyright (C) 2012 - present by OpenGamma Inc. and the OpenGamma group of companies * * Please see distribution for license. */ package com.opengamma.bbg.component; import java.util.LinkedHashMap; import java.util.Map; import org.joda.beans.Bean; import org.joda.beans.BeanBuilder; import org.joda.beans.BeanDefinition; import org.joda.beans.JodaBeanUtils; import org.joda.beans.MetaProperty; import org.joda.beans.Property; import org.joda.beans.PropertyDefinition; import org.joda.beans.impl.direct.DirectBeanBuilder; import org.joda.beans.impl.direct.DirectMetaProperty; import org.joda.beans.impl.direct.DirectMetaPropertyMap; import org.threeten.bp.Duration; import com.opengamma.bbg.BloombergConnector; import com.opengamma.bbg.BloombergPermissions; import com.opengamma.bbg.permission.BloombergBpipePermissionCheckProvider; import com.opengamma.bbg.referencedata.ReferenceDataProvider; import com.opengamma.component.ComponentInfo; import com.opengamma.component.ComponentRepository; import com.opengamma.component.factory.AbstractComponentFactory; import com.opengamma.component.factory.ComponentInfoAttributes; import com.opengamma.provider.permission.PermissionCheckProvider; import com.opengamma.provider.permission.impl.DataPermissionCheckProviderResource; import com.opengamma.provider.permission.impl.ProviderBasedPermissionResolver; import com.opengamma.provider.permission.impl.RemotePermissionCheckProvider; import com.opengamma.util.ArgumentChecker; import com.opengamma.util.auth.AuthUtils; /** * Component factory for the Bloomberg permission check provider. */ @BeanDefinition public class BloombergBpipePermissionCheckProviderComponentFactory extends AbstractComponentFactory { /** * The classifier that the factory should publish under. */ @PropertyDefinition(validate = "notNull") private String _classifier; /** * The flag determining whether the component should be published by REST (default true). */ @PropertyDefinition private boolean _publishRest = true; /** * The Bloomberg connector. */ @PropertyDefinition(validate = "notNull") private BloombergConnector _bloombergConnector; /** * The identity expiry time in hours * <p> * Defaults to 24hrs if not set. */ @PropertyDefinition private Duration _identityExpiryTime = Duration.ofHours(24); /** * The reference data provider. */ @PropertyDefinition(validate = "notNull") private ReferenceDataProvider _referenceDataProvider; //------------------------------------------------------------------------- @Override public void init(ComponentRepository repo, LinkedHashMap<String, String> configuration) throws Exception { if (getBloombergConnector().requiresAuthentication()) { ArgumentChecker.isTrue(getIdentityExpiryTime().getSeconds() > 0, "identity expiry time must be positive"); final ComponentInfo info = new ComponentInfo(PermissionCheckProvider.class, getClassifier()); info.addAttribute(ComponentInfoAttributes.LEVEL, 1); info.addAttribute(ComponentInfoAttributes.REMOTE_CLIENT_JAVA, RemotePermissionCheckProvider.class); info.addAttribute(ComponentInfoAttributes.ACCEPTED_TYPES, BloombergPermissions.BLOOMBERG_PREFIX); BloombergBpipePermissionCheckProvider provider = new BloombergBpipePermissionCheckProvider( getBloombergConnector(), getIdentityExpiryTime()); repo.registerComponent(info, provider); if (isPublishRest()) { repo.getRestComponents().publish(info, new DataPermissionCheckProviderResource(provider)); } if (AuthUtils.isPermissive() == false) { AuthUtils.getPermissionResolver().register( new ProviderBasedPermissionResolver(BloombergPermissions.BLOOMBERG_PREFIX, provider)); } } } //------------------------- AUTOGENERATED START ------------------------- ///CLOVER:OFF /** * The meta-bean for {@code BloombergBpipePermissionCheckProviderComponentFactory}. * @return the meta-bean, not null */ public static BloombergBpipePermissionCheckProviderComponentFactory.Meta meta() { return BloombergBpipePermissionCheckProviderComponentFactory.Meta.INSTANCE; } static { JodaBeanUtils.registerMetaBean(BloombergBpipePermissionCheckProviderComponentFactory.Meta.INSTANCE); } @Override public BloombergBpipePermissionCheckProviderComponentFactory.Meta metaBean() { return BloombergBpipePermissionCheckProviderComponentFactory.Meta.INSTANCE; } //----------------------------------------------------------------------- /** * Gets the classifier that the factory should publish under. * @return the value of the property, not null */ public String getClassifier() { return _classifier; } /** * Sets the classifier that the factory should publish under. * @param classifier the new value of the property, not null */ public void setClassifier(String classifier) { JodaBeanUtils.notNull(classifier, "classifier"); this._classifier = classifier; } /** * Gets the the {@code classifier} property. * @return the property, not null */ public final Property<String> classifier() { return metaBean().classifier().createProperty(this); } //----------------------------------------------------------------------- /** * Gets the flag determining whether the component should be published by REST (default true). * @return the value of the property */ public boolean isPublishRest() { return _publishRest; } /** * Sets the flag determining whether the component should be published by REST (default true). * @param publishRest the new value of the property */ public void setPublishRest(boolean publishRest) { this._publishRest = publishRest; } /** * Gets the the {@code publishRest} property. * @return the property, not null */ public final Property<Boolean> publishRest() { return metaBean().publishRest().createProperty(this); } //----------------------------------------------------------------------- /** * Gets the Bloomberg connector. * @return the value of the property, not null */ public BloombergConnector getBloombergConnector() { return _bloombergConnector; } /** * Sets the Bloomberg connector. * @param bloombergConnector the new value of the property, not null */ public void setBloombergConnector(BloombergConnector bloombergConnector) { JodaBeanUtils.notNull(bloombergConnector, "bloombergConnector"); this._bloombergConnector = bloombergConnector; } /** * Gets the the {@code bloombergConnector} property. * @return the property, not null */ public final Property<BloombergConnector> bloombergConnector() { return metaBean().bloombergConnector().createProperty(this); } //----------------------------------------------------------------------- /** * Gets the identity expiry time in hours * <p> * Defaults to 24hrs if not set. * @return the value of the property */ public Duration getIdentityExpiryTime() { return _identityExpiryTime; } /** * Sets the identity expiry time in hours * <p> * Defaults to 24hrs if not set. * @param identityExpiryTime the new value of the property */ public void setIdentityExpiryTime(Duration identityExpiryTime) { this._identityExpiryTime = identityExpiryTime; } /** * Gets the the {@code identityExpiryTime} property. * <p> * Defaults to 24hrs if not set. * @return the property, not null */ public final Property<Duration> identityExpiryTime() { return metaBean().identityExpiryTime().createProperty(this); } //----------------------------------------------------------------------- /** * Gets the reference data provider. * @return the value of the property, not null */ public ReferenceDataProvider getReferenceDataProvider() { return _referenceDataProvider; } /** * Sets the reference data provider. * @param referenceDataProvider the new value of the property, not null */ public void setReferenceDataProvider(ReferenceDataProvider referenceDataProvider) { JodaBeanUtils.notNull(referenceDataProvider, "referenceDataProvider"); this._referenceDataProvider = referenceDataProvider; } /** * Gets the the {@code referenceDataProvider} property. * @return the property, not null */ public final Property<ReferenceDataProvider> referenceDataProvider() { return metaBean().referenceDataProvider().createProperty(this); } //----------------------------------------------------------------------- @Override public BloombergBpipePermissionCheckProviderComponentFactory clone() { return JodaBeanUtils.cloneAlways(this); } @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj != null && obj.getClass() == this.getClass()) { BloombergBpipePermissionCheckProviderComponentFactory other = (BloombergBpipePermissionCheckProviderComponentFactory) obj; return JodaBeanUtils.equal(getClassifier(), other.getClassifier()) && (isPublishRest() == other.isPublishRest()) && JodaBeanUtils.equal(getBloombergConnector(), other.getBloombergConnector()) && JodaBeanUtils.equal(getIdentityExpiryTime(), other.getIdentityExpiryTime()) && JodaBeanUtils.equal(getReferenceDataProvider(), other.getReferenceDataProvider()) && super.equals(obj); } return false; } @Override public int hashCode() { int hash = 7; hash = hash * 31 + JodaBeanUtils.hashCode(getClassifier()); hash = hash * 31 + JodaBeanUtils.hashCode(isPublishRest()); hash = hash * 31 + JodaBeanUtils.hashCode(getBloombergConnector()); hash = hash * 31 + JodaBeanUtils.hashCode(getIdentityExpiryTime()); hash = hash * 31 + JodaBeanUtils.hashCode(getReferenceDataProvider()); return hash ^ super.hashCode(); } @Override public String toString() { StringBuilder buf = new StringBuilder(192); buf.append("BloombergBpipePermissionCheckProviderComponentFactory{"); int len = buf.length(); toString(buf); if (buf.length() > len) { buf.setLength(buf.length() - 2); } buf.append('}'); return buf.toString(); } @Override protected void toString(StringBuilder buf) { super.toString(buf); buf.append("classifier").append('=').append(JodaBeanUtils.toString(getClassifier())).append(',').append(' '); buf.append("publishRest").append('=').append(JodaBeanUtils.toString(isPublishRest())).append(',').append(' '); buf.append("bloombergConnector").append('=').append(JodaBeanUtils.toString(getBloombergConnector())).append(',').append(' '); buf.append("identityExpiryTime").append('=').append(JodaBeanUtils.toString(getIdentityExpiryTime())).append(',').append(' '); buf.append("referenceDataProvider").append('=').append(JodaBeanUtils.toString(getReferenceDataProvider())).append(',').append(' '); } //----------------------------------------------------------------------- /** * The meta-bean for {@code BloombergBpipePermissionCheckProviderComponentFactory}. */ public static class Meta extends AbstractComponentFactory.Meta { /** * The singleton instance of the meta-bean. */ static final Meta INSTANCE = new Meta(); /** * The meta-property for the {@code classifier} property. */ private final MetaProperty<String> _classifier = DirectMetaProperty.ofReadWrite( this, "classifier", BloombergBpipePermissionCheckProviderComponentFactory.class, String.class); /** * The meta-property for the {@code publishRest} property. */ private final MetaProperty<Boolean> _publishRest = DirectMetaProperty.ofReadWrite( this, "publishRest", BloombergBpipePermissionCheckProviderComponentFactory.class, Boolean.TYPE); /** * The meta-property for the {@code bloombergConnector} property. */ private final MetaProperty<BloombergConnector> _bloombergConnector = DirectMetaProperty.ofReadWrite( this, "bloombergConnector", BloombergBpipePermissionCheckProviderComponentFactory.class, BloombergConnector.class); /** * The meta-property for the {@code identityExpiryTime} property. */ private final MetaProperty<Duration> _identityExpiryTime = DirectMetaProperty.ofReadWrite( this, "identityExpiryTime", BloombergBpipePermissionCheckProviderComponentFactory.class, Duration.class); /** * The meta-property for the {@code referenceDataProvider} property. */ private final MetaProperty<ReferenceDataProvider> _referenceDataProvider = DirectMetaProperty.ofReadWrite( this, "referenceDataProvider", BloombergBpipePermissionCheckProviderComponentFactory.class, ReferenceDataProvider.class); /** * The meta-properties. */ private final Map<String, MetaProperty<?>> _metaPropertyMap$ = new DirectMetaPropertyMap( this, (DirectMetaPropertyMap) super.metaPropertyMap(), "classifier", "publishRest", "bloombergConnector", "identityExpiryTime", "referenceDataProvider"); /** * Restricted constructor. */ protected Meta() { } @Override protected MetaProperty<?> metaPropertyGet(String propertyName) { switch (propertyName.hashCode()) { case -281470431: // classifier return _classifier; case -614707837: // publishRest return _publishRest; case 2061648978: // bloombergConnector return _bloombergConnector; case 201583102: // identityExpiryTime return _identityExpiryTime; case -1788671322: // referenceDataProvider return _referenceDataProvider; } return super.metaPropertyGet(propertyName); } @Override public BeanBuilder<? extends BloombergBpipePermissionCheckProviderComponentFactory> builder() { return new DirectBeanBuilder<BloombergBpipePermissionCheckProviderComponentFactory>(new BloombergBpipePermissionCheckProviderComponentFactory()); } @Override public Class<? extends BloombergBpipePermissionCheckProviderComponentFactory> beanType() { return BloombergBpipePermissionCheckProviderComponentFactory.class; } @Override public Map<String, MetaProperty<?>> metaPropertyMap() { return _metaPropertyMap$; } //----------------------------------------------------------------------- /** * The meta-property for the {@code classifier} property. * @return the meta-property, not null */ public final MetaProperty<String> classifier() { return _classifier; } /** * The meta-property for the {@code publishRest} property. * @return the meta-property, not null */ public final MetaProperty<Boolean> publishRest() { return _publishRest; } /** * The meta-property for the {@code bloombergConnector} property. * @return the meta-property, not null */ public final MetaProperty<BloombergConnector> bloombergConnector() { return _bloombergConnector; } /** * The meta-property for the {@code identityExpiryTime} property. * @return the meta-property, not null */ public final MetaProperty<Duration> identityExpiryTime() { return _identityExpiryTime; } /** * The meta-property for the {@code referenceDataProvider} property. * @return the meta-property, not null */ public final MetaProperty<ReferenceDataProvider> referenceDataProvider() { return _referenceDataProvider; } //----------------------------------------------------------------------- @Override protected Object propertyGet(Bean bean, String propertyName, boolean quiet) { switch (propertyName.hashCode()) { case -281470431: // classifier return ((BloombergBpipePermissionCheckProviderComponentFactory) bean).getClassifier(); case -614707837: // publishRest return ((BloombergBpipePermissionCheckProviderComponentFactory) bean).isPublishRest(); case 2061648978: // bloombergConnector return ((BloombergBpipePermissionCheckProviderComponentFactory) bean).getBloombergConnector(); case 201583102: // identityExpiryTime return ((BloombergBpipePermissionCheckProviderComponentFactory) bean).getIdentityExpiryTime(); case -1788671322: // referenceDataProvider return ((BloombergBpipePermissionCheckProviderComponentFactory) bean).getReferenceDataProvider(); } return super.propertyGet(bean, propertyName, quiet); } @Override protected void propertySet(Bean bean, String propertyName, Object newValue, boolean quiet) { switch (propertyName.hashCode()) { case -281470431: // classifier ((BloombergBpipePermissionCheckProviderComponentFactory) bean).setClassifier((String) newValue); return; case -614707837: // publishRest ((BloombergBpipePermissionCheckProviderComponentFactory) bean).setPublishRest((Boolean) newValue); return; case 2061648978: // bloombergConnector ((BloombergBpipePermissionCheckProviderComponentFactory) bean).setBloombergConnector((BloombergConnector) newValue); return; case 201583102: // identityExpiryTime ((BloombergBpipePermissionCheckProviderComponentFactory) bean).setIdentityExpiryTime((Duration) newValue); return; case -1788671322: // referenceDataProvider ((BloombergBpipePermissionCheckProviderComponentFactory) bean).setReferenceDataProvider((ReferenceDataProvider) newValue); return; } super.propertySet(bean, propertyName, newValue, quiet); } @Override protected void validate(Bean bean) { JodaBeanUtils.notNull(((BloombergBpipePermissionCheckProviderComponentFactory) bean)._classifier, "classifier"); JodaBeanUtils.notNull(((BloombergBpipePermissionCheckProviderComponentFactory) bean)._bloombergConnector, "bloombergConnector"); JodaBeanUtils.notNull(((BloombergBpipePermissionCheckProviderComponentFactory) bean)._referenceDataProvider, "referenceDataProvider"); super.validate(bean); } } ///CLOVER:ON //-------------------------- AUTOGENERATED END -------------------------- }
9240720977646ece20970a377213ed041149464e
3,302
java
Java
skygear/src/main/java/io/skygear/skygear/AssetPreparePostResponseHandler.java
SkygearIO/skygear-SDK-Android
f28f34852c32eb325b90a83b92e920d7f41c5033
[ "Apache-2.0" ]
16
2016-06-24T03:26:57.000Z
2019-07-04T18:05:19.000Z
skygear/src/main/java/io/skygear/skygear/AssetPreparePostResponseHandler.java
SkygearIO/skygear-SDK-Android
f28f34852c32eb325b90a83b92e920d7f41c5033
[ "Apache-2.0" ]
224
2016-05-30T00:48:21.000Z
2019-05-03T09:32:10.000Z
skygear/src/main/java/io/skygear/skygear/AssetPreparePostResponseHandler.java
SkygearIO/skygear-SDK-Android
f28f34852c32eb325b90a83b92e920d7f41c5033
[ "Apache-2.0" ]
43
2016-06-03T09:46:52.000Z
2021-10-12T14:38:41.000Z
31.150943
94
0.633253
1,001,521
/* * Copyright 2017 Oursky Ltd. * * 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.skygear.skygear; import org.json.JSONException; import org.json.JSONObject; import java.util.HashMap; import java.util.Iterator; import java.util.Map; /** * The Skygear Asset Prepare Post Response Handler. */ public abstract class AssetPreparePostResponseHandler extends ResponseHandler { private final Asset asset; /** * Instantiates a new Asset Prepare Post Response Handler. * <p> * The asset to be uploaded should be passed in since * the name and url will be updated according to the * response from Skygear Server * </p> * * @param asset the asset */ public AssetPreparePostResponseHandler(Asset asset) { super(); this.asset = asset; } /** * Prepare post success callback. * * @param postRequest the post request */ public abstract void onPreparePostSuccess(AssetPostRequest postRequest); /** * Prepare post fail callback. * * @param error the error */ public abstract void onPreparePostFail(Error error); @Override public final void onSuccess(JSONObject result) { try { // parse asset return from server and update the asset object JSONObject assetObject = result.getJSONObject("asset"); this.asset.name = assetObject.getString("$name"); this.asset.url = assetObject.getString("$url"); // parse post request object JSONObject postRequestObject = result.getJSONObject("post-request"); String postRequestAction = postRequestObject.getString("action"); Map<String, String> postExtraFields = null; if (!postRequestObject.isNull("extra-fields")) { postExtraFields = new HashMap<>(); JSONObject extraFieldObject = postRequestObject.getJSONObject("extra-fields"); Iterator<String> extraKeys = extraFieldObject.keys(); while (extraKeys.hasNext()) { String perKey = extraKeys.next(); String perValue = extraFieldObject.getString(perKey); postExtraFields.put(perKey, perValue); } } AssetPostRequest postRequest = new AssetPostRequest( this.asset, postRequestAction, postExtraFields ); this.onPreparePostSuccess(postRequest); } catch (JSONException e) { this.onPreparePostFail(new Error("Malformed server response")); } } @Override public final void onFailure(Error error) { this.onPreparePostFail(error); } }
924072c441a2b2864fc9c6ef7de48428b8aa15ac
1,704
java
Java
graphics-by-opengl-j2se/src/main/java/com/nucleus/opengl/GLRendererInfo.java
rsahlin/graphics-by-opengl
a90ad4e649967f0dfac11017a4dc0ad97a0703e2
[ "Apache-2.0" ]
14
2015-04-10T11:23:29.000Z
2022-03-30T14:05:54.000Z
graphics-by-opengl-j2se/src/main/java/com/nucleus/opengl/GLRendererInfo.java
rsahlin/graphics-by-opengl
a90ad4e649967f0dfac11017a4dc0ad97a0703e2
[ "Apache-2.0" ]
2
2015-12-21T06:27:20.000Z
2018-06-19T08:03:02.000Z
graphics-by-opengl-j2se/src/main/java/com/nucleus/opengl/GLRendererInfo.java
rsahlin/graphics-by-opengl
a90ad4e649967f0dfac11017a4dc0ad97a0703e2
[ "Apache-2.0" ]
4
2019-11-17T01:01:12.000Z
2022-03-30T14:05:56.000Z
37.043478
120
0.663146
1,001,522
package com.nucleus.opengl; import com.nucleus.SimpleLogger; import com.nucleus.common.StringUtils; import com.nucleus.opengl.GLESWrapper.GLES20; import com.nucleus.renderer.NucleusRenderer.Renderers; import com.nucleus.renderer.RendererInfo; /** * The renderer info for GL/GLES based renderers * */ public class GLRendererInfo extends RendererInfo { /** * Fetches info from GLES and stores in this class. * * @param gles * @param renderVersion */ public GLRendererInfo(GLES20Wrapper gles, Renderers renderVersion) { super(renderVersion); vendor = gles.glGetString(GLES20.GL_VENDOR); version = gles.glGetString(GLES20.GL_VERSION); renderer = gles.glGetString(GLES20.GL_RENDERER); shadingLanguageVersion = new Version(gles.glGetString(GLES20.GL_SHADING_LANGUAGE_VERSION)); String glString = gles.glGetString(GLES20.GL_EXTENSIONS); if (glString != null) { extensions = StringUtils.getList(glString, " "); } int[] param = new int[1]; gles.glGetIntegerv(GLES20.GL_MAX_TEXTURE_SIZE, param); maxTextureSize = param[0]; SimpleLogger.d(getClass(), "GLInfo:\n" + "Version: " + version + " with shading language " + shadingLanguageVersion + "\n" + vendor + " " + renderer + ", max texture size: " + maxTextureSize); if (extensions != null) { StringUtils.logList(getClass().getCanonicalName(), extensions); } // Some implementations may raise error in glGetString for some unknown reason (LWJGL) - clear any raised errors // here while (gles.glGetError() != GLES20.GL_NO_ERROR) { } } }
924074583efbdd657b8be0ed6e5570a5149a6b56
10,519
java
Java
srtp-project-codes/src/srtp/cpm/Weak/WeakCliqueBasedOnCPM.java
ChenyangShi/ChenyangShi.github.io
07518c6c69bac92fef24634f759d9deee7ef3b82
[ "MIT" ]
null
null
null
srtp-project-codes/src/srtp/cpm/Weak/WeakCliqueBasedOnCPM.java
ChenyangShi/ChenyangShi.github.io
07518c6c69bac92fef24634f759d9deee7ef3b82
[ "MIT" ]
null
null
null
srtp-project-codes/src/srtp/cpm/Weak/WeakCliqueBasedOnCPM.java
ChenyangShi/ChenyangShi.github.io
07518c6c69bac92fef24634f759d9deee7ef3b82
[ "MIT" ]
null
null
null
31.683735
132
0.462972
1,001,523
import java.util.*; public class WeakCliqueBasedOnCPM { int counter = 0; //计数 final float T = 0.3f; int nodenum; //总结点数目 Set<Integer> V; int degree[]; float P[];//priority HashMap<Integer, Float> SI_v_in_u;//SI boolean visited[]; Set<Integer> neighborSet[]; //邻居节点表 ArrayList<Set<Integer>> WClique;//派系的集合 // ArrayList<Community> S = new ArrayList<Community>();//所有社区集合 ArrayList<Set<Integer>> S = new ArrayList<Set<Integer>>();//所有社区集合 /** * 构造函数,初始化变量 */ public WeakCliqueBasedOnCPM(String filename) { ReadData rd = new ReadData(filename); nodenum = rd.nodenum; neighborSet = new LinkedHashSet[nodenum];//分配头结点 for(int i = 0; i < nodenum; i++) neighborSet[i] = new LinkedHashSet<Integer>();//分配表节点 neighborSet = rd.neighborSet; degree = new int[nodenum];//读度数 degree = rd.degree; V = new LinkedHashSet<Integer>(); V = rd.V; P = new float[nodenum]; } /** * Algorithm 1 : General Framework of W-CPM */ public void Action() { //S = new LinkedList<Integer>();//S ← ∅ IdentifyWeakClique();//WClique ← IdentifyWeakClique(G) /*all the weak cliques initially unvisited*/ visited = new boolean[ WClique.size() ];//分配visited[], 初始化 for(int i = 0; i < WClique.size(); i++) visited[i] = false; /*if weak clique i is not visited, merge it with its neighboring weak cliques*/ int i = 0; for(Set<Integer> wclique : WClique)//for each wclique ∈ WClique do { if(!visited[i])//if wclique is unvisited then MergeClique(wclique, T);//Merge(wclique, S, T) }//end for //return S } /** * Algorithm2 : IdentifyWeakClique(G) */ public void IdentifyWeakClique() { int u, v; Set<Integer> W_u; WClique = new ArrayList<Set<Integer>>();//WClique ← ∅ CalculatePriority();//P(i) ← Compute the priority of node i by Equation 2 while (V.size() != 0)//while V! = ∅ do { u = MaxP(P);//u ← arg max(P (i)) CalculateSaltonIndex(u);//SI ←Calculate Salton index for each neighbor v of node u by Equation 3 W_u = new LinkedHashSet<Integer>();//Wu ← ∅ while (SI_v_in_u.size() != 0)//while SI ! = ∅ do { /* Select the node v which has the maximal similarity with u in set SI */ v = MaxH(SI_v_in_u);//v ← arg max(SI (i)) for (int elem1 : neighborSet[u]) { if (neighborSet[v].contains(elem1)) W_u.add(elem1); } W_u.add(u); W_u.add(v);//Wu ← Wu ∪ ({u, v} ∪ N(u) ∩ N(v)) for (int e : W_u) { SI_v_in_u.remove(e);//Remove Wu from SI. 一并移除 key-value 即 v_Id - SI_v_in_u } }//end while WClique.add(W_u);//find one W_clique counter++; System.out.println("~~~~" + counter); for(int id : W_u) {//Remove Wu from V V.remove(id); P[id] = 0.0f;//lower the removed node's priority } }//end while //return WClique } /** * Algorithm 3 : Merge(wclique, S, T ) * @param wclique weak clique wclique * @param T threshold T = 0.3 */ public void MergeClique(Set<Integer> wclique, float T) { /*Define two variables: Comm is a community, Container is a weak clique set*/ Set<Set<Integer>> Container; Set<Integer> Comm; Set<Integer> Temp; Comm = new LinkedHashSet<Integer>(); //Comm ← ∅ Container = new LinkedHashSet<Set<Integer>>(); //Container ← ∅ Comm.addAll(wclique); //Comm ← Comm ∪ wclique Container.add(wclique); //add wclique into Container visited[0] = true; while(Container.size() != 0) //while Container ! = ∅ do { Temp = new LinkedHashSet<Integer>(); //temp ← select a weak clique from Container Iterator it = Container.iterator(); if(it.hasNext()) Temp = (Set<Integer>) it.next(); // for(Set<Integer> first : Container) // { Temp = first; break; } for(int i = 1; i < WClique.size(); i++) { if( (WS(Temp, WClique.get(i)) > T) && !visited[i] ) //if W Stemp,neighbor_temp > T and neighbor_temp unvisited then { Comm.addAll(WClique.get(i)); //Comm ← Comm ∪ neighbor_temp Container.add(WClique.get(i)); //add neighbor_temp into Container visited[i] = true; //mark neighbor_temp as visited }//end if }//end for Container.remove(Temp); }//end while this.S.add(Comm); /* Community community = new Community(); community.CCom.addAll(Comm); S.add(community); //S ← S ∪ Comm */ } /** * 计算每个节点的优先级 */ public void CalculatePriority()//寻找u { boolean mark[]; mark = new boolean[nodenum]; for(int i = 0 ; i < nodenum; i++) mark[i] = true; int m; for(int i = 0; i < nodenum; i++)//every node { m = 0; for (int el1 : neighborSet[i])//遍历头结点i的set { for (int el2 : neighborSet[i]) { if (!mark[el2]||el1==el2) continue;//跳过已经比较的点 if (neighborSet[el1].contains(el2))//el1与el2之间存在link(肯定没有自环) m++; } mark[el1] = false; } //m is the number of links between the neighbors of node i //compute priority of node i : Pu = mu + k / k + 1 P[i] = (float)(m + degree[i]) / (degree[i] + 1); } } /** * 计算节点与其每个邻居的Salton指数 */ public void CalculateSaltonIndex(int u)//寻找u对应的v { SI_v_in_u = new HashMap<Integer, Float>(); int x = 0;//分子 float y;//分母 for (int v : neighborSet[u])//calculate SI for each neighbor v of node u { for (int elem : neighborSet[v])//遍历u的邻居的所有邻居 { if (neighborSet[u].contains(elem)) x++; } y = (float)(neighborSet[u].size() * neighborSet[v].size()); /* SIuv = |Nu ∩ Nv| / √|Nu| ∗ |Nv| */ SI_v_in_u.put(v, (x / (float)(Math.sqrt(y)))); //节点 v 对应的值为 value x = 0; } } /** * 计算两个w_clique 的派系相似度 * @param C1 a weak cliques in G * @param C2 a weak cliques in G * @return Weak clique Similarity of C1_C2 */ public double WS(Set<Integer> C1, Set<Integer> C2) { int V = 0; //the number of common elements in weak clique (C1, C2) int E = 0; //E(C1, C2) is the set of links between weak cliques C1 and C2 int min = 0; float WSC1_C2; for(int node1 : C1) { for(int node2 : C2) { if(node1 == node2) V++; if(neighborSet[node1].contains(node2))//exclude self-circle E++; } } if((C1.size()<C2.size()) && C1.size() != 0 && C2.size() != 0) min = C1.size(); else min = C2.size(); // min = ( C1.size() < C2.size() ) ? C1.size(): C2.size(); /* W SC1C2 = |V (C1) ∩ V (C2)| + |E(C1, C2)| / min(|V (C1)|,|V (C2)|) */ WSC1_C2 = (float)( V + E ) / min; return WSC1_C2; } /** * 计算最大的优先级 * @param a : P[] * @return : node Id */ public int MaxP(float a[]) { int res = 0; double t = a[0]; for (int i = 0; i < a.length; i++) { if (a[i] > t) { t = a[i]; res = i; } } return res;//取下标返回 下标就是节点Id } /** * 计算最大的Salton指数 * @param map : SI_v_in_u * @return : node Id */ public int MaxH(HashMap<Integer, Float> map) { Float value = 0.0f; //值 Integer max = 0; //最大的Key Set<Integer> set = map.keySet(); //Key的集合 即 节点Id的集合 Iterator it = set.iterator(); Integer KKey; while (it.hasNext()) { KKey = (Integer) it.next(); Float init = map.get(KKey); if (value <= init) { value = init; max = KKey; } } return max; } /* List list = new ArrayList(); Iterator it = map.entrySet().iterator(); while(it.hasNext())// EntrySet 将同一个元素的key与value 关联在一起,当当前元素的value等于按从小到大排序的最后(最大)的元素的value值,输出当前元素的键key与值value { maxKey = (Integer) it.next(); Map.Entry res = (Map.Entry)it.next(); value = (float)res.getValue(); list.add(res.getValue()); Collections.sort(list); if(value == list.get(list.size()-1)) { maxKey = (Integer) res.getKey(); } } */ /* int res = 0, i = 0; for(i = 0; i < map.size(); i++)//找到第一个不为空的Key (Id) { if (map.get(i) == null) i++; else break; } */ /* float t1 = (SI.get(i) == null ? 0.0f : SI.get(i)); //不是和Id零比较 for( int j : KKey) //j就是Id值 { float t2 = (SI.get(j) == null ? 0.0f : SI.get(j)); if(t2 > t1) { t1 = t2; //t1是最大的值 res = j;//j是最大的Id } } return res; } */ public void Show() { for(int i = 0; i < S.size(); i++) { System.out.print("community "+i +": "); System.out.print(S.get(i)); } } public static void main(String [] args) { WeakCliqueBasedOnCPM wcpm = new WeakCliqueBasedOnCPM("football1.txt"); wcpm.Action(); wcpm.Show(); System.out.println("End"); } }
924074e2bd371f5e2c9e0befec104f99c504bfac
2,908
java
Java
MCP/1.7.10/1/Client/src/minecraft/net/minecraft/client/gui/ServerSelectionList.java
KoaDev/Minecraft
6a9a14fd913107a4075f28136400d197059194e3
[ "MIT" ]
83
2017-01-27T07:04:00.000Z
2022-03-30T21:49:30.000Z
MCP/1.7.10/1/Client/src/minecraft/net/minecraft/client/gui/ServerSelectionList.java
KoaDev/Minecraft
6a9a14fd913107a4075f28136400d197059194e3
[ "MIT" ]
2
2020-10-02T12:01:34.000Z
2022-01-25T14:39:24.000Z
MCP/1.7.10/1/Client/src/minecraft/net/minecraft/client/gui/ServerSelectionList.java
KoaDev/Minecraft
6a9a14fd913107a4075f28136400d197059194e3
[ "MIT" ]
44
2017-03-17T07:26:18.000Z
2022-03-27T17:55:12.000Z
29.373737
166
0.659216
1,001,524
package net.minecraft.client.gui; import com.google.common.collect.Lists; import java.util.Iterator; import java.util.List; import net.minecraft.client.Minecraft; import net.minecraft.client.multiplayer.ServerList; import net.minecraft.client.network.LanServerDetector; public class ServerSelectionList extends GuiListExtended { private final GuiMultiplayer field_148200_k; private final List field_148198_l = Lists.newArrayList(); private final List field_148199_m = Lists.newArrayList(); private final GuiListExtended.IGuiListEntry field_148196_n = new ServerListEntryLanScan(); private int field_148197_o = -1; private static final String __OBFID = "CL_00000819"; public ServerSelectionList(GuiMultiplayer p_i45049_1_, Minecraft p_i45049_2_, int p_i45049_3_, int p_i45049_4_, int p_i45049_5_, int p_i45049_6_, int p_i45049_7_) { super(p_i45049_2_, p_i45049_3_, p_i45049_4_, p_i45049_5_, p_i45049_6_, p_i45049_7_); this.field_148200_k = p_i45049_1_; } public GuiListExtended.IGuiListEntry func_148180_b(int p_148180_1_) { if (p_148180_1_ < this.field_148198_l.size()) { return (GuiListExtended.IGuiListEntry)this.field_148198_l.get(p_148180_1_); } else { p_148180_1_ -= this.field_148198_l.size(); if (p_148180_1_ == 0) { return this.field_148196_n; } else { --p_148180_1_; return (GuiListExtended.IGuiListEntry)this.field_148199_m.get(p_148180_1_); } } } protected int getSize() { return this.field_148198_l.size() + 1 + this.field_148199_m.size(); } public void func_148192_c(int p_148192_1_) { this.field_148197_o = p_148192_1_; } protected boolean isSelected(int p_148131_1_) { return p_148131_1_ == this.field_148197_o; } public int func_148193_k() { return this.field_148197_o; } public void func_148195_a(ServerList p_148195_1_) { this.field_148198_l.clear(); for (int var2 = 0; var2 < p_148195_1_.countServers(); ++var2) { this.field_148198_l.add(new ServerListEntryNormal(this.field_148200_k, p_148195_1_.getServerData(var2))); } } public void func_148194_a(List p_148194_1_) { this.field_148199_m.clear(); Iterator var2 = p_148194_1_.iterator(); while (var2.hasNext()) { LanServerDetector.LanServer var3 = (LanServerDetector.LanServer)var2.next(); this.field_148199_m.add(new ServerListEntryLanDetected(this.field_148200_k, var3)); } } protected int func_148137_d() { return super.func_148137_d() + 30; } public int func_148139_c() { return super.func_148139_c() + 85; } }
9240761d60f44fbc12460cbaa01a5c56389c311d
382
java
Java
src/main/java/com/github/javarushcommunity/jrtb/repository/GroupSubService.java
Anastasiia-17SB/java-telegram-bot
e598d1335434ea85b2c204905b88aa5d8a26b012
[ "Apache-2.0" ]
null
null
null
src/main/java/com/github/javarushcommunity/jrtb/repository/GroupSubService.java
Anastasiia-17SB/java-telegram-bot
e598d1335434ea85b2c204905b88aa5d8a26b012
[ "Apache-2.0" ]
14
2021-11-14T05:43:47.000Z
2021-12-24T06:32:34.000Z
src/main/java/com/github/javarushcommunity/jrtb/repository/GroupSubService.java
Anastasiia-17SB/java-telegram-bot
e598d1335434ea85b2c204905b88aa5d8a26b012
[ "Apache-2.0" ]
null
null
null
25.466667
80
0.808901
1,001,525
package com.github.javarushcommunity.jrtb.repository; import com.github.javarushcommunity.jrtb.javarushclient.dto.GroupDiscussionInfo; import com.github.javarushcommunity.jrtb.repository.entity.GroupSub; /** * Service for manipulating with {@link GroupSub} * */ public interface GroupSubService { GroupSub save (String chatId, GroupDiscussionInfo groupDiscussionInfo); }
92407622d7691f5fdee3b967450e8149d63eaa6b
4,416
java
Java
src/main/java/com/newrelic/gpo/jmx2insights/MBeanAttributeConfig.java
tanben/newrelic-java-jmx-harvester
f2ae60d0dfd8c5405afae0a375a1e652fd321827
[ "Apache-2.0" ]
null
null
null
src/main/java/com/newrelic/gpo/jmx2insights/MBeanAttributeConfig.java
tanben/newrelic-java-jmx-harvester
f2ae60d0dfd8c5405afae0a375a1e652fd321827
[ "Apache-2.0" ]
1
2021-04-30T21:22:21.000Z
2021-04-30T21:22:21.000Z
src/main/java/com/newrelic/gpo/jmx2insights/MBeanAttributeConfig.java
tanben/newrelic-java-jmx-harvester
f2ae60d0dfd8c5405afae0a375a1e652fd321827
[ "Apache-2.0" ]
3
2021-04-26T13:34:37.000Z
2022-01-27T15:40:06.000Z
42.461538
458
0.741848
1,001,526
package com.newrelic.gpo.jmx2insights; import com.newrelic.agent.Agent; public class MBeanAttributeConfig { private String mbean_attribute_name; private String[] mbean_attribute_element_headers; private boolean b_hasAttributeElements; MBeanAttributeConfig(String _stMBeanAttribute) { /* manage the attribute name */ try { if (_stMBeanAttribute.contains("(")) { mbean_attribute_name = _stMBeanAttribute.substring(0, _stMBeanAttribute.indexOf('(')); b_hasAttributeElements = true; } //if else { mbean_attribute_name = _stMBeanAttribute.trim(); b_hasAttributeElements = false; } //else } //try catch (java.lang.ArrayIndexOutOfBoundsException _aiobe) { Agent.LOG.error("[" + Constantz.EXTENSION_NAME + "] Problem derriving the MBean atrribute name: " + _stMBeanAttribute); Agent.LOG.error("[" + Constantz.EXTENSION_NAME + "] Accessing simple MBean Attributes should be defined as follows: mbean_X: java.lang:type=Threading [ThreadCount,PeakThreadCount,DaemonThreadCount]."); Agent.LOG.error("[" + Constantz.EXTENSION_NAME + "] Accessing javax.management.openmbean.CompositeData or javax.management.openmbean.TabularData MBeans accept the following format :: mbean_X: org.apache.jackrabbit.oak:type=RepositoryStats,name=Oak Repository Statistics [ObservationQueueMaxLength(perminute|perhour),SessionWriteCount(persecond|perminute|perhour),SessionReadAverage(persecond),SessionReadDuration(persecond),SessionReadCount(persecond)]"); Agent.LOG.error("[" + Constantz.EXTENSION_NAME + "] " + _aiobe.getMessage()); } //catch /* process the attribute header values */ try { if (b_hasAttributeElements) { mbean_attribute_element_headers = (_stMBeanAttribute.substring(_stMBeanAttribute.indexOf('(') + 1, _stMBeanAttribute.lastIndexOf(')'))).split("[|]"); Agent.LOG.finer("JMX2Insights number of mbean header elements " + mbean_attribute_element_headers.length); } //if else { Agent.LOG.finer("[" + Constantz.EXTENSION_NAME + "] No attribute element headers detected for the candidate mbean attribute : " + _stMBeanAttribute); } //else } //try catch(java.lang.ArrayIndexOutOfBoundsException _aiobe) { Agent.LOG.error("[" + Constantz.EXTENSION_NAME + "] Problem derriving the MBean atrribute element headers to interrogate: " + _stMBeanAttribute); Agent.LOG.error("[" + Constantz.EXTENSION_NAME + "] Accessing simple MBean Attributes should be defined as follows: mbean_X: java.lang:type=Threading [ThreadCount,PeakThreadCount,DaemonThreadCount]."); Agent.LOG.error("[" + Constantz.EXTENSION_NAME + "] Accessing javax.management.openmbean.CompositeData or javax.management.openmbean.TabularData MBeans accept the following format :: mbean_X: org.apache.jackrabbit.oak:type=RepositoryStats,name=Oak Repository Statistics [ObservationQueueMaxLength(perminute|perhour),SessionWriteCount(persecond|perminute|perhour),SessionReadAverage(persecond),SessionReadDuration(persecond),SessionReadCount(persecond)]"); Agent.LOG.error("[" + Constantz.EXTENSION_NAME + "] " + _aiobe.getMessage()); } //catch } //MBeanAttributeConfig public boolean hasAttributeElement(String _stCandidateElement) { // do we have the given string as part of this attribute config? //doing it as a comparator for loop for Java6 support - don't want to use //array classes in case we're running in an old VM boolean __bRC = false; /* in the case of no header provided we're going to assume all headers match */ if (!hasAttributeElements()) { __bRC = true; } //if else { for (int i=0; i < mbean_attribute_element_headers.length;i++) { //Agent.LOG.fine("JMX2Insights THE attributeelement being compared: " + _stCandidateElement + " to " + mbean_attribute_element_headers[i]); if (_stCandidateElement.equalsIgnoreCase(mbean_attribute_element_headers[i])) { __bRC = true; break; } //if } //for } //else //Agent.LOG.fine("returning " + __bRC); return(__bRC); } //hasAttributeElement public boolean hasAttributeElements() { return(b_hasAttributeElements); } //hasAttributeElements public String getAttributeName() { return(mbean_attribute_name); } //getAttributeName public String[] getAttributeElementHeaders() { return(mbean_attribute_element_headers); } //getAttributeName } //MBeanAttributeConfig
924077767c31e04d5bad411200fc8db3035b7a7c
7,796
java
Java
jasperserver/jasperserver-api/metadata/src/main/java/com/jaspersoft/jasperserver/api/search/SearchCriteria.java
joshualucas84/jasper-soft-server
6515c9e90a19535b2deba9264ed1ff9e77a2cc09
[ "Apache-2.0" ]
2
2021-02-25T16:35:45.000Z
2021-07-07T05:11:55.000Z
jasperserver/jasperserver-api/metadata/src/main/java/com/jaspersoft/jasperserver/api/search/SearchCriteria.java
jlucas5190/jasper-soft-server
6515c9e90a19535b2deba9264ed1ff9e77a2cc09
[ "Apache-2.0" ]
null
null
null
jasperserver/jasperserver-api/metadata/src/main/java/com/jaspersoft/jasperserver/api/search/SearchCriteria.java
jlucas5190/jasper-soft-server
6515c9e90a19535b2deba9264ed1ff9e77a2cc09
[ "Apache-2.0" ]
3
2018-11-14T07:01:06.000Z
2021-07-07T05:12:03.000Z
32.894515
120
0.673422
1,001,527
/* * Copyright (C) 2005 - 2014 TIBCO Software Inc. All rights reserved. * http://www.jaspersoft.com. * * Unless you have purchased a commercial license agreement from Jaspersoft, * the following license terms apply: * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero 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 Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package com.jaspersoft.jasperserver.api.search; import org.hibernate.*; import org.hibernate.transform.ResultTransformer; import org.hibernate.criterion.*; import org.hibernate.engine.SessionImplementor; import org.hibernate.impl.CriteriaImpl; import java.util.Iterator; /** * Search criteria. * * @author Stas Chubar */ public class SearchCriteria extends DetachedCriteria { private final CriteriaImpl impl; private final Criteria criteria; protected SearchCriteria(String entityName) { super(entityName); impl = new CriteriaImpl(entityName, null); criteria = impl; } protected SearchCriteria(String entityName, String alias) { super(entityName, alias); impl = new CriteriaImpl(entityName, alias, null); criteria = impl; } protected SearchCriteria(CriteriaImpl impl, Criteria criteria) { super(impl, criteria); this.impl = impl; this.criteria = criteria; } /** * Get an executable instance of <literal>Criteria</literal>, * to actually run the query. */ public Criteria getExecutableCriteria(Session session) { impl.setSession((SessionImplementor) session); return impl; } public static SearchCriteria forEntityName(String entityName) { return new SearchCriteria(entityName); } public static SearchCriteria forEntityName(String entityName, String alias) { return new SearchCriteria(entityName, alias); } public static SearchCriteria forClass(Class clazz) { return new SearchCriteria(clazz.getName()); } public static SearchCriteria forClass(Class clazz, String alias) { return new SearchCriteria(clazz.getName(), alias); } public SearchCriteria add(Criterion criterion) { criteria.add(criterion); return this; } public SearchCriteria addOrder(Order order) { criteria.addOrder(order); return this; } public SearchCriteria createAlias(String associationPath, String alias) throws HibernateException { criteria.createAlias(associationPath, alias); return this; } public SearchCriteria createCriteria(String associationPath, String alias) throws HibernateException { return new SearchCriteria(impl, criteria.createCriteria(associationPath, alias)); } public SearchCriteria createCriteria(String associationPath) throws HibernateException { return new SearchCriteria(impl, criteria.createCriteria(associationPath)); } public String getAlias() { return criteria.getAlias(); } public SearchCriteria setFetchMode(String associationPath, FetchMode mode) throws HibernateException { criteria.setFetchMode(associationPath, mode); return this; } public SearchCriteria setProjection(Projection projection) { criteria.setProjection(projection); return this; } public SearchCriteria addProjection(Projection projection) { Projection oldProjection = ((CriteriaImpl)criteria).getProjection(); if(projection == null || oldProjection == null) { criteria.setProjection(projection); return this; } if(oldProjection instanceof ProjectionList) { addProjectionToList(((ProjectionList)oldProjection), projection); } else { ProjectionList list = Projections.projectionList().add(oldProjection); criteria.setProjection(addProjectionToList(list, projection)); } return this; } private Projection addProjectionToList(ProjectionList projectionList, Projection newProjection) { if (newProjection instanceof ProjectionList) { ProjectionList newProjectionList = ((ProjectionList) newProjection); for (int i = 0; i < newProjectionList.getLength(); i ++) { projectionList.add(newProjectionList.getProjection(i)); } } else { projectionList.add(newProjection); } return projectionList; } // public void removeGrops() { // Projection oldProjection = ((CriteriaImpl)criteria).getProjection(); // // if (oldProjection instanceof ProjectionList) { // ProjectionList oldProjectionList = (ProjectionList) oldProjection; // ProjectionList newProjectionList = Projections.projectionList(); // // for (int i = 0; i < oldProjectionList.getLength(); i ++) { // Projection projection = oldProjectionList.getProjection(i); // // if (!projection.isGrouped()) { // newProjectionList.add(projection); // } // } // // criteria.setProjection(newProjectionList); // } else if (oldProjection instanceof PropertyProjection){ // if (!oldProjection.isGrouped()) { // criteria.setProjection(oldProjection); // } // } // } public SearchCriteria setResultTransformer(ResultTransformer resultTransformer) { criteria.setResultTransformer(resultTransformer); return this; } public String toString() { return "SearchCriteria(" + criteria.toString() + ')'; } CriteriaImpl getCriteriaImpl() { return impl; } public SearchCriteria createAlias(String associationPath, String alias, int joinType) throws HibernateException { criteria.createAlias(associationPath, alias, joinType); return this; } public SearchCriteria createCriteria(String associationPath, int joinType) throws HibernateException { return new SearchCriteria(impl, criteria.createCriteria(associationPath, joinType)); } public SearchCriteria createCriteria(String associationPath, String alias, int joinType) throws HibernateException { return new SearchCriteria(impl, criteria.createCriteria(associationPath, alias, joinType)); } public SearchCriteria setComment(String comment) { criteria.setComment(comment); return this; } public SearchCriteria setLockMode(LockMode lockMode) { criteria.setLockMode(lockMode); return this; } public SearchCriteria setLockMode(String alias, LockMode lockMode) { criteria.setLockMode(alias, lockMode); return this; } public String getAlias(String associationPath, String aliasIfNotExist) { Iterator i = impl.iterateSubcriteria(); while (i.hasNext()) { CriteriaImpl.Subcriteria subcriteria = (CriteriaImpl.Subcriteria) i.next(); if (subcriteria.getPath().equals(associationPath)) { return subcriteria.getAlias(); } } createAlias(associationPath, aliasIfNotExist); return aliasIfNotExist; } }
924078371fa7c1c28af27f7909db5abcf940c574
2,748
java
Java
src/main/java/com/qexz/controller/GradeController.java
pss521/springboot-penguin
7f0d6e98874bf75664957d710c70eb0b97ed1359
[ "MIT" ]
1
2021-03-25T06:44:36.000Z
2021-03-25T06:44:36.000Z
src/main/java/com/qexz/controller/GradeController.java
pss521/springboot-penguin
7f0d6e98874bf75664957d710c70eb0b97ed1359
[ "MIT" ]
null
null
null
src/main/java/com/qexz/controller/GradeController.java
pss521/springboot-penguin
7f0d6e98874bf75664957d710c70eb0b97ed1359
[ "MIT" ]
null
null
null
37.643836
104
0.723071
1,001,528
package com.qexz.controller; import com.qexz.common.QexzConst; import com.qexz.dto.AjaxResult; import com.qexz.model.Account; import com.qexz.model.Grade; import com.qexz.model.Question; import com.qexz.service.GradeService; import com.qexz.service.QuestionService; import net.sf.json.JSONObject; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import javax.servlet.http.HttpServletRequest; import java.util.Arrays; import java.util.Date; import java.util.List; @Controller @RequestMapping(value = "/grade") public class GradeController { private static Log LOG = LogFactory.getLog(GradeController.class); @Autowired private GradeService gradeService; @Autowired private QuestionService questionService; //提交试卷 @RequestMapping(value="/api/submitContest", method= RequestMethod.POST) @ResponseBody public AjaxResult submitContest(HttpServletRequest request, @RequestBody Grade grade) { AjaxResult ajaxResult = new AjaxResult(); Account currentAccount = (Account) request.getSession().getAttribute(QexzConst.CURRENT_ACCOUNT); List<String> answerStrs = Arrays.asList(grade.getAnswerJson().split(QexzConst.SPLIT_CHAR)); int autoResult = 0; List<Question> questions = questionService.getQuestionsByContestId(grade.getContestId()); for (int i = 0; i < questions.size(); i++) { Question question = questions.get(i); if (question.getQuestionType() <= 1 && question.getAnswer() .equals(answerStrs.get(i))) { autoResult += question.getScore(); } } grade.setStudentId(currentAccount.getId()); grade.setResult(autoResult); grade.setAutoResult(autoResult); grade.setManulResult(0); int gradeId = gradeService.addGrade(grade); return new AjaxResult().setData(gradeId); } //完成批改试卷 @RequestMapping(value="/api/finishGrade", method= RequestMethod.POST) @ResponseBody public AjaxResult finishGrade(@RequestBody Grade grade) { AjaxResult ajaxResult = new AjaxResult(); grade.setResult(grade.getAutoResult()+grade.getManulResult()); grade.setFinishTime(new Date()); grade.setState(1); boolean result = gradeService.updateGrade(grade); return new AjaxResult().setData(result); } }
9240799bcd91d9a1cb6912c4e82834a119f8aa3c
1,219
java
Java
platform-db-sql/src/main/java/com/softicar/platform/db/sql/statement/builder/SqlInsertBuilder.java
softicar/platform
d4cf99f3e3537272af23bf60f6b088891bd271ff
[ "MIT" ]
1
2021-11-25T09:58:31.000Z
2021-11-25T09:58:31.000Z
platform-db-sql/src/main/java/com/softicar/platform/db/sql/statement/builder/SqlInsertBuilder.java
softicar/platform
d4cf99f3e3537272af23bf60f6b088891bd271ff
[ "MIT" ]
22
2021-11-10T13:59:22.000Z
2022-03-04T16:38:33.000Z
platform-db-sql/src/main/java/com/softicar/platform/db/sql/statement/builder/SqlInsertBuilder.java
softicar/platform
d4cf99f3e3537272af23bf60f6b088891bd271ff
[ "MIT" ]
null
null
null
29.731707
90
0.798195
1,001,529
package com.softicar.platform.db.sql.statement.builder; import com.softicar.platform.db.core.connection.DbConnections; import com.softicar.platform.db.sql.ISqlTable; import com.softicar.platform.db.sql.field.ISqlField; import com.softicar.platform.db.sql.statement.builder.clause.SqlInsertIntoClauseBuilder; import com.softicar.platform.db.sql.statement.builder.clause.SqlInsertValuesClauseBuilder; public class SqlInsertBuilder extends SqlStatementBuilder { private SqlInsertIntoClauseBuilder lhsBuilder; private SqlInsertValuesClauseBuilder rhsBuilder; public SqlInsertBuilder(ISqlTable<?> table) { super(DbConnections.getServerQuirks(), table, null); addClauseBuilder(this.lhsBuilder = new SqlInsertIntoClauseBuilder(this)); addClauseBuilder(this.rhsBuilder = new SqlInsertValuesClauseBuilder(this)); getHeadClauseBuilder().addText("INSERT INTO %s", table.getFullName().getQuoted()); } public int getRowCount() { return rhsBuilder.getRowCount(); } public <R, V> void addValue(ISqlField<R, V> field, V value) { lhsBuilder.addFieldToList(field); rhsBuilder.addValueToList(value); } public void finishTableRow() { lhsBuilder.finishFieldList(); rhsBuilder.finishValueList(); } }
924079fda7be02d1a8ad61db5342c9330fdbd26f
345
java
Java
allsrc/com/iflytek/cloud/a/a/a$a.java
clilystudio/NetBook
a8ca6cb91e9259ed7dec70b830829d622525b4b7
[ "Unlicense" ]
1
2018-02-04T12:23:55.000Z
2018-02-04T12:23:55.000Z
allsrc/com/iflytek/cloud/a/a/a$a.java
clilystudio/NetBook
a8ca6cb91e9259ed7dec70b830829d622525b4b7
[ "Unlicense" ]
null
null
null
allsrc/com/iflytek/cloud/a/a/a$a.java
clilystudio/NetBook
a8ca6cb91e9259ed7dec70b830829d622525b4b7
[ "Unlicense" ]
null
null
null
19.166667
83
0.582609
1,001,530
package com.iflytek.cloud.a.a; public enum a$a { static { a[] arrayOfa = new a[3]; arrayOfa[0] = a; arrayOfa[1] = b; arrayOfa[2] = c; d = arrayOfa; } } /* Location: E:\Progs\Dev\Android\Decompile\apktool\zssq\zssq-dex2jar.jar * Qualified Name: com.iflytek.cloud.a.a.a.a * JD-Core Version: 0.6.0 */
92407a2d6c10c3b3429b922cff064af589f8fcb9
7,040
java
Java
plugins/lint/lint-checks/src/com/android/tools/klint/checks/BuiltinIssueRegistry.java
dotlin/kotlin
5e34685f382c66c10b0dcca04a5b21ea28939ec6
[ "Apache-2.0" ]
1
2016-08-08T21:30:34.000Z
2016-08-08T21:30:34.000Z
plugins/lint/lint-checks/src/com/android/tools/klint/checks/BuiltinIssueRegistry.java
dotlin/kotlin
5e34685f382c66c10b0dcca04a5b21ea28939ec6
[ "Apache-2.0" ]
null
null
null
plugins/lint/lint-checks/src/com/android/tools/klint/checks/BuiltinIssueRegistry.java
dotlin/kotlin
5e34685f382c66c10b0dcca04a5b21ea28939ec6
[ "Apache-2.0" ]
null
null
null
40.228571
85
0.692898
1,001,531
/* * Copyright (C) 2011 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.android.tools.klint.checks; import com.android.annotations.NonNull; import com.android.annotations.VisibleForTesting; import com.android.tools.klint.client.api.IssueRegistry; import com.android.tools.klint.detector.api.Issue; import com.android.tools.klint.detector.api.Scope; import java.util.ArrayList; import java.util.Collections; import java.util.EnumSet; import java.util.List; /** Registry which provides a list of checks to be performed on an Android project */ public class BuiltinIssueRegistry extends IssueRegistry { private static final List<Issue> sIssues; static final int INITIAL_CAPACITY = 220; static { List<Issue> issues = new ArrayList<Issue>(INITIAL_CAPACITY); issues.add(AddJavascriptInterfaceDetector.ISSUE); issues.add(AlarmDetector.ISSUE); issues.add(AlwaysShowActionDetector.ISSUE); issues.add(AnnotationDetector.ISSUE); issues.add(ApiDetector.INLINED); issues.add(ApiDetector.OVERRIDE); issues.add(ApiDetector.UNSUPPORTED); issues.add(AppCompatCallDetector.ISSUE); issues.add(CallSuperDetector.ISSUE); issues.add(CipherGetInstanceDetector.ISSUE); issues.add(CleanupDetector.COMMIT_FRAGMENT); issues.add(CleanupDetector.RECYCLE_RESOURCE); issues.add(CommentDetector.EASTER_EGG); issues.add(CommentDetector.STOP_SHIP); issues.add(CustomViewDetector.ISSUE); issues.add(CutPasteDetector.ISSUE); issues.add(DateFormatDetector.DATE_FORMAT); issues.add(FragmentDetector.ISSUE); issues.add(GetSignaturesDetector.ISSUE); issues.add(HandlerDetector.ISSUE); issues.add(IconDetector.DUPLICATES_CONFIGURATIONS); issues.add(IconDetector.DUPLICATES_NAMES); issues.add(IconDetector.GIF_USAGE); issues.add(IconDetector.ICON_COLORS); issues.add(IconDetector.ICON_DENSITIES); issues.add(IconDetector.ICON_DIP_SIZE); issues.add(IconDetector.ICON_EXPECTED_SIZE); issues.add(IconDetector.ICON_EXTENSION); issues.add(IconDetector.ICON_LAUNCHER_SHAPE); issues.add(IconDetector.ICON_LOCATION); issues.add(IconDetector.ICON_MISSING_FOLDER); issues.add(IconDetector.ICON_MIX_9PNG); issues.add(IconDetector.ICON_NODPI); issues.add(IconDetector.ICON_XML_AND_PNG); issues.add(JavaPerformanceDetector.PAINT_ALLOC); issues.add(JavaPerformanceDetector.USE_SPARSE_ARRAY); issues.add(JavaPerformanceDetector.USE_VALUE_OF); issues.add(JavaScriptInterfaceDetector.ISSUE); issues.add(LayoutConsistencyDetector.INCONSISTENT_IDS); issues.add(LayoutInflationDetector.ISSUE); issues.add(LogDetector.CONDITIONAL); issues.add(LogDetector.LONG_TAG); issues.add(LogDetector.WRONG_TAG); issues.add(MergeRootFrameLayoutDetector.ISSUE); issues.add(NonInternationalizedSmsDetector.ISSUE); issues.add(OverdrawDetector.ISSUE); issues.add(OverrideConcreteDetector.ISSUE); issues.add(ParcelDetector.ISSUE); issues.add(PreferenceActivityDetector.ISSUE); issues.add(PrivateResourceDetector.ISSUE); issues.add(RequiredAttributeDetector.ISSUE); issues.add(RtlDetector.COMPAT); issues.add(RtlDetector.ENABLED); issues.add(RtlDetector.SYMMETRY); issues.add(RtlDetector.USE_START); issues.add(SdCardDetector.ISSUE); issues.add(SecurityDetector.EXPORTED_PROVIDER); issues.add(SecurityDetector.EXPORTED_RECEIVER); issues.add(SecurityDetector.EXPORTED_SERVICE); issues.add(SecurityDetector.OPEN_PROVIDER); issues.add(SecurityDetector.WORLD_READABLE); issues.add(SecurityDetector.WORLD_WRITEABLE); issues.add(ServiceCastDetector.ISSUE); issues.add(SetJavaScriptEnabledDetector.ISSUE); issues.add(SharedPrefsDetector.ISSUE); issues.add(SQLiteDetector.ISSUE); issues.add(StringFormatDetector.ARG_COUNT); issues.add(StringFormatDetector.ARG_TYPES); issues.add(StringFormatDetector.INVALID); issues.add(StringFormatDetector.POTENTIAL_PLURAL); issues.add(SupportAnnotationDetector.CHECK_PERMISSION); issues.add(SupportAnnotationDetector.CHECK_RESULT); issues.add(SupportAnnotationDetector.COLOR_USAGE); issues.add(SupportAnnotationDetector.MISSING_PERMISSION); issues.add(SupportAnnotationDetector.RANGE); issues.add(SupportAnnotationDetector.RESOURCE_TYPE); issues.add(SupportAnnotationDetector.THREAD); issues.add(SupportAnnotationDetector.TYPE_DEF); issues.add(ToastDetector.ISSUE); issues.add(UnusedResourceDetector.ISSUE); issues.add(UnusedResourceDetector.ISSUE_IDS); issues.add(ViewConstructorDetector.ISSUE); issues.add(ViewHolderDetector.ISSUE); issues.add(ViewTypeDetector.ISSUE); issues.add(WrongCallDetector.ISSUE); issues.add(WrongImportDetector.ISSUE); sIssues = Collections.unmodifiableList(issues); } /** * Constructs a new {@link BuiltinIssueRegistry} */ public BuiltinIssueRegistry() { } @NonNull @Override public List<Issue> getIssues() { return sIssues; } @Override protected int getIssueCapacity(@NonNull EnumSet<Scope> scope) { if (scope.equals(Scope.ALL)) { return getIssues().size(); } else { int initialSize = 12; if (scope.contains(Scope.RESOURCE_FILE)) { initialSize += 75; } else if (scope.contains(Scope.ALL_RESOURCE_FILES)) { initialSize += 10; } if (scope.contains(Scope.SOURCE_FILE)) { initialSize += 55; } else if (scope.contains(Scope.CLASS_FILE)) { initialSize += 15; } else if (scope.contains(Scope.MANIFEST)) { initialSize += 30; } else if (scope.contains(Scope.GRADLE_FILE)) { initialSize += 5; } return initialSize; } } /** * Reset the registry such that it recomputes its available issues. * <p> * NOTE: This is only intended for testing purposes. */ @VisibleForTesting public static void reset() { IssueRegistry.reset(); } }
92407a3ace60c3ba3fc7283d21f3df3f1dccd507
766
java
Java
Complejos_Java_ConTabladeSimbolos_Builtins/Complejos_Java/Auxiliar.java
PitCoder/Compilers
1028a9c1637dae88002bfbbd47b55585c8c1befe
[ "MIT" ]
1
2021-06-15T19:27:59.000Z
2021-06-15T19:27:59.000Z
Complejos_Java_ConTabladeSimbolos_Builtins/Complejos_Java/Auxiliar.java
PitCoder/Compilers
1028a9c1637dae88002bfbbd47b55585c8c1befe
[ "MIT" ]
null
null
null
Complejos_Java_ConTabladeSimbolos_Builtins/Complejos_Java/Auxiliar.java
PitCoder/Compilers
1028a9c1637dae88002bfbbd47b55585c8c1befe
[ "MIT" ]
1
2019-10-08T05:38:29.000Z
2019-10-08T05:38:29.000Z
28.37037
80
0.561358
1,001,532
public class Auxiliar { public int[] obtenerComponentes(String entrada) { entrada = entrada.replaceAll("\\s+", ""); String bufferReal = ""; String bufferImg = ""; for (int i = 0; i < entrada.length(); i++) { if ((int) entrada.charAt(i) > 47 && (int) entrada.charAt(i) < 58) { bufferReal += entrada.charAt(i); } else { break; } } if (entrada.contains("+")) bufferImg = entrada.substring(entrada.indexOf("+"), entrada.length() - 1); if (entrada.contains("-")) bufferImg = entrada.substring(entrada.indexOf("-"), entrada.length() - 1); int cmp[] = new int[2]; cmp[0] = Integer.parseInt(bufferReal); cmp[1] = Integer.parseInt(bufferImg); return cmp; } }
92407a6177225b7865a912cf144da491825183a7
1,289
java
Java
pipeline/src/com/happydroids/droidtowers/pipeline/GenerateLicenseFileList.java
pplante/droidtowers
e0858de70728a54c64d85850ab1aa2ecc3c2ac46
[ "MIT" ]
20
2015-01-18T16:31:16.000Z
2021-05-07T00:55:53.000Z
pipeline/src/com/happydroids/droidtowers/pipeline/GenerateLicenseFileList.java
pplante/droidtowers
e0858de70728a54c64d85850ab1aa2ecc3c2ac46
[ "MIT" ]
1
2017-07-29T10:35:42.000Z
2017-07-29T10:35:42.000Z
pipeline/src/com/happydroids/droidtowers/pipeline/GenerateLicenseFileList.java
pplante/droidtowers
e0858de70728a54c64d85850ab1aa2ecc3c2ac46
[ "MIT" ]
9
2015-04-04T12:33:05.000Z
2019-06-20T21:43:01.000Z
31.439024
111
0.735454
1,001,533
/* * Copyright (c) 2012. HappyDroids LLC, All rights reserved. */ package com.happydroids.droidtowers.pipeline; import com.badlogic.gdx.files.FileHandle; import com.badlogic.gdx.utils.GdxNativesLoader; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; import com.google.common.collect.Lists; import java.io.IOException; import java.util.List; public class GenerateLicenseFileList { private static FileHandle assetsDir = new FileHandle("assets/"); private static List<String> licenseFiles = Lists.newArrayList(); public static void main(String[] args) { GdxNativesLoader.load(); addDirectoryToAssetManager("licenses/", ".txt"); try { ObjectMapper mapper = new ObjectMapper(); mapper.enable(SerializationFeature.INDENT_OUTPUT); new FileHandle("assets/licenses/index.json").writeString(mapper.writeValueAsString(licenseFiles), false); } catch (IOException e) { e.printStackTrace(); } } private static void addDirectoryToAssetManager(String folder, String suffix) { for (FileHandle child : assetsDir.child(folder).list(suffix)) { System.out.println("Found license: " + child.path()); licenseFiles.add(child.path().replace("assets/", "")); } } }
92407b965b13b31e92af478381a54e9c89bb43c8
1,094
java
Java
hummingbird-spring/src/main/java/com/hczhang/hummingbird/spring/cloud/lifecycle/SpringAggregateFactoryAware.java
steven-zhc/hummingbird-framework
e31a672e14ba36081c8a1effb84a1af4c5e5b58f
[ "Apache-2.0" ]
4
2015-12-06T17:03:36.000Z
2016-10-06T08:49:49.000Z
hummingbird-spring/src/main/java/com/hczhang/hummingbird/spring/cloud/lifecycle/SpringAggregateFactoryAware.java
steven-zhc/hummingbird-framework
e31a672e14ba36081c8a1effb84a1af4c5e5b58f
[ "Apache-2.0" ]
null
null
null
hummingbird-spring/src/main/java/com/hczhang/hummingbird/spring/cloud/lifecycle/SpringAggregateFactoryAware.java
steven-zhc/hummingbird-framework
e31a672e14ba36081c8a1effb84a1af4c5e5b58f
[ "Apache-2.0" ]
1
2020-04-22T07:01:10.000Z
2020-04-22T07:01:10.000Z
30.388889
94
0.748629
1,001,534
package com.hczhang.hummingbird.spring.cloud.lifecycle; import com.hczhang.hummingbird.annotation.Source; import com.hczhang.hummingbird.cloud.lifecycle.AggregateFactoryAware; import com.hczhang.hummingbird.model.AggregateFactory; import com.hczhang.hummingbird.model.annotation.Factory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.context.ApplicationContext; /** * Created by steven on 10/3/14. */ public class SpringAggregateFactoryAware extends AggregateFactoryAware { private static Logger logger = LoggerFactory.getLogger(SpringAggregateFactoryAware.class); private ApplicationContext context; public SpringAggregateFactoryAware(String basePackage, ApplicationContext context) { super(basePackage); this.context = context; } @Override public AggregateFactory newInstance(Factory ds, Class cls) throws Exception { if (ds.source() == Source.SPRING) { return (AggregateFactory) context.getBean(cls); } else { return super.newInstance(ds, cls); } } }
92407c618f487b76c305e6f7c6bd9ab17a5fe402
1,891
java
Java
tooling/ide/api/src/org/apache/sling/ide/transport/FileInfo.java
tteofili/sling
97be5ec4711d064dfb762e347fd9a92bf471ba29
[ "Apache-2.0" ]
5
2019-05-14T15:45:24.000Z
2021-11-08T23:31:39.000Z
tooling/ide/api/src/org/apache/sling/ide/transport/FileInfo.java
tteofili/sling
97be5ec4711d064dfb762e347fd9a92bf471ba29
[ "Apache-2.0" ]
4
2018-04-16T12:09:30.000Z
2020-02-21T15:06:06.000Z
tooling/ide/api/src/org/apache/sling/ide/transport/FileInfo.java
tteofili/sling
97be5ec4711d064dfb762e347fd9a92bf471ba29
[ "Apache-2.0" ]
8
2018-02-19T18:18:47.000Z
2021-11-08T23:31:42.000Z
30.015873
85
0.718667
1,001,535
/* * 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 org.apache.sling.ide.transport; public class FileInfo { private String location; private String name; private String relativeLocation; /** * Constructs a new <tt>FileInfo</tt> object * * @param location the absolute location of the file on the filesystem * @param relativeLocation the location of the file relative to the repository root * @param name the name of the file */ public FileInfo(String location, String relativeLocation,String name) { super(); this.location = location; this.name = name; this.relativeLocation = relativeLocation; } /** * @return the absolute location of the file on the filesystem */ public String getLocation() { return location; } public String getName() { return name; } /** * @return the location of the file relative to the repository root */ public String getRelativeLocation() { return relativeLocation; } @Override public String toString() { return "FileInfo [location=" + location + ", name=" + name + ", relativeLocation=" + relativeLocation + "]"; } }
92407cc4d79657bec981348143c001ef93ed21f2
3,405
java
Java
easy-archetype-framework/easy-archetype-framework-starter/src/main/java/io/github/fallingsoulm/easy/archetype/framework/lambda/LambdaUtils.java
fallingsoulm/easy-archetype-module
9b4a8c1e30cea571401c5841e507215bfd45197d
[ "Apache-2.0" ]
null
null
null
easy-archetype-framework/easy-archetype-framework-starter/src/main/java/io/github/fallingsoulm/easy/archetype/framework/lambda/LambdaUtils.java
fallingsoulm/easy-archetype-module
9b4a8c1e30cea571401c5841e507215bfd45197d
[ "Apache-2.0" ]
null
null
null
easy-archetype-framework/easy-archetype-framework-starter/src/main/java/io/github/fallingsoulm/easy/archetype/framework/lambda/LambdaUtils.java
fallingsoulm/easy-archetype-module
9b4a8c1e30cea571401c5841e507215bfd45197d
[ "Apache-2.0" ]
1
2022-02-27T02:18:13.000Z
2022-02-27T02:18:13.000Z
24.148936
108
0.696329
1,001,536
package io.github.fallingsoulm.easy.archetype.framework.lambda; import java.lang.ref.WeakReference; import java.util.*; import java.util.concurrent.ConcurrentHashMap; import static java.util.Locale.ENGLISH; /** * Lamdba工具类 * * @author luyanan * @since 2021/3/8 **/ public class LambdaUtils<T> { private Class<T> entityClass; private T entity; public LambdaUtils(Class<T> entityClass) { this.entityClass = entityClass; init(); } public LambdaUtils(T entity) { this.entity = entity; init(); } private void init() { if (this.entityClass == null && this.entity != null) { this.entityClass = (Class<T>) entity.getClass(); } if (entityClass != null) { columnMap = LambdaUtils.getColumnMap(entityClass); initColumnMap = true; } LAMBDA_MAP.put(entityClass.getName(), createColumnCacheMap(this.entityClass)); } private Map<String, ColumnCache> createColumnCacheMap(Class<T> entityClass) { Map<String, ColumnCache> map = new HashMap<>(16); Arrays.stream(entityClass.getFields()).forEach(i -> { map.put(formatKey(i.getName()), new ColumnCache(i.getName(), "")); }); return map; } /** * 字段映射 */ private static final Map<String, Map<String, ColumnCache>> LAMBDA_MAP = new ConcurrentHashMap<>(); /** * SerializedLambda 反序列化缓存 */ private static final Map<Class<?>, WeakReference<SerializedLambda>> FUNC_CACHE = new ConcurrentHashMap<>(); private Map<String, ColumnCache> columnMap = null; private boolean initColumnMap = false; /** * 解析 lambda 表达式, 该方法只是调用了 {@link SerializedLambda#resolve(Sfunction)} 中的方法,在此基础上加了缓存。 * 该缓存可能会在任意不定的时间被清除 * * @param func 需要解析的 lambda 对象 * @param <T> 类型,被调用的 Function 对象的目标类型 * @return 返回解析后的结果 * @see SerializedLambda#resolve(Sfunction) */ public static <T> SerializedLambda resolve(Sfunction<T, ?> func) { Class<?> clazz = func.getClass(); return Optional.ofNullable(FUNC_CACHE.get(clazz)) .map(WeakReference::get) .orElseGet(() -> { SerializedLambda lambda = SerializedLambda.resolve(func); FUNC_CACHE.put(clazz, new WeakReference<>(lambda)); return lambda; }); } /** * 格式化 key 将传入的 key 变更为大写格式 * * <pre> * Assert.assertEquals("USERID", formatKey("userId")) * </pre> * * @param key key * @return 大写的 key */ public static String formatKey(String key) { return key.toUpperCase(ENGLISH); } /** * 获取实体对应字段 MAP * * @param clazz 实体类 * @return 缓存 map */ public static Map<String, ColumnCache> getColumnMap(Class<?> clazz) { return LAMBDA_MAP.getOrDefault(clazz.getName(), Collections.emptyMap()); } /** * 获取 SerializedLambda 对应的列信息,从 lambda 表达式中推测实体类 * <p> * 如果获取不到列信息,那么本次条件组装将会失败 * * @param lambda lambda 表达式 * @param onlyColumn 如果是,结果: "name", 如果否: "name" as "name" * @return 列 * // * @throws com.baomidou.mybatisplus.core.exceptions.MybatisPlusException 获取不到列信息时抛出异常 * @see SerializedLambda#getImplClass() * @see SerializedLambda#getImplMethodName() */ private String getColumn(SerializedLambda lambda, boolean onlyColumn) { String fieldName = PropertyNamer.methodToProperty(lambda.getImplMethodName()); return fieldName; } public String columnToString(Sfunction<T, ?> column) { return columnToString(column, true); } public String columnToString(Sfunction<T, ?> column, boolean onlyColumn) { return getColumn(LambdaUtils.resolve(column), onlyColumn); } }
92407cd35ca1c4df052a3de515a8a75114dd566a
519
java
Java
src/main/java/com/stevesoltys/indeed/model/IndeedSearchResults.java
stevesoltys/indeed
5fb9a83c8d73c4094f01eb0e5b29d3a9b1b8fb93
[ "MIT" ]
1
2018-04-18T22:11:55.000Z
2018-04-18T22:11:55.000Z
src/main/java/com/stevesoltys/indeed/model/IndeedSearchResults.java
stevesoltys/indeed
5fb9a83c8d73c4094f01eb0e5b29d3a9b1b8fb93
[ "MIT" ]
null
null
null
src/main/java/com/stevesoltys/indeed/model/IndeedSearchResults.java
stevesoltys/indeed
5fb9a83c8d73c4094f01eb0e5b29d3a9b1b8fb93
[ "MIT" ]
1
2020-03-03T10:05:52.000Z
2020-03-03T10:05:52.000Z
19.961538
115
0.678227
1,001,537
package com.stevesoltys.indeed.model; import lombok.Data; import java.util.List; /** * Wrapper for an Indeed API search response. * * @author Steve Soltys */ @Data public class IndeedSearchResults { /** * The results. */ private final List<IndeedResult> results; /** * The total number of results. Note that this is not the number of results in this list alone. It is the total * number of results given for this particular search. */ private final int totalResults; }
92407d784f3b777b38f65f10709a96a97d696fd4
745
java
Java
core/src/main/java/org/adamalang/translator/env/ComputeContext.java
mathgladiator/adama-lang
5f60a1cdd712e5f8b0f50cf9d70535895eeebd55
[ "MIT" ]
71
2020-06-12T02:41:01.000Z
2022-03-30T08:49:17.000Z
core/src/main/java/org/adamalang/translator/env/ComputeContext.java
mathgladiator/adama-lang
5f60a1cdd712e5f8b0f50cf9d70535895eeebd55
[ "MIT" ]
24
2021-02-12T10:25:25.000Z
2022-03-29T03:07:20.000Z
core/src/main/java/org/adamalang/translator/env/ComputeContext.java
mathgladiator/adama-lang
5f60a1cdd712e5f8b0f50cf9d70535895eeebd55
[ "MIT" ]
6
2020-09-21T11:13:16.000Z
2021-12-23T13:36:21.000Z
35.47619
190
0.720805
1,001,538
/* * This file is subject to the terms and conditions outlined in the file 'LICENSE' (hint: it's MIT); this file is located in the root directory near the README.md which you should also read. * * This file is part of the 'Adama' project which is a programming language and document store for board games; however, it can be so much more. * * See http://www.adama-lang.org/ for more information. * * (c) 2020 - 2022 by Jeffrey M. Barber (http://jeffrey.io) */ package org.adamalang.translator.env; /** * code runs within a compute context. Either the code is on the left side and assignable, or on the * right and is a native compute value */ public enum ComputeContext { Assignment, // lvalue Computation, // rvalue Unknown }
92407e1d428a11957cab0f455da14fc0218fe8e7
727
java
Java
src/com/kail/robot/core/MouseHookListener.java
samllpig380/AutoTestProject
ebb3b84a63cfdee225d1c640ddd3e3910fb38e29
[ "WTFPL" ]
null
null
null
src/com/kail/robot/core/MouseHookListener.java
samllpig380/AutoTestProject
ebb3b84a63cfdee225d1c640ddd3e3910fb38e29
[ "WTFPL" ]
null
null
null
src/com/kail/robot/core/MouseHookListener.java
samllpig380/AutoTestProject
ebb3b84a63cfdee225d1c640ddd3e3910fb38e29
[ "WTFPL" ]
null
null
null
25.068966
78
0.602476
1,001,539
package com.kail.robot.core; import com.sun.jna.platform.win32.User32; import com.sun.jna.platform.win32.WinDef.LRESULT; import com.sun.jna.platform.win32.WinDef.WPARAM; import com.sun.jna.platform.win32.WinUser.HHOOK; import com.sun.jna.platform.win32.WinUser.HOOKPROC; /** *������깳�ӣ����¼�����ص� * * */ public abstract class MouseHookListener implements HOOKPROC { public User32 lib = null;//windowӦ�ó��򴰿� public HHOOK hhk;//���Ӿ�� /** * �ص� * �������ֵ���е���һ�����ӳ��򣬷���ֵ�ú���ȡ���ڹ��� * @param nCode * @param wParam * @param lParam * @return */ public LRESULT callback(int nCode, WPARAM wParam, MouseHookStruct lParam){ return null; } }
92407e4dadf76e0f1393451b58b03f76d6abfdd7
4,361
java
Java
gameserver/head-src/com/l2jfrozen/gameserver/geo/GeoData.java
DigitalCoin1/L2SPERO
f9ec069804d7bf13f9c4bfb508db2eb6ce37ab94
[ "Unlicense" ]
null
null
null
gameserver/head-src/com/l2jfrozen/gameserver/geo/GeoData.java
DigitalCoin1/L2SPERO
f9ec069804d7bf13f9c4bfb508db2eb6ce37ab94
[ "Unlicense" ]
null
null
null
gameserver/head-src/com/l2jfrozen/gameserver/geo/GeoData.java
DigitalCoin1/L2SPERO
f9ec069804d7bf13f9c4bfb508db2eb6ce37ab94
[ "Unlicense" ]
null
null
null
22.25
116
0.67989
1,001,540
/* * L2jFrozen Project - www.l2jfrozen.com * * 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 2, 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, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA * 02111-1307, USA. * * http://www.gnu.org/copyleft/gpl.html */ package com.l2jfrozen.gameserver.geo; import org.apache.log4j.Logger; import com.l2jfrozen.Config; import com.l2jfrozen.gameserver.geo.pathfinding.Node; import com.l2jfrozen.gameserver.model.L2Object; import com.l2jfrozen.gameserver.model.Location; import com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance; import com.l2jfrozen.util.Point3D; public class GeoData { protected static final Logger LOGGER = Logger.getLogger(GeoData.class); private static final class SingletonHolder { static { LOGGER.info("Geodata Engine: Disabled."); } protected static final GeoData INSTANCE = new GeoData(); } protected GeoData() { } public static GeoData getInstance() { if (Config.GEODATA > 0) return GeoEngine.getInstance(); return SingletonHolder.INSTANCE; } // Public Methods /** * @param x * @param y * @return Geo Block Type */ public short getType(final int x, final int y) { return 0; } /** * @param x * @param y * @param z * @return Nearles Z */ public short getHeight(final int x, final int y, final int z) { return (short) z; } /** * @param x * @param y * @param zmin * @param zmax * @param spawnid * @return */ public short getSpawnHeight(final int x, final int y, final int zmin, final int zmax, final int spawnid) { return (short) zmin; } /** * @param x * @param y * @return */ public String geoPosition(final int x, final int y) { return ""; } /** * @param cha * @param target * @return True if cha can see target (LOS) */ public boolean canSeeTarget(final L2Object cha, final L2Object target) { // If geo is off do simple check :] // Don't allow casting on players on different dungeon lvls etc return Math.abs(target.getZ() - cha.getZ()) < 1000; } public boolean canSeeTarget(final L2Object cha, final Point3D worldPosition) { // If geo is off do simple check :] // Don't allow casting on players on different dungeon lvls etc return Math.abs(worldPosition.getZ() - cha.getZ()) < 1000; } public boolean canSeeTarget(final int x, final int y, final int z, final int tx, final int ty, final int tz) { // If geo is off do simple check :] // Don't allow casting on players on different dungeon lvls etc return (Math.abs(z - tz) < 1000); } /** * @param gm * @param target * @return True if cha can see target (LOS) and send usful info to PC */ public boolean canSeeTargetDebug(final L2PcInstance gm, final L2Object target) { return true; } /** * @param x * @param y * @param z * @return Geo NSWE (0-15) */ public short getNSWE(final int x, final int y, final int z) { return 15; } /** * @param x * @param y * @param z * @param tx * @param ty * @param tz * @return Last Location (x,y,z) where player can walk - just before wall */ public Location moveCheck(final int x, final int y, final int z, final int tx, final int ty, final int tz) { return new Location(tx, ty, tz); } public boolean canMoveFromToTarget(final int x, final int y, final int z, final int tx, final int ty, final int tz) { return true; } /** * @param gm * @param comment */ public void addGeoDataBug(final L2PcInstance gm, final String comment) { // Do Nothing } public void unloadGeodata(final byte rx, final byte ry) { } public boolean loadGeodataFile(final byte rx, final byte ry) { return false; } public boolean hasGeo(final int x, final int y) { return false; } public Node[] getNeighbors(final Node n) { return null; } }
92407ee99ac6e31a0426305176e8132b6fc08ce4
145
java
Java
src/main/java/Main.java
zelouafi/excel-to-impex
d74268b5fa551210436e63cf5f79b308230ba688
[ "Apache-2.0" ]
null
null
null
src/main/java/Main.java
zelouafi/excel-to-impex
d74268b5fa551210436e63cf5f79b308230ba688
[ "Apache-2.0" ]
null
null
null
src/main/java/Main.java
zelouafi/excel-to-impex
d74268b5fa551210436e63cf5f79b308230ba688
[ "Apache-2.0" ]
null
null
null
14.5
44
0.586207
1,001,541
/** * @author zelouafi */ public class Main { public static void main(String[] args) { System.out.println("Hello Impex"); } }
92408028b110f11da30f6db8b131a580f9320179
859
java
Java
core/gridarchitect/src/main/java/akka/systemMessages/SaveMessage.java
SES-fortiss/SmartGridCoSimulation
f36af788b2c4de0e63688cd8faf0b0645c20264a
[ "Apache-2.0" ]
10
2018-03-14T15:47:10.000Z
2022-01-16T14:21:49.000Z
core/gridarchitect/src/main/java/akka/systemMessages/SaveMessage.java
SES-fortiss/SmartGridCoSimulation
f36af788b2c4de0e63688cd8faf0b0645c20264a
[ "Apache-2.0" ]
132
2019-08-27T15:01:56.000Z
2022-02-16T01:15:51.000Z
core/gridarchitect/src/main/java/akka/systemMessages/SaveMessage.java
SES-fortiss/SmartGridCoSimulation
f36af788b2c4de0e63688cd8faf0b0645c20264a
[ "Apache-2.0" ]
7
2017-12-11T11:33:13.000Z
2021-09-16T03:03:20.000Z
26.84375
85
0.724098
1,001,542
/* * Copyright (c) 2011-2015, fortiss GmbH. * Licensed under the Apache License, Version 2.0. * * Use, modification and distribution are subject to the terms specified * in the accompanying license file LICENSE.txt located at the root directory * of this software distribution. */ package akka.systemMessages; import akka.basicMessages.AnswerContent; /** * Created with IntelliJ IDEA. * User: amack * Date: 15.10.13 * Time: 14:35 * To change this template use File | Settings | File Templates. */ public class SaveMessage { public final int timeStep; public final String actorPath; public final AnswerContent answerContent; public SaveMessage(int timeStep, String actorPath, AnswerContent answerContent) { this.timeStep = timeStep; this.actorPath = actorPath; this.answerContent = answerContent; } }
924080e518aa9804e212a7062180fb605de0016b
3,729
java
Java
src/main/java/com/github/davidmoten/rx2/internal/flowable/TransformerDecode.java
amsiq/rxjava2-extras
0d8e7e5cad69fcb6b9667e48e2cb2d0c90b80813
[ "Apache-2.0" ]
173
2016-12-09T06:15:26.000Z
2022-03-15T11:56:02.000Z
src/main/java/com/github/davidmoten/rx2/internal/flowable/TransformerDecode.java
amsiq/rxjava2-extras
0d8e7e5cad69fcb6b9667e48e2cb2d0c90b80813
[ "Apache-2.0" ]
44
2017-01-12T09:38:30.000Z
2022-03-25T12:03:26.000Z
src/main/java/com/github/davidmoten/rx2/internal/flowable/TransformerDecode.java
amsiq/rxjava2-extras
0d8e7e5cad69fcb6b9667e48e2cb2d0c90b80813
[ "Apache-2.0" ]
19
2017-01-11T08:22:22.000Z
2022-02-14T20:14:11.000Z
32.710526
162
0.592652
1,001,543
package com.github.davidmoten.rx2.internal.flowable; import java.nio.ByteBuffer; import java.nio.CharBuffer; import java.nio.charset.CharacterCodingException; import java.nio.charset.CharsetDecoder; import java.nio.charset.CoderResult; import java.util.concurrent.Callable; import io.reactivex.BackpressureStrategy; import io.reactivex.FlowableEmitter; import io.reactivex.FlowableTransformer; import io.reactivex.functions.BiPredicate; import io.reactivex.functions.Function3; public final class TransformerDecode { private TransformerDecode() { // prevent instantiation } public static FlowableTransformer<byte[], String> decode(final CharsetDecoder decoder, BackpressureStrategy backpressureStrategy, int batchSize) { Callable<ByteBuffer> initialState = new Callable<ByteBuffer>() { @Override public ByteBuffer call() { return null; } }; Function3<ByteBuffer, byte[], FlowableEmitter<String>, ByteBuffer> transition = new Function3<ByteBuffer, byte[], FlowableEmitter<String>, ByteBuffer>() { @Override public ByteBuffer apply(ByteBuffer last, byte[] next, FlowableEmitter<String> o) { Result result = process(next, last, false, decoder, o); return result.leftOver; } }; BiPredicate<ByteBuffer, FlowableEmitter<String>> completion = new BiPredicate<ByteBuffer, FlowableEmitter<String>>() { @Override public boolean test(ByteBuffer last, FlowableEmitter<String> subscriber) { return process(null, last, true, decoder, subscriber).canEmitFurther; } }; return com.github.davidmoten.rx2.flowable.Transformers.stateMachine(initialState, transition, completion, backpressureStrategy, batchSize); } private static final class Result { final ByteBuffer leftOver; final boolean canEmitFurther; Result(ByteBuffer leftOver, boolean canEmitFurther) { this.leftOver = leftOver; this.canEmitFurther = canEmitFurther; } } public static Result process(byte[] next, ByteBuffer last, boolean endOfInput, CharsetDecoder decoder, FlowableEmitter<String> emitter) { if (emitter.isCancelled()) return new Result(null, false); ByteBuffer bb; if (last != null) { if (next != null) { // merge leftover in front of the next bytes bb = ByteBuffer.allocate(last.remaining() + next.length); bb.put(last); bb.put(next); bb.flip(); } else { // next == null bb = last; } } else { // last == null if (next != null) { bb = ByteBuffer.wrap(next); } else { // next == null return new Result(null, true); } } CharBuffer cb = CharBuffer.allocate((int) (bb.limit() * decoder.averageCharsPerByte())); CoderResult cr = decoder.decode(bb, cb, endOfInput); cb.flip(); if (cr.isError()) { try { cr.throwException(); } catch (CharacterCodingException e) { emitter.onError(e); return new Result(null, false); } } ByteBuffer leftOver; if (bb.remaining() > 0) { leftOver = bb; } else { leftOver = null; } String string = cb.toString(); if (!string.isEmpty()) emitter.onNext(string); return new Result(leftOver, true); } }
924080fa42149fdda1ed5b9233d79b2304710f90
2,495
java
Java
src/charactermanaj/model/io/FilePartsDataLoader.java
dsapandora/DSACharacterMaker
7db6b3b429b6fae846df8ea949fcf9d58d13704b
[ "Apache-2.0" ]
null
null
null
src/charactermanaj/model/io/FilePartsDataLoader.java
dsapandora/DSACharacterMaker
7db6b3b429b6fae846df8ea949fcf9d58d13704b
[ "Apache-2.0" ]
null
null
null
src/charactermanaj/model/io/FilePartsDataLoader.java
dsapandora/DSACharacterMaker
7db6b3b429b6fae846df8ea949fcf9d58d13704b
[ "Apache-2.0" ]
null
null
null
27.722222
92
0.689379
1,001,544
package charactermanaj.model.io; import java.io.File; import java.io.FileFilter; import java.util.HashMap; import java.util.Map; import charactermanaj.graphics.io.FileImageResource; import charactermanaj.model.Layer; import charactermanaj.model.PartsCategory; import charactermanaj.model.PartsFiles; import charactermanaj.model.PartsIdentifier; import charactermanaj.model.PartsSpec; import charactermanaj.util.FileNameNormalizer; /** * ディレクトリを指定して、そこからキャラクターのパーツデータをロードするローダー.<br> * * @author seraphy * */ public class FilePartsDataLoader implements PartsDataLoader { /** * ベースディレクトリ */ private File baseDir; public FilePartsDataLoader(File baseDir) { if (baseDir == null) { throw new IllegalArgumentException(); } this.baseDir = baseDir; } public File getBaseDir() { return baseDir; } public Map<PartsIdentifier, PartsSpec> load(PartsCategory category) { if (category == null) { throw new IllegalArgumentException(); } // ファイル名をノーマライズする FileNameNormalizer normalizer = FileNameNormalizer.getDefault(); final Map<PartsIdentifier, PartsSpec> images = new HashMap<PartsIdentifier, PartsSpec>(); for (Layer layer : category.getLayers()) { File searchDir = new File(baseDir, layer.getDir()); if (!searchDir.exists() || !searchDir.isDirectory()) { continue; } File[] imgFiles = searchDir.listFiles(new FileFilter() { public boolean accept(File pathname) { if (pathname.isFile()) { String lcfname = pathname.getName().toLowerCase(); return lcfname.endsWith(".png"); } return false; } }); if (imgFiles == null) { imgFiles = new File[0]; } for (File imgFile : imgFiles) { String partsName = normalizer.normalize(imgFile.getName()); int extpos = partsName.lastIndexOf("."); if (extpos > 0) { partsName = partsName.substring(0, extpos); } PartsIdentifier partsIdentifier = new PartsIdentifier(category, partsName, partsName); PartsSpec partsSpec = images.get(partsIdentifier); if (partsSpec == null) { partsSpec = createPartsSpec(partsIdentifier); images.put(partsIdentifier, partsSpec); } PartsFiles parts = partsSpec.getPartsFiles(); parts.put(layer, new FileImageResource(imgFile)); } } return images; } protected PartsSpec createPartsSpec(PartsIdentifier partsIdentifier) { return new PartsSpec(partsIdentifier); } }
92408200674471c9067c6d3990a34c2e181aa449
2,479
java
Java
components/camel-paxlogging/src/generated/java/org/apache/camel/component/paxlogging/PaxLoggingComponentConfigurer.java
ramu11/camel-karaf
4d5f026384c2a3dc92a9f91703bf820a5be556be
[ "Apache-2.0" ]
null
null
null
components/camel-paxlogging/src/generated/java/org/apache/camel/component/paxlogging/PaxLoggingComponentConfigurer.java
ramu11/camel-karaf
4d5f026384c2a3dc92a9f91703bf820a5be556be
[ "Apache-2.0" ]
null
null
null
components/camel-paxlogging/src/generated/java/org/apache/camel/component/paxlogging/PaxLoggingComponentConfigurer.java
ramu11/camel-karaf
4d5f026384c2a3dc92a9f91703bf820a5be556be
[ "Apache-2.0" ]
null
null
null
40.639344
143
0.722469
1,001,545
/* Generated by camel build tools - do NOT edit this file! */ package org.apache.camel.component.paxlogging; import java.util.Map; import org.apache.camel.CamelContext; import org.apache.camel.spi.GeneratedPropertyConfigurer; import org.apache.camel.spi.PropertyConfigurerGetter; import org.apache.camel.util.CaseInsensitiveMap; import org.apache.camel.support.component.PropertyConfigurerSupport; /** * Generated by camel build tools - do NOT edit this file! */ @SuppressWarnings("unchecked") public class PaxLoggingComponentConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter { private static final Map<String, Object> ALL_OPTIONS; static { Map<String, Object> map = new CaseInsensitiveMap(); map.put("bridgeErrorHandler", boolean.class); map.put("bundleContext", org.osgi.framework.BundleContext.class); map.put("basicPropertyBinding", boolean.class); ALL_OPTIONS = map; } @Override public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) { PaxLoggingComponent target = (PaxLoggingComponent) obj; switch (ignoreCase ? name.toLowerCase() : name) { case "basicpropertybinding": case "basicPropertyBinding": target.setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true; case "bridgeerrorhandler": case "bridgeErrorHandler": target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true; case "bundlecontext": case "bundleContext": target.setBundleContext(property(camelContext, org.osgi.framework.BundleContext.class, value)); return true; default: return false; } } @Override public Map<String, Object> getAllOptions(Object target) { return ALL_OPTIONS; } @Override public Object getOptionValue(Object obj, String name, boolean ignoreCase) { PaxLoggingComponent target = (PaxLoggingComponent) obj; switch (ignoreCase ? name.toLowerCase() : name) { case "basicpropertybinding": case "basicPropertyBinding": return target.isBasicPropertyBinding(); case "bridgeerrorhandler": case "bridgeErrorHandler": return target.isBridgeErrorHandler(); case "bundlecontext": case "bundleContext": return target.getBundleContext(); default: return null; } } }
9240825bb262d1309202f5f3958a364944d59424
689
java
Java
config-git-server/src/main/java/com/springcloud/configgitserver/ConfigGitServerApplication.java
amo1996/springcloud
08b8b0bba47d0a27c2308537045f4f15b6501997
[ "MIT" ]
2
2019-04-25T12:20:29.000Z
2019-04-25T12:20:30.000Z
config-git-server/src/main/java/com/springcloud/configgitserver/ConfigGitServerApplication.java
amo1996/springcloud
08b8b0bba47d0a27c2308537045f4f15b6501997
[ "MIT" ]
null
null
null
config-git-server/src/main/java/com/springcloud/configgitserver/ConfigGitServerApplication.java
amo1996/springcloud
08b8b0bba47d0a27c2308537045f4f15b6501997
[ "MIT" ]
null
null
null
27.56
68
0.79971
1,001,546
package com.springcloud.configgitserver; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.config.server.EnableConfigServer; @SpringBootApplication //启动配置中心 @EnableConfigServer public class ConfigGitServerApplication { /** * 记录log * 启动的时候报错 * org.yaml.snakeyaml.error.YAMLException: * java.nio.charset.MalformedInputException : Input length = 1 /2 * 可能的原因是我之前yml文件编码被不小心改成了GBK 然后我又改回来了 就启动不了 * 解决:尝试了编码改回来也不行 就直接删除了原文件 重新将内容粘贴到新的yml文件中。 * @param args */ public static void main(String[] args) { SpringApplication.run(ConfigGitServerApplication.class, args); } }
9240833f050f108b6b2a89870256d6e717fef30f
439
java
Java
kanbanSpringServer/src/main/java/org/spring/kanban/exception/ValidationErrorResponse.java
BraianS/spring-security-angular-kanban-app
6e1e6224ddb824e687c6f2c994085396de3884a4
[ "MIT" ]
2
2020-09-06T14:36:35.000Z
2020-09-06T14:36:38.000Z
kanbanSpringServer/src/main/java/org/spring/kanban/exception/ValidationErrorResponse.java
BraianS/spring-security-angular-kanban-app
6e1e6224ddb824e687c6f2c994085396de3884a4
[ "MIT" ]
5
2022-02-28T03:04:28.000Z
2022-03-11T02:04:56.000Z
kanbanSpringServer/src/main/java/org/spring/kanban/exception/ValidationErrorResponse.java
BraianS/spring-security-angular-kanban-app
6e1e6224ddb824e687c6f2c994085396de3884a4
[ "MIT" ]
1
2022-01-16T04:11:25.000Z
2022-01-16T04:11:25.000Z
18.291667
94
0.751708
1,001,547
package org.spring.kanban.exception; import java.util.List; import org.springframework.http.HttpStatus; /** * @author Braian * */ public class ValidationErrorResponse extends ApiError { private List<String> details; public ValidationErrorResponse(HttpStatus httpStatus, String message, List<String> details) { super(httpStatus, message); this.details = details; } public List<String> getDetails() { return details; } }
924083790e1f9dffbf36783c82d37ccababf32be
9,147
java
Java
rxjava-core/src/test/java/rx/internal/operators/OperatorLastTest.java
tomrozb/RxJava
fc86f8c340c3fc9d1ba983013383c3cac4c30c17
[ "Apache-2.0" ]
3
2015-03-12T22:49:13.000Z
2017-06-26T11:02:01.000Z
rxjava-core/src/test/java/rx/internal/operators/OperatorLastTest.java
tomrozb/RxJava
fc86f8c340c3fc9d1ba983013383c3cac4c30c17
[ "Apache-2.0" ]
null
null
null
rxjava-core/src/test/java/rx/internal/operators/OperatorLastTest.java
tomrozb/RxJava
fc86f8c340c3fc9d1ba983013383c3cac4c30c17
[ "Apache-2.0" ]
null
null
null
33.877778
79
0.615502
1,001,548
/** * Copyright 2014 Netflix, Inc. * * 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 rx.internal.operators; import static org.junit.Assert.assertEquals; import static org.mockito.Matchers.isA; import static org.mockito.Mockito.inOrder; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import java.util.NoSuchElementException; import org.junit.Test; import org.mockito.InOrder; import rx.Observable; import rx.Observer; import rx.functions.Func1; public class OperatorLastTest { @Test public void testLastWithElements() { Observable<Integer> last = Observable.from(1, 2, 3).last(); assertEquals(3, last.toBlocking().single().intValue()); } @Test(expected = NoSuchElementException.class) public void testLastWithNoElements() { Observable<?> last = Observable.empty().last(); last.toBlocking().single(); } @Test public void testLastMultiSubscribe() { Observable<Integer> last = Observable.from(1, 2, 3).last(); assertEquals(3, last.toBlocking().single().intValue()); assertEquals(3, last.toBlocking().single().intValue()); } @Test public void testLastViaObservable() { Observable.from(1, 2, 3).last(); } @Test public void testLast() { Observable<Integer> observable = Observable.from(1, 2, 3).last(); @SuppressWarnings("unchecked") Observer<Integer> observer = (Observer<Integer>) mock(Observer.class); observable.subscribe(observer); InOrder inOrder = inOrder(observer); inOrder.verify(observer, times(1)).onNext(3); inOrder.verify(observer, times(1)).onCompleted(); inOrder.verifyNoMoreInteractions(); } @Test public void testLastWithOneElement() { Observable<Integer> observable = Observable.from(1).last(); @SuppressWarnings("unchecked") Observer<Integer> observer = (Observer<Integer>) mock(Observer.class); observable.subscribe(observer); InOrder inOrder = inOrder(observer); inOrder.verify(observer, times(1)).onNext(1); inOrder.verify(observer, times(1)).onCompleted(); inOrder.verifyNoMoreInteractions(); } @Test public void testLastWithEmpty() { Observable<Integer> observable = Observable.<Integer> empty().last(); @SuppressWarnings("unchecked") Observer<Integer> observer = (Observer<Integer>) mock(Observer.class); observable.subscribe(observer); InOrder inOrder = inOrder(observer); inOrder.verify(observer, times(1)).onError( isA(NoSuchElementException.class)); inOrder.verifyNoMoreInteractions(); } @Test public void testLastWithPredicate() { Observable<Integer> observable = Observable.from(1, 2, 3, 4, 5, 6) .last(new Func1<Integer, Boolean>() { @Override public Boolean call(Integer t1) { return t1 % 2 == 0; } }); @SuppressWarnings("unchecked") Observer<Integer> observer = (Observer<Integer>) mock(Observer.class); observable.subscribe(observer); InOrder inOrder = inOrder(observer); inOrder.verify(observer, times(1)).onNext(6); inOrder.verify(observer, times(1)).onCompleted(); inOrder.verifyNoMoreInteractions(); } @Test public void testLastWithPredicateAndOneElement() { Observable<Integer> observable = Observable.from(1, 2).last( new Func1<Integer, Boolean>() { @Override public Boolean call(Integer t1) { return t1 % 2 == 0; } }); @SuppressWarnings("unchecked") Observer<Integer> observer = (Observer<Integer>) mock(Observer.class); observable.subscribe(observer); InOrder inOrder = inOrder(observer); inOrder.verify(observer, times(1)).onNext(2); inOrder.verify(observer, times(1)).onCompleted(); inOrder.verifyNoMoreInteractions(); } @Test public void testLastWithPredicateAndEmpty() { Observable<Integer> observable = Observable.from(1).last( new Func1<Integer, Boolean>() { @Override public Boolean call(Integer t1) { return t1 % 2 == 0; } }); @SuppressWarnings("unchecked") Observer<Integer> observer = (Observer<Integer>) mock(Observer.class); observable.subscribe(observer); InOrder inOrder = inOrder(observer); inOrder.verify(observer, times(1)).onError( isA(NoSuchElementException.class)); inOrder.verifyNoMoreInteractions(); } @Test public void testLastOrDefault() { Observable<Integer> observable = Observable.from(1, 2, 3) .lastOrDefault(4); @SuppressWarnings("unchecked") Observer<Integer> observer = (Observer<Integer>) mock(Observer.class); observable.subscribe(observer); InOrder inOrder = inOrder(observer); inOrder.verify(observer, times(1)).onNext(3); inOrder.verify(observer, times(1)).onCompleted(); inOrder.verifyNoMoreInteractions(); } @Test public void testLastOrDefaultWithOneElement() { Observable<Integer> observable = Observable.from(1).lastOrDefault(2); @SuppressWarnings("unchecked") Observer<Integer> observer = (Observer<Integer>) mock(Observer.class); observable.subscribe(observer); InOrder inOrder = inOrder(observer); inOrder.verify(observer, times(1)).onNext(1); inOrder.verify(observer, times(1)).onCompleted(); inOrder.verifyNoMoreInteractions(); } @Test public void testLastOrDefaultWithEmpty() { Observable<Integer> observable = Observable.<Integer> empty() .lastOrDefault(1); @SuppressWarnings("unchecked") Observer<Integer> observer = (Observer<Integer>) mock(Observer.class); observable.subscribe(observer); InOrder inOrder = inOrder(observer); inOrder.verify(observer, times(1)).onNext(1); inOrder.verify(observer, times(1)).onCompleted(); inOrder.verifyNoMoreInteractions(); } @Test public void testLastOrDefaultWithPredicate() { Observable<Integer> observable = Observable.from(1, 2, 3, 4, 5, 6) .lastOrDefault(8, new Func1<Integer, Boolean>() { @Override public Boolean call(Integer t1) { return t1 % 2 == 0; } }); @SuppressWarnings("unchecked") Observer<Integer> observer = (Observer<Integer>) mock(Observer.class); observable.subscribe(observer); InOrder inOrder = inOrder(observer); inOrder.verify(observer, times(1)).onNext(6); inOrder.verify(observer, times(1)).onCompleted(); inOrder.verifyNoMoreInteractions(); } @Test public void testLastOrDefaultWithPredicateAndOneElement() { Observable<Integer> observable = Observable.from(1, 2).lastOrDefault(4, new Func1<Integer, Boolean>() { @Override public Boolean call(Integer t1) { return t1 % 2 == 0; } }); @SuppressWarnings("unchecked") Observer<Integer> observer = (Observer<Integer>) mock(Observer.class); observable.subscribe(observer); InOrder inOrder = inOrder(observer); inOrder.verify(observer, times(1)).onNext(2); inOrder.verify(observer, times(1)).onCompleted(); inOrder.verifyNoMoreInteractions(); } @Test public void testLastOrDefaultWithPredicateAndEmpty() { Observable<Integer> observable = Observable.from(1).lastOrDefault(2, new Func1<Integer, Boolean>() { @Override public Boolean call(Integer t1) { return t1 % 2 == 0; } }); @SuppressWarnings("unchecked") Observer<Integer> observer = (Observer<Integer>) mock(Observer.class); observable.subscribe(observer); InOrder inOrder = inOrder(observer); inOrder.verify(observer, times(1)).onNext(2); inOrder.verify(observer, times(1)).onCompleted(); inOrder.verifyNoMoreInteractions(); } }
92408461d6889e239b5403e25f6cb0bf024ad72f
201
java
Java
geek-Arithmetics/src/main/java/designpatterns/Observer/Observer.java
zilongTong/algorithm
b3daeefa38dff593e286c31b3ecb32e2f294ef23
[ "Apache-2.0" ]
2
2018-12-19T02:17:02.000Z
2019-06-12T04:02:04.000Z
geek-Arithmetics/src/main/java/designpatterns/Observer/Observer.java
GeeeeeekTon/algorithm
b3daeefa38dff593e286c31b3ecb32e2f294ef23
[ "Apache-2.0" ]
null
null
null
geek-Arithmetics/src/main/java/designpatterns/Observer/Observer.java
GeeeeeekTon/algorithm
b3daeefa38dff593e286c31b3ecb32e2f294ef23
[ "Apache-2.0" ]
null
null
null
16.75
37
0.606965
1,001,549
package designpatterns.Observer; /** * Created by zilong on 2017/8/22. */ public interface Observer { /** * 更新接口 * @param state 更新的状态 */ public void update(String state); }
924084ea2d2aacc6924e149c439451bddef81687
1,909
java
Java
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/codegen/node/expression/literal/IdentifierCodeNode.java
wailyk/column
7ac882ac26f11b4d071deb6bfb0cbb3ad5094508
[ "Apache-2.0" ]
null
null
null
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/codegen/node/expression/literal/IdentifierCodeNode.java
wailyk/column
7ac882ac26f11b4d071deb6bfb0cbb3ad5094508
[ "Apache-2.0" ]
null
null
null
asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/codegen/node/expression/literal/IdentifierCodeNode.java
wailyk/column
7ac882ac26f11b4d071deb6bfb0cbb3ad5094508
[ "Apache-2.0" ]
null
null
null
33.491228
81
0.727606
1,001,550
/* * 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 org.apache.asterix.optimizer.rules.codegen.node.expression.literal; import org.apache.asterix.optimizer.rules.codegen.node.CodeNodeOutputType; import org.apache.hyracks.api.exceptions.SourceLocation; public class IdentifierCodeNode extends AbstractLiteralCodeNode { private static final long serialVersionUID = 2493176756436907237L; private final String identifier; public IdentifierCodeNode(String identifier) { this(GENERATED_LOCATION, identifier); } public IdentifierCodeNode(SourceLocation sourceLocation, String identifier) { super(sourceLocation, CodeNodeOutputType.ANY); this.identifier = identifier; } @Override public boolean equals(Object obj) { if (!(obj instanceof IdentifierCodeNode)) { return false; } IdentifierCodeNode other = (IdentifierCodeNode) obj; return identifier.equals(other.identifier); } @Override public int hashCode() { return identifier.hashCode(); } @Override public String toString() { return identifier; } }
9240850e1e49e7ccc843af3c6bf72f897de515c6
3,560
java
Java
src/test/java/com/hotels/hde/quibble/executors/SingleNumberMatchThresholdTestExecutorTest.java
HotelsDotCom/Quibble
ff1bae21a34c84861536233dd915e4fde76fc7ef
[ "Apache-2.0" ]
9
2018-06-11T09:01:53.000Z
2020-08-29T22:23:19.000Z
src/test/java/com/hotels/hde/quibble/executors/SingleNumberMatchThresholdTestExecutorTest.java
HotelsDotCom/Quibble
ff1bae21a34c84861536233dd915e4fde76fc7ef
[ "Apache-2.0" ]
4
2018-11-22T16:49:15.000Z
2020-03-05T09:28:20.000Z
src/test/java/com/hotels/hde/quibble/executors/SingleNumberMatchThresholdTestExecutorTest.java
HotelsDotCom/Quibble
ff1bae21a34c84861536233dd915e4fde76fc7ef
[ "Apache-2.0" ]
2
2019-06-24T14:54:04.000Z
2019-09-27T10:58:47.000Z
35.247525
121
0.752528
1,001,551
/** * Copyright (C) 2015-2019 Expedia, Inc. * * 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.hotels.hde.quibble.executors; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.mock; import java.sql.Connection; import java.util.ArrayList; import java.util.List; import org.junit.Test; import com.hotels.hde.quibble.ActionResult; import com.hotels.hde.quibble.Platforms; import com.hotels.hde.quibble.TestCase; import com.hotels.hde.quibble.TestUtils; import com.hotels.hde.quibble.connection.ActionConnection; public class SingleNumberMatchThresholdTestExecutorTest { private final SingleNumberMatchThresholdTestExecutor thresholdTypeTest = new SingleNumberMatchThresholdTestExecutor() { @Override List<ActionResult> executeCommands(TestCase aTestCase, List<ActionConnection> connectionList) { List<ActionResult> results = new ArrayList<ActionResult>(); ActionResult actionResult1 = new ActionResult(Platforms.TERADATA.getValue(), 100); ActionResult actionResult2 = new ActionResult(Platforms.HIVE.getValue(), 105); ActionResult actionResult3 = new ActionResult(Platforms.SHELL.getValue(), 95); results.add(actionResult1); results.add(actionResult2); results.add(actionResult3); return results; } }; @Test public void testexecuteCommand() { Connection mockConnection = mock(Connection.class); TestCase aCountMatchTest = TestUtils.createASingleNumberMatchThresholdTest("Test 101", Platforms.HIVE.getValue(), Platforms.TERADATA.getValue()); List<ActionConnection> connectionList = new ArrayList<>(); ActionConnection actionConnection = new ActionConnection( Platforms.TERADATA.getValue(), mockConnection, true); connectionList.add(actionConnection); thresholdTypeTest.execute(aCountMatchTest, connectionList); } @Test public void testGetCountMatchThresholdVerdictSuccess() { List<ActionResult> results = new ArrayList<>(); ActionResult testResult1 = new ActionResult("hive", 100); ActionResult testResult2 = new ActionResult("db2", 98); ActionResult testResult3 = new ActionResult("hive", 91); results.add(testResult1); results.add(testResult2); results.add(testResult3); boolean verdict = thresholdTypeTest.getNumberMatchThresholdVerdict(results, 10); assertTrue("Difference is within the permitted threshold", verdict); } @Test public void testGetCountMatchThresholdVerdictFailure() { List<ActionResult> results = new ArrayList<>(); ActionResult testResult1 = new ActionResult("hive", 100); ActionResult testResult2 = new ActionResult("db2", 80); ActionResult testResult3 = new ActionResult("db2", 89); results.add(testResult1); results.add(testResult2); results.add(testResult3); boolean verdict = thresholdTypeTest.getNumberMatchThresholdVerdict(results, 10); assertFalse("Difference is higher than the permitted threshold", verdict); } }
92408570f5c64c56065f55c5bc134bff8bb3c87e
3,955
java
Java
src/org/cokit/robot/HttpClientProxy.java
DashYang/cokit
e710e06b281b82fada9e60f0694aa75ccbb51dcb
[ "Apache-2.0" ]
null
null
null
src/org/cokit/robot/HttpClientProxy.java
DashYang/cokit
e710e06b281b82fada9e60f0694aa75ccbb51dcb
[ "Apache-2.0" ]
null
null
null
src/org/cokit/robot/HttpClientProxy.java
DashYang/cokit
e710e06b281b82fada9e60f0694aa75ccbb51dcb
[ "Apache-2.0" ]
null
null
null
28.453237
86
0.608597
1,001,552
package org.cokit.robot; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.URL; import java.net.URLConnection; import java.util.Date; import javax.websocket.Session; import net.sf.json.JSONObject; import org.cokit.data.Timestamp; import org.cokit.data.customerized.POI; import org.cokit.data.improved.Operation; import org.eclipse.jdt.internal.compiler.ast.ThisReference; /** * dummy user(Http request) * @author dash * @version 1.0 date 2017-1-7 * @since JDK1.6 */ public class HttpClientProxy implements Runnable{ private String url = "http://localhost:8081"; private String project = "cokit"; private String service = "HttpServer"; private String username = "robot"; private int addPOI = 10; private int addLine = 10; private int updatePOI = 25; private int deletePOI = 3; private int deleteLine = 2; private String cokey = "itinerary-planning-client"; private int frequency = 100; public HttpClientProxy(String url, String project, String service, String username, int addPOI, int addLine, int updatePOI, int deletePOI, int deleteLine, int frequency) { super(); this.url = url; this.project = project; this.service = service; this.username = username; this.addPOI = addPOI; this.addLine = addLine; this.updatePOI = updatePOI; this.deletePOI = deletePOI; this.deleteLine = deleteLine; this.frequency = frequency; } @Override public void run() { addPOI(); } private String sendPost(String url, String param) { PrintWriter out = null; BufferedReader in = null; String result = ""; try { URL realUrl = new URL(url); URLConnection conn = realUrl.openConnection(); conn.setRequestProperty("accept", "*/*"); conn.setRequestProperty("connection", "Keep-Alive"); conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"); conn.setDoOutput(true); conn.setDoInput(true); out = new PrintWriter(conn.getOutputStream()); out.print(param); out.flush(); in = new BufferedReader( new InputStreamReader(conn.getInputStream())); String line; while ((line = in.readLine()) != null) { result += line; } } catch (Exception e) { System.out.println("unexpeceted error happens "+e); e.printStackTrace(); } finally{ try{ if(out!=null){ out.close(); } if(in!=null){ in.close(); } } catch(IOException ex){ ex.printStackTrace(); } } return result; } private void sleep(int interval) { try { Thread.sleep(interval); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } private void addPOI(){ /** * operations */ for(int i = 0 ; i < addPOI ; i ++) { long currentTime = new Date().getTime(); Timestamp timestamp = new Timestamp(-1, i, username, -1, currentTime, currentTime); Operation<POI> operation = new Operation("0", null, "addPOI"); JSONObject message = new JSONObject(); message.element("refinedOperation", operation.writeToJSON()); message.element("timestamp", timestamp.writeToJSON()); message.element("cokey", cokey); message.element("action", "SYNCHRONIZATION"); JSONObject httpMessage = new JSONObject(); String postMessage = "message=" + message + "&sessionId=" + username; String requestURL = url + "/" + project + "/" + service; sendPost(requestURL, postMessage.toString()); sleep(frequency); } } }
9240863c7cea35fd3b8e2337727447418cb70870
2,422
java
Java
processing-python3/src/main/java/org/talend/components/processing/python3/Python3.java
gmendy1/labs-beam-ml
fb051e761b66f7bfe512cab04d0d3b6d6b7111f0
[ "Apache-2.0" ]
null
null
null
processing-python3/src/main/java/org/talend/components/processing/python3/Python3.java
gmendy1/labs-beam-ml
fb051e761b66f7bfe512cab04d0d3b6d6b7111f0
[ "Apache-2.0" ]
null
null
null
processing-python3/src/main/java/org/talend/components/processing/python3/Python3.java
gmendy1/labs-beam-ml
fb051e761b66f7bfe512cab04d0d3b6d6b7111f0
[ "Apache-2.0" ]
null
null
null
37.261538
111
0.760941
1,001,553
/* * Copyright (C) 2006-2020 Talend Inc. - www.talend.com * * This source code is available under agreement available at * %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt * * You should have received a copy of the agreement * along with this program; if not, write to Talend SA * 9 rue Pages 92150 Suresnes, France */ package org.talend.components.processing.python3; import lombok.extern.slf4j.Slf4j; import org.apache.avro.generic.IndexedRecord; import org.apache.beam.sdk.transforms.PTransform; import org.apache.beam.sdk.transforms.ParDo; import org.apache.beam.sdk.values.PCollection; import org.talend.sdk.component.api.component.Icon; import org.talend.sdk.component.api.component.MigrationHandler; import org.talend.sdk.component.api.component.Version; import org.talend.sdk.component.api.configuration.Option; import org.talend.sdk.component.api.meta.Documentation; import org.talend.sdk.component.api.processor.ElementListener; import org.talend.sdk.component.api.processor.Output; import org.talend.sdk.component.api.processor.OutputEmitter; import org.talend.sdk.component.api.processor.Processor; import javax.json.JsonObject; import java.util.Map; @Version(value = 1, migrationHandler = Python3.Migration.class) @Processor(name = "Python3") @Icon(value = Icon.IconType.CUSTOM, custom = "python") @Documentation("This component executes python code on incoming data.") public class Python3 extends PTransform<PCollection<IndexedRecord>, PCollection<IndexedRecord>> { private Python3Configuration configuration; public Python3(@Option("configuration") final Python3Configuration configuration) { this.configuration = configuration; } @ElementListener public void onElement(final JsonObject element, @Output final OutputEmitter<JsonObject> output) { // } @Override public PCollection expand(PCollection<IndexedRecord> inputPCollection) { Python3DoFn doFn = new Python3DoFn().withConfiguration(configuration); return inputPCollection.apply("PYTHON", ParDo.of(doFn)); } @Slf4j public static class Migration implements MigrationHandler { @Override public Map<String, String> migrate(final int incomingVersion, final Map<String, String> incomingData) { log.debug("Starting Python3 component migration"); return incomingData; } } }
9240863c840f1be45f796703b69e2c6ecc574941
207
java
Java
code/MMServerEngine/src/main/java/com/mm/engine/framework/control/netEvent/NetEventListenerHandler.java
xuerong/MMServerEngine
f11c34680ea56645e91bab9ef02a808ee2e1730d
[ "Apache-2.0" ]
9
2016-09-14T11:27:25.000Z
2020-11-06T06:33:33.000Z
code/MMServerEngine/src/main/java/com/mm/engine/framework/control/netEvent/NetEventListenerHandler.java
wangxianglong3/MMServerEngine
d3bf90da536ab84efefba2c7128ba88695153495
[ "Apache-2.0" ]
null
null
null
code/MMServerEngine/src/main/java/com/mm/engine/framework/control/netEvent/NetEventListenerHandler.java
wangxianglong3/MMServerEngine
d3bf90da536ab84efefba2c7128ba88695153495
[ "Apache-2.0" ]
7
2016-09-14T11:27:24.000Z
2019-11-04T08:30:10.000Z
20.7
58
0.772947
1,001,554
package com.mm.engine.framework.control.netEvent; /** * Created by Administrator on 2015/11/18. */ public interface NetEventListenerHandler { public NetEventData handle(NetEventData netEventData); }
924086b6d2d4dfff12d8943d6a89b8aef222b919
9,804
java
Java
fe/fe-core/src/test/java/com/starrocks/alter/AlterJobV2Test.java
stephen-shelby/starrocks
67932670efddbc8c56e2aaf5d3758724dcb44b0a
[ "Zlib", "PSF-2.0", "BSD-2-Clause", "Apache-2.0", "ECL-2.0", "BSD-3-Clause-Clear" ]
1
2022-03-08T09:13:32.000Z
2022-03-08T09:13:32.000Z
fe/fe-core/src/test/java/com/starrocks/alter/AlterJobV2Test.java
stephen-shelby/starrocks
67932670efddbc8c56e2aaf5d3758724dcb44b0a
[ "Zlib", "PSF-2.0", "BSD-2-Clause", "Apache-2.0", "ECL-2.0", "BSD-3-Clause-Clear" ]
null
null
null
fe/fe-core/src/test/java/com/starrocks/alter/AlterJobV2Test.java
stephen-shelby/starrocks
67932670efddbc8c56e2aaf5d3758724dcb44b0a
[ "Zlib", "PSF-2.0", "BSD-2-Clause", "Apache-2.0", "ECL-2.0", "BSD-3-Clause-Clear" ]
null
null
null
53.57377
161
0.690024
1,001,555
// This file is made available under Elastic License 2.0. // This file is based on code available under the Apache license here: // https://github.com/apache/incubator-doris/blob/master/fe/fe-core/src/test/java/org/apache/doris/alter/AlterJobV2Test.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.starrocks.alter; import com.starrocks.analysis.AlterTableStmt; import com.starrocks.analysis.ShowAlterStmt; import com.starrocks.analysis.ShowCreateTableStmt; import com.starrocks.catalog.OlapTable; import com.starrocks.common.FeConstants; import com.starrocks.common.util.UUIDUtil; import com.starrocks.qe.ConnectContext; import com.starrocks.qe.ShowExecutor; import com.starrocks.qe.ShowResultSet; import com.starrocks.server.GlobalStateMgr; import com.starrocks.utframe.StarRocksAssert; import com.starrocks.utframe.UtFrameUtils; import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; import java.util.Map; public class AlterJobV2Test { private static ConnectContext connectContext; @BeforeClass public static void beforeClass() throws Exception { FeConstants.default_scheduler_interval_millisecond = 1000; FeConstants.runningUnitTest = true; UtFrameUtils.createMinStarRocksCluster(); // create connect context connectContext = UtFrameUtils.createDefaultCtx(); connectContext.setQueryId(UUIDUtil.genUUID()); StarRocksAssert starRocksAssert = new StarRocksAssert(connectContext); starRocksAssert.withDatabase("test").useDatabase("test") .withTable( "CREATE TABLE test.schema_change_test(k1 int, k2 int, k3 int) distributed by hash(k1) buckets 3 properties('replication_num' = '1');") .withTable( "CREATE TABLE test.segmentv2(k1 int, k2 int, v1 int sum) distributed by hash(k1) buckets 3 properties('replication_num' = '1');") .withTable( "CREATE TABLE test.properties_change_test(k1 int, v1 int) primary key(k1) distributed by hash(k1) properties('replication_num' = '1');"); } private static void checkTableStateToNormal(OlapTable tb) throws InterruptedException { // waiting table state to normal int retryTimes = 5; while (tb.getState() != OlapTable.OlapTableState.NORMAL && retryTimes > 0) { Thread.sleep(5000); retryTimes--; } Assert.assertEquals(OlapTable.OlapTableState.NORMAL, tb.getState()); } @Test public void testSchemaChange() throws Exception { // 1. process a schema change job String alterStmtStr = "alter table test.schema_change_test add column k4 int default '1'"; AlterTableStmt alterTableStmt = (AlterTableStmt) UtFrameUtils.parseAndAnalyzeStmt(alterStmtStr, connectContext); GlobalStateMgr.getCurrentState().getAlterInstance().processAlterTable(alterTableStmt); // 2. check alter job Map<Long, AlterJobV2> alterJobs = GlobalStateMgr.getCurrentState().getSchemaChangeHandler().getAlterJobsV2(); Assert.assertEquals(1, alterJobs.size()); for (AlterJobV2 alterJobV2 : alterJobs.values()) { while (!alterJobV2.getJobState().isFinalState()) { System.out.println( "alter job " + alterJobV2.getJobId() + " is running. state: " + alterJobV2.getJobState()); Thread.sleep(1000); } System.out.println("alter job " + alterJobV2.getJobId() + " is done. state: " + alterJobV2.getJobState()); Assert.assertEquals(AlterJobV2.JobState.FINISHED, alterJobV2.getJobState()); } // 3. check show alter table column String showAlterStmtStr = "show alter table column from test;"; ShowAlterStmt showAlterStmt = (ShowAlterStmt) UtFrameUtils.parseAndAnalyzeStmt(showAlterStmtStr, connectContext); ShowExecutor showExecutor = new ShowExecutor(connectContext, showAlterStmt); ShowResultSet showResultSet = showExecutor.execute(); System.out.println(showResultSet.getMetaData()); System.out.println(showResultSet.getResultRows()); } @Test public void testRollup() throws Exception { // 1. process a rollup job String alterStmtStr = "alter table test.schema_change_test add rollup test_rollup(k1, k2);"; AlterTableStmt alterTableStmt = (AlterTableStmt) UtFrameUtils.parseAndAnalyzeStmt(alterStmtStr, connectContext); GlobalStateMgr.getCurrentState().getAlterInstance().processAlterTable(alterTableStmt); // 2. check alter job Map<Long, AlterJobV2> alterJobs = GlobalStateMgr.getCurrentState().getRollupHandler().getAlterJobsV2(); for (AlterJobV2 alterJobV2 : alterJobs.values()) { while (!alterJobV2.getJobState().isFinalState()) { System.out.println( "alter job " + alterJobV2.getJobId() + " is running. state: " + alterJobV2.getJobState()); Thread.sleep(1000); } System.out.println("alter job " + alterJobV2.getJobId() + " is done. state: " + alterJobV2.getJobState()); Assert.assertEquals(AlterJobV2.JobState.FINISHED, alterJobV2.getJobState()); } // 3. check show alter table column String showAlterStmtStr = "show alter table rollup from test;"; ShowAlterStmt showAlterStmt = (ShowAlterStmt) UtFrameUtils.parseAndAnalyzeStmt(showAlterStmtStr, connectContext); ShowExecutor showExecutor = new ShowExecutor(connectContext, showAlterStmt); ShowResultSet showResultSet = showExecutor.execute(); System.out.println(showResultSet.getMetaData()); System.out.println(showResultSet.getResultRows()); } @Test public void testModifyTableProperties() throws Exception { // 1. process a modify table properties job(enable_persistent_index) String alterStmtStr = "alter table test.properties_change_test set ('enable_persistent_index' = 'true');"; AlterTableStmt alterTableStmt = (AlterTableStmt) UtFrameUtils.parseAndAnalyzeStmt(alterStmtStr, connectContext); GlobalStateMgr.getCurrentState().getAlterInstance().processAlterTable(alterTableStmt); // 2. check alter job Map<Long, AlterJobV2> alterJobs = GlobalStateMgr.getCurrentState().getSchemaChangeHandler().getAlterJobsV2(); Assert.assertEquals(1, alterJobs.size()); for (AlterJobV2 alterJobV2 : alterJobs.values()) { while (!alterJobV2.getJobState().isFinalState()) { System.out.println( "alter job " + alterJobV2.getJobId() + " is running. state: " + alterJobV2.getJobState()); Thread.sleep(1000); } System.out.println("alter job " + alterJobV2.getJobId() + " is done. state: " + alterJobV2.getJobState()); Assert.assertEquals(AlterJobV2.JobState.FINISHED, alterJobV2.getJobState()); } // 3. check enable persistent index String showCreateTableStr = "show create table test.properties_change_test;"; ShowCreateTableStmt showCreateTableStmt = (ShowCreateTableStmt) UtFrameUtils.parseStmtWithNewParser(showCreateTableStr, connectContext); ShowExecutor showExecutor = new ShowExecutor(connectContext, showCreateTableStmt); ShowResultSet showResultSet = showExecutor.execute(); System.out.println(showResultSet.getMetaData()); System.out.println(showResultSet.getResultRows()); // 4. process a modify table properties job(in_memory) String alterStmtStr2 = "alter table test.properties_change_test set ('in_memory' = 'true');"; alterTableStmt = (AlterTableStmt) UtFrameUtils.parseAndAnalyzeStmt(alterStmtStr2, connectContext); GlobalStateMgr.getCurrentState().getAlterInstance().processAlterTable(alterTableStmt); // 4. check alter job alterJobs = GlobalStateMgr.getCurrentState().getSchemaChangeHandler().getAlterJobsV2(); Assert.assertEquals(1, alterJobs.size()); for (AlterJobV2 alterJobV2 : alterJobs.values()) { while (!alterJobV2.getJobState().isFinalState()) { System.out.println( "alter job " + alterJobV2.getJobId() + " is running. state: " + alterJobV2.getJobState()); Thread.sleep(1000); } System.out.println("alter job " + alterJobV2.getJobId() + " is done. state: " + alterJobV2.getJobState()); Assert.assertEquals(AlterJobV2.JobState.FINISHED, alterJobV2.getJobState()); } // 5. check enable persistent index showCreateTableStmt = (ShowCreateTableStmt) UtFrameUtils.parseStmtWithNewParser(showCreateTableStr, connectContext); showResultSet = showExecutor.execute(); System.out.println(showResultSet.getMetaData()); System.out.println(showResultSet.getResultRows()); } }
92408920a442b5bc1609355f689cc6655bdb0219
26,565
java
Java
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/filename/IgniteUidAsConsistentIdMigrationTest.java
brat-kuzma/ignite
d7148828f947728a5b46f4f39f36eca8b0e6e521
[ "CC0-1.0" ]
4,339
2015-08-21T21:13:25.000Z
2022-03-30T09:56:44.000Z
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/filename/IgniteUidAsConsistentIdMigrationTest.java
brat-kuzma/ignite
d7148828f947728a5b46f4f39f36eca8b0e6e521
[ "CC0-1.0" ]
1,933
2015-08-24T11:37:40.000Z
2022-03-31T08:37:08.000Z
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/db/filename/IgniteUidAsConsistentIdMigrationTest.java
brat-kuzma/ignite
d7148828f947728a5b46f4f39f36eca8b0e6e521
[ "CC0-1.0" ]
2,140
2015-08-21T22:09:00.000Z
2022-03-25T07:57:34.000Z
36.691989
132
0.681423
1,001,556
/* * 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 org.apache.ignite.internal.processors.cache.persistence.db.filename; import java.io.File; import java.io.IOException; import java.util.Arrays; import java.util.Set; import java.util.TreeSet; import java.util.UUID; import java.util.regex.Pattern; import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.configuration.DataRegionConfiguration; import org.apache.ignite.configuration.DataStorageConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.processors.cache.persistence.file.FilePageStoreManager; import org.apache.ignite.internal.processors.cache.persistence.filename.PdsFolderResolver; import org.apache.ignite.internal.util.typedef.internal.U; import org.apache.ignite.testframework.GridStringLogger; import org.apache.ignite.testframework.junits.common.GridCommonAbstractTest; import org.jetbrains.annotations.NotNull; import org.junit.Test; import static org.apache.ignite.IgniteSystemProperties.IGNITE_CONSISTENT_ID_BY_HOST_WITHOUT_PORT; import static org.apache.ignite.IgniteSystemProperties.IGNITE_DATA_STORAGE_FOLDER_BY_CONSISTENT_ID; import static org.apache.ignite.internal.processors.cache.persistence.filename.PdsFolderResolver.parseSubFolderName; /** * Test for new and old style persistent storage folders generation */ public class IgniteUidAsConsistentIdMigrationTest extends GridCommonAbstractTest { /** Cache name for test. */ public static final String CACHE_NAME = "dummy"; /** Clear DB folder after each test. May be set to false for local debug */ private static final boolean deleteAfter = true; /** Clear DB folder before each test. */ private static final boolean deleteBefore = true; /** Fail test if delete of DB folder was not completed. */ private static final boolean failIfDeleteNotCompleted = true; /** Configured consistent id. */ private String configuredConsistentId; /** Logger to accumulate messages, null will cause logger won't be customized */ private GridStringLogger strLog; /** Clear properties after this test run. Flag protects from failed test */ private boolean clearPropsAfterTest = false; /** Place storage in temp folder for current test run. */ private boolean placeStorageInTemp; /** A path to persistent store custom path for current test run. */ private File pstStoreCustomPath; /** A path to persistent store WAL work custom path. */ private File pstWalStoreCustomPath; /** A path to persistent store WAL archive custom path. */ private File pstWalArchCustomPath; /** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { stopAllGrids(); if (deleteBefore) deleteWorkFiles(); } /** {@inheritDoc} */ @Override protected void afterTest() throws Exception { stopAllGrids(); if (deleteAfter) deleteWorkFiles(); if (clearPropsAfterTest) { System.clearProperty(IGNITE_DATA_STORAGE_FOLDER_BY_CONSISTENT_ID); System.clearProperty(IGNITE_CONSISTENT_ID_BY_HOST_WITHOUT_PORT); } } /** * @throws IgniteCheckedException If failed. */ private void deleteWorkFiles() throws IgniteCheckedException { boolean ok = true; if (pstStoreCustomPath != null) ok &= U.delete(pstStoreCustomPath); else ok &= U.delete(U.resolveWorkDirectory(U.defaultWorkDirectory(), FilePageStoreManager.DFLT_STORE_DIR, false)); if (pstWalArchCustomPath != null) ok &= U.delete(pstWalArchCustomPath); if (pstWalStoreCustomPath != null) ok &= U.delete(pstWalStoreCustomPath); ok &= U.delete(U.resolveWorkDirectory(U.defaultWorkDirectory(), DataStorageConfiguration.DFLT_BINARY_METADATA_PATH, false)); if (failIfDeleteNotCompleted) assertTrue(ok); } /** {@inheritDoc} */ @Override protected IgniteConfiguration getConfiguration(String gridName) throws Exception { final IgniteConfiguration cfg = super.getConfiguration(gridName); if (configuredConsistentId != null) cfg.setConsistentId(configuredConsistentId); final DataStorageConfiguration dsCfg = new DataStorageConfiguration(); if (placeStorageInTemp) { final File tempDir = new File(System.getProperty("java.io.tmpdir")); pstStoreCustomPath = new File(tempDir, "Store"); pstWalStoreCustomPath = new File(tempDir, "WalStore"); pstWalArchCustomPath = new File(tempDir, "WalArchive"); dsCfg.setStoragePath(pstStoreCustomPath.getAbsolutePath()); dsCfg.setWalPath(pstWalStoreCustomPath.getAbsolutePath()); dsCfg.setWalArchivePath(pstWalArchCustomPath.getAbsolutePath()); } dsCfg.setDefaultDataRegionConfiguration(new DataRegionConfiguration() .setMaxSize(32L * 1024 * 1024) .setPersistenceEnabled(true)); cfg.setDataStorageConfiguration(dsCfg); if (strLog != null) cfg.setGridLogger(strLog); return cfg; } /** * Checks start on empty PDS folder, in that case node 0 should start with random UUID. * * @throws Exception if failed. */ @Test public void testNewStyleIdIsGenerated() throws Exception { final Ignite ignite = startActivateFillDataGrid(0); //test UUID is parsable from consistent ID test UUID.fromString(ignite.cluster().localNode().consistentId().toString()); assertPdsDirsDefaultExist(genNewStyleSubfolderName(0, ignite)); stopGrid(0); } /** * Checks start on empty PDS folder, in that case node 0 should start with random UUID. * * @throws Exception if failed. */ @Test public void testNewStyleIdIsGeneratedInCustomStorePath() throws Exception { placeStorageInTemp = true; final Ignite ignite = startActivateFillDataGrid(0); //test UUID is parsable from consistent ID test UUID.fromString(ignite.cluster().localNode().consistentId().toString()); final String subfolderName = genNewStyleSubfolderName(0, ignite); assertDirectoryExist(DataStorageConfiguration.DFLT_BINARY_METADATA_PATH, subfolderName); assertDirectoryExist(pstWalArchCustomPath, subfolderName); assertDirectoryExist(pstWalArchCustomPath, subfolderName); assertDirectoryExist(pstStoreCustomPath, subfolderName); stopGrid(0); } /** * Checks start on empty PDS folder using configured ConsistentId. We should start using this ID in compatible mode. * * @throws Exception if failed. */ @Test public void testPreconfiguredConsitentIdIsApplied() throws Exception { this.configuredConsistentId = "someConfiguredConsistentId"; Ignite ignite = startActivateFillDataGrid(0); assertPdsDirsDefaultExist(configuredConsistentId); stopGrid(0); } /** * Checks start on configured ConsistentId with same value as default, this emulate old style folder is already * available. We should restart using this folder. * * @throws Exception if failed */ @Test public void testRestartOnExistingOldStyleId() throws Exception { final String expDfltConsistentId = "127.0.0.1:47500"; this.configuredConsistentId = expDfltConsistentId; //this is for create old node folder final Ignite igniteEx = startActivateGrid(0); final String expVal = "there is compatible mode with old style folders!"; igniteEx.getOrCreateCache(CACHE_NAME).put("hi", expVal); assertPdsDirsDefaultExist(U.maskForFileName(configuredConsistentId)); stopGrid(0); this.configuredConsistentId = null; //now set up grid on existing folder final Ignite igniteRestart = startActivateGrid(0); assertEquals(expDfltConsistentId, igniteRestart.cluster().localNode().consistentId()); final IgniteCache<Object, Object> cache = igniteRestart.cache(CACHE_NAME); assertNotNull("Expected to have cache [" + CACHE_NAME + "] using [" + expDfltConsistentId + "] as PDS folder", cache); final Object valFromCache = cache.get("hi"); assertNotNull("Expected to load data from cache using [" + expDfltConsistentId + "] as PDS folder", valFromCache); assertTrue(expVal.equals(valFromCache)); stopGrid(0); } /** * Start stop grid without activation should cause lock to be released and restarted node should have index 0 * * @throws Exception if failed */ @Test public void testStartWithoutActivate() throws Exception { //start stop grid without activate startGrid(0); stopGrid(0); Ignite igniteRestart = startActivateFillDataGrid(0); assertPdsDirsDefaultExist(genNewStyleSubfolderName(0, igniteRestart)); stopGrid(0); } /** * Checks start on empty PDS folder, in that case node 0 should start with random UUID * * @throws Exception if failed */ @Test public void testRestartOnSameFolderWillCauseSameUuidGeneration() throws Exception { final UUID uuid; { final Ignite ignite = startActivateFillDataGrid(0); assertPdsDirsDefaultExist(genNewStyleSubfolderName(0, ignite)); uuid = (UUID)ignite.cluster().localNode().consistentId(); stopGrid(0); } { final Ignite igniteRestart = startActivateGrid(0); assertTrue("there!".equals(igniteRestart.cache(CACHE_NAME).get("hi"))); final Object consIdRestart = igniteRestart.cluster().localNode().consistentId(); assertPdsDirsDefaultExist(genNewStyleSubfolderName(0, igniteRestart)); stopGrid(0); assertEquals(uuid, consIdRestart); } } /** * This test starts node, activates, deactivates node, and then start second node. * Expected behaviour is following: second node will join topology with separate node folder * * @throws Exception if failed */ @Test public void testStartNodeAfterDeactivate() throws Exception { final UUID uuid; { final Ignite ignite = startActivateFillDataGrid(0); assertPdsDirsDefaultExist(genNewStyleSubfolderName(0, ignite)); uuid = (UUID)ignite.cluster().localNode().consistentId(); ignite.active(false); } { final Ignite igniteRestart = startActivateGrid(1); grid(0).active(true); final Object consIdRestart = igniteRestart.cluster().localNode().consistentId(); assertPdsDirsDefaultExist(genNewStyleSubfolderName(1, igniteRestart)); stopGrid(1); assertFalse(consIdRestart.equals(uuid)); } stopGrid(0); assertNodeIndexesInFolder(0, 1); } /** * @param idx Index of the grid to start. * @return Started and activated grid. * @throws Exception If failed. */ @NotNull private Ignite startActivateFillDataGrid(int idx) throws Exception { final Ignite ignite = startActivateGrid(idx); ignite.getOrCreateCache(CACHE_NAME).put("hi", "there!"); return ignite; } /** * Starts and activates new grid with given index. * * @param idx Index of the grid to start. * @return Started and activated grid. * @throws Exception If anything failed. */ @NotNull private Ignite startActivateGrid(int idx) throws Exception { final Ignite ignite = startGrid(idx); ignite.active(true); return ignite; } /** * Generates folder name in new style using constant prefix and UUID * * @param nodeIdx expected node index to check * @param ignite ignite instance * @return name of storage related subfolders */ @NotNull private String genNewStyleSubfolderName(final int nodeIdx, final Ignite ignite) { final Object consistentId = ignite.cluster().localNode().consistentId(); assertTrue("For new style folders consistent ID should be UUID," + " but actual class is " + (consistentId == null ? null : consistentId.getClass()), consistentId instanceof UUID); return PdsFolderResolver.genNewStyleSubfolderName(nodeIdx, (UUID)consistentId); } /** * test two nodes started at the same db root folder, second node should get index 1 * * @throws Exception if failed */ @Test public void testNodeIndexIncremented() throws Exception { final Ignite ignite0 = startGrid(0); final Ignite ignite1 = startGrid(1); ignite0.active(true); ignite0.getOrCreateCache(CACHE_NAME).put("hi", "there!"); ignite1.getOrCreateCache(CACHE_NAME).put("hi1", "there!"); assertPdsDirsDefaultExist(genNewStyleSubfolderName(0, ignite0)); assertPdsDirsDefaultExist(genNewStyleSubfolderName(1, ignite1)); stopGrid(0); stopGrid(1); assertNodeIndexesInFolder(0, 1); } /** * Test verified that new style folder is taken always with lowest index * * @throws Exception if failed */ @Test public void testNewStyleAlwaysSmallestNodeIndexIsCreated() throws Exception { final Ignite ignite0 = startGrid(0); final Ignite ignite1 = startGrid(1); final Ignite ignite2 = startGrid(2); final Ignite ignite3 = startGrid(3); ignite0.active(true); ignite0.getOrCreateCache(CACHE_NAME).put("hi", "there!"); ignite3.getOrCreateCache(CACHE_NAME).put("hi1", "there!"); assertPdsDirsDefaultExist(genNewStyleSubfolderName(0, ignite0)); assertPdsDirsDefaultExist(genNewStyleSubfolderName(1, ignite1)); assertPdsDirsDefaultExist(genNewStyleSubfolderName(2, ignite2)); assertPdsDirsDefaultExist(genNewStyleSubfolderName(3, ignite3)); assertNodeIndexesInFolder(0, 1, 2, 3); stopAllGrids(); //this grid should take folder with index 0 as unlocked final Ignite ignite4Restart = startActivateGrid(3); assertPdsDirsDefaultExist(genNewStyleSubfolderName(0, ignite4Restart)); assertNodeIndexesInFolder(0, 1, 2, 3); stopAllGrids(); } /** * Test verified that new style folder is taken always with lowest index * * @throws Exception if failed */ @Test public void testNewStyleAlwaysSmallestNodeIndexIsCreatedMultithreaded() throws Exception { final Ignite ignite0 = startGridsMultiThreaded(11); ignite0.active(true); ignite0.getOrCreateCache(CACHE_NAME).put("hi", "there!"); ignite0.getOrCreateCache(CACHE_NAME).put("hi1", "there!"); assertPdsDirsDefaultExist(genNewStyleSubfolderName(0, ignite0)); assertNodeIndexesInFolder(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10); stopAllGrids(); //this grid should take folder with index 0 as unlocked final Ignite ignite4Restart = startActivateGrid(4); assertPdsDirsDefaultExist(genNewStyleSubfolderName(0, ignite4Restart)); stopAllGrids(); assertNodeIndexesInFolder(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10); } /** * Test start two nodes with predefined conistent ID (emulate old fashion node). Then restart two nodes. Expected * both nodes will get its own old folders * * @throws Exception if failed. */ @Test public void testStartTwoOldStyleNodes() throws Exception { final String expDfltConsistentId1 = "127.0.0.1:47500"; this.configuredConsistentId = expDfltConsistentId1; //this is for create old node folder final Ignite ignite = startGrid(0); final String expDfltConsistentId2 = "127.0.0.1:47501"; this.configuredConsistentId = expDfltConsistentId2; //this is for create old node folder final Ignite ignite2 = startGrid(1); ignite.active(true); final String expVal = "there is compatible mode with old style folders!"; ignite2.getOrCreateCache(CACHE_NAME).put("hi", expVal); assertPdsDirsDefaultExist(U.maskForFileName(expDfltConsistentId1)); assertPdsDirsDefaultExist(U.maskForFileName(expDfltConsistentId2)); stopAllGrids(); this.configuredConsistentId = null; //now set up grid on existing folder final Ignite igniteRestart = startGrid(0); final Ignite igniteRestart2 = startGrid(1); igniteRestart2.active(true); assertEquals(expDfltConsistentId1, igniteRestart.cluster().localNode().consistentId()); assertEquals(expDfltConsistentId2, igniteRestart2.cluster().localNode().consistentId()); final IgniteCache<Object, Object> cache = igniteRestart.cache(CACHE_NAME); assertNotNull("Expected to have cache [" + CACHE_NAME + "] using [" + expDfltConsistentId1 + "] as PDS folder", cache); final Object valFromCache = cache.get("hi"); assertNotNull("Expected to load data from cache using [" + expDfltConsistentId1 + "] as PDS folder", valFromCache); assertTrue(expVal.equals(valFromCache)); assertNodeIndexesInFolder(); //no new style nodes should be found stopGrid(0); } /** * Tests compatible mode enabled by this test to start. * Expected to be 2 folders and no new style folders in this case. * * @throws Exception if failed. */ @Test public void testStartOldStyleNodesByCompatibleProperty() throws Exception { clearPropsAfterTest = true; System.setProperty(IGNITE_DATA_STORAGE_FOLDER_BY_CONSISTENT_ID, "true"); final Ignite ignite1 = startGrid(0); final Ignite ignite2 = startGrid(1); ignite1.active(true); final String expVal = "there is compatible mode with old style folders!"; ignite2.getOrCreateCache(CACHE_NAME).put("hi", expVal); assertNodeIndexesInFolder(); // expected to have no new style folders final Object consistentId1 = ignite1.cluster().localNode().consistentId(); assertPdsDirsDefaultExist(U.maskForFileName(consistentId1.toString())); final Object consistentId2 = ignite2.cluster().localNode().consistentId(); assertPdsDirsDefaultExist(U.maskForFileName(consistentId2.toString())); stopAllGrids(); System.clearProperty(IGNITE_DATA_STORAGE_FOLDER_BY_CONSISTENT_ID); final Ignite igniteRestart = startGrid(0); final Ignite igniteRestart2 = startGrid(1); igniteRestart2.active(true); assertEquals(consistentId1, igniteRestart.cluster().localNode().consistentId()); assertEquals(consistentId2, igniteRestart2.cluster().localNode().consistentId()); assertNodeIndexesInFolder(); //new style nodes should not be found stopGrid(0); } /** * Tests compatible mode enabled by this test to start, also no port is enabled. * Expected to be 1 folder and no new style folders in this case. * * @throws Exception if failed. */ @Test public void testStartOldStyleNoPortsNodesByCompatibleProperty() throws Exception { clearPropsAfterTest = true; System.setProperty(IGNITE_DATA_STORAGE_FOLDER_BY_CONSISTENT_ID, "true"); System.setProperty(IGNITE_CONSISTENT_ID_BY_HOST_WITHOUT_PORT, "true"); final Ignite ignite1 = startGrid(0); ignite1.active(true); final String expVal = "there is compatible mode with old style folders!"; ignite1.getOrCreateCache(CACHE_NAME).put("hi", expVal); assertNodeIndexesInFolder(); // expected to have no new style folders final Object consistentId1 = ignite1.cluster().localNode().consistentId(); assertPdsDirsDefaultExist(U.maskForFileName(consistentId1.toString())); stopAllGrids(); System.clearProperty(IGNITE_DATA_STORAGE_FOLDER_BY_CONSISTENT_ID); final Ignite igniteRestart = startGrid(0); igniteRestart.active(true); assertEquals(consistentId1, igniteRestart.cluster().localNode().consistentId()); assertNodeIndexesInFolder(); //new style nodes should not be found stopGrid(0); System.clearProperty(IGNITE_CONSISTENT_ID_BY_HOST_WITHOUT_PORT); } /** * Test case If there are no matching folders, * but the directory contains old-style consistent IDs. * Ignite should print out a warning. * * @throws Exception if failed. */ @Test public void testOldStyleNodeWithUnexpectedPort() throws Exception { this.configuredConsistentId = "127.0.0.1:49999"; //emulated old-style node with not appropriate consistent ID final Ignite ignite = startActivateFillDataGrid(0); final IgniteCache<Object, Object> second = ignite.getOrCreateCache("second"); final int entries = 100; for (int i = 0; i < entries; i++) second.put((int)(Math.random() * entries), getClass().getName()); final String prevVerFolder = U.maskForFileName(ignite.cluster().localNode().consistentId().toString()); final String path = new File(new File(U.defaultWorkDirectory(), "db"), prevVerFolder).getCanonicalPath(); assertPdsDirsDefaultExist(prevVerFolder); stopAllGrids(); this.configuredConsistentId = null; this.strLog = new GridStringLogger(); startActivateGrid(0); assertNodeIndexesInFolder(0); //one 0 index folder is created final String wholeNodeLog = strLog.toString(); stopAllGrids(); String foundWarning = null; for (String line : wholeNodeLog.split("\n")) { if (line.contains("There is other non-empty storage folder under storage base directory")) { foundWarning = line; break; } } if (foundWarning != null) log.info("\nWARNING generated successfully [\n" + foundWarning + "\n]"); assertTrue("Expected to warn user on existence of old style path", foundWarning != null); assertTrue("Expected to warn user on existence of old style path [" + path + "]", foundWarning.contains(path)); assertTrue("Expected to print some size for [" + path + "]", Pattern.compile(" [0-9]* bytes").matcher(foundWarning).find()); strLog = null; startActivateGrid(0); assertNodeIndexesInFolder(0); //one 0 index folder is created stopAllGrids(); } /** * @param indexes expected new style node indexes in folders * @throws IgniteCheckedException if failed */ private void assertNodeIndexesInFolder(Integer... indexes) throws IgniteCheckedException { assertEquals(new TreeSet<>(Arrays.asList(indexes)), getAllNodeIndexesInFolder()); } /** * @return set of all indexes of nodes found in work folder * @throws IgniteCheckedException if failed. */ @NotNull private Set<Integer> getAllNodeIndexesInFolder() throws IgniteCheckedException { final File curFolder = new File(U.defaultWorkDirectory(), PdsFolderResolver.DB_DEFAULT_FOLDER); final Set<Integer> indexes = new TreeSet<>(); final File[] files = curFolder.listFiles(PdsFolderResolver.DB_SUBFOLDERS_NEW_STYLE_FILTER); for (File file : files) { final PdsFolderResolver.FolderCandidate uid = parseSubFolderName(file, log); if (uid != null) indexes.add(uid.nodeIndex()); } return indexes; } /** * Checks existence of all storage-related directories * * @param subDirName sub directories name expected * @throws IgniteCheckedException if IO error occur */ private void assertPdsDirsDefaultExist(String subDirName) throws IgniteCheckedException { assertDirectoryExist(DataStorageConfiguration.DFLT_BINARY_METADATA_PATH, subDirName); assertDirectoryExist(DataStorageConfiguration.DFLT_WAL_PATH, subDirName); assertDirectoryExist(DataStorageConfiguration.DFLT_WAL_ARCHIVE_PATH, subDirName); assertDirectoryExist(PdsFolderResolver.DB_DEFAULT_FOLDER, subDirName); } /** * Checks one folder existence. * * @param subFolderNames sub folders chain array to touch. * @throws IgniteCheckedException if IO error occur. */ private void assertDirectoryExist(String... subFolderNames) throws IgniteCheckedException { final File curFolder = new File(U.defaultWorkDirectory()); assertDirectoryExist(curFolder, subFolderNames); } /** * Checks one folder existence. * * @param workFolder current work folder. * @param subFolderNames sub folders chain array to touch. * @throws IgniteCheckedException if IO error occur. */ private void assertDirectoryExist(final File workFolder, String... subFolderNames) throws IgniteCheckedException { File curFolder = workFolder; for (String name : subFolderNames) { curFolder = new File(curFolder, name); } final String path; try { path = curFolder.getCanonicalPath(); } catch (IOException e) { throw new IgniteCheckedException("Failed to convert path: [" + curFolder.getAbsolutePath() + "]", e); } assertTrue("Directory " + Arrays.asList(subFolderNames).toString() + " is expected to exist [" + path + "]", curFolder.exists() && curFolder.isDirectory()); } }
92408927fd528dca97cc2825e3e65ab949874774
1,321
java
Java
src/com/goide/runconfig/application/GoNopProcessHandler.java
Patecatl848/Go-Lang
e73dab44213ffa76b3d6a853aecb109929c3e2b5
[ "Apache-2.0" ]
4,480
2015-01-02T00:46:12.000Z
2022-03-31T03:35:29.000Z
src/com/goide/runconfig/application/GoNopProcessHandler.java
Patecatl848/Go-Lang
e73dab44213ffa76b3d6a853aecb109929c3e2b5
[ "Apache-2.0" ]
1,873
2015-01-01T07:24:06.000Z
2022-03-05T16:56:50.000Z
src/com/goide/runconfig/application/GoNopProcessHandler.java
Patecatl848/Go-Lang
e73dab44213ffa76b3d6a853aecb109929c3e2b5
[ "Apache-2.0" ]
673
2015-01-05T07:30:04.000Z
2022-03-29T06:18:58.000Z
25.901961
75
0.74489
1,001,557
/* * Copyright 2013-2016 Sergey Ignatov, Alexander Zolotov, Florin Patan * * 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.goide.runconfig.application; import com.intellij.execution.process.ProcessHandler; import org.jetbrains.annotations.Nullable; import java.io.OutputStream; // todo[zolotov]: replace with built-in implementation in 2017.1 public class GoNopProcessHandler extends ProcessHandler { public GoNopProcessHandler() { destroyProcess(); } @Override protected void destroyProcessImpl() { notifyProcessTerminated(0); } @Override protected void detachProcessImpl() { notifyProcessDetached(); } @Override public boolean detachIsDefault() { return false; } @Nullable @Override public OutputStream getProcessInput() { return null; } }
92408a63acc683b3470a3316f085384737427242
148
java
Java
src/org/virtus/sense/ble/BLEListenner.java
VirtusAI/aeranthos-gateway-java
a6bb0829f351d05f8b5618ae081679c55835cd9b
[ "MIT" ]
null
null
null
src/org/virtus/sense/ble/BLEListenner.java
VirtusAI/aeranthos-gateway-java
a6bb0829f351d05f8b5618ae081679c55835cd9b
[ "MIT" ]
null
null
null
src/org/virtus/sense/ble/BLEListenner.java
VirtusAI/aeranthos-gateway-java
a6bb0829f351d05f8b5618ae081679c55835cd9b
[ "MIT" ]
null
null
null
16.444444
43
0.77027
1,001,558
package org.virtus.sense.ble; import org.virtus.sense.ble.models.Reading; public interface BLEListenner { void received(Reading[] readings); }
92408a6546c9371b523d0e031964aeaeec01f548
683
java
Java
src/main/java/com/easybusiness/usermanagement/services/DesignationService.java
Sougata1233/UsermanagementWithJWT
0cfcd107ed21dfbee6610598e354a4a19e346df0
[ "MIT" ]
null
null
null
src/main/java/com/easybusiness/usermanagement/services/DesignationService.java
Sougata1233/UsermanagementWithJWT
0cfcd107ed21dfbee6610598e354a4a19e346df0
[ "MIT" ]
null
null
null
src/main/java/com/easybusiness/usermanagement/services/DesignationService.java
Sougata1233/UsermanagementWithJWT
0cfcd107ed21dfbee6610598e354a4a19e346df0
[ "MIT" ]
null
null
null
27.32
85
0.827233
1,001,559
package com.easybusiness.usermanagement.services; import java.util.List; import org.springframework.http.ResponseEntity; import com.easybusiness.usermanagement.DTO.DesignationDto; public interface DesignationService { public DesignationDto getDesignationByName(String desigName); public List<DesignationDto> getDesignationAsPerCriteria(String whereClause); public ResponseEntity<DesignationDto> addDesignation(DesignationDto designation); public List<DesignationDto> getAllDesignations() throws Exception; public DesignationDto getDesignationById(Long designationId); public ResponseEntity<DesignationDto> deleteDesignation(Long designationId); }
92408bc53bd0f06e19c252f82eedfe8f92116c8a
1,949
java
Java
dubbo-admin/src/main/java/com/alibaba/dubbo/governance/web/home/module/control/Menu.java
myw506/dubbox
51db262af3b77ee8c08fc5bf4c848aaec07c1ee9
[ "Apache-2.0" ]
5,534
2015-01-02T07:54:20.000Z
2022-03-28T05:29:31.000Z
dubbo-admin/src/main/java/com/alibaba/dubbo/governance/web/home/module/control/Menu.java
ding199309/dubbox
e6614f95d4c42902c7551ae6d6b1cac82888cc4c
[ "Apache-2.0" ]
319
2015-01-05T10:04:03.000Z
2021-12-23T09:38:53.000Z
dubbo-admin/src/main/java/com/alibaba/dubbo/governance/web/home/module/control/Menu.java
ding199309/dubbox
e6614f95d4c42902c7551ae6d6b1cac82888cc4c
[ "Apache-2.0" ]
2,772
2015-01-04T10:43:49.000Z
2022-03-30T01:12:02.000Z
33.033898
88
0.722422
1,001,560
/** * Function: * * File Created at 2010-11-17 * $Id: Menu.java 185206 2012-07-09 03:06:37Z tony.chenl $ * * Copyright 2009 Alibaba.com Croporation Limited. * All rights reserved. */ package com.alibaba.dubbo.governance.web.home.module.control; import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; import org.springframework.beans.factory.annotation.Autowired; import com.alibaba.citrus.service.requestcontext.parser.CookieParser; import com.alibaba.citrus.turbine.Context; import com.alibaba.dubbo.governance.sync.RegistryServerSync; import com.alibaba.dubbo.governance.web.common.pulltool.RootContextPath; import com.alibaba.dubbo.governance.web.util.WebConstants; import com.alibaba.dubbo.registry.common.domain.User; /** * @author guanghui.shigh * @author ding.lid * @author tony.chenl */ public class Menu { @Autowired private HttpServletRequest request; @Autowired ServletContext servletcontext; @Autowired RegistryServerSync registryServerSync; public void execute(HttpSession session, Context context, CookieParser parser) { User user = (User) session.getAttribute(WebConstants.CURRENT_USER_KEY); if (user != null) context.put("operator", user.getUsername()); RootContextPath rootContextPath = new RootContextPath(request.getContextPath()); context.put("rootContextPath", rootContextPath); if (! context.containsKey("bucLogoutAddress")) { context.put("bucLogoutAddress", rootContextPath.getURI("logout")); } if (! context.containsKey("helpUrl")) { context.put("helpUrl", "https://github.com/dangdangdotcom/dubbox/wiki"); } context.put(WebConstants.CURRENT_USER_KEY, user); context.put("language", parser.getString("locale")); context.put("registryServerSync", registryServerSync); } }
92408d6625e03beb2ca67ee6ce20ccc2c413aff3
982
java
Java
OAuthClientApplication/src/main/java/com/spring/outh/OuthApplication.java
pulgupta/SpringCloud
5ec7a819460edb61634016598fb6bd73b6d2a88f
[ "MIT" ]
1
2017-08-14T07:05:11.000Z
2017-08-14T07:05:11.000Z
OAuthClientApplication/src/main/java/com/spring/outh/OuthApplication.java
pulgupta/SpringCloud
5ec7a819460edb61634016598fb6bd73b6d2a88f
[ "MIT" ]
null
null
null
OAuthClientApplication/src/main/java/com/spring/outh/OuthApplication.java
pulgupta/SpringCloud
5ec7a819460edb61634016598fb6bd73b6d2a88f
[ "MIT" ]
null
null
null
28.882353
85
0.828921
1,001,561
package com.spring.outh; import java.security.Principal; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.context.web.SpringBootServletInitializer; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @SpringBootApplication //@EnableOAuth2Sso @RestController public class OuthApplication extends SpringBootServletInitializer { @RequestMapping("/user") public Principal user(Principal principal) { System.out.println("Principal:"+principal.getName()); return principal; } public static void main(String[] args) { SpringApplication.run(OuthApplication.class, args); } @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { return application.sources(OuthApplication.class); } }
92408d9e636b1a443b3c635b808b454265c4c721
6,382
java
Java
device/iot-device-client/src/main/java/com/microsoft/azure/sdk/iot/device/transport/mqtt/TopicParser.java
hubalazs/azure-iot-sdk-java
e64727da1efc1563da2410cdc7fe1bc4c5c8f8cd
[ "MIT" ]
1
2018-05-22T06:38:40.000Z
2018-05-22T06:38:40.000Z
device/iot-device-client/src/main/java/com/microsoft/azure/sdk/iot/device/transport/mqtt/TopicParser.java
hubalazs/azure-iot-sdk-java
e64727da1efc1563da2410cdc7fe1bc4c5c8f8cd
[ "MIT" ]
1
2021-01-06T21:46:31.000Z
2021-01-06T21:46:31.000Z
device/iot-device-client/src/main/java/com/microsoft/azure/sdk/iot/device/transport/mqtt/TopicParser.java
hubalazs/azure-iot-sdk-java
e64727da1efc1563da2410cdc7fe1bc4c5c8f8cd
[ "MIT" ]
1
2020-11-17T09:39:39.000Z
2020-11-17T09:39:39.000Z
41.174194
189
0.637574
1,001,562
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. package com.microsoft.azure.sdk.iot.device.transport.mqtt; import com.microsoft.azure.sdk.iot.device.exceptions.TransportException; public class TopicParser { private String[] topicTokens = null; private final String QUESTION = "?"; private final String REQ_ID = "$rid="; private final String VERSION = "$version="; public TopicParser(String topic) throws TransportException { if (topic == null || topic.length() == 0) { //Codes_SRS_TopicParser_25_002: [The constructor shall throw TransportException if topic is null or empty.] throw new TransportException(new IllegalArgumentException("topic cannot be null or empty")); } //Codes_SRS_TopicParser_25_001: [The constructor shall spilt the topic by "/" and save the tokens.] this.topicTokens = topic.split("/"); } protected String getStatus(int tokenIndexStatus) throws TransportException { String status = null; if (tokenIndexStatus <= 0 || tokenIndexStatus >= topicTokens.length) { //Codes_SRS_TopicParser_25_003: [If tokenIndexStatus is not valid i.e less than or equal to zero or greater then token length then getStatus shall throw TransportException.] throw new TransportException(new IllegalArgumentException("Invalid token Index for status")); } if (topicTokens.length > tokenIndexStatus) { String token = topicTokens[tokenIndexStatus]; if (token != null) { //Codes_SRS_TopicParser_25_004: [This method shall return the status corresponding to the tokenIndexStatus from tokens if it is not null.] status = token; } else { //Codes_SRS_TopicParser_25_005: [If token corresponding to tokenIndexStatus is null then this method shall throw TransportException.] throw new TransportException("Status could not be parsed"); } } return status; } String getRequestId(int tokenIndexReqID) throws TransportException { String reqId = null; if (tokenIndexReqID <= 0 || tokenIndexReqID >= topicTokens.length) { //Codes_SRS_TopicParser_25_006: [If tokenIndexReqID is not valid i.e less than or equal to zero or greater then token length then getRequestId shall throw TransportException.] throw new TransportException(new IllegalArgumentException("Invalid token Index for request id")); } if (topicTokens.length > tokenIndexReqID) { String token = topicTokens[tokenIndexReqID]; //Codes_SRS_TopicParser_25_008: [If the topic token does not contain request id then this method shall return null.] if (token.contains(REQ_ID) && token.contains(QUESTION)) // restriction for request id { int startIndex = token.indexOf(REQ_ID) + REQ_ID.length(); int endIndex = token.length(); if (token.contains(VERSION) && !token.contains(QUESTION + VERSION)) { // version after rid in the query endIndex = token.indexOf(VERSION) - 1; } //Codes_SRS_TopicParser_25_007: [This method shall return the request ID value corresponding to the tokenIndexReqID from tokens.] reqId = token.substring(startIndex, endIndex); } } return reqId; } protected String getVersion(int tokenIndexVersion) throws TransportException { String version = null; if (tokenIndexVersion <= 0 || tokenIndexVersion >= topicTokens.length) { //Codes_SRS_TopicParser_25_009: [If tokenIndexVersion is not valid i.e less than or equal to zero or greater then token length then getVersion shall throw TranpsortException.] throw new TransportException(new IllegalArgumentException("Invalid token Index for Version")); } if (topicTokens.length > tokenIndexVersion) { String token = topicTokens[tokenIndexVersion]; //Codes_SRS_TopicParser_25_010: [This method shall return the version value(if present) corresponding to the tokenIndexVersion from tokens.] //Codes_SRS_TopicParser_25_011: [If the topic token does not contain version then this method shall return null.] if (token.contains(VERSION) && token.contains(QUESTION) ) //restriction for version { int startIndex = token.indexOf(VERSION) + VERSION.length(); int endIndex = token.length(); if(!token.contains(QUESTION + REQ_ID) && token.contains(REQ_ID)) { endIndex = token.indexOf(REQ_ID) - 1; } version = token.substring(startIndex, endIndex); } } return version; } String getMethodName(int tokenIndexMethod) throws TransportException { String methodName = null; if (tokenIndexMethod <= 0 || tokenIndexMethod >= topicTokens.length) { //Codes_SRS_TopicParser_25_012: [If tokenIndexMethod is not valid i.e less than or equal to zero or greater then token length then getMethodName shall throw TransportException.] throw new TransportException(new IllegalArgumentException("Invalid token Index for Method Name")); } if (topicTokens.length > tokenIndexMethod) { String token = topicTokens[tokenIndexMethod]; //Codes_SRS_TopicParser_25_013: [This method shall return the method name(if present) corresponding to the tokenIndexMethod from tokens.] //Codes_SRS_TopicParser_25_014: [If the topic token does not contain method name or is null then this method shall throw TransportException.] if (token != null) { methodName = token; } else { throw new TransportException(new IllegalArgumentException("method name could not be parsed")); } } return methodName; } }
92408e8d796cd2cd36cbb31b92a6c64bac3a551b
2,341
java
Java
src/main/java/edu/byu/ece/rapidSmith/bitstreamTools/bitstream/test/CompareEmptyBitstreams.java
ComputerArchitectureGroupPWr/JGenerilo
c8abb472b574a2e7a0269e1384eb262d7951151f
[ "MIT" ]
1
2016-05-26T13:40:31.000Z
2016-05-26T13:40:31.000Z
src/main/java/edu/byu/ece/rapidSmith/bitstreamTools/bitstream/test/CompareEmptyBitstreams.java
ComputerArchitectureGroupPWr/JGenerilo
c8abb472b574a2e7a0269e1384eb262d7951151f
[ "MIT" ]
null
null
null
src/main/java/edu/byu/ece/rapidSmith/bitstreamTools/bitstream/test/CompareEmptyBitstreams.java
ComputerArchitectureGroupPWr/JGenerilo
c8abb472b574a2e7a0269e1384eb262d7951151f
[ "MIT" ]
null
null
null
31.213333
132
0.619821
1,001,563
/* * Copyright (c) 2010-2011 Brigham Young University * * This file is part of the BYU RapidSmith Tools. * * BYU RapidSmith Tools is free software: you may redistribute it * and/or modify it under the terms of the GNU General Public License * as published by the Free Software Foundation, either version 2 of * the License, or (at your option) any later version. * * BYU RapidSmith Tools 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. * * A copy of the GNU General Public License is included with the BYU * RapidSmith Tools. It can be found at doc/gpl2.txt. You may also * get a copy of the license at <http://www.gnu.org/licenses/>. * */ package edu.byu.ece.rapidSmith.bitstreamTools.bitstream.test; import joptsimple.OptionParser; import joptsimple.OptionSet; import java.io.IOException; import java.util.List; public class CompareEmptyBitstreams { public static void main(String[] args) { OptionParser parser = new OptionParser() { { accepts("h", "Print help message"); } }; OptionSet options = null; try { options = parser.parse(args); } catch (Exception e) { System.err.println(e); System.exit(1); } List<String> arguments = options.nonOptionArguments(); // Print help options if (options.has("h") || (arguments.size() != 1)) { try { System.out.println("Usage: java edu.byu.ece.bitstreamTools.bitstream.test.CompareEmptyBitstreams <architecture>\n"); parser.printHelpOn(System.out); } catch (IOException e) { System.out.println(e.getMessage()); System.exit(1); } System.exit(0); } boolean matches = TestTools.compareBlankBitstreams(arguments.get(0)); if (matches) { System.out.println("All .bit and .mcs files match"); } else { System.out.println("Some (or all) of the .bit and/or .mcs files didn't match"); } int result = matches ? 0 : 1; System.exit(result); } }
92408ed4767806b68a0da8f6d244367adae3645a
1,422
java
Java
references/bcb_chosen_clones/selected#789961#60#94.java
cragkhit/elasticsearch
05567b30c5bde08badcac1bf421454e5d995eb91
[ "Apache-2.0" ]
23
2018-10-03T15:02:53.000Z
2021-09-16T11:07:36.000Z
references/bcb_chosen_clones/selected#789961#60#94.java
cragkhit/elasticsearch
05567b30c5bde08badcac1bf421454e5d995eb91
[ "Apache-2.0" ]
18
2019-02-10T04:52:54.000Z
2022-01-25T02:14:40.000Z
references/bcb_chosen_clones/selected#789961#60#94.java
cragkhit/Siamese
05567b30c5bde08badcac1bf421454e5d995eb91
[ "Apache-2.0" ]
19
2018-11-16T13:39:05.000Z
2021-09-05T23:59:30.000Z
39.5
95
0.465541
1,001,564
private void initGui() { d = new debug(debug.LEVEL.DEBUG); swin = new SessionWindow(); swin.setTitle(defSWinTitle); swin.setLocationByPlatform(true); swin.Info.setText(defSWinTitle); swin.RHost.setText(defRHost); swin.RPort.setText(Integer.toString(defRPort)); try { java.util.Enumeration eth = java.net.NetworkInterface.getNetworkInterfaces(); while (eth.hasMoreElements()) { java.net.NetworkInterface eth0 = (java.net.NetworkInterface) eth.nextElement(); byte mac[] = eth0.getHardwareAddress(); if (mac != null) { String ss = ""; for (int i = 0; i < mac.length; i++) { String sss = String.format("%02X", mac[i]); if (i == 0) { ss = sss; } else { ss += ((i % 2 == 0) ? " " : "") + sss; } } swin.Mac.addItem(ss); } } } catch (Exception e) { swin.Mac.addItem(e.toString()); } swin.LHost.setText(defLHost); swin.LPort.setText(Integer.toString(defLPort)); swin.RHost.setText(defRHost); swin.RPort.setText(Integer.toString(defRPort)); setCode(0, ' '); }
92408f83a850a8c8b047f297c03c837ba8d251f5
82,887
java
Java
JavaSource/org/unitime/timetable/gwt/shared/ClassAssignmentInterface.java
tomas-muller/unitime
de307a63552128b75ae9a83d7e1d44c71b3dc266
[ "Apache-2.0" ]
3
2016-02-12T07:09:03.000Z
2021-04-02T13:24:34.000Z
JavaSource/org/unitime/timetable/gwt/shared/ClassAssignmentInterface.java
tomas-muller/unitime
de307a63552128b75ae9a83d7e1d44c71b3dc266
[ "Apache-2.0" ]
null
null
null
JavaSource/org/unitime/timetable/gwt/shared/ClassAssignmentInterface.java
tomas-muller/unitime
de307a63552128b75ae9a83d7e1d44c71b3dc266
[ "Apache-2.0" ]
null
null
null
42.095988
160
0.706914
1,001,565
/* * Licensed to The Apereo Foundation under one or more contributor license * agreements. See the NOTICE file distributed with this work for * additional information regarding copyright ownership. * * The Apereo Foundation 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 org.unitime.timetable.gwt.shared; import java.io.Serializable; import java.util.ArrayList; import java.util.Collection; import java.util.Date; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import java.util.TreeSet; import org.unitime.timetable.gwt.shared.CourseRequestInterface.Preference; import org.unitime.timetable.gwt.shared.CourseRequestInterface.RequestedCourse; import org.unitime.timetable.gwt.shared.OnlineSectioningInterface.GradeMode; import org.unitime.timetable.gwt.shared.OnlineSectioningInterface.StudentStatusInfo; import org.unitime.timetable.gwt.shared.OnlineSectioningInterface.WaitListMode; import org.unitime.timetable.gwt.shared.SpecialRegistrationInterface.RetrieveSpecialRegistrationResponse; import org.unitime.timetable.gwt.shared.SpecialRegistrationInterface.SpecialRegistrationOperation; import org.unitime.timetable.gwt.shared.SpecialRegistrationInterface.SpecialRegistrationStatus; import org.unitime.timetable.gwt.shared.TableInterface.NaturalOrderComparator; import com.google.gwt.regexp.shared.MatchResult; import com.google.gwt.regexp.shared.RegExp; import com.google.gwt.user.client.rpc.IsSerializable; /** * @author Tomas Muller */ public class ClassAssignmentInterface implements IsSerializable, Serializable { private static final long serialVersionUID = 1L; private ArrayList<CourseAssignment> iAssignments = new ArrayList<CourseAssignment>(); private ArrayList<String> iMessages = null; private ArrayList<ErrorMessage> iErrors = null; private Set<Note> iNotes = null; private Set<RetrieveSpecialRegistrationResponse> iSpecialRegistrations = null; private boolean iCanEnroll = true; private boolean iCanSetCriticalOverrides = false; private double iValue = 0.0; private Float iCurrentCredit = null; public ClassAssignmentInterface() {} public ArrayList<CourseAssignment> getCourseAssignments() { return iAssignments; } public void add(CourseAssignment a) { iAssignments.add(a); } public List<ClassAssignment> getClassAssignments() { List<ClassAssignment> ret = new ArrayList<ClassAssignment>(); for (CourseAssignment a: iAssignments) ret.addAll(a.getClassAssignments()); return ret; } public void clear() { iAssignments.clear(); if (iMessages != null) iMessages.clear(); if (iErrors != null) iErrors.clear(); } public void addMessage(String message) { if (iMessages == null) iMessages = new ArrayList<String>(); iMessages.add(message); } public boolean hasMessages() { return iMessages != null && !iMessages.isEmpty(); } public boolean isError() { for (CourseAssignment a: iAssignments) for (ClassAssignment ca: a.getClassAssignments()) if (ca != null && ca.hasError()) return true; return false; } public ArrayList<String> getMessages() { return iMessages; } public String getMessages(String delim) { String ret = ""; if (iMessages == null) return ret; for (String message: iMessages) { if (!ret.isEmpty()) ret += delim; ret += message; } return ret; } public void addError(ErrorMessage error) { if (iErrors == null) iErrors = new ArrayList<ErrorMessage>(); iErrors.add(error); } public void setErrors(Collection<ErrorMessage> errors) { if (iErrors == null) { iErrors = new ArrayList<ErrorMessage>(); } else { iErrors.clear(); } iErrors.addAll(errors); } public boolean hasErrors() { return iErrors != null && !iErrors.isEmpty(); } public ArrayList<ErrorMessage> getErrors() { return iErrors; } public boolean isCanEnroll() { return iCanEnroll; } public void setCanEnroll(boolean canEnroll) { iCanEnroll = canEnroll; } public boolean isCanSetCriticalOverrides() { return iCanSetCriticalOverrides; } public void setCanSetCriticalOverrides(boolean canSetCriticalOverrides) { iCanSetCriticalOverrides = canSetCriticalOverrides; } public double getValue() { return iValue; } public void setValue(double value) { iValue = value; } private CourseRequestInterface iRequest = null, iAdvisorRequest = null; private Set<Long> iAdvisorWaitListedCourseIds = null; public boolean hasRequest() { return iRequest != null; } public void setRequest(CourseRequestInterface request) { iRequest = request; } public CourseRequestInterface getRequest() { return iRequest; } public boolean hasAdvisorRequest() { return iAdvisorRequest != null && (!iAdvisorRequest.isEmpty() || iAdvisorRequest.hasCreditNote()); } public void setAdvisorRequest(CourseRequestInterface request) { iAdvisorRequest = request; } public CourseRequestInterface getAdvisorRequest() { return iAdvisorRequest; } public Set<Long> getAdvisorWaitListedCourseIds() { return iAdvisorWaitListedCourseIds; } public void setAdvisorWaitListedCourseIds(Set<Long> advisorWaitListedCourseIds) { iAdvisorWaitListedCourseIds = advisorWaitListedCourseIds; } public boolean isEnrolled() { for (CourseAssignment course: getCourseAssignments()) if (course.isAssigned() && !course.isFreeTime() && !course.isTeachingAssignment()) return true; return false; } public boolean hasNotes() { return iNotes != null && !iNotes.isEmpty(); } public void addNote(Note note) { if (iNotes == null) iNotes = new TreeSet<Note>(); iNotes.add(note); } public Set<Note> getNotes() { return iNotes; } public boolean hasSpecialRegistrations() { return iSpecialRegistrations != null && !iSpecialRegistrations.isEmpty(); } public void addSpecialRegistrations(RetrieveSpecialRegistrationResponse reg) { if (iSpecialRegistrations == null) iSpecialRegistrations = new TreeSet<RetrieveSpecialRegistrationResponse>(); iSpecialRegistrations.add(reg); } public void setSpecialRegistrations(Collection<RetrieveSpecialRegistrationResponse> regs) { if (regs == null || regs.isEmpty()) return; iSpecialRegistrations = new TreeSet<RetrieveSpecialRegistrationResponse>(regs); } public Set<RetrieveSpecialRegistrationResponse> getSpecialRegistrations() { return iSpecialRegistrations; } public static class CourseAssignment implements IsSerializable, Serializable, Comparable<CourseAssignment> { private static final long serialVersionUID = 1L; private Long iCourseId = null; private boolean iAssigned = true, iTeachingAssigment = false; private String iSubject, iCourseNbr, iTitle, iNote, iCreditText = null, iCreditAbbv = null; private boolean iHasUniqueName = true, iHasCrossList = false; private Integer iLimit = null, iProjected = null, iEnrollment = null, iLastLike = null, iRequested = null, iSnapShotLimit = null; private ArrayList<String> iOverlaps = null; private boolean iNotAvailable = false, iFull = false, iLocked = false, iCanWaitList = false; private String iInstead; private String iEnrollmentMessage = null; private Date iRequestedDate = null; private Date iWaitListedDate = null; private Integer iSelection = null; private Float iOverMaxCredit; private ArrayList<ClassAssignment> iAssignments = new ArrayList<ClassAssignment>(); private Set<IdValue> iInstructionalMethods = null; private boolean iHasNoInstructionalMethod = false; public Long getCourseId() { return iCourseId; } public void setCourseId(Long courseId) { iCourseId = courseId; } public boolean isFreeTime() { return (iCourseId == null); } public boolean isAssigned() { return iAssigned; } public void setAssigned(boolean assigned) { iAssigned = assigned; } public boolean isTeachingAssignment() { return iTeachingAssigment; } public void setTeachingAssignment(boolean ta) { iTeachingAssigment = ta; } public String getSubject() { return iSubject; } public void setSubject(String subject) { iSubject = subject; } public String getCourseNbr() { return iCourseNbr; } public void setCourseNbr(String courseNbr) { iCourseNbr = courseNbr; } public String getCourseNbr(boolean includeTitle) { return getCourseNbr() + (includeTitle & hasTitle() ? " - " + getTitle() : ""); } public String getCourseName() { return isFreeTime() ? "Free Time" : getSubject() + " " + getCourseNbr(); } public String getCourseNameWithTitle() { return isFreeTime() ? "Free Time" : hasTitle() ? getSubject() + " " + getCourseNbr() + " - " + getTitle() : getSubject() + " " + getCourseNbr(); } public boolean equalsIgnoreCase(String requestedCourse) { return getCourseName().equalsIgnoreCase(requestedCourse) || getCourseNameWithTitle().equalsIgnoreCase(requestedCourse); } public String getTitle() { return iTitle; } public void setTitle(String title) { iTitle = title; } public boolean hasTitle() { return iTitle != null && !iTitle.isEmpty(); } public String getNote() { return iNote; } public void setNote(String note) { iNote = note; } public boolean hasNote() { return iNote != null && !iNote.isEmpty(); } public boolean hasCredit() { return iCreditAbbv != null && !iCreditAbbv.isEmpty(); } public String getCreditText() { return iCreditText; } public void setCreditText(String creditText) { iCreditText = creditText; } public String getCreditAbbv() { return iCreditAbbv; } public void setCreditAbbv(String creditAbbv) { iCreditAbbv = creditAbbv; } public String getCredit() { return hasCredit() ? getCreditAbbv() + "|" + getCreditText() : null; } public float guessCreditCount() { if (!hasCredit()) return 0f; MatchResult m = RegExp.compile("\\d+\\.?\\d*").exec(getCreditAbbv()); if (m != null) return Float.parseFloat(m.getGroup(0)); return 0f; } public float[] guessCreditRange() { if (!hasCredit()) return new float[] {0f, 0f}; MatchResult r = RegExp.compile("(\\d+\\.?\\d*)-(\\d+\\.?\\d*)").exec(getCreditAbbv()); if (r != null) return new float[] {Float.parseFloat(r.getGroup(1)), Float.parseFloat(r.getGroup(2))}; float credit = guessCreditCount(); return new float[] { credit, credit }; } public boolean hasUniqueName() { return iHasUniqueName; } public void setHasUniqueName(boolean hasUniqueName) { iHasUniqueName = hasUniqueName; } public boolean hasCrossList() { return iHasCrossList; } public void setHasCrossList(boolean hasCrossList) { iHasCrossList = hasCrossList; } public void addOverlap(String overlap) { if (iOverlaps == null) iOverlaps = new ArrayList<String>(); if (!iOverlaps.contains(overlap)) iOverlaps.add(overlap); } public ArrayList<String> getOverlaps() { return iOverlaps; } public boolean isNotAvailable() { return iNotAvailable; } public void setNotAvailable(boolean notAvailable) { iNotAvailable = notAvailable; } public boolean isFull() { return iFull; } public void setFull(boolean full) { iFull = full; } public boolean isOverMaxCredit() { return iOverMaxCredit != null; } public Float getOverMaxCredit() { return iOverMaxCredit; } public void setOverMaxCredit(Float maxCredit) { iOverMaxCredit = maxCredit; } public boolean isLocked() { return iLocked; } public void setLocked(boolean locked) { iLocked = locked; } public boolean isCanWaitList() { return iCanWaitList; } public void setCanWaitList(boolean waitList) { iCanWaitList = waitList; } public void setInstead(String instead) { iInstead = instead; } public String getInstead() { return iInstead; } public ArrayList<ClassAssignment> getClassAssignments() { return iAssignments; } public ClassAssignment addClassAssignment() { ClassAssignment a = new ClassAssignment(this); iAssignments.add(a); return a; } public Integer getLimit() { return iLimit; } public void setLimit(Integer limit) { iLimit = limit; } public String getLimitString() { if (iLimit == null) return ""; if (iLimit < 0) return "&infin;"; return iLimit.toString(); } public Integer getSnapShotLimit() { return iSnapShotLimit; } public void setSnapShotLimit(Integer limit) { iSnapShotLimit = limit; } public Integer getProjected() { return iProjected; } public void setProjected(Integer projected) { iProjected = projected; } public String getProjectedString() { if (iProjected == null || iProjected == 0) return ""; if (iProjected < 0) return "&infin;"; return iProjected.toString(); } public Integer getLastLike() { return iLastLike; } public void setLastLike(Integer lastLike) { iLastLike = lastLike; } public String getLastLikeString() { if (iLastLike == null || iLastLike == 0) return ""; if (iLastLike < 0) return "&infin;"; return iLastLike.toString(); } public Integer getEnrollment() { return iEnrollment; } public void setEnrollment(Integer enrollment) { iEnrollment = enrollment; } public String getEnrollmentString() { if (iEnrollment == null || iEnrollment == 0) return ""; if (iEnrollment < 0) return "&infin;"; return iEnrollment.toString(); } public void setAvailability(int[] availability) { iRequested = null; if (availability == null) { iEnrollment = null; iLimit = null; } else { iEnrollment = availability[0]; iLimit = availability[1]; if (availability.length > 2) iRequested = availability[2]; } } public String getEnrollmentMessage() { return iEnrollmentMessage; } public boolean hasEnrollmentMessage() { return iEnrollmentMessage != null && !iEnrollmentMessage.isEmpty(); } public void setEnrollmentMessage(String message) { iEnrollmentMessage = message; } public boolean hasInstructionalMethods() { return iInstructionalMethods != null && !iInstructionalMethods.isEmpty(); } public Set<IdValue> getInstructionalMethods() { return iInstructionalMethods; } public void addInstructionalMethod(Long id, String value) { if (iInstructionalMethods == null) iInstructionalMethods = new TreeSet<IdValue>(); iInstructionalMethods.add(new IdValue(id, value)); } public boolean isHasNoInstructionalMethod() { return iHasNoInstructionalMethod; } public void setHasNoInstructionalMethod(boolean hasNoInstructionalMethod) { iHasNoInstructionalMethod = hasNoInstructionalMethod; } public boolean hasInstructionalMethodSelection() { if (hasInstructionalMethods()) { return getInstructionalMethods().size() + (isHasNoInstructionalMethod() ? 1 : 0) > 1; } else { return false; } } public String toString() { return (isFreeTime() ? "Free Time" : getSubject() + " " + getCourseNbr()) + ": " + (isAssigned() ? getClassAssignments() : "NOT ASSIGNED"); } public Date getRequestedDate() { return iRequestedDate; } public void setRequestedDate(Date ts) { iRequestedDate = ts; } public Date getWaitListedDate() { return iWaitListedDate; } public void setWaitListedDate(Date ts) { iWaitListedDate = ts; } public Integer getRequested() { return iRequested; } public void setRequested(Integer requested) { iRequested = requested; } public Integer getSelection() { return iSelection; } public void setSelection(Integer selection) { iSelection = selection; } public boolean hasSelection() { return iSelection != null; } @Override public int compareTo(CourseAssignment c) { if (hasSelection()) { if (c.hasSelection()) { int cmp = getSelection().compareTo(c.getSelection()); if (cmp != 0) return cmp; } else { return -1; } } else if (c.hasSelection()) { return 1; } return getCourseName().compareTo(c.getCourseName()); } } public static class ClassAssignment implements IsSerializable, Serializable { private static final long serialVersionUID = 1L; private boolean iCourseAssigned = true; private Long iCourseId, iClassId, iSubpartId; private ArrayList<Integer> iDays = new ArrayList<Integer>(); private int iStart, iLength, iBreakTime = 0; private ArrayList<String> iInstructos = new ArrayList<String>(); private ArrayList<String> iInstructoEmails = new ArrayList<String>(); private ArrayList<IdValue> iRooms = new ArrayList<IdValue>(); private boolean iAlternative = false, iHasAlternatives = true, iDistanceConflict = false, iTeachingAssigment = false, iInstructing = false; private String iDatePattern = null; private String iSubject, iCourseNbr, iSubpart, iSection, iParentSection, iNumber, iTitle; private int[] iLimit = null; private boolean iPin = false; private int iBackToBackDistance = 0; private String iBackToBackRooms = null; private boolean iSaved = false, iDummy = false, iCancelled = false; private Integer iExpected = null; private String iOverlapNote = null; private String iNote = null; private String iCredit = null; private String iError = null, iWarn = null, iInfo = null; private Date iEnrolledDate = null; private String iExternalId = null; private SpecialRegistrationStatus iSpecRegStatus = null; private SpecialRegistrationOperation iSpecRegOperation = null; private GradeMode iGradeMode = null; private Float iCreditHour = null, iCreditMin = null, iCreditMax = null; private Boolean iCanWaitList = null; public ClassAssignment() {} public ClassAssignment(CourseAssignment course) { iCourseId = course.getCourseId(); iSubject = course.getSubject(); iCourseNbr = course.getCourseNbr(); iCourseAssigned = course.isAssigned(); iTitle = course.getTitle(); iCanWaitList = course.isCanWaitList(); } public Long getCourseId() { return iCourseId; } public void setCourseId(Long courseId) { iCourseId = courseId; } public boolean isFreeTime() { return (iCourseId == null); } public boolean isCourseAssigned() { return iCourseAssigned; } public void setCourseAssigned(boolean courseAssigned) { iCourseAssigned = courseAssigned; } public String getSubject() { return iSubject; } public void setSubject(String subject) { iSubject = subject; } public String getCourseNbr() { return iCourseNbr; } public void setCourseNbr(String courseNbr) { iCourseNbr = courseNbr; } public String getCourseNbr(boolean includeTitle) { return getCourseNbr() + (includeTitle & hasTitle() ? " - " + getTitle() : ""); } public String getTitle() { return iTitle; } public void setTitle(String title) { iTitle = title; } public boolean hasTitle() { return iTitle != null && !iTitle.isEmpty(); } public String getSubpart() { return iSubpart; } public void setSubpart(String subpart) { iSubpart = subpart; } public String getSection() { return iSection; } public void setSection(String section) { iSection = section; } public String getExternalId() { return iExternalId; } public void setExternalId(String extId) { iExternalId = extId; } public Preference getSelection() { return getSelection(false); } public Preference getSelection(boolean required) { return new Preference(iClassId, iSection.length() <= 4 ? iSubpart + " " + iSection : iSection, required); } public String getParentSection() { return iParentSection; } public void setParentSection(String parentSection) { iParentSection = parentSection; } public boolean isAlternative() { return iAlternative; } public void setAlternative(boolean alternative) { iAlternative = alternative; } public Long getClassId() { return iClassId; } public void setClassId(Long classId) { iClassId = classId; } public Long getSubpartId() { return iSubpartId; } public void setSubpartId(Long subpartId) { iSubpartId = subpartId; } public void addDay(int day) { if (iDays == null) iDays = new ArrayList<Integer>(); iDays.add(day); } public ArrayList<Integer> getDays() { return iDays; } public String getDaysString(String[] shortDays, String separator) { if (iDays == null) return ""; String ret = ""; for (int day: iDays) ret += (ret.isEmpty() ? "" : separator) + shortDays[day]; return ret; } public String getDaysString(String[] shortDays) { return getDaysString(shortDays, ""); } public boolean isAssigned() { return iDays != null && !iDays.isEmpty(); } public int getStart() { return iStart; } public void setStart(int start) { iStart = start; } public String getStartString(boolean useAmPm) { if (!isAssigned()) return ""; int h = iStart / 12; int m = 5 * (iStart % 12); if (useAmPm) return (h > 12 ? h - 12 : h) + ":" + (m < 10 ? "0" : "") + m + (h == 24 ? "a" : h >= 12 ? "p" : "a"); else return h + ":" + (m < 10 ? "0" : "") + m; } public String getStartStringAria(boolean useAmPm) { if (!isAssigned()) return ""; int h = iStart / 12; int m = 5 * (iStart % 12); if (useAmPm) return (h > 12 ? h - 12 : h) + (m == 0 ? "" : (m < 10 ? " 0" : " ") + m) + (h == 24 ? " AM" : h >= 12 ? " PM" : " AM"); else return h + ":" + (m < 10 ? "0" : "") + m; } public int getLength() { return iLength; } public void setLength(int length) { iLength = length; } public String getEndString(boolean useAmPm) { if (!isAssigned()) return ""; int h = (5 * (iStart + iLength) - iBreakTime) / 60; int m = (5 * (iStart + iLength) - iBreakTime) % 60; if (useAmPm) return (h > 12 ? h - 12 : h) + ":" + (m < 10 ? "0" : "") + m + (h == 24 ? "a" : h >= 12 ? "p" : "a"); else return h + ":" + (m < 10 ? "0" : "") + m; } public String getEndStringAria(boolean useAmPm) { if (!isAssigned()) return ""; int h = (5 * (iStart + iLength) - iBreakTime) / 60; int m = (5 * (iStart + iLength) - iBreakTime) % 60; if (useAmPm) return (h > 12 ? h - 12 : h) + (m == 0 ? "" : (m < 10 ? " 0" : " ") + m) + (h == 24 ? " AM" : h >= 12 ? " PM" : " AM"); else return h + ":" + (m < 10 ? "0" : "") + m; } public String getTimeString(String[] shortDays, boolean useAmPm, String arrangeHours) { if (!isAssigned()) return (iClassId == null ? "" : arrangeHours); return getDaysString(shortDays) + " " + getStartString(useAmPm) + " - " + getEndString(useAmPm); } public String getTimeStringAria(String[] longDays, boolean useAmPm, String arrangeHours) { if (!isAssigned()) return (iClassId == null ? "" : arrangeHours); int h = iStart / 12; int m = 5 * (iStart % 12); String ret = getDaysString(longDays, " ") + " from "; if (useAmPm) ret += (h > 12 ? h - 12 : h) + (m == 0 ? "" : (m < 10 ? " 0" : " ") + m) + (h == 24 ? " AM" : h >= 12 ? " PM" : " AM"); else ret += h + " " + (m < 10 ? "0" : "") + m; h = (iStart + iLength) / 12; m = 5 * ((iStart + iLength) % 12); ret += " to "; if (useAmPm) ret += (h > 12 ? h - 12 : h) + (m == 0 ? "" : (m < 10 ? " 0" : " ") + m) + (h == 24 ? " AM" : h >= 12 ? " PM" : " AM"); else ret += h + " " + (m < 10 ? "0" : "") + m; return ret; } public int getBreakTime() { return iBreakTime; } public void setBreakTime(int breakTime) { iBreakTime = breakTime; } public boolean hasDatePattern() { return iDatePattern != null && !iDatePattern.isEmpty(); } public String getDatePattern() { return iDatePattern; } public void setDatePattern(String datePattern) { iDatePattern = datePattern; } public boolean hasInstructors() { return iInstructos != null && !iInstructos.isEmpty(); } public void addInstructor(String instructor) { if (iInstructos == null) iInstructos = new ArrayList<String>(); iInstructos.add(instructor); } public ArrayList<String> getInstructors() { return iInstructos; } public String getInstructors(String delim) { if (iInstructos == null) return ""; String ret = ""; for (String instructor: iInstructos) { if (!ret.isEmpty()) ret += delim; ret += instructor; } return ret; } public String getInstructorWithEmails(String delim) { if (iInstructos == null) return ""; String ret = ""; for (int i = 0; i < iInstructos.size(); i++) { if (!ret.isEmpty()) ret += delim; String email = (iInstructoEmails != null && i < iInstructoEmails.size() ? iInstructoEmails.get(i) : null); if (email != null && !email.isEmpty()) { ret += "<A class=\"unitime-SimpleLink\" href=\"mailto:" + email + "\">" + iInstructos.get(i) + "</A>"; } else ret += iInstructos.get(i); } return ret; } public boolean hasInstructorEmails() { return iInstructoEmails != null && !iInstructoEmails.isEmpty(); } public void addInstructoEmail(String instructorEmail) { if (iInstructoEmails == null) iInstructoEmails = new ArrayList<String>(); iInstructoEmails.add(instructorEmail == null ? "" : instructorEmail); } public ArrayList<String> getInstructorEmails() { return iInstructoEmails; } public boolean hasRoom() { return iRooms != null && !iRooms.isEmpty(); } public void addRoom(Long id, String name) { if (iRooms == null) iRooms = new ArrayList<IdValue>(); iRooms.add(new IdValue(id, name)); } public ArrayList<IdValue> getRooms() { return iRooms; } public String getRooms(String delim) { if (iRooms == null) return ""; String ret = ""; for (IdValue room: iRooms) { if (!ret.isEmpty()) ret += delim; ret += room.getValue(); } return ret; } public boolean isUnlimited() { return iLimit != null && (iLimit[1] < 0 || iLimit[1] >= 9999); } public int[] getLimit() { return iLimit; } public void setLimit(int[] limit) { iLimit = limit; } public String getLimitString() { if (iLimit == null) return ""; if (iLimit[1] >= 9999 || iLimit[1] < 0) return "&infin;"; if (iLimit[0] < 0) return String.valueOf(iLimit[1]); return (iLimit[1] > iLimit[0] ? iLimit[1] - iLimit[0] : 0) + " / " + iLimit[1]; } public boolean isAvailable() { if (iLimit == null) return true; if (iLimit[1] < 0) return true; if (iLimit[0] < 0) return (iLimit[1] != 0); return iLimit[0] < iLimit[1]; } public int getAvailableLimit() { if (iLimit == null) return 9999; if (iLimit[0] < 0) return 9999; return iLimit[1] - iLimit[0]; } public boolean isPinned() { return iPin; } public void setPinned(boolean pin) { iPin = pin; } public boolean hasAlternatives() { return iHasAlternatives; } public void setHasAlternatives(boolean alternatives) { iHasAlternatives = alternatives; } public boolean isTeachingAssignment() { return iTeachingAssigment; } public void setTeachingAssignment(boolean ta) { iTeachingAssigment = ta; } public boolean isInstructing() { return iInstructing; } public void setInstructing(boolean instructing) { iInstructing = instructing; } public boolean hasDistanceConflict() { return iDistanceConflict; } public void setDistanceConflict(boolean distanceConflict) { iDistanceConflict = distanceConflict; } public int getBackToBackDistance() { return iBackToBackDistance; } public void setBackToBackDistance(int backToBackDistance) { iBackToBackDistance = backToBackDistance; } public String getBackToBackRooms() { return iBackToBackRooms; } public void setBackToBackRooms(String backToBackRooms) { iBackToBackRooms = backToBackRooms; } public boolean isSaved() { return iSaved; } public void setSaved(boolean saved) { iSaved = saved; } public boolean isDummy() { return iDummy; } public void setDummy(boolean dummy) { iDummy = dummy; } public boolean isCancelled() { return iCancelled; } public void setCancelled(boolean cancelled) { iCancelled = cancelled; } public void setError(String error) { iError = error; } public void addError(String error) { iError = (iError == null || iError.isEmpty() ? "" : iError + "\n") + error; } public boolean hasError() { return iError != null && !iError.isEmpty(); } public String getError() { return iError; } public void setWarn(String warn) { iWarn = warn; } public void addWarn(String warn) { iWarn = (iWarn == null || iWarn.isEmpty() ? "" : iWarn + "\n") + warn; } public boolean hasWarn() { return iWarn != null && !iWarn.isEmpty(); } public String getWarn() { return iWarn; } public void setInfo(String info) { iInfo = info; } public void addInfo(String info) { iInfo = (iInfo == null || iInfo.isEmpty() ? "" : iInfo + "\n") + info; } public boolean hasInfo() { return iInfo != null && !iInfo.isEmpty(); } public String getInfo() { return iInfo; } public void setExpected(Integer expected) { iExpected = expected; } public boolean hasExpected() { return iExpected != null; } public int getExpected() { return (iExpected == null ? 0 : iExpected); } public boolean isOfHighDemand() { return isAvailable() && !isUnlimited() && hasExpected() && getExpected() + (isSaved() ? -1 : 0) >= getAvailableLimit(); } public String toString() { return (isFreeTime() ? "Free Time" : getSubpart() + " " + getSection()) + (isAssigned() ? " " + getTimeString(new String[] {"M","T","W","R","F","S","X"}, true, "") : "") + (hasRoom() ? " " + getRooms(",") : "") + (isSaved() || isPinned() || isOfHighDemand() || hasAlternatives() || hasDistanceConflict() || isUnlimited() ? "[" + (isSaved() ? "s" : "") + (isPinned() ? "p" : "") + (isOfHighDemand() ? "h" : "") + (hasAlternatives() ? "a" : "") + (hasDistanceConflict() ? "d" : "") + (isUnlimited() ? "u" : "") + (isCancelled() ? "c" : "") + "]" : ""); } public String getClassNumber() { return iNumber; } public void setClassNumber(String number) { iNumber = number; } public boolean hasNote() { return iNote != null && !iNote.isEmpty(); } public String getNote() { return (iNote == null ? "" : iNote); } public void setNote(String note) { iNote = note; } public void addNote(String note) { if (note == null || note.isEmpty()) return; addNote(note, "\n"); } public void addNote(String note, String separator) { if (note == null || note.isEmpty()) return; if (iNote == null || iNote.isEmpty()) iNote = note; else { if (separator == null) { if (iNote.endsWith(".") || iNote.endsWith(",")) iNote += " "; else iNote += "; "; } else { iNote += separator; } iNote += note; } } public void setOverlapNote(String note) { iOverlapNote = note; } public boolean hasOverlapNote() { return iOverlapNote != null && !iOverlapNote.isEmpty(); } public String getOverlapNote() { return iOverlapNote; } public String getOverlapAndNote(String overlapStyle) { String ret = ""; if (hasOverlapNote()) { ret += (overlapStyle != null ? "<span class='" + overlapStyle + "'>" + getOverlapNote() + "</span>" : getOverlapNote()); } if (hasNote()) { if (!ret.isEmpty()) ret += (overlapStyle == null ? "\n" : "<br>"); ret += (overlapStyle == null ? getNote() : getNote().replace("\n", "<br>")); } return ret; } public boolean hasCredit() { return iCredit != null && !iCredit.isEmpty(); } public String getCredit() { return (iCredit == null ? "" : iCredit); } public void setCredit(String credit) { iCredit = credit; } public float guessCreditCount() { if (!hasCredit()) return 0f; MatchResult m = RegExp.compile("\\d+\\.?\\d*").exec(getCredit()); if (m != null) return Float.parseFloat(m.getGroup(0)); return 0f; } public String getCourseName() { return isFreeTime() ? "Free Time" : getSubject() + " " + getCourseNbr(); } public String getCourseNameWithTitle() { return isFreeTime() ? "Free Time" : hasTitle() ? getSubject() + " " + getCourseNbr() + " - " + getTitle() : getSubject() + " " + getCourseNbr(); } public boolean equalsIgnoreCase(String requestedCourse) { return getCourseName().equalsIgnoreCase(requestedCourse) || getCourseNameWithTitle().equalsIgnoreCase(requestedCourse); } public boolean equalsIgnoreCase(RequestedCourse requestedCourse) { if (requestedCourse == null || !requestedCourse.isCourse()) return false; if (requestedCourse.hasCourseId()) return requestedCourse.getCourseId().equals(getCourseId()); else return getCourseName().equalsIgnoreCase(requestedCourse.getCourseName()) || getCourseNameWithTitle().equalsIgnoreCase(requestedCourse.getCourseName()); } public Date getEnrolledDate() { return iEnrolledDate; } public void setEnrolledDate(Date ts) { iEnrolledDate = ts; } public SpecialRegistrationStatus getSpecRegStatus() { return iSpecRegStatus; } public void setSpecRegStatus(SpecialRegistrationStatus status) { iSpecRegStatus = status; } public SpecialRegistrationOperation getSpecRegOperation() { return iSpecRegOperation; } public void setSpecRegOperation(SpecialRegistrationOperation operation) { iSpecRegOperation = operation; } public GradeMode getGradeMode() { return iGradeMode; } public void setGradeMode(GradeMode mode) { iGradeMode = mode; } public Float getCreditHour() { return iCreditHour; } public void setCreditHour(Float creditHour) { iCreditHour = creditHour; } public Float getCreditMin() { return iCreditMin; } public Float getCreditMax() { return iCreditMax; } public void setCreditRange(Float creditMin, Float creditMax) { iCreditMin = creditMin; iCreditMax = creditMax; } public boolean hasVariableCredit() { return iCreditMin != null && iCreditMax != null && iCreditMin < iCreditMax; } public boolean isCanWaitList() { return iCanWaitList != null && iCanWaitList.booleanValue(); } public void setCanWaitList(Boolean canWaitList) { iCanWaitList = canWaitList; } } public static class Group implements IsSerializable, Serializable, Comparable<Group> { private static final long serialVersionUID = 1L; private String iType; private String iName; private String iTitle; public Group() {} public Group(String type, String name, String title) { iType = type; iName = name; iTitle = title; } public Group(String name, String title) { this(null, name, title); } public String getType() { return iType; } public void setType(String type) { iType = type;} public boolean hasType() { return iType != null && !iType.isEmpty(); } public String getTypeNotNull() { return iType == null ? "" : iType; } public boolean sameType(String type) { if (!hasType()) return type == null || type.isEmpty(); else return getType().equals(type); } public String getName() { return iName; } public void setName(String name) { iName = name; } public String getTitle() { return iTitle; } public void setTitle(String title) { iTitle = title; } public boolean hasTitle() { return iTitle != null && !iTitle.isEmpty(); } @Override public int compareTo(Group g) { int cmp = getTypeNotNull().compareTo(g.getTypeNotNull()); if (cmp != 0) return cmp; return getName().compareTo(g.getName()); } } public static class CodeLabel implements IsSerializable, Serializable { private static final long serialVersionUID = 1L; private String iCode, iLabel; public CodeLabel() {} public CodeLabel(String code, String label) { iCode = code; iLabel = label; } public String getCode() { return iCode; } public void setCode(String code) { iCode = code; } public boolean hasCode() { return iCode != null && !iCode.isEmpty(); } public String getLabel() { return (iLabel == null || iLabel.isEmpty() ? iCode : iLabel); } public void setLable(String label) { iLabel = label; } public boolean hasLabel() { return iLabel != null && !iLabel.isEmpty(); } @Override public String toString() { return (iCode == null || iCode.isEmpty() ? "" : iCode); } public boolean isEmpty() { return iCode == null || iCode.isEmpty(); } } public static class Student implements IsSerializable, Serializable { private static final long serialVersionUID = 1L; private long iId; private Long iSessionId = null; private String iExternalId, iName, iEmail; private List<CodeLabel> iArea, iClassification, iMajor, iAccommodation, iMinor, iConcentration, iDegree; private List<String> iAdvisor; private Set<Group> iGroups; private boolean iCanShowExternalId = false, iCanSelect = false; private boolean iCanUseAssitant = false, iCanRegister = false; private WaitListMode iMode = null; public Student() {} public void setId(long id) { iId = id; } public long getId() { return iId; } public void setSessionId(Long sessionId) { iSessionId = sessionId; } public Long getSessionId() { return iSessionId; } public String getExternalId() { return iExternalId; } public void setExternalId(String externalId) { iExternalId = externalId; } public void setCanShowExternalId(boolean canShowExternalId) { iCanShowExternalId = canShowExternalId; } public boolean isCanShowExternalId() { return iExternalId != null && iCanShowExternalId; } public void setCanUseAssistant(boolean canUseAssistant) { iCanUseAssitant = canUseAssistant; } public boolean isCanUseAssistant() { return iCanUseAssitant; } public void setCanRegister(boolean canRegister) { iCanRegister = canRegister; } public boolean isCanRegister() { return iCanRegister; } public void setCanSelect(boolean canSelect) { iCanSelect = canSelect; } public boolean isCanSelect() { return iCanSelect; } public String getName() { return iName; } public void setName(String name) { iName = name; } public String getEmail() { return iEmail; } public void setEmail(String email) { iEmail = email; } public boolean hasArea() { return iArea != null && !iArea.isEmpty(); } public String getArea(String delim) { if (iArea == null) return ""; String ret = ""; for (CodeLabel area: iArea) { if (!ret.isEmpty()) ret += delim; ret += area.getCode(); } return ret; } public void addArea(String area, String label) { if (iArea == null) iArea = new ArrayList<CodeLabel>(); iArea.add(new CodeLabel(area, label)); } public List<CodeLabel> getAreas() { return iArea; } public boolean hasClassification() { return iClassification != null && !iClassification.isEmpty(); } public String getClassification(String delim) { if (iClassification == null) return ""; String ret = ""; for (CodeLabel classification: iClassification) { if (!ret.isEmpty()) ret += delim; ret += classification.getCode(); } return ret; } public void addClassification(String classification, String label) { if (iClassification == null) iClassification = new ArrayList<CodeLabel>(); iClassification.add(new CodeLabel(classification, label)); } public List<CodeLabel> getClassifications() { return iClassification; } public boolean hasMajor() { return iMajor != null && !iMajor.isEmpty(); } public String getMajor(String delim) { if (iMajor == null) return ""; String ret = ""; for (CodeLabel major: iMajor) { if (!ret.isEmpty()) ret += delim; ret += major.getCode(); } return ret; } public void addMajor(String major, String label) { if (iMajor == null) iMajor = new ArrayList<CodeLabel>(); iMajor.add(new CodeLabel(major, label)); } public List<CodeLabel> getMajors() { return iMajor; } public boolean hasConcentration() { if (iConcentration == null || iConcentration.isEmpty()) return false; for (CodeLabel conc: iConcentration) if (!conc.isEmpty()) return true; return false; } public String getConcentration(String delim) { if (iConcentration == null) return ""; String ret = ""; for (Iterator<CodeLabel> i = iConcentration.iterator(); i.hasNext(); ) { CodeLabel conc = i.next(); if (conc.hasCode()) ret += conc.getCode(); if (i.hasNext()) ret += delim; } return ret; } public void addConcentration(String conc, String label) { if (iConcentration == null) iConcentration = new ArrayList<CodeLabel>(); iConcentration.add(new CodeLabel(conc, label)); } public List<CodeLabel> getConcentrations() { return iConcentration; } public boolean hasDegree() { if (iDegree == null || iDegree.isEmpty()) return false; for (CodeLabel degr: iDegree) if (!degr.isEmpty()) return true; return false; } public String getDegree(String delim) { if (iDegree == null) return ""; String ret = ""; for (Iterator<CodeLabel> i = iDegree.iterator(); i.hasNext(); ) { CodeLabel deg = i.next(); if (deg.hasCode()) ret += deg.getCode(); if (i.hasNext()) ret += delim; } return ret; } public void addDegree(String degree, String label) { if (iDegree == null) iDegree = new ArrayList<CodeLabel>(); iDegree.add(new CodeLabel(degree, label)); } public List<CodeLabel> getDegrees() { return iDegree; } public boolean hasAdvisor() { return iAdvisor != null && !iAdvisor.isEmpty(); } public String getAdvisor(String delim) { if (iAdvisor == null) return ""; String ret = ""; for (String advisor: iAdvisor) { if (!ret.isEmpty()) ret += delim; ret += advisor; } return ret; } public void addAdvisor(String advisor) { if (advisor == null || advisor.isEmpty()) return; if (iAdvisor == null) iAdvisor = new ArrayList<String>(); iAdvisor.add(advisor); } public List<String> getAdvisors() { return iAdvisor; } public boolean hasMinor() { return iMinor != null && !iMinor.isEmpty(); } public String getMinor(String delim) { if (iMinor == null) return ""; String ret = ""; for (CodeLabel minor: iMinor) { if (!ret.isEmpty()) ret += delim; ret += minor.getCode(); } return ret; } public void addMinor(String minor, String label) { if (iMinor == null) iMinor = new ArrayList<CodeLabel>(); iMinor.add(new CodeLabel(minor, label)); } public List<CodeLabel> getMinors() { return iMinor; } public boolean hasGroup() { return hasGroups(null); } public String getGroup(String delim) { return getGroup(null, delim); } public void addGroup(String group, String title) { addGroup(null, group, title); } public void removeGroup(String group) { removeGroup(null, group); } public List<Group> getGroups() { return getGroups(null); } public boolean hasGroup(String group) { if (iGroups == null) return false; for (Group g: iGroups) { if (g.getName().equals(group)) return true; } return false; } public boolean hasGroups() { return iGroups != null && !iGroups.isEmpty(); } public void addGroup(String type, String group, String title) { if (iGroups == null) iGroups = new TreeSet<Group>(); iGroups.add(new Group(type, group, title)); } public void removeGroup(String type, String group) { if (iGroups == null) return; for (Iterator<Group> i = iGroups.iterator(); i.hasNext(); ) { Group g = i.next(); if (g.sameType(type) && g.getName().equals(group)) { i.remove(); } } } public List<Group> getGroups(String type) { if (iGroups == null) return null; List<Group> groups = new ArrayList<Group>(); for (Group g: iGroups) { if (g.sameType(type)) { groups.add(g); } } return groups; } public Set<String> getGroupTypes() { if (iGroups == null) return null; Set<String> types = new HashSet<String>(); for (Group g: iGroups) if (g.hasType()) types.add(g.getType()); return types; } public boolean hasGroups(String type) { if (iGroups == null || iGroups.isEmpty()) return false; for (Group g: iGroups) { if (g.sameType(type)) return true; } return false; } public String getGroup(String type, String delim) { if (iGroups == null) return ""; boolean html = "<br>".equalsIgnoreCase(delim); String ret = ""; for (Group g: iGroups) { if (g.sameType(type)) { if (!ret.isEmpty()) ret += delim; ret += (html && g.hasTitle() ? "<span title='" + g.getTitle() + "'>" + g.getName() + "</span>" : g.getName()); } } return ret; } public boolean hasAccommodation() { return iAccommodation != null && !iAccommodation.isEmpty(); } public String getAccommodation(String delim) { if (iAccommodation == null) return ""; String ret = ""; for (CodeLabel accommodation: iAccommodation) { if (!ret.isEmpty()) ret += delim; ret += accommodation.getCode(); } return ret; } public void addAccommodation(String accommodation, String label) { if (iAccommodation == null) iAccommodation = new ArrayList<CodeLabel>(); iAccommodation.add(new CodeLabel(accommodation, label)); } public List<CodeLabel> getAccommodations() { return iAccommodation; } public String getCurriculum(String delim) { if (!hasArea()) return ""; String ret = ""; for (int i = 0; i < iArea.size(); i++) { if (!ret.isEmpty()) ret += delim; ret += iArea.get(i) + " " + iClassification.get(i); if (iMajor != null && i < iMajor.size()) ret += " " + iMajor.get(i); } return ret; } public String getAreaClasf(String delim) { if (!hasArea()) return ""; String ret = ""; for (int i = 0; i < iArea.size(); i++) { if (!ret.isEmpty()) ret += delim; ret += iArea.get(i) + " " + iClassification.get(i); } return ret; } public WaitListMode getWaitListMode() { if (iMode == null) return WaitListMode.None; return iMode; } public void setWaitListMode(WaitListMode mode) { iMode = mode; } } public static class Enrollment implements IsSerializable, Serializable { private static final long serialVersionUID = 1L; private Student iStudent; private CourseAssignment iCourse = null; private int iPriority = 0; private String iAlternative = null; private Date iRequestedDate = null, iEnrolledDate = null, iApprovedDate = null, iWaitListedDate = null; private String iReservation = null; private String iApprovedBy = null; private List<Conflict> iConflicts = null; private Boolean iWaitList = null, iNoSub = null; private String iEnrollmentMessage = null; private String iWaitListedPosition = null; private Integer iCritical = null; public Enrollment() {} public Student getStudent() { return iStudent; } public void setStudent(Student student) { iStudent = student; } public CourseAssignment getCourse() { return iCourse; } public void setCourse(CourseAssignment course) { iCourse = course; } public int getPriority() { return iPriority; } public void setPriority(int priority) { iPriority = priority; } public boolean isAlternative() { return iAlternative != null; } public void setAlternative(String course) { iAlternative = course; } public String getAlternative() { return (iAlternative == null ? "" : iAlternative); } public boolean hasRequestedDate() { return iRequestedDate != null; } public Date getRequestedDate() { return iRequestedDate; } public void setRequestedDate(Date ts) { iRequestedDate = ts; } public boolean hasWaitListedDate() { return iWaitListedDate != null && isWaitList() && getStudent().getWaitListMode() == WaitListMode.WaitList; } public Date getWaitListedDate() { return iWaitListedDate; } public void setWaitListedDate(Date ts) { iWaitListedDate = ts; } public boolean hasEnrolledDate() { return iEnrolledDate != null; } public Date getEnrolledDate() { return iEnrolledDate; } public void setEnrolledDate(Date ts) { iEnrolledDate = ts; } public boolean hasApprovedDate() { return iApprovedDate != null; } public Date getApprovedDate() { return iApprovedDate; } public void setApprovedDate(Date ts) { iApprovedDate = ts; } public String getApprovedBy() { return iApprovedBy; } public void setApprovedBy(String approvedBy) { iApprovedBy = approvedBy; } public boolean hasWaitList() { return iWaitList != null; } public boolean isWaitList() { return iWaitList != null && iWaitList.booleanValue(); } public void setWaitList(Boolean waitList) { iWaitList = waitList; } public boolean hasNoSub() { return iNoSub != null; } public boolean isNoSub() { return iNoSub != null && iNoSub.booleanValue(); } public void setNoSub(Boolean noSub) { iNoSub = noSub; } public String getWaitListedPosition() { return iWaitListedPosition; } public boolean hasWaitListedPosition() { return iWaitListedPosition != null && !iWaitListedPosition.isEmpty() && isWaitList() && getStudent().getWaitListMode() == WaitListMode.WaitList; } public void setWaitListedPosition(String pos) { iWaitListedPosition = pos; } public String getClasses(String subpart, String delim, boolean showClassNumbers) { if (getCourse() == null || getCourse().getClassAssignments().isEmpty()) return ""; String ret = ""; TreeSet<String> sections = new TreeSet<String>(); for (ClassAssignment c: getCourse().getClassAssignments()) { if (subpart.equals(c.getSubpart())) sections.add(showClassNumbers && c.getClassNumber() != null ? c.getClassNumber() : c.getSection()); } for (String section: sections) { if (!ret.isEmpty()) ret += delim; ret += section; } return ret; } public boolean hasClasses() { return getCourse() != null && !getCourse().getClassAssignments().isEmpty(); } public List<ClassAssignment> getClasses() { return getCourse() == null ? null : getCourse().getClassAssignments(); } public Long getCourseId() { return getCourse() == null ? null : getCourse().getCourseId(); } public String getCourseName() { return getCourse() == null ? null : getCourse().getCourseName(); } public boolean hasReservation() { return iReservation != null && !iReservation.isEmpty(); } public String getReservation() { return iReservation; } public void setReservation(String reservation) { iReservation = reservation; } public boolean hasConflict() { return iConflicts != null && !iConflicts.isEmpty(); } public void addConflict(Conflict conflict) { if (iConflicts == null) iConflicts = new ArrayList<ClassAssignmentInterface.Conflict>(); iConflicts.add(conflict); } public List<Conflict> getConflicts() { return iConflicts; } public String getEnrollmentMessage() { return iEnrollmentMessage; } public boolean hasEnrollmentMessage() { return iEnrollmentMessage != null && !iEnrollmentMessage.isEmpty(); } public void setEnrollmentMessage(String message) { iEnrollmentMessage = message; } public void addEnrollmentMessage(String message) { if (iEnrollmentMessage == null) iEnrollmentMessage = message; else iEnrollmentMessage += "\n" + message; } public boolean hasCritical() { return iCritical != null; } public boolean isCritical() { return iCritical != null && iCritical.intValue() == 1; } public boolean isImportant() { return iCritical != null && iCritical.intValue() == 2; } public Integer getCritical() { return iCritical; } public void setCritical(Integer critical) { iCritical = critical; } } public static class Conflict implements IsSerializable, Serializable { private static final long serialVersionUID = 1L; private String iName, iType, iDate, iTime, iRoom, iStyle; public Conflict() {} public String getName() { return iName; } public void setName(String name) { iName = name; } public String getType() { return iType; } public void setType(String type) { iType = type; } public String getDate() { return iDate; } public void setDate(String date) { iDate = date; } public String getTime() { return iTime; } public void setTime(String time) { iTime = time; } public String getRoom() { return iRoom; } public void setRoom(String room) { iRoom = room; } public boolean hasStyle() { return iStyle != null && !iStyle.isEmpty(); } public String getStyle() { return iStyle; } public void setStyle(String style) { iStyle = style; } @Override public String toString() { return getName() + " " + getType() + " " + getDate() + " " + getTime() + " " + getRoom(); } } public static class EnrollmentInfo implements IsSerializable, Serializable { private static final long serialVersionUID = 1L; private String iArea, iMajor, iClassification; private String iSubject, iCourseNbr, iConfig, iSubpart, iClazz, iTitle, iConsent; private Long iCourseId, iOfferingId, iSubjectId, iConfigId, iSubpartId, iClazzId; private Integer iLimit, iOther, iProjection, iEnrollment, iWaitlist, iReservation, iAvailable, iUnassigned, iUnassignedPrimary, iSnapshot, iNoSub; private Integer iTotalEnrollment, iTotalWaitlist, iTotalReservation, iTotalUnassigned, iTotalUnassignedPrimary, iTotalNoSub; private Integer iConsentNeeded, iTotalConsentNeeded; private Integer iOverrideNeeded, iTotalOverrideNeeded; private ClassAssignment iAssignment; private int iLevel = 0; private Boolean iControl; private Long iMasterCourseId; private String iMasterSubject, iMasterCourseNbr; private Boolean iNoMatch; public EnrollmentInfo() {} public String getArea() { return iArea; } public void setArea(String area) { iArea = area; } public String getMajor() { return iMajor; } public void setMajor(String major) { iMajor = major; } public String getClassification() { return iClassification; } public void setClassification(String classification) { iClassification = classification; } public String getSubject() { return iSubject; } public void setSubject(String subject) { iSubject = subject; } public String getCourseNbr() { return iCourseNbr; } public void setCourseNbr(String courseNbr) { iCourseNbr = courseNbr; } public String getTitle() { return iTitle; } public void setTitle(String title) { iTitle = title; } public String getConsent() { return iConsent; } public void setConsent(String consent) { iConsent = consent; } public Long getCourseId() { return iCourseId; } public void setCourseId(Long courseId) { iCourseId = courseId; } public Long getOfferingId() { return iOfferingId; } public void setOfferingId(Long offeringId) { iOfferingId = offeringId; } public Long getSubjectId() { return iSubjectId; } public void setSubjectId(Long subjectId) { iSubjectId = subjectId; } public String getConfig() { return iConfig; } public void setConfig(String config) { iConfig = config; } public Long getConfigId() { return iConfigId; } public void setConfigId(Long configId) { iConfigId = configId; } public String getSubpart() { return iSubpart; } public void setSubpart(String subpart) { iSubpart = subpart; } public Long getSubpartId() { return iSubpartId; } public void setSubpartId(Long subpartId) { iSubpartId = subpartId; } public String getClazz() { return iClazz; } public void setClazz(String clazz) { iClazz = clazz; } public Long getClazzId() { return iClazzId; } public void setClazzId(Long clazzId) { iClazzId = clazzId; } public Integer getLimit() { return iLimit; } public void setLimit(Integer limit) { iLimit = limit; } public boolean hasLimit() { return iLimit != null; } public Integer getSnapshot() { return iSnapshot; } public void setSnapshot(Integer snapshot) { iSnapshot = snapshot; } public boolean hasSnapshot() { return iSnapshot != null; } public Integer getOther() { return iOther; } public void setOther(Integer other) { iOther = other; } public boolean hasOther() { return iOther != null; } public Integer getEnrollment() { return iEnrollment; } public void setEnrollment(Integer enrollment) { iEnrollment = enrollment; } public boolean hasEnrollment() { return iEnrollment != null; } public Integer getProjection() { return iProjection ; } public void setProjection(Integer projection) { iProjection = projection; } public boolean hasProjection() { return iProjection != null; } public Integer getWaitlist() { return iWaitlist; } public void setWaitlist(Integer waitlist) { iWaitlist = waitlist; } public boolean hasWaitlist() { return iWaitlist != null; } public Integer getNoSub() { return iNoSub; } public void setNoSub(Integer noSub) { iNoSub = noSub; } public boolean hasNoSub() { return iNoSub != null; } public Integer getUnassigned() { return iUnassigned; } public void setUnassigned(Integer unassigned) { iUnassigned = unassigned; } public boolean hasUnassigned() { return iUnassigned != null; } public Integer getUnassignedPrimary() { return iUnassignedPrimary; } public void setUnassignedPrimary(Integer unassigned) { iUnassignedPrimary = unassigned; } public boolean hasUnassignedPrimary() { return iUnassignedPrimary != null; } public Integer getUnassignedAlternative() { if (iUnassigned == null) return null; return iUnassigned - (iUnassignedPrimary == null ? 0 : iUnassignedPrimary.intValue()); } public Integer getReservation() { return iReservation; } public void setReservation(Integer reservation) { iReservation = reservation; } public boolean hasReservation() { return iReservation !=null; } public Integer getTotalEnrollment() { return iTotalEnrollment; } public void setTotalEnrollment(Integer enrollment) { iTotalEnrollment = enrollment; } public boolean hasTotalEnrollment() { return iTotalEnrollment != null; } public Integer getTotalWaitlist() { return iTotalWaitlist; } public void setTotalWaitlist(Integer waitlist) { iTotalWaitlist = waitlist; } public boolean hasTotalWaitlist() { return iTotalWaitlist != null; } public Integer getTotalNoSub() { return iTotalNoSub; } public void setTotalNoSub(Integer noSub) { iTotalNoSub = noSub; } public boolean hasTotalNoSub() { return iTotalNoSub != null; } public Integer getTotalUnassigned() { return iTotalUnassigned; } public void setTotalUnassigned(Integer unassigned) { iTotalUnassigned = unassigned; } public boolean hasTotalUnassigned() { return iTotalUnassigned != null; } public Integer getTotalUnassignedPrimary() { return iTotalUnassignedPrimary; } public void setTotalUnassignedPrimary(Integer unassigned) { iTotalUnassignedPrimary = unassigned; } public boolean hasTotalUnassignedPrimary() { return iTotalUnassignedPrimary != null; } public Integer getTotalUnassignedAlternative() { if (iTotalUnassigned == null) return null; return iTotalUnassigned - (iTotalUnassignedPrimary == null ? 0 : iTotalUnassignedPrimary.intValue()); } public Integer getTotalReservation() { return iTotalReservation; } public void setTotalReservation(Integer reservation) { iTotalReservation = reservation; } public boolean hasTotalReservation() { return iTotalReservation !=null; } public Integer getAvailable() { return iAvailable; } public void setAvailable(Integer available) { iAvailable = available; } public boolean hasAvailable() { return iAvailable !=null; } public void setAssignment(ClassAssignment assignment) { iAssignment = assignment; } public ClassAssignment getAssignment() { return iAssignment; } public Integer getConsentNeeded() { return iConsentNeeded; } public void setConsentNeeded(Integer consentNeeded) { iConsentNeeded = consentNeeded; } public int hasConsentNeeded() { return iConsentNeeded; } public Integer getTotalConsentNeeded() { return iTotalConsentNeeded; } public void setTotalConsentNeeded(Integer totalConsentNeeded) { iTotalConsentNeeded = totalConsentNeeded; } public int hasTotalConsentNeeded() { return iTotalConsentNeeded; } public Integer getOverrideNeeded() { return iOverrideNeeded; } public void setOverrideNeeded(Integer overrideNeeded) { iOverrideNeeded = overrideNeeded; } public int hasOverrideNeeded() { return iOverrideNeeded; } public Integer getTotalOverrideNeeded() { return iTotalOverrideNeeded; } public void setTotalOverrideNeeded(Integer totalOverrideNeeded) { iTotalOverrideNeeded = totalOverrideNeeded; } public int hasTotalOverrideNeeded() { return iTotalOverrideNeeded; } public int getLevel() { return iLevel; } public void setLevel(int level) { iLevel = level; } public void incLevel() { iLevel ++; } public String getIndent() { return getIndent("&nbsp;&nbsp;"); } public String getIndent(String ind) { String indent = ""; for (int i = 0; i < iLevel; i++) indent += ind; return indent; } public void setControl(Boolean control) { iControl = control; } public Boolean isControl() { return iControl; } public void setNoMatch(Boolean noMatch) { iNoMatch = noMatch; } public Boolean isNoMatch() { return iNoMatch; } public Long getMasterCouresId() { return (iMasterCourseId != null ? iMasterCourseId : iCourseId); } public void setMasterCourseId(Long courseId) { iMasterCourseId = courseId; } public String getMasterSubject() { return (iMasterSubject != null ? iMasterSubject : iSubject); } public void setMasterSubject(String subject) { iMasterSubject = subject; } public String getMasterCourseNbr() { return (iMasterCourseNbr != null ? iMasterCourseNbr : iCourseNbr); } public void setMasterCourseNbr(String courseNbr) { iMasterCourseNbr = courseNbr; } } public static class StudentInfo implements IsSerializable, Serializable { private static final long serialVersionUID = 1L; private Student iStudent; private Integer iEnrollment, iWaitlist, iReservation, iRequested, iUnassigned, iNoSub; private Integer iTotalEnrollment, iTotalWaitlist, iTotalReservation, iTotalUnassigned, iTotalNoSub; private Integer iConsentNeeded, iTotalConsentNeeded; private Integer iTopWaitingPriority; private Date iRequestedDate = null, iEnrolledDate = null, iApprovedDate = null, iEmailDate = null, iWaitListedDate = null; private String iStatus, iNote; private Float iCredit, iTotalCredit; private Map<String, Float> iIMCredit, iIMTotalCredit; private Integer iNrDistanceConflicts, iLongestDistanceMinutes, iOverlappingMinutes; private Integer iTotalNrDistanceConflicts, iTotalLongestDistanceMinutes, iTotalOverlappingMinutes; private Integer iFreeTimeOverlappingMins, iTotalFreeTimeOverlappingMins; private Integer iPrefInstrMethConflict, iTotalPrefInstrMethConflict; private Integer iPrefSectionConflict, iTotalPrefSectionConflict; private float[] iRequestCredit = null, iRequestTotalCredit = null; private Integer iOverrideNeeded, iTotalOverrideNeeded; private Boolean iMyStudent; private AdvisedInfoInterface iAdvised; public StudentInfo() {} public Student getStudent() { return iStudent; } public void setStudent(Student student) { iStudent = student; } public Integer getRequested() { return iRequested; } public void setRequested(Integer requested) { iRequested = requested; } public boolean hasRequested() { return iRequested != null; } public Integer getEnrollment() { return iEnrollment; } public void setEnrollment(Integer enrollment) { iEnrollment = enrollment; } public boolean hasEnrollment() { return iEnrollment != null; } public Integer getWaitlist() { return iWaitlist; } public void setWaitlist(Integer waitlist) { iWaitlist = waitlist; } public boolean hasWaitlist() { return iWaitlist != null; } public Integer getNoSub() { return iNoSub; } public void setNoSub(Integer noSub) { iNoSub = noSub; } public boolean hasNoSub() { return iNoSub != null; } public Integer getUnassigned() { return iUnassigned; } public void setUnassigned(Integer unassigned) { iUnassigned = unassigned; } public boolean hasUnassigned() { return iUnassigned != null; } public Integer getReservation() { return iReservation; } public void setReservation(Integer reservation) { iReservation = reservation; } public boolean hasReservation() { return iReservation !=null; } public Integer getTotalEnrollment() { return iTotalEnrollment; } public void setTotalEnrollment(Integer enrollment) { iTotalEnrollment = enrollment; } public boolean hasTotalEnrollment() { return iTotalEnrollment != null; } public Integer getTotalWaitlist() { return iTotalWaitlist; } public void setTotalWaitlist(Integer waitlist) { iTotalWaitlist = waitlist; } public boolean hasTotalWaitlist() { return iTotalWaitlist != null; } public Integer getTotalNoSub() { return iTotalNoSub; } public void setTotalNoSub(Integer noSub) { iTotalNoSub = noSub; } public boolean hasTotalNoSub() { return iTotalNoSub != null; } public Integer getTotalUnassigned() { return iTotalUnassigned; } public void setTotalUnassigned(Integer unassigned) { iTotalUnassigned = unassigned; } public boolean hasTotalUnassigned() { return iTotalUnassigned != null; } public Integer getTotalReservation() { return iTotalReservation; } public void setTotalReservation(Integer reservation) { iTotalReservation = reservation; } public boolean hasTotalReservation() { return iTotalReservation !=null; } public Integer getConsentNeeded() { return iConsentNeeded; } public void setConsentNeeded(Integer consentNeeded) { iConsentNeeded = consentNeeded; } public int hasConsentNeeded() { return iConsentNeeded; } public Integer getTotalConsentNeeded() { return iTotalConsentNeeded; } public void setTotalConsentNeeded(Integer totalConsentNeeded) { iTotalConsentNeeded = totalConsentNeeded; } public int hasTotalConsentNeeded() { return iTotalConsentNeeded; } public Integer getOverrideNeeded() { return iOverrideNeeded; } public void setOverrideNeeded(Integer overrideNeeded) { iOverrideNeeded = overrideNeeded; } public int hasOverrideNeeded() { return iOverrideNeeded; } public Integer getTotalOverrideNeeded() { return iTotalOverrideNeeded; } public void setTotalOverrideNeeded(Integer totalOverrideNeeded) { iTotalOverrideNeeded = totalOverrideNeeded; } public int hasTotalOverrideNeeded() { return iTotalOverrideNeeded; } public Integer getTopWaitingPriority() { return iTopWaitingPriority; } public void setTopWaitingPriority(Integer topWaitingPriority) { iTopWaitingPriority = topWaitingPriority; } public int hasTopWaitingPriority() { return iTopWaitingPriority; } public Date getRequestedDate() { return iRequestedDate; } public void setRequestedDate(Date ts) { iRequestedDate = ts; } public Date getWaitListedDate() { return iWaitListedDate; } public void setWaitListedDate(Date ts) { iWaitListedDate = ts; } public Date getEnrolledDate() { return iEnrolledDate; } public void setEnrolledDate(Date ts) { iEnrolledDate = ts; } public Date getApprovedDate() { return iApprovedDate; } public void setApprovedDate(Date ts) { iApprovedDate = ts; } public Date getEmailDate() { return iEmailDate; } public void setEmailDate(Date ts) { iEmailDate = ts; } public String getStatus() { return iStatus; } public void setStatus(String status) { iStatus = status; } public void setStatus(StudentStatusInfo status) { if (status == null) { iStatus = ""; iStudent.setCanRegister(true); iStudent.setCanUseAssistant(true); } else { iStatus = status.getReference(); iStudent.setCanRegister(status.isCanRegister()); iStudent.setCanUseAssistant(status.isCanUseAssistant()); } } public String getNote() { return iNote; } public boolean hasNote() { return iNote != null && !iNote.isEmpty(); } public void setNote(String note) { iNote = note; } public boolean hasCredit() { return iCredit != null && iCredit > 0; } public void setCredit(Float credit) { iCredit = credit; } public Float getCredit() { return iCredit; } public boolean hasTotalCredit() { return iTotalCredit != null && iTotalCredit > 0; } public void setTotalCredit(Float totalCredit) { iTotalCredit = totalCredit; } public Float getTotalCredit() { return iTotalCredit; } public boolean hasIMCredit() { return iIMCredit != null && !iIMCredit.isEmpty(); } public Map<String, Float> getIMCredit() { return iIMCredit; } public void setIMCredit(String im, Float credit) { if (iIMCredit == null) iIMCredit = new HashMap<String, Float>(); if (credit == null || credit.floatValue() == 0f) { iIMCredit.remove(im); } else { iIMCredit.put(im, credit); } } public void addIMCredit(String im, float credit) { if (credit <= 0f) return; if (iIMCredit == null) iIMCredit = new HashMap<String, Float>(); Float prev = iIMCredit.get(im); iIMCredit.put(im, credit + (prev == null ? 0f: prev.floatValue())); } public float getIMCredit(String im) { if (iIMCredit == null) return 0f; Float cred = iIMCredit.get(im); return (cred == null ? 0f : cred.floatValue()); } public Set<String> getCreditIMs() { return (iIMCredit == null ? new TreeSet<String>() : new TreeSet<String>(iIMCredit.keySet())); } public boolean hasIMTotalCredit() { return iIMTotalCredit != null && !iIMTotalCredit.isEmpty(); } public Map<String, Float> getIMTotalCredit() { return iIMTotalCredit; } public void setIMTotalCredit(String im, Float credit) { if (iIMTotalCredit == null) iIMTotalCredit = new HashMap<String, Float>(); if (credit == null || credit.floatValue() == 0f) { iIMTotalCredit.remove(im); } else { iIMTotalCredit.put(im, credit); } } public void addIMTotalCredit(String im, float credit) { if (credit <= 0f) return; if (iIMTotalCredit == null) iIMTotalCredit = new HashMap<String, Float>(); Float prev = iIMTotalCredit.get(im); iIMTotalCredit.put(im, credit + (prev == null ? 0f: prev.floatValue())); } public float getIMTotalCredit(String im) { if (iIMTotalCredit == null) return 0f; Float cred = iIMTotalCredit.get(im); return (cred == null ? 0f : cred.floatValue()); } public Set<String> getTotalCreditIMs() { return (iIMTotalCredit == null ? new TreeSet<String>() : new TreeSet<String>(iIMTotalCredit.keySet())); } public boolean hasRequestCredit() { return iRequestCredit != null && iRequestCredit[1] > 0f; } public void setRequestCredit(float min, float max) { iRequestCredit = new float[] { min, max }; } public float getRequestCreditMin() { return iRequestCredit == null ? 0f : iRequestCredit[0]; } public float getRequestCreditMax() { return iRequestCredit == null ? 0f : iRequestCredit[1]; } public boolean hasTotalRequestCredit() { return iRequestTotalCredit != null && iRequestTotalCredit[1] > 0f; } public void setTotalRequestCredit(float min, float max) { iRequestTotalCredit = new float[] { min, max }; } public float getTotalRequestCreditMin() { return iRequestTotalCredit == null ? 0f : iRequestTotalCredit[0]; } public float getTotalRequestCreditMax() { return iRequestTotalCredit == null ? 0f : iRequestTotalCredit[1]; } public boolean hasDistanceConflicts() { return iNrDistanceConflicts != null && iNrDistanceConflicts > 0; } public void setNrDistanceConflicts(Integer nrDistanceConflicts) { iNrDistanceConflicts = nrDistanceConflicts; } public Integer getNrDistanceConflicts() { return iNrDistanceConflicts; } public void setLongestDistanceMinutes(Integer longestDistance) { iLongestDistanceMinutes = longestDistance; } public Integer getLongestDistanceMinutes() { return iLongestDistanceMinutes; } public boolean hasOverlappingMinutes() { return iOverlappingMinutes != null && iOverlappingMinutes > 0; } public void setOverlappingMinutes(Integer overlapMins) { iOverlappingMinutes = overlapMins; } public Integer getOverlappingMinutes() { return iOverlappingMinutes; } public boolean hasTotalDistanceConflicts() { return iTotalNrDistanceConflicts != null && iTotalNrDistanceConflicts > 0; } public void setTotalNrDistanceConflicts(Integer nrDistanceConflicts) { iTotalNrDistanceConflicts = nrDistanceConflicts; } public Integer getTotalNrDistanceConflicts() { return iTotalNrDistanceConflicts; } public void setTotalLongestDistanceMinutes(Integer longestDistance) { iTotalLongestDistanceMinutes = longestDistance; } public Integer getTotalLongestDistanceMinutes() { return iTotalLongestDistanceMinutes; } public boolean hasTotalOverlappingMinutes() { return iTotalOverlappingMinutes != null && iTotalOverlappingMinutes > 0; } public void setTotalOverlappingMinutes(Integer overlapMins) { iTotalOverlappingMinutes = overlapMins; } public Integer getTotalOverlappingMinutes() { return iTotalOverlappingMinutes; } public boolean hasFreeTimeOverlappingMins() { return iFreeTimeOverlappingMins != null && iFreeTimeOverlappingMins > 0; } public void setFreeTimeOverlappingMins(Integer overlapMins) { iFreeTimeOverlappingMins = overlapMins; } public Integer getFreeTimeOverlappingMins() { return iFreeTimeOverlappingMins; } public boolean hasTotalFreeTimeOverlappingMins() { return iTotalFreeTimeOverlappingMins != null && iTotalFreeTimeOverlappingMins > 0; } public void setTotalFreeTimeOverlappingMins(Integer overlapMins) { iTotalFreeTimeOverlappingMins = overlapMins; } public Integer getTotalFreeTimeOverlappingMins() { return iTotalFreeTimeOverlappingMins; } public boolean hasPrefInstrMethConflict() { return iPrefInstrMethConflict != null && iPrefInstrMethConflict > 0; } public void setPrefInstrMethConflict(Integer conf) { iPrefInstrMethConflict = conf; } public Integer getPrefInstrMethConflict() { return iPrefInstrMethConflict; } public boolean hasTotalPrefInstrMethConflict() { return iTotalPrefInstrMethConflict != null && iTotalPrefInstrMethConflict > 0; } public void setTotalPrefInstrMethConflict(Integer conf) { iTotalPrefInstrMethConflict = conf; } public Integer getTotalPrefInstrMethConflict() { return iTotalPrefInstrMethConflict; } public boolean hasPrefSectionConflict() { return iPrefSectionConflict != null && iPrefSectionConflict > 0; } public void setPrefSectionConflict(Integer conf) { iPrefSectionConflict = conf; } public Integer getPrefSectionConflict() { return iPrefSectionConflict; } public boolean hasTotalPrefSectionConflict() { return iTotalPrefSectionConflict != null && iTotalPrefSectionConflict > 0; } public void setTotalPrefSectionConflict(Integer conf) { iTotalPrefSectionConflict = conf; } public Integer getTotalPrefSectionConflict() { return iTotalPrefSectionConflict; } public boolean isMyStudent() { return iMyStudent != null && iMyStudent.booleanValue(); } public Boolean getMyStudent() { return iMyStudent; } public void setMyStudent(Boolean myStudent) { iMyStudent = myStudent; } public boolean isAdvised() { return iAdvised != null; } public AdvisedInfoInterface getAdvisedInfo() { return iAdvised; } public void setAdvisedInfo(AdvisedInfoInterface advised) { iAdvised = advised; } } public static class SectioningAction implements IsSerializable, Serializable, Comparable<SectioningAction> { private static final long serialVersionUID = 1L; private Long iLogId; private Student iStudent; private Date iTimeStamp; private String iOperation; private String iUser; private String iMessage; private String iResult; private Long iCpuTime; private Long iWallTime; public SectioningAction() { } public Long getLogId() { return iLogId; } public void setLogId(Long id) { iLogId = id; } public Student getStudent() { return iStudent; } public void setStudent(Student student) { iStudent = student; } public Date getTimeStamp() { return iTimeStamp; } public void setTimeStamp(Date timeStamp) { iTimeStamp = timeStamp; } public String getOperation() { return iOperation; } public void setOperation(String operation) { iOperation = operation; } public String getUser() { return iUser; } public void setUser(String user) { iUser = user; } public String getMessage() { return iMessage; } public void setMessage(String message) { iMessage = message; } public String getResult() { return iResult; } public void setResult(String result) { iResult = result; } public Long getCpuTime() { return iCpuTime; } public void setCpuTime(Long cpuTime) { iCpuTime = cpuTime; } public Long getWallTime() { return iWallTime; } public void setWallTime(Long wallTime) { iWallTime = wallTime; } @Override public int compareTo(SectioningAction a) { return a.getTimeStamp().compareTo(getTimeStamp()); } } public static class IdValue implements IsSerializable, Serializable, Comparable<IdValue> { private static final long serialVersionUID = 1L; private Long iId; private String iValue; public IdValue() {} public IdValue(Long id, String value) { iId = id; iValue = value; } public Long getId() { return iId; } public String getValue() { return iValue; } @Override public int compareTo(IdValue other) { return getValue().compareTo(other.getValue()); } @Override public String toString() { return getValue(); } @Override public int hashCode() { return getId().hashCode(); } @Override public boolean equals(Object o) { if (o == null || !(o instanceof IdValue)) return false; return getId().equals(((IdValue)o).getId()); } } public static class ErrorMessage implements IsSerializable, Serializable, Comparable<ErrorMessage> { private static final long serialVersionUID = 1L; private String iCourse; private String iSection; private String iCode; private String iMessage; public static enum UniTimeCode { UT_LOCKED, UT_DISABLED, UT_STRUCTURE("LINK"), UT_TIME_CNF("TIME"), UT_NOT_AVAILABLE("CLOS"), UT_CANCEL, UT_DEADLINE, UT_GRADE_MODE, ; private String iCode; UniTimeCode() {} UniTimeCode(String code) { iCode = code; } String code() { return (iCode == null ? name() : iCode); } } public ErrorMessage() {} public ErrorMessage(String course, String section, String code, String message) { iCourse = course; iSection = section; iCode = code; iMessage = message; } public ErrorMessage(String course, String section, UniTimeCode code, String message) { iCourse = course; iSection = section; iCode = code.code(); iMessage = message; } public void setCourse(String course) { iCourse = course; } public String getCourse() { return iCourse; } public void setSection(String section) { iSection = section; } public String getSection() { return iSection; } public void setCode(String code) { iCode = code; } public String getCode() { return iCode; } public void setMessage(String message) { iMessage = message; } public String getMessage() { return iMessage; } @Override public int compareTo(ErrorMessage other) { return NaturalOrderComparator.compare(toString(), other.toString()); } @Override public String toString() { return getCourse() + (getSection() == null ? "" : " " + getSection()) + ": " + getMessage(); } @Override public int hashCode() { return toString().hashCode(); } @Override public boolean equals(Object o) { if (o == null || !(o instanceof ErrorMessage)) return false; return toString().equals(o.toString()); } } public static class Note implements IsSerializable, Serializable, Comparable<Note> { private static final long serialVersionUID = 1L; private Long iId; private Date iTimeStamp; private String iMessage; private String iOwner; public Note() {} public Long getId() { return iId; } public void setId(Long id) { iId = id; } public Date getTimeStamp() { return iTimeStamp; } public void setTimeStamp(Date date) { iTimeStamp = date; } public String getMessage() { return iMessage; } public void setMessage(String message) { iMessage = message; } public String getOwner() { return iOwner; } public void setOwner(String owner) { iOwner = owner; } @Override public int hashCode() { return getId().hashCode(); } @Override public boolean equals(Object o) { if (o == null || !(o instanceof Note)) return false; return getId().equals(((Note)o).getId()); } @Override public int compareTo(Note other) { int cmp = -getTimeStamp().compareTo(other.getTimeStamp()); if (cmp != 0) return cmp; return getId().compareTo(other.getId()); } } public static class AdvisedInfoInterface implements IsSerializable, Serializable { private static final long serialVersionUID = 1L; private Float iMinCredit, iMaxCredit; private Float iPercentage; private String iMessage, iNotAssignedMessage; private Integer iMissingCritical, iMissingPrimary; private Integer iNotAssignedCritical, iNotAssignedPrimary; public AdvisedInfoInterface() {} public boolean hasMinCredit() { return iMinCredit != null; } public Float getMinCredit() { return iMinCredit; } public void setMinCredit(Float cred) { iMinCredit = cred; } public boolean hasMaxCredit() { return iMaxCredit != null; } public Float getMaxCredit() { return iMaxCredit; } public void setMaxCredit(Float cred) { iMaxCredit = cred; } public boolean hasPercentage() { return iPercentage != null; } public Float getPercentage() { return iPercentage; } public void setPercentage(Float p) { iPercentage = p; } public boolean hasMissingCritical() { return iMissingCritical != null; } public Integer getMissingCritical() { return iMissingCritical; } public void setMissingCritical(Integer missing) { iMissingCritical = missing; } public boolean hasMissingPrimary() { return iMissingPrimary != null; } public Integer getMissingPrimary() { return iMissingPrimary; } public void setMissingPrimary(Integer missing) { iMissingPrimary = missing; } public boolean hasNotAssignedCritical() { return iNotAssignedCritical != null; } public Integer getNotAssignedCritical() { return iNotAssignedCritical; } public void setNotAssignedCritical(Integer notAssigned) { iNotAssignedCritical = notAssigned; } public boolean hasNotAssignedPrimary() { return iNotAssignedPrimary != null; } public Integer getNotAssignedPrimary() { return iNotAssignedPrimary; } public void setNotAssignedPrimary(Integer notAssigned) { iNotAssignedPrimary = notAssigned; } public String getMessage() { return iMessage; } public boolean hasMessage() { return iMessage != null && !iMessage.isEmpty(); } public void setMessage(String message) { iMessage = message; } public void addMessage(String message) { iMessage = (iMessage == null ? "" : iMessage + "\n") + message; } public String getNotAssignedMessage() { return iNotAssignedMessage; } public boolean hasNotAssignedMessage() { return iNotAssignedMessage != null && !iNotAssignedMessage.isEmpty(); } public void setNotAssignedMessage(String message) { iNotAssignedMessage = message; } public void addNotAssignedMessage(String message) { iNotAssignedMessage = (iNotAssignedMessage == null ? "" : iNotAssignedMessage + "\n") + message; } } public boolean hasCurrentCredit() { return iCurrentCredit != null && iCurrentCredit > 0f; } public void setCurrentCredit(Float curCredit) { iCurrentCredit = curCredit; } public Float getCurrentCredit() { return iCurrentCredit; } }
924090c730cb8e7771eb1e8dde8376c3847373f6
310
java
Java
Spring_Data_Course/mvc_project_lab/src/main/java/com/example/mvc_project_lab/repository/CompanyRepository.java
lmarinov/MySQL_StudyMaterialsAndExercise
999c5b215660f43f195bd79555acdfd48322f026
[ "MIT" ]
null
null
null
Spring_Data_Course/mvc_project_lab/src/main/java/com/example/mvc_project_lab/repository/CompanyRepository.java
lmarinov/MySQL_StudyMaterialsAndExercise
999c5b215660f43f195bd79555acdfd48322f026
[ "MIT" ]
null
null
null
Spring_Data_Course/mvc_project_lab/src/main/java/com/example/mvc_project_lab/repository/CompanyRepository.java
lmarinov/MySQL_StudyMaterialsAndExercise
999c5b215660f43f195bd79555acdfd48322f026
[ "MIT" ]
null
null
null
25.833333
73
0.816129
1,001,566
package com.example.mvc_project_lab.repository; import com.example.mvc_project_lab.entity.Company; import org.springframework.data.jpa.repository.JpaRepository; public interface CompanyRepository extends JpaRepository<Company, Long> { Company findFirstByName(String name); boolean existsAllBy(); }
924090f51e762c2c2b352f9f56ed64a191185cbd
769
java
Java
core/src/main/java/com/flowci/core/job/domain/RerunJob.java
jerry-yuan/flow-platform-x
234f336db9b5907109c1cd719aa9922228d28491
[ "Apache-2.0" ]
1
2020-07-18T15:24:38.000Z
2020-07-18T15:24:38.000Z
core/src/main/java/com/flowci/core/job/domain/RerunJob.java
jerry-yuan/flow-platform-x
234f336db9b5907109c1cd719aa9922228d28491
[ "Apache-2.0" ]
null
null
null
core/src/main/java/com/flowci/core/job/domain/RerunJob.java
jerry-yuan/flow-platform-x
234f336db9b5907109c1cd719aa9922228d28491
[ "Apache-2.0" ]
null
null
null
26.517241
75
0.739922
1,001,567
/* * Copyright 2020 flow.ci * * 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.flowci.core.job.domain; import lombok.Data; import javax.validation.constraints.NotEmpty; @Data public class RerunJob { @NotEmpty private String jobId; }
92409131a51538ea6eb90fb09655fe3766d4b909
2,002
java
Java
testamation-jdk7-core/src/main/java/nz/co/testamation/core/reader/pdf/BrowserCookieHttpContextProvider.java
rlon008/testamation-jdk7
38e6dde9031cb8509b1f0aac96a9f4b83bb80f37
[ "Apache-2.0" ]
null
null
null
testamation-jdk7-core/src/main/java/nz/co/testamation/core/reader/pdf/BrowserCookieHttpContextProvider.java
rlon008/testamation-jdk7
38e6dde9031cb8509b1f0aac96a9f4b83bb80f37
[ "Apache-2.0" ]
null
null
null
testamation-jdk7-core/src/main/java/nz/co/testamation/core/reader/pdf/BrowserCookieHttpContextProvider.java
rlon008/testamation-jdk7
38e6dde9031cb8509b1f0aac96a9f4b83bb80f37
[ "Apache-2.0" ]
null
null
null
37.773585
106
0.735265
1,001,568
/* * Copyright 2016 Ratha Long * * 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 nz.co.testamation.core.reader.pdf; import nz.co.testamation.core.client.BrowserDriver; import org.apache.http.client.protocol.HttpClientContext; import org.apache.http.impl.client.BasicCookieStore; import org.apache.http.impl.cookie.BasicClientCookie; import org.apache.http.protocol.BasicHttpContext; import org.apache.http.protocol.HttpContext; import org.openqa.selenium.Cookie; import java.util.Set; public class BrowserCookieHttpContextProvider implements HttpContextProvider { private final BrowserDriver browserDriver; public BrowserCookieHttpContextProvider( BrowserDriver browserDriver ) { this.browserDriver = browserDriver; } @Override public HttpContext get() { BasicHttpContext localContext = new BasicHttpContext(); Set<Cookie> cookies = browserDriver.getAllCookies(); BasicCookieStore cookieStore = new BasicCookieStore(); for ( Cookie cookie : cookies ) { BasicClientCookie clientCookie = new BasicClientCookie( cookie.getName(), cookie.getValue() ); clientCookie.setDomain( cookie.getDomain() ); clientCookie.setPath( cookie.getPath() ); clientCookie.setExpiryDate( cookie.getExpiry() ); cookieStore.addCookie( clientCookie ); } localContext.setAttribute( HttpClientContext.COOKIE_STORE, cookieStore ); return localContext; } }
92409144b3c7361c597c5468d35e14afababdf60
3,003
java
Java
dependencies/carbon-p2-plugin/src/main/java/org/wso2/maven/p2/PublishProductMojo.java
knadikari/developer-studio
ed8b9e397bcf79e538c0f63397b3a8d8d7827660
[ "Apache-2.0" ]
null
null
null
dependencies/carbon-p2-plugin/src/main/java/org/wso2/maven/p2/PublishProductMojo.java
knadikari/developer-studio
ed8b9e397bcf79e538c0f63397b3a8d8d7827660
[ "Apache-2.0" ]
null
null
null
dependencies/carbon-p2-plugin/src/main/java/org/wso2/maven/p2/PublishProductMojo.java
knadikari/developer-studio
ed8b9e397bcf79e538c0f63397b3a8d8d7827660
[ "Apache-2.0" ]
1
2018-10-26T12:52:03.000Z
2018-10-26T12:52:03.000Z
27.3
100
0.686314
1,001,569
package org.wso2.maven.p2; import org.apache.maven.plugin.AbstractMojo; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.project.MavenProject; import org.codehaus.plexus.archiver.ArchiverException; import org.codehaus.plexus.archiver.UnArchiver; import org.eclipse.tycho.model.ProductConfiguration; import org.eclipse.tycho.p2.facade.internal.P2ApplicationLauncher; import java.io.File; import java.net.URL; /** * @goal publish-product */ public class PublishProductMojo extends AbstractMojo { /** * @parameter expression="${project}" * @required */ protected MavenProject project; /** * Metadata repository name * @parameter */ private URL metadataRepository; /** * Artifact repository name * @parameter */ private URL artifactRepository; /** * executable * @parameter */ private String executable; /** * @component role="org.codehaus.plexus.archiver.UnArchiver" role-hint="zip" */ private UnArchiver deflater; /** * The product configuration, a .product file. This file manages all aspects * of a product definition from its constituent plug-ins to configuration * files to branding. * * @parameter expression="${productConfiguration}" */ private File productConfigurationFile; /** * Parsed product configuration file */ private ProductConfiguration productConfiguration; /** @component */ private P2ApplicationLauncher launcher; /** * Kill the forked test process after a certain number of seconds. If set to 0, wait forever for * the process, never timing out. * * @parameter expression="${p2.timeout}" */ private int forkedProcessTimeoutInSeconds; public void execute() throws MojoExecutionException, MojoFailureException { try { publishProduct(); }catch (Exception e) { throw new MojoExecutionException("Cannot generate P2 metadata", e); } } private void publishProduct() throws Exception{ productConfiguration = ProductConfiguration.read( productConfigurationFile ); P2ApplicationLauncher launcher = this.launcher; launcher.setWorkingDirectory(project.getBasedir()); launcher.setApplicationName("org.eclipse.equinox.p2.publisher.ProductPublisher"); launcher.addArguments( "-metadataRepository", metadataRepository.toString(), "-artifactRepository", metadataRepository.toString(), "-productFile", productConfigurationFile.getCanonicalPath(), "-executables", executable.toString(), "-publishArtifacts", "-configs", "gtk.linux.x86", "-flavor", "tooling", "-append"); int result = launcher.execute(forkedProcessTimeoutInSeconds); if (result != 0) { throw new MojoFailureException("P2 publisher return code was " + result); } } }
9240916430328ca56547265a1b1a1693531ed3c6
6,856
java
Java
mah-core/src/main/java/mah/ui/pane/item/ItemMode.java
zgqq/mah
7d2f249d36ec1184036c8131dc3be9629308906b
[ "MIT" ]
86
2017-01-19T14:01:55.000Z
2021-11-12T11:49:00.000Z
mah-core/src/main/java/mah/ui/pane/item/ItemMode.java
zgqq/mah
7d2f249d36ec1184036c8131dc3be9629308906b
[ "MIT" ]
5
2017-01-23T08:56:40.000Z
2019-12-23T16:40:12.000Z
mah-core/src/main/java/mah/ui/pane/item/ItemMode.java
zgqq/mah
7d2f249d36ec1184036c8131dc3be9629308906b
[ "MIT" ]
7
2017-01-23T13:36:38.000Z
2019-04-11T01:17:05.000Z
31.449541
116
0.617999
1,001,570
/** * MIT License * * Copyright (c) 2017 zgqq * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package mah.ui.pane.item; import mah.action.AbstractAction; import mah.action.ActionEvent; import mah.mode.AbstractMode; import mah.mode.Mode; import mah.mode.ModeManager; import mah.ui.UiManager; import mah.ui.input.InputMode; import mah.ui.pane.Text; import mah.ui.util.ClipboardUtils; import mah.ui.window.WindowManager; /** * Created by zgq on 2017-01-11 15:11 */ public class ItemMode extends AbstractMode { public static final String NAME = "item_mode"; private static final String PREVIOUS_ITEM = "PreviousItem"; private static final String NEXT_ITEM = "NextItem"; private static final String DEFAULT_SELECT_ITEM = "DefaultSelectItem"; private static final String SELECT_ITEM = "SelectItem"; private DefaultSelectItem defaultSelectItem; public ItemMode(Mode parent) { super(NAME, parent); } @Override public void init() { registerAction(new PreviousItem(PREVIOUS_ITEM)); registerAction(new NextItem(NEXT_ITEM)); this.defaultSelectItem = new DefaultSelectItem(DEFAULT_SELECT_ITEM); registerAction(this.defaultSelectItem); for (int i = 1; i < 10; i++) { String name = SELECT_ITEM + i; registerAction(new SelectItem(name, i - 1)); } registerAction(new CopyContent("CopyContent")); registerAction(new CopyDescription("CopyDescription")); } public DefaultSelectItem getDefaultSelectItem() { return defaultSelectItem; } public static synchronized ItemMode triggerMode() { ItemMode itemMode = getMode(); ModeManager.getInstance().triggerMode(itemMode); return itemMode; } public static synchronized ItemMode getMode() { return (ItemMode) ModeManager.getInstance().getOrRegisterMode(new ItemMode(InputMode.getAndRegisterMode())); } abstract static class ItemAction extends AbstractAction { public ItemAction(String name) { super(name, ItemList.class); } @Override public void actionPerformed(ActionEvent actionEvent) { actionPerformed((ItemList) actionEvent.getSource()); } protected void actionPerformed(ItemList itemList) { } } static class SelectItem extends ItemAction { private int selectIndex; public SelectItem(String name, int selectIndex) { super(name); this.selectIndex = selectIndex; } @Override public void actionPerformed(ItemList itemList) { itemList.selectItem(selectIndex); } } public static class DefaultSelectItem extends ItemAction { public DefaultSelectItem(String name) { super(name); } @Override public void actionPerformed(ItemList itemList) { if (itemList.hasPendingItem()) { itemList.selectItem(itemList.getPendingItemIndex()); } } } static class PreviousItem extends ItemAction { public PreviousItem(String name) { super(name); } @Override public void actionPerformed(ItemList itemList) { if (itemList.hasPendingItem()) { int pendingItemIndex = itemList.getPendingItemIndex(); if (pendingItemIndex <= 0) { return; } UiManager.getInstance().runLater(() -> { itemList.unpendingItemIndex(pendingItemIndex); itemList.setPendingItemIndex(pendingItemIndex - 1); }); } } } static class NextItem extends ItemAction { public NextItem(String name) { super(name); } @Override public void actionPerformed(ItemList itemList) { if (itemList.hasPendingItem()) { int pendingItemIndex = itemList.getPendingItemIndex(); if (pendingItemIndex >= itemList.getItemCount() - 1) { return; } UiManager.getInstance().runLater(() -> { itemList.unpendingItemIndex(pendingItemIndex); itemList.setPendingItemIndex(pendingItemIndex + 1); }); } } } abstract static class CopyAction extends ItemAction { public CopyAction(String name) { super(name); } } static class CopyContent extends CopyAction { public CopyContent(String name) { super(name); } public void actionPerformed(ItemList layout) { Item item = layout.getPendingItem(); if (item == null) { int itemCount = layout.getItemCount(); if (itemCount <= 0) { return; } item = layout.getItem(0); } Text content; if (item instanceof FullItem) { FullItem fullItem = (FullItem) item; content = fullItem.getContent(); } else { TextItem textItem = (TextItem) item; content = textItem.getText(); } ClipboardUtils.copy(content.getText()); WindowManager.hideWindow(); } } static class CopyDescription extends CopyAction { public CopyDescription(String name) { super(name); } public void actionPerformed(ItemList layout) { FullItem item = layout.getPendingItem(); Text explains = item.getDescription(); ClipboardUtils.copy(explains.getText()); WindowManager.hideWindow(); } } }
92409252b1dcffbd237d6ca52e072cc90e56e9e0
15,724
java
Java
uimaj-core/src/test/java/org/apache/uima/cas/test/SerializationNoMDTest.java
matthkoch/uima-uimaj
6fa03e80753213ea072c257dd3baa37007412fe5
[ "Apache-2.0" ]
41
2015-04-05T21:51:49.000Z
2021-11-06T22:04:26.000Z
uimaj-core/src/test/java/org/apache/uima/cas/test/SerializationNoMDTest.java
matthkoch/uima-uimaj
6fa03e80753213ea072c257dd3baa37007412fe5
[ "Apache-2.0" ]
42
2018-03-28T21:15:49.000Z
2022-01-21T15:11:00.000Z
uimaj-core/src/test/java/org/apache/uima/cas/test/SerializationNoMDTest.java
matthkoch/uima-uimaj
6fa03e80753213ea072c257dd3baa37007412fe5
[ "Apache-2.0" ]
46
2015-06-03T22:50:04.000Z
2021-11-26T14:29:19.000Z
34.257081
99
0.666052
1,001,571
/* * 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 org.apache.uima.cas.test; import static org.junit.Assert.assertTrue; import java.io.BufferedReader; import java.io.File; import java.io.IOException; import java.io.StringReader; import java.nio.file.Files; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.apache.uima.cas.CAS; import org.apache.uima.cas.CASException; import org.apache.uima.cas.FSIndex; import org.apache.uima.cas.FSIndexRepository; import org.apache.uima.cas.FSIterator; import org.apache.uima.cas.Feature; import org.apache.uima.cas.FeatureStructure; import org.apache.uima.cas.Type; import org.apache.uima.cas.TypeSystem; import org.apache.uima.cas.admin.CASFactory; import org.apache.uima.cas.admin.CASMgr; import org.apache.uima.cas.admin.TypeSystemMgr; import org.apache.uima.cas.impl.CASImpl; import org.apache.uima.cas.impl.CASSerializer; import org.apache.uima.cas.impl.Serialization; import org.apache.uima.cas.text.AnnotationFS; import org.apache.uima.internal.util.TextStringTokenizer; import org.apache.uima.resource.ResourceInitializationException; import org.apache.uima.resource.metadata.TypeSystemDescription; import org.apache.uima.test.junit_extension.JUnitExtension; import org.apache.uima.util.CasCreationUtils; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; /** * Class comment for TokenizerTest.java goes here. * */ public class SerializationNoMDTest { public static final String TOKEN_TYPE = "Token"; public static final String TOKEN_TYPE_FEAT = "type"; public static final String TOKEN_TYPE_FEAT_Q = TOKEN_TYPE + TypeSystem.FEATURE_SEPARATOR + TOKEN_TYPE_FEAT; public static final String TOKEN_TYPE_TYPE = "TokenType"; public static final String WORD_TYPE = "Word"; public static final String SEP_TYPE = "Separator"; public static final String EOS_TYPE = "EndOfSentence"; public static final String SENT_TYPE = "Sentence"; private CASMgr casMgr; private CAS cas; private Type wordType; private Type separatorType; private Type eosType; private Type tokenType; private Feature tokenTypeFeature; private Type sentenceType; private Feature startFeature; private Feature endFeature; @BeforeEach public void setUp() throws Exception { casMgr = initCAS(); cas = (CASImpl) casMgr; TypeSystem ts = cas.getTypeSystem(); wordType = ts.getType(WORD_TYPE); // assert(wordType != null); separatorType = ts.getType(SEP_TYPE); eosType = ts.getType(EOS_TYPE); tokenType = ts.getType(TOKEN_TYPE); tokenTypeFeature = ts.getFeatureByFullName(TOKEN_TYPE_FEAT_Q); startFeature = ts.getFeatureByFullName(CAS.FEATURE_FULL_NAME_BEGIN); endFeature = ts.getFeatureByFullName(CAS.FEATURE_FULL_NAME_END); sentenceType = ts.getType(SENT_TYPE); } @AfterEach public void tearDown() { casMgr = null; cas = null; wordType = null; separatorType = null; eosType = null; tokenType = null; tokenTypeFeature = null; startFeature = null; endFeature = null; sentenceType = null; } // Initialize the first CAS. private static CASMgr initCAS() { // Create an initial CASMgr from the factory. // CASMgr cas = CASFactory.createCAS(); // assert(tsa != null); // Create a CASMgr. Ensures existence of AnnotationFS type. // CASMgr tcas = CASFactory.createCAS(); CASMgr aCas = CASFactory.createCAS(); try { CasCreationUtils.setupTypeSystem(aCas, (TypeSystemDescription) null); } catch (ResourceInitializationException e) { e.printStackTrace(); } // Create a writable type system. TypeSystemMgr tsa = aCas.getTypeSystemMgr(); // Add new types and features. Type topType = tsa.getTopType(); Type annotType = tsa.getType(CAS.TYPE_NAME_ANNOTATION); // assert(annotType != null); tsa.addType(SENT_TYPE, annotType); Type tokenType = tsa.addType(TOKEN_TYPE, annotType); Type tokenTypeType = tsa.addType(TOKEN_TYPE_TYPE, topType); tsa.addType(WORD_TYPE, tokenTypeType); tsa.addType(SEP_TYPE, tokenTypeType); tsa.addType(EOS_TYPE, tokenTypeType); tsa.addFeature(TOKEN_TYPE_FEAT, tokenType, tokenTypeType); // Commit the type system. ((CASImpl) aCas).commitTypeSystem(); // assert(tsa.isCommitted()); // // Create the CAS indexes. // tcas.initCASIndexes(); // Create the Base indexes. try { aCas.initCASIndexes(); } catch (CASException e) { e.printStackTrace(); } // Commit the index repository. aCas.getIndexRepositoryMgr().commit(); // assert(cas.getIndexRepositoryMgr().isCommitted()); // Create the default text Sofa and return CAS view return (CASMgr) aCas.getCAS().getCurrentView(); } // Tokenize text. private void tokenize() throws Exception { // System.out.println("Tokenizing text."); // Create FSs for the token types. FeatureStructure wordFS = cas.createFS(wordType); FeatureStructure sepFS = cas.createFS(separatorType); FeatureStructure eosFS = cas.createFS(eosType); String text = cas.getDocumentText(); TextStringTokenizer tokenizer = new TextStringTokenizer(text); tokenizer.setSeparators("/-*&@"); tokenizer.addWhitespaceChars(","); tokenizer.setEndOfSentenceChars(".!?"); tokenizer.setShowWhitespace(false); int tokenTypeCode; int wordCounter = 0; int sepCounter = 0; int endOfSentenceCounter = 0; AnnotationFS tokenAnnot; while (tokenizer.isValid()) { tokenAnnot = cas.createAnnotation(tokenType, tokenizer.getTokenStart(), tokenizer.getTokenEnd()); tokenTypeCode = tokenizer.getTokenType(); switch (tokenTypeCode) { case TextStringTokenizer.EOS: { ++endOfSentenceCounter; tokenAnnot.setFeatureValue(tokenTypeFeature, eosFS); break; } case TextStringTokenizer.SEP: { ++sepCounter; tokenAnnot.setFeatureValue(tokenTypeFeature, sepFS); break; } case TextStringTokenizer.WSP: { break; } case TextStringTokenizer.WCH: { ++wordCounter; tokenAnnot.setFeatureValue(tokenTypeFeature, wordFS); // if ((wordCounter % 100000) == 0) { // System.out.println("Number of words tokenized: " + wordCounter); // } break; } default: { throw new Exception("Something went wrong, fire up that debugger!"); } } cas.getIndexRepository().addFS(tokenAnnot); tokenizer.setToNext(); // System.out.println("Token: " + tokenizer.nextToken()); } // time = System.currentTimeMillis() - time; // System.out.println("Number of words: " + wordCounter); // int allTokens = wordCounter + sepCounter + endOfSentenceCounter; // System.out.println("Number of tokens: " + allTokens); // System.out.println("Time used: " + new TimeSpan(time)); // FSIterator it = cas.getAnnotationIndex(tokenType).iterator(); // int count = 0; // while (it.isValid()) { // ++count; // it.moveToNext(); // } // System.out.println("Number of tokens in index: " + count); } // Very (!) primitive EOS detection. private void createSentences() { // TypeSystem ts = cas.getTypeSystem(); // Type eosType = ts.getType(EOS_TYPE); // Type tokenType = ts.getType(TOKEN_TYPE); // //assert(tokenType != null); // Type sentenceType = ts.getType(SENT_TYPE); // Feature tokenTypeFeature = ts.getFeature(TOKEN_TYPE_FEAT); // Feature startFeature = ts.getFeature(CAS.START_FEAT); // Feature endFeature = ts.getFeature(CAS.END_FEAT); // System.out.println("\nCreating sentence annotations."); // Get a handle to the index repository. FSIndexRepository indexRepository = cas.getIndexRepository(); // assert(indexRepository != null); Iterator<String> labelIt = indexRepository.getLabels(); assertTrue(labelIt != null); // Get the standard index for tokens. FSIndex<AnnotationFS> tokenIndex = cas.getAnnotationIndex(tokenType); // assert(tokenIndex != null); // Get an iterator over tokens. FSIterator<AnnotationFS> it = tokenIndex.iterator(); // assert(it != null); // Now create sentences. We do this as follows: a sentence starts where // the first token after an EOS starts, and ends with an EOS. long time = System.currentTimeMillis(); int endOfSentenceCounter = 0; it.moveToFirst(); boolean lookForStart = true; int start = 0, end; // Initialize start to pacify compiler. FeatureStructure tokenFS, sentFS; while (it.isValid()) { if (lookForStart) { // If we're looking for the start of a sentence, just grab the start // of the current FS. start = it.get().getIntValue(startFeature); lookForStart = false; } else { // Check if we've reached the end of a sentence. tokenFS = it.get(); if (tokenFS.getFeatureValue(tokenTypeFeature).getType() == eosType) { end = tokenFS.getIntValue(endFeature); sentFS = cas.createFS(sentenceType); sentFS.setIntValue(startFeature, start); sentFS.setIntValue(endFeature, end); cas.getIndexRepository().addFS(sentFS); ++endOfSentenceCounter; lookForStart = true; } } it.moveToNext(); } time = System.currentTimeMillis() - time; // System.out.println("Created " + endOfSentenceCounter + " sentences: " + new TimeSpan(time)); } // Check results. private void checkSentences() { TypeSystem ts = cas.getTypeSystem(); Type localSentenceType = ts.getType(SENT_TYPE); // Feature tokenTypeFeature = ts.getFeatureByFullName(TOKEN_TYPE_FEAT); // Feature startFeature = ts.getFeatureByFullName(CAS.FEATURE_BASE_NAME_BEGIN); // Feature endFeature = ts.getFeatureByFullName(CAS.FEATURE_BASE_NAME_END); // Print the first few sentences. // System.out.println("\nThe first 10 sentences:\n"); FSIndex<AnnotationFS> sentenceIndex = cas.getAnnotationIndex(localSentenceType); FSIterator<AnnotationFS> it = sentenceIndex.iterator(); AnnotationFS sentFS; if (it.isValid()) { sentFS = it.get(); assertTrue(sentFS.getCoveredText() != null); } // int counter = 0; String text = cas.getDocumentText(); assertTrue(text != null); // while (it.isValid() && counter < 10) { // sentFS = (AnnotationFS)it.get(); // System.out.println( // "Sentence: " // + sentFS.getCoveredText()); // it.moveToNext(); // ++counter; // } // Now get an iterator over all annotations. FSIndex<AnnotationFS> annotIndex = cas.getAnnotationIndex(); // System.out.println("\nNumber of annotations in index: " + annotIndex.size()); // Print the first few sentences. // System.out.println("The first 50 annotations:\n"); it = annotIndex.iterator(); // assert(it.isValid()); // counter = 0; // AnnotationFS fs; // while (it.isValid() && counter < 50) { // fs = (AnnotationFS)it.get(); // System.out.print(fs.getType().getName() + ": "); // if (fs.getType().getName().equals(CASMgr.DOCUMENT_TYPE)) { // // When we see the document, we don't print the whole text ;-) // System.out.println("..."); // } else { // System.out.println( // fs.getCoveredText()); // } // it.moveToNext(); // ++counter; // } } // private static String file2String(String file) throws IOException { // return file2String(new File(file)); // } /** * Read the contents of a file into a string, using the default platform encoding. * * @param file * The file to be read in. * @return String The contents of the file. * @throws IOException * Various I/O errors. */ public static String file2String(File file) throws IOException { return new String(Files.readAllBytes(file.toPath())); } /** * Test driver. */ @Test public void testMain() throws Exception { // Read the document into a String. I'm sure there are better ways to // do this. File textFile = JUnitExtension.getFile("data/moby.txt"); String moby = file2String(textFile); // String moby = file2String(System.getProperty("cas.data.test") + "moby.txt"); String line; BufferedReader br = new BufferedReader(new StringReader(moby)); StringBuffer buf = new StringBuffer(); List<String> docs = new ArrayList<>(); while ((line = br.readLine()) != null) { if (line.startsWith(".. <p")) { docs.add(buf.toString()); buf = new StringBuffer(); } else { buf.append(line + "\n"); } } docs.add(buf.toString()); buf = null; final int numDocs = docs.size(); final int max = 30; int docCount = 0; long overallTime = System.currentTimeMillis(); int numTok, numSent; CASSerializer cs; while (docCount < max) { for (int i = 0; i < numDocs && docCount < max; i++) { // System.out.println("Processing document: " + i); // Set document text in first CAS. cas.setDocumentText(docs.get(i)); tokenize(); numTok = cas.getAnnotationIndex(tokenType).size(); assertTrue(numTok > 0); // System.out.println(" Number of tokens: " + numTok); // System.out.println("Serializing..."); cs = Serialization.serializeNoMetaData(cas); cas = Serialization.createCAS(casMgr, cs); assertTrue(numTok == cas.getAnnotationIndex(tokenType).size()); createSentences(); numSent = cas.getAnnotationIndex(sentenceType).size(); assertTrue(numSent > 0); // System.out.println(" Number of sentences: " + numSent); // System.out.println("Serializing..."); cs = Serialization.serializeNoMetaData(cas); cas = Serialization.createCAS(casMgr, cs); assertTrue(numTok == cas.getAnnotationIndex(tokenType).size()); assertTrue(numSent == cas.getAnnotationIndex(sentenceType).size()); // System.out.println(" Number of tokens: " + numTok); checkSentences(); // System.out.println("Serializing..."); cs = Serialization.serializeNoMetaData(cas); cas = Serialization.createCAS(casMgr, cs); assertTrue(numTok == cas.getAnnotationIndex(tokenType).size()); assertTrue(numSent == cas.getAnnotationIndex(sentenceType).size()); // System.out.println(" Verify: " + numTok + " tokens, " + numSent + " sentences."); casMgr.reset(); ++docCount; } // System.out.println("Number of documents processed: " + docCount); } overallTime = System.currentTimeMillis() - overallTime; // System.out.println("Time taken over all: " + new TimeSpan(overallTime)); } }