blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
332
content_id
stringlengths
40
40
detected_licenses
listlengths
0
50
license_type
stringclasses
2 values
repo_name
stringlengths
7
115
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
557 values
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
77.7k
fork_events_count
int64
0
48k
gha_license_id
stringclasses
17 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
82 values
src_encoding
stringclasses
28 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
7
5.41M
extension
stringclasses
11 values
content
stringlengths
7
5.41M
authors
listlengths
1
1
author
stringlengths
0
161
73b2129596f59bcdb85563e803b31f6c08c1595a
dc4ea1e854bbc27aebc640aaceabfdb861411f89
/src/com/tth/createtype/simplefactory3/Strawberry.java
0f77b82ef375a266ecc06419a03627d7b57827af
[]
no_license
Archerplus/design-patterns
283229f9932fca391d7be64ef73c4142086e3498
0ad3ba83b7888e830e15def9f96dcb9ee2d60c0a
refs/heads/master
2022-08-16T14:05:03.929601
2020-05-17T15:04:46
2020-05-17T15:04:46
264,692,876
0
0
null
null
null
null
UTF-8
Java
false
false
254
java
package com.tth.createtype.simplefactory3; public class Strawberry implements IFruit { public void plant(){ System.out.println("草莓种植......"); } public void harvest(){ System.out.println("草莓收获......"); } }
4cef2a42df373377a9640dc5fe10f58c63277704
e0232802a37e8a2aa9f6c9f5904030eb8a03e3ad
/src/main/java/org/flowable/ProgramRejectionMail.java
e222c89d2e13d9482b3c0f1aa71a6e156312925d
[]
no_license
WuzhongPeople/flowable-example
c794c6572ddfaca2224bde8f47533ad5934b4d28
7d7d2eeb2f5802400ccac6141a354b42c55d790e
refs/heads/master
2020-04-13T18:37:26.854937
2018-02-12T05:39:37
2018-02-12T05:39:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
399
java
package org.flowable; import org.flowable.engine.delegate.DelegateExecution; import org.flowable.engine.delegate.JavaDelegate; /** * Created by chenkai on 2018/2/11. */ public class ProgramRejectionMail implements JavaDelegate { @Override public void execute(DelegateExecution execution) { System.out.println(execution.getVariable("employee")+"的审批被拒绝!"); } }
adfd1a4f2e424ac3e5aa5098cdbb8c499e8d310c
90e9ec6fa6c90174ad4cb652af63834e16b90815
/Recyclerview2/app/src/main/java/com/example/peter/recyclerview/Circular (2019_04_17 17_37_00 UTC).java
572d69ee5297c86c6e7b5c11a669d161ada083de
[]
no_license
terriljoel/Android-Basic-Apps-
478e208cd147cd2083fde0f9284400fa4c99bf38
b38ed84006914c443cdaa52b8dac8ad0ffcf7fcc
refs/heads/master
2022-12-22T14:41:37.171823
2020-09-23T18:43:45
2020-09-23T18:43:45
298,059,514
0
0
null
null
null
null
UTF-8
Java
false
false
852
java
package com.example.peter.recyclerview; public class Circular { private String title,Dat,Cref; private String img; public Circular(String title, String dat, String Cref, String img) { this.title = title; this.Dat = dat; this.Cref = Cref; this.img = img; } public String getTitle() { return title; } public String getDat() { return Dat; } public String getCref() { return Cref; } public void settitle(String title) { this.title = title; } public void setDat(String dat) { Dat = dat; } public void setCref(String cref) { Cref = cref; } public void setImg( String img) { this.img = img; } public String getImg() { return img; } public Circular() { } }
f7664abda4df5618b1f7ecda93668ff6f1c76528
798a6ab64f9d79e5c3aec101dfc68298afc7829f
/app/src/main/java/com/example/gamer/launch/MainActivity.java
4cdbbf31aec79c87e7ab64067966d4b2b50066b4
[]
no_license
AbdullahOsama/launch
da0dcfbe59a936dd19255e3ce81d5dff1ef50bf3
50606dde8a937b2cd7aa1e27703e74e8cdd32254
refs/heads/master
2021-01-02T08:50:31.755663
2017-08-02T06:01:20
2017-08-02T06:01:20
99,078,196
0
0
null
null
null
null
UTF-8
Java
false
false
337
java
package com.example.gamer.launch; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } }
07d03e5dc050ea5b14dd72a429e04488b9c2e16b
e93a93f3725de1737c173d7e5449557d9f149e49
/ust-java/oct21-19/src/TestB.java
44d2412be82777f83f46179017549d64a18d0a2f
[]
no_license
ashwinibd6697/ust-19sep-ashwinibd
f6ccd2d668be1e8a20fc9275c906f97112130cdc
53ecc44c934a7222740c8bcf14138167d7e30d0e
refs/heads/master
2023-01-08T08:44:02.253258
2019-12-22T02:28:18
2019-12-22T02:28:18
215,538,884
0
0
null
2023-01-07T13:05:10
2019-10-16T12:08:16
JavaScript
UTF-8
Java
false
false
500
java
public class TestB { public static void main(String[] args) { Cow c = new Cow(); c.name="jersy"; c.color="brown"; System.out.println("cow name is "+c.name); System.out.println("cow color is "+c.color); c.eat(); c.sleep(); System.out.println("***************************************"); Cow c1 = new Cow(); c1.name="H-F"; c1.color="black"; System.out.println("cow name is "+c1.name); System.out.println("cow color is "+c1.color); c1.eat(); c1.sleep(); } }
d9c6441bc1fe54f3f0b1fa1f1c15c261e4e58d3d
4df1036d6f0531adfa4acf1ea1cf1f066b8d6e43
/spark项目文档/课件/102.各区域热门商品统计-异构数据源之从MySQL中查询城市数据/代码/AreaTop3ProductSpark.java
c980ba56e6e2ff9ae84377b8df53e3a201652c65
[]
no_license
hellowjava/bigdata2099
32ccac27572a8c5e06e61804040f2f66988ab011
9f7bd45e38c94bf30567435a017aef4514fcc945
refs/heads/master
2020-04-16T06:08:16.782276
2019-01-11T15:09:05
2019-01-11T15:09:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,875
java
package com.ibeifeng.sparkproject.spark.product; import java.util.HashMap; import java.util.Map; import org.apache.spark.SparkConf; import org.apache.spark.api.java.JavaPairRDD; import org.apache.spark.api.java.JavaRDD; import org.apache.spark.api.java.JavaSparkContext; import org.apache.spark.api.java.function.PairFunction; import org.apache.spark.sql.DataFrame; import org.apache.spark.sql.Row; import org.apache.spark.sql.SQLContext; import scala.Tuple2; import com.alibaba.fastjson.JSONObject; import com.ibeifeng.sparkproject.conf.ConfigurationManager; import com.ibeifeng.sparkproject.constant.Constants; import com.ibeifeng.sparkproject.dao.ITaskDAO; import com.ibeifeng.sparkproject.dao.factory.DAOFactory; import com.ibeifeng.sparkproject.domain.Task; import com.ibeifeng.sparkproject.util.ParamUtils; import com.ibeifeng.sparkproject.util.SparkUtils; /** * 各区域top3热门商品统计Spark作业 * @author Administrator * */ public class AreaTop3ProductSpark { public static void main(String[] args) { // 创建SparkConf SparkConf conf = new SparkConf() .setAppName("AreaTop3ProductSpark"); SparkUtils.setMaster(conf); // 构建Spark上下文 JavaSparkContext sc = new JavaSparkContext(conf); SQLContext sqlContext = SparkUtils.getSQLContext(sc.sc()); // 准备模拟数据 SparkUtils.mockData(sc, sqlContext); // 获取命令行传入的taskid,查询对应的任务参数 ITaskDAO taskDAO = DAOFactory.getTaskDAO(); long taskid = ParamUtils.getTaskIdFromArgs(args, Constants.SPARK_LOCAL_TASKID_PRODUCT); Task task = taskDAO.findById(taskid); JSONObject taskParam = JSONObject.parseObject(task.getTaskParam()); String startDate = ParamUtils.getParam(taskParam, Constants.PARAM_START_DATE); String endDate = ParamUtils.getParam(taskParam, Constants.PARAM_END_DATE); // 查询用户指定日期范围内的点击行为数据(city_id,在哪个城市发生的点击行为) JavaPairRDD<Long, Row> clickActionRDD = getcityid2ClickActionRDDByDate( sqlContext, startDate, endDate); // 从MySQL中查询城市信息 JavaPairRDD<Long, Row> cityInfoRDD = getcityid2CityInfoRDD(sqlContext); sc.close(); } /** * 查询指定日期范围内的点击行为数据 * @param sqlContext * @param startDate 起始日期 * @param endDate 截止日期 * @return 点击行为数据 */ private static JavaPairRDD<Long, Row> getcityid2ClickActionRDDByDate( SQLContext sqlContext, String startDate, String endDate) { // 从user_visit_action中,查询用户访问行为数据 // 第一个限定:click_product_id,限定为不为空的访问行为,那么就代表着点击行为 // 第二个限定:在用户指定的日期范围内的数据 String sql = "SELECT " + "city_id," + "click_product_id product_id " + "FROM user_visit_action " + "WHERE click_product_id IS NOT NULL " + "AND click_product_id != 'NULL' " + "AND click_product_id != 'null' " + "AND action_time>='" + startDate + "' " + "AND action_time<='" + endDate + "'"; DataFrame clickActionDF = sqlContext.sql(sql); JavaRDD<Row> clickActionRDD = clickActionDF.javaRDD(); JavaPairRDD<Long, Row> cityid2clickActionRDD = clickActionRDD.mapToPair( new PairFunction<Row, Long, Row>() { private static final long serialVersionUID = 1L; @Override public Tuple2<Long, Row> call(Row row) throws Exception { Long cityid = row.getLong(0); return new Tuple2<Long, Row>(cityid, row); } }); return cityid2clickActionRDD; } /** * 使用Spark SQL从MySQL中查询城市信息 * @param sqlContext SQLContext * @return */ private static JavaPairRDD<Long, Row> getcityid2CityInfoRDD(SQLContext sqlContext) { // 构建MySQL连接配置信息(直接从配置文件中获取) String url = null; boolean local = ConfigurationManager.getBoolean(Constants.SPARK_LOCAL); if(local) { url = ConfigurationManager.getProperty(Constants.JDBC_URL); } else { url = ConfigurationManager.getProperty(Constants.JDBC_URL_PROD); } Map<String, String> options = new HashMap<String, String>(); options.put("url", url); options.put("dbtable", "city_info"); // 通过SQLContext去从MySQL中查询数据 DataFrame cityInfoDF = sqlContext.read().format("jdbc") .options(options).load(); // 返回RDD JavaRDD<Row> cityInfoRDD = cityInfoDF.javaRDD(); JavaPairRDD<Long, Row> cityid2cityInfoRDD = cityInfoRDD.mapToPair( new PairFunction<Row, Long, Row>() { private static final long serialVersionUID = 1L; @Override public Tuple2<Long, Row> call(Row row) throws Exception { long cityid = row.getLong(0); return new Tuple2<Long, Row>(cityid, row); } }); return cityid2cityInfoRDD; } }
dd5f40d78c5bca9bbe942b5b2760d5a746b7d84d
8b2b1c0453b4e73bf73fe30d8dff56bd6b0bce48
/src/main/java/jpabook/jpashop/domain/Item.java
7bd28f3388c21d88a04f7b40d2e19fd5bc309600
[]
no_license
slamdunk7575/JpaShop
d26f888247f82feed96f8c461a4937a2a1946727
56e1572a53e8c19a2c2a2d57d8c3567385ab003a
refs/heads/master
2022-02-12T15:38:53.114781
2019-11-10T17:00:40
2019-11-10T17:00:40
218,080,522
0
0
null
2022-01-21T23:33:09
2019-10-28T15:32:50
Java
UTF-8
Java
false
false
356
java
package jpabook.jpashop.domain; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.Id; @Entity public class Item { @Id @GeneratedValue @Column(name = "ITEM_ID") private Long id; private String name; private int price; private int stockQuentity; }
d52112cafbb241cc6f2e03f12518575784908dde
14a300e25bcefc4d7622c40cbd294ebc2348055f
/src/main/java/com/idp/web/carconsrastresult/controller/CarConsrastResultController.java
83cd7d9be5949236b8752be9b84fdf8ec764e737
[ "Apache-2.0" ]
permissive
hai411741962/jee-soa
dfb5a52eafe1ef3028a781c7998eff0ef8cf6e99
d55ce452739b448e9caebbab02aafa4e14961137
refs/heads/master
2020-07-05T18:16:13.299945
2016-11-17T03:20:24
2016-11-17T03:20:24
73,986,766
0
0
null
null
null
null
UTF-8
Java
false
false
3,689
java
package com.idp.web.carconsrastresult.controller; import com.idp.web.carconsrastresult.entity.CarConsrastResult; import com.idp.web.carconsrastresult.service.CarConsrastResultService; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import org.apache.log4j.Logger; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import com.idp.common.base.BaseController; import com.idp.common.persistence.Page; import com.idp.common.util.ValidateUtils; import net.sf.json.JSONObject; /** * * 车辆对比结果管理controller * * <pre> * 鍘嗗彶璁板綍锛� * 2016-09-27 14:01 yhg * 鏂板缓鏂囦欢 * </pre> * * @author * <pre> * SD * yhg * PG * yhg * UT * * MA * </pre> * @version $Rev$ * * <p/> $Id$ * */ @Controller @RequestMapping("/carConsrastResult") public class CarConsrastResultController extends BaseController { private Logger logger = Logger.getLogger(CarConsrastResultController.class); @Resource private CarConsrastResultService carConsrastResultService; /** * * <pre> * 2016-09-27 14:01 yhg * 鍒濆鍖栨煡璇㈤〉闈� * </pre> * * @return */ @RequestMapping("/init") public String init(){ return "carconsrastresult/carConsrastResultSearch"; } /** * * <pre> * 2016-09-27 14:01 yhg * 鍒嗛〉鏌ヨ * </pre> * * @param carConsrastResult * @param page * @param request * @return */ @RequestMapping("/list") public String list(CarConsrastResult carConsrastResult,Page<CarConsrastResult> page,HttpServletRequest request){ try { request.setAttribute("page", carConsrastResultService.findByPage(carConsrastResult, page)); } catch (Exception e) { logger.error(e.getMessage(), e); } return "carconsrastresult/carConsrastResultList"; } /** * * <pre> * 2016-09-27 14:01 yhg * 鏂板淇敼椤甸潰鍒濆鍖� * </pre> * * @param id * @param request * @return */ @RequestMapping("/carConsrastResult") public String carConsrastResult(Long id,HttpServletRequest request){ try { if(ValidateUtils.isNotEmpty(id)){ CarConsrastResult carConsrastResult = carConsrastResultService.getById(id); request.setAttribute("carConsrastResult", carConsrastResult); } } catch (Exception e) { logger.error(e.getMessage(), e); } return "carconsrastresult/carConsrastResult"; } /** * * <pre> * 2016-09-27 14:01 yhg * 淇濆瓨 * </pre> * * @param carConsrastResult * @return */ @RequestMapping("/save") @ResponseBody public String save(CarConsrastResult carConsrastResult){ JSONObject json = new JSONObject(); try { // 淇敼 if(ValidateUtils.isNotEmpty(carConsrastResult.getId())){ carConsrastResultService.update(carConsrastResult); } // 鏂板 else{ carConsrastResultService.add(carConsrastResult); } json.put("result", "save_success"); } catch (Exception e) { logger.error(e.getMessage(), e); json.put("result", "save_fail"); } return json.toString(); } /** * * <pre> * 2016-09-27 14:01 yhg * 鍒犻櫎 * </pre> * * @param id * @return */ @RequestMapping("/delete") @ResponseBody public String delete(Long id){ JSONObject json = new JSONObject(); try { carConsrastResultService.delete(id); json.put("result", "delete_success"); } catch (Exception e) { logger.error(e.getMessage(), e); json.put("result", "delete_fail"); } return json.toString(); } }
1b88d73abd7afcd910984c7ac5091c302ddeb536
d57c1b3e3ff3c4f378e53f20819adcdcfd04adb5
/app/src/main/java/thealphalabs/wifidirect/RarpImpl.java
86cf19ee71a196a0b69e0d6757db8a89e99321dc
[]
no_license
ImYeol/AlphaApp
441d19b1bde8d962349bfd1cefa8a7c79b0b5e26
c2521764d7ece59d162a4eb133e38376e5f7a89e
refs/heads/master
2021-01-10T20:40:36.731824
2015-07-01T11:11:35
2015-07-01T11:11:35
37,044,575
0
2
null
null
null
null
UTF-8
Java
false
false
6,603
java
package thealphalabs.wifidirect; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; import java.util.ArrayList; import android.util.Log; /** * MACアドレスからIPアドレスを取得 * /proc/net/arp を参照する * arpテーブルの例 * IP address HW type Flags HW address Mask Device * 192.168.49.208 0x1 0x2 a2:0b:ba:ba:c4:d1 * p2p-wlan0-8 */ public class RarpImpl { /** ログ出力用TAG */ private String TAG = "RarpImpl"; /** ARPパス */ public final String ARP_PATH = "/proc/net/arp"; public String execRarp(String netIf) { ArrayList<String> lines = readFile(ARP_PATH); if (lines == null || lines.size() == 0) { Log.d(TAG, "execRarp() readFile("+ARP_PATH+") returns 0"); return null; } int i = 0; for (String line : lines) { Log.d(TAG, "execRarp() [" + (i++) + "]" + line); } ArrayList<ArpType> arps = parseArp(lines); if (arps == null || arps.size() == 0) { Log.w(TAG, "execRarp() parseArp("+lines+") returns 0"); return null; } ArpType arp = searchArp(arps, netIf); if (arp == null) { Log.w(TAG, "execRarp() searchArp() "+netIf+" Not Found!"); return null; } return arp.mIPaddress; } /** * Arpテーブル取得 */ public ArrayList<ArpType> getArpTable() { ArrayList<String> lines = readFile(ARP_PATH); if (lines == null || lines.size() == 0) { Log.d(TAG, "getArpTable() readFile("+ARP_PATH+") returns 0"); return null; } int i = 0; for (String line : lines) { Log.d(TAG, "getArpTable() [" + (i++) + "]" + line); } ArrayList<ArpType> arps = parseArp(lines); if (arps == null || arps.size() == 0) { Log.w(TAG, "getArpTable() parseArp("+lines+") returns 0"); return null; } return arps; } /** * 指定パスのファイル読み込み * * @param path * @return null エラー / 改行区切りのファイル内容 */ private ArrayList<String> readFile(String path) { try { BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(new File(path)), "UTF-8"), 128); ArrayList<String> lines = new ArrayList<String>(); String line; while ((line = br.readLine()) != null) { lines.add(line); } br.close(); return lines; } catch(FileNotFoundException e) { Log.e(TAG, "readFile() " + e); } catch(UnsupportedEncodingException e) { Log.e(TAG, "readFile() " + e); } catch (IOException e) { Log.e(TAG, "readFile() " + e); } return null; } /** * /proc/net/arp ファイル解析 */ private ArrayList<ArpType> parseArp(ArrayList<String> arpLines) { if (arpLines == null || arpLines.size() == 1) { return null; } ArrayList<ArpType> arps = new ArrayList<ArpType>(); for (String line : arpLines) { ArpType arp = parseArpLine(line); if (arp == null) { continue; } arps.add(arp); } return arps; } /** * arpファイル 1行解析 */ private ArpType parseArpLine(String line) { if (line == null) { Log.e(TAG, "parseArpLine() line is null!"); return null; } String[] seps = line.split(" +"); // 連続する空白文字で区切る // 連続する空白で分割できない if (seps == null || seps.length == 0) { Log.e(TAG, "parseArpLine() split error!"+line+"]"); return null; } int len = seps.length; // arp行 if (len == 6) { ArpType arp = new ArpType(seps[0], seps[1], seps[2], seps[3], seps[4], seps[5]); Log.d(TAG, "parseArpLine() created arp["+arp.toString()+"]"); return arp; } else { // ヘッダ if (seps.length == 9 && seps[0].equals("IP") && seps[8].equals("Device")) { Log.i(TAG, "parseArpLine() this is header line. don't create arp["+line+"]"); } else { StringBuffer buf = new StringBuffer(); for (int i = 0; i < seps.length; i++) { buf.append(String.format("[%02d](%s)", i, seps[i])); } Log.e(TAG, "parseArpLine() Unknown Line! Seps["+buf.toString()+"]"); } return null; } } /** * 検索 */ private ArpType searchArp(ArrayList<ArpType> arps, String netIf) { if (arps == null || arps.size() == 0 || netIf == null) { return null; } ArpType lastarp = null; for (ArpType arp : arps) { //if (arp.mHWaddress.equals(macAddress)) { // return arp; //} if (arp.mDevice.equals(netIf)) { if (!arp.mHWaddress.equals("00:00:00:00:00:00")) { return arp; } } lastarp = arp; } if (lastarp != null) { //return lastarp; } return null; } /** * arpデータ型 */ public class ArpType { public String mIPaddress; String mHWType; String mFlags; String mHWaddress; String mMask; String mDevice; ArpType() { } ArpType(String ipaddress, String hwtype, String flags, String hwaddress, String mask, String device) { mIPaddress = ipaddress; mHWType = hwtype; mFlags = flags; mHWaddress = hwaddress; mMask = mask; mDevice = device; } public String toString() { String ret = " IP address:" + mIPaddress + "¥n" + " HW type:" + mHWType + "¥n" + " Flags:" + mFlags + "¥n" + " HW address:" + mHWaddress + "¥n" + " Mask:" + mMask + "¥n" + " Device:" + mDevice; return ret; } } }
be8b81b3fd5eae2cf84527755743dd76c20a9ca8
b12ef738221d608ae6a26ca5087b93afe059d7b4
/src/简单工厂模式/OperationAdd.java
d6e503afd070312ea9359cff24795f6e86eae90a
[]
no_license
Doviswzx/Design
53c0d4792ef0cd6073983ae898196b3a50cef22a
60bffe0a8db47aff73298709910881fa01cbeff7
refs/heads/master
2022-10-01T16:39:28.943875
2020-06-09T05:22:43
2020-06-09T05:22:43
270,905,452
0
0
null
null
null
null
UTF-8
Java
false
false
211
java
package 简单工厂模式; public class OperationAdd extends Operation{ public double getResult(){ double result = 0; result = getNumberA() + getNumberB(); return result; } }
7007137789a93804f18bf81aabe2cdb7fd5f02ef
90879710ab6cabcb9f1a69925672fe994accf255
/sample/src/com/lee/sdk/test/section/Contact.java
1775ac89ef5539d5feb67ad024e943290373b627
[]
no_license
luajoy/CoreLib
b50eb05a54804a459ce5f29d48587f4f9dbc9cfc
e7f66892d8ba5fd6bb4ad7ef0a037926c6e91f50
refs/heads/master
2020-03-08T10:14:59.155219
2017-05-05T10:02:36
2017-05-05T10:02:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,163
java
package com.lee.sdk.test.section; import android.text.TextUtils; import com.lee.sdk.utils.CharacterParser; public class Contact { int id; String name; String pinyin; String sortLetter = "#"; String sectionStr; String phoneNumber; boolean isSection; static CharacterParser sParser = CharacterParser.getInstance(); Contact() { } Contact(int id, String name) { this.id = id; this.name = name; this.pinyin = sParser.getSpelling(name); if (!TextUtils.isEmpty(pinyin)) { String sortString = this.pinyin.substring(0, 1).toUpperCase(); if (sortString.matches("[A-Z]")) { this.sortLetter = sortString.toUpperCase(); } else { this.sortLetter = "#"; } } } @Override public String toString() { if (isSection) { return name; } else { //return name + " (" + sortLetter + ", " + pinyin + ")"; //return name + " (" + phoneNumber + ")"; return name; } } }
62087a08b5d3eef6e21a0e241d21aa9080d66ec7
fa32414cd8cb03a7dc3ef7d85242ee7914a2f45f
/app/src/main/java/com/google/android/exoplayer/text/SubtitleLayout.java
0dcfe06f0280af0afa567072c2d06035e6efd599
[]
no_license
SeniorZhai/Mob
75c594488c4ce815a1f432eb4deacb8e6f697afe
cac498f0b95d7ec6b8da1275b49728578b64ef01
refs/heads/master
2016-08-12T12:49:57.527237
2016-03-10T06:57:09
2016-03-10T06:57:09
53,562,752
4
2
null
null
null
null
UTF-8
Java
false
false
1,807
java
package com.google.android.exoplayer.text; import android.content.Context; import android.graphics.Canvas; import android.util.AttributeSet; import android.view.View; import com.android.volley.DefaultRetryPolicy; import java.util.ArrayList; import java.util.List; public final class SubtitleLayout extends View { private List<Cue> cues; private float fontScale; private final List<CuePainter> painters; private CaptionStyleCompat style; public SubtitleLayout(Context context) { this(context, null); } public SubtitleLayout(Context context, AttributeSet attrs) { super(context, attrs); this.painters = new ArrayList(); this.fontScale = DefaultRetryPolicy.DEFAULT_BACKOFF_MULT; this.style = CaptionStyleCompat.DEFAULT; } public void setCues(List<Cue> cues) { if (this.cues != cues) { this.cues = cues; int cueCount = cues == null ? 0 : cues.size(); while (this.painters.size() < cueCount) { this.painters.add(new CuePainter(getContext())); } invalidate(); } } public void setFontScale(float fontScale) { if (this.fontScale != fontScale) { this.fontScale = fontScale; invalidate(); } } public void setStyle(CaptionStyleCompat style) { if (this.style != style) { this.style = style; invalidate(); } } public void dispatchDraw(Canvas canvas) { int cueCount = this.cues == null ? 0 : this.cues.size(); for (int i = 0; i < cueCount; i++) { ((CuePainter) this.painters.get(i)).draw((Cue) this.cues.get(i), this.style, this.fontScale, canvas, getLeft(), getTop(), getRight(), getBottom()); } } }
394f626986f31b2334a3706a981311ff3a0190c9
1f798c03925bb2f855f67023b9903fa888c8d4ed
/cut-rod.java
9c9db40320c22850c8c7ad94f4cabda49fa7e508
[]
no_license
BOTAK0803/Data_Structure_n_Algorithm
5389c5801fac7b709c9f8889036bd970e3383a4e
218d1400f75ecfee837fe6d69968a505e7ee9087
refs/heads/main
2023-04-13T08:49:23.495174
2021-04-26T03:45:57
2021-04-26T03:45:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,889
java
import java.util.*; class Solution{ static int[] p = new int[]{0,1,5,8,9,10,17,17,20,24,30}; static int[] r = new int[p.length]; public static void main(String[] args) { Arrays.fill(r,Integer.MIN_VALUE); System.out.println("--------------------"); System.out.println(cutRod(p,10)); System.out.println("--------------------"); System.out.println(memoizedCutRod(p,10,r)); System.out.println("--------------------"); System.out.println("--------------------"); System.out.println(bottomUpCutRod(p,10)); System.out.println("--------------------"); System.out.println(bottomUpCutRod2(p,7)); } /** int[] p : 价格数组 int n : 长度 function:返回长度为n的钢条的最大收益 */ public static int cutRod(int[] p , int n){ if(n == 0) return 0; int q = Integer.MIN_VALUE; for(int i = 1;i<=n;i++){ q = Math.max(q,p[i] + cutRod(p,n-i)); } return q; } /** 带备忘录的自顶向下方法 */ public static int memoizedCutRod(int[] p,int n,int[] r){ if(r[n] >= 0) return r[n]; if(n==0) return 0; int q = Integer.MIN_VALUE; for(int i = 1;i<=n;i++){ q = Math.max(q,p[i] + memoizedCutRod(p,n-i,r)); } r[n] = q; return q; } /** */ public static int bottomUpCutRod(int[] p,int n){ int[] dp = new int[p.length]; dp[0] = 0; for(int j = 1;j<=n;j++){ int q = Integer.MIN_VALUE; for(int i =1;i<=j;i++){ q=Math.max(q,p[i] + dp[j-i]); } dp[j] = q; } return dp[n]; } /** */ public static int bottomUpCutRod2(int[] p,int n){ int[] dp = new int[p.length]; int[] s = new int[p.length]; dp[0] = 0; for(int j = 1;j<=n;j++){ int q = Integer.MIN_VALUE; for(int i =1;i<=j;i++){ if(q < p[i] + dp[j-i]){ q = p[i]+dp[j-i]; s[j] = i; } } dp[j] = q; } int t = n; while(t>0){ System.out.print(s[t]+" "); t-=s[t]; } System.out.println(); return dp[n]; } }
471a50b96790331bf4a5e78f53ae07fbc35d55f4
773c53ca005659024cb9ef57300446cf9eeccbb3
/src/main/java/br/com/zaptorpedo/config/LocaleConfiguration.java
6628ad65c55718adfddeae65ebaa6f16128c8fb4
[]
no_license
iurigodoy/zaptorpedo-jhipster
3163431f9fae639566e4560d22869585876fd690
03578324c18ed9dff6eeaee08e35d12321109355
refs/heads/main
2023-06-25T04:14:53.381962
2021-07-26T17:29:21
2021-07-26T17:29:21
389,716,062
0
0
null
2021-07-26T17:38:15
2021-07-26T17:28:56
Java
UTF-8
Java
false
false
1,029
java
package br.com.zaptorpedo.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.LocaleResolver; import org.springframework.web.servlet.config.annotation.*; import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; import tech.jhipster.config.locale.AngularCookieLocaleResolver; @Configuration public class LocaleConfiguration implements WebMvcConfigurer { @Bean public LocaleResolver localeResolver() { AngularCookieLocaleResolver cookieLocaleResolver = new AngularCookieLocaleResolver(); cookieLocaleResolver.setCookieName("NG_TRANSLATE_LANG_KEY"); return cookieLocaleResolver; } @Override public void addInterceptors(InterceptorRegistry registry) { LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor(); localeChangeInterceptor.setParamName("language"); registry.addInterceptor(localeChangeInterceptor); } }
b36ef0096d98b7234df7ce159b524eb45463ea15
89f37c323b2c824f729eac167e8a33a5621c5e50
/src/aoetk/tools/a_go/conf/ApplicationContext.java
4556db0a2c450687f8fd2dcdd78d26b471ccb0eb
[ "Apache-2.0" ]
permissive
aoetk/a-go-counter
94d02bca7e9ba10e807f256558c921eb3529e460
78401d6bac97884904e83d95385285264975b3c4
refs/heads/master
2021-05-04T10:51:00.407867
2017-12-07T14:32:32
2017-12-07T14:32:32
46,219,843
0
0
null
null
null
null
UTF-8
Java
false
false
2,848
java
package aoetk.tools.a_go.conf; import javafx.beans.property.DoubleProperty; import javafx.beans.property.SimpleDoubleProperty; import java.io.File; import java.net.URI; import java.util.Optional; import java.util.prefs.BackingStoreException; import java.util.prefs.Preferences; /** * アプリケーション設定. * 設定内容はPreferences APIを用いて保存する. */ public class ApplicationContext { private static ApplicationContext ourInstance = new ApplicationContext(); private Preferences preferences; private File saveFilePath; private DoubleProperty stageX = new SimpleDoubleProperty(this, "stageX", 0.0); private DoubleProperty stageY = new SimpleDoubleProperty(this, "stageY", 0.0); public static ApplicationContext getInstance() { return ourInstance; } private ApplicationContext() { preferences = Preferences.userNodeForPackage(ApplicationContext.class); restoreSettings(); } /** * 設定を保存する. */ public void saveConf() { try { preferences.putDouble(stageX.getName(), stageX.get()); preferences.putDouble(stageY.getName(), stageY.get()); if (saveFilePath != null) { preferences.put("saveFilePath", saveFilePath.toURI().toString()); } preferences.flush(); } catch (BackingStoreException e) { e.printStackTrace(); } } private void restoreSettings() { stageX.set(preferences.getDouble(stageX.getName(), stageX.get())); stageY.set(preferences.getDouble(stageY.getName(), stageY.get())); final String pathFromPref = preferences.get("saveFilePath", null); if (pathFromPref != null) { try { saveFilePath = new File(URI.create(pathFromPref)); } catch (Exception e) { // ファイルパスが不正な場合は無し設定扱い e.printStackTrace(); } } } /** * 情報を保存しているファイルのパスを返す. * * @return 情報を保存しているファイルのパス. */ public Optional<File> getSaveFilePath() { return Optional.ofNullable(saveFilePath); } /** * 情報を保存するファイルのパスを設定する. * * @param saveFilePath 情報を保存するファイルのパス */ public void setSaveFilePath(File saveFilePath) { this.saveFilePath = saveFilePath; } /** * Stageのx座標. * * @return Stageのx座標 */ public DoubleProperty stageXProperty() { return stageX; } /** * Stageのy座標. * * @return Stageのy座標 */ public DoubleProperty stageYProperty() { return stageY; } }
31885dd03a554668a115f7c4b16e00f26d25f580
b0bf9043791d729e6f9d95374ea9e352dea240d8
/src/main/java/com/mis2016bd/tpfmz/modelo/Materia.java
413c646b814a07a158a742f38698a9fc03264220
[]
no_license
smeinero/tpfmz
3a9d819dabba77459071e7955a5f3fc75e2f26e7
6a6225f6e1124811b31ec782e3608df1e476d9e7
refs/heads/master
2021-01-22T19:36:13.918656
2017-03-11T21:40:26
2017-03-11T21:40:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
280
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.mis2016bd.tpfmz.modelo; /** * * @author malky */ public class Materia { }
353d0aa87b3255335cb9e94e649dc497ae802eb2
a6994b760368bf15300b5ae53d5a45f6ea66a7f3
/stock-datajal/src/main/java/py/com/prestosoftware/ui/table/CategoriaTablePanel.java
74fc93f0fb2b547b522f138b8d945459762d182c
[]
no_license
hugorolon/stock-datajal
b4e45ba4c3347fbacc3ee9d098d37deddccec49f
379faae9cc856f762b3a2ec0548f89df19d9df15
refs/heads/master
2023-06-09T08:02:23.797690
2023-05-30T19:23:21
2023-05-30T19:23:21
221,263,229
0
0
null
null
null
null
UTF-8
Java
false
false
1,208
java
package py.com.prestosoftware.ui.table; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.ListSelectionModel; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import py.com.prestosoftware.ui.helpers.CellRendererOperaciones; import java.awt.BorderLayout; @Component public class CategoriaTablePanel extends JPanel { private static final long serialVersionUID = 1L; private CategoriaTableModel tableModel; private JTable table; @Autowired public CategoriaTablePanel(CategoriaTableModel tableModel) { this.tableModel = tableModel; setPanelUp(); initComponents(); } private void setPanelUp() { setLayout(new BorderLayout()); } private void initComponents() { table = new JTable(tableModel); table.setDefaultRenderer(Object.class, new CellRendererOperaciones()); table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); JScrollPane paneWithTable = new JScrollPane(table); add(paneWithTable, BorderLayout.CENTER); } public JTable getTable() { return table; } }
a854cdc029be6b05f25cf1a8c263435bac528166
b5439d2285ea6b9da5ba079f854a4da6e256996c
/src/main/java/sv/edu/ufg/model/RolUsuarioPK.java
feb35cfbc117062b3f668a017f753bbe0bec35ff
[]
no_license
asi2clinica/app
328cd596c0bc5795230f3abc10ebc5e1bd2e890b
c503416d760dcec2ef0f1b524f746bbc1b505bc1
refs/heads/master
2016-09-01T17:09:29.694103
2015-11-21T22:59:15
2015-11-21T22:59:15
40,945,083
0
2
null
null
null
null
UTF-8
Java
false
false
1,205
java
package sv.edu.ufg.model; import java.io.Serializable; import javax.persistence.*; /** * The primary key class for the ROL_USUARIO database table. * */ @Embeddable public class RolUsuarioPK implements Serializable { //default serial version id, required for serializable classes. private static final long serialVersionUID = 1L; @Column(name="ROL_ID", insertable=false, updatable=false) private long rolId; private String usuario; public RolUsuarioPK() { } public long getRolId() { return this.rolId; } public void setRolId(long rolId) { this.rolId = rolId; } public String getUsuario() { return this.usuario; } public void setUsuario(String usuario) { this.usuario = usuario; } public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof RolUsuarioPK)) { return false; } RolUsuarioPK castOther = (RolUsuarioPK)other; return (this.rolId == castOther.rolId) && this.usuario.equals(castOther.usuario); } public int hashCode() { final int prime = 31; int hash = 17; hash = hash * prime + ((int) (this.rolId ^ (this.rolId >>> 32))); hash = hash * prime + this.usuario.hashCode(); return hash; } }
1377102417428e0c88d7622d24bae123cc51a83e
7262a3137a73d32e8048dc391d6398122496c071
/mse-test/src/main/java/citycloud/stormtest/MyKafkaTopology.java
70ca02db1156fee69d9de2db223dcb94bcc4deab
[]
no_license
New2Niu/mse-handler-storm
31a7d8bdffbf719260b3dfd46ce8bad6d94f67b8
03620903b054bca55c783d44168b949be629a115
refs/heads/master
2020-12-30T12:22:49.331501
2018-03-09T07:48:25
2018-03-09T07:48:25
91,424,341
0
0
null
null
null
null
UTF-8
Java
false
false
6,143
java
package citycloud.stormtest; import citycloud.kafkatest.KafkaProperties; import org.apache.storm.Config; import org.apache.storm.LocalCluster; import org.apache.storm.StormSubmitter; import org.apache.storm.generated.AlreadyAliveException; import org.apache.storm.generated.AuthorizationException; import org.apache.storm.generated.InvalidTopologyException; import org.apache.storm.kafka.*; import org.apache.storm.spout.SchemeAsMultiScheme; import org.apache.storm.task.OutputCollector; import org.apache.storm.task.TopologyContext; import org.apache.storm.topology.OutputFieldsDeclarer; import org.apache.storm.topology.TopologyBuilder; import org.apache.storm.topology.base.BaseRichBolt; import org.apache.storm.tuple.Fields; import org.apache.storm.tuple.Tuple; import org.apache.storm.tuple.Values; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Arrays; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Map.Entry; import java.util.concurrent.atomic.AtomicInteger; /** * Created by Administrator on 2017-1-6. */ public class MyKafkaTopology { public static class KafkaWordSplitter extends BaseRichBolt { private static final Logger LOG = LoggerFactory.getLogger(MyKafkaTopology.class); private static final long serialVersionUID = 886149197481637894L; private OutputCollector collector; @Override public void prepare(Map stormConf, TopologyContext context, OutputCollector collector) { this.collector = collector; } @Override public void execute(Tuple input) { String line = input.getString(0); LOG.info("RECV[kafka -> splitter] " + line); System.out.println("RECV[kafka -> splitter] " + line); String[] words = line.split("\\s+"); for(String word : words) { LOG.info("EMIT[splitter -> counter] " + word); collector.emit(input, new Values(word, 1)); } collector.ack(input); } @Override public void declareOutputFields(OutputFieldsDeclarer declarer) { declarer.declare(new Fields("word", "count")); } } public static class WordCounter extends BaseRichBolt { private static final Logger LOG = LoggerFactory.getLogger(WordCounter.class); private static final long serialVersionUID = 886149197481637894L; private OutputCollector collector; private Map<String, AtomicInteger> counterMap; @Override public void prepare(Map stormConf, TopologyContext context, OutputCollector collector) { this.collector = collector; this.counterMap = new HashMap<String, AtomicInteger>(); } @Override public void execute(Tuple input) { String word = input.getString(0); int count = input.getInteger(1); LOG.info("RECV[splitter -> counter] " + word + " : " + count); AtomicInteger ai = this.counterMap.get(word); if(ai == null) { ai = new AtomicInteger(); //this.counterMap.put(word, ai); } ai.addAndGet(count); collector.ack(input); //LOG.info("CHECK statistics map: " + this.counterMap); } @Override public void cleanup() { LOG.info("The final result:"); System.out.println("The final result:"); Iterator<Entry<String, AtomicInteger>> iter = this.counterMap.entrySet().iterator(); while(iter.hasNext()) { Entry<String, AtomicInteger> entry = iter.next(); LOG.info(entry.getKey() + "\t:\t" + entry.getValue().get()); System.out.println(entry.getKey() + "\t:\t" + entry.getValue().get()); } } @Override public void declareOutputFields(OutputFieldsDeclarer declarer) { declarer.declare(new Fields("word", "count")); } } public static void main(String[] args) throws AlreadyAliveException, InvalidTopologyException, InterruptedException,AuthorizationException { String zks = "citycloud-224:2181,citycloud-224:2181,citycloud-224:2181"; String topic = KafkaProperties.topic; String zkRoot = "/stormK"; // default zookeeper root configuration for storm String id = "word"; BrokerHosts brokerHosts = new ZkHosts(zks); SpoutConfig spoutConf = new SpoutConfig(brokerHosts, topic, zkRoot, id); spoutConf.scheme = new SchemeAsMultiScheme(new StringScheme()); //spoutConf.forceFromStart = false; spoutConf.startOffsetTime=kafka.api.OffsetRequest.EarliestTime(); spoutConf.zkServers = Arrays.asList(new String[] {"citycloud-224","citycloud-225","citycloud-226"}); spoutConf.zkPort = 2181; TopologyBuilder builder = new TopologyBuilder(); builder.setSpout("kafka-reader", new KafkaSpout(spoutConf), 5); // 这里并行度设置为5 builder.setBolt("word-splitter", new KafkaWordSplitter(), 2).shuffleGrouping("kafka-reader"); builder.setBolt("word-counter", new WordCounter()).fieldsGrouping("word-splitter", new Fields("word")); Config conf = new Config(); String name = MyKafkaTopology.class.getSimpleName(); if (args != null && args.length > 0) { // Nimbus host name passed from command line //conf.put(Config.NIMBUS_HOST, args[0]); conf.put(Config.NIMBUS_SEEDS,Arrays.asList(args[0])); conf.setNumWorkers(3); StormSubmitter.submitTopologyWithProgressBar(name+"1", conf, builder.createTopology()); //StormSubmitter.submitTopology(name,conf,builder.createTopology()); } else { conf.setMaxTaskParallelism(3); LocalCluster cluster = new LocalCluster(); cluster.submitTopology(name, conf, builder.createTopology()); Thread.sleep(60000); //cluster.shutdown(); } } }
f638ce680eb6092901fd888c4932e12ed6813eeb
2a891c6aaa4ec16f17e7be6d9d5c67b2d9f67a07
/stock-debate-api/src/test/java/lt/liutikas/stockdebate/service/ForecastServiceTest.java
fba18acfa7a5c6ecb09e7783ec286a48726aa6f2
[]
no_license
Guguskis/stock-debate
65a1241ae809cd0ed50432e4c168d3a9b783da8c
06e6409748ba32fc4fab8ecb03d3ba0e18afc5d4
refs/heads/main
2023-07-15T11:41:41.513773
2021-08-26T18:40:35
2021-08-26T18:40:35
314,058,209
0
0
null
null
null
null
UTF-8
Java
false
false
9,621
java
package lt.liutikas.stockdebate.service; import lt.liutikas.stockdebate.helper.ForecastParser; import lt.liutikas.stockdebate.model.*; import lt.liutikas.stockdebate.repository.DiscussionRepository; import lt.liutikas.stockdebate.repository.StockRepository; import org.junit.Before; import org.junit.Test; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.client.HttpClientErrorException; import java.time.Clock; import java.time.Instant; import java.time.LocalDateTime; import java.time.ZoneOffset; import java.util.Collections; import java.util.List; import static org.junit.Assert.assertEquals; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; public class ForecastServiceTest { private static final String NOW = "2020-11-20T18:35:24.00Z"; private StockRepository stockRepository; private DiscussionRepository discussionRepository; private ForecastService forecastService; @Before public void setUp() { Clock clock = Clock.fixed(Instant.parse(NOW), ZoneOffset.UTC); ForecastParser forecastParser = new ForecastParser(clock); stockRepository = mock(StockRepository.class); discussionRepository = mock(DiscussionRepository.class); forecastService = new ForecastService(forecastParser, stockRepository, discussionRepository, clock); } @Test public void getForecasts_userCommentedNotExpiredForecast_ReturnsForecast() { String stockSymbol = "PLTR"; Double latestPrice = 25.; String companyName = "Palantir inc."; String logoUrl = "logo url"; LocalDateTime createdDateTime = LocalDateTime.of(2020, 11, 4, 0, 0); String createdDateString = "2020-11-04T00:00:00"; String expirationDateString = "2020-12-04T00:00:00"; ForecastType forecastType = ForecastType.CALL; Double strikePrice = 24.; Double successCoefficient = 0.04; Comment comment = new Comment(); comment.setText("YOLO PLTR 24c 12/4"); comment.setCreationDate(createdDateTime); Stock stock = new Stock(); stock.setSymbol(stockSymbol); stock.setLatestPrice(latestPrice); stock.setCompanyName(companyName); stock.setLogoUrl(logoUrl); SimpleStockDetail simpleStockDetail = new SimpleStockDetail(); simpleStockDetail.setPrice(latestPrice); when(discussionRepository.getComments("John")) .thenReturn(Collections.singletonList(comment)); when(stockRepository.getStock(stockSymbol)) .thenReturn(stock); when(stockRepository.getSimpleStockDetail(stockSymbol, expirationDateString)) .thenReturn(simpleStockDetail); ResponseEntity responseEntity = forecastService.getForecasts("John"); RedditUser redditUser = (RedditUser) responseEntity.getBody(); List<Forecast> forecasts = redditUser.getForecasts(); assertEquals(forecasts.size(), 1); assertNotExpiredForecast(forecasts.get(0), stockSymbol, latestPrice, companyName, logoUrl, createdDateString, expirationDateString, forecastType, strikePrice, successCoefficient); } @Test public void getForecasts_userCommentedExpiredForecast_ReturnsForecast() { String stockSymbol = "PLTR"; Double latestPrice = 25.; String companyName = "Palantir inc."; String logoUrl = "logo url"; LocalDateTime createdDateTime = LocalDateTime.of(2020, 11, 4, 0, 0); String createdDateString = "2020-11-04T00:00:00"; String expirationDateString = "2020-11-16T00:00:00"; ForecastType forecastType = ForecastType.CALL; Double strikePrice = 24.; Double expirationPrice = 28.; Double successCoefficient = 0.1428; Comment comment = new Comment(); comment.setText("YOLO PLTR 24c 11/16"); comment.setCreationDate(createdDateTime); Stock stock = new Stock(); stock.setSymbol(stockSymbol); stock.setLatestPrice(latestPrice); stock.setCompanyName(companyName); stock.setLogoUrl(logoUrl); SimpleStockDetail simpleStockDetail = new SimpleStockDetail(); simpleStockDetail.setDate(expirationDateString); simpleStockDetail.setSymbol(stockSymbol); simpleStockDetail.setPrice(expirationPrice); when(discussionRepository.getComments("John")) .thenReturn(Collections.singletonList(comment)); when(stockRepository.getStock(stockSymbol)) .thenReturn(stock); when(stockRepository.getSimpleStockDetail(stockSymbol, expirationDateString)) .thenReturn(simpleStockDetail); ResponseEntity responseEntity = forecastService.getForecasts("John"); RedditUser redditUser = (RedditUser) responseEntity.getBody(); List<Forecast> forecasts = redditUser.getForecasts(); assertEquals(forecasts.size(), 1); assertExpiredForecast(forecasts.get(0), stockSymbol, latestPrice, companyName, logoUrl, createdDateString, expirationDateString, forecastType, strikePrice, expirationPrice, successCoefficient); } @Test public void getForecasts_userCommentedNotExistingStock_ReturnsNoForecasts() { String stockSymbol = "meme"; LocalDateTime createdDateTime = LocalDateTime.of(2020, 11, 4, 0, 0); Comment comment = new Comment(); comment.setText("YOLO meme 24c 11/16"); comment.setCreationDate(createdDateTime); when(discussionRepository.getComments("John")) .thenReturn(Collections.singletonList(comment)); when(stockRepository.getStock(stockSymbol)) .thenThrow(new HttpClientErrorException(HttpStatus.NOT_FOUND)); ResponseEntity responseEntity = forecastService.getForecasts("John"); RedditUser redditUser = (RedditUser) responseEntity.getBody(); List<Forecast> forecasts = redditUser.getForecasts(); assertEquals(forecasts.size(), 0); } @Test public void getForecasts_userIncorrectlyCommentedForecast_ReturnsNoForecasts() { String stockSymbol = "PLTR"; Double latestPrice = 25.; String companyName = "Palantir inc."; String logoUrl = "logo url"; Comment comment = new Comment(); comment.setText("Put 2k in PLTR FD calls 12/4"); LocalDateTime createdDateTime = LocalDateTime.of(2020, 11, 4, 0, 0); comment.setCreationDate(createdDateTime); Stock stock = new Stock(); stock.setSymbol(stockSymbol); stock.setLatestPrice(latestPrice); stock.setCompanyName(companyName); stock.setLogoUrl(logoUrl); when(discussionRepository.getComments("John")) .thenReturn(Collections.singletonList(comment)); ResponseEntity responseEntity = forecastService.getForecasts("John"); RedditUser redditUser = (RedditUser) responseEntity.getBody(); List<Forecast> forecasts = redditUser.getForecasts(); assertEquals(forecasts.size(), 0); } @Test public void getForecasts_userNotCommented_ReturnsNoForecasts() { when(discussionRepository.getComments("John")) .thenReturn(Collections.emptyList()); ResponseEntity responseEntity = forecastService.getForecasts("John"); RedditUser redditUser = (RedditUser) responseEntity.getBody(); List<Forecast> forecasts = redditUser.getForecasts(); assertEquals(forecasts.size(), 0); } private void assertNotExpiredForecast(Forecast forecast, String stockSymbol, double latestPrice, String companyName, String logoUrl, String createdDateString, String expirationDateString, ForecastType forecastType, double strikePrice, double successCoefficient) { assertEquals(stockSymbol, forecast.getStock().getSymbol()); assertEquals(latestPrice, forecast.getStock().getLatestPrice(), 0.001); assertEquals(companyName, forecast.getStock().getCompanyName()); assertEquals(logoUrl, forecast.getStock().getLogoUrl()); assertEquals(createdDateString, forecast.getCreatedDate()); assertEquals(expirationDateString, forecast.getExpirationDate()); assertEquals(forecastType, forecast.getForecastType()); assertEquals(strikePrice, forecast.getStrikePrice(), 0.001); assertEquals(successCoefficient, forecast.getSuccessCoefficient(), 0.001); } private void assertExpiredForecast(Forecast forecast, String stockSymbol, double latestPrice, String companyName, String logoUrl, String createdDateString, String expirationDateString, ForecastType forecastType, double strikePrice, double expirationPrice, double successCoefficient) { assertEquals(stockSymbol, forecast.getStock().getSymbol()); assertEquals(latestPrice, forecast.getStock().getLatestPrice(), 0.001); assertEquals(companyName, forecast.getStock().getCompanyName()); assertEquals(logoUrl, forecast.getStock().getLogoUrl()); assertEquals(createdDateString, forecast.getCreatedDate()); assertEquals(expirationDateString, forecast.getExpirationDate()); assertEquals(expirationPrice, forecast.getExpirationPrice(), 0.001); assertEquals(forecastType, forecast.getForecastType()); assertEquals(strikePrice, forecast.getStrikePrice(), 0.001); assertEquals(successCoefficient, forecast.getSuccessCoefficient(), 0.001); } }
1fdff3fad427e9a845551a6fc010010edd968304
907bfff5f484fd7965686b29cea401cbf1e68bc4
/ovls_study_server/src/main/java/cn/xdl/ovls/study/user/bean/CollectNote.java
a32b2edaa419ad815c5e881cb98a2a9aaf522603
[]
no_license
CHShindou/FirstRep
df9ff9734b90665e1e497727c15a703054af3e86
43d939f2d6cf7c85bd258173314233a2d9c7c9eb
refs/heads/master
2021-04-03T07:33:31.480030
2018-11-15T06:47:19
2018-11-15T06:47:19
124,735,227
0
0
null
null
null
null
UTF-8
Java
false
false
4,509
java
package cn.xdl.ovls.study.user.bean; import java.io.Serializable; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; import cn.xdl.ovls.study.video.bean.Note; import cn.xdl.ovls.study.video.bean.Video; public class CollectNote implements Serializable{ /** * This field was generated by MyBatis Generator. * This field corresponds to the database column collect_note.id * * @mbggenerated Wed Oct 03 18:44:56 CST 2018 */ private Integer id; /** * This field was generated by MyBatis Generator. * This field corresponds to the database column collect_note.user_id * * @mbggenerated Wed Oct 03 18:44:56 CST 2018 */ private Integer userId; /** * This field was generated by MyBatis Generator. * This field corresponds to the database column collect_note.note_id * * @mbggenerated Wed Oct 03 18:44:56 CST 2018 */ private Integer noteId; /** * This field was generated by MyBatis Generator. * This field corresponds to the database column collect_note.collect_time * * @mbggenerated Wed Oct 03 18:44:56 CST 2018 */ private Date collectTime; /** * 收藏的笔记详细信息 * */ private Note note; /** * 笔记所在的视频信息 * */ private Video video; public Note getNote() { return note; } public void setNote(Note note) { this.note = note; } public Video getVideo() { return video; } public void setVideo(Video video) { this.video = video; } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column collect_note.id * * @return the value of collect_note.id * * @mbggenerated Wed Oct 03 18:44:56 CST 2018 */ public Integer getId() { return id; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column collect_note.id * * @param id the value for collect_note.id * * @mbggenerated Wed Oct 03 18:44:56 CST 2018 */ public void setId(Integer id) { this.id = id; } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column collect_note.user_id * * @return the value of collect_note.user_id * * @mbggenerated Wed Oct 03 18:44:56 CST 2018 */ public Integer getUserId() { return userId; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column collect_note.user_id * * @param userId the value for collect_note.user_id * * @mbggenerated Wed Oct 03 18:44:56 CST 2018 */ public void setUserId(Integer userId) { this.userId = userId; } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column collect_note.note_id * * @return the value of collect_note.note_id * * @mbggenerated Wed Oct 03 18:44:56 CST 2018 */ public Integer getNoteId() { return noteId; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column collect_note.note_id * * @param noteId the value for collect_note.note_id * * @mbggenerated Wed Oct 03 18:44:56 CST 2018 */ public void setNoteId(Integer noteId) { this.noteId = noteId; } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column collect_note.collect_time * * @return the value of collect_note.collect_time * * @mbggenerated Wed Oct 03 18:44:56 CST 2018 */ @JsonFormat(pattern="yyyy-MM-dd",timezone = "GMT+8") public Date getCollectTime() { return collectTime; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column collect_note.collect_time * * @param collectTime the value for collect_note.collect_time * * @mbggenerated Wed Oct 03 18:44:56 CST 2018 */ public void setCollectTime(Date collectTime) { this.collectTime = collectTime; } }
058b3a2276b2b0260e361cde6bec9dbc158253a1
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Chart/5/org/jfree/chart/plot/XYPlot_setFixedRangeAxisSpace_4762.java
2e7e1d7eccd36718d387eafa37e74a80033b52fa
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
6,047
java
org jfree chart plot gener plot data form pair plot data link dataset xydataset code plot xyplot code make link item render xyitemrender draw point plot render chart type produc link org jfree chart chart factori chartfactori method creat pre configur chart plot xyplot plot axi plot valueaxisplot zoomabl set fix rang axi space request send link plot chang event plotchangeev regist listen param space space code code permit param notifi notifi listen fix rang axi space getfixedrangeaxisspac set fix rang axi space setfixedrangeaxisspac axi space axisspac space notifi fix rang axi space fixedrangeaxisspac space notifi fire chang event firechangeev
996639e57b3bd000fc1f6eeab083420f987b1e75
1a0c90079f6d8e94c038c2bc565d4371a06d3dc3
/CorporateChat/app/src/main/java/com/hit/corporatechat/ChatView.java
781c104abf8984d8c5055fc957d6832cec996838
[]
no_license
pavelpalei/Corporate-Chat
b1c0dce0fdb0973bf4c48fa93fb241be4ea7c23a
b9124f4ea868b3d9f51b560c941f3f256aa55c57
refs/heads/master
2021-01-10T05:29:22.366239
2016-03-25T18:24:37
2016-03-25T18:24:37
53,214,962
1
0
null
null
null
null
UTF-8
Java
false
false
804
java
package com.hit.corporatechat; import android.content.Context; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.LinearLayout; import android.widget.Toast; /** * Created by pasha on 11-Mar-16. * the class represent the user interface of the chat */ public class ChatView extends LinearLayout { private View mView; Context mycontext; public ChatView(Context context, AttributeSet attrs) { super(context, attrs); this.mycontext = context; // LayoutInflater inflater; // inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); mView = inflate(mycontext, R.layout.chat_layout, this); } }
c6561d0d478ac56d12484a4945af1f83c3fc6a53
28b9b8c09c4cde0acf1714b18a13c65539a00498
/src/main/Main.java
7764e77af2439352f5b9c9cb5ddb76346c446460
[]
no_license
ShlomiZi/Reversi-GUI
f35ede6033693719f5781c363da3e77cb9ca14ab
0d837233afd931ecb75e1896db6d240f9bdb4d19
refs/heads/master
2020-04-11T16:29:20.237129
2018-12-15T17:59:41
2018-12-15T17:59:41
161,925,906
0
0
null
null
null
null
UTF-8
Java
false
false
1,044
java
package main; import javafx.application.Application; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.stage.Stage; import javafx.fxml.FXMLLoader; import java.io.IOException; public class Main extends Application { /** * Main JavaFX function. * * @param args no command line arguments */ public static void main(String[] args) { launch(args); } /** * Start function of Application class. * * @param primaryStage the main stage */ @Override public void start(Stage primaryStage) { Parent root = null; try { //loading fxml for main menu root = FXMLLoader.load(getClass().getResource("/javafx/menu.fxml")); } catch (IOException e) { e.printStackTrace(); } //setting the primary windows size and title primaryStage.setTitle("Reversi"); primaryStage.setScene(new Scene(root, 500, 350)); primaryStage.show(); } }
7f687a060aaa54a14894969e9d1115cae32d76de
1783c0f9bc3f7a96aeb5dde47310d5b29ce67e16
/EStore/src/main/java/com/uciext/springfw/hw/catalog/model/Catalog.java
e457d1af6b24a8feaa8349d930fef1aeb38c7703
[]
no_license
AgentBluenote/week2
4de31127590b910b2cdea98b1b73f94e19040ffe
87de0ba125d1439b45bd5bb3bb813b6de1570ea1
refs/heads/master
2021-04-30T16:46:51.095039
2017-01-31T22:13:21
2017-01-31T22:13:21
80,132,383
0
0
null
null
null
null
UTF-8
Java
false
false
1,478
java
package com.uciext.springfw.hw.catalog.model; import java.lang.StringBuilder; import java.util.List; import java.util.Map; import org.apache.log4j.Logger; import com.uciext.springfw.hw.EStoreApp; public class Catalog { private static Logger logger = Logger.getLogger(Catalog.class.getName()); // Properties private String catalogName; private String lastUpdateDate; private List<Product> productList; // private Map<String, Product> productMap; public String getCatalogName() { return catalogName; } public void setCatalogName(String value) { this.catalogName = value; } public String getLastUpdateDate() { return lastUpdateDate; } public void setLastUpdateDate(String value) { this.lastUpdateDate = value; } /* public void setCatalogMap(Map<String, Product> value) { productMap = value; } public Map<String, Product> getCatalogMap() { return productMap; } */ public List<Product> getProductList() { return productList; } public void setProductList(List<Product> value) { this.productList = value; } public String toString() { StringBuilder buff = new StringBuilder("[Catalog: ") .append("catalogName=").append(catalogName) .append(", lastUpdateDate=").append(lastUpdateDate) .append("]") ; return buff.toString(); } }
[ "Michael@Michael-PC" ]
Michael@Michael-PC
4bc01a538380366ce687e8ae40dae22634762fbd
65cfe9d5b7a9caff46737bec1f0416c4599eedb8
/src/plugins/monitoring/src/java/org/jivesoftware/openfire/archive/cluster/GetConversationCountTask.java
c13682b7937d66105f664016ec074cf907ed73b6
[]
no_license
licheng-xd/openfire-instlink
22f71eda6b129faac0fd81fea1fede0deb3c8709
e2e0212b7299ee1a9071089fc557c2e0026f1f7e
refs/heads/master
2021-01-10T21:15:49.455647
2014-12-11T08:57:31
2014-12-11T08:57:31
27,858,043
1
2
null
null
null
null
UTF-8
Java
false
false
1,968
java
/** * $Revision: $ * $Date: $ * * Copyright (C) 2008 Jive Software. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jivesoftware.openfire.archive.cluster; import org.jivesoftware.openfire.archive.ConversationManager; import org.jivesoftware.openfire.XMPPServer; import org.jivesoftware.openfire.plugin.MonitoringPlugin; import org.jivesoftware.util.cache.ClusterTask; import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; /** * Task that will return the number of current conversations taking place in the senior cluster member. * All conversations in the cluster are kept in the senior cluster member. * * @author Gaston Dombiak */ public class GetConversationCountTask implements ClusterTask { private int conversationCount; public Object getResult() { return conversationCount; } public void run() { MonitoringPlugin plugin = (MonitoringPlugin) XMPPServer.getInstance().getPluginManager().getPlugin( "monitoring"); ConversationManager conversationManager = (ConversationManager)plugin.getModule(ConversationManager.class); conversationCount = conversationManager.getConversationCount(); } public void writeExternal(ObjectOutput out) throws IOException { // Do nothing } public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { // Do nothing } }
bcbbaefebd7e2de4f8d4847a88f50a89ceb02c33
3fd3865522aee51f904d9217e17049bbfc24e206
/sommor-core/src/main/java/com/sommor/core/curd/CurdManager.java
064a7fe98a435875d458b6d57e21855d708dbd1e
[]
no_license
sommor-projects/sommor
73b5b22795f437032ea5029432eaed9fb16ac0fe
8eab1ff749ad02e4f85d128204e6b30e7ad41052
refs/heads/master
2022-06-25T05:28:40.228084
2020-04-16T13:48:01
2020-04-16T13:48:01
216,987,083
0
0
null
2022-06-17T02:38:22
2019-10-23T06:45:55
Java
UTF-8
Java
false
false
2,266
java
package com.sommor.core.curd; import com.sommor.core.utils.ClassAnnotatedTypeParser; import com.sommor.mybatis.entity.BaseEntity; import com.sommor.mybatis.entity.definition.EntityDefinition; import com.sommor.mybatis.entity.definition.EntityManager; import com.sommor.mybatis.repository.CurdRepository; import org.springframework.beans.BeansException; import org.springframework.beans.factory.config.BeanPostProcessor; import org.springframework.stereotype.Component; import java.util.HashMap; import java.util.Map; /** * @author [email protected] * @since 2019/11/27 */ @Component public class CurdManager implements BeanPostProcessor { private static Map<Class, CurdRepository> entityRepositoryMap = new HashMap<>(); private static Map<Class, CurdService> entityServiceMap = new HashMap<>(); @Override public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { if (bean instanceof CurdRepository) { entityRepositoryMap.put(parseEntityClass(bean, beanName), (CurdRepository) bean); } else if (bean instanceof CurdService) { CurdService curdService = (CurdService) bean; entityServiceMap.put(curdService.getEntityClass(), curdService); } return bean; } private Class parseEntityClass(Object bean, String beanName) { Class[] classes = ClassAnnotatedTypeParser.parse(bean.getClass()); if (null == classes || classes.length == 0) { throw new RuntimeException("unknown entity class for bean: " + beanName); } return classes[0]; } public static <Entity extends BaseEntity> CurdRepository<Entity> getCurdRepository(Class<Entity> entityClass) { return entityRepositoryMap.get(entityClass); } public static <Entity extends BaseEntity> CurdRepository<Entity> getCurdRepository(String subject) { EntityDefinition entityDefinition = EntityManager.getDefinitionBySubject(subject); return null == entityDefinition ? null : entityRepositoryMap.get(entityDefinition.getEntityClass()); } public static <Entity extends BaseEntity> CurdService getCurdService(Class<Entity> entityClass) { return entityServiceMap.get(entityClass); } }
1418ec0c65e66317fc47e27f573a3e13607873a6
ca0ee12fba28d013d4f5de68e2561736b12c1e9d
/src/main/java/com/whc/chapter3/ApplicationContext01/useXML/ClassInfo.java
daa3879e2bbadc98fb2d0467f2da38942a1e7a3e
[]
no_license
northcastle/SpringProject01
4cdf254331a2bed94d0eb3932c95cf2657aa9348
e063de481b3ec0220ff159a63c89e0783ecd820f
refs/heads/master
2022-12-23T15:34:57.122436
2019-09-28T09:58:25
2019-09-28T09:58:25
200,262,278
0
0
null
2022-12-16T04:50:32
2019-08-02T15:58:52
Java
UTF-8
Java
false
false
1,244
java
package com.whc.chapter3.ApplicationContext01.useXML; import org.springframework.stereotype.Component; /** * author : whc * createTime:2019/8/5 22:42 */ public class ClassInfo { private String classNo; private String className; private String classCulture; public ClassInfo() { } public ClassInfo(String classNo, String className, String classCulture) { this.classNo = classNo; this.className = className; this.classCulture = classCulture; } public String getClassNo() { return classNo; } public void setClassNo(String classNo) { this.classNo = classNo; } public String getClassName() { return className; } public void setClassName(String className) { this.className = className; } public String getClassCulture() { return classCulture; } public void setClassCulture(String classCulture) { this.classCulture = classCulture; } @Override public String toString() { return "ClassInfo{" + "classNo=" + classNo + ", className='" + className + '\'' + ", classCulture='" + classCulture + '\'' + '}'; } }
b72cc4014e17192e3fcd89bf7c5b847e97968ecf
b2b05529d6668f4d26644f8c0821de09448a88d6
/starter/critter/src/main/java/com/udacity/jdnd/course3/critter/user/Employee/ManagedEmployeeRepo.java
192cac9d73cd59b87ef0beb67bffc7dfeb83a21e
[ "MIT" ]
permissive
robertkylethomas/critter-main
68e9c010e69b8ecc4b4cea81bcc6171f8f11783e
d55c8099c31d1c4283825bd291dccf094501b933
refs/heads/master
2023-04-29T21:19:03.295061
2021-05-11T07:18:26
2021-05-11T07:18:26
365,953,259
0
0
null
null
null
null
UTF-8
Java
false
false
1,594
java
package com.udacity.jdnd.course3.critter.user.Employee; import org.springframework.stereotype.Repository; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.Query; import java.math.BigInteger; import java.sql.SQLOutput; import java.time.DayOfWeek; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.Set; import java.util.stream.Collectors; @Repository public class ManagedEmployeeRepo { @PersistenceContext EntityManager entityManager; public List<Long> findEmployeeIdsWithAllSkillsOnDay(Set<EmployeeSkill> employeeSkillSet, DayOfWeek dayOfWeek){ String selectStatement = "select e.id " + "FROM Employee AS e, Employee_Skill AS es, Day_of_week AS d " + "WHERE e.id = es.id " + "AND e.id = d.id " + "AND es.skill in "+ processSkills(employeeSkillSet) +" AND d.day = " + dayOfWeek.ordinal() + " " + "GROUP BY e.id HAVING count(es.skill) = " + employeeSkillSet.size(); Query selectQuery = entityManager.createNativeQuery(selectStatement); List<BigInteger> results = selectQuery.getResultList(); List<Long> longIds = new ArrayList<>(); results.forEach(result -> { longIds.add(result.longValue()); }); return longIds; } String processSkills(Set<EmployeeSkill> employeeSkillSet){ String s = "("; Iterator<EmployeeSkill> it = employeeSkillSet.iterator(); while (it.hasNext()){ s += it.next().ordinal(); if(it.hasNext()){ s += ", "; } } s += ")"; return s; } }
2dbceed413a50db46107462a08d51e03592e48dc
5ebf9bc2ee4200843bb9c69228de02f6a44df441
/Algorithms/BinarySearch.java
2fbe55701d975a12ad25f251e5e285d6df7f83ac
[]
no_license
ravali121/data_structures
4194a5ad6ecb8bc484c862325c59243c3a3a45a8
c1dbefa3b395108ba39bec8231024cb3ea69a9ab
refs/heads/master
2022-12-01T12:28:51.535893
2020-08-23T06:24:11
2020-08-23T06:24:11
284,876,110
0
0
null
null
null
null
UTF-8
Java
false
false
1,149
java
package Algorithms; public class BinarySearch { public static void main(String[] args){ int[] arr = {10, 11, 15, 16, 20, 32}; int size = arr.length; int index = binarySearch(arr, 0, size-1, 20); if( index == -1){ System.out.print("Element not found"); }else { System.out.println("Element found at index "+ index); } } private static int binarySearch(int[] arr, int l, int r, int x) { if (r >= l) { int mid = l + (r - l) / 2; // If the element is present at the // middle itself if (arr[mid] == x) return mid; // If element is smaller than mid, then // it can only be present in left subarray if (arr[mid] > x) return binarySearch(arr, l, mid - 1, x); // Else the element can only be present // in right subarray return binarySearch(arr, mid + 1, r, x); } // We reach here when element is not present // in array return -1; } }
c009098a5083e817cc8a6b6020638fc0c5fbfda6
cfcfbf1a014ba08658e5c94256a5acaaaea57cf8
/Semestr3/TP/projects/L4[Cuda_Boze]/src/main/View/ColorHelper.java
de5ff9cc3612ffa39c58294294f9e093fb90affa
[]
no_license
Bohdan-Belik/wppt-archive
508323fcfeb6138961b7559f27119e82a3547513
d9e9123a0da30b60b75189945b016ffc371a6c64
refs/heads/master
2023-03-15T10:47:26.403782
2021-03-11T15:31:29
2021-03-11T16:01:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,805
java
package View; import java.awt.Color; import java.util.HashMap; import Model.Cell.CellColor; public class ColorHelper { public static final Color defaultColor = new Color(220, 220, 220); private static final HashMap<Integer, CellColor> colors2 = new HashMap<Integer, CellColor>(){{ put(1, CellColor.YELLOW); put(2, CellColor.ORANGE); }}; private static final HashMap<Integer, CellColor> colors3 = new HashMap<Integer, CellColor>(){{ put(1, CellColor.YELLOW); put(2, CellColor.BLUE); put(3, CellColor.PINK); }}; private static final HashMap<Integer, CellColor> colors6 = new HashMap<Integer, CellColor>(){{ put(1, CellColor.YELLOW); put(2, CellColor.GREEN); put(3, CellColor.BLUE); put(4, CellColor.ORANGE); put(5, CellColor.PINK); put(6, CellColor.RED); }}; public static final HashMap<CellColor, CellColor> oppositColors = new HashMap<CellColor, CellColor>(){{ put(CellColor.PINK, CellColor.GREEN); put(CellColor.RED, CellColor.BLUE); put(CellColor.YELLOW, CellColor.ORANGE); put(CellColor.GREEN, CellColor.PINK); put(CellColor.BLUE, CellColor.RED); put(CellColor.ORANGE, CellColor.YELLOW); }}; public static CellColor GetColor(int playerID, int playerCount) { switch (playerCount) { case 2: return colors2.get(playerID); case 3: return colors3.get(playerID); case 6: return colors6.get(playerID); } return CellColor.NONE; } public static Color TranslateColor(CellColor c) { switch (c) { case GREEN: return Color.GREEN; case BLUE: return Color.BLUE; case YELLOW: return Color.YELLOW; case RED: return Color.RED; case PINK: return Color.PINK; case ORANGE: return Color.ORANGE; default: return defaultColor; } } }
ce077086b7779a074330386d75057b6bcc8a3ace
b741dcdfe738260c6bfd72310799504400f8045e
/springcloud2020/springcloud2020-payment-remote/src/main/java/com/springcloud2020/payment/remote/IPaymentController.java
8b6f3d5fa26937f9abb1b7f9cca49aff6836b018
[]
no_license
cuixingzheng/my-study-modules
31c7485e50a412625a7b47faf3537bfd1c2a2d22
d8392d11e7e513c972f5d6323832a4aa7635da3a
refs/heads/master
2023-08-22T01:52:08.849579
2021-10-11T01:48:56
2021-10-11T01:48:56
305,886,007
0
0
null
null
null
null
UTF-8
Java
false
false
753
java
package com.springcloud2020.payment.remote; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.stereotype.Component; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.ResponseBody; import java.util.HashMap; import java.util.Map; /** * @author: cxz * @create: 2020/9/30 17:17 * @description: **/ //@Component @FeignClient("SPRINGCLOUD2020-PAYMENT") // 使用FeignClient注解,并配置注册中心当中的服务 public interface IPaymentController { @PostMapping(value = "payment/createPayment") //声明一个与提供者一致的服务api路径 Map<String,Object> createPayment(); }
[ "cuixingzheng@[email protected]" ]
cuixingzheng@[email protected]
3fa9b808b1f4bb6f9134e92879a0d3408775c858
5ef59a3bbc5db4b866f55614182cf853d5a40128
/app/src/main/java/fr/cyberix/kolo/model/entities/Wholesaler.java
79936e111d91946649b776bbcddf31145d652764
[]
no_license
HaroldMT/KoloAndroid
8ccb7cb3338c70acf4753e17d815c389387c69cf
d1d70073115d61d3dbe54eb2b00c3a7341dbb7ec
refs/heads/master
2021-06-15T23:49:45.483283
2018-07-21T15:19:55
2018-07-21T15:19:55
135,452,624
0
0
null
null
null
null
UTF-8
Java
false
false
2,457
java
package fr.cyberix.kolo.model.entities; //------------------------------------------------------------------------------ // <wsdl2code-generated> // This code was generated by http://www.wsdl2code.com version 2.6 // // Date Of Creation: 6/1/2018 1:24:28 PM // Please dont change this code, regeneration will override your changes //</wsdl2code-generated> // //------------------------------------------------------------------------------ // //This source code was auto-generated by Wsdl2Code Version // import org.ksoap2.serialization.KvmSerializable; import org.ksoap2.serialization.PropertyInfo; import org.ksoap2.serialization.SoapObject; import org.ksoap2.serialization.SoapPrimitive; import java.util.Hashtable; public class Wholesaler implements KvmSerializable { private int idPartner; private Partner partner; public Wholesaler() { } public Wholesaler(SoapObject soapObject) { if (soapObject == null) return; if (soapObject.hasProperty("IdPartner")) { Object obj = soapObject.getProperty("IdPartner"); if (obj != null && obj.getClass().equals(SoapPrimitive.class)) { SoapPrimitive j = (SoapPrimitive) obj; setIdPartner(Integer.parseInt(j.toString())); } else if (obj != null && obj instanceof Number) { setIdPartner((Integer) obj); } } if (soapObject.hasProperty("Partner")) { SoapObject j = (SoapObject) soapObject.getProperty("Partner"); setPartner(new Partner(j)); } } @Override public Object getProperty(int arg0) { switch (arg0) { case 0: return getIdPartner(); case 1: return getPartner(); } return null; } @Override public int getPropertyCount() { return 2; } @Override public void setProperty(int arg0, Object arg1) { } @Override public void getPropertyInfo(int index, @SuppressWarnings("rawtypes") Hashtable arg1, PropertyInfo info) { switch (index) { case 0: info.type = PropertyInfo.INTEGER_CLASS; info.name = "IdPartner"; break; case 1: info.type = Partner.class; info.name = "Partner"; break; } } public int getIdPartner() { return idPartner; } public void setIdPartner(int idPartner) { this.idPartner = idPartner; } public Partner getPartner() { return partner; } public void setPartner(Partner partner) { this.partner = partner; } // @Override public String getInnerText() { return null; } // @Override public void setInnerText(String s) { } }
586793ed5fc522087e820d7ef346ecaaa074de38
17537c091572a94c58975214094fdfeedb57fde1
/core/common/data/commonData/src/main/java/com/home/commonData/data/social/chat/ChatDO.java
a4f21af0a58caa4dfb56c808f9a85b04d1aa8c60
[ "Apache-2.0" ]
permissive
mengtest/home3
dc2e5f910bbca6e536ded94d3f749671f0ca76d5
a15a63694918483b2e4853edab197b5cdddca560
refs/heads/master
2023-01-29T13:49:23.822515
2020-12-11T10:17:39
2020-12-11T10:17:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
283
java
package com.home.commonData.data.social.chat; import com.home.shineData.support.MaybeNull; import java.util.List; /** 聊天数据 */ public class ChatDO { /** 类型 */ int type; /** 文字 */ String text; /** 聊天元素组 */ @MaybeNull List<ChatElementDO> elements; }
068e2dbb557f76380d9d7103974b5ddcf9556fb1
d42277640e910ebbb92fea0735b37700be9701ea
/AR-Web/src/ar/edu/uade/tic/tesis/arweb/modelo/tecnicas/generales/TecnicaG151.java
96f54a36075cefb74eb5571b40dae93000ab5ba4
[]
no_license
olivarimaximilianoUADE/ARWeb
9b135d8a626416f8c47ff43e6dfc646557340695
01de0cff3153f2a31d44f086bd8841a847289c38
refs/heads/master
2020-03-28T00:03:42.542695
2018-09-07T23:59:01
2018-09-07T23:59:01
147,371,812
0
0
null
null
null
null
ISO-8859-1
Java
false
false
2,587
java
package ar.edu.uade.tic.tesis.arweb.modelo.tecnicas.generales; import ar.edu.uade.tic.tesis.arweb.modelo.evaluacion.ResultadoEvaluacionTecnica; import ar.edu.uade.tic.tesis.arweb.modelo.evaluacion.ResultadoEvaluacionTecnicaItem; import ar.edu.uade.tic.tesis.arweb.modelo.evaluacion.TipoResultadoEvaluacion; import ar.edu.uade.tic.tesis.arweb.modelo.evaluacion.Tipologia; import ar.edu.uade.tic.tesis.arweb.modelo.tecnicas.CategoriaTecnica; import ar.edu.uade.tic.tesis.arweb.util.parser.Parseador; public class TecnicaG151 extends TecnicaGeneral { public TecnicaG151(CategoriaTecnica categoriaTecnica) { super( "G151", "Proporcionar un enlace a una transcripción de texto de una declaración preparada o script si los scripts estan permitidos.", "El objetivo de esta técnica es proporcionar una transcripción o guión si el contenido de audio en vivo sigue un guión establecido. Debido a que está preparado de antemano, el guión puede ser más preciso y completo que la transcripción en vivo. Sin embargo, la secuencia de comandos no se sincronizará con el audio mientras se reproduce. El audio en vivo no debe desviarse del guión de esta técnica. Con esta técnica, se proporciona un enlace a la transcripción o secuencia de comandos y debe conformarse a WCAG 2.0 y podría incluirse en otra ubicación en la misma página web o en otro URI.", categoriaTecnica); } /** * 1. Compruebe la presencia de un enlace que apunta directamente al guión o transcripción. * 2. Verifique que el audio en vivo siga el guion. * 3. Si la (s) versión (s) alternativa (s) están en una página separada, verifique la disponibilidad de los enlaces para permitirle al usuario acceder a las otras versiones. */ public ResultadoEvaluacionTecnica validarAccesibilidadPorTecnica(Parseador parseador) { this.setParseador(parseador); ResultadoEvaluacionTecnica resultadoEvaluacionTecnica = new ResultadoEvaluacionTecnica(this); ResultadoEvaluacionTecnicaItem comprobacionSubtitulos = new ResultadoEvaluacionTecnicaItem( Tipologia.PRESENTACION, "Transcripción de texto por audio.", TipoResultadoEvaluacion.IMPOSIBLE, "Comprobar la presencia de un enlace que apunta directamente al guión o transcripción.", "Proporciona un enlace a una transcripción de texto por cada audio en vivo que siga con guión preestablecido."); comprobacionSubtitulos.procesar(); resultadoEvaluacionTecnica.agregarResultadoEvaluacionTecnicaItem(comprobacionSubtitulos); return resultadoEvaluacionTecnica; } }
f757043cac12d3c7278222eecccca9f1a5d060f4
d3500570a68b35032c1449f1cefa8bd74c8b0705
/server/src/main/java/edu/duke/ece651_g10/server/ConnectedTerritoryChecker.java
a492027923e9079f934f21f4ca2b9e9e626dec4d
[]
no_license
XueyangLiu1/ECE651_RISK_GAME
268f94f6b2dcec6c113bc0d768a9f088d42382ef
acf82b08bda8382f81ff26f6284c8ade2cf6a7ec
refs/heads/main
2023-04-09T02:41:22.115828
2021-04-27T08:10:15
2021-04-27T08:10:15
362,027,224
0
0
null
null
null
null
UTF-8
Java
false
false
2,205
java
package edu.duke.ece651_g10.server; import java.util.HashSet; /** * The RuleChecker to check whether two territories connected with each other */ public class ConnectedTerritoryChecker extends RuleChecker<TerritoryToTerritoryOrder> { final HashSet<Territory> waypoints; /** * The constructor of the the ConnectedTerritoryChecker * * @param next The next RuleChecker */ public ConnectedTerritoryChecker(RuleChecker<TerritoryToTerritoryOrder> next) { super(next); this.waypoints = new HashSet<Territory>(); } /** * To search whether the source territory and target territory are connected in * the player's territories * * @param current the current Territory * @param target the target Territory * @param selfID the Player's ID * @param gameMap the game map * @return if the source and target is connected, then return true, otherwise * return false. */ private boolean searchConnection(Territory current, Territory target, int selfID, GameMap gameMap) { if (current.getNeighbours().contains(target)) { return true; } else { waypoints.add(current); for (Territory t : current.getNeighbours()) { // Also needs to check whether the player own the neighbours if (gameMap.getOwnership().get(t).getPlayerID() == selfID && !waypoints.contains(t)) { if (searchConnection(t, target, selfID, gameMap)) { return true; } } } } return false; } /** * Check whether the order is following the rule defined in the following * method. * * @param order the order frome the player * @param gameMap the game map of the game * @return if the rule is not violated, return null. Otherwise, return the * reason casuing the invalid placement */ @Override protected String checkMyRule(TerritoryToTerritoryOrder order, GameMap gameMap) { if (!searchConnection(order.getSourceTerritory(), order.getTargetTerritory(), order.getPlayerID(), gameMap)) { waypoints.clear(); return "The source territory and target territory are not connected."; } waypoints.clear(); return null; } }
4bfca2d45a9786e22e527a5c58f0416a8ded7068
3fc503bed9e8ba2f8c49ebf7783bcdaa78951ba8
/TRAVACC_R5/ndcfacades/src/de/hybris/platform/ndcfacades/ndc/KeyWithMetaObjectBaseType.java
b1000587122f59f5a41fe1b28f858f2b163c6106
[]
no_license
RabeS/model-T
3e64b2dfcbcf638bc872ae443e2cdfeef4378e29
bee93c489e3a2034b83ba331e874ccf2c5ff10a9
refs/heads/master
2021-07-01T02:13:15.818439
2020-09-05T08:33:43
2020-09-05T08:33:43
147,307,585
0
0
null
null
null
null
UTF-8
Java
false
false
30,920
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2017.02.07 at 04:46:04 PM GMT // package de.hybris.platform.ndcfacades.ndc; import java.util.ArrayList; 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.XmlID; import javax.xml.bind.annotation.XmlIDREF; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import javax.xml.datatype.XMLGregorianCalendar; /** * A base type for a Keyed Object with Metadata Reference.. * * <p>Java class for KeyWithMetaObjectBaseType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="KeyWithMetaObjectBaseType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;attGroup ref="{http://www.iata.org/IATA/EDIST}ObjectKeyMetaAttrGroup"/> * &lt;attribute name="DisplayAllInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="AllExemptInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="PricingInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="ConnectionInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="E_TicketInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="TicketlessInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="AssociateInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="TaxOnEMD_Ind" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="StopOverInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="TaxInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="OtherChargeInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="PoolingInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="SpecialItemsInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="TaxesInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="NetFareInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="ReissueOnlyInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="AutoExchangeInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="AlertInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="AuthenticationInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="MarketingInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="MultiPayFormInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="NoticeInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="PartialInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="WarningInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="FailedPaymentInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="PartialPaymentInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="VerificationInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="PriceVarianceInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="InvGuaranteedInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="WaitlistInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="BundleInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="InvGuarRequestedInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="ExitRowInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="PremiumInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="UpperDeckInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="TaxIncludedInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="FeeIncludedInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="LeadPricingInd" type="{http://www.w3.org/2001/XMLSchema}boolean" /> * &lt;attribute name="Timestamp" type="{http://www.w3.org/2001/XMLSchema}dateTime" /> * &lt;attribute name="MetadataToken" type="{http://www.iata.org/IATA/EDIST}DescriptionSimpleType" /> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "KeyWithMetaObjectBaseType") @XmlSeeAlso({ de.hybris.platform.ndcfacades.ndc.OrderListRQ.Query.Filters.Passengers.FOID.class, de.hybris.platform.ndcfacades.ndc.OrderListRQ.Query.Filters.Payments.Method.class, de.hybris.platform.ndcfacades.ndc.ItinReshopRQ.Query.Reshop.Actions.OfferItemSets.OfferItemSet.class, de.hybris.platform.ndcfacades.ndc.OrderRetrieveRQ.Query.Filters.Passengers.PassengerIDInfo.FOID.class, de.hybris.platform.ndcfacades.ndc.OrderRetrieveRQ.Query.Filters.Payments.Method.class, AddressCoreType.class, FltDepartQualifiedQueryType.class, PaymentCardType.class, InvGuaranteeNoticeType.class, de.hybris.platform.ndcfacades.ndc.FareRulesRemarks.FareRulesRemark.class, FareBasisCodeType.class, de.hybris.platform.ndcfacades.ndc.OrdCreateNoticesType.PriceVarianceRules.PriceVarianceRule.class, de.hybris.platform.ndcfacades.ndc.OrdChangeNoticesType.PriceVarianceRules.PriceVarianceRule.class, PriceGuarTimeLimitType.class, PricedFlightOffer.class }) public class KeyWithMetaObjectBaseType { @XmlAttribute(name = "DisplayAllInd") protected Boolean displayAllInd; @XmlAttribute(name = "AllExemptInd") protected Boolean allExemptInd; @XmlAttribute(name = "PricingInd") protected Boolean pricingInd; @XmlAttribute(name = "ConnectionInd") protected Boolean connectionInd; @XmlAttribute(name = "E_TicketInd") protected Boolean eTicketInd; @XmlAttribute(name = "TicketlessInd") protected Boolean ticketlessInd; @XmlAttribute(name = "AssociateInd") protected Boolean associateInd; @XmlAttribute(name = "TaxOnEMD_Ind") protected Boolean taxOnEMDInd; @XmlAttribute(name = "StopOverInd") protected Boolean stopOverInd; @XmlAttribute(name = "TaxInd") protected Boolean taxInd; @XmlAttribute(name = "OtherChargeInd") protected Boolean otherChargeInd; @XmlAttribute(name = "PoolingInd") protected Boolean poolingInd; @XmlAttribute(name = "SpecialItemsInd") protected Boolean specialItemsInd; @XmlAttribute(name = "TaxesInd") protected Boolean taxesInd; @XmlAttribute(name = "NetFareInd") protected Boolean netFareInd; @XmlAttribute(name = "ReissueOnlyInd") protected Boolean reissueOnlyInd; @XmlAttribute(name = "AutoExchangeInd") protected Boolean autoExchangeInd; @XmlAttribute(name = "AlertInd") protected Boolean alertInd; @XmlAttribute(name = "AuthenticationInd") protected Boolean authenticationInd; @XmlAttribute(name = "MarketingInd") protected Boolean marketingInd; @XmlAttribute(name = "MultiPayFormInd") protected Boolean multiPayFormInd; @XmlAttribute(name = "NoticeInd") protected Boolean noticeInd; @XmlAttribute(name = "PartialInd") protected Boolean partialInd; @XmlAttribute(name = "WarningInd") protected Boolean warningInd; @XmlAttribute(name = "FailedPaymentInd") protected Boolean failedPaymentInd; @XmlAttribute(name = "PartialPaymentInd") protected Boolean partialPaymentInd; @XmlAttribute(name = "VerificationInd") protected Boolean verificationInd; @XmlAttribute(name = "PriceVarianceInd") protected Boolean priceVarianceInd; @XmlAttribute(name = "InvGuaranteedInd") protected Boolean invGuaranteedInd; @XmlAttribute(name = "WaitlistInd") protected Boolean waitlistInd; @XmlAttribute(name = "BundleInd") protected Boolean bundleInd; @XmlAttribute(name = "InvGuarRequestedInd") protected Boolean invGuarRequestedInd; @XmlAttribute(name = "ExitRowInd") protected Boolean exitRowInd; @XmlAttribute(name = "PremiumInd") protected Boolean premiumInd; @XmlAttribute(name = "UpperDeckInd") protected Boolean upperDeckInd; @XmlAttribute(name = "TaxIncludedInd") protected Boolean taxIncludedInd; @XmlAttribute(name = "FeeIncludedInd") protected Boolean feeIncludedInd; @XmlAttribute(name = "LeadPricingInd") protected Boolean leadPricingInd; @XmlAttribute(name = "Timestamp") @XmlSchemaType(name = "dateTime") protected XMLGregorianCalendar timestamp; @XmlAttribute(name = "MetadataToken") protected String metadataToken; @XmlAttribute(name = "refs") @XmlIDREF protected List<Object> refs; @XmlAttribute(name = "ObjectKey") @XmlJavaTypeAdapter(CollapsedStringAdapter.class) @XmlID @XmlSchemaType(name = "ID") protected String objectKey; /** * Gets the value of the displayAllInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isDisplayAllInd() { return displayAllInd; } /** * Sets the value of the displayAllInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setDisplayAllInd(Boolean value) { this.displayAllInd = value; } /** * Gets the value of the allExemptInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isAllExemptInd() { return allExemptInd; } /** * Sets the value of the allExemptInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setAllExemptInd(Boolean value) { this.allExemptInd = value; } /** * Gets the value of the pricingInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isPricingInd() { return pricingInd; } /** * Sets the value of the pricingInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setPricingInd(Boolean value) { this.pricingInd = value; } /** * Gets the value of the connectionInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isConnectionInd() { return connectionInd; } /** * Sets the value of the connectionInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setConnectionInd(Boolean value) { this.connectionInd = value; } /** * Gets the value of the eTicketInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isETicketInd() { return eTicketInd; } /** * Sets the value of the eTicketInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setETicketInd(Boolean value) { this.eTicketInd = value; } /** * Gets the value of the ticketlessInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isTicketlessInd() { return ticketlessInd; } /** * Sets the value of the ticketlessInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setTicketlessInd(Boolean value) { this.ticketlessInd = value; } /** * Gets the value of the associateInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isAssociateInd() { return associateInd; } /** * Sets the value of the associateInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setAssociateInd(Boolean value) { this.associateInd = value; } /** * Gets the value of the taxOnEMDInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isTaxOnEMDInd() { return taxOnEMDInd; } /** * Sets the value of the taxOnEMDInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setTaxOnEMDInd(Boolean value) { this.taxOnEMDInd = value; } /** * Gets the value of the stopOverInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isStopOverInd() { return stopOverInd; } /** * Sets the value of the stopOverInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setStopOverInd(Boolean value) { this.stopOverInd = value; } /** * Gets the value of the taxInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isTaxInd() { return taxInd; } /** * Sets the value of the taxInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setTaxInd(Boolean value) { this.taxInd = value; } /** * Gets the value of the otherChargeInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isOtherChargeInd() { return otherChargeInd; } /** * Sets the value of the otherChargeInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setOtherChargeInd(Boolean value) { this.otherChargeInd = value; } /** * Gets the value of the poolingInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isPoolingInd() { return poolingInd; } /** * Sets the value of the poolingInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setPoolingInd(Boolean value) { this.poolingInd = value; } /** * Gets the value of the specialItemsInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isSpecialItemsInd() { return specialItemsInd; } /** * Sets the value of the specialItemsInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setSpecialItemsInd(Boolean value) { this.specialItemsInd = value; } /** * Gets the value of the taxesInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isTaxesInd() { return taxesInd; } /** * Sets the value of the taxesInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setTaxesInd(Boolean value) { this.taxesInd = value; } /** * Gets the value of the netFareInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isNetFareInd() { return netFareInd; } /** * Sets the value of the netFareInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setNetFareInd(Boolean value) { this.netFareInd = value; } /** * Gets the value of the reissueOnlyInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isReissueOnlyInd() { return reissueOnlyInd; } /** * Sets the value of the reissueOnlyInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setReissueOnlyInd(Boolean value) { this.reissueOnlyInd = value; } /** * Gets the value of the autoExchangeInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isAutoExchangeInd() { return autoExchangeInd; } /** * Sets the value of the autoExchangeInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setAutoExchangeInd(Boolean value) { this.autoExchangeInd = value; } /** * Gets the value of the alertInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isAlertInd() { return alertInd; } /** * Sets the value of the alertInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setAlertInd(Boolean value) { this.alertInd = value; } /** * Gets the value of the authenticationInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isAuthenticationInd() { return authenticationInd; } /** * Sets the value of the authenticationInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setAuthenticationInd(Boolean value) { this.authenticationInd = value; } /** * Gets the value of the marketingInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isMarketingInd() { return marketingInd; } /** * Sets the value of the marketingInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setMarketingInd(Boolean value) { this.marketingInd = value; } /** * Gets the value of the multiPayFormInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isMultiPayFormInd() { return multiPayFormInd; } /** * Sets the value of the multiPayFormInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setMultiPayFormInd(Boolean value) { this.multiPayFormInd = value; } /** * Gets the value of the noticeInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isNoticeInd() { return noticeInd; } /** * Sets the value of the noticeInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setNoticeInd(Boolean value) { this.noticeInd = value; } /** * Gets the value of the partialInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isPartialInd() { return partialInd; } /** * Sets the value of the partialInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setPartialInd(Boolean value) { this.partialInd = value; } /** * Gets the value of the warningInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isWarningInd() { return warningInd; } /** * Sets the value of the warningInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setWarningInd(Boolean value) { this.warningInd = value; } /** * Gets the value of the failedPaymentInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isFailedPaymentInd() { return failedPaymentInd; } /** * Sets the value of the failedPaymentInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setFailedPaymentInd(Boolean value) { this.failedPaymentInd = value; } /** * Gets the value of the partialPaymentInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isPartialPaymentInd() { return partialPaymentInd; } /** * Sets the value of the partialPaymentInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setPartialPaymentInd(Boolean value) { this.partialPaymentInd = value; } /** * Gets the value of the verificationInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isVerificationInd() { return verificationInd; } /** * Sets the value of the verificationInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setVerificationInd(Boolean value) { this.verificationInd = value; } /** * Gets the value of the priceVarianceInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isPriceVarianceInd() { return priceVarianceInd; } /** * Sets the value of the priceVarianceInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setPriceVarianceInd(Boolean value) { this.priceVarianceInd = value; } /** * Gets the value of the invGuaranteedInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isInvGuaranteedInd() { return invGuaranteedInd; } /** * Sets the value of the invGuaranteedInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setInvGuaranteedInd(Boolean value) { this.invGuaranteedInd = value; } /** * Gets the value of the waitlistInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isWaitlistInd() { return waitlistInd; } /** * Sets the value of the waitlistInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setWaitlistInd(Boolean value) { this.waitlistInd = value; } /** * Gets the value of the bundleInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isBundleInd() { return bundleInd; } /** * Sets the value of the bundleInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setBundleInd(Boolean value) { this.bundleInd = value; } /** * Gets the value of the invGuarRequestedInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isInvGuarRequestedInd() { return invGuarRequestedInd; } /** * Sets the value of the invGuarRequestedInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setInvGuarRequestedInd(Boolean value) { this.invGuarRequestedInd = value; } /** * Gets the value of the exitRowInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isExitRowInd() { return exitRowInd; } /** * Sets the value of the exitRowInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setExitRowInd(Boolean value) { this.exitRowInd = value; } /** * Gets the value of the premiumInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isPremiumInd() { return premiumInd; } /** * Sets the value of the premiumInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setPremiumInd(Boolean value) { this.premiumInd = value; } /** * Gets the value of the upperDeckInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isUpperDeckInd() { return upperDeckInd; } /** * Sets the value of the upperDeckInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setUpperDeckInd(Boolean value) { this.upperDeckInd = value; } /** * Gets the value of the taxIncludedInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isTaxIncludedInd() { return taxIncludedInd; } /** * Sets the value of the taxIncludedInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setTaxIncludedInd(Boolean value) { this.taxIncludedInd = value; } /** * Gets the value of the feeIncludedInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isFeeIncludedInd() { return feeIncludedInd; } /** * Sets the value of the feeIncludedInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setFeeIncludedInd(Boolean value) { this.feeIncludedInd = value; } /** * Gets the value of the leadPricingInd property. * * @return * possible object is * {@link Boolean } * */ public Boolean isLeadPricingInd() { return leadPricingInd; } /** * Sets the value of the leadPricingInd property. * * @param value * allowed object is * {@link Boolean } * */ public void setLeadPricingInd(Boolean value) { this.leadPricingInd = value; } /** * Gets the value of the timestamp property. * * @return * possible object is * {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getTimestamp() { return timestamp; } /** * Sets the value of the timestamp property. * * @param value * allowed object is * {@link XMLGregorianCalendar } * */ public void setTimestamp(XMLGregorianCalendar value) { this.timestamp = value; } /** * Gets the value of the metadataToken property. * * @return * possible object is * {@link String } * */ public String getMetadataToken() { return metadataToken; } /** * Sets the value of the metadataToken property. * * @param value * allowed object is * {@link String } * */ public void setMetadataToken(String value) { this.metadataToken = value; } /** * Gets the value of the refs property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the refs property. * * <p> * For example, to add a new item, do as follows: * <pre> * getRefs().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link Object } * * */ public List<Object> getRefs() { if (refs == null) { refs = new ArrayList<Object>(); } return this.refs; } /** * Gets the value of the objectKey property. * * @return * possible object is * {@link String } * */ public String getObjectKey() { return objectKey; } /** * Sets the value of the objectKey property. * * @param value * allowed object is * {@link String } * */ public void setObjectKey(String value) { this.objectKey = value; } }
e489f3be248ab0daa8877a645a98c3bad786d6a5
3a50c0712e0a31b88d0a5e80a0c01dbefc6a6e75
/thrift/lib/java/common/src/main/java/com/facebook/thrift/type/UniversalName.java
cea9d174ea2b7af89c58d8cee8f13824ee44c014
[ "Apache-2.0" ]
permissive
facebook/fbthrift
3b7b94a533666c965ce69cfd6054041218b1ea6f
53cf6f138a7648efe5aef9a263aabed3d282df91
refs/heads/main
2023-08-24T12:51:32.367985
2023-08-24T08:28:35
2023-08-24T08:28:35
11,131,631
2,347
666
Apache-2.0
2023-09-01T01:44:39
2013-07-02T18:15:51
C++
UTF-8
Java
false
false
3,661
java
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * 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.facebook.thrift.type; import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBufUtil; import java.util.Objects; import java.util.regex.Pattern; public class UniversalName { private static final String DOMAIN_NAME_PATTERN = "(([a-z0-9-]{1,})\\.)+[a-z0-9-]{1,}/"; private static final String PACKAGE_NAME_PATTERN = "(([a-zA-Z0-9_-]{1,})/)+"; private static final String TYPE_PATTERN = "[a-zA-Z0-9_-]{1,}"; private static final String UNIVERSAL_NAME_PATTERN = DOMAIN_NAME_PATTERN + PACKAGE_NAME_PATTERN + TYPE_PATTERN; private static Pattern namePattern; static { namePattern = Pattern.compile(UNIVERSAL_NAME_PATTERN); } private final HashAlgorithm algorithm; private final String uri; private final ByteBuf hash; /** * Creates a new universal name by given uri and hash algorithm. Given uri is validated based on * the rules defined. When the thrift compiler validates all uri's in thrift IDL file, this * validation might be lifted. * * @param uri uri of the universal name. * @param algorithm Hash algorithm. * @throws InvalidUniversalNameURIException If the uri syntax is invalid. */ public UniversalName(String uri, HashAlgorithm algorithm) { if (!namePattern.matcher(uri).matches()) { throw new InvalidUniversalNameURIException(uri); } this.uri = Objects.requireNonNull(uri, "Uri must not be null"); this.algorithm = Objects.requireNonNull(algorithm, "Algorithm must not be null"); this.hash = algorithm.generateHash(uri); } /** * Creates new universal name object with the SHA-256 algorithm. * * @param uri uri of the universal name. * @throws InvalidUniversalNameURIException If the uri syntax is invalid. */ public UniversalName(String uri) { this(uri, HashAlgorithmSHA256.INSTANCE); } public String getHash() { return getHashPrefix(this.algorithm.getDefaultHashBytes()); } public ByteBuf getHashBytes() { return hash; } public String getHashPrefix(int size) { return ByteBufUtil.hexDump( this.hash, 0, Math.min( Math.max(size, this.algorithm.getMinHashBytes()), this.algorithm.getDefaultHashBytes())); } public ByteBuf getHashPrefixBytes(int size) { return this.hash.copy( 0, Math.min( Math.max(size, this.algorithm.getMinHashBytes()), this.algorithm.getDefaultHashBytes())); } public String getUri() { return this.uri; } public boolean preferHash() { return this.algorithm.getDefaultHashBytes() < this.uri.length(); } public boolean preferHash(int hashSize) { return Math.min( this.algorithm.getDefaultHashBytes(), Math.max(hashSize, this.algorithm.getMinHashBytes())) < this.uri.length(); } @Override public String toString() { return "UniversalName{" + "algorithm=" + algorithm + ", uri='" + uri + '\'' + ", hash=" + getHash() + '}'; } }
7ca7212c930dc4d0724fd67577faaf259503caad
70eebc4263233b64d92f9917debed0ada0abd851
/PrimeGenerator.java
f087ba198ce2aa8c558fb246b05b8e7a073c8d89
[]
no_license
rahulnagesh001/CS680
c5460ad52a6d535410423b630604990782ef9aa7
2b9b4ad33315f9770883ff7189524ee6d2152639
refs/heads/main
2023-05-01T18:22:07.508470
2021-05-22T03:46:53
2021-05-22T03:46:53
347,116,678
1
0
null
null
null
null
UTF-8
Java
false
false
971
java
package edu.umb.cs680.hw01; import java.util.LinkedList; import java.util.*; public class PrimeGenerator { protected long from, to; protected LinkedList<Long> primes= new LinkedList<Long>(); PrimeGenerator(long x, long y){ from = x; to =y; } public void generatePrimes(){ if (from <0 || to < 0 || from >= to) { return; } for (long i = from; i <= to; i++) { if (isPrime(i)) { if (i >= 2) { primes.add(i); } } } } public boolean isPrime(long number) { for (int i = 2; i < number; i++) { if (number % i == 0) { return false; } } return true; } public LinkedList<Long> getPrimes(){ return primes; } public static void main(String[] args) { PrimeGenerator gen = new PrimeGenerator(1, 10); gen.generatePrimes(); System.out.println(gen.getPrimes()); } }
f88378fcd624f854389f9518dd9dcc5e29ed9f48
151d31723478fc9461a65dda6726933fcbb25369
/PUENTE/src/android/support/v4/app/ad.java
e11d7d415b0708999693a620587c02831d5327c4
[]
no_license
ChrisGehm/bridge2
717a4a831ae84866a4eddfb97dea7cc760c755e5
d36832a83c59a0562b028b280b5f63391ff7f135
refs/heads/master
2021-06-25T03:41:33.017392
2017-09-12T21:42:02
2017-09-12T21:42:02
103,323,456
0
0
null
null
null
null
UTF-8
Java
false
false
4,877
java
package android.support.v4.app; import android.support.v4.app.FragmentActivity; import android.support.v4.app.ab; import android.support.v4.app.ae; import android.util.Log; import java.io.FileDescriptor; import java.io.PrintWriter; class ad extends ab { static boolean a = false; final android.support.v4.b.m b = new android.support.v4.b.m(); final android.support.v4.b.m c = new android.support.v4.b.m(); final String d; FragmentActivity e; boolean f; boolean g; ad(String var1, FragmentActivity var2, boolean var3) { this.d = var1; this.e = var2; this.f = var3; } void a(FragmentActivity var1) { this.e = var1; } public void a(String var1, FileDescriptor var2, PrintWriter var3, String[] var4) { byte var6 = 0; int var5; if(this.b.b() > 0) { var3.print(var1); var3.println("Active Loaders:"); String var8 = var1 + " "; for(var5 = 0; var5 < this.b.b(); ++var5) { ae var7 = (ae)this.b.b(var5); var3.print(var1); var3.print(" #"); var3.print(this.b.a(var5)); var3.print(": "); var3.println(var7.toString()); var7.a(var8, var2, var3, var4); } } if(this.c.b() > 0) { var3.print(var1); var3.println("Inactive Loaders:"); String var9 = var1 + " "; for(var5 = var6; var5 < this.c.b(); ++var5) { ae var10 = (ae)this.c.b(var5); var3.print(var1); var3.print(" #"); var3.print(this.c.a(var5)); var3.print(": "); var3.println(var10.toString()); var10.a(var9, var2, var3, var4); } } } public boolean a() { int var3 = this.b.b(); int var1 = 0; boolean var4; for(var4 = false; var1 < var3; ++var1) { ae var5 = (ae)this.b.b(var1); boolean var2; if(var5.h && !var5.f) { var2 = true; } else { var2 = false; } var4 |= var2; } return var4; } void b() { if(a) { Log.v("LoaderManager", "Starting in " + this); } if(this.f) { RuntimeException var2 = new RuntimeException("here"); var2.fillInStackTrace(); Log.w("LoaderManager", "Called doStart when already started: " + this, var2); } else { this.f = true; for(int var1 = this.b.b() - 1; var1 >= 0; --var1) { ((ae)this.b.b(var1)).a(); } } } void c() { if(a) { Log.v("LoaderManager", "Stopping in " + this); } if(!this.f) { RuntimeException var2 = new RuntimeException("here"); var2.fillInStackTrace(); Log.w("LoaderManager", "Called doStop when not started: " + this, var2); } else { for(int var1 = this.b.b() - 1; var1 >= 0; --var1) { ((ae)this.b.b(var1)).e(); } this.f = false; } } void d() { if(a) { Log.v("LoaderManager", "Retaining in " + this); } if(!this.f) { RuntimeException var2 = new RuntimeException("here"); var2.fillInStackTrace(); Log.w("LoaderManager", "Called doRetain when not started: " + this, var2); } else { this.g = true; this.f = false; for(int var1 = this.b.b() - 1; var1 >= 0; --var1) { ((ae)this.b.b(var1)).b(); } } } void e() { if(this.g) { if(a) { Log.v("LoaderManager", "Finished Retaining in " + this); } this.g = false; for(int var1 = this.b.b() - 1; var1 >= 0; --var1) { ((ae)this.b.b(var1)).c(); } } } void f() { for(int var1 = this.b.b() - 1; var1 >= 0; --var1) { ((ae)this.b.b(var1)).k = true; } } void g() { for(int var1 = this.b.b() - 1; var1 >= 0; --var1) { ((ae)this.b.b(var1)).d(); } } void h() { int var1; if(!this.g) { if(a) { Log.v("LoaderManager", "Destroying Active in " + this); } for(var1 = this.b.b() - 1; var1 >= 0; --var1) { ((ae)this.b.b(var1)).f(); } this.b.c(); } if(a) { Log.v("LoaderManager", "Destroying Inactive in " + this); } for(var1 = this.c.b() - 1; var1 >= 0; --var1) { ((ae)this.c.b(var1)).f(); } this.c.c(); } public String toString() { StringBuilder var1 = new StringBuilder(128); var1.append("LoaderManager{"); var1.append(Integer.toHexString(System.identityHashCode(this))); var1.append(" in "); android.support.v4.b.d.a(this.e, var1); var1.append("}}"); return var1.toString(); } }
bedb72eaf2be68f3b18c88b8c6cbe49de10d976a
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
/project_1_2/src/g/g/j/Calc_1_2_6692.java
07f86d64f0d609c07475b7fd3ee3b662949ef28c
[]
no_license
chalstrick/bigRepo1
ac7fd5785d475b3c38f1328e370ba9a85a751cff
dad1852eef66fcec200df10083959c674fdcc55d
refs/heads/master
2016-08-11T17:59:16.079541
2015-12-18T14:26:49
2015-12-18T14:26:49
48,244,030
0
0
null
null
null
null
UTF-8
Java
false
false
131
java
package g.g.j; public class Calc_1_2_6692 { /** @return the sum of a and b */ public int add(int a, int b) { return a+b; } }
2dcdcc5353f611912b551c5c4556af7278f4a6aa
629762c6acaccb50d45d6910e6934c3fedd6c07d
/jzkj-biz-admin/src/main/java/com/jzkj/modules/sys/service/impl/SysDeptServiceImpl.java
f11a0420b961d57516884af415727123109bbf92
[]
no_license
13141498695/jzkj-master
d361911242ff14bdc948531a9c7d543b32140525
07437c45f06fdbdfe0dfd056f3a1edafc60554e7
refs/heads/master
2022-07-29T22:58:04.856913
2019-09-20T09:33:46
2019-09-20T09:33:46
209,749,996
0
0
null
2022-07-06T20:42:22
2019-09-20T09:07:26
JavaScript
UTF-8
Java
false
false
1,888
java
package com.jzkj.modules.sys.service.impl; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.baomidou.mybatisplus.service.impl.ServiceImpl; import com.jzkj.common.annotation.DataFilter; import com.jzkj.common.utils.Constant; import com.jzkj.modules.sys.dao.SysDeptDao; import com.jzkj.modules.sys.entity.SysDeptEntity; import com.jzkj.modules.sys.service.SysDeptService; import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.List; import java.util.Map; @Service("sysDeptService") public class SysDeptServiceImpl extends ServiceImpl<SysDeptDao, SysDeptEntity> implements SysDeptService { @Override @DataFilter(subDept = true, user = false) public List<SysDeptEntity> queryList(Map<String, Object> params){ List<SysDeptEntity> deptList = this.selectList(new EntityWrapper<SysDeptEntity>() .addFilterIfNeed(params.get(Constant.SQL_FILTER) != null, (String)params.get(Constant.SQL_FILTER))); for(SysDeptEntity sysDeptEntity : deptList){ SysDeptEntity parentDeptEntity = this.selectById(sysDeptEntity.getParentId()); if(parentDeptEntity != null){ sysDeptEntity.setParentName(parentDeptEntity.getName()); } } return deptList; } @Override public List<Long> queryDetpIdList(Long parentId) { return baseMapper.queryDetpIdList(parentId); } @Override public List<Long> getSubDeptIdList(Long deptId){ //公司及子公司ID列表 List<Long> deptIdList = new ArrayList<>(); //获取子公司ID List<Long> subIdList = queryDetpIdList(deptId); getDeptTreeList(subIdList, deptIdList); return deptIdList; } /** * 递归 */ private void getDeptTreeList(List<Long> subIdList, List<Long> deptIdList){ for(Long deptId : subIdList){ List<Long> list = queryDetpIdList(deptId); if(list.size() > 0){ getDeptTreeList(list, deptIdList); } deptIdList.add(deptId); } } }
[ "123456" ]
123456
662bcb5c28ca0f5a53db7f61ee1339bd5674ecaa
28fdbd3e40d01ceedba2868c02fb3f3ff808535d
/src/main/java/trobbie/bootrestsimple/dao/ExampleResourceRepository.java
09a9b98fed7c8e97198c04e1caec675f11129179
[ "MIT" ]
permissive
trobbie/boot-rest-simple
0d810b8fef5c987752a8a14b62862de98866a8c2
f10839deb90bfa6ceff6521d77a7ef6e40d72058
refs/heads/master
2020-05-15T23:52:42.157942
2020-05-05T14:13:41
2020-05-05T14:13:41
182,564,219
0
0
null
null
null
null
UTF-8
Java
false
false
894
java
/* * Copyright (c) 2019 Trevor Robbie * This program is made available under the terms of the MIT License. */ /** * */ package trobbie.bootrestsimple.dao; import org.springframework.stereotype.Repository; import trobbie.bootrestsimple.model.ExampleResource; /** * Interface used as SpringBoot's repository. For SpringBoot to autowire, * this interface needs to be defined extending the CRUDRepository with the * specific model used (Resource subclass) and @Repository assigned. * * Implementation configuration found in spring.datasource in application.properties. * * @author Trevor Robbie * */ @Repository // assign as JPA Repository public interface ExampleResourceRepository extends ResourceRepository<ExampleResource, Long> { // No need to write implementation. Spring Data JPA creates it for us on the fly, // based on what implementation is found on the classpath. }
6a65b83b4aca4252e7beb9da8c662ac37f0506ef
9514d70b94e4281ddedde91e751f44beed6ea26d
/app/src/main/java/com/goznauk/projectnull/app/ViewModel/ImageUploadFragment.java
2fe54fac0bdb8a18d4bd7f2147ea6e81b49d5b5f
[]
no_license
null-NHNNEXT/AndroidClient
8adbb103c06d62590d1989ad53376c8c450f0903
8a7035492cbc1ceef0579c0790ebd35aa1e51e6a
refs/heads/master
2020-04-17T07:39:34.319501
2015-03-30T06:18:36
2015-03-30T06:18:36
32,982,544
0
0
null
null
null
null
UTF-8
Java
false
false
3,707
java
package com.goznauk.projectnull.app.ViewModel; import android.app.Activity; import android.net.Uri; import android.os.Bundle; import android.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.goznauk.projectnull.app.R; /** * A simple {@link Fragment} subclass. * Activities that contain this fragment must implement the * {@link ImageUploadFragment.OnFragmentInteractionListener} interface * to handle interaction events. * Use the {@link ImageUploadFragment#newInstance} factory method to * create an instance of this fragment. */ public class ImageUploadFragment extends Fragment { // TODO: Rename parameter arguments, choose names that match // the fragment initialization parameters, e.g. ARG_ITEM_NUMBER private static final String ARG_PARAM1 = "param1"; private static final String ARG_PARAM2 = "param2"; // TODO: Rename and change types of parameters private String mParam1; private String mParam2; private OnFragmentInteractionListener mListener; /** * Use this factory method to create a new instance of * this fragment using the provided parameters. * * @param param1 Parameter 1. * @param param2 Parameter 2. * @return A new instance of fragment ImageUploadFragment. */ // TODO: Rename and change types and number of parameters public static ImageUploadFragment newInstance(String param1, String param2) { ImageUploadFragment fragment = new ImageUploadFragment(); Bundle args = new Bundle(); args.putString(ARG_PARAM1, param1); args.putString(ARG_PARAM2, param2); fragment.setArguments(args); return fragment; } public ImageUploadFragment() { // Required empty public constructor } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (getArguments() != null) { mParam1 = getArguments().getString(ARG_PARAM1); mParam2 = getArguments().getString(ARG_PARAM2); } } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment return inflater.inflate(R.layout.fragment_image_upload, container, false); } // TODO: Rename method, update argument and hook method into UI event public void onButtonPressed(Uri uri) { if (mListener != null) { mListener.onFragmentInteraction(uri); } } @Override public void onAttach(Activity activity) { super.onAttach(activity); try { mListener = (OnFragmentInteractionListener) activity; } catch (ClassCastException e) { throw new ClassCastException(activity.toString() + " must implement OnFragmentInteractionListener"); } } @Override public void onDetach() { super.onDetach(); mListener = null; } /** * This interface must be implemented by activities that contain this * fragment to allow an interaction in this fragment to be communicated * to the activity and potentially other fragments contained in that * activity. * <p/> * See the Android Training lesson <a href= * "http://developer.android.com/training/basics/fragments/communicating.html" * >Communicating with Other Fragments</a> for more information. */ public interface OnFragmentInteractionListener { // TODO: Update argument type and name public void onFragmentInteraction(Uri uri); } }
bf0d0596c028280d67e3ecca83de7e31e7d6e82d
a1eee47741d9463a65bf5aea498e0e445be8fe70
/src/main/java/com/lethanh98/unitestDemoSpring/controller/BaseResource.java
4e9bb7f2adab1426e2f8d3bae6954c8cffc31c3e
[]
no_license
solitarysp/unitTestSpringDemo
8223d03d4484690bd738f6c823f1f7b1074f46b4
4f08c89444bba87c9ebef9a112676c4d0e8d772b
refs/heads/master
2022-12-29T09:39:23.373070
2020-10-14T09:39:56
2020-10-14T09:39:56
303,941,174
0
0
null
null
null
null
UTF-8
Java
false
false
2,632
java
package com.lethanh98.unitestDemoSpring.controller; import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.ListeningExecutorService; import com.google.common.util.concurrent.MoreExecutors; import lombok.extern.slf4j.Slf4j; import org.springframework.context.MessageSource; import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.web.context.request.async.DeferredResult; import javax.annotation.Resource; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; import java.util.function.Supplier; @Slf4j public abstract class BaseResource { private final Long DEFERRED_TIMEOUT = 10000L; private final Long SERVICE_TIMEOUT = 10000L; private static ListeningExecutorService service; @Resource private MessageSource messageSource; public BaseResource() { if (service == null) { ThreadPoolExecutor createService = new ThreadPoolExecutor(1, 50000, 1L, TimeUnit.MINUTES, new LinkedBlockingQueue<>(100)); createService.setKeepAliveTime(1L, TimeUnit.MINUTES); createService.allowCoreThreadTimeOut(true); service = MoreExecutors.listeningDecorator(createService); } } public <T> ListenableFuture<?> asyncExecute(final Supplier<?> supplier) { return (service.submit(supplier::get)); } public <T> DeferredResult<?> callBackResponse(ListenableFuture<?> future) { final DeferredResult<Object> deferredResult = new DeferredResult<>(DEFERRED_TIMEOUT); deferredResult.onTimeout(() -> { deferredResult.setResult(null); }); Futures.addCallback(future, new FutureCallback<Object>() { public void onSuccess(Object model) { try { deferredResult.setResult(future.get(SERVICE_TIMEOUT, TimeUnit.MILLISECONDS)); } catch (Exception e) { deferredResult.setResult(null); } } @Override public void onFailure(Throwable throwable) { log.info(throwable.getMessage(), throwable); deferredResult.setResult(null); } }); return deferredResult; } public String getMessage(String keyMessage) { return messageSource.getMessage(keyMessage, null, LocaleContextHolder.getLocale()); } }
31f573a642f62858a342763bd248a74358b8d3c3
687873ac998751923da845dd614dd87ae066ffb0
/model/ResultItem.java
4acccf2fcff0d591335e2b370f61a5bf5f44d86b
[]
no_license
PratikSurela/StatusForYou
2dd432a3e57fa8b644bfc0007cf51c7bdf56a481
96cc39f3d8f7a1ddd7ec75a8ae9975eb4aa287c9
refs/heads/master
2021-01-25T11:33:03.428026
2017-06-10T10:01:58
2017-06-10T10:01:58
93,930,853
0
0
null
null
null
null
UTF-8
Java
false
false
1,440
java
package com.dreamsdevelopers.statusforyou.model; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class ResultItem{ @SerializedName("s_id") @Expose private String sId; @SerializedName("s_cid") @Expose private String sCid; @SerializedName("s_hen") @Expose private String sHen; @SerializedName("s_hindi") @Expose private String sHindi; @SerializedName("like") @Expose private String like; @SerializedName("s_date") @Expose private String sDate; public void setSId(String sId){ this.sId = sId; } public String getSId(){ return sId; } public void setSCid(String sCid){ this.sCid = sCid; } public String getSCid(){ return sCid; } public void setSHen(String sHen){ this.sHen = sHen; } public String getSHen(){ return sHen; } public void setSHindi(String sHindi){ this.sHindi = sHindi; } public String getSHindi(){ return sHindi; } public void setLike(String like){ this.like = like; } public String getLike(){ return like; } public void setSDate(String sDate){ this.sDate = sDate; } public String getSDate(){ return sDate; } @Override public String toString(){ return "ResultItem{" + "s_id = '" + sId + '\'' + ",s_cid = '" + sCid + '\'' + ",s_hen = '" + sHen + '\'' + ",s_hindi = '" + sHindi + '\'' + ",like = '" + like + '\'' + ",s_date = '" + sDate + '\'' + "}"; } }
86ceac496f9fc3827bd6e319667ea4d5d2de879f
b6dc584e37c24b59303d5ae1b99e1e8cba1439f0
/app/src/main/java/com/bayuirfan/mytestingapp/MainActivity.java
379f313ef4ab8988d3efbb4aa22fbdc8ea3bb273
[]
no_license
bayuirfan52/MyTestingApp
56f46066169237698e1cce6944fa3a271e3b2123
4968ae5cd9aee6ab4ceaf0e5d2900e0d8e1fd9bc
refs/heads/master
2020-06-11T10:05:34.061239
2019-06-26T14:57:26
2019-06-26T14:57:26
193,926,184
0
0
null
null
null
null
UTF-8
Java
false
false
1,225
java
package com.bayuirfan.mytestingapp; import android.annotation.SuppressLint; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.TextView; import java.util.ArrayList; public class MainActivity extends AppCompatActivity { TextView textView; Button button; ArrayList<String> names; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); textView = findViewById(R.id.tv_text); button = findViewById(R.id.btn_set_value); names = new ArrayList<>(); names.add("Bayu Irfan"); names.add("Pie"); names.add("Nougat"); button.setOnClickListener(new View.OnClickListener() { @SuppressLint("SetTextI18n") @Override public void onClick(View v) { StringBuilder builder = new StringBuilder(); for (int i = 0; i < names.size(); i++){ builder.append(names.get(i)).append("\n"); } textView.setText(builder); } }); } }
d72459acf06f626d14ddb7c5fcaa327df5a99252
4a7cc0388fb49af94b6d724b1b723f42adf2679e
/NetworkProj/TimeCheck/org/apache/commons/net/ftp/parser/CompositeFileEntryParser.java
580a3ea64e0601f1bc4d615c8a966466e37f2d64
[]
no_license
Dilik/Java
d116ec8b981d6eeac13bb41a72924ad3d98fd7ba
33c990193f669e25d9592de632987d29798cc6d4
refs/heads/master
2020-03-20T12:31:23.791955
2018-07-29T02:42:09
2018-07-29T02:42:09
137,432,692
3
1
null
null
null
null
UTF-8
Java
false
false
2,391
java
/* * Copyright 2004 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.commons.net.ftp.parser; import org.apache.commons.net.ftp.FTPFile; import org.apache.commons.net.ftp.FTPFileEntryParser; import org.apache.commons.net.ftp.FTPFileEntryParserImpl; /** * This implementation allows to pack some FileEntryParsers together * and handle the case where to returned dirstyle isnt clearly defined. * The matching parser will be cached. * If the cached parser wont match due to the server changed the dirstyle, * a new matching parser will be searched. * * @author Mario Ivankovits <[email protected]> */ public class CompositeFileEntryParser extends FTPFileEntryParserImpl { private final FTPFileEntryParser[] ftpFileEntryParsers; private FTPFileEntryParser cachedFtpFileEntryParser; public CompositeFileEntryParser(FTPFileEntryParser[] ftpFileEntryParsers) { super(); this.cachedFtpFileEntryParser = null; this.ftpFileEntryParsers = ftpFileEntryParsers; } public FTPFile parseFTPEntry(String listEntry) { if (cachedFtpFileEntryParser != null) { FTPFile matched = cachedFtpFileEntryParser.parseFTPEntry(listEntry); if (matched != null) { return matched; } } else { for (int iterParser=0; iterParser < ftpFileEntryParsers.length; iterParser++) { FTPFileEntryParser ftpFileEntryParser = ftpFileEntryParsers[iterParser]; FTPFile matched = ftpFileEntryParser.parseFTPEntry(listEntry); if (matched != null) { cachedFtpFileEntryParser = ftpFileEntryParser; return matched; } } } return null; } }
03ce98129251d3c4b44c3d7582cc86bb52c6f02b
0324a8ab33cbca04afb61d2bec0d41e2e7b5c7cd
/src/Menu.java
309268b8f4bafff545b13d9adc57d76b9e4baf30
[]
no_license
bilobran/Phonebook_pract
4608248d730224a5d5d20dd5af2dbede2c7c1557
0360df361a84826c33bc2537708697513888222a
refs/heads/master
2021-04-23T19:47:53.140690
2020-03-25T13:33:51
2020-03-25T13:33:51
249,986,978
0
0
null
null
null
null
UTF-8
Java
false
false
2,155
java
import java.util.ArrayList; import java.util.Iterator; import java.util.List; public class Menu { List<User> users = new ArrayList<>(); public Menu() { } public Menu(List<User> users) { this.users = users; } public List<User> getUsers() { return users; } public void setUsers(List<User> users) { this.users = users; } @Override public String toString() { return "Menu{" + "users=" + users + '}'; } public void addUser(User user) { users.add(user); } public void showAllUsers() { for (User user : users) { System.out.println(user); } } public void deleteUser(String name) { Iterator<User> userIterator = users.iterator(); while (userIterator.hasNext()) { User userNext = userIterator.next(); if (userNext.getName() == name) { userIterator.remove(); } } } public void changeNumber(String name, List<String> num) { for (User user : users) { if (user.getName() == name) { user.setNumPhone(num); } } } public void showAllNum() { for (User user : users) { System.out.println(user.getName() + user.getNumPhone()); } } public void showAllNameAndSurname() { for (User user : users) { System.out.println(user.getName() + " " + user.getSurname() + " " + "("+ user.getTypePhone() + ")"); } } public void showUserWithNum(List<String> num){ for (User user : users) { if(user.getNumPhone().equals(num)){ System.out.println(user.getName() +" "+ user.getSurname()); } } } public void showAllWhenKod(){ for (User user : users) { for(String i : user.getNumPhone()){ if(i.contains("073")){ System.out.println(user.getName() + " " + user.getSurname() + " " + "(" +i +")"); } } } } }
53e7e59b6bb23afdf15ba9b107894670ce570420
15a5811e1627916cb2f569efe24bbe87d7446669
/optaweb-employee-rostering-backend/src/main/java/org/optaweb/employeerostering/service/shift/ShiftService.java
bc48964243255c8cc1982b07aa1ddcf39b32f2bf
[ "Apache-2.0" ]
permissive
bilalashade/Employee-Rostering
e0503b7371be609243ed53973ea9b31551ba0805
89724b440a54fe7ffdb40ed77fa0cee8bf4b328f
refs/heads/master
2023-02-07T03:24:33.150937
2020-12-28T11:18:20
2020-12-28T11:18:20
324,956,667
0
0
null
null
null
null
UTF-8
Java
false
false
9,503
java
/* * Copyright 2019 Red Hat, Inc. and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.optaweb.employeerostering.service.shift; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Optional; import java.util.Set; import java.util.stream.Collectors; import javax.persistence.EntityNotFoundException; import org.optaplanner.core.api.score.constraint.Indictment; import org.optaweb.employeerostering.domain.employee.Employee; import org.optaweb.employeerostering.domain.shift.Shift; import org.optaweb.employeerostering.domain.shift.view.ShiftView; import org.optaweb.employeerostering.domain.skill.Skill; import org.optaweb.employeerostering.domain.spot.Spot; import org.optaweb.employeerostering.service.common.AbstractRestService; import org.optaweb.employeerostering.service.common.IndictmentUtils; import org.optaweb.employeerostering.service.employee.EmployeeRepository; import org.optaweb.employeerostering.service.roster.RosterService; import org.optaweb.employeerostering.service.skill.SkillService; import org.optaweb.employeerostering.service.spot.SpotRepository; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @Service public class ShiftService extends AbstractRestService { private ShiftRepository shiftRepository; private SpotRepository spotRepository; private SkillService skillService; private EmployeeRepository employeeRepository; private RosterService rosterService; private IndictmentUtils indictmentUtils; public ShiftService(ShiftRepository shiftRepository, SpotRepository spotRepository, SkillService skillService, EmployeeRepository employeeRepository, RosterService rosterService, IndictmentUtils indictmentUtils) { this.shiftRepository = shiftRepository; this.spotRepository = spotRepository; this.skillService = skillService; this.employeeRepository = employeeRepository; this.rosterService = rosterService; this.indictmentUtils = indictmentUtils; } public List<ShiftView> getShiftList(Integer tenantId) { Map<Object, Indictment> indictmentMap = indictmentUtils.getIndictmentMapForRoster( rosterService.buildRoster(tenantId)); return getAllShifts(tenantId).stream() .map(s -> indictmentUtils.getShiftViewWithIndictment( rosterService.getRosterState(tenantId).getTimeZone(), s, indictmentMap.get(s))) .collect(Collectors.toList()); } private List<Shift> getAllShifts(Integer tenantId) { return shiftRepository.findAllByTenantId(tenantId); } @Transactional public ShiftView getShift(Integer tenantId, Long id) { Shift shift = shiftRepository .findById(id) .orElseThrow(() -> new EntityNotFoundException("No Shift entity found with ID (" + id + ").")); validateTenantIdParameter(tenantId, shift); Indictment indictment = indictmentUtils.getIndictmentMapForRoster( rosterService.buildRoster(tenantId)).get(shift); return indictmentUtils.getShiftViewWithIndictment(rosterService.getRosterState(tenantId).getTimeZone(), shift, indictment); } private Shift convertFromView(Integer tenantId, ShiftView shiftView) { validateTenantIdParameter(tenantId, shiftView); Spot spot = spotRepository .findById(shiftView.getSpotId()) .orElseThrow(() -> new EntityNotFoundException("No Spot entity found with ID (" + shiftView.getSpotId() + ").")); validateTenantIdParameter(tenantId, spot); Long rotationEmployeeId = shiftView.getRotationEmployeeId(); Employee rotationEmployee = null; if (rotationEmployeeId != null) { rotationEmployee = employeeRepository .findById(rotationEmployeeId) .orElseThrow(() -> new EntityNotFoundException("ShiftView (" + shiftView + ") has an non-existing " + "rotationEmployeeId (" + rotationEmployeeId + ").")); validateTenantIdParameter(tenantId, rotationEmployee); } Long originalEmployeeId = shiftView.getOriginalEmployeeId(); Employee originalEmployee = null; if (originalEmployeeId != null) { originalEmployee = employeeRepository .findById(originalEmployeeId) .orElseThrow(() -> new EntityNotFoundException("ShiftView (" + shiftView + ") has an non-existing " + "originalEmployeeId (" + originalEmployeeId + ").")); validateTenantIdParameter(tenantId, originalEmployee); } Set<Skill> requiredSkillSet = shiftView.getRequiredSkillSetIdList() .stream().map(id -> skillService.getSkill(tenantId, id)) .collect(Collectors.toCollection(HashSet::new)); Shift shift = new Shift(rosterService.getRosterState(tenantId).getTimeZone(), shiftView, spot, rotationEmployee, requiredSkillSet, originalEmployee); shift.setPinnedByUser(shiftView.isPinnedByUser()); Long employeeId = shiftView.getEmployeeId(); if (employeeId != null) { Employee employee = employeeRepository .findById(employeeId) .orElseThrow(() -> new EntityNotFoundException("ShiftView (" + shiftView + ") has an non-existing employeeId (" + employeeId + ").")); validateTenantIdParameter(tenantId, employee); shift.setEmployee(employee); } return shift; } @Transactional public ShiftView createShift(Integer tenantId, ShiftView shiftView) { Shift shift = convertFromView(tenantId, shiftView); Shift persistedShift = shiftRepository.save(shift); Indictment indictment = indictmentUtils.getIndictmentMapForRoster( rosterService.buildRoster(tenantId)).get(persistedShift); return indictmentUtils.getShiftViewWithIndictment(rosterService.getRosterState(tenantId).getTimeZone(), persistedShift, indictment); } @Transactional public ShiftView updateShift(Integer tenantId, ShiftView shiftView) { Shift newShift = convertFromView(tenantId, shiftView); Shift oldShift = shiftRepository .findById(newShift.getId()) .orElseThrow(() -> new EntityNotFoundException("Shift entity with ID (" + newShift.getId() + ") not " + "found.")); if (!oldShift.getTenantId().equals(newShift.getTenantId())) { throw new IllegalStateException("Shift entity with tenantId (" + oldShift.getTenantId() + ") cannot change tenants."); } oldShift.setRotationEmployee(newShift.getRotationEmployee()); oldShift.setOriginalEmployee(newShift.getOriginalEmployee()); oldShift.setSpot(newShift.getSpot()); oldShift.setStartDateTime(newShift.getStartDateTime()); oldShift.setEndDateTime(newShift.getEndDateTime()); oldShift.setPinnedByUser(newShift.isPinnedByUser()); oldShift.setEmployee(newShift.getEmployee()); // Flush to increase version number before we duplicate it to ShiftView Shift updatedShift = shiftRepository.saveAndFlush(oldShift); Indictment indictment = indictmentUtils.getIndictmentMapForRoster( rosterService.buildRoster(tenantId)).get(updatedShift); return indictmentUtils.getShiftViewWithIndictment(rosterService.getRosterState(tenantId).getTimeZone(), updatedShift, indictment); } @Transactional public Boolean deleteShift(Integer tenantId, Long id) { Optional<Shift> shiftOptional = shiftRepository.findById(id); if (!shiftOptional.isPresent()) { return false; } validateTenantIdParameter(tenantId, shiftOptional.get()); shiftRepository.deleteById(id); return true; } }
485dbc58a18018edb80c4039c323079d4b33687e
31e50022d4c02739ae9f83a9d5139b21f1e00bee
/plugins/org.wso2.developerstudio.eclipse.artifact.proxyservice/src/org/wso2/developerstudio/eclipse/artifact/proxyservice/utils/ProxyServiceImageUtils.java
30106ed0cb1c04be0a8412ca6da407a40686a4a3
[ "Apache-2.0" ]
permissive
wso2/devstudio-tooling-esb
d5ebc45a73e7c6090e230f0cb262dbfff5478b7d
a4004db3d576ce9e8f963a031d073508acbe8974
refs/heads/master
2023-06-28T18:28:44.267350
2021-01-04T06:46:30
2021-01-04T06:46:30
51,583,372
41
90
Apache-2.0
2021-03-09T05:02:56
2016-02-12T11:25:57
Java
UTF-8
Java
false
false
1,237
java
/* * Copyright (c) 2012, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.wso2.developerstudio.eclipse.artifact.proxyservice.utils; import org.eclipse.core.runtime.Platform; import org.osgi.framework.Bundle; import org.wso2.developerstudio.eclipse.artifact.proxyservice.Activator; import org.wso2.developerstudio.eclipse.utils.ui.ImageUtils; public class ProxyServiceImageUtils extends ImageUtils{ private static ImageUtils instance; public static ImageUtils getInstance(){ if (instance==null){ instance=new ProxyServiceImageUtils(); } return instance; } public Bundle getBundle(){ return Platform.getBundle(Activator.PLUGIN_ID); } }
fe52e909c69264fb115db20cb07fc0c7c1cd5072
71ef03f72b871e8512296a85c597b95cf829abe2
/src/main/java/com/simon/vhr/mapper/AppraiseMapper.java
31526508621267d406d499978d57fd541f206115
[]
no_license
Langyk/vhr-BE
13cf41b112e23ffc5e35529430c439a7e34b343e
446159f36c92f510d5b5d78b29559f8562c1039b
refs/heads/master
2023-03-08T14:03:54.882806
2021-02-21T13:47:32
2021-02-21T13:47:32
336,790,117
1
1
null
null
null
null
UTF-8
Java
false
false
367
java
package com.simon.vhr.mapper; import com.simon.vhr.bean.Appraise; public interface AppraiseMapper { int deleteByPrimaryKey(Integer id); int insert(Appraise record); int insertSelective(Appraise record); Appraise selectByPrimaryKey(Integer id); int updateByPrimaryKeySelective(Appraise record); int updateByPrimaryKey(Appraise record); }
5e6cb8d15f46d716bbcdc6f1dcbfd3eefbced209
151ccc7097ab042116f4e6bea37b77925e893781
/src/main/java/acwing/contest/weekly/c66/TaskA.java
5983886e79cd055ec8533187a7f4e9b83073f86e
[ "MIT" ]
permissive
humwawe/online-judge
9ff944041288da836857a9e3ce59067b7af63705
e6091b82031ad1ffa2abe6ceea09b7bdc435d73f
refs/heads/master
2023-08-31T05:17:30.968516
2023-08-27T09:01:16
2023-08-27T09:01:16
207,341,970
0
0
null
null
null
null
UTF-8
Java
false
false
341
java
package acwing.contest.weekly.c66; import fast.io.InputReader; import fast.io.OutputWriter; public class TaskA { public void solve(int testNumber, InputReader in, OutputWriter out) { String s = in.nextString(); if ((s.charAt(s.length() - 1) - '0') % 2 == 0) { out.println(0); } else { out.println(1); } } }
f28753ab09ab000d43e81ac1ba43c51a51c09da5
052115034dce128f8a7082b39ded658f3a2b207d
/src/main/java/hello/WeatherInfo.java
a74877cfe14a2c967a1154930f1edec30a9f582b
[]
no_license
mgremote/SpringRest
c91af1a945920d83eab0a07bdf9e7abf2afbac36
db8104ff68b87684588c0b333f6ea35f7e6ef48b
refs/heads/master
2021-06-07T07:46:58.693490
2016-07-07T20:28:56
2016-07-07T20:28:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,604
java
/** * */ package hello; import java.util.ArrayList; @SuppressWarnings("unused") public class WeatherInfo { private String id; private String name; private String cod; private String base; private String description; Weather weather[]; /** * @return the weather */ public Weather[] getWeather() { return weather; } /** * @param weather * the weather to set */ public void setWeather(Weather[] weather) { this.weather = weather; } /** * @return the description */ public String getDescription() { return description; } /** * @param description * the description to set */ public void setDescription(String description) { this.description = description; } /** * @return the id */ public String getId() { return id; } /** * @param id * the id to set */ public void setId(String id) { this.id = id; } /** * @return the name */ public String getName() { return name; } /** * @param name * the name to set */ public void setName(String name) { this.name = name; } /** * @return the cod */ public String getCod() { return cod; } /** * @param cod * the cod to set */ public void setCod(String cod) { this.cod = cod; } /** * @return the base */ public String getBase() { return base; } /** * @param base * the base to set */ public void setBase(String base) { this.base = base; } public String toString() { return "[id=" + "=" + id + ", name=" + name + ", cod=" + cod + ", base=" + base + "]"; } }
f540511383332fe07c7ccd2cc0d4cf41a41a8e78
4edc15fa24a34fc25eab738f1fd0ff87a9d2692a
/app/src/main/java/at/fhv/teamx/wikigeoinfo/FlyTo.java
b00964ffd6a82d2b54e4cfc395334bf74fb60ce5
[]
no_license
boehlerlukas/TeamXAndroid
865625f95d38a4a9a17fa1590413506ae1ee9068
c44c47c23b72025ff4987917d25fe14594f3f7bf
refs/heads/master
2021-03-22T05:25:36.019980
2017-05-21T16:18:45
2017-05-21T16:18:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
782
java
package at.fhv.teamx.wikigeoinfo; import java.io.Serializable; /** * Created by lukasboehler on 14.05.17. */ public class FlyTo implements Serializable { private double lng = 0.0; private double lat = 0.0; private String name = ""; private String url = ""; public double getLng() { return lng; } public void setLng(double lng) { this.lng = lng; } public double getLat() { return lat; } public void setLat(double lat) { this.lat = lat; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } }
a5b5f4ceeec47ad8e036ec47d42cd65a6d592825
56c6218888ae3aaf33c282efe94d9dd34b535650
/src/main/java/com/inventory_manegement/config/WebSecurityConfig.java
c15e01d94d59d721e7ad46ba8d59c825623443a0
[]
no_license
phandat09/QuanLyHangHoa
c64136bfe1b8329baed026e42a80805dfceb20b3
07af1464c7b4c20d8882307b66e2436b68379aa3
refs/heads/master
2023-04-29T07:04:37.695304
2020-07-21T16:58:39
2020-07-21T16:58:39
281,453,041
0
0
null
2023-04-14T17:17:44
2020-07-21T16:46:45
CSS
UTF-8
Java
false
false
3,841
java
package com.inventory_manegement.config; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.core.userdetails.UserDetailsService; /** * Đây là file chứa cấu hình bảo mật. * @author admin * */ @Configuration @EnableWebSecurity public class WebSecurityConfig extends WebSecurityConfigurerAdapter { /** * đây là nơi thực hiện cấu hình bảo mật cho website. */ @Override protected void configure(final HttpSecurity http) throws Exception { http.csrf().disable().authorizeRequests() // thực hiện xác thực request ngưười dùng gửi lên. // không thực hiện xác thực đối với các ur/ này. .antMatchers("/css/**", "/js/**", "/images/**", "/glyphicons/**","/register/**","/files/**","/error/**","/api/**").permitAll() // thực hiện xác thực với các url kiểu ..../admin/.... .antMatchers("/**").authenticated() .and() // kết hợp với điều kiện. // khi click vào button logout thì không cần login. // khi click vào button này thì dữ liệu user trên session sẽ bị xoá. .logout() .logoutUrl("/perform_logout") .logoutSuccessUrl("/login") .invalidateHttpSession(true) // xoá hết dữ liệu trên seesion .deleteCookies("JSESSIONID") // xoá hết dữ liệu trên cokies. .permitAll() .and() // kết hợp với điều kiện. .formLogin() // thực hiện xác thực qua form(username và password) .loginPage("/login") // trang login do mình thiết kế. .loginProcessingUrl("/perform_login") // link action for form post. .defaultSuccessUrl("/home", true) // when user success authenticated then go to this url. .failureUrl("/login?login_error=true") // nhập username, password sai thì redirect về trang nào. .permitAll(); } // thực hiện định nghĩa các beans để spring dùng kiểm tra tài khoản người dùng. /** * định nghĩa lớp quản lí "Xác Thực" người dùng. * @return * @throws Exception */ @Bean public AuthenticationManager customAuthenticationManager() throws Exception { return authenticationManager(); } /** * thực hiện tham chiếu tới bean "userDetailsService" trong Spring Container. */ @Autowired private UserDetailsService userDetailsService; /** * hàm này thực hiện kết nối giữa 2 Beans(AuthenticationManager và UserDetailsService). * Lí do phải kết nối 2 Beans này vì cần cho AuthenticationManager biết nơi để * xác thực và lấy quyền của người dùng. * @param auth thực ra khi dùng @Autowired thì auth là bean được spring quản lí và add tham chiếu tới. * @throws Exception */ @Autowired public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception { // thực hiện gắn kết AuthenticationManager với UserDetailsService. auth.userDetailsService(userDetailsService).passwordEncoder(new NormalPasswordEncoder()); } }
46cdb13cd3c9df04c08be63c72660926195a6cb0
5b0ec241c66c6d2a7a33ad98b1cf5ed2d3e58f73
/src/main/java/com/yaj/jaso/business/existingproblem/entity/po/ExistingProblemPO.java
5f2171ab8a50b51597b8d15b55ef6f194955935e
[]
no_license
xyxTest/jaso
5b2e9328a55da9f15f67abf33223dd2adc4e1909
ece1d180bafb1a925c9abe49a43d96f7afcc5254
refs/heads/master
2022-03-27T02:01:33.891040
2020-01-06T01:14:36
2020-01-06T01:14:36
231,997,366
0
0
null
null
null
null
UTF-8
Java
false
false
1,559
java
package com.yaj.jaso.business.existingproblem.entity.po; import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableLogic; /* * @Description: * @date: 2019-08-09 */ @TableName(value = "existing_problem") public class ExistingProblemPO { /* * */ @TableId private Long existingProblemId; /* * */ private String existingProblemName; /* * */ private Long companyId; /* *项目id */ private Long projectId; /* * */ @TableLogic private Integer ifDelete; public void setExistingProblemId(Long existingProblemId) { this.existingProblemId = existingProblemId; } public Long getExistingProblemId() { return this.existingProblemId; } public void setExistingProblemName(String existingProblemName) { this.existingProblemName = existingProblemName; } public String getExistingProblemName() { return this.existingProblemName; } public void setCompanyId(Long companyId) { this.companyId = companyId; } public Long getCompanyId() { return this.companyId; } public void setProjectId(Long projectId) { this.projectId = projectId; } public Long getProjectId() { return this.projectId; } public void setIfDelete(Integer ifDelete) { this.ifDelete = ifDelete; } public Integer getIfDelete() { return this.ifDelete; } }
987e8a3912379d8d5d539c76f4861487c9a8ab67
fc07ba5d5480de0718321093ee9bd55e46b1901e
/src/TerminalColorSchemeImporter.java
2655fa142391fdff1440e2434bb54ac941ae7fb0
[ "MIT" ]
permissive
Guang1234567/TerminalColors
81da551f697d65748b41dae66b3abbb1b9d93515
9e94e97f6e3090eeb99a2890faa5a1f0806d61fe
refs/heads/master
2022-06-18T00:22:50.149385
2020-05-06T17:46:47
2020-05-06T17:46:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
15,469
java
import Lexers.*; import com.intellij.execution.process.ColoredOutputTypeRegistry; import com.intellij.execution.ui.ConsoleViewContentType; import com.intellij.openapi.editor.colors.ColorKey; import com.intellij.openapi.editor.colors.EditorColorsScheme; import com.intellij.openapi.editor.colors.TextAttributesKey; import com.intellij.openapi.editor.markup.AttributesFlyweight; import com.intellij.openapi.editor.colors.impl.EditorColorsManagerImpl; import com.intellij.openapi.editor.markup.EffectType; import com.intellij.openapi.editor.markup.TextAttributes; import com.intellij.openapi.options.SchemeFactory; import com.intellij.openapi.options.SchemeImportException; import com.intellij.openapi.options.SchemeImportUtil; import com.intellij.openapi.options.SchemeImporter; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.InvalidDataException; import com.intellij.openapi.vfs.VirtualFile; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.io.InputStream; import java.io.InputStreamReader; import java.util.*; import java.util.regex.Pattern; import java.util.regex.Matcher; import java.awt.Color; import java.io.IOException; import java.nio.charset.StandardCharsets; import org.jdom.Element; public class TerminalColorSchemeImporter implements SchemeImporter<EditorColorsScheme> { public TerminalColorSchemeImporter() { } @NotNull @Override public String[] getSourceExtensions() { return new String[]{"reg", "colorscheme", "config", "itermcolors", "terminal"}; } @Nullable @Override public EditorColorsScheme importScheme( @NotNull Project project, @NotNull VirtualFile selectedFile, @NotNull EditorColorsScheme currentScheme, @NotNull SchemeFactory<EditorColorsScheme> schemeFactory ) throws SchemeImportException { String currentSchemeName = currentScheme.getName(); String terminalSchemeName = selectedFile.getNameWithoutExtension(); String schemeExtension = selectedFile.getExtension(); EditorColorsManagerImpl editorColorsManager = (EditorColorsManagerImpl) EditorColorsManagerImpl.getInstance(); EditorColorsScheme currentGlobalScheme = (EditorColorsScheme) editorColorsManager.getGlobalScheme().clone(); EditorColorsScheme newScheme = null; switch (Objects.requireNonNull(schemeExtension)) { case "reg": case "colorscheme": case "config": try { newScheme = parseRegConfigColorschemeFile(selectedFile, currentGlobalScheme, schemeExtension); } catch (IOException e) { e.printStackTrace(); } break; case "itermcolors": newScheme = parseItermcolorsFile(selectedFile, currentGlobalScheme); break; case "terminal": newScheme = parseTerminalFile(selectedFile, currentGlobalScheme); break; default: throw new SchemeImportException("Wrong extension"); } if (newScheme == null) { throw new SchemeImportException("Failed to import scheme"); } if (currentSchemeName.contains("+Terminal")) { String[] splitCurrentSchemeName = currentSchemeName.split("\\+Terminal"); currentSchemeName = splitCurrentSchemeName[0]; } newScheme.setName(currentSchemeName + "+Terminal" + terminalSchemeName); return newScheme; } private EditorColorsScheme parseRegConfigColorschemeFile( VirtualFile selectedFile, EditorColorsScheme currentScheme, String extension ) throws IOException, SchemeImportException { Map<String, Comparable> colorsMap = createColorTypeMap(); InputStream inputStream = selectedFile.getInputStream(); InputStreamReader inputStreamReader = new InputStreamReader(inputStream); ColorsLexer colorsLexer; switch (extension) { case "reg": colorsLexer = new RegColorsLexer(inputStreamReader); break; case "colorscheme": colorsLexer = new ColorschemeColorsLexer(inputStreamReader); break; case "config": colorsLexer = new ConfigColorsLexer(inputStreamReader); break; default: throw new SchemeImportException("Wrong extension"); } EditorColorsScheme newScheme = (EditorColorsScheme) currentScheme.clone(); ColorType colorType = colorsLexer.yylex(); while (colorType != null) { Color color = colorType.getColor(); String colorIdentifier = colorType.getColorIdentifier(); Comparable key = colorsMap.get(colorIdentifier); if (colorIdentifier.equals(ColorType.BACKGROUND)) { newScheme.setColor((ColorKey) key, color); } else { if (colorIdentifier.equals(ColorType.FOREGROUND)) { setErrorOutputTextAttributes(newScheme, color); } setTextAttributesByKey(newScheme, (TextAttributesKey) key, color); } colorType = colorsLexer.yylex(); } return newScheme; } private Map<String, Comparable> createColorTypeMap() { Map<String, Comparable> colorsMap = new HashMap<>(); for (int i = 0; i < 16; i++) { colorsMap.put(ColorType.ANSI[i], ColoredOutputTypeRegistry.getAnsiColorKey(i)); } colorsMap.put(ColorType.BACKGROUND, ConsoleViewContentType.CONSOLE_BACKGROUND_KEY); colorsMap.put(ColorType.FOREGROUND, ConsoleViewContentType.NORMAL_OUTPUT_KEY); return colorsMap; } private EditorColorsScheme parseItermcolorsFile( VirtualFile selectedFile, EditorColorsScheme newScheme ) throws SchemeImportException { Map<String, Comparable> colorsMap = createItermcolorsMap(); float red = -1, blue = -1, green = -1; Element root = SchemeImportUtil.loadSchemeDom(selectedFile); Element dict = root.getChild("dict"); List<Element> ansiKeys = dict.getChildren("key"); List<Element> colors = dict.getChildren("dict"); if (colors.isEmpty() || ansiKeys.isEmpty() || ansiKeys.size() != colors.size()) { throw new InvalidDataException("Scheme is not valid"); } Iterator<Element> ansiKeysIterator = ansiKeys.iterator(); Iterator<Element> colorsIterator = colors.iterator(); while (ansiKeysIterator.hasNext()) { Element ansiKey = ansiKeysIterator.next(); Element colorDict = colorsIterator.next(); String ansiKeyName = ansiKey.getValue(); if (!colorsMap.containsKey(ansiKeyName)) continue; List<Element> colorDictKeys = colorDict.getChildren("key"); List<Element> colorDictRGB = colorDict.getChildren("real"); Iterator<Element> colorDictKeysIterator = colorDictKeys.iterator(); Iterator<Element> colorDictRGBIterator = colorDictRGB.iterator(); while (colorDictKeysIterator.hasNext()) { Element colorComponentName = colorDictKeysIterator.next(); Element floatNumElem = colorDictRGBIterator.next(); String floatNumStr = floatNumElem.getValue(); switch (colorComponentName.getValue()) { case "Blue Component": blue = Float.parseFloat(floatNumStr); break; case "Green Component": green = Float.parseFloat(floatNumStr); break; case "Red Component": red = Float.parseFloat(floatNumStr); break; } } if (blue == -1 || red == -1 || green == -1) { throw new SchemeImportException("Scheme is not valid"); } Color color = new Color(red, green, blue); Comparable key = colorsMap.get(ansiKeyName); if (ansiKeyName.equals("Background Color")) { newScheme.setColor((ColorKey) key, color); } else { if (ansiKeyName.equals("Foreground Color")) { setErrorOutputTextAttributes(newScheme, color); } setTextAttributesByKey(newScheme, (TextAttributesKey) key, color); } } return newScheme; } private Map<String, Comparable> createItermcolorsMap() { Map<String, Comparable> colorsMap = new HashMap<>(); colorsMap.put("Ansi 0 Color", ColoredOutputTypeRegistry.getAnsiColorKey(0)); colorsMap.put("Ansi 1 Color", ColoredOutputTypeRegistry.getAnsiColorKey(1)); colorsMap.put("Ansi 2 Color", ColoredOutputTypeRegistry.getAnsiColorKey(2)); colorsMap.put("Ansi 3 Color", ColoredOutputTypeRegistry.getAnsiColorKey(3)); colorsMap.put("Ansi 4 Color", ColoredOutputTypeRegistry.getAnsiColorKey(4)); colorsMap.put("Ansi 5 Color", ColoredOutputTypeRegistry.getAnsiColorKey(5)); colorsMap.put("Ansi 6 Color", ColoredOutputTypeRegistry.getAnsiColorKey(6)); colorsMap.put("Ansi 7 Color", ColoredOutputTypeRegistry.getAnsiColorKey(7)); colorsMap.put("Ansi 8 Color", ColoredOutputTypeRegistry.getAnsiColorKey(8)); colorsMap.put("Ansi 9 Color", ColoredOutputTypeRegistry.getAnsiColorKey(9)); colorsMap.put("Ansi 10 Color", ColoredOutputTypeRegistry.getAnsiColorKey(10)); colorsMap.put("Ansi 11 Color", ColoredOutputTypeRegistry.getAnsiColorKey(11)); colorsMap.put("Ansi 12 Color", ColoredOutputTypeRegistry.getAnsiColorKey(12)); colorsMap.put("Ansi 13 Color", ColoredOutputTypeRegistry.getAnsiColorKey(13)); colorsMap.put("Ansi 14 Color", ColoredOutputTypeRegistry.getAnsiColorKey(14)); colorsMap.put("Ansi 15 Color", ColoredOutputTypeRegistry.getAnsiColorKey(15)); colorsMap.put("Background Color", ConsoleViewContentType.CONSOLE_BACKGROUND_KEY); colorsMap.put("Foreground Color", ConsoleViewContentType.NORMAL_OUTPUT_KEY); return colorsMap; } // добавить обработку исключений private EditorColorsScheme parseTerminalFile( VirtualFile selectedFile, EditorColorsScheme newScheme ) throws SchemeImportException { Map<String, Comparable> colorsMap = createTerminalColorsMap(); Element root = SchemeImportUtil.loadSchemeDom(selectedFile); Element dict = root.getChild("dict"); List<Element> dataList = dict.getChildren(); if (dataList.isEmpty()) { throw new InvalidDataException("Scheme is not valid; no data"); } Iterator<Element> dataIterator = dataList.iterator(); while (dataIterator.hasNext()) { Element colorElement = dataIterator.next(); //problems with keys and data lists String colorName = colorElement.getValue(); if (!colorsMap.containsKey(colorName)) { dataIterator.next(); continue; } Element dataElement = dataIterator.next(); String data = dataElement.getValue(); byte[] dataBytes = data.getBytes(StandardCharsets.UTF_8); byte[] decoded = Base64.getMimeDecoder().decode(dataBytes); String decodedString = new String(decoded, StandardCharsets.UTF_8); Pattern pattern = Pattern.compile("\\d(\\.\\d+)? \\d(\\.\\d+)? \\d(\\.\\d+)?"); Matcher matcher = pattern.matcher(decodedString); boolean found = false; String colorFloats = ""; while (matcher.find()) { colorFloats = matcher.group(); found = true; } if (!found) return null; String[] splitting = colorFloats.split(" "); float red = Float.parseFloat(splitting[0]); float green = Float.parseFloat(splitting[1]); float blue = Float.parseFloat(splitting[2]); Color color = new Color(red, green, blue); Comparable key = colorsMap.get(colorName); if (colorName.equals("BackgroundColor")) { newScheme.setColor((ColorKey) key, color); } else { if (colorName.equals("TextColor")) { setErrorOutputTextAttributes(newScheme, color); } setTextAttributesByKey(newScheme, (TextAttributesKey) key, color); } } return newScheme; } private Map<String, Comparable> createTerminalColorsMap() { Map<String, Comparable> colorsMap = new HashMap<>(); colorsMap.put("ANSIBlackColor", ColoredOutputTypeRegistry.getAnsiColorKey(0)); colorsMap.put("ANSIRedColor", ColoredOutputTypeRegistry.getAnsiColorKey(1)); colorsMap.put("ANSIGreenColor", ColoredOutputTypeRegistry.getAnsiColorKey(2)); colorsMap.put("ANSIYellowColor", ColoredOutputTypeRegistry.getAnsiColorKey(3)); colorsMap.put("ANSIBlueColor", ColoredOutputTypeRegistry.getAnsiColorKey(4)); colorsMap.put("ANSIMagentaColor", ColoredOutputTypeRegistry.getAnsiColorKey(5)); colorsMap.put("ANSICyanColor", ColoredOutputTypeRegistry.getAnsiColorKey(6)); colorsMap.put("ANSIWhiteColor", ColoredOutputTypeRegistry.getAnsiColorKey(7)); colorsMap.put("ANSIBrightBlackColor", ColoredOutputTypeRegistry.getAnsiColorKey(8)); colorsMap.put("ANSIBrightRedColor", ColoredOutputTypeRegistry.getAnsiColorKey(9)); colorsMap.put("ANSIBrightGreenColor", ColoredOutputTypeRegistry.getAnsiColorKey(10)); colorsMap.put("ANSIBrightYellowColor", ColoredOutputTypeRegistry.getAnsiColorKey(11)); colorsMap.put("ANSIBrightBlueColor", ColoredOutputTypeRegistry.getAnsiColorKey(12)); colorsMap.put("ANSIBrightMagentaColor", ColoredOutputTypeRegistry.getAnsiColorKey(13)); colorsMap.put("ANSIBrightCyanColor", ColoredOutputTypeRegistry.getAnsiColorKey(14)); colorsMap.put("ANSIBrightWhiteColor", ColoredOutputTypeRegistry.getAnsiColorKey(15)); colorsMap.put("BackgroundColor", ConsoleViewContentType.CONSOLE_BACKGROUND_KEY); colorsMap.put("TextColor", ConsoleViewContentType.NORMAL_OUTPUT_KEY); return colorsMap; } private void setErrorOutputTextAttributes(EditorColorsScheme scheme, Color color) { AttributesFlyweight attributesFlyweight = AttributesFlyweight.create( color, null, 0, color, EffectType.LINE_UNDERSCORE, null); TextAttributes textAttributes = TextAttributes.fromFlyweight(attributesFlyweight); scheme.setAttributes(ConsoleViewContentType.ERROR_OUTPUT_KEY, textAttributes); } private void setTextAttributesByKey(EditorColorsScheme scheme, TextAttributesKey key, Color color) { AttributesFlyweight attributesFlyweight = AttributesFlyweight.create( color, null, 0, null, null, null); TextAttributes textAttributes = TextAttributes.fromFlyweight(attributesFlyweight); scheme.setAttributes(key, textAttributes); } }
4018d2f24aedd23ea194873e778b50dfa672383c
d71e879b3517cf4fccde29f7bf82cff69856cfcd
/ExtractedJars/Shopkick_com.shopkick.app/javafiles/com/bumptech/glide/request/transition/DrawableCrossFadeFactory.java
aff99da74ca85e2ff95a9dbfee28238eccb44bb9
[ "MIT" ]
permissive
Andreas237/AndroidPolicyAutomation
b8e949e072d08cf6c6166c3f15c9c63379b8f6ce
c1ed10a2c6d4cf3dfda8b8e6291dee2c2a15ee8a
refs/heads/master
2020-04-10T02:14:08.789751
2019-05-16T19:29:11
2019-05-16T19:29:11
160,739,088
5
1
null
null
null
null
UTF-8
Java
false
false
4,239
java
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.kpdus.com/jad.html // Decompiler options: packimports(3) annotate safe package com.bumptech.glide.request.transition; import com.bumptech.glide.load.DataSource; // Referenced classes of package com.bumptech.glide.request.transition: // TransitionFactory, DrawableCrossFadeTransition, NoTransition, Transition public class DrawableCrossFadeFactory implements TransitionFactory { public static class Builder { public DrawableCrossFadeFactory build() { return new DrawableCrossFadeFactory(durationMillis, isCrossFadeEnabled); // 0 0:new #6 <Class DrawableCrossFadeFactory> // 1 3:dup // 2 4:aload_0 // 3 5:getfield #23 <Field int durationMillis> // 4 8:aload_0 // 5 9:getfield #27 <Field boolean isCrossFadeEnabled> // 6 12:invokespecial #30 <Method void DrawableCrossFadeFactory(int, boolean)> // 7 15:areturn } public Builder setCrossFadeEnabled(boolean flag) { isCrossFadeEnabled = flag; // 0 0:aload_0 // 1 1:iload_1 // 2 2:putfield #27 <Field boolean isCrossFadeEnabled> return this; // 3 5:aload_0 // 4 6:areturn } private static final int DEFAULT_DURATION_MS = 300; private final int durationMillis; private boolean isCrossFadeEnabled; public Builder() { this(300); // 0 0:aload_0 // 1 1:sipush 300 // 2 4:invokespecial #18 <Method void DrawableCrossFadeFactory$Builder(int)> // 3 7:return } public Builder(int i) { // 0 0:aload_0 // 1 1:invokespecial #21 <Method void Object()> durationMillis = i; // 2 4:aload_0 // 3 5:iload_1 // 4 6:putfield #23 <Field int durationMillis> // 5 9:return } } protected DrawableCrossFadeFactory(int i, boolean flag) { // 0 0:aload_0 // 1 1:invokespecial #21 <Method void Object()> duration = i; // 2 4:aload_0 // 3 5:iload_1 // 4 6:putfield #23 <Field int duration> isCrossFadeEnabled = flag; // 5 9:aload_0 // 6 10:iload_2 // 7 11:putfield #25 <Field boolean isCrossFadeEnabled> // 8 14:return } private Transition getResourceTransition() { if(resourceTransition == null) //* 0 0:aload_0 //* 1 1:getfield #30 <Field DrawableCrossFadeTransition resourceTransition> //* 2 4:ifnonnull 26 resourceTransition = new DrawableCrossFadeTransition(duration, isCrossFadeEnabled); // 3 7:aload_0 // 4 8:new #32 <Class DrawableCrossFadeTransition> // 5 11:dup // 6 12:aload_0 // 7 13:getfield #23 <Field int duration> // 8 16:aload_0 // 9 17:getfield #25 <Field boolean isCrossFadeEnabled> // 10 20:invokespecial #34 <Method void DrawableCrossFadeTransition(int, boolean)> // 11 23:putfield #30 <Field DrawableCrossFadeTransition resourceTransition> return ((Transition) (resourceTransition)); // 12 26:aload_0 // 13 27:getfield #30 <Field DrawableCrossFadeTransition resourceTransition> // 14 30:areturn } public Transition build(DataSource datasource, boolean flag) { if(datasource == DataSource.MEMORY_CACHE) //* 0 0:aload_1 //* 1 1:getstatic #44 <Field DataSource DataSource.MEMORY_CACHE> //* 2 4:if_acmpne 11 return NoTransition.get(); // 3 7:invokestatic #49 <Method Transition NoTransition.get()> // 4 10:areturn else return getResourceTransition(); // 5 11:aload_0 // 6 12:invokespecial #51 <Method Transition getResourceTransition()> // 7 15:areturn } private final int duration; private final boolean isCrossFadeEnabled; private DrawableCrossFadeTransition resourceTransition; }
b99d33d96f700d200d06d3524e6e84376a58867e
18e464f5f4e3053fe6d2cca78fc6811e01ebb6d1
/src/br/com/drogaria/util/FacesUtil.java
fc0ab75460f65a77aab82fd9dacc031ba5b390f9
[]
no_license
aloisce/Drogaria
ac0005d338ea4d451f36d902ed776d2cb5cf540c
0aa83bfaf67f46fc84586fbfadbd98bbd6416149
refs/heads/master
2021-01-22T16:44:49.569710
2015-03-05T14:43:49
2015-03-05T14:43:49
31,077,312
0
0
null
null
null
null
UTF-8
Java
false
false
1,418
java
package br.com.drogaria.util; import java.util.Map; import javax.faces.application.FacesMessage; import javax.faces.context.ExternalContext; import javax.faces.context.FacesContext; import javax.faces.context.Flash; public class FacesUtil { public static void adicionaMsgInfo(String mensagem) { FacesMessage facesMessage = new FacesMessage( FacesMessage.SEVERITY_INFO, mensagem, mensagem); FacesContext facesContext = FacesContext.getCurrentInstance(); ExternalContext externalContext = facesContext.getExternalContext(); Flash flash = externalContext.getFlash(); flash.setKeepMessages(true); facesContext.addMessage(null, facesMessage); } public static void adicionarMsgErro(String mensagem) { FacesMessage facesMessage = new FacesMessage( FacesMessage.SEVERITY_ERROR, mensagem, mensagem); FacesContext facesContext = FacesContext.getCurrentInstance(); ExternalContext externalContext = facesContext.getExternalContext(); Flash flash = externalContext.getFlash(); flash.setKeepMessages(true); facesContext.addMessage(null, facesMessage); } public static String getParam(String nome) { FacesContext facesContext = FacesContext.getCurrentInstance(); ExternalContext externalContext = facesContext.getExternalContext(); Map<String, String> parametros = externalContext .getRequestParameterMap(); String valor = parametros.get(nome); return valor; } }
ab6e5badfb8ee53785c1756f7727b7cfecd37c2c
484eca93407b4a24b861bc9b537bd63bd7cdcae2
/proj1a/LinkedListDeque.java
abced272544a8eaad7cb1bd039a9ac03b635bd47
[]
no_license
xuex2017/cs61b-18sp
73fc29a4a2afcd291eb1e8812d66f729c4f5101c
4c97f00c3511e495823aee187c51aaa6a4ffad22
refs/heads/master
2021-04-28T04:02:23.956030
2018-03-07T16:06:16
2018-03-07T16:06:16
122,152,252
1
1
null
null
null
null
UTF-8
Java
false
false
4,072
java
public class LinkedListDeque<Whatever> implements Deque<Whatever>{ // nested class Stuff Node. private class StuffNode { public StuffNode prev; public Whatever item; public StuffNode next; public StuffNode(Whatever i, StuffNode p, StuffNode n){ item = i; prev = p; next = n; } public StuffNode(Whatever x) { item = x; prev = null; next = null; } } //the first node and the last node (if existing) is at sentinel.next and sentinel.prev private StuffNode sentinel; private int size; public LinkedListDeque(){ sentinel = new StuffNode(null); sentinel.prev = sentinel; sentinel.next = sentinel; size = 0; } public LinkedListDeque(Whatever x){ sentinel = new StuffNode(null); sentinel.next = new StuffNode(x, sentinel, sentinel); sentinel.prev = sentinel.next; size = 1; } /** Returns the first item in the list. */ public Whatever getFirst() { return sentinel.next.item; } /** Returns the last item in the list. */ public Whatever getLast() { return sentinel.prev.item; } //Adds an item of type T to the front of the deque. @Override public void addFirst(Whatever x){ StuffNode first = new StuffNode(x); /*if (this.isEmpty() == true){ sentinel.next = new StuffNode(x, sentinel, sentinel); sentinel.prev = sentinel.next; size = 1; } else{*/ first.prev = sentinel; first.next = sentinel.next; sentinel.next.prev = first; sentinel.next = first; size += 1; //} } /** Adds an item to the end of the list. */ @Override public void addLast(Whatever x) { StuffNode last = new StuffNode(x); last.prev = sentinel.prev; last.next = sentinel; sentinel.prev.next = last; sentinel.prev = last; size += 1; } /** Returns true if deque is empty, false otherwise. */ @Override public boolean isEmpty(){ return size == 0; } /** Returns the number of items in the deque. */ @Override public int size(){ return size; } /** Prints the items in the deque from first to last, separated by a space.*/ @Override public void printDeque(){ StuffNode curr = sentinel.next; while (curr != sentinel && curr != null) { System.out.print(curr.item + " "); curr = curr.next; } } /** Removes and returns the item at the front of the deque. If no such item exists, returns null. */ @Override public Whatever removeFirst(){ Whatever first = sentinel.next.item; sentinel.next = sentinel.next.next; size -= 1; return first; } /** Removes and returns the item at the back of the deque. If no such item exists, returns null.*/ @Override public Whatever removeLast(){ Whatever last = sentinel.prev.item; sentinel.prev = sentinel.prev.prev; return last; } /** Gets the item at the given index, where 0 is the front, 1 is the next item, and so forth. * If no such item exists, returns null.*/ @Override public Whatever get(int index){ if (index >= size || index < 0){ return null; } else{ StuffNode temp = sentinel; for (int i = 0; i <= index; i++){ temp = temp.next; } return temp.item; } } /**Same as get, but uses recursion*/ public Whatever getRecursive(int index){ if (index >= size || index < 0){ return null; } else{ if (index == 0) { return sentinel.next.item; } else{ this.removeFirst(); return this.getRecursive(index - 1); } } } }
aa295d8e7c4275072f2e587e70e24fbf0b584da3
4b1dd3e2bc25b9e5d53f73aa0216f097b6515b7b
/04_NumbersStringsAndDates/homework_4.4/AlphabeticCode/src/Main.java
3d96130b63649e50a0f86c0ea5c8f565bffef8e9
[]
no_license
gleb-borisov/java_basics
0147ca31eafe93929fb9422c7842174d53a4ad7a
ebf4b241091759afd6a323852caf2c1b46120979
refs/heads/master
2023-04-08T19:29:27.608501
2021-04-13T14:27:25
2021-04-13T14:27:25
304,539,548
0
0
null
null
null
null
UTF-8
Java
false
false
1,109
java
public class Main { public static void main(String[] args) { char[] alphabetLat = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'}; char[] alphabetRus = {'а','б','в','г','д','е','ё','ж','з','и','й','к','л','м','н','о','п','р','с','т','у','ф','х','ц','ч','ш','щ','ъ','ы','ь','э','ю','я','А','Б','В','Г','Д','Е','Ё','Ж','З','И','Й','К','Л','М','Н','О','П','Р','С','Т','У','Ф','Х','Ц','Ч','Ш','Щ','Ъ','Ы','Ь','Э','Ю','Я'}; System.out.println("Латинский шрифт - кодировка:"); for (char letterLat : alphabetLat) { System.out.println(letterLat + " - " + (int)letterLat); } System.out.println(); System.out.println("Кириллица - кодировка:"); for (char letterRus : alphabetRus) { System.out.println(letterRus + " - " + (int)letterRus); } } }
7eb900793311f7d35f5557f173597d872d068ccd
bf7074098548a547170b050da487fe2ba3e49ef3
/src/info/emptycanvas/apps/darkfortress/SolPlan.java
f28b8b409b6875dd879f2ab5626f910ba6f01fa7
[]
no_license
manudahmen/darkfortress3
4657152df9936b65604cd0c6c964f9dc98a51cce
5f1a784f0ea82c64b7f0b8f0e1c4ad4108ae73ce
refs/heads/master
2021-01-15T08:20:21.638932
2014-12-03T10:58:01
2014-12-03T10:58:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,001
java
package info.emptycanvas.apps.darkfortress; import info.emptycanvas.library.nurbs.ParametrizedSurface; import info.emptycanvas.library.object.Point3D; import info.emptycanvas.library.object.Representable; import info.emptycanvas.library.object.RepresentableConteneur; import java.util.Iterator; @SuppressWarnings("serial") public class SolPlan extends Terrain { public SolPlan() { ps = new ParametrizedSurface() { @Override public Point3D calculerPoint3D(double u, double v) { return new Point3D(u - 0.5, 0.05, v - 0.5); } @Override public Point3D calculerVitesse3D(double u, double v) { return new Point3D(0, 0, 1); } }; SolPP sol = new SolPP(ps); RepresentableConteneur generateWire = sol.generateWire(); Iterator<Representable> it = generateWire.iterator(); while (it.hasNext()) { add(it.next()); } } }
e5ec280b47d5aaba81f82cf435716c21f2b1d1c6
97ebf5855ee27d40536e2dbb85017896fe892e0d
/app/src/main/java/com/dolphin/browser/util/ConcurrentDateFormateUtils.java
1db166f6aa3de401c8cef91c07613062c84448a4
[]
no_license
dannl/AOM
45882046c102c6bf64fbc78b9665e4cab9edd842
58bbb464d40a83a3b76da1b8970a8f6a23ce107c
refs/heads/master
2016-09-05T09:56:42.589568
2015-06-30T13:49:19
2015-06-30T13:49:19
38,300,086
0
0
null
null
null
null
UTF-8
Java
false
false
847
java
package com.dolphin.browser.util; import android.annotation.SuppressLint; import java.text.SimpleDateFormat; import java.util.Date; /** * @author blwang * * ConcurrentDateFormateUtils of utils */ public class ConcurrentDateFormateUtils { private static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss"; private static final ThreadLocal<SimpleDateFormat> DATE_FORMATER = new ThreadLocal<SimpleDateFormat>() { @SuppressLint("SimpleDateFormat") @Override protected SimpleDateFormat initialValue() { return new SimpleDateFormat(DEFAULT_DATE_FORMAT); } }; public static String formateDateToString(Date date) { return DATE_FORMATER.get().format(date); } public static String currentDateToString() { return formateDateToString(new Date()); } }
3666eac7a3212b80e41c37c6ed95dbdea91cb89b
7e059dff9844d2c002d63c2b2ecbf8e795a6c277
/src/main/java/com/vora/documentengine/json/JSONDataSourceReviewsLocal.java
69028fc7ef5af0b4e605031a8f126a82157ad1ed
[]
no_license
azyubing/vorademo
f7d51adb2049d37b042525c36f3c7f49fe86605f
085d107ab57b7109481488ae91f08fc29f073528
refs/heads/master
2021-09-03T07:30:58.306613
2018-01-07T03:06:08
2018-01-07T03:06:08
115,978,488
1
0
null
null
null
null
UTF-8
Java
false
false
1,435
java
package com.vora.documentengine.json; import org.apache.spark.SparkConf; import org.apache.spark.api.java.JavaSparkContext; import org.apache.spark.sql.DataFrame; import org.apache.spark.sql.SQLContext; /** * JSON数据源 * @author Yanbing */ public class JSONDataSourceReviewsLocal { /** * Avoid getting following error: * Exception in thread "main" java.net.ConnectException: * Call From DLCMXXXXXXA/127.0.0.1 to vorahost:9000 failed on connection exception: * java.net.ConnectException: Connection refused; * For more details see: http://wiki.apache.org/hadoop/ConnectionRefused * Add following to VM arguments: * -DHADOOP_USER_NAME=root * */ public static void main(String[] args) { SparkConf conf = new SparkConf() .setAppName("JSONDataSourceReviewLocal") .setMaster("local"); JavaSparkContext sc = new JavaSparkContext(conf); SQLContext sqlContext = new SQLContext(sc); DataFrame reviewsDF = sqlContext.read().json("./data/reviews.json"); reviewsDF.registerTempTable("product_reviews"); DataFrame reviewsDFById = sqlContext.sql( "select Document_id DOCUMENT_ID," + "product_id PRODUCT_ID, " + "product_name PRODUCT_NAME, " + "post_date POST_DATE, " + "customer_details.id CUSTOMER_ID, " + "customer_details.name CUSTOMER_NAME from product_reviews where _id>=10"); reviewsDFById.show(); sc.stop(); } }
8fde085a52bc653f450e01495b0d01f5dff90a90
27c898da9fa138f80ee329e3c32700ccdddeb092
/src/main/java/com/principal/uberization/userInfo/service/UserService.java
bc26cea659bb80ef04195d33c22a2deb54a36c2b
[]
no_license
sujay-anakkathil/Uberization
366ff1f6f68e1a7a329263ea32b2e91e6978c3eb
fc166d5addc133c4e184e349895b06d153287a35
refs/heads/master
2020-03-27T12:43:16.479671
2018-09-02T07:42:03
2018-09-02T07:42:03
146,564,394
0
0
null
null
null
null
UTF-8
Java
false
false
731
java
package com.principal.uberization.userInfo.service; import com.principal.uberization.exception.UberizationSystemException; import com.principal.uberization.userInfo.vo.UserInfoVO; /** * @author Sujay * This interface is used for various operations on User information */ public interface UserService { /** * @param userinfo * @return * This method is used to register user * @throws UberizationSystemException */ Boolean registerUser(final UserInfoVO userinfo) throws UberizationSystemException; /** * @param userId * @return * @throws UberizationSystemException * this method is used to get user profile by email */ UserInfoVO getUserProfile(final String userId) throws UberizationSystemException; }
467f27060690077e4a2ffdbb9ef4e40c5c999ca1
485e033ad362f7fa8ea5090237642772425700ea
/aopdemo/src/main/java/cn/aopdemo/PersonService.java
7a3d120215dc2d8d56af55896cee4b73b5d78b3d
[]
no_license
ziyunwenfeng/mymvctest
137cf2651b43f9d9f7a1ba275889a825c2005d81
4d0d007e14d8592ed765f7ac106460d3d45f962d
refs/heads/master
2021-01-02T23:11:48.533864
2017-10-17T15:03:33
2017-10-17T15:03:33
99,489,205
0
2
null
null
null
null
UTF-8
Java
false
false
535
java
package cn.aopdemo; //@Service public class PersonService { public void addPerson(String personName) { System.out.println("add person " + personName); } public boolean deletePerson(String personName) { System.out.println("delete person " + personName) ; return true; } public void editPerson(String personName) { System.out.println("edit person " + personName); throw new RuntimeException("edit person throw exception"); } }
1736078c8a163dafde0cf47e70c3266169bd1594
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/30/30_19e6bed42e82e63a7b2a4aedb2fcfac3bb29fca8/MICalculator/30_19e6bed42e82e63a7b2a4aedb2fcfac3bb29fca8_MICalculator_s.java
f8d306438c64bb95df5d66641319fcccf40cf8f5
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,910
java
package utils.mutualinformation; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import seqManipulation.AlignmentSequenceEditor; import seqManipulation.GapToolbox; import fileformats.fastaIO.Pair; public class MICalculator { public static Map<Pair<Integer, Integer>, Double> calculateProteinMIMatrix(List<Pair<String,String>> alignment) { GapToolbox gtb = new GapToolbox(); AlignmentSequenceEditor ase = new AlignmentSequenceEditor(alignment); // Look for columns with gaps in the alignment boolean[] keepers = gtb.getKeepers(alignment); // Remove gaps List<Pair<String,String>> nAlign = gtb.removeGapedColumns(alignment, keepers); List<Character[]> columns = new ArrayList<Character[]>(); // Calculate Entropy for each column double[] columnEntropies = new double[nAlign.get(0).getSecond().length()]; for (int i=0; i<columnEntropies.length; i++) { // Get the characters for the current column Character[] currentColumn = ase.getColumnAt(i); columns.add(currentColumn); columnEntropies[i] = EntropyCalculator.calculateEntropy(currentColumn, 20, false); } Map<Pair<Integer,Integer>,Double> diColumnEntropies = new HashMap<Pair<Integer,Integer>, Double>(); // Iterate Entropy for each pair of columns for(int i = 0 ; i < columnEntropies.length-1;i++) { for (int j = i+1 ; j<columnEntropies.length;j++) { try { diColumnEntropies.put(new Pair<Integer,Integer>(i,j) , EntropyCalculator.calculateEntropy(columns.get(i), columns.get(j), 2, false)); } catch (CharGroupSizeException e) { e.printStackTrace(); } } } return diColumnEntropies; } public static void main(String[] args) { } }
7f7d3c4826713728e74779aba09ba2f70a3a0616
0ed293d23b717728b40e1ad0bcd5bbf44ac10385
/com/learning/middleschool/abst/Child2.java
6c89ffed0c2986f0514abe52adfe22ea2df1e4a4
[]
no_license
bhanushankar422/JavaTraining
3550e1f4eace2f9367961e05d8ae0d5ff30c7866
cb1bf611fd7092698ae611d51bc7ca22bc25597a
refs/heads/master
2022-11-12T20:49:06.886835
2020-07-03T01:56:31
2020-07-03T01:56:31
272,624,297
0
1
null
null
null
null
UTF-8
Java
false
false
212
java
package com.learning.middleschool.abst; public class Child2 extends Parent{ public void child2Method(String name){ System.out.println("\nHello! "+ name + ". This is exclusive Child2 method"); } }
d4bf25967fef4082f9af55ccc4b53b2dbee64c27
d149c8e99189b9b6d3abf9f806fe7d4d60d3af3e
/IDE/src/main/java/com/cognizant/cognizantits/ide/main/shr/mobile/MobileUtil.java
be80292dce78b3f8ed9dcbbe73780f11f157bf8b
[ "Apache-2.0" ]
permissive
CognizantQAHub/Cognizant-Intelligent-Test-Scripter
f7e3733b0b76e5e006e40164172b197103e8996c
828506dbc5bc1e6ff78bfe75e6871b29c6a9ad33
refs/heads/master
2023-04-30T11:26:49.347645
2023-04-20T06:44:15
2023-04-20T06:44:15
91,552,889
98
102
Apache-2.0
2021-11-09T06:56:10
2017-05-17T08:34:28
Java
UTF-8
Java
false
false
6,723
java
/* * Copyright 2014 - 2017 Cognizant Technology Solutions * * 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.cognizant.cognizantits.ide.main.shr.mobile; import com.cognizant.cognizantits.datalib.or.mobile.MobileORPage; import java.awt.Image; import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import java.io.File; import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; import javax.imageio.ImageIO; import javax.swing.ImageIcon; import javax.swing.JLabel; import javax.swing.JTable; import javax.swing.JTree; import javax.swing.table.DefaultTableModel; import javax.swing.tree.TreePath; import org.apache.commons.codec.binary.Base64; /** * * */ public abstract class MobileUtil implements MobileUtils { private JTree tree; private JLabel label; private JTable table; public BufferedImage img; @Override public void setValues(JTree tree, JLabel label, JTable table) { this.tree = tree; this.label = label; this.table = table; } public double scaleFactor; private Boolean highlightOnMouseMove = true; @Override public void setScreenShotImageToLabelWResize() { if (img != null) { label.setIcon(getScreenShotImage()); } } @Override public void setScreenShotImageToLabelWResize(File screenShotFile) { label.setIcon(getScreenShotImage(screenShotFile)); setHighlightOnMouseMove(); } @Override public void setScreenShotImageToLabelWResize(String base64Image) { label.setIcon(getImageIcon(base64Image)); setHighlightOnMouseMove(); } private ImageIcon getImageIcon(String base64Image) { try { byte[] imageByte = Base64.decodeBase64(base64Image); try (ByteArrayInputStream bis = new ByteArrayInputStream(imageByte)) { img = ImageIO.read(bis); return getScreenShotImage(); } catch (Exception ex) { Logger.getLogger(MobileUtil.class.getName()).log(Level.SEVERE, null, ex); } } catch (Exception ex) { Logger.getLogger(MobileUtil.class.getName()).log(Level.SEVERE, null, ex); } return null; } private ImageIcon getScreenShotImage(File screenShotFile) { try { img = ImageIO.read(screenShotFile); return getScreenShotImage(); } catch (IOException ex) { Logger.getLogger(MobileUtil.class.getName()).log(Level.SEVERE, null, ex); } return null; } public ImageIcon getScreenShotImage() { if (img.getHeight() > img.getWidth()) { scaleFactor = label.getHeight() / (double) img.getHeight(); } else { scaleFactor = label.getWidth() / (double) img.getWidth(); } int width = (int) (img.getWidth() * scaleFactor); int height = (int) (img.getHeight() * scaleFactor); Image scaled = img.getScaledInstance(width, height, Image.SCALE_SMOOTH); return new ImageIcon(scaled); } @Override public Rect loadValuesToTable() { if (tree.getSelectionPath() != null) { Object selected = tree.getSelectionPath().getLastPathComponent(); if (selected instanceof MobileTreeNode) { MobileTreeNode treenode = (MobileTreeNode) selected; DefaultTableModel model = (DefaultTableModel) table.getModel(); removeAllRows(model); for (Object attr : treenode.getAttributes().keySet()) { model.addRow(new Object[]{attr, treenode.getAttributes().get(attr)}); } return treenode.getBounds(); } } return null; } private void removeAllRows(DefaultTableModel model) { model.setRowCount(0); } @Override public void switchHighlightOnMouseMove() { highlightOnMouseMove = !highlightOnMouseMove; } public void setHighlightOnMouseMove() { highlightOnMouseMove = true; } @Override public void highlightOnMouseMove(int x, int y) { if (highlightOnMouseMove) { Object root = tree.getModel().getRoot(); if (root instanceof MobileTreeNode) { updateSelectionForCoordinates(x, y); } } } /** * Based on the x y coordinates find the element in the tree and select the * node * * @param x * @param y */ public void updateSelectionForCoordinates(int x, int y) { MobileTreeNode mRootNode = (MobileTreeNode) tree.getModel().getRoot(); MobileTreeNode mSelectedNode = null; if (tree.getSelectionPath() != null) { mSelectedNode = (MobileTreeNode) tree.getSelectionPath().getLastPathComponent(); } MinAreaFindNodeListener listener = new MinAreaFindNodeListener(); boolean found = mRootNode.findLeafMostNodesAtPoint(x, y, listener); if (found && listener.mNode != null && !listener.mNode.equals(mSelectedNode)) { TreePath path = new TreePath(listener.mNode.getPath()); tree.setSelectionPath(path); tree.scrollPathToVisible(path); } } @Override public void saveImageTo(MobileORPage node) { String loc = node.getRepLocation(); if (loc != null) { File file = new File(loc); if (!file.exists()) { file.mkdirs(); } saveImage(loc + File.separator + "screenshot.png"); } } @Override public String[] getResourcesFor(MobileORPage mobileObjectNode) { String loc = mobileObjectNode.getRepLocation(); if (loc != null && new File(loc).exists()) { return new String[]{loc + File.separator + "dump.xml", loc + File.separator + "screenshot.png"}; } return new String[]{}; } private void saveImage(String loc) { try { ImageIO.write(img, "png", new File(loc)); } catch (IOException ex) { Logger.getLogger(MobileUtil.class.getName()).log(Level.SEVERE, null, ex); } } }
5a2dc852800318876dd8126446dbaf26a0d002db
3dad0c5b9c51886b91b7bca7fc53d2c3f9f1b1fb
/src/java/servlets/ShowPurchasesServlet.java
833d04fed96dee51d5af2722f07f01d943c33ec3
[]
no_license
jarcelo/java-clubdb
1c014f56ef23356b16b5c51c5f2ebb3204f2a48c
660b6c437fa1d6f50d09f79fb507eab0562ebe7d
refs/heads/master
2020-07-25T10:03:29.406488
2017-01-18T15:18:59
2017-01-18T15:18:59
73,778,830
0
0
null
null
null
null
UTF-8
Java
false
false
5,431
java
package servlets; import business.ConnectionPool; import business.Member; import business.Purchase; import java.io.IOException; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.text.NumberFormat; import java.util.ArrayList; import javax.servlet.RequestDispatcher; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * * @author josepharcelo */ public class ShowPurchasesServlet extends HttpServlet { protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html;charset=UTF-8"); String URL = "/MemberScreen.jsp"; String query = "", msg = "", month = "", day = "", year =""; String whereStatement = ""; NumberFormat curr = NumberFormat.getCurrencyInstance(); try { Member m = (Member) request.getSession().getAttribute("m"); month = request.getParameter("month"); day = request.getParameter("day"); year = request.getParameter("year"); ConnectionPool pool = ConnectionPool.getInstance(); Connection conn = pool.getConnection(); Statement s = conn.createStatement(); if (month.isEmpty() || day.isEmpty() || year.isEmpty()) { whereStatement = ""; } else { whereStatement = " AND p.purchasedt >= '" + year + "-" + month + "-" + day + "' "; } query = "SELECT p.memID, p.PurchaseDt, p.TransType, " + " p.TransCd, c.TransDesc, p.Amount " + " FROM tblPurchases p, tblCodes c " + " WHERE p.transcd = c.transcd " + " AND p.memid = '" + m.getMemberId() + "'" + whereStatement + " ORDER BY p.purchaseDt"; ResultSet r = s.executeQuery(query); ArrayList<Purchase> pur = new ArrayList<>(); while(r.next()){ Purchase p = new Purchase( r.getString("PurchaseDt"), r.getString("TransType"), r.getString("TransCd"), r.getString("TransDesc"), r.getDouble("Amount")); pur.add(p); } r.last(); msg = "Total Records = " + r.getRow(); URL = "/Purchases.jsp"; request.setAttribute("pur", pur); //Credit PreparedStatement credit = conn.prepareStatement("SELECT SUM(p.Amount) " + " FROM tblPurchases p " + " WHERE p.TransType = 'C' " + " AND p.memid = '" + m.getMemberId() + "'" + whereStatement); ResultSet creditTotal = credit.executeQuery(); creditTotal.next(); // Debit PreparedStatement debit = conn.prepareStatement ("SELECT SUM(p.Amount) " + " FROM tblPurchases p " + " WHERE p.TransType = 'D' " + " AND p.memid = '" + m.getMemberId() + "'" + whereStatement); ResultSet debitTotal = debit.executeQuery(); debitTotal.next(); double balance = Double.parseDouble(debitTotal.getString(1)) - Double.parseDouble(creditTotal.getString(1)); request.setAttribute("bal", curr.format(balance)); } catch (SQLException e) { msg = "SQL Exception: " + e.getMessage(); } catch (Exception e) { } request.setAttribute("msg", msg); RequestDispatcher disp = getServletContext().getRequestDispatcher(URL); disp.forward(request, response); } // <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code."> /** * Handles the HTTP <code>GET</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** * Handles the HTTP <code>POST</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } /** * Returns a short description of the servlet. * * @return a String containing servlet description */ @Override public String getServletInfo() { return "Short description"; }// </editor-fold> }
cc3733798dd0e6895d185519d09f7183ea575f92
b55134938508327270af8c399e053dd10cdbe9d5
/src/domain/Areas.java
1015f477ea1c0a47bea96974add287d9aee814c4
[]
no_license
uestcGJ/fiberMonitor
e085b79d67d84de721af2901af7f7e07a08b993d
76b7432b4f8afdbec6e4cdcc7d919d80a3b0d0bf
refs/heads/master
2020-12-24T05:49:58.305911
2017-06-14T03:47:53
2017-06-14T03:47:53
93,135,500
0
0
null
null
null
null
UTF-8
Java
false
false
2,627
java
/*区域*/ package domain; import java.util.*; import javax.persistence.*; import org.hibernate.annotations.Cascade; import org.hibernate.annotations.CascadeType; import org.hibernate.annotations.GenericGenerator; @Entity @Table(name="AREAS") public class Areas { @Id @GenericGenerator(name="key_increment",strategy="increment") @GeneratedValue(generator="key_increment") @Column(name="ID",nullable=false,unique=true,updatable=false) private Long id; //区域标识 @Column(name="NAME",nullable=false,columnDefinition="") private String area_name; //区域名 @Lob @Column(name="DESCRIPTION",columnDefinition="LONGTEXT") private String description; //描述 @Column(name="CREATE_DATE",updatable=false,columnDefinition="") private String create_date; //创建日期 @Column(name="ALTER_DATE",columnDefinition="") private String alter_date; //修改日期 @Column(name="CREATE_USER",updatable=false,columnDefinition="") private String create_user; //创建用户 @Column(name="ALTER_USER",columnDefinition="") private String alter_user; //修改用户 //foreign key //Stations 获取该区域下的所有局站 @OneToMany(targetEntity=Stations.class,mappedBy="area") @Cascade({CascadeType.DELETE}) private List<Stations> stations = new ArrayList<>(); public List<Stations> getStations() { return this.stations; } //Areas() public Areas(){} //areaId public Long getId() { return this.id; } //areaName public void setArea_name(String name) { this.area_name = name; } public String getArea_name() { return this.area_name; } //description public void setDescription(String description) { this.description = description; } public String getDescription() { return this.description; } //create_date public void setCreate_date(String date) { this.create_date = date; } public String getCreate_date() { return this.create_date; } //alter_date public void setAlter_date(String date) { this.alter_date = date; } public String getAlter_date() { return this.alter_date; } //create_user public void setCreate_user(String create_user) { this.create_user = create_user; } public String getCreate_user() { return this.create_user; } //alter_user public void setAlter_user(String alter_user) { this.alter_user = alter_user; } public String getAlter_user() { return this.alter_user; } @Override public String toString() { return "{\"id\":" + "\"1_"+id +"\""+ ", \"pid\":" + "\"0\"" + ", \"name\":" +"\""+ area_name +"\""+ ", \"open\":" + "\"false\"" +",\"hrefAddress\":"+"\""+"\""+"}" ; } }
fd599a8737d38afd00a8cf00cb8e709b9409ae01
c0bc066369321c2da66ce133a555d4275421ac8f
/Spring/04.基于AspectJ的AOP开发/基于AspectJ的AOP开发源码/spring_aspect/src/main/java/com/imooc/aspectJ/demo2/SpringDemo2.java
50c0281fa6c2269f1727294d36887864d2e310c7
[]
no_license
TronQuick/SSM
6d8a451dd6b7a1180344eeb7bf68e935686ca8d4
7d14dc556b6670e02884da79e6abfcbfdf100e27
refs/heads/master
2020-06-22T09:21:23.640224
2019-12-13T09:12:14
2019-12-13T09:12:14
197,689,725
2
0
null
2019-12-13T09:13:05
2019-07-19T02:43:47
Java
UTF-8
Java
false
false
658
java
package com.imooc.aspectJ.demo2; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import javax.annotation.Resource; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(value="classpath:applicationContext2.xml") public class SpringDemo2 { @Resource(name="customerDao") private CustomerDao customerDao; @Test public void demo1(){ customerDao.save(); customerDao.update(); customerDao.delete(); customerDao.findOne(); customerDao.findAll(); } }
81d362e0e24d39cda48586a043f8ff668c11c455
fff8d45864fdca7f43e6d65acbe4c1f469531877
/erp_desktop_all/src_puntoventa/com/bydan/erp/puntoventa/presentation/swing/jinternalframes/FacturaPuntoVentaJInternalFrame.java
a27be23a77dab989195a84730dbdf04c0945e2ea
[ "Apache-2.0" ]
permissive
jarocho105/pre2
26b04cc91ff1dd645a6ac83966a74768f040f418
f032fc63741b6deecdfee490e23dfa9ef1f42b4f
refs/heads/master
2020-09-27T16:16:52.921372
2016-09-01T04:34:56
2016-09-01T04:34:56
67,095,806
1
0
null
null
null
null
UTF-8
Java
false
false
228,792
java
/* *AVISO LEGAL © Copyright *Este programa esta protegido por la ley de derechos de autor. *La reproduccion o distribucion ilicita de este programa o de cualquiera de *sus partes esta penado por la ley con severas sanciones civiles y penales, *y seran objeto de todas las sanciones legales que correspondan. *Su contenido no puede copiarse para fines comerciales o de otras, *ni puede mostrarse, incluso en una version modificada, en otros sitios Web. Solo esta permitido colocar hipervinculos al sitio web. */ package com.bydan.erp.puntoventa.presentation.swing.jinternalframes; import com.bydan.erp.seguridad.presentation.swing.jinternalframes.*; import com.bydan.erp.comisiones.presentation.swing.jinternalframes.*; import com.bydan.erp.cartera.presentation.swing.jinternalframes.*; import com.bydan.erp.inventario.presentation.swing.jinternalframes.*; import com.bydan.erp.contabilidad.presentation.swing.jinternalframes.*; import com.bydan.erp.puntoventa.presentation.web.jsf.sessionbean.*;//; import com.bydan.erp.puntoventa.presentation.swing.jinternalframes.*; import com.bydan.erp.puntoventa.presentation.swing.jinternalframes.auxiliar.*; import com.bydan.erp.seguridad.presentation.web.jsf.sessionbean.*; import com.bydan.erp.comisiones.presentation.web.jsf.sessionbean.*; import com.bydan.erp.cartera.presentation.web.jsf.sessionbean.*; import com.bydan.erp.inventario.presentation.web.jsf.sessionbean.*; import com.bydan.erp.contabilidad.presentation.web.jsf.sessionbean.*; import com.bydan.erp.seguridad.business.entity.*; import com.bydan.erp.comisiones.business.entity.*; import com.bydan.erp.cartera.business.entity.*; import com.bydan.erp.inventario.business.entity.*; import com.bydan.erp.contabilidad.business.entity.*; //import com.bydan.erp.puntoventa.presentation.report.source.*; import com.bydan.framework.erp.business.entity.Reporte; import com.bydan.erp.seguridad.business.entity.Modulo; import com.bydan.erp.seguridad.business.entity.Opcion; import com.bydan.erp.seguridad.business.entity.Usuario; import com.bydan.erp.seguridad.business.entity.ResumenUsuario; import com.bydan.erp.seguridad.business.entity.ParametroGeneralSg; import com.bydan.erp.seguridad.business.entity.ParametroGeneralUsuario; import com.bydan.erp.seguridad.util.SistemaParameterReturnGeneral; import com.bydan.erp.puntoventa.business.entity.*; import com.bydan.erp.puntoventa.util.FacturaPuntoVentaConstantesFunciones; import com.bydan.erp.puntoventa.business.logic.*; import com.bydan.framework.erp.business.entity.DatoGeneral; import com.bydan.framework.erp.business.entity.OrderBy; import com.bydan.framework.erp.business.entity.Mensajes; import com.bydan.framework.erp.business.entity.Classe; import com.bydan.framework.erp.business.logic.*; import com.bydan.framework.erp.presentation.desktop.swing.DateConverter; import com.bydan.framework.erp.presentation.desktop.swing.DateConverterFromDate; import com.bydan.framework.erp.presentation.desktop.swing.FuncionesSwing; import com.bydan.framework.erp.presentation.desktop.swing.JInternalFrameBase; import com.bydan.framework.erp.presentation.desktop.swing.*; import com.bydan.framework.erp.util.*; import java.util.Date; import java.util.List; import java.util.ArrayList; import java.io.File; import java.util.HashMap; import java.util.Map; import java.io.PrintWriter; import java.sql.SQLException; import java.sql.*; import net.sf.jasperreports.engine.JRException; import net.sf.jasperreports.engine.JRRuntimeException; import net.sf.jasperreports.engine.JasperFillManager; import net.sf.jasperreports.engine.JasperPrint; import net.sf.jasperreports.engine.JasperReport; import net.sf.jasperreports.engine.util.JRLoader; import net.sf.jasperreports.engine.export.JRHtmlExporter; import net.sf.jasperreports.j2ee.servlets.BaseHttpServlet; import net.sf.jasperreports.engine.JRExporterParameter; import net.sf.jasperreports.engine.data.JRBeanArrayDataSource; import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource; import javax.swing.*; import java.awt.*; import javax.swing.border.EtchedBorder; import javax.swing.border.Border; import javax.swing.border.TitledBorder; import java.awt.event.*; import javax.swing.event.*; import javax.swing.GroupLayout.Alignment; import javax.swing.table.TableColumn; import com.toedter.calendar.JDateChooser; @SuppressWarnings("unused") public class FacturaPuntoVentaJInternalFrame extends FacturaPuntoVentaBeanSwingJInternalFrameAdditional { private static final long serialVersionUID = 1L; //protected Usuario usuarioActual=null; public JToolBar jTtoolBarFacturaPuntoVenta; protected JMenuBar jmenuBarFacturaPuntoVenta; protected JMenu jmenuFacturaPuntoVenta; protected JMenu jmenuDatosFacturaPuntoVenta; protected JMenu jmenuArchivoFacturaPuntoVenta; protected JMenu jmenuAccionesFacturaPuntoVenta; protected JPanel jContentPane = null; protected JPanel jPanelBusquedasParametrosFacturaPuntoVenta = new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true);//new JPanel(); protected GridBagLayout gridaBagLayoutFacturaPuntoVenta; protected GridBagConstraints gridBagConstraintsFacturaPuntoVenta; //protected JInternalFrameBase jInternalFrameParent; public FacturaPuntoVentaDetalleFormJInternalFrame jInternalFrameDetalleFormFacturaPuntoVenta; protected ReporteDinamicoJInternalFrame jInternalFrameReporteDinamicoFacturaPuntoVenta; protected ImportacionJInternalFrame jInternalFrameImportacionFacturaPuntoVenta; //VENTANAS PARA ACTUALIZAR Y BUSCAR FK protected EmpresaBeanSwingJInternalFrame empresaBeanSwingJInternalFrame; public String sFinalQueryGeneral_empresa=""; protected SucursalBeanSwingJInternalFrame sucursalBeanSwingJInternalFrame; public String sFinalQueryGeneral_sucursal=""; protected UsuarioBeanSwingJInternalFrame usuarioBeanSwingJInternalFrame; public String sFinalQueryGeneral_usuario=""; protected VendedorBeanSwingJInternalFrame vendedorBeanSwingJInternalFrame; public String sFinalQueryGeneral_vendedor=""; protected ClienteBeanSwingJInternalFrame clienteBeanSwingJInternalFrame; public String sFinalQueryGeneral_cliente=""; protected CajaBeanSwingJInternalFrame cajaBeanSwingJInternalFrame; public String sFinalQueryGeneral_caja=""; protected TipoPrecioBeanSwingJInternalFrame tipoprecioBeanSwingJInternalFrame; public String sFinalQueryGeneral_tipoprecio=""; protected MesaBeanSwingJInternalFrame mesaBeanSwingJInternalFrame; public String sFinalQueryGeneral_mesa=""; protected FormatoBeanSwingJInternalFrame formatoBeanSwingJInternalFrame; public String sFinalQueryGeneral_formato=""; protected TipoFacturaPuntoVentaBeanSwingJInternalFrame tipofacturapuntoventaBeanSwingJInternalFrame; public String sFinalQueryGeneral_tipofacturapuntoventa=""; protected EstadoFacturaPuntoVentaBeanSwingJInternalFrame estadofacturapuntoventaBeanSwingJInternalFrame; public String sFinalQueryGeneral_estadofacturapuntoventa=""; protected AsientoContableBeanSwingJInternalFrame asientocontableBeanSwingJInternalFrame; public String sFinalQueryGeneral_asientocontable=""; public FacturaPuntoVentaSessionBean facturapuntoventaSessionBean; public EmpresaSessionBean empresaSessionBean; public SucursalSessionBean sucursalSessionBean; public UsuarioSessionBean usuarioSessionBean; public VendedorSessionBean vendedorSessionBean; public ClienteSessionBean clienteSessionBean; public CajaSessionBean cajaSessionBean; public TipoPrecioSessionBean tipoprecioSessionBean; public MesaSessionBean mesaSessionBean; public FormatoSessionBean formatoSessionBean; public TipoFacturaPuntoVentaSessionBean tipofacturapuntoventaSessionBean; public EstadoFacturaPuntoVentaSessionBean estadofacturapuntoventaSessionBean; public AsientoContableSessionBean asientocontableSessionBean; //protected JDesktopPane jDesktopPane; public List<FacturaPuntoVenta> facturapuntoventas; public List<FacturaPuntoVenta> facturapuntoventasEliminados; public List<FacturaPuntoVenta> facturapuntoventasAux; protected OrderByJInternalFrame jInternalFrameOrderByFacturaPuntoVenta; protected JButton jButtonAbrirOrderByFacturaPuntoVenta; //protected JPanel jPanelOrderByFacturaPuntoVenta; //public JScrollPane jScrollPanelOrderByFacturaPuntoVenta; //protected JButton jButtonCerrarOrderByFacturaPuntoVenta; public ArrayList<OrderBy> arrOrderBy= new ArrayList<OrderBy>(); public FacturaPuntoVentaLogic facturapuntoventaLogic; public JScrollPane jScrollPanelDatosFacturaPuntoVenta; public JScrollPane jScrollPanelDatosEdicionFacturaPuntoVenta; public JScrollPane jScrollPanelDatosGeneralFacturaPuntoVenta; //public JScrollPane jScrollPanelDatosFacturaPuntoVentaOrderBy; //public JScrollPane jScrollPanelReporteDinamicoFacturaPuntoVenta; //public JScrollPane jScrollPanelImportacionFacturaPuntoVenta; protected JPanel jPanelAccionesFacturaPuntoVenta; protected JPanel jPanelPaginacionFacturaPuntoVenta; protected JPanel jPanelParametrosReportesFacturaPuntoVenta; protected JPanel jPanelParametrosReportesAccionesFacturaPuntoVenta; protected JPanel jPanelCamposFintotalFacturaPuntoVenta; protected Integer iXPanelCamposFintotalFacturaPuntoVenta=0; protected Integer iYPanelCamposFintotalFacturaPuntoVenta=0;; protected JPanel jPanelParametrosAuxiliar1FacturaPuntoVenta; protected JPanel jPanelParametrosAuxiliar2FacturaPuntoVenta; protected JPanel jPanelParametrosAuxiliar3FacturaPuntoVenta; protected JPanel jPanelParametrosAuxiliar4FacturaPuntoVenta; //protected JPanel jPanelParametrosAuxiliar5FacturaPuntoVenta; //protected JPanel jPanelReporteDinamicoFacturaPuntoVenta; //protected JPanel jPanelImportacionFacturaPuntoVenta; public JTable jTableDatosFacturaPuntoVenta; //public JTable jTableDatosFacturaPuntoVentaOrderBy; //ELEMENTOS TABLAS PARAMETOS //ELEMENTOS TABLAS PARAMETOS_FIN protected JButton jButtonNuevoFacturaPuntoVenta; protected JButton jButtonDuplicarFacturaPuntoVenta; protected JButton jButtonCopiarFacturaPuntoVenta; protected JButton jButtonVerFormFacturaPuntoVenta; protected JButton jButtonNuevoRelacionesFacturaPuntoVenta; protected JButton jButtonModificarFacturaPuntoVenta; protected JButton jButtonGuardarCambiosTablaFacturaPuntoVenta; protected JButton jButtonCerrarFacturaPuntoVenta; protected JButton jButtonRecargarInformacionFacturaPuntoVenta; protected JButton jButtonProcesarInformacionFacturaPuntoVenta; protected JButton jButtonAnterioresFacturaPuntoVenta; protected JButton jButtonSiguientesFacturaPuntoVenta; protected JButton jButtonNuevoGuardarCambiosFacturaPuntoVenta; //protected JButton jButtonGenerarReporteDinamicoFacturaPuntoVenta; //protected JButton jButtonCerrarReporteDinamicoFacturaPuntoVenta; //protected JButton jButtonGenerarExcelReporteDinamicoFacturaPuntoVenta; //protected JButton jButtonAbrirImportacionFacturaPuntoVenta; //protected JButton jButtonGenerarImportacionFacturaPuntoVenta; //protected JButton jButtonCerrarImportacionFacturaPuntoVenta; //protected JFileChooser jFileChooserImportacionFacturaPuntoVenta; //protected File fileImportacionFacturaPuntoVenta; //TOOLBAR protected JButton jButtonNuevoToolBarFacturaPuntoVenta; protected JButton jButtonDuplicarToolBarFacturaPuntoVenta; protected JButton jButtonNuevoRelacionesToolBarFacturaPuntoVenta; public JButton jButtonGuardarCambiosToolBarFacturaPuntoVenta; protected JButton jButtonCopiarToolBarFacturaPuntoVenta; protected JButton jButtonVerFormToolBarFacturaPuntoVenta; public JButton jButtonGuardarCambiosTablaToolBarFacturaPuntoVenta; protected JButton jButtonMostrarOcultarTablaToolBarFacturaPuntoVenta; protected JButton jButtonCerrarToolBarFacturaPuntoVenta; protected JButton jButtonRecargarInformacionToolBarFacturaPuntoVenta; protected JButton jButtonProcesarInformacionToolBarFacturaPuntoVenta; protected JButton jButtonAnterioresToolBarFacturaPuntoVenta; protected JButton jButtonSiguientesToolBarFacturaPuntoVenta; protected JButton jButtonNuevoGuardarCambiosToolBarFacturaPuntoVenta; protected JButton jButtonAbrirOrderByToolBarFacturaPuntoVenta; //TOOLBAR //MENU protected JMenuItem jMenuItemNuevoFacturaPuntoVenta; protected JMenuItem jMenuItemDuplicarFacturaPuntoVenta; protected JMenuItem jMenuItemNuevoRelacionesFacturaPuntoVenta; protected JMenuItem jMenuItemGuardarCambiosFacturaPuntoVenta; protected JMenuItem jMenuItemCopiarFacturaPuntoVenta; protected JMenuItem jMenuItemVerFormFacturaPuntoVenta; protected JMenuItem jMenuItemGuardarCambiosTablaFacturaPuntoVenta; protected JMenuItem jMenuItemCerrarFacturaPuntoVenta; protected JMenuItem jMenuItemDetalleCerrarFacturaPuntoVenta; protected JMenuItem jMenuItemDetalleAbrirOrderByFacturaPuntoVenta; protected JMenuItem jMenuItemDetalleMostarOcultarFacturaPuntoVenta; protected JMenuItem jMenuItemRecargarInformacionFacturaPuntoVenta; protected JMenuItem jMenuItemProcesarInformacionFacturaPuntoVenta; protected JMenuItem jMenuItemAnterioresFacturaPuntoVenta; protected JMenuItem jMenuItemSiguientesFacturaPuntoVenta; protected JMenuItem jMenuItemNuevoGuardarCambiosFacturaPuntoVenta; protected JMenuItem jMenuItemAbrirOrderByFacturaPuntoVenta; protected JMenuItem jMenuItemMostrarOcultarFacturaPuntoVenta; //MENU protected JLabel jLabelAccionesFacturaPuntoVenta; protected JCheckBox jCheckBoxSeleccionarTodosFacturaPuntoVenta; protected JCheckBox jCheckBoxSeleccionadosFacturaPuntoVenta; protected JCheckBox jCheckBoxConAltoMaximoTablaFacturaPuntoVenta; protected JCheckBox jCheckBoxConGraficoReporteFacturaPuntoVenta; @SuppressWarnings("rawtypes") protected JComboBox jComboBoxTiposArchivosReportesFacturaPuntoVenta; @SuppressWarnings("rawtypes") protected JComboBox jComboBoxTiposReportesFacturaPuntoVenta; //@SuppressWarnings("rawtypes") //protected JComboBox jComboBoxTiposArchivosReportesDinamicoFacturaPuntoVenta; //@SuppressWarnings("rawtypes") //protected JComboBox jComboBoxTiposReportesDinamicoFacturaPuntoVenta; @SuppressWarnings("rawtypes") protected JComboBox jComboBoxTiposGraficosReportesFacturaPuntoVenta; @SuppressWarnings("rawtypes") protected JComboBox jComboBoxTiposPaginacionFacturaPuntoVenta; @SuppressWarnings("rawtypes") protected JComboBox jComboBoxTiposRelacionesFacturaPuntoVenta; @SuppressWarnings("rawtypes") protected JComboBox jComboBoxTiposAccionesFacturaPuntoVenta; @SuppressWarnings("rawtypes") protected JComboBox jComboBoxTiposSeleccionarFacturaPuntoVenta; protected JTextField jTextFieldValorCampoGeneralFacturaPuntoVenta; //REPORTE DINAMICO //@SuppressWarnings("rawtypes") //public JLabel jLabelColumnasSelectReporteFacturaPuntoVenta; //public JList<Reporte> jListColumnasSelectReporteFacturaPuntoVenta; //public JScrollPane jScrollColumnasSelectReporteFacturaPuntoVenta; //public JLabel jLabelRelacionesSelectReporteFacturaPuntoVenta; //public JList<Reporte> jListRelacionesSelectReporteFacturaPuntoVenta; //public JScrollPane jScrollRelacionesSelectReporteFacturaPuntoVenta; //public JLabel jLabelConGraficoDinamicoFacturaPuntoVenta; //protected JCheckBox jCheckBoxConGraficoDinamicoFacturaPuntoVenta; //public JLabel jLabelGenerarExcelReporteDinamicoFacturaPuntoVenta; //public JLabel jLabelTiposArchivoReporteDinamicoFacturaPuntoVenta; //public JLabel jLabelArchivoImportacionFacturaPuntoVenta; //public JLabel jLabelPathArchivoImportacionFacturaPuntoVenta; //protected JTextField jTextFieldPathArchivoImportacionFacturaPuntoVenta; //public JLabel jLabelColumnaCategoriaGraficoFacturaPuntoVenta; //@SuppressWarnings("rawtypes") //protected JComboBox jComboBoxColumnaCategoriaGraficoFacturaPuntoVenta; //public JLabel jLabelColumnaCategoriaValorFacturaPuntoVenta; //@SuppressWarnings("rawtypes") //protected JComboBox jComboBoxColumnaCategoriaValorFacturaPuntoVenta; //public JLabel jLabelColumnasValoresGraficoFacturaPuntoVenta; //public JList<Reporte> jListColumnasValoresGraficoFacturaPuntoVenta; //public JScrollPane jScrollColumnasValoresGraficoFacturaPuntoVenta; //public JLabel jLabelTiposGraficosReportesDinamicoFacturaPuntoVenta; //@SuppressWarnings("rawtypes") //protected JComboBox jComboBoxTiposGraficosReportesDinamicoFacturaPuntoVenta; protected Boolean conMaximoRelaciones=true; protected Boolean conFuncionalidadRelaciones=true; public Boolean conCargarMinimo=false; public Boolean cargarRelaciones=false; public Boolean conMostrarAccionesCampo=false; public Boolean permiteRecargarForm=false;//PARA NUEVO PREPARAR Y MANEJO DE EVENTOS, EVITAR QUE SE EJECUTE AL CARGAR VENTANA O LOAD public Boolean conCargarFormDetalle=false; //BYDAN_BUSQUEDAS public JTabbedPane jTabbedPaneBusquedasFacturaPuntoVenta; public JPanel jPanelFK_IdAsientoContableFacturaPuntoVenta; public JButton jButtonFK_IdAsientoContableFacturaPuntoVenta; public JPanel jPanelFK_IdCajaFacturaPuntoVenta; public JButton jButtonFK_IdCajaFacturaPuntoVenta; public JPanel jPanelFK_IdClienteFacturaPuntoVenta; public JButton jButtonFK_IdClienteFacturaPuntoVenta; public JPanel jPanelFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta; public JButton jButtonFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta; public JPanel jPanelFK_IdFormatoFacturaPuntoVenta; public JButton jButtonFK_IdFormatoFacturaPuntoVenta; public JPanel jPanelFK_IdMesaFacturaPuntoVenta; public JButton jButtonFK_IdMesaFacturaPuntoVenta; public JPanel jPanelFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta; public JButton jButtonFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta; public JPanel jPanelFK_IdTipoPrecioFacturaPuntoVenta; public JButton jButtonFK_IdTipoPrecioFacturaPuntoVenta; public JPanel jPanelFK_IdVendedorFacturaPuntoVenta; public JButton jButtonFK_IdVendedorFacturaPuntoVenta; public JPanel jPanelid_asiento_contableFK_IdAsientoContableFacturaPuntoVenta; public JLabel jLabelid_asiento_contableFK_IdAsientoContableFacturaPuntoVenta; @SuppressWarnings("rawtypes") public JComboBox jComboBoxid_asiento_contableFK_IdAsientoContableFacturaPuntoVenta; public JButton jButtonid_asiento_contableFK_IdAsientoContableFacturaPuntoVenta= new JButtonMe(); public JButton jButtonid_asiento_contableFK_IdAsientoContableFacturaPuntoVentaUpdate= new JButtonMe(); public JButton jButtonid_asiento_contableFK_IdAsientoContableFacturaPuntoVentaBusqueda= new JButtonMe(); public JButton jButtonBuscarFK_IdAsientoContableid_asiento_contableFacturaPuntoVenta; public JPanel jPanelid_cajaFK_IdCajaFacturaPuntoVenta; public JLabel jLabelid_cajaFK_IdCajaFacturaPuntoVenta; @SuppressWarnings("rawtypes") public JComboBox jComboBoxid_cajaFK_IdCajaFacturaPuntoVenta; public JButton jButtonid_cajaFK_IdCajaFacturaPuntoVenta= new JButtonMe(); public JButton jButtonid_cajaFK_IdCajaFacturaPuntoVentaUpdate= new JButtonMe(); public JButton jButtonid_cajaFK_IdCajaFacturaPuntoVentaBusqueda= new JButtonMe(); public JPanel jPanelid_clienteFK_IdClienteFacturaPuntoVenta; public JLabel jLabelid_clienteFK_IdClienteFacturaPuntoVenta; @SuppressWarnings("rawtypes") public JComboBox jComboBoxid_clienteFK_IdClienteFacturaPuntoVenta; public JButton jButtonid_clienteFK_IdClienteFacturaPuntoVenta= new JButtonMe(); public JButton jButtonid_clienteFK_IdClienteFacturaPuntoVentaUpdate= new JButtonMe(); public JButton jButtonid_clienteFK_IdClienteFacturaPuntoVentaBusqueda= new JButtonMe(); public JButton jButtonBuscarFK_IdClienteid_clienteFacturaPuntoVenta; public JPanel jPanelid_estado_factura_punto_ventaFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta; public JLabel jLabelid_estado_factura_punto_ventaFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta; @SuppressWarnings("rawtypes") public JComboBox jComboBoxid_estado_factura_punto_ventaFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta; public JButton jButtonid_estado_factura_punto_ventaFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta= new JButtonMe(); public JButton jButtonid_estado_factura_punto_ventaFK_IdEstadoFacturaPuntoVentaFacturaPuntoVentaUpdate= new JButtonMe(); public JButton jButtonid_estado_factura_punto_ventaFK_IdEstadoFacturaPuntoVentaFacturaPuntoVentaBusqueda= new JButtonMe(); public JPanel jPanelid_formatoFK_IdFormatoFacturaPuntoVenta; public JLabel jLabelid_formatoFK_IdFormatoFacturaPuntoVenta; @SuppressWarnings("rawtypes") public JComboBox jComboBoxid_formatoFK_IdFormatoFacturaPuntoVenta; public JButton jButtonid_formatoFK_IdFormatoFacturaPuntoVenta= new JButtonMe(); public JButton jButtonid_formatoFK_IdFormatoFacturaPuntoVentaUpdate= new JButtonMe(); public JButton jButtonid_formatoFK_IdFormatoFacturaPuntoVentaBusqueda= new JButtonMe(); public JPanel jPanelid_mesaFK_IdMesaFacturaPuntoVenta; public JLabel jLabelid_mesaFK_IdMesaFacturaPuntoVenta; @SuppressWarnings("rawtypes") public JComboBox jComboBoxid_mesaFK_IdMesaFacturaPuntoVenta; public JButton jButtonid_mesaFK_IdMesaFacturaPuntoVenta= new JButtonMe(); public JButton jButtonid_mesaFK_IdMesaFacturaPuntoVentaUpdate= new JButtonMe(); public JButton jButtonid_mesaFK_IdMesaFacturaPuntoVentaBusqueda= new JButtonMe(); public JPanel jPanelid_tipo_factura_punto_ventaFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta; public JLabel jLabelid_tipo_factura_punto_ventaFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta; @SuppressWarnings("rawtypes") public JComboBox jComboBoxid_tipo_factura_punto_ventaFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta; public JButton jButtonid_tipo_factura_punto_ventaFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta= new JButtonMe(); public JButton jButtonid_tipo_factura_punto_ventaFK_IdTipoFacturaPuntoVentaFacturaPuntoVentaUpdate= new JButtonMe(); public JButton jButtonid_tipo_factura_punto_ventaFK_IdTipoFacturaPuntoVentaFacturaPuntoVentaBusqueda= new JButtonMe(); public JPanel jPanelid_tipo_precioFK_IdTipoPrecioFacturaPuntoVenta; public JLabel jLabelid_tipo_precioFK_IdTipoPrecioFacturaPuntoVenta; @SuppressWarnings("rawtypes") public JComboBox jComboBoxid_tipo_precioFK_IdTipoPrecioFacturaPuntoVenta; public JButton jButtonid_tipo_precioFK_IdTipoPrecioFacturaPuntoVenta= new JButtonMe(); public JButton jButtonid_tipo_precioFK_IdTipoPrecioFacturaPuntoVentaUpdate= new JButtonMe(); public JButton jButtonid_tipo_precioFK_IdTipoPrecioFacturaPuntoVentaBusqueda= new JButtonMe(); public JPanel jPanelid_vendedorFK_IdVendedorFacturaPuntoVenta; public JLabel jLabelid_vendedorFK_IdVendedorFacturaPuntoVenta; @SuppressWarnings("rawtypes") public JComboBox jComboBoxid_vendedorFK_IdVendedorFacturaPuntoVenta; public JButton jButtonid_vendedorFK_IdVendedorFacturaPuntoVenta= new JButtonMe(); public JButton jButtonid_vendedorFK_IdVendedorFacturaPuntoVentaUpdate= new JButtonMe(); public JButton jButtonid_vendedorFK_IdVendedorFacturaPuntoVentaBusqueda= new JButtonMe(); public JButton jButtonid_vendedorFK_IdVendedorFacturaPuntoVentaArbol= new JButtonMe(); public JButton jButtonBuscarFK_IdVendedorid_vendedorFacturaPuntoVenta; //ELEMENTOS TABLAS PARAMETOS //ELEMENTOS TABLAS PARAMETOS_FIN public static int openFrameCount = 0; public static final int xOffset = 10, yOffset = 35; //LOS DATOS DE NUEVO Y EDICION ACTUAL APARECEN EN OTRA VENTANA(true) O NO(false) public static Boolean CON_DATOS_FRAME=true; public static Boolean ISBINDING_MANUAL=true; public static Boolean ISLOAD_FKLOTE=true; public static Boolean ISBINDING_MANUAL_TABLA=true; public static Boolean CON_CARGAR_MEMORIA_INICIAL=true; //Al final no se utilizan, se inicializan desde JInternalFrameBase, desde ParametroGeneralUsuario public static String STIPO_TAMANIO_GENERAL="MEDIO"; 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*2); public int iHeightScroll=0;//(screenSize.height-screenSize.height/Constantes.ISWING_RESTOPARTE_DIFERENCIA_ALTO); //public int iWidthFormulario=1115;//(screenSize.width-screenSize.width/2)+(250*2); //public int iHeightFormulario=682;//(screenSize.height-screenSize.height/Constantes.ISWING_RESTOPARTE_DIFERENCIA_ALTO); //Esto va en DetalleForm //public int iHeightFormularioMaximo=0; //public int iWidthFormularioMaximo=0; public int iWidthTableDefinicion=0; public double dStart = 0; public double dEnd = 0; public double dDif = 0; /* double start=(double)System.currentTimeMillis(); double end=0; double dif=0; end=(double)System.currentTimeMillis(); dif=end - start; start=(double)System.currentTimeMillis(); System.out.println("Tiempo(ms) Carga TEST 1_2 DetalleMovimientoInventario: " + dif); */ public SistemaParameterReturnGeneral sistemaReturnGeneral; public List<Opcion> opcionsRelacionadas=new ArrayList<Opcion>(); //ES AUXILIAR PARA WINDOWS FORMS public FacturaPuntoVentaJInternalFrame() throws Exception { super(PaginaTipo.PRINCIPAL); //super("FacturaPuntoVenta No " + (++openFrameCount),true, /*resizable*/true, /*closable*/true, /*maximizable*/true);//iconifiable try { //Boolean cargarRelaciones=false; initialize(null,false,false,false/*cargarRelaciones*/,null,null,null,null,null,null,PaginaTipo.PRINCIPAL); } catch(Exception e) { FuncionesSwing.manageException(this, e, null); } } public FacturaPuntoVentaJInternalFrame(Boolean cargarRelaciones,PaginaTipo paginaTipo) throws Exception { super(paginaTipo); //super("FacturaPuntoVenta No " + (++openFrameCount),true, /*resizable*/true, /*closable*/true, /*maximizable*/true);//iconifiable try { initialize(null,false,false,cargarRelaciones,null,null,null,null,null,null,paginaTipo); } catch(Exception e) { FuncionesSwing.manageException(this, e, null); } } public FacturaPuntoVentaJInternalFrame(Boolean conGuardarRelaciones,Boolean esGuardarRelacionado,Boolean cargarRelaciones,PaginaTipo paginaTipo) throws Exception { super(paginaTipo); //super("FacturaPuntoVenta No " + (++openFrameCount),true, /*resizable*/true, /*closable*/true, /*maximizable*/true);//iconifiable try { initialize(null,conGuardarRelaciones,esGuardarRelacionado,cargarRelaciones,null,null,null,null,null,null,paginaTipo); } catch(Exception e) { FuncionesSwing.manageException(this, e, null); } } public FacturaPuntoVentaJInternalFrame(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("FacturaPuntoVenta No " + (++openFrameCount),true, /*resizable*/true, /*closable*/true, /*maximizable*/true);//iconifiable try { //OBLIGA VALIDA CON GUARDAR RELACIONES, TAMBIEN EN SWING conGuardarRelaciones=true; long start_time=0; long end_time=0; if(Constantes2.ISDEVELOPING2) { start_time = System.currentTimeMillis(); } initialize(jdesktopPane,conGuardarRelaciones,esGuardarRelacionado,cargarRelaciones,usuarioActual,resumenUsuarioActual,moduloActual,opcionActual,parametroGeneralSg,parametroGeneralUsuario,paginaTipo); if(Constantes2.ISDEVELOPING2) { end_time = System.currentTimeMillis(); String sTipo="Clase Padre Ventana"; Funciones2.getMensajeTiempoEjecucion(start_time, end_time, sTipo,false); } } catch(Exception e) { FuncionesSwing.manageException(this, e, null); } } public JInternalFrameBase getJInternalFrameParent() { return jInternalFrameParent; } public void setJInternalFrameParent(JInternalFrameBase internalFrameParent) { jInternalFrameParent = internalFrameParent; } public void setjButtonRecargarInformacion(JButton jButtonRecargarInformacionFacturaPuntoVenta) { this.jButtonRecargarInformacionFacturaPuntoVenta = jButtonRecargarInformacionFacturaPuntoVenta; } public JButton getjButtonProcesarInformacionFacturaPuntoVenta() { return this.jButtonProcesarInformacionFacturaPuntoVenta; } public void setjButtonProcesarInformacion(JButton jButtonProcesarInformacionFacturaPuntoVenta) { this.jButtonProcesarInformacionFacturaPuntoVenta = jButtonProcesarInformacionFacturaPuntoVenta; } public JButton getjButtonRecargarInformacionFacturaPuntoVenta() { return this.jButtonRecargarInformacionFacturaPuntoVenta; } public List<FacturaPuntoVenta> getfacturapuntoventas() { return this.facturapuntoventas; } public void setfacturapuntoventas(List<FacturaPuntoVenta> facturapuntoventas) { this.facturapuntoventas = facturapuntoventas; } public List<FacturaPuntoVenta> getfacturapuntoventasAux() { return this.facturapuntoventasAux; } public void setfacturapuntoventasAux(List<FacturaPuntoVenta> facturapuntoventasAux) { this.facturapuntoventasAux = facturapuntoventasAux; } public List<FacturaPuntoVenta> getfacturapuntoventasEliminados() { return this.facturapuntoventasEliminados; } public void setFacturaPuntoVentasEliminados(List<FacturaPuntoVenta> facturapuntoventasEliminados) { this.facturapuntoventasEliminados = facturapuntoventasEliminados; } @SuppressWarnings("rawtypes") public JComboBox getjComboBoxTiposSeleccionarFacturaPuntoVenta() { return jComboBoxTiposSeleccionarFacturaPuntoVenta; } @SuppressWarnings("rawtypes") public void setjComboBoxTiposSeleccionarFacturaPuntoVenta( JComboBox jComboBoxTiposSeleccionarFacturaPuntoVenta) { this.jComboBoxTiposSeleccionarFacturaPuntoVenta = jComboBoxTiposSeleccionarFacturaPuntoVenta; } public void setBorderResaltarTiposSeleccionarFacturaPuntoVenta() { Border borderResaltar=Funciones2.getBorderResaltar(this.getParametroGeneralUsuario(),"PARAMETRO"); this.jTtoolBarFacturaPuntoVenta.setBorder(borderResaltar); this.jComboBoxTiposSeleccionarFacturaPuntoVenta .setBorder(borderResaltar); } public JTextField getjTextFieldValorCampoGeneralFacturaPuntoVenta() { return jTextFieldValorCampoGeneralFacturaPuntoVenta; } public void setjTextFieldValorCampoGeneralFacturaPuntoVenta( JTextField jTextFieldValorCampoGeneralFacturaPuntoVenta) { this.jTextFieldValorCampoGeneralFacturaPuntoVenta = jTextFieldValorCampoGeneralFacturaPuntoVenta; } public void setBorderResaltarValorCampoGeneralFacturaPuntoVenta() { Border borderResaltar=Funciones2.getBorderResaltar(this.getParametroGeneralUsuario(),"PARAMETRO"); this.jTtoolBarFacturaPuntoVenta.setBorder(borderResaltar); this.jTextFieldValorCampoGeneralFacturaPuntoVenta .setBorder(borderResaltar); } public JCheckBox getjCheckBoxSeleccionarTodosFacturaPuntoVenta() { return this.jCheckBoxSeleccionarTodosFacturaPuntoVenta; } public void setjCheckBoxSeleccionarTodosFacturaPuntoVenta( JCheckBox jCheckBoxSeleccionarTodosFacturaPuntoVenta) { this.jCheckBoxSeleccionarTodosFacturaPuntoVenta = jCheckBoxSeleccionarTodosFacturaPuntoVenta; } public void setBorderResaltarSeleccionarTodosFacturaPuntoVenta() { Border borderResaltar=Funciones2.getBorderResaltar(this.getParametroGeneralUsuario(),"PARAMETRO"); this.jTtoolBarFacturaPuntoVenta.setBorder(borderResaltar); this.jCheckBoxSeleccionarTodosFacturaPuntoVenta .setBorder(borderResaltar); } public JCheckBox getjCheckBoxSeleccionadosFacturaPuntoVenta() { return this.jCheckBoxSeleccionadosFacturaPuntoVenta; } public void setjCheckBoxSeleccionadosFacturaPuntoVenta( JCheckBox jCheckBoxSeleccionadosFacturaPuntoVenta) { this.jCheckBoxSeleccionadosFacturaPuntoVenta = jCheckBoxSeleccionadosFacturaPuntoVenta; } public void setBorderResaltarSeleccionadosFacturaPuntoVenta() { Border borderResaltar=Funciones2.getBorderResaltar(this.getParametroGeneralUsuario(),"PARAMETRO"); this.jTtoolBarFacturaPuntoVenta.setBorder(borderResaltar); this.jCheckBoxSeleccionadosFacturaPuntoVenta .setBorder(borderResaltar); } @SuppressWarnings("rawtypes") public JComboBox getjComboBoxTiposArchivosReportesFacturaPuntoVenta() { return this.jComboBoxTiposArchivosReportesFacturaPuntoVenta; } @SuppressWarnings("rawtypes") public void setjComboBoxTiposArchivosReportesFacturaPuntoVenta( JComboBox jComboBoxTiposArchivosReportesFacturaPuntoVenta) { this.jComboBoxTiposArchivosReportesFacturaPuntoVenta = jComboBoxTiposArchivosReportesFacturaPuntoVenta; } public void setBorderResaltarTiposArchivosReportesFacturaPuntoVenta() { Border borderResaltar=Funciones2.getBorderResaltar(this.getParametroGeneralUsuario(),"PARAMETRO"); this.jTtoolBarFacturaPuntoVenta.setBorder(borderResaltar); this.jComboBoxTiposArchivosReportesFacturaPuntoVenta .setBorder(borderResaltar); } @SuppressWarnings("rawtypes") public JComboBox getjComboBoxTiposReportesFacturaPuntoVenta() { return this.jComboBoxTiposReportesFacturaPuntoVenta; } @SuppressWarnings("rawtypes") public void setjComboBoxTiposReportesFacturaPuntoVenta( JComboBox jComboBoxTiposReportesFacturaPuntoVenta) { this.jComboBoxTiposReportesFacturaPuntoVenta = jComboBoxTiposReportesFacturaPuntoVenta; } //@SuppressWarnings("rawtypes") //public JComboBox getjComboBoxTiposReportesDinamicoFacturaPuntoVenta() { // return jComboBoxTiposReportesDinamicoFacturaPuntoVenta; //} //@SuppressWarnings("rawtypes") //public void setjComboBoxTiposReportesDinamicoFacturaPuntoVenta( // JComboBox jComboBoxTiposReportesDinamicoFacturaPuntoVenta) { // this.jComboBoxTiposReportesDinamicoFacturaPuntoVenta = jComboBoxTiposReportesDinamicoFacturaPuntoVenta; //} //@SuppressWarnings("rawtypes") //public JComboBox getjComboBoxTiposArchivosReportesDinamicoFacturaPuntoVenta() { // return jComboBoxTiposArchivosReportesDinamicoFacturaPuntoVenta; //} //@SuppressWarnings("rawtypes") //public void setjComboBoxTiposArchivosReportesDinamicoFacturaPuntoVenta( // JComboBox jComboBoxTiposArchivosReportesDinamicoFacturaPuntoVenta) { // this.jComboBoxTiposArchivosReportesDinamicoFacturaPuntoVenta = jComboBoxTiposArchivosReportesDinamicoFacturaPuntoVenta; //} public void setBorderResaltarTiposReportesFacturaPuntoVenta() { Border borderResaltar=Funciones2.getBorderResaltar(this.getParametroGeneralUsuario(),"PARAMETRO"); this.jTtoolBarFacturaPuntoVenta.setBorder(borderResaltar); this.jComboBoxTiposReportesFacturaPuntoVenta .setBorder(borderResaltar); } @SuppressWarnings("rawtypes") public JComboBox getjComboBoxTiposGraficosReportesFacturaPuntoVenta() { return this.jComboBoxTiposGraficosReportesFacturaPuntoVenta; } @SuppressWarnings("rawtypes") public void setjComboBoxTiposGraficosReportesFacturaPuntoVenta( JComboBox jComboBoxTiposGraficosReportesFacturaPuntoVenta) { this.jComboBoxTiposGraficosReportesFacturaPuntoVenta = jComboBoxTiposGraficosReportesFacturaPuntoVenta; } public void setBorderResaltarTiposGraficosReportesFacturaPuntoVenta() { Border borderResaltar=Funciones2.getBorderResaltar(this.getParametroGeneralUsuario(),"PARAMETRO"); this.jTtoolBarFacturaPuntoVenta.setBorder(borderResaltar); this.jComboBoxTiposGraficosReportesFacturaPuntoVenta .setBorder(borderResaltar); } @SuppressWarnings("rawtypes") public JComboBox getjComboBoxTiposPaginacionFacturaPuntoVenta() { return this.jComboBoxTiposPaginacionFacturaPuntoVenta; } @SuppressWarnings("rawtypes") public void setjComboBoxTiposPaginacionFacturaPuntoVenta( JComboBox jComboBoxTiposPaginacionFacturaPuntoVenta) { this.jComboBoxTiposPaginacionFacturaPuntoVenta = jComboBoxTiposPaginacionFacturaPuntoVenta; } public void setBorderResaltarTiposPaginacionFacturaPuntoVenta() { Border borderResaltar=Funciones2.getBorderResaltar(this.getParametroGeneralUsuario(),"PARAMETRO"); this.jTtoolBarFacturaPuntoVenta.setBorder(borderResaltar); this.jComboBoxTiposPaginacionFacturaPuntoVenta .setBorder(borderResaltar); } @SuppressWarnings("rawtypes") public JComboBox getjComboBoxTiposRelacionesFacturaPuntoVenta() { return this.jComboBoxTiposRelacionesFacturaPuntoVenta; } @SuppressWarnings("rawtypes") public JComboBox getjComboBoxTiposAccionesFacturaPuntoVenta() { return this.jComboBoxTiposAccionesFacturaPuntoVenta; } @SuppressWarnings("rawtypes") public void setjComboBoxTiposRelacionesFacturaPuntoVenta( JComboBox jComboBoxTiposRelacionesFacturaPuntoVenta) { this.jComboBoxTiposRelacionesFacturaPuntoVenta = jComboBoxTiposRelacionesFacturaPuntoVenta; } @SuppressWarnings("rawtypes") public void setjComboBoxTiposAccionesFacturaPuntoVenta( JComboBox jComboBoxTiposAccionesFacturaPuntoVenta) { this.jComboBoxTiposAccionesFacturaPuntoVenta = jComboBoxTiposAccionesFacturaPuntoVenta; } public void setBorderResaltarTiposRelacionesFacturaPuntoVenta() { Border borderResaltar=Funciones2.getBorderResaltar(this.getParametroGeneralUsuario(),"PARAMETRO"); this.jTtoolBarFacturaPuntoVenta.setBorder(borderResaltar); this.jComboBoxTiposRelacionesFacturaPuntoVenta .setBorder(borderResaltar); } public void setBorderResaltarTiposAccionesFacturaPuntoVenta() { Border borderResaltar=Funciones2.getBorderResaltar(this.getParametroGeneralUsuario(),"PARAMETRO"); this.jTtoolBarFacturaPuntoVenta.setBorder(borderResaltar); this.jComboBoxTiposAccionesFacturaPuntoVenta .setBorder(borderResaltar); } //public JCheckBox getjCheckBoxConGraficoDinamicoFacturaPuntoVenta() { // return jCheckBoxConGraficoDinamicoFacturaPuntoVenta; //} //public void setjCheckBoxConGraficoDinamicoFacturaPuntoVenta( // JCheckBox jCheckBoxConGraficoDinamicoFacturaPuntoVenta) { // this.jCheckBoxConGraficoDinamicoFacturaPuntoVenta = jCheckBoxConGraficoDinamicoFacturaPuntoVenta; //} //public void setBorderResaltarConGraficoDinamicoFacturaPuntoVenta() { // Border borderResaltar=Funciones2.getBorderResaltar(this.getParametroGeneralUsuario(),"PARAMETRO"); // this.jTtoolBarFacturaPuntoVenta.setBorder(borderResaltar); // this.jCheckBoxConGraficoDinamicoFacturaPuntoVenta .setBorder(borderResaltar); //} /* public JDesktopPane getJDesktopPane() { return jDesktopPane; } public void setJDesktopPane(JDesktopPane desktopPane) { jDesktopPane = desktopPane; } */ private void initialize(JDesktopPane jdesktopPane,Boolean conGuardarRelaciones,Boolean esGuardarRelacionado,Boolean cargarRelaciones,Usuario usuarioActual,ResumenUsuario resumenUsuarioActual,Modulo moduloActual,Opcion opcionActual,ParametroGeneralSg parametroGeneralSg,ParametroGeneralUsuario parametroGeneralUsuario,PaginaTipo paginaTipo) throws Exception { this.facturapuntoventaSessionBean=new FacturaPuntoVentaSessionBean(); this.facturapuntoventaSessionBean.setConGuardarRelaciones(conGuardarRelaciones); this.facturapuntoventaSessionBean.setEsGuardarRelacionado(esGuardarRelacionado); this.conCargarMinimo=this.facturapuntoventaSessionBean.getEsGuardarRelacionado(); this.cargarRelaciones=cargarRelaciones; if(!this.conCargarMinimo) { } //this.sTipoTamanioGeneral=FacturaPuntoVentaJInternalFrame.STIPO_TAMANIO_GENERAL; //this.sTipoTamanioGeneralTabla=FacturaPuntoVentaJInternalFrame.STIPO_TAMANIO_GENERAL_TABLA; this.sTipoTamanioGeneral=FuncionesSwing.getTipoTamanioGeneral(this,parametroGeneralUsuario,conGuardarRelaciones,esGuardarRelacionado); this.sTipoTamanioGeneralTabla=FuncionesSwing.getTipoTamanioGeneralTabla(this,parametroGeneralUsuario,conGuardarRelaciones,esGuardarRelacionado); this.conTipoTamanioManual=FuncionesSwing.getConTipoTamanioManual(this,parametroGeneralUsuario,conGuardarRelaciones,esGuardarRelacionado); this.conTipoTamanioTodo=FuncionesSwing.getConTipoTamanioTodo(this,parametroGeneralUsuario,conGuardarRelaciones,esGuardarRelacionado); FacturaPuntoVentaJInternalFrame.STIPO_TAMANIO_GENERAL=this.sTipoTamanioGeneral; FacturaPuntoVentaJInternalFrame.STIPO_TAMANIO_GENERAL_TABLA=this.sTipoTamanioGeneralTabla; FacturaPuntoVentaJInternalFrame.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,"Factura Punto Venta MANTENIMIENTO")); if(iWidth > 2850) { iWidth=2850; } if(iHeight > 1110) { iHeight=1110; } 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.facturapuntoventaSessionBean.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; } } } FacturaPuntoVentaJInternalFrame.ESTA_CARGADO_PORPARTE=true; //super("FacturaPuntoVenta No " + (++openFrameCount),true, /*resizable*/true, /*closable*/true, /*maximizable*/true);//iconifiable //SwingUtilities.updateComponentTreeUI(this); } public void inicializarToolBar() { this.jTtoolBarFacturaPuntoVenta= new JToolBar("MENU PRINCIPAL"); //TOOLBAR //PRINCIPAL this.jButtonNuevoToolBarFacturaPuntoVenta=FuncionesSwing.getButtonToolBarGeneral(this.jButtonNuevoToolBarFacturaPuntoVenta,this.jTtoolBarFacturaPuntoVenta, "nuevo","nuevo","Nuevo"+" "+FacturaPuntoVentaConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("NUEVO"),"Nuevo",false); this.jButtonNuevoGuardarCambiosToolBarFacturaPuntoVenta=FuncionesSwing.getButtonToolBarGeneral(this.jButtonNuevoGuardarCambiosToolBarFacturaPuntoVenta,this.jTtoolBarFacturaPuntoVenta, "nuevoguardarcambios","nuevoguardarcambios","Nuevo" + FuncionesSwing.getKeyMensaje("NUEVO_TABLA"),"Nuevo",false); this.jButtonGuardarCambiosTablaToolBarFacturaPuntoVenta=FuncionesSwing.getButtonToolBarGeneral(this.jButtonGuardarCambiosTablaToolBarFacturaPuntoVenta,this.jTtoolBarFacturaPuntoVenta, "guardarcambiostabla","guardarcambiostabla","Guardar"+" "+FacturaPuntoVentaConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("GUARDAR_CAMBIOS"),"Guardar",false); this.jButtonDuplicarToolBarFacturaPuntoVenta=FuncionesSwing.getButtonToolBarGeneral(this.jButtonDuplicarToolBarFacturaPuntoVenta,this.jTtoolBarFacturaPuntoVenta, "duplicar","duplicar","Duplicar"+" "+FacturaPuntoVentaConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("DUPLICAR"),"Duplicar",false); this.jButtonCopiarToolBarFacturaPuntoVenta=FuncionesSwing.getButtonToolBarGeneral(this.jButtonCopiarToolBarFacturaPuntoVenta,this.jTtoolBarFacturaPuntoVenta, "copiar","copiar","Copiar"+" "+FacturaPuntoVentaConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("COPIAR"),"Copiar",false); this.jButtonVerFormToolBarFacturaPuntoVenta=FuncionesSwing.getButtonToolBarGeneral(this.jButtonVerFormToolBarFacturaPuntoVenta,this.jTtoolBarFacturaPuntoVenta, "ver_form","ver_form","Ver"+" "+FacturaPuntoVentaConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("VER_FORM"),"Ver",false); this.jButtonRecargarInformacionToolBarFacturaPuntoVenta=FuncionesSwing.getButtonToolBarGeneral(this.jButtonRecargarInformacionToolBarFacturaPuntoVenta,this.jTtoolBarFacturaPuntoVenta, "recargar","recargar","Recargar"+" "+FacturaPuntoVentaConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("RECARGAR"),"Recargar",false); this.jButtonAnterioresToolBarFacturaPuntoVenta=FuncionesSwing.getButtonToolBarGeneral(this.jButtonRecargarInformacionToolBarFacturaPuntoVenta,this.jTtoolBarFacturaPuntoVenta, "anteriores","anteriores","Anteriores Datos" + FuncionesSwing.getKeyMensaje("ANTERIORES"),"<<",false); this.jButtonSiguientesToolBarFacturaPuntoVenta=FuncionesSwing.getButtonToolBarGeneral(this.jButtonRecargarInformacionToolBarFacturaPuntoVenta,this.jTtoolBarFacturaPuntoVenta, "siguientes","siguientes","Siguientes Datos" + FuncionesSwing.getKeyMensaje("SIGUIENTES"),">>",false); this.jButtonAbrirOrderByToolBarFacturaPuntoVenta=FuncionesSwing.getButtonToolBarGeneral(this.jButtonAbrirOrderByToolBarFacturaPuntoVenta,this.jTtoolBarFacturaPuntoVenta, "orden","orden","Orden" + FuncionesSwing.getKeyMensaje("ORDEN"),"Orden",false); this.jButtonNuevoRelacionesToolBarFacturaPuntoVenta=FuncionesSwing.getButtonToolBarGeneral(this.jButtonNuevoRelacionesToolBarFacturaPuntoVenta,this.jTtoolBarFacturaPuntoVenta, "nuevo_relaciones","nuevo_relaciones","NUEVO RELACIONES" + FuncionesSwing.getKeyMensaje("NUEVO_RELACIONES"),"NUEVO RELACIONES",false); this.jButtonMostrarOcultarTablaToolBarFacturaPuntoVenta=FuncionesSwing.getButtonToolBarGeneral(this.jButtonMostrarOcultarTablaToolBarFacturaPuntoVenta,this.jTtoolBarFacturaPuntoVenta, "mostrar_ocultar","mostrar_ocultar","Mostrar Ocultar"+" "+FacturaPuntoVentaConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("MOSTRAR_OCULTAR"),"Mostrar Ocultar",false); this.jButtonCerrarToolBarFacturaPuntoVenta=FuncionesSwing.getButtonToolBarGeneral(this.jButtonCerrarToolBarFacturaPuntoVenta,this.jTtoolBarFacturaPuntoVenta, "cerrar","cerrar","Salir"+" "+FacturaPuntoVentaConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("CERRAR"),"Salir",false); //this.jButtonNuevoRelacionesToolBarFacturaPuntoVenta=new JButtonMe(); //protected JButton jButtonNuevoRelacionesToolBarFacturaPuntoVenta; this.jButtonProcesarInformacionToolBarFacturaPuntoVenta=new JButtonMe(); //protected JButton jButtonProcesarInformacionToolBarFacturaPuntoVenta; //protected JButton jButtonModificarToolBarFacturaPuntoVenta; //PRINCIPAL //DETALLE //DETALLE_FIN } public void cargarMenus() { this.jmenuBarFacturaPuntoVenta=new JMenuBarMe(); //PRINCIPAL this.jmenuFacturaPuntoVenta=new JMenuMe("General"); this.jmenuArchivoFacturaPuntoVenta=new JMenuMe("Archivo"); this.jmenuAccionesFacturaPuntoVenta=new JMenuMe("Acciones"); this.jmenuDatosFacturaPuntoVenta=new JMenuMe("Datos"); //PRINCIPAL_FIN //DETALLE //DETALLE_FIN this.jMenuItemNuevoFacturaPuntoVenta= new JMenuItem("Nuevo" + FuncionesSwing.getKeyMensaje("NUEVO")); this.jMenuItemNuevoFacturaPuntoVenta.setActionCommand("Nuevo"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemNuevoFacturaPuntoVenta,"nuevo_button","Nuevo"); FuncionesSwing.setBoldMenuItem(this.jMenuItemNuevoFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemDuplicarFacturaPuntoVenta= new JMenuItem("Duplicar" + FuncionesSwing.getKeyMensaje("DUPLICAR")); this.jMenuItemDuplicarFacturaPuntoVenta.setActionCommand("Duplicar"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemDuplicarFacturaPuntoVenta,"duplicar_button","Duplicar"); FuncionesSwing.setBoldMenuItem(this.jMenuItemDuplicarFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemNuevoRelacionesFacturaPuntoVenta= new JMenuItem("Nuevo Rel" + FuncionesSwing.getKeyMensaje("NUEVO_TABLA")); this.jMenuItemNuevoRelacionesFacturaPuntoVenta.setActionCommand("Nuevo Rel"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemNuevoRelacionesFacturaPuntoVenta,"nuevorelaciones_button","Nuevo Rel"); FuncionesSwing.setBoldMenuItem(this.jMenuItemNuevoRelacionesFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemGuardarCambiosFacturaPuntoVenta= new JMenuItem("Guardar" + FuncionesSwing.getKeyMensaje("GUARDAR_CAMBIOS")); this.jMenuItemGuardarCambiosFacturaPuntoVenta.setActionCommand("Guardar"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemGuardarCambiosFacturaPuntoVenta,"guardarcambios_button","Guardar"); FuncionesSwing.setBoldMenuItem(this.jMenuItemGuardarCambiosFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemCopiarFacturaPuntoVenta= new JMenuItem("Copiar" + FuncionesSwing.getKeyMensaje("COPIAR")); this.jMenuItemCopiarFacturaPuntoVenta.setActionCommand("Copiar"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemCopiarFacturaPuntoVenta,"copiar_button","Copiar"); FuncionesSwing.setBoldMenuItem(this.jMenuItemCopiarFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemVerFormFacturaPuntoVenta= new JMenuItem("Ver" + FuncionesSwing.getKeyMensaje("VER_FORM")); this.jMenuItemVerFormFacturaPuntoVenta.setActionCommand("Ver"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemVerFormFacturaPuntoVenta,"ver_form_button","Ver"); FuncionesSwing.setBoldMenuItem(this.jMenuItemVerFormFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemGuardarCambiosTablaFacturaPuntoVenta= new JMenuItem("Guardar Tabla" + FuncionesSwing.getKeyMensaje("GUARDAR_CAMBIOS")); this.jMenuItemGuardarCambiosTablaFacturaPuntoVenta.setActionCommand("Guardar Tabla"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemGuardarCambiosTablaFacturaPuntoVenta,"guardarcambiostabla_button","Guardar Tabla"); FuncionesSwing.setBoldMenuItem(this.jMenuItemGuardarCambiosTablaFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemCerrarFacturaPuntoVenta= new JMenuItem("Salir" + FuncionesSwing.getKeyMensaje("CERRAR")); this.jMenuItemCerrarFacturaPuntoVenta.setActionCommand("Cerrar"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemCerrarFacturaPuntoVenta,"cerrar_button","Salir"); FuncionesSwing.setBoldMenuItem(this.jMenuItemCerrarFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemRecargarInformacionFacturaPuntoVenta= new JMenuItem("Recargar" + FuncionesSwing.getKeyMensaje("RECARGAR")); this.jMenuItemRecargarInformacionFacturaPuntoVenta.setActionCommand("Recargar"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemRecargarInformacionFacturaPuntoVenta,"recargar_button","Recargar"); FuncionesSwing.setBoldMenuItem(this.jMenuItemRecargarInformacionFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemProcesarInformacionFacturaPuntoVenta= new JMenuItem("Procesar Informacion"); this.jMenuItemProcesarInformacionFacturaPuntoVenta.setActionCommand("Procesar Informacion"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemProcesarInformacionFacturaPuntoVenta,"procesar_button","Procesar Informacion"); this.jMenuItemAnterioresFacturaPuntoVenta= new JMenuItem("Anteriores" + FuncionesSwing.getKeyMensaje("ANTERIORES")); this.jMenuItemAnterioresFacturaPuntoVenta.setActionCommand("Anteriores"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemAnterioresFacturaPuntoVenta,"anteriores_button","Anteriores"); FuncionesSwing.setBoldMenuItem(this.jMenuItemAnterioresFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemSiguientesFacturaPuntoVenta= new JMenuItem("Siguientes" + FuncionesSwing.getKeyMensaje("SIGUIENTES")); this.jMenuItemSiguientesFacturaPuntoVenta.setActionCommand("Siguientes"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemSiguientesFacturaPuntoVenta,"siguientes_button","Siguientes"); FuncionesSwing.setBoldMenuItem(this.jMenuItemSiguientesFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemAbrirOrderByFacturaPuntoVenta= new JMenuItem("Orden" + FuncionesSwing.getKeyMensaje("ORDEN")); this.jMenuItemAbrirOrderByFacturaPuntoVenta.setActionCommand("Orden"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemAbrirOrderByFacturaPuntoVenta,"orden_button","Orden"); FuncionesSwing.setBoldMenuItem(this.jMenuItemAbrirOrderByFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemMostrarOcultarFacturaPuntoVenta= new JMenuItem("Mostrar Ocultar" + FuncionesSwing.getKeyMensaje("MOSTRAR_OCULTAR")); this.jMenuItemMostrarOcultarFacturaPuntoVenta.setActionCommand("Mostrar Ocultar"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemMostrarOcultarFacturaPuntoVenta,"mostrar_ocultar_button","Mostrar Ocultar"); FuncionesSwing.setBoldMenuItem(this.jMenuItemMostrarOcultarFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemDetalleAbrirOrderByFacturaPuntoVenta= new JMenuItem("Orden" + FuncionesSwing.getKeyMensaje("ORDEN")); this.jMenuItemDetalleAbrirOrderByFacturaPuntoVenta.setActionCommand("Orden"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemDetalleAbrirOrderByFacturaPuntoVenta,"orden_button","Orden"); FuncionesSwing.setBoldMenuItem(this.jMenuItemDetalleAbrirOrderByFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemDetalleMostarOcultarFacturaPuntoVenta= new JMenuItem("Mostrar Ocultar" + FuncionesSwing.getKeyMensaje("MOSTRAR_OCULTAR")); this.jMenuItemDetalleMostarOcultarFacturaPuntoVenta.setActionCommand("Mostrar Ocultar"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemDetalleMostarOcultarFacturaPuntoVenta,"mostrar_ocultar_button","Mostrar Ocultar"); FuncionesSwing.setBoldMenuItem(this.jMenuItemDetalleMostarOcultarFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this); this.jMenuItemNuevoGuardarCambiosFacturaPuntoVenta= new JMenuItem("Nuevo Tabla" + FuncionesSwing.getKeyMensaje("NUEVO_TABLA")); this.jMenuItemNuevoGuardarCambiosFacturaPuntoVenta.setActionCommand("Nuevo Tabla"); FuncionesSwing.addImagenMenuItemGeneral(this.jMenuItemNuevoGuardarCambiosFacturaPuntoVenta,"nuevoguardarcambios_button","Nuevo"); FuncionesSwing.setBoldMenuItem(this.jMenuItemNuevoGuardarCambiosFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this); //PRINCIPAL if(!this.conCargarMinimo) { this.jmenuArchivoFacturaPuntoVenta.add(this.jMenuItemCerrarFacturaPuntoVenta); this.jmenuAccionesFacturaPuntoVenta.add(this.jMenuItemNuevoFacturaPuntoVenta); this.jmenuAccionesFacturaPuntoVenta.add(this.jMenuItemNuevoGuardarCambiosFacturaPuntoVenta); this.jmenuAccionesFacturaPuntoVenta.add(this.jMenuItemNuevoRelacionesFacturaPuntoVenta); this.jmenuAccionesFacturaPuntoVenta.add(this.jMenuItemGuardarCambiosTablaFacturaPuntoVenta); this.jmenuAccionesFacturaPuntoVenta.add(this.jMenuItemDuplicarFacturaPuntoVenta); this.jmenuAccionesFacturaPuntoVenta.add(this.jMenuItemCopiarFacturaPuntoVenta); this.jmenuAccionesFacturaPuntoVenta.add(this.jMenuItemVerFormFacturaPuntoVenta); this.jmenuDatosFacturaPuntoVenta.add(this.jMenuItemRecargarInformacionFacturaPuntoVenta); this.jmenuDatosFacturaPuntoVenta.add(this.jMenuItemAnterioresFacturaPuntoVenta); this.jmenuDatosFacturaPuntoVenta.add(this.jMenuItemSiguientesFacturaPuntoVenta); this.jmenuDatosFacturaPuntoVenta.add(this.jMenuItemAbrirOrderByFacturaPuntoVenta); this.jmenuDatosFacturaPuntoVenta.add(this.jMenuItemMostrarOcultarFacturaPuntoVenta); } //PRINCIPAL_FIN //DETALLE //this.jmenuDetalleAccionesFacturaPuntoVenta.add(this.jMenuItemGuardarCambiosFacturaPuntoVenta); //DETALLE_FIN //RELACIONES //RELACIONES //PRINCIPAL if(!this.conCargarMinimo) { FuncionesSwing.setBoldMenu(this.jmenuArchivoFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this); FuncionesSwing.setBoldMenu(this.jmenuAccionesFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this); FuncionesSwing.setBoldMenu(this.jmenuDatosFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this); this.jmenuBarFacturaPuntoVenta.add(this.jmenuArchivoFacturaPuntoVenta); this.jmenuBarFacturaPuntoVenta.add(this.jmenuAccionesFacturaPuntoVenta); this.jmenuBarFacturaPuntoVenta.add(this.jmenuDatosFacturaPuntoVenta); } //PRINCIPAL_FIN //DETALLE //DETALLE_FIN //AGREGA MENU A PANTALLA if(!this.conCargarMinimo) { this.setJMenuBar(this.jmenuBarFacturaPuntoVenta); } //AGREGA MENU DETALLE A PANTALLA } public void inicializarElementosBusquedasFacturaPuntoVenta() { //BYDAN_BUSQUEDAS //INDICES BUSQUEDA this.jPanelFK_IdAsientoContableFacturaPuntoVenta=new JPanelMe("fondo_formulario",true);//new JPanel(); this.jPanelFK_IdAsientoContableFacturaPuntoVenta.setToolTipText("Buscar Por Asiento C "); this.jButtonFK_IdAsientoContableFacturaPuntoVenta= new JButtonMe(); this.jButtonFK_IdAsientoContableFacturaPuntoVenta.setText("Buscar"); this.jButtonFK_IdAsientoContableFacturaPuntoVenta.setToolTipText("Buscar Por Asiento C "); FuncionesSwing.addImagenButtonGeneral(this.jButtonFK_IdAsientoContableFacturaPuntoVenta,"buscar_button","Buscar Por Asiento C "); FuncionesSwing.setBoldButton(this.jButtonFK_IdAsientoContableFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this);; jLabelid_asiento_contableFK_IdAsientoContableFacturaPuntoVenta = new JLabelMe(); jLabelid_asiento_contableFK_IdAsientoContableFacturaPuntoVenta.setText("Asiento C :"); jLabelid_asiento_contableFK_IdAsientoContableFacturaPuntoVenta.setToolTipText("Asiento C"); jLabelid_asiento_contableFK_IdAsientoContableFacturaPuntoVenta.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL2,20),Constantes2.ISWING_ALTO_CONTROL_LABEL)); jLabelid_asiento_contableFK_IdAsientoContableFacturaPuntoVenta.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL2,20),Constantes2.ISWING_ALTO_CONTROL_LABEL)); jLabelid_asiento_contableFK_IdAsientoContableFacturaPuntoVenta.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL2,20),Constantes2.ISWING_ALTO_CONTROL_LABEL)); FuncionesSwing.setBoldLabel(jLabelid_asiento_contableFK_IdAsientoContableFacturaPuntoVenta,STIPO_TAMANIO_GENERAL,false,true,this); jComboBoxid_asiento_contableFK_IdAsientoContableFacturaPuntoVenta= new JComboBoxMe(); jComboBoxid_asiento_contableFK_IdAsientoContableFacturaPuntoVenta.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_asiento_contableFK_IdAsientoContableFacturaPuntoVenta.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_asiento_contableFK_IdAsientoContableFacturaPuntoVenta.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_asiento_contableFK_IdAsientoContableFacturaPuntoVenta,STIPO_TAMANIO_GENERAL,false,true,this); this.jButtonBuscarFK_IdAsientoContableid_asiento_contableFacturaPuntoVenta= new JButtonMe(); this.jButtonBuscarFK_IdAsientoContableid_asiento_contableFacturaPuntoVenta.setMinimumSize(new Dimension(50,Constantes.ISWING_ALTO_CONTROL)); this.jButtonBuscarFK_IdAsientoContableid_asiento_contableFacturaPuntoVenta.setMaximumSize(new Dimension(50,Constantes.ISWING_ALTO_CONTROL)); this.jButtonBuscarFK_IdAsientoContableid_asiento_contableFacturaPuntoVenta.setPreferredSize(new Dimension(50,Constantes.ISWING_ALTO_CONTROL)); this.jButtonBuscarFK_IdAsientoContableid_asiento_contableFacturaPuntoVenta.setText("Buscar"); this.jButtonBuscarFK_IdAsientoContableid_asiento_contableFacturaPuntoVenta.setToolTipText("Buscar"); this.jButtonBuscarFK_IdAsientoContableid_asiento_contableFacturaPuntoVenta.setFocusable(false); this.jPanelFK_IdCajaFacturaPuntoVenta=new JPanelMe("fondo_formulario",true);//new JPanel(); this.jPanelFK_IdCajaFacturaPuntoVenta.setToolTipText("Buscar Por Caja "); this.jButtonFK_IdCajaFacturaPuntoVenta= new JButtonMe(); this.jButtonFK_IdCajaFacturaPuntoVenta.setText("Buscar"); this.jButtonFK_IdCajaFacturaPuntoVenta.setToolTipText("Buscar Por Caja "); FuncionesSwing.addImagenButtonGeneral(this.jButtonFK_IdCajaFacturaPuntoVenta,"buscar_button","Buscar Por Caja "); FuncionesSwing.setBoldButton(this.jButtonFK_IdCajaFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this);; jLabelid_cajaFK_IdCajaFacturaPuntoVenta = new JLabelMe(); jLabelid_cajaFK_IdCajaFacturaPuntoVenta.setText("Caja :"); jLabelid_cajaFK_IdCajaFacturaPuntoVenta.setToolTipText("Caja"); jLabelid_cajaFK_IdCajaFacturaPuntoVenta.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL2,20),Constantes2.ISWING_ALTO_CONTROL_LABEL)); jLabelid_cajaFK_IdCajaFacturaPuntoVenta.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL2,20),Constantes2.ISWING_ALTO_CONTROL_LABEL)); jLabelid_cajaFK_IdCajaFacturaPuntoVenta.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL2,20),Constantes2.ISWING_ALTO_CONTROL_LABEL)); FuncionesSwing.setBoldLabel(jLabelid_cajaFK_IdCajaFacturaPuntoVenta,STIPO_TAMANIO_GENERAL,false,true,this); jComboBoxid_cajaFK_IdCajaFacturaPuntoVenta= new JComboBoxMe(); jComboBoxid_cajaFK_IdCajaFacturaPuntoVenta.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_cajaFK_IdCajaFacturaPuntoVenta.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_cajaFK_IdCajaFacturaPuntoVenta.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_cajaFK_IdCajaFacturaPuntoVenta,STIPO_TAMANIO_GENERAL,false,true,this); this.jPanelFK_IdClienteFacturaPuntoVenta=new JPanelMe("fondo_formulario",true);//new JPanel(); this.jPanelFK_IdClienteFacturaPuntoVenta.setToolTipText("Buscar Por Cliente "); this.jButtonFK_IdClienteFacturaPuntoVenta= new JButtonMe(); this.jButtonFK_IdClienteFacturaPuntoVenta.setText("Buscar"); this.jButtonFK_IdClienteFacturaPuntoVenta.setToolTipText("Buscar Por Cliente "); FuncionesSwing.addImagenButtonGeneral(this.jButtonFK_IdClienteFacturaPuntoVenta,"buscar_button","Buscar Por Cliente "); FuncionesSwing.setBoldButton(this.jButtonFK_IdClienteFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this);; jLabelid_clienteFK_IdClienteFacturaPuntoVenta = new JLabelMe(); jLabelid_clienteFK_IdClienteFacturaPuntoVenta.setText("Cliente :"); jLabelid_clienteFK_IdClienteFacturaPuntoVenta.setToolTipText("Cliente"); jLabelid_clienteFK_IdClienteFacturaPuntoVenta.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL2,20),Constantes2.ISWING_ALTO_CONTROL_LABEL)); jLabelid_clienteFK_IdClienteFacturaPuntoVenta.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL2,20),Constantes2.ISWING_ALTO_CONTROL_LABEL)); jLabelid_clienteFK_IdClienteFacturaPuntoVenta.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL2,20),Constantes2.ISWING_ALTO_CONTROL_LABEL)); FuncionesSwing.setBoldLabel(jLabelid_clienteFK_IdClienteFacturaPuntoVenta,STIPO_TAMANIO_GENERAL,false,true,this); jComboBoxid_clienteFK_IdClienteFacturaPuntoVenta= new JComboBoxMe(); jComboBoxid_clienteFK_IdClienteFacturaPuntoVenta.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,75),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jComboBoxid_clienteFK_IdClienteFacturaPuntoVenta.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,75),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); jComboBoxid_clienteFK_IdClienteFacturaPuntoVenta.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL,75),Constantes.ISWING_ALTO_CONTROL + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_CONTROL,0))); FuncionesSwing.setBoldComboBox(jComboBoxid_clienteFK_IdClienteFacturaPuntoVenta,STIPO_TAMANIO_GENERAL,false,true,this); this.jButtonBuscarFK_IdClienteid_clienteFacturaPuntoVenta= new JButtonMe(); this.jButtonBuscarFK_IdClienteid_clienteFacturaPuntoVenta.setMinimumSize(new Dimension(50,Constantes.ISWING_ALTO_CONTROL)); this.jButtonBuscarFK_IdClienteid_clienteFacturaPuntoVenta.setMaximumSize(new Dimension(50,Constantes.ISWING_ALTO_CONTROL)); this.jButtonBuscarFK_IdClienteid_clienteFacturaPuntoVenta.setPreferredSize(new Dimension(50,Constantes.ISWING_ALTO_CONTROL)); this.jButtonBuscarFK_IdClienteid_clienteFacturaPuntoVenta.setText("Buscar"); this.jButtonBuscarFK_IdClienteid_clienteFacturaPuntoVenta.setToolTipText("Buscar"); this.jButtonBuscarFK_IdClienteid_clienteFacturaPuntoVenta.setFocusable(false); this.jPanelFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta=new JPanelMe("fondo_formulario",true);//new JPanel(); this.jPanelFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta.setToolTipText("Buscar Por Estado "); this.jButtonFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta= new JButtonMe(); this.jButtonFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta.setText("Buscar"); this.jButtonFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta.setToolTipText("Buscar Por Estado "); FuncionesSwing.addImagenButtonGeneral(this.jButtonFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta,"buscar_button","Buscar Por Estado "); FuncionesSwing.setBoldButton(this.jButtonFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this);; jLabelid_estado_factura_punto_ventaFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta = new JLabelMe(); jLabelid_estado_factura_punto_ventaFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta.setText("Estado :"); jLabelid_estado_factura_punto_ventaFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta.setToolTipText("Estado"); jLabelid_estado_factura_punto_ventaFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL2,20),Constantes2.ISWING_ALTO_CONTROL_LABEL)); jLabelid_estado_factura_punto_ventaFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL2,20),Constantes2.ISWING_ALTO_CONTROL_LABEL)); jLabelid_estado_factura_punto_ventaFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL2,20),Constantes2.ISWING_ALTO_CONTROL_LABEL)); FuncionesSwing.setBoldLabel(jLabelid_estado_factura_punto_ventaFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta,STIPO_TAMANIO_GENERAL,false,true,this); jComboBoxid_estado_factura_punto_ventaFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta= new JComboBoxMe(); jComboBoxid_estado_factura_punto_ventaFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta.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_estado_factura_punto_ventaFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta.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_estado_factura_punto_ventaFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta.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_estado_factura_punto_ventaFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta,STIPO_TAMANIO_GENERAL,false,true,this); this.jPanelFK_IdFormatoFacturaPuntoVenta=new JPanelMe("fondo_formulario",true);//new JPanel(); this.jPanelFK_IdFormatoFacturaPuntoVenta.setToolTipText("Buscar Por Formato "); this.jButtonFK_IdFormatoFacturaPuntoVenta= new JButtonMe(); this.jButtonFK_IdFormatoFacturaPuntoVenta.setText("Buscar"); this.jButtonFK_IdFormatoFacturaPuntoVenta.setToolTipText("Buscar Por Formato "); FuncionesSwing.addImagenButtonGeneral(this.jButtonFK_IdFormatoFacturaPuntoVenta,"buscar_button","Buscar Por Formato "); FuncionesSwing.setBoldButton(this.jButtonFK_IdFormatoFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this);; jLabelid_formatoFK_IdFormatoFacturaPuntoVenta = new JLabelMe(); jLabelid_formatoFK_IdFormatoFacturaPuntoVenta.setText("Formato :"); jLabelid_formatoFK_IdFormatoFacturaPuntoVenta.setToolTipText("Formato"); jLabelid_formatoFK_IdFormatoFacturaPuntoVenta.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL2,20),Constantes2.ISWING_ALTO_CONTROL_LABEL)); jLabelid_formatoFK_IdFormatoFacturaPuntoVenta.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL2,20),Constantes2.ISWING_ALTO_CONTROL_LABEL)); jLabelid_formatoFK_IdFormatoFacturaPuntoVenta.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL2,20),Constantes2.ISWING_ALTO_CONTROL_LABEL)); FuncionesSwing.setBoldLabel(jLabelid_formatoFK_IdFormatoFacturaPuntoVenta,STIPO_TAMANIO_GENERAL,false,true,this); jComboBoxid_formatoFK_IdFormatoFacturaPuntoVenta= new JComboBoxMe(); jComboBoxid_formatoFK_IdFormatoFacturaPuntoVenta.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_formatoFK_IdFormatoFacturaPuntoVenta.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_formatoFK_IdFormatoFacturaPuntoVenta.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_formatoFK_IdFormatoFacturaPuntoVenta,STIPO_TAMANIO_GENERAL,false,true,this); this.jPanelFK_IdMesaFacturaPuntoVenta=new JPanelMe("fondo_formulario",true);//new JPanel(); this.jPanelFK_IdMesaFacturaPuntoVenta.setToolTipText("Buscar Por Mesa "); this.jButtonFK_IdMesaFacturaPuntoVenta= new JButtonMe(); this.jButtonFK_IdMesaFacturaPuntoVenta.setText("Buscar"); this.jButtonFK_IdMesaFacturaPuntoVenta.setToolTipText("Buscar Por Mesa "); FuncionesSwing.addImagenButtonGeneral(this.jButtonFK_IdMesaFacturaPuntoVenta,"buscar_button","Buscar Por Mesa "); FuncionesSwing.setBoldButton(this.jButtonFK_IdMesaFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this);; jLabelid_mesaFK_IdMesaFacturaPuntoVenta = new JLabelMe(); jLabelid_mesaFK_IdMesaFacturaPuntoVenta.setText("Mesa :"); jLabelid_mesaFK_IdMesaFacturaPuntoVenta.setToolTipText("Mesa"); jLabelid_mesaFK_IdMesaFacturaPuntoVenta.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL2,20),Constantes2.ISWING_ALTO_CONTROL_LABEL)); jLabelid_mesaFK_IdMesaFacturaPuntoVenta.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL2,20),Constantes2.ISWING_ALTO_CONTROL_LABEL)); jLabelid_mesaFK_IdMesaFacturaPuntoVenta.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL2,20),Constantes2.ISWING_ALTO_CONTROL_LABEL)); FuncionesSwing.setBoldLabel(jLabelid_mesaFK_IdMesaFacturaPuntoVenta,STIPO_TAMANIO_GENERAL,false,true,this); jComboBoxid_mesaFK_IdMesaFacturaPuntoVenta= new JComboBoxMe(); jComboBoxid_mesaFK_IdMesaFacturaPuntoVenta.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_mesaFK_IdMesaFacturaPuntoVenta.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_mesaFK_IdMesaFacturaPuntoVenta.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_mesaFK_IdMesaFacturaPuntoVenta,STIPO_TAMANIO_GENERAL,false,true,this); this.jPanelFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta=new JPanelMe("fondo_formulario",true);//new JPanel(); this.jPanelFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta.setToolTipText("Buscar Por Tipo "); this.jButtonFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta= new JButtonMe(); this.jButtonFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta.setText("Buscar"); this.jButtonFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta.setToolTipText("Buscar Por Tipo "); FuncionesSwing.addImagenButtonGeneral(this.jButtonFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta,"buscar_button","Buscar Por Tipo "); FuncionesSwing.setBoldButton(this.jButtonFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this);; jLabelid_tipo_factura_punto_ventaFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta = new JLabelMe(); jLabelid_tipo_factura_punto_ventaFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta.setText("Tipo :"); jLabelid_tipo_factura_punto_ventaFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta.setToolTipText("Tipo"); jLabelid_tipo_factura_punto_ventaFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL2,20),Constantes2.ISWING_ALTO_CONTROL_LABEL)); jLabelid_tipo_factura_punto_ventaFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL2,20),Constantes2.ISWING_ALTO_CONTROL_LABEL)); jLabelid_tipo_factura_punto_ventaFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL2,20),Constantes2.ISWING_ALTO_CONTROL_LABEL)); FuncionesSwing.setBoldLabel(jLabelid_tipo_factura_punto_ventaFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta,STIPO_TAMANIO_GENERAL,false,true,this); jComboBoxid_tipo_factura_punto_ventaFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta= new JComboBoxMe(); jComboBoxid_tipo_factura_punto_ventaFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta.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_tipo_factura_punto_ventaFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta.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_tipo_factura_punto_ventaFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta.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_tipo_factura_punto_ventaFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta,STIPO_TAMANIO_GENERAL,false,true,this); this.jPanelFK_IdTipoPrecioFacturaPuntoVenta=new JPanelMe("fondo_formulario",true);//new JPanel(); this.jPanelFK_IdTipoPrecioFacturaPuntoVenta.setToolTipText("Buscar Por Tipo Precio "); this.jButtonFK_IdTipoPrecioFacturaPuntoVenta= new JButtonMe(); this.jButtonFK_IdTipoPrecioFacturaPuntoVenta.setText("Buscar"); this.jButtonFK_IdTipoPrecioFacturaPuntoVenta.setToolTipText("Buscar Por Tipo Precio "); FuncionesSwing.addImagenButtonGeneral(this.jButtonFK_IdTipoPrecioFacturaPuntoVenta,"buscar_button","Buscar Por Tipo Precio "); FuncionesSwing.setBoldButton(this.jButtonFK_IdTipoPrecioFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this);; jLabelid_tipo_precioFK_IdTipoPrecioFacturaPuntoVenta = new JLabelMe(); jLabelid_tipo_precioFK_IdTipoPrecioFacturaPuntoVenta.setText("Tipo Precio :"); jLabelid_tipo_precioFK_IdTipoPrecioFacturaPuntoVenta.setToolTipText("Tipo Precio"); jLabelid_tipo_precioFK_IdTipoPrecioFacturaPuntoVenta.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL2,20),Constantes2.ISWING_ALTO_CONTROL_LABEL)); jLabelid_tipo_precioFK_IdTipoPrecioFacturaPuntoVenta.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL2,20),Constantes2.ISWING_ALTO_CONTROL_LABEL)); jLabelid_tipo_precioFK_IdTipoPrecioFacturaPuntoVenta.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL2,20),Constantes2.ISWING_ALTO_CONTROL_LABEL)); FuncionesSwing.setBoldLabel(jLabelid_tipo_precioFK_IdTipoPrecioFacturaPuntoVenta,STIPO_TAMANIO_GENERAL,false,true,this); jComboBoxid_tipo_precioFK_IdTipoPrecioFacturaPuntoVenta= new JComboBoxMe(); jComboBoxid_tipo_precioFK_IdTipoPrecioFacturaPuntoVenta.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_tipo_precioFK_IdTipoPrecioFacturaPuntoVenta.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_tipo_precioFK_IdTipoPrecioFacturaPuntoVenta.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_tipo_precioFK_IdTipoPrecioFacturaPuntoVenta,STIPO_TAMANIO_GENERAL,false,true,this); this.jPanelFK_IdVendedorFacturaPuntoVenta=new JPanelMe("fondo_formulario",true);//new JPanel(); this.jPanelFK_IdVendedorFacturaPuntoVenta.setToolTipText("Buscar Por Vendedor "); this.jButtonFK_IdVendedorFacturaPuntoVenta= new JButtonMe(); this.jButtonFK_IdVendedorFacturaPuntoVenta.setText("Buscar"); this.jButtonFK_IdVendedorFacturaPuntoVenta.setToolTipText("Buscar Por Vendedor "); FuncionesSwing.addImagenButtonGeneral(this.jButtonFK_IdVendedorFacturaPuntoVenta,"buscar_button","Buscar Por Vendedor "); FuncionesSwing.setBoldButton(this.jButtonFK_IdVendedorFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this);; jLabelid_vendedorFK_IdVendedorFacturaPuntoVenta = new JLabelMe(); jLabelid_vendedorFK_IdVendedorFacturaPuntoVenta.setText("Vendedor :"); jLabelid_vendedorFK_IdVendedorFacturaPuntoVenta.setToolTipText("Vendedor"); jLabelid_vendedorFK_IdVendedorFacturaPuntoVenta.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL2,20),Constantes2.ISWING_ALTO_CONTROL_LABEL)); jLabelid_vendedorFK_IdVendedorFacturaPuntoVenta.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL2,20),Constantes2.ISWING_ALTO_CONTROL_LABEL)); jLabelid_vendedorFK_IdVendedorFacturaPuntoVenta.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL_LABEL2 + FuncionesSwing.getValorProporcion(Constantes.ISWING_ANCHO_CONTROL_LABEL2,20),Constantes2.ISWING_ALTO_CONTROL_LABEL)); FuncionesSwing.setBoldLabel(jLabelid_vendedorFK_IdVendedorFacturaPuntoVenta,STIPO_TAMANIO_GENERAL,false,true,this); jComboBoxid_vendedorFK_IdVendedorFacturaPuntoVenta= new JComboBoxMe(); jComboBoxid_vendedorFK_IdVendedorFacturaPuntoVenta.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_vendedorFK_IdVendedorFacturaPuntoVenta.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_vendedorFK_IdVendedorFacturaPuntoVenta.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_vendedorFK_IdVendedorFacturaPuntoVenta,STIPO_TAMANIO_GENERAL,false,true,this); this.jButtonBuscarFK_IdVendedorid_vendedorFacturaPuntoVenta= new JButtonMe(); this.jButtonBuscarFK_IdVendedorid_vendedorFacturaPuntoVenta.setMinimumSize(new Dimension(50,Constantes.ISWING_ALTO_CONTROL)); this.jButtonBuscarFK_IdVendedorid_vendedorFacturaPuntoVenta.setMaximumSize(new Dimension(50,Constantes.ISWING_ALTO_CONTROL)); this.jButtonBuscarFK_IdVendedorid_vendedorFacturaPuntoVenta.setPreferredSize(new Dimension(50,Constantes.ISWING_ALTO_CONTROL)); this.jButtonBuscarFK_IdVendedorid_vendedorFacturaPuntoVenta.setText("Buscar"); this.jButtonBuscarFK_IdVendedorid_vendedorFacturaPuntoVenta.setToolTipText("Buscar"); this.jButtonBuscarFK_IdVendedorid_vendedorFacturaPuntoVenta.setFocusable(false); this.jTabbedPaneBusquedasFacturaPuntoVenta=new JTabbedPane(); this.jTabbedPaneBusquedasFacturaPuntoVenta.setMinimumSize(new Dimension(this.getWidth(),Constantes.ISWING_ALTO_TABPANE_BUSQUEDA + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_TABPANE_BUSQUEDA,25))); this.jTabbedPaneBusquedasFacturaPuntoVenta.setMaximumSize(new Dimension(this.getWidth(),Constantes.ISWING_ALTO_TABPANE_BUSQUEDA + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_TABPANE_BUSQUEDA,25))); this.jTabbedPaneBusquedasFacturaPuntoVenta.setPreferredSize(new Dimension(this.getWidth(),Constantes.ISWING_ALTO_TABPANE_BUSQUEDA + FuncionesSwing.getValorProporcion(Constantes.ISWING_ALTO_TABPANE_BUSQUEDA,25))); //this.jTabbedPaneBusquedasFacturaPuntoVenta.setBorder(javax.swing.BorderFactory.createTitledBorder("Busqueda")); this.jTabbedPaneBusquedasFacturaPuntoVenta.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); FuncionesSwing.setBoldTabbedPane(this.jTabbedPaneBusquedasFacturaPuntoVenta,STIPO_TAMANIO_GENERAL,false,true,this); //INDICES BUSQUEDA_FIN } //JPanel //@SuppressWarnings({"unchecked" })//"rawtypes" public JScrollPane getJContentPane(int iWidth,int iHeight,JDesktopPane jDesktopPane,Boolean cargarRelaciones,Usuario usuarioActual,ResumenUsuario resumenUsuarioActual,Modulo moduloActual,Opcion opcionActual,ParametroGeneralSg parametroGeneralSg,ParametroGeneralUsuario parametroGeneralUsuario,PaginaTipo paginaTipo) throws Exception { //PARA TABLA PARAMETROS String sKeyStrokeName=""; KeyStroke keyStrokeControl=null; this.jContentPane = new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true);//new JPanel(); this.usuarioActual=usuarioActual; this.resumenUsuarioActual=resumenUsuarioActual; this.opcionActual=opcionActual; this.moduloActual=moduloActual; this.parametroGeneralSg=parametroGeneralSg; this.parametroGeneralUsuario=parametroGeneralUsuario; this.jDesktopPane=jDesktopPane; this.conFuncionalidadRelaciones=parametroGeneralUsuario.getcon_guardar_relaciones(); //INDEPENDIENTE DEL PARAMETRO TIENE LA FUNCIONALIDAD DE GUARDAR RELACIONES this.conFuncionalidadRelaciones=true; int iGridyPrincipal=0; this.inicializarToolBar(); //CARGAR MENUS if(this.conCargarFormDetalle) { //true) { //this.jInternalFrameDetalleFacturaPuntoVenta = new FacturaPuntoVentaDetalleJInternalFrame(paginaTipo);//JInternalFrameBase("Factura Punto Venta DATOS"); this.jInternalFrameDetalleFormFacturaPuntoVenta = new FacturaPuntoVentaDetalleFormJInternalFrame(jDesktopPane,this.facturapuntoventaSessionBean.getConGuardarRelaciones(),this.facturapuntoventaSessionBean.getEsGuardarRelacionado(),cargarRelaciones,usuarioActual,resumenUsuarioActual,moduloActual,opcionActual,parametroGeneralSg,parametroGeneralUsuario,paginaTipo); } else { this.jInternalFrameDetalleFormFacturaPuntoVenta = null;//new FacturaPuntoVentaDetalleFormJInternalFrame("MINIMO"); } this.cargarMenus(); this.gridaBagLayoutFacturaPuntoVenta= new GridBagLayout(); this.jTableDatosFacturaPuntoVenta = new JTableMe(); String sToolTipFacturaPuntoVenta=""; sToolTipFacturaPuntoVenta=FacturaPuntoVentaConstantesFunciones.SCLASSWEBTITULO; if(Constantes.ISDEVELOPING) { sToolTipFacturaPuntoVenta+="(PuntoVenta.FacturaPuntoVenta)"; } if(!this.facturapuntoventaSessionBean.getEsGuardarRelacionado()) { sToolTipFacturaPuntoVenta+="_"+this.opcionActual.getId(); } this.jTableDatosFacturaPuntoVenta.setToolTipText(sToolTipFacturaPuntoVenta); //SE DEFINE EN DETALLE //FuncionesSwing.setBoldLabelTable(this.jTableDatosFacturaPuntoVenta); this.jTableDatosFacturaPuntoVenta.setAutoCreateRowSorter(true); this.jTableDatosFacturaPuntoVenta.setRowHeight(Constantes.ISWING_ALTO_FILA_TABLA + Constantes.ISWING_ALTO_FILA_TABLA_EXTRA_FECHA); //MULTIPLE SELECTION this.jTableDatosFacturaPuntoVenta.setRowSelectionAllowed(true); this.jTableDatosFacturaPuntoVenta.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); FuncionesSwing.setBoldTable(jTableDatosFacturaPuntoVenta,STIPO_TAMANIO_GENERAL,false,true,this); this.jButtonNuevoFacturaPuntoVenta = new JButtonMe(); this.jButtonDuplicarFacturaPuntoVenta = new JButtonMe(); this.jButtonCopiarFacturaPuntoVenta = new JButtonMe(); this.jButtonVerFormFacturaPuntoVenta = new JButtonMe(); this.jButtonNuevoRelacionesFacturaPuntoVenta = new JButtonMe(); this.jButtonGuardarCambiosTablaFacturaPuntoVenta = new JButtonMe(); this.jButtonCerrarFacturaPuntoVenta = new JButtonMe(); this.jScrollPanelDatosFacturaPuntoVenta = new JScrollPane(); this.jScrollPanelDatosGeneralFacturaPuntoVenta = new JScrollPane(); this.jPanelAccionesFacturaPuntoVenta = new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true); //if(!this.conCargarMinimo) { this.jPanelCamposFintotalFacturaPuntoVenta = new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true);; //} this.sPath=" <---> Acceso: Factura Punto Venta"; if(!this.facturapuntoventaSessionBean.getEsGuardarRelacionado()) { this.jScrollPanelDatosFacturaPuntoVenta.setBorder(javax.swing.BorderFactory.createTitledBorder("Datos Factura Punto Ventas" + this.sPath)); } else { this.jScrollPanelDatosFacturaPuntoVenta.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); } this.jScrollPanelDatosGeneralFacturaPuntoVenta.setBorder(javax.swing.BorderFactory.createTitledBorder("Edicion Datos")); this.jPanelAccionesFacturaPuntoVenta.setBorder(javax.swing.BorderFactory.createTitledBorder("Acciones")); this.jPanelAccionesFacturaPuntoVenta.setToolTipText("Acciones"); this.jPanelAccionesFacturaPuntoVenta.setName("Acciones"); FuncionesSwing.setBoldScrollPanel(this.jScrollPanelDatosGeneralFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,false,this); FuncionesSwing.setBoldScrollPanel(this.jScrollPanelDatosFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,false,this); //if(!this.conCargarMinimo) { this.jPanelCamposFintotalFacturaPuntoVenta.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); this.jPanelCamposFintotalFacturaPuntoVenta.setName("jPanelCamposFintotalFacturaPuntoVenta"); FuncionesSwing.setBoldPanel(this.jPanelCamposFintotalFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,false,this);; //} //ELEMENTOS TABLAS PARAMETOS if(!this.conCargarMinimo) { } //ELEMENTOS TABLAS PARAMETOS_FIN if(!this.conCargarMinimo) { //REPORTE DINAMICO //NO CARGAR INICIALMENTE, EN BOTON AL ABRIR //this.jInternalFrameReporteDinamicoFacturaPuntoVenta=new ReporteDinamicoJInternalFrame(FacturaPuntoVentaConstantesFunciones.SCLASSWEBTITULO,this); //this.cargarReporteDinamicoFacturaPuntoVenta(); //IMPORTACION //NO CARGAR INICIALMENTE, EN BOTON AL ABRIR //this.jInternalFrameImportacionFacturaPuntoVenta=new ImportacionJInternalFrame(FacturaPuntoVentaConstantesFunciones.SCLASSWEBTITULO,this); //this.cargarImportacionFacturaPuntoVenta(); } String sMapKey = ""; InputMap inputMap =null; this.jButtonAbrirOrderByFacturaPuntoVenta = new JButtonMe(); this.jButtonAbrirOrderByFacturaPuntoVenta.setText("Orden"); this.jButtonAbrirOrderByFacturaPuntoVenta.setToolTipText("Orden"+FuncionesSwing.getKeyMensaje("ORDEN")); FuncionesSwing.addImagenButtonGeneral(this.jButtonAbrirOrderByFacturaPuntoVenta,"orden_button","Orden"); FuncionesSwing.setBoldButton(this.jButtonAbrirOrderByFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this);; sMapKey = "AbrirOrderBySistema"; inputMap = this.jButtonAbrirOrderByFacturaPuntoVenta.getInputMap(FuncionesSwing.getTipoFocusedKeyEvent("NORMAL")); inputMap.put(KeyStroke.getKeyStroke(FuncionesSwing.getKeyEvent("ORDEN") , FuncionesSwing.getMaskKey("ORDEN")), sMapKey); this.jButtonAbrirOrderByFacturaPuntoVenta.getActionMap().put(sMapKey,new ButtonAbstractAction(this,"AbrirOrderBySistema")); if(!this.conCargarMinimo) { //NO CARGAR INICIALMENTE, EN BOTON AL ABRIR //this.jInternalFrameOrderByFacturaPuntoVenta=new OrderByJInternalFrame(STIPO_TAMANIO_GENERAL,this.jButtonAbrirOrderByFacturaPuntoVenta,false,this); //this.cargarOrderByFacturaPuntoVenta(false); } else { //NO CARGAR INICIALMENTE, EN BOTON AL ABRIR //this.jInternalFrameOrderByFacturaPuntoVenta=new OrderByJInternalFrame(STIPO_TAMANIO_GENERAL,this.jButtonAbrirOrderByFacturaPuntoVenta,true,this); //this.cargarOrderByFacturaPuntoVenta(true); } //VALORES PARA DISENO /* this.jTableDatosFacturaPuntoVenta.setMinimumSize(new Dimension(400,50));//2830 this.jTableDatosFacturaPuntoVenta.setMaximumSize(new Dimension(400,50));//2830 this.jTableDatosFacturaPuntoVenta.setPreferredSize(new Dimension(400,50));//2830 this.jScrollPanelDatosFacturaPuntoVenta.setMinimumSize(new Dimension(400,50)); this.jScrollPanelDatosFacturaPuntoVenta.setMaximumSize(new Dimension(400,50)); this.jScrollPanelDatosFacturaPuntoVenta.setPreferredSize(new Dimension(400,50)); */ this.jButtonNuevoFacturaPuntoVenta.setText("Nuevo"); this.jButtonDuplicarFacturaPuntoVenta.setText("Duplicar"); this.jButtonCopiarFacturaPuntoVenta.setText("Copiar"); this.jButtonVerFormFacturaPuntoVenta.setText("Ver"); this.jButtonNuevoRelacionesFacturaPuntoVenta.setText("Nuevo Rel"); this.jButtonGuardarCambiosTablaFacturaPuntoVenta.setText("Guardar"); this.jButtonCerrarFacturaPuntoVenta.setText("Salir"); FuncionesSwing.addImagenButtonGeneral(this.jButtonNuevoFacturaPuntoVenta,"nuevo_button","Nuevo",this.facturapuntoventaSessionBean.getEsGuardarRelacionado()); FuncionesSwing.addImagenButtonGeneral(this.jButtonDuplicarFacturaPuntoVenta,"duplicar_button","Duplicar",this.facturapuntoventaSessionBean.getEsGuardarRelacionado()); FuncionesSwing.addImagenButtonGeneral(this.jButtonCopiarFacturaPuntoVenta,"copiar_button","Copiar",this.facturapuntoventaSessionBean.getEsGuardarRelacionado()); FuncionesSwing.addImagenButtonGeneral(this.jButtonVerFormFacturaPuntoVenta,"ver_form","Ver",this.facturapuntoventaSessionBean.getEsGuardarRelacionado()); FuncionesSwing.addImagenButtonGeneral(this.jButtonNuevoRelacionesFacturaPuntoVenta,"nuevorelaciones_button","Nuevo Rel",this.facturapuntoventaSessionBean.getEsGuardarRelacionado()); FuncionesSwing.addImagenButtonGeneral(this.jButtonGuardarCambiosTablaFacturaPuntoVenta,"guardarcambiostabla_button","Guardar",this.facturapuntoventaSessionBean.getEsGuardarRelacionado()); FuncionesSwing.addImagenButtonGeneral(this.jButtonCerrarFacturaPuntoVenta,"cerrar_button","Salir",this.facturapuntoventaSessionBean.getEsGuardarRelacionado()); FuncionesSwing.setBoldButton(this.jButtonNuevoFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this); FuncionesSwing.setBoldButton(this.jButtonDuplicarFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this); FuncionesSwing.setBoldButton(this.jButtonCopiarFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this); FuncionesSwing.setBoldButton(this.jButtonVerFormFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this); FuncionesSwing.setBoldButton(this.jButtonNuevoRelacionesFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this); FuncionesSwing.setBoldButton(this.jButtonGuardarCambiosTablaFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this); FuncionesSwing.setBoldButton(this.jButtonCerrarFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this); this.jButtonNuevoFacturaPuntoVenta.setToolTipText("Nuevo"+" "+FacturaPuntoVentaConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("NUEVO")); this.jButtonDuplicarFacturaPuntoVenta.setToolTipText("Duplicar"+" "+FacturaPuntoVentaConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("DUPLICAR")); this.jButtonCopiarFacturaPuntoVenta.setToolTipText("Copiar"+" "+FacturaPuntoVentaConstantesFunciones.SCLASSWEBTITULO+ FuncionesSwing.getKeyMensaje("COPIAR")); this.jButtonVerFormFacturaPuntoVenta.setToolTipText("Ver"+" "+FacturaPuntoVentaConstantesFunciones.SCLASSWEBTITULO+ FuncionesSwing.getKeyMensaje("VER_FORM")); this.jButtonNuevoRelacionesFacturaPuntoVenta.setToolTipText("Nuevo Rel"+" "+FacturaPuntoVentaConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("NUEVO_RELACIONES")); this.jButtonGuardarCambiosTablaFacturaPuntoVenta.setToolTipText("Guardar"+" "+FacturaPuntoVentaConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("GUARDAR_CAMBIOS")); this.jButtonCerrarFacturaPuntoVenta.setToolTipText("Salir"+" "+FacturaPuntoVentaConstantesFunciones.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 = "NuevoFacturaPuntoVenta"; inputMap = this.jButtonNuevoFacturaPuntoVenta.getInputMap(FuncionesSwing.getTipoFocusedKeyEvent("NORMAL")); inputMap.put(KeyStroke.getKeyStroke(FuncionesSwing.getKeyEvent("NUEVO") , FuncionesSwing.getMaskKey("NUEVO")), sMapKey); this.jButtonNuevoFacturaPuntoVenta.getActionMap().put(sMapKey, new ButtonAbstractAction(this,"NuevoFacturaPuntoVenta")); //DUPLICAR sMapKey = "DuplicarFacturaPuntoVenta"; inputMap = this.jButtonDuplicarFacturaPuntoVenta.getInputMap(FuncionesSwing.getTipoFocusedKeyEvent("NORMAL")); inputMap.put(KeyStroke.getKeyStroke(FuncionesSwing.getKeyEvent("DUPLICAR") , FuncionesSwing.getMaskKey("DUPLICAR")), sMapKey); this.jButtonDuplicarFacturaPuntoVenta.getActionMap().put(sMapKey, new ButtonAbstractAction(this,"DuplicarFacturaPuntoVenta")); //COPIAR sMapKey = "CopiarFacturaPuntoVenta"; inputMap = this.jButtonCopiarFacturaPuntoVenta.getInputMap(FuncionesSwing.getTipoFocusedKeyEvent("NORMAL")); inputMap.put(KeyStroke.getKeyStroke(FuncionesSwing.getKeyEvent("COPIAR") , FuncionesSwing.getMaskKey("COPIAR")), sMapKey); this.jButtonCopiarFacturaPuntoVenta.getActionMap().put(sMapKey, new ButtonAbstractAction(this,"CopiarFacturaPuntoVenta")); //VEr FORM sMapKey = "VerFormFacturaPuntoVenta"; inputMap = this.jButtonVerFormFacturaPuntoVenta.getInputMap(FuncionesSwing.getTipoFocusedKeyEvent("NORMAL")); inputMap.put(KeyStroke.getKeyStroke(FuncionesSwing.getKeyEvent("VER_FORM") , FuncionesSwing.getMaskKey("VER_FORM")), sMapKey); this.jButtonVerFormFacturaPuntoVenta.getActionMap().put(sMapKey, new ButtonAbstractAction(this,"VerFormFacturaPuntoVenta")); //NUEVO RELACIONES sMapKey = "NuevoRelacionesFacturaPuntoVenta"; inputMap = this.jButtonNuevoRelacionesFacturaPuntoVenta.getInputMap(FuncionesSwing.getTipoFocusedKeyEvent("NORMAL")); inputMap.put(KeyStroke.getKeyStroke(FuncionesSwing.getKeyEvent("NUEVO_RELACIONES") , FuncionesSwing.getMaskKey("NUEVO_RELACIONES")), sMapKey); this.jButtonNuevoRelacionesFacturaPuntoVenta.getActionMap().put(sMapKey,new ButtonAbstractAction(this,"NuevoRelacionesFacturaPuntoVenta")); //MODIFICAR /* sMapKey = "ModificarFacturaPuntoVenta"; inputMap = this.jButtonModificarFacturaPuntoVenta.getInputMap(FuncionesSwing.getTipoFocusedKeyEvent("NORMAL")); inputMap.put(KeyStroke.getKeyStroke(FuncionesSwing.getKeyEvent("MODIFICAR") , FuncionesSwing.getMaskKey("MODIFICAR")), sMapKey); this.jButtonModificarFacturaPuntoVenta.getActionMap().put(sMapKey,new ButtonAbstractAction(this,"ModificarFacturaPuntoVenta")); */ //CERRAR sMapKey = "CerrarFacturaPuntoVenta"; inputMap = this.jButtonCerrarFacturaPuntoVenta.getInputMap(FuncionesSwing.getTipoFocusedKeyEvent("NORMAL")); inputMap.put(KeyStroke.getKeyStroke(FuncionesSwing.getKeyEvent("CERRAR") , FuncionesSwing.getMaskKey("CERRAR")), sMapKey); this.jButtonCerrarFacturaPuntoVenta.getActionMap().put(sMapKey,new ButtonAbstractAction(this,"CerrarFacturaPuntoVenta")); //GUARDAR CAMBIOS sMapKey = "GuardarCambiosTablaFacturaPuntoVenta"; inputMap = this.jButtonGuardarCambiosTablaFacturaPuntoVenta.getInputMap(FuncionesSwing.getTipoFocusedKeyEvent("NORMAL")); inputMap.put(KeyStroke.getKeyStroke(FuncionesSwing.getKeyEvent("GUARDAR_CAMBIOS") , FuncionesSwing.getMaskKey("GUARDAR_CAMBIOS")), sMapKey); this.jButtonGuardarCambiosTablaFacturaPuntoVenta.getActionMap().put(sMapKey,new ButtonAbstractAction(this,"GuardarCambiosTablaFacturaPuntoVenta")); //ABRIR ORDER BY if(!this.conCargarMinimo) { } //HOT KEYS this.jPanelParametrosReportesFacturaPuntoVenta = new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true);//new JPanel(); this.jPanelParametrosReportesAccionesFacturaPuntoVenta = new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true);//new JPanel(); this.jPanelPaginacionFacturaPuntoVenta = new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true);//new JPanel(); this.jPanelParametrosAuxiliar1FacturaPuntoVenta= new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true);//new JPanel(); this.jPanelParametrosAuxiliar2FacturaPuntoVenta= new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true);//new JPanel(); this.jPanelParametrosAuxiliar3FacturaPuntoVenta= new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true);//new JPanel(); this.jPanelParametrosAuxiliar4FacturaPuntoVenta= new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true);//new JPanel(); //this.jPanelParametrosAuxiliar5FacturaPuntoVenta= new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true);//new JPanel(); this.jPanelParametrosReportesFacturaPuntoVenta.setBorder(javax.swing.BorderFactory.createTitledBorder("Parametros Reportes-Acciones")); this.jPanelParametrosReportesFacturaPuntoVenta.setName("jPanelParametrosReportesFacturaPuntoVenta"); this.jPanelParametrosReportesAccionesFacturaPuntoVenta.setBorder(javax.swing.BorderFactory.createTitledBorder("Parametros Acciones")); //this.jPanelParametrosReportesAccionesFacturaPuntoVenta.setBorder(javax.swing.BorderFactory.createEtchedBorder(EtchedBorder.LOWERED)); this.jPanelParametrosReportesAccionesFacturaPuntoVenta.setName("jPanelParametrosReportesAccionesFacturaPuntoVenta"); FuncionesSwing.setBoldPanel(this.jPanelParametrosReportesFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,false,this); FuncionesSwing.setBoldPanel(this.jPanelParametrosReportesAccionesFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,false,this); this.jButtonRecargarInformacionFacturaPuntoVenta = new JButtonMe(); this.jButtonRecargarInformacionFacturaPuntoVenta.setText("Recargar"); this.jButtonRecargarInformacionFacturaPuntoVenta.setToolTipText("Recargar"+" "+FacturaPuntoVentaConstantesFunciones.SCLASSWEBTITULO + FuncionesSwing.getKeyMensaje("RECARGAR")); FuncionesSwing.addImagenButtonGeneral(this.jButtonRecargarInformacionFacturaPuntoVenta,"recargar_button","Recargar"); this.jButtonProcesarInformacionFacturaPuntoVenta = new JButtonMe(); this.jButtonProcesarInformacionFacturaPuntoVenta.setText("Procesar"); this.jButtonProcesarInformacionFacturaPuntoVenta.setToolTipText("Procesar"+" "+FacturaPuntoVentaConstantesFunciones.SCLASSWEBTITULO); this.jButtonProcesarInformacionFacturaPuntoVenta.setVisible(false); this.jButtonProcesarInformacionFacturaPuntoVenta.setMinimumSize(new Dimension(185,25)); this.jButtonProcesarInformacionFacturaPuntoVenta.setMaximumSize(new Dimension(185,25)); this.jButtonProcesarInformacionFacturaPuntoVenta.setPreferredSize(new Dimension(185,25)); this.jComboBoxTiposArchivosReportesFacturaPuntoVenta = new JComboBoxMe(); //this.jComboBoxTiposArchivosReportesFacturaPuntoVenta.setText("TIPO"); this.jComboBoxTiposArchivosReportesFacturaPuntoVenta.setToolTipText("Tipos De Archivo"); this.jComboBoxTiposReportesFacturaPuntoVenta = new JComboBoxMe(); //this.jComboBoxTiposArchivosReportesFacturaPuntoVenta.setText("TIPO"); this.jComboBoxTiposReportesFacturaPuntoVenta.setToolTipText("Tipos De Reporte"); this.jComboBoxTiposGraficosReportesFacturaPuntoVenta = new JComboBoxMe(); //this.jComboBoxTiposArchivosReportesFacturaPuntoVenta.setText("TIPO"); this.jComboBoxTiposGraficosReportesFacturaPuntoVenta.setToolTipText("Tipos De Reporte"); this.jComboBoxTiposPaginacionFacturaPuntoVenta = new JComboBoxMe(); //this.jComboBoxTiposPaginacionFacturaPuntoVenta.setText("Paginacion"); this.jComboBoxTiposPaginacionFacturaPuntoVenta.setToolTipText("Tipos De Paginacion"); this.jComboBoxTiposRelacionesFacturaPuntoVenta = new JComboBoxMe(); //this.jComboBoxTiposRelacionesFacturaPuntoVenta.setText("Accion"); this.jComboBoxTiposRelacionesFacturaPuntoVenta.setToolTipText("Tipos de Relaciones"); this.jComboBoxTiposAccionesFacturaPuntoVenta = new JComboBoxMe(); //this.jComboBoxTiposAccionesFacturaPuntoVenta.setText("Accion"); this.jComboBoxTiposAccionesFacturaPuntoVenta.setToolTipText("Tipos de Acciones"); this.jComboBoxTiposSeleccionarFacturaPuntoVenta = new JComboBoxMe(); //this.jComboBoxTiposSeleccionarFacturaPuntoVenta.setText("Accion"); this.jComboBoxTiposSeleccionarFacturaPuntoVenta.setToolTipText("Tipos de Seleccion"); this.jTextFieldValorCampoGeneralFacturaPuntoVenta=new JTextFieldMe(); this.jTextFieldValorCampoGeneralFacturaPuntoVenta.setMinimumSize(new Dimension(100,Constantes.ISWING_ALTO_CONTROL)); this.jTextFieldValorCampoGeneralFacturaPuntoVenta.setMaximumSize(new Dimension(100,Constantes.ISWING_ALTO_CONTROL)); this.jTextFieldValorCampoGeneralFacturaPuntoVenta.setPreferredSize(new Dimension(100,Constantes.ISWING_ALTO_CONTROL)); this.jLabelAccionesFacturaPuntoVenta = new JLabelMe(); this.jLabelAccionesFacturaPuntoVenta.setText("Acciones"); this.jLabelAccionesFacturaPuntoVenta.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelAccionesFacturaPuntoVenta.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelAccionesFacturaPuntoVenta.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jCheckBoxSeleccionarTodosFacturaPuntoVenta = new JCheckBoxMe(); this.jCheckBoxSeleccionarTodosFacturaPuntoVenta.setText("Sel. Todos"); this.jCheckBoxSeleccionarTodosFacturaPuntoVenta.setToolTipText("Sel. Todos"); this.jCheckBoxSeleccionadosFacturaPuntoVenta = new JCheckBoxMe(); //this.jCheckBoxSeleccionadosFacturaPuntoVenta.setText("Seleccionados"); this.jCheckBoxSeleccionadosFacturaPuntoVenta.setToolTipText("SELECCIONAR SELECCIONADOS"); this.jCheckBoxConAltoMaximoTablaFacturaPuntoVenta = new JCheckBoxMe(); //this.jCheckBoxConAltoMaximoTablaFacturaPuntoVenta.setText("Con Maximo Alto Tabla"); this.jCheckBoxConAltoMaximoTablaFacturaPuntoVenta.setToolTipText("Con Maximo Alto Tabla"); this.jCheckBoxConGraficoReporteFacturaPuntoVenta = new JCheckBoxMe(); this.jCheckBoxConGraficoReporteFacturaPuntoVenta.setText("Graf."); this.jCheckBoxConGraficoReporteFacturaPuntoVenta.setToolTipText("Con Grafico"); this.jButtonAnterioresFacturaPuntoVenta = new JButtonMe(); //this.jButtonAnterioresFacturaPuntoVenta.setText("<<"); this.jButtonAnterioresFacturaPuntoVenta.setToolTipText("Anteriores Datos" + FuncionesSwing.getKeyMensaje("ANTERIORES")); FuncionesSwing.addImagenButtonGeneral(this.jButtonAnterioresFacturaPuntoVenta,"anteriores_button","<<"); FuncionesSwing.setBoldButton(this.jButtonAnterioresFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this); this.jButtonSiguientesFacturaPuntoVenta = new JButtonMe(); //this.jButtonSiguientesFacturaPuntoVenta.setText(">>"); this.jButtonSiguientesFacturaPuntoVenta.setToolTipText("Siguientes Datos" + FuncionesSwing.getKeyMensaje("SIGUIENTES")); FuncionesSwing.addImagenButtonGeneral(this.jButtonSiguientesFacturaPuntoVenta,"siguientes_button",">>"); FuncionesSwing.setBoldButton(this.jButtonSiguientesFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this); this.jButtonNuevoGuardarCambiosFacturaPuntoVenta = new JButtonMe(); this.jButtonNuevoGuardarCambiosFacturaPuntoVenta.setText("Nue"); this.jButtonNuevoGuardarCambiosFacturaPuntoVenta.setToolTipText("Nuevo" + FuncionesSwing.getKeyMensaje("NUEVO_TABLA")); FuncionesSwing.addImagenButtonGeneral(this.jButtonNuevoGuardarCambiosFacturaPuntoVenta,"nuevoguardarcambios_button","Nue",this.facturapuntoventaSessionBean.getEsGuardarRelacionado()); FuncionesSwing.setBoldButton(this.jButtonNuevoGuardarCambiosFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this); //HOT KEYS2 /* T->Nuevo Tabla */ //NUEVO GUARDAR CAMBIOS O NUEVO TABLA sMapKey = "NuevoGuardarCambiosFacturaPuntoVenta"; inputMap = this.jButtonNuevoGuardarCambiosFacturaPuntoVenta.getInputMap(FuncionesSwing.getTipoFocusedKeyEvent("NORMAL")); inputMap.put(KeyStroke.getKeyStroke(FuncionesSwing.getKeyEvent("NUEVO_TABLA") , FuncionesSwing.getMaskKey("NUEVO_TABLA")), sMapKey); this.jButtonNuevoGuardarCambiosFacturaPuntoVenta.getActionMap().put(sMapKey,new ButtonAbstractAction(this,"NuevoGuardarCambiosFacturaPuntoVenta")); //RECARGAR sMapKey = "RecargarInformacionFacturaPuntoVenta"; inputMap = this.jButtonRecargarInformacionFacturaPuntoVenta.getInputMap(FuncionesSwing.getTipoFocusedKeyEvent("NORMAL")); inputMap.put(KeyStroke.getKeyStroke(FuncionesSwing.getKeyEvent("RECARGAR") , FuncionesSwing.getMaskKey("RECARGAR")), sMapKey); this.jButtonRecargarInformacionFacturaPuntoVenta.getActionMap().put(sMapKey,new ButtonAbstractAction(this,"RecargarInformacionFacturaPuntoVenta")); //SIGUIENTES sMapKey = "SiguientesFacturaPuntoVenta"; inputMap = this.jButtonSiguientesFacturaPuntoVenta.getInputMap(FuncionesSwing.getTipoFocusedKeyEvent("NORMAL")); inputMap.put(KeyStroke.getKeyStroke(FuncionesSwing.getKeyEvent("SIGUIENTES") , FuncionesSwing.getMaskKey("SIGUIENTES")), sMapKey); this.jButtonSiguientesFacturaPuntoVenta.getActionMap().put(sMapKey,new ButtonAbstractAction(this,"SiguientesFacturaPuntoVenta")); //ANTERIORES sMapKey = "AnterioresFacturaPuntoVenta"; inputMap = this.jButtonAnterioresFacturaPuntoVenta.getInputMap(FuncionesSwing.getTipoFocusedKeyEvent("NORMAL")); inputMap.put(KeyStroke.getKeyStroke(FuncionesSwing.getKeyEvent("ANTERIORES") , FuncionesSwing.getMaskKey("ANTERIORES")), sMapKey); this.jButtonAnterioresFacturaPuntoVenta.getActionMap().put(sMapKey,new ButtonAbstractAction(this,"AnterioresFacturaPuntoVenta")); //HOT KEYS2 //DETALLE //TOOLBAR //INDICES BUSQUEDA //INDICES BUSQUEDA_FIN //INDICES BUSQUEDA if(!this.conCargarMinimo) { this.inicializarElementosBusquedasFacturaPuntoVenta(); } //INDICES BUSQUEDA_FIN //ELEMENTOS TABLAS PARAMETOS if(!this.conCargarMinimo) { } //ELEMENTOS TABLAS PARAMETOS_FIN //ELEMENTOS TABLAS PARAMETOS_FIN //ESTA EN BEAN /* this.jTabbedPaneRelacionesFacturaPuntoVenta.setMinimumSize(new Dimension(this.getWidth(),FacturaPuntoVentaBean.ALTO_TABPANE_RELACIONES + FuncionesSwing.getValorProporcion(FacturaPuntoVentaBean.ALTO_TABPANE_RELACIONES,0))); this.jTabbedPaneRelacionesFacturaPuntoVenta.setMaximumSize(new Dimension(this.getWidth(),FacturaPuntoVentaBean.ALTO_TABPANE_RELACIONES + FuncionesSwing.getValorProporcion(FacturaPuntoVentaBean.ALTO_TABPANE_RELACIONES,0))); this.jTabbedPaneRelacionesFacturaPuntoVenta.setPreferredSize(new Dimension(this.getWidth(),FacturaPuntoVentaBean.ALTO_TABPANE_RELACIONES + FuncionesSwing.getValorProporcion(FacturaPuntoVentaBean.ALTO_TABPANE_RELACIONES,0))); */ int iPosXAccionPaginacion=0; GridBagLayout gridaBagLayoutPaginacionFacturaPuntoVenta = new GridBagLayout(); this.jPanelPaginacionFacturaPuntoVenta.setLayout(gridaBagLayoutPaginacionFacturaPuntoVenta); this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.EAST; this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = 0; this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXAccionPaginacion++; this.jPanelPaginacionFacturaPuntoVenta.add(this.jButtonAnterioresFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints();// this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXAccionPaginacion++;// this.gridBagConstraintsFacturaPuntoVenta.gridy = 0;// this.jPanelPaginacionFacturaPuntoVenta.add(this.jButtonNuevoGuardarCambiosFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta);// this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXAccionPaginacion++; this.gridBagConstraintsFacturaPuntoVenta.gridy = 0; this.jPanelPaginacionFacturaPuntoVenta.add(this.jButtonSiguientesFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); iPosXAccionPaginacion=0; this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints();// this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL;// this.gridBagConstraintsFacturaPuntoVenta.gridy = 1;// this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXAccionPaginacion++;// this.jPanelPaginacionFacturaPuntoVenta.add(this.jButtonNuevoFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta);// if(this.conFuncionalidadRelaciones) { this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = 1; this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXAccionPaginacion++; this.jPanelPaginacionFacturaPuntoVenta.add(this.jButtonNuevoRelacionesFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); } if(!this.facturapuntoventaSessionBean.getEsGuardarRelacionado() && !this.conCargarMinimo) { this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints();// this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL;// this.gridBagConstraintsFacturaPuntoVenta.gridy = 1;// this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXAccionPaginacion++;// this.jPanelPaginacionFacturaPuntoVenta.add(this.jButtonGuardarCambiosTablaFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta);// } this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints();// this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL;// this.gridBagConstraintsFacturaPuntoVenta.gridy = 1;// this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXAccionPaginacion++;// this.jPanelPaginacionFacturaPuntoVenta.add(this.jButtonDuplicarFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta);// this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints();// this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL;// this.gridBagConstraintsFacturaPuntoVenta.gridy = 1;// this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXAccionPaginacion++;// this.jPanelPaginacionFacturaPuntoVenta.add(this.jButtonCopiarFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta);// this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints();// this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL;// this.gridBagConstraintsFacturaPuntoVenta.gridy = 1;// this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXAccionPaginacion++;// this.jPanelPaginacionFacturaPuntoVenta.add(this.jButtonVerFormFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta);// this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = 1; this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXAccionPaginacion++; this.jPanelPaginacionFacturaPuntoVenta.add(this.jButtonCerrarFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); this.jButtonRecargarInformacionFacturaPuntoVenta.setMinimumSize(new Dimension(95,25)); this.jButtonRecargarInformacionFacturaPuntoVenta.setMaximumSize(new Dimension(95,25)); this.jButtonRecargarInformacionFacturaPuntoVenta.setPreferredSize(new Dimension(95,25)); FuncionesSwing.setBoldButton(this.jButtonRecargarInformacionFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this); this.jComboBoxTiposArchivosReportesFacturaPuntoVenta.setMinimumSize(new Dimension(105,20)); this.jComboBoxTiposArchivosReportesFacturaPuntoVenta.setMaximumSize(new Dimension(105,20)); this.jComboBoxTiposArchivosReportesFacturaPuntoVenta.setPreferredSize(new Dimension(105,20)); FuncionesSwing.setBoldComboBox(this.jComboBoxTiposArchivosReportesFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this);; this.jComboBoxTiposReportesFacturaPuntoVenta.setMinimumSize(new Dimension(100,20)); this.jComboBoxTiposReportesFacturaPuntoVenta.setMaximumSize(new Dimension(100,20)); this.jComboBoxTiposReportesFacturaPuntoVenta.setPreferredSize(new Dimension(100,20)); FuncionesSwing.setBoldComboBox(this.jComboBoxTiposReportesFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this);; this.jComboBoxTiposGraficosReportesFacturaPuntoVenta.setMinimumSize(new Dimension(80,20)); this.jComboBoxTiposGraficosReportesFacturaPuntoVenta.setMaximumSize(new Dimension(80,20)); this.jComboBoxTiposGraficosReportesFacturaPuntoVenta.setPreferredSize(new Dimension(80,20)); FuncionesSwing.setBoldComboBox(this.jComboBoxTiposGraficosReportesFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this);; this.jComboBoxTiposPaginacionFacturaPuntoVenta.setMinimumSize(new Dimension(80,20)); this.jComboBoxTiposPaginacionFacturaPuntoVenta.setMaximumSize(new Dimension(80,20)); this.jComboBoxTiposPaginacionFacturaPuntoVenta.setPreferredSize(new Dimension(80,20)); FuncionesSwing.setBoldComboBox(this.jComboBoxTiposPaginacionFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this);; this.jComboBoxTiposRelacionesFacturaPuntoVenta.setMinimumSize(new Dimension(145,20)); this.jComboBoxTiposRelacionesFacturaPuntoVenta.setMaximumSize(new Dimension(145,20)); this.jComboBoxTiposRelacionesFacturaPuntoVenta.setPreferredSize(new Dimension(145,20)); FuncionesSwing.setBoldComboBox(this.jComboBoxTiposRelacionesFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this);; this.jComboBoxTiposAccionesFacturaPuntoVenta.setMinimumSize(new Dimension(145,20)); this.jComboBoxTiposAccionesFacturaPuntoVenta.setMaximumSize(new Dimension(145,20)); this.jComboBoxTiposAccionesFacturaPuntoVenta.setPreferredSize(new Dimension(145,20)); FuncionesSwing.setBoldComboBox(this.jComboBoxTiposAccionesFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this);; this.jComboBoxTiposSeleccionarFacturaPuntoVenta.setMinimumSize(new Dimension(145,20)); this.jComboBoxTiposSeleccionarFacturaPuntoVenta.setMaximumSize(new Dimension(145,20)); this.jComboBoxTiposSeleccionarFacturaPuntoVenta.setPreferredSize(new Dimension(145,20)); FuncionesSwing.setBoldComboBox(this.jComboBoxTiposSeleccionarFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this);; this.jCheckBoxConAltoMaximoTablaFacturaPuntoVenta.setMinimumSize(new Dimension(20,20)); this.jCheckBoxConAltoMaximoTablaFacturaPuntoVenta.setMaximumSize(new Dimension(20,20)); this.jCheckBoxConAltoMaximoTablaFacturaPuntoVenta.setPreferredSize(new Dimension(20,20)); FuncionesSwing.setBoldCheckBox(this.jCheckBoxConAltoMaximoTablaFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this);; this.jCheckBoxConGraficoReporteFacturaPuntoVenta.setMinimumSize(new Dimension(60,20)); this.jCheckBoxConGraficoReporteFacturaPuntoVenta.setMaximumSize(new Dimension(60,20)); this.jCheckBoxConGraficoReporteFacturaPuntoVenta.setPreferredSize(new Dimension(60,20)); FuncionesSwing.setBoldCheckBox(this.jCheckBoxConGraficoReporteFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this); this.jCheckBoxSeleccionarTodosFacturaPuntoVenta.setMinimumSize(new Dimension(100,20)); this.jCheckBoxSeleccionarTodosFacturaPuntoVenta.setMaximumSize(new Dimension(100,20)); this.jCheckBoxSeleccionarTodosFacturaPuntoVenta.setPreferredSize(new Dimension(100,20)); FuncionesSwing.setBoldCheckBox(this.jCheckBoxSeleccionarTodosFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this);; this.jCheckBoxSeleccionadosFacturaPuntoVenta.setMinimumSize(new Dimension(20,20)); this.jCheckBoxSeleccionadosFacturaPuntoVenta.setMaximumSize(new Dimension(20,20)); this.jCheckBoxSeleccionadosFacturaPuntoVenta.setPreferredSize(new Dimension(20,20)); FuncionesSwing.setBoldCheckBox(this.jCheckBoxSeleccionadosFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this);; GridBagLayout gridaBagParametrosReportesFacturaPuntoVenta = new GridBagLayout(); GridBagLayout gridaBagParametrosReportesAccionesFacturaPuntoVenta = new GridBagLayout(); GridBagLayout gridaBagParametrosAuxiliar1FacturaPuntoVenta = new GridBagLayout(); GridBagLayout gridaBagParametrosAuxiliar2FacturaPuntoVenta = new GridBagLayout(); GridBagLayout gridaBagParametrosAuxiliar3FacturaPuntoVenta = new GridBagLayout(); GridBagLayout gridaBagParametrosAuxiliar4FacturaPuntoVenta = new GridBagLayout(); int iGridxParametrosReportes=0; int iGridyParametrosReportes=0; int iGridxParametrosAuxiliar=0; int iGridyParametrosAuxiliar=0; this.jPanelParametrosReportesFacturaPuntoVenta.setLayout(gridaBagParametrosReportesFacturaPuntoVenta); this.jPanelParametrosReportesAccionesFacturaPuntoVenta.setLayout(gridaBagParametrosReportesAccionesFacturaPuntoVenta); this.jPanelParametrosAuxiliar1FacturaPuntoVenta.setLayout(gridaBagParametrosAuxiliar1FacturaPuntoVenta); this.jPanelParametrosAuxiliar2FacturaPuntoVenta.setLayout(gridaBagParametrosAuxiliar2FacturaPuntoVenta); this.jPanelParametrosAuxiliar3FacturaPuntoVenta.setLayout(gridaBagParametrosAuxiliar3FacturaPuntoVenta); this.jPanelParametrosAuxiliar4FacturaPuntoVenta.setLayout(gridaBagParametrosAuxiliar4FacturaPuntoVenta); //this.jPanelParametrosAuxiliar5FacturaPuntoVenta.setLayout(gridaBagParametrosAuxiliar2FacturaPuntoVenta); this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = iGridyParametrosReportes; this.gridBagConstraintsFacturaPuntoVenta.gridx = iGridxParametrosReportes++; this.jPanelParametrosReportesFacturaPuntoVenta.add(this.jButtonRecargarInformacionFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //PAGINACION this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; this.gridBagConstraintsFacturaPuntoVenta.gridy = iGridyParametrosAuxiliar;//iGridyParametrosReportes; this.gridBagConstraintsFacturaPuntoVenta.gridx = iGridxParametrosAuxiliar++;//iGridxParametrosReportes++; //this.jPanelParametrosReportes this.jPanelParametrosAuxiliar1FacturaPuntoVenta.add(this.jComboBoxTiposPaginacionFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //CON ALTO MAXIMO TABLA this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; this.gridBagConstraintsFacturaPuntoVenta.gridy = iGridyParametrosAuxiliar;//iGridyParametrosReportes; this.gridBagConstraintsFacturaPuntoVenta.gridx = iGridxParametrosAuxiliar++;//iGridxParametrosReportes++; //this.jPanelParametrosReportes this.jPanelParametrosAuxiliar1FacturaPuntoVenta.add(this.jCheckBoxConAltoMaximoTablaFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //TIPOS ARCHIVOS REPORTES this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; this.gridBagConstraintsFacturaPuntoVenta.gridy = iGridyParametrosAuxiliar;//iGridyParametrosReportes; this.gridBagConstraintsFacturaPuntoVenta.gridx = iGridxParametrosAuxiliar++;//iGridxParametrosReportes++; //this.jPanelParametrosReportes this.jPanelParametrosAuxiliar1FacturaPuntoVenta.add(this.jComboBoxTiposArchivosReportesFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //USANDO AUXILIAR this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; this.gridBagConstraintsFacturaPuntoVenta.gridy = iGridyParametrosReportes; this.gridBagConstraintsFacturaPuntoVenta.gridx = iGridxParametrosReportes++; //this.jPanelParametrosReportes this.jPanelParametrosReportesFacturaPuntoVenta.add(this.jPanelParametrosAuxiliar1FacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //USANDO AUXILIAR FIN //AUXILIAR4 TIPOS REPORTES Y TIPOS GRAFICOS REPORTES iGridxParametrosAuxiliar=0; iGridyParametrosAuxiliar=0; this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsFacturaPuntoVenta.gridy =iGridxParametrosAuxiliar;//iGridyParametrosReportes; this.gridBagConstraintsFacturaPuntoVenta.gridx =iGridyParametrosAuxiliar++;//iGridxParametrosReportes++; //this.jPanelParametrosReportes this.jPanelParametrosAuxiliar4FacturaPuntoVenta.add(this.jComboBoxTiposReportesFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsFacturaPuntoVenta.gridy =iGridxParametrosAuxiliar;//iGridyParametrosReportes; this.gridBagConstraintsFacturaPuntoVenta.gridx =iGridyParametrosAuxiliar++;//iGridxParametrosReportes++; //this.jPanelParametrosReportes //POR EL MOMENTO SOLO SE UTILIZA EN REPORTES DINAMICOS SIMPLES //this.jPanelParametrosAuxiliar4FacturaPuntoVenta.add(this.jComboBoxTiposGraficosReportesFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //AUXILIAR4 TIPOS REPORTES Y TIPOS GRAFICOS REPORTES //USANDO AUXILIAR 4 this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; this.gridBagConstraintsFacturaPuntoVenta.gridy = iGridyParametrosReportes; this.gridBagConstraintsFacturaPuntoVenta.gridx = iGridxParametrosReportes++; //this.jPanelParametrosReportes this.jPanelParametrosReportesFacturaPuntoVenta.add(this.jPanelParametrosAuxiliar4FacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //USANDO AUXILIAR 4 FIN //TIPOS REPORTES /* this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; this.gridBagConstraintsFacturaPuntoVenta.gridy = iGridyParametrosReportes;//iGridyParametrosReportes; this.gridBagConstraintsFacturaPuntoVenta.gridx = iGridxParametrosReportes++;//iGridxParametrosReportes++; //this.jPanelParametrosReportes this.jPanelParametrosReportesFacturaPuntoVenta.add(this.jComboBoxTiposReportesFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); */ //GENERAR REPORTE (jCheckBoxExportar) /* this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; this.gridBagConstraintsFacturaPuntoVenta.gridy = iGridyParametrosReportes; this.gridBagConstraintsFacturaPuntoVenta.gridx = iGridxParametrosReportes++; this.jPanelParametrosReportesFacturaPuntoVenta.add(this.jCheckBoxGenerarReporteFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); */ iGridxParametrosAuxiliar=0; iGridyParametrosAuxiliar=0; //USANDO AUXILIAR this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; this.gridBagConstraintsFacturaPuntoVenta.gridy = iGridyParametrosReportes; this.gridBagConstraintsFacturaPuntoVenta.gridx = iGridxParametrosReportes++; //this.jPanelParametrosReportes this.jPanelParametrosReportesFacturaPuntoVenta.add(this.jPanelParametrosAuxiliar2FacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //USANDO AUXILIAR FIN //PARAMETROS ACCIONES //iGridxParametrosReportes=1; iGridxParametrosReportes=0; iGridyParametrosReportes=1; /* this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = iGridyParametrosReportes; this.gridBagConstraintsFacturaPuntoVenta.gridx =iGridxParametrosReportes++; this.jPanelParametrosReportesFacturaPuntoVenta.add(this.jLabelAccionesFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); */ //PARAMETROS_ACCIONES-PARAMETROS_REPORTES //ORDER BY if(!this.conCargarMinimo) { this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = iGridyParametrosReportes; this.gridBagConstraintsFacturaPuntoVenta.gridx = iGridxParametrosReportes++; this.jPanelParametrosReportesFacturaPuntoVenta.add(this.jButtonAbrirOrderByFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); } //PARAMETROS_ACCIONES-PARAMETROS_REPORTES this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = iGridyParametrosReportes; this.gridBagConstraintsFacturaPuntoVenta.gridx = iGridxParametrosReportes++; this.jPanelParametrosReportesFacturaPuntoVenta.add(this.jComboBoxTiposSeleccionarFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); /* this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = iGridyParametrosReportes; this.gridBagConstraintsFacturaPuntoVenta.gridx =iGridxParametrosReportes++; this.jPanelParametrosReportesFacturaPuntoVenta.add(this.jCheckBoxSeleccionarTodosFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = iGridyParametrosReportes; this.gridBagConstraintsFacturaPuntoVenta.gridx =iGridxParametrosReportes++; this.jPanelParametrosReportesFacturaPuntoVenta.add(this.jCheckBoxConGraficoReporteFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); */ iGridxParametrosAuxiliar=0; iGridyParametrosAuxiliar=0; this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsFacturaPuntoVenta.gridy =iGridxParametrosAuxiliar;//iGridyParametrosReportes; this.gridBagConstraintsFacturaPuntoVenta.gridx =iGridyParametrosAuxiliar++;//iGridxParametrosReportes++; //this.jPanelParametrosReportes this.jPanelParametrosAuxiliar3FacturaPuntoVenta.add(this.jCheckBoxSeleccionarTodosFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsFacturaPuntoVenta.gridy =iGridxParametrosAuxiliar;//iGridyParametrosReportes; this.gridBagConstraintsFacturaPuntoVenta.gridx =iGridyParametrosAuxiliar++;//iGridxParametrosReportes++; //this.jPanelParametrosReportes this.jPanelParametrosAuxiliar3FacturaPuntoVenta.add(this.jCheckBoxSeleccionadosFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsFacturaPuntoVenta.gridy =iGridxParametrosAuxiliar;//iGridyParametrosReportes; this.gridBagConstraintsFacturaPuntoVenta.gridx =iGridyParametrosAuxiliar++;//iGridxParametrosReportes++; //this.jPanelParametrosReportes this.jPanelParametrosAuxiliar3FacturaPuntoVenta.add(this.jCheckBoxConGraficoReporteFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //USANDO AUXILIAR3 this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; this.gridBagConstraintsFacturaPuntoVenta.gridy = iGridyParametrosReportes; this.gridBagConstraintsFacturaPuntoVenta.gridx = iGridxParametrosReportes++; //this.jPanelParametrosReportes this.jPanelParametrosReportesFacturaPuntoVenta.add(this.jPanelParametrosAuxiliar3FacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //USANDO AUXILIAR3 FIN this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.gridy = iGridyParametrosReportes; this.gridBagConstraintsFacturaPuntoVenta.gridx = iGridxParametrosReportes++; this.jPanelParametrosReportesFacturaPuntoVenta.add(this.jComboBoxTiposRelacionesFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.gridy = iGridyParametrosReportes; this.gridBagConstraintsFacturaPuntoVenta.gridx = iGridxParametrosReportes++; this.jPanelParametrosReportesFacturaPuntoVenta.add(this.jComboBoxTiposAccionesFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.gridy = iGridyParametrosReportes; this.gridBagConstraintsFacturaPuntoVenta.gridx = iGridxParametrosReportes++; this.jPanelParametrosReportesFacturaPuntoVenta.add(this.jTextFieldValorCampoGeneralFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); GridBagLayout gridaBagLayoutCamposFintotalFacturaPuntoVenta= new GridBagLayout(); this.jPanelCamposFintotalFacturaPuntoVenta.setLayout(gridaBagLayoutCamposFintotalFacturaPuntoVenta);; //ELEMENTOS TABLAS PARAMETOS //SUBPANELES POR CAMPO if(!this.conCargarMinimo) { //SUBPANELES EN PANEL CAMPOS } //ELEMENTOS TABLAS PARAMETOS_FIN /* GridBagLayout gridaBagLayoutDatosFacturaPuntoVenta = new GridBagLayout(); this.jScrollPanelDatosFacturaPuntoVenta.setLayout(gridaBagLayoutDatosFacturaPuntoVenta); this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = 0; this.gridBagConstraintsFacturaPuntoVenta.gridx = 0; this.jScrollPanelDatosFacturaPuntoVenta.add(this.jTableDatosFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); */ this.redimensionarTablaDatos(-1); this.jScrollPanelDatosFacturaPuntoVenta.setViewportView(this.jTableDatosFacturaPuntoVenta); this.jTableDatosFacturaPuntoVenta.setFillsViewportHeight(true); this.jTableDatosFacturaPuntoVenta.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); Integer iGridXParametrosAccionesFormulario=0; Integer iGridYParametrosAccionesFormulario=0; GridBagLayout gridaBagLayoutAccionesFacturaPuntoVenta= new GridBagLayout(); this.jPanelAccionesFacturaPuntoVenta.setLayout(gridaBagLayoutAccionesFacturaPuntoVenta); /* this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = 0; this.gridBagConstraintsFacturaPuntoVenta.gridx = 0; this.jPanelAccionesFacturaPuntoVenta.add(this.jButtonNuevoFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); */ int iPosXAccion=0; if(!this.conCargarMinimo) { //BYDAN_BUSQUEDAS GridBagLayout gridaBagLayoutFK_IdAsientoContableFacturaPuntoVenta= new GridBagLayout(); gridaBagLayoutFK_IdAsientoContableFacturaPuntoVenta.rowHeights = new int[] {1}; gridaBagLayoutFK_IdAsientoContableFacturaPuntoVenta.columnWidths = new int[] {1}; gridaBagLayoutFK_IdAsientoContableFacturaPuntoVenta.rowWeights = new double[]{0.0, 0.0, 0.0}; gridaBagLayoutFK_IdAsientoContableFacturaPuntoVenta.columnWeights = new double[]{0.0, 1.0}; jPanelFK_IdAsientoContableFacturaPuntoVenta.setLayout(gridaBagLayoutFK_IdAsientoContableFacturaPuntoVenta); gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; gridBagConstraintsFacturaPuntoVenta.gridy = 0; gridBagConstraintsFacturaPuntoVenta.gridx = 0; jPanelFK_IdAsientoContableFacturaPuntoVenta.add(jLabelid_asiento_contableFK_IdAsientoContableFacturaPuntoVenta, gridBagConstraintsFacturaPuntoVenta); gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; gridBagConstraintsFacturaPuntoVenta.gridy = 0; gridBagConstraintsFacturaPuntoVenta.gridx = 1; jPanelFK_IdAsientoContableFacturaPuntoVenta.add(jComboBoxid_asiento_contableFK_IdAsientoContableFacturaPuntoVenta, gridBagConstraintsFacturaPuntoVenta); gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.EAST; gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.NONE; gridBagConstraintsFacturaPuntoVenta.gridy = 0; gridBagConstraintsFacturaPuntoVenta.gridx = 0; jPanelFK_IdAsientoContableFacturaPuntoVenta.add(this.jButtonBuscarFK_IdAsientoContableid_asiento_contableFacturaPuntoVenta, gridBagConstraintsFacturaPuntoVenta); gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; gridBagConstraintsFacturaPuntoVenta.gridy = 1; gridBagConstraintsFacturaPuntoVenta.gridx =1; jPanelFK_IdAsientoContableFacturaPuntoVenta.add(jButtonFK_IdAsientoContableFacturaPuntoVenta, gridBagConstraintsFacturaPuntoVenta); jTabbedPaneBusquedasFacturaPuntoVenta.addTab("1.-Por Asiento C ", jPanelFK_IdAsientoContableFacturaPuntoVenta); jTabbedPaneBusquedasFacturaPuntoVenta.setMnemonicAt(0, KeyEvent.VK_1); GridBagLayout gridaBagLayoutFK_IdCajaFacturaPuntoVenta= new GridBagLayout(); gridaBagLayoutFK_IdCajaFacturaPuntoVenta.rowHeights = new int[] {1}; gridaBagLayoutFK_IdCajaFacturaPuntoVenta.columnWidths = new int[] {1}; gridaBagLayoutFK_IdCajaFacturaPuntoVenta.rowWeights = new double[]{0.0, 0.0, 0.0}; gridaBagLayoutFK_IdCajaFacturaPuntoVenta.columnWeights = new double[]{0.0, 1.0}; jPanelFK_IdCajaFacturaPuntoVenta.setLayout(gridaBagLayoutFK_IdCajaFacturaPuntoVenta); gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; gridBagConstraintsFacturaPuntoVenta.gridy = 0; gridBagConstraintsFacturaPuntoVenta.gridx = 0; jPanelFK_IdCajaFacturaPuntoVenta.add(jLabelid_cajaFK_IdCajaFacturaPuntoVenta, gridBagConstraintsFacturaPuntoVenta); gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; gridBagConstraintsFacturaPuntoVenta.gridy = 0; gridBagConstraintsFacturaPuntoVenta.gridx = 1; jPanelFK_IdCajaFacturaPuntoVenta.add(jComboBoxid_cajaFK_IdCajaFacturaPuntoVenta, gridBagConstraintsFacturaPuntoVenta); gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; gridBagConstraintsFacturaPuntoVenta.gridy = 1; gridBagConstraintsFacturaPuntoVenta.gridx =1; jPanelFK_IdCajaFacturaPuntoVenta.add(jButtonFK_IdCajaFacturaPuntoVenta, gridBagConstraintsFacturaPuntoVenta); jTabbedPaneBusquedasFacturaPuntoVenta.addTab("2.-Por Caja ", jPanelFK_IdCajaFacturaPuntoVenta); jTabbedPaneBusquedasFacturaPuntoVenta.setMnemonicAt(1, KeyEvent.VK_2); GridBagLayout gridaBagLayoutFK_IdClienteFacturaPuntoVenta= new GridBagLayout(); gridaBagLayoutFK_IdClienteFacturaPuntoVenta.rowHeights = new int[] {1}; gridaBagLayoutFK_IdClienteFacturaPuntoVenta.columnWidths = new int[] {1}; gridaBagLayoutFK_IdClienteFacturaPuntoVenta.rowWeights = new double[]{0.0, 0.0, 0.0}; gridaBagLayoutFK_IdClienteFacturaPuntoVenta.columnWeights = new double[]{0.0, 1.0}; jPanelFK_IdClienteFacturaPuntoVenta.setLayout(gridaBagLayoutFK_IdClienteFacturaPuntoVenta); gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; gridBagConstraintsFacturaPuntoVenta.gridy = 0; gridBagConstraintsFacturaPuntoVenta.gridx = 0; jPanelFK_IdClienteFacturaPuntoVenta.add(jLabelid_clienteFK_IdClienteFacturaPuntoVenta, gridBagConstraintsFacturaPuntoVenta); gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; gridBagConstraintsFacturaPuntoVenta.gridy = 0; gridBagConstraintsFacturaPuntoVenta.gridx = 1; jPanelFK_IdClienteFacturaPuntoVenta.add(jComboBoxid_clienteFK_IdClienteFacturaPuntoVenta, gridBagConstraintsFacturaPuntoVenta); gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.EAST; gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.NONE; gridBagConstraintsFacturaPuntoVenta.gridy = 0; gridBagConstraintsFacturaPuntoVenta.gridx = 0; jPanelFK_IdClienteFacturaPuntoVenta.add(this.jButtonBuscarFK_IdClienteid_clienteFacturaPuntoVenta, gridBagConstraintsFacturaPuntoVenta); gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; gridBagConstraintsFacturaPuntoVenta.gridy = 1; gridBagConstraintsFacturaPuntoVenta.gridx =1; jPanelFK_IdClienteFacturaPuntoVenta.add(jButtonFK_IdClienteFacturaPuntoVenta, gridBagConstraintsFacturaPuntoVenta); jTabbedPaneBusquedasFacturaPuntoVenta.addTab("3.-Por Cliente ", jPanelFK_IdClienteFacturaPuntoVenta); jTabbedPaneBusquedasFacturaPuntoVenta.setMnemonicAt(2, KeyEvent.VK_3); GridBagLayout gridaBagLayoutFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta= new GridBagLayout(); gridaBagLayoutFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta.rowHeights = new int[] {1}; gridaBagLayoutFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta.columnWidths = new int[] {1}; gridaBagLayoutFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta.rowWeights = new double[]{0.0, 0.0, 0.0}; gridaBagLayoutFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta.columnWeights = new double[]{0.0, 1.0}; jPanelFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta.setLayout(gridaBagLayoutFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta); gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; gridBagConstraintsFacturaPuntoVenta.gridy = 0; gridBagConstraintsFacturaPuntoVenta.gridx = 0; jPanelFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta.add(jLabelid_estado_factura_punto_ventaFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta, gridBagConstraintsFacturaPuntoVenta); gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; gridBagConstraintsFacturaPuntoVenta.gridy = 0; gridBagConstraintsFacturaPuntoVenta.gridx = 1; jPanelFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta.add(jComboBoxid_estado_factura_punto_ventaFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta, gridBagConstraintsFacturaPuntoVenta); gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; gridBagConstraintsFacturaPuntoVenta.gridy = 1; gridBagConstraintsFacturaPuntoVenta.gridx =1; jPanelFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta.add(jButtonFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta, gridBagConstraintsFacturaPuntoVenta); jTabbedPaneBusquedasFacturaPuntoVenta.addTab("4.-Por Estado ", jPanelFK_IdEstadoFacturaPuntoVentaFacturaPuntoVenta); jTabbedPaneBusquedasFacturaPuntoVenta.setMnemonicAt(3, KeyEvent.VK_4); GridBagLayout gridaBagLayoutFK_IdFormatoFacturaPuntoVenta= new GridBagLayout(); gridaBagLayoutFK_IdFormatoFacturaPuntoVenta.rowHeights = new int[] {1}; gridaBagLayoutFK_IdFormatoFacturaPuntoVenta.columnWidths = new int[] {1}; gridaBagLayoutFK_IdFormatoFacturaPuntoVenta.rowWeights = new double[]{0.0, 0.0, 0.0}; gridaBagLayoutFK_IdFormatoFacturaPuntoVenta.columnWeights = new double[]{0.0, 1.0}; jPanelFK_IdFormatoFacturaPuntoVenta.setLayout(gridaBagLayoutFK_IdFormatoFacturaPuntoVenta); gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; gridBagConstraintsFacturaPuntoVenta.gridy = 0; gridBagConstraintsFacturaPuntoVenta.gridx = 0; jPanelFK_IdFormatoFacturaPuntoVenta.add(jLabelid_formatoFK_IdFormatoFacturaPuntoVenta, gridBagConstraintsFacturaPuntoVenta); gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; gridBagConstraintsFacturaPuntoVenta.gridy = 0; gridBagConstraintsFacturaPuntoVenta.gridx = 1; jPanelFK_IdFormatoFacturaPuntoVenta.add(jComboBoxid_formatoFK_IdFormatoFacturaPuntoVenta, gridBagConstraintsFacturaPuntoVenta); gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; gridBagConstraintsFacturaPuntoVenta.gridy = 1; gridBagConstraintsFacturaPuntoVenta.gridx =1; jPanelFK_IdFormatoFacturaPuntoVenta.add(jButtonFK_IdFormatoFacturaPuntoVenta, gridBagConstraintsFacturaPuntoVenta); jTabbedPaneBusquedasFacturaPuntoVenta.addTab("5.-Por Formato ", jPanelFK_IdFormatoFacturaPuntoVenta); jTabbedPaneBusquedasFacturaPuntoVenta.setMnemonicAt(4, KeyEvent.VK_5); GridBagLayout gridaBagLayoutFK_IdMesaFacturaPuntoVenta= new GridBagLayout(); gridaBagLayoutFK_IdMesaFacturaPuntoVenta.rowHeights = new int[] {1}; gridaBagLayoutFK_IdMesaFacturaPuntoVenta.columnWidths = new int[] {1}; gridaBagLayoutFK_IdMesaFacturaPuntoVenta.rowWeights = new double[]{0.0, 0.0, 0.0}; gridaBagLayoutFK_IdMesaFacturaPuntoVenta.columnWeights = new double[]{0.0, 1.0}; jPanelFK_IdMesaFacturaPuntoVenta.setLayout(gridaBagLayoutFK_IdMesaFacturaPuntoVenta); gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; gridBagConstraintsFacturaPuntoVenta.gridy = 0; gridBagConstraintsFacturaPuntoVenta.gridx = 0; jPanelFK_IdMesaFacturaPuntoVenta.add(jLabelid_mesaFK_IdMesaFacturaPuntoVenta, gridBagConstraintsFacturaPuntoVenta); gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; gridBagConstraintsFacturaPuntoVenta.gridy = 0; gridBagConstraintsFacturaPuntoVenta.gridx = 1; jPanelFK_IdMesaFacturaPuntoVenta.add(jComboBoxid_mesaFK_IdMesaFacturaPuntoVenta, gridBagConstraintsFacturaPuntoVenta); gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; gridBagConstraintsFacturaPuntoVenta.gridy = 1; gridBagConstraintsFacturaPuntoVenta.gridx =1; jPanelFK_IdMesaFacturaPuntoVenta.add(jButtonFK_IdMesaFacturaPuntoVenta, gridBagConstraintsFacturaPuntoVenta); jTabbedPaneBusquedasFacturaPuntoVenta.addTab("6.-Por Mesa ", jPanelFK_IdMesaFacturaPuntoVenta); jTabbedPaneBusquedasFacturaPuntoVenta.setMnemonicAt(5, KeyEvent.VK_6); GridBagLayout gridaBagLayoutFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta= new GridBagLayout(); gridaBagLayoutFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta.rowHeights = new int[] {1}; gridaBagLayoutFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta.columnWidths = new int[] {1}; gridaBagLayoutFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta.rowWeights = new double[]{0.0, 0.0, 0.0}; gridaBagLayoutFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta.columnWeights = new double[]{0.0, 1.0}; jPanelFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta.setLayout(gridaBagLayoutFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta); gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; gridBagConstraintsFacturaPuntoVenta.gridy = 0; gridBagConstraintsFacturaPuntoVenta.gridx = 0; jPanelFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta.add(jLabelid_tipo_factura_punto_ventaFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta, gridBagConstraintsFacturaPuntoVenta); gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; gridBagConstraintsFacturaPuntoVenta.gridy = 0; gridBagConstraintsFacturaPuntoVenta.gridx = 1; jPanelFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta.add(jComboBoxid_tipo_factura_punto_ventaFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta, gridBagConstraintsFacturaPuntoVenta); gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; gridBagConstraintsFacturaPuntoVenta.gridy = 1; gridBagConstraintsFacturaPuntoVenta.gridx =1; jPanelFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta.add(jButtonFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta, gridBagConstraintsFacturaPuntoVenta); jTabbedPaneBusquedasFacturaPuntoVenta.addTab("7.-Por Tipo ", jPanelFK_IdTipoFacturaPuntoVentaFacturaPuntoVenta); jTabbedPaneBusquedasFacturaPuntoVenta.setMnemonicAt(6, KeyEvent.VK_7); GridBagLayout gridaBagLayoutFK_IdTipoPrecioFacturaPuntoVenta= new GridBagLayout(); gridaBagLayoutFK_IdTipoPrecioFacturaPuntoVenta.rowHeights = new int[] {1}; gridaBagLayoutFK_IdTipoPrecioFacturaPuntoVenta.columnWidths = new int[] {1}; gridaBagLayoutFK_IdTipoPrecioFacturaPuntoVenta.rowWeights = new double[]{0.0, 0.0, 0.0}; gridaBagLayoutFK_IdTipoPrecioFacturaPuntoVenta.columnWeights = new double[]{0.0, 1.0}; jPanelFK_IdTipoPrecioFacturaPuntoVenta.setLayout(gridaBagLayoutFK_IdTipoPrecioFacturaPuntoVenta); gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; gridBagConstraintsFacturaPuntoVenta.gridy = 0; gridBagConstraintsFacturaPuntoVenta.gridx = 0; jPanelFK_IdTipoPrecioFacturaPuntoVenta.add(jLabelid_tipo_precioFK_IdTipoPrecioFacturaPuntoVenta, gridBagConstraintsFacturaPuntoVenta); gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; gridBagConstraintsFacturaPuntoVenta.gridy = 0; gridBagConstraintsFacturaPuntoVenta.gridx = 1; jPanelFK_IdTipoPrecioFacturaPuntoVenta.add(jComboBoxid_tipo_precioFK_IdTipoPrecioFacturaPuntoVenta, gridBagConstraintsFacturaPuntoVenta); gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; gridBagConstraintsFacturaPuntoVenta.gridy = 1; gridBagConstraintsFacturaPuntoVenta.gridx =1; jPanelFK_IdTipoPrecioFacturaPuntoVenta.add(jButtonFK_IdTipoPrecioFacturaPuntoVenta, gridBagConstraintsFacturaPuntoVenta); jTabbedPaneBusquedasFacturaPuntoVenta.addTab("8.-Por Tipo Precio ", jPanelFK_IdTipoPrecioFacturaPuntoVenta); jTabbedPaneBusquedasFacturaPuntoVenta.setMnemonicAt(7, KeyEvent.VK_8); GridBagLayout gridaBagLayoutFK_IdVendedorFacturaPuntoVenta= new GridBagLayout(); gridaBagLayoutFK_IdVendedorFacturaPuntoVenta.rowHeights = new int[] {1}; gridaBagLayoutFK_IdVendedorFacturaPuntoVenta.columnWidths = new int[] {1}; gridaBagLayoutFK_IdVendedorFacturaPuntoVenta.rowWeights = new double[]{0.0, 0.0, 0.0}; gridaBagLayoutFK_IdVendedorFacturaPuntoVenta.columnWeights = new double[]{0.0, 1.0}; jPanelFK_IdVendedorFacturaPuntoVenta.setLayout(gridaBagLayoutFK_IdVendedorFacturaPuntoVenta); gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; gridBagConstraintsFacturaPuntoVenta.gridy = 0; gridBagConstraintsFacturaPuntoVenta.gridx = 0; jPanelFK_IdVendedorFacturaPuntoVenta.add(jLabelid_vendedorFK_IdVendedorFacturaPuntoVenta, gridBagConstraintsFacturaPuntoVenta); gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; gridBagConstraintsFacturaPuntoVenta.gridy = 0; gridBagConstraintsFacturaPuntoVenta.gridx = 1; jPanelFK_IdVendedorFacturaPuntoVenta.add(jComboBoxid_vendedorFK_IdVendedorFacturaPuntoVenta, gridBagConstraintsFacturaPuntoVenta); gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.EAST; gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.NONE; gridBagConstraintsFacturaPuntoVenta.gridy = 0; gridBagConstraintsFacturaPuntoVenta.gridx = 0; jPanelFK_IdVendedorFacturaPuntoVenta.add(this.jButtonBuscarFK_IdVendedorid_vendedorFacturaPuntoVenta, gridBagConstraintsFacturaPuntoVenta); gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; gridBagConstraintsFacturaPuntoVenta.gridy = 1; gridBagConstraintsFacturaPuntoVenta.gridx =1; jPanelFK_IdVendedorFacturaPuntoVenta.add(jButtonFK_IdVendedorFacturaPuntoVenta, gridBagConstraintsFacturaPuntoVenta); jTabbedPaneBusquedasFacturaPuntoVenta.addTab("9.-Por Vendedor ", jPanelFK_IdVendedorFacturaPuntoVenta); jTabbedPaneBusquedasFacturaPuntoVenta.setMnemonicAt(8, KeyEvent.VK_9); } //this.setJProgressBarToJPanel(); GridBagLayout gridaBagLayoutFacturaPuntoVenta = new GridBagLayout(); this.jContentPane.setLayout(gridaBagLayoutFacturaPuntoVenta); if(this.parametroGeneralUsuario.getcon_botones_tool_bar() && !this.facturapuntoventaSessionBean.getEsGuardarRelacionado()) { this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.gridy = iGridyPrincipal++; this.gridBagConstraintsFacturaPuntoVenta.gridx = 0; //this.gridBagConstraintsFacturaPuntoVenta.fill =GridBagConstraints.VERTICAL; this.gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.CENTER;//.CENTER;NORTH this.gridBagConstraintsFacturaPuntoVenta.ipadx = 100; this.jContentPane.add(this.jTtoolBarFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); } //PROCESANDO EN OTRA PANTALLA /* this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.gridy = iGridyPrincipal++; this.gridBagConstraintsFacturaPuntoVenta.gridx = 0; //this.gridBagConstraintsFacturaPuntoVenta.fill =GridBagConstraints.VERTICAL; this.gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.CENTER; this.gridBagConstraintsFacturaPuntoVenta.ipadx = 100; this.jContentPane.add(this.jPanelProgressProcess, this.gridBagConstraintsFacturaPuntoVenta); */ int iGridxBusquedasParametros=0; this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); if(!this.conCargarMinimo) { this.gridBagConstraintsFacturaPuntoVenta.gridy = iGridyPrincipal++; this.gridBagConstraintsFacturaPuntoVenta.gridx = 0; this.gridBagConstraintsFacturaPuntoVenta.fill =GridBagConstraints.BOTH;//GridBagConstraints.VERTICAL; this.gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.NORTHWEST; this.gridBagConstraintsFacturaPuntoVenta.ipadx = 150; if(!this.conCargarMinimo) { this.jContentPane.add(this.jTabbedPaneBusquedasFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); } } //PARAMETROS TABLAS PARAMETROS if(!this.conCargarMinimo) { } //PARAMETROS TABLAS PARAMETROS_FIN //PARAMETROS REPORTES this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.gridy = iGridyPrincipal++; this.gridBagConstraintsFacturaPuntoVenta.gridx = 0; this.jContentPane.add(this.jPanelParametrosReportesFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); /* this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.gridy = iGridyPrincipal++; this.gridBagConstraintsFacturaPuntoVenta.gridx = 0; this.jContentPane.add(this.jPanelParametrosReportesAccionesFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); */ this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.gridy =iGridyPrincipal++; this.gridBagConstraintsFacturaPuntoVenta.gridx =0; this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.BOTH; //this.gridBagConstraintsFacturaPuntoVenta.ipady =150; this.jContentPane.add(this.jScrollPanelDatosFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.gridy = iGridyPrincipal++; this.gridBagConstraintsFacturaPuntoVenta.gridx = 0; this.jContentPane.add(this.jPanelPaginacionFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); iWidthScroll=(screenSize.width-screenSize.width/Constantes.ISWING_RESTOPARTE_DIFERENCIA_ANCHO_RELSCROLL)+(250*2); iHeightScroll=(screenSize.height-screenSize.height/Constantes.ISWING_RESTOPARTE_DIFERENCIA_ALTO_RELSCROLL); //iWidthFormulario=iWidthScroll; //iHeightFormulario=iHeightScroll; if(FacturaPuntoVentaJInternalFrame.CON_DATOS_FRAME) { this.jPanelBusquedasParametrosFacturaPuntoVenta= new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true);//new JPanel(); int iGridyRelaciones=0; GridBagLayout gridaBagLayoutBusquedasParametrosFacturaPuntoVenta = new GridBagLayout(); this.jPanelBusquedasParametrosFacturaPuntoVenta.setLayout(gridaBagLayoutBusquedasParametrosFacturaPuntoVenta); if(this.parametroGeneralUsuario.getcon_botones_tool_bar()) { } this.jScrollPanelDatosGeneralFacturaPuntoVenta= new JScrollPane(jContentPane,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); this.jScrollPanelDatosGeneralFacturaPuntoVenta.setMinimumSize(new Dimension(iWidthScroll,iHeightScroll)); this.jScrollPanelDatosGeneralFacturaPuntoVenta.setMaximumSize(new Dimension(iWidthScroll,iHeightScroll)); this.jScrollPanelDatosGeneralFacturaPuntoVenta.setPreferredSize(new Dimension(iWidthScroll,iHeightScroll)); this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill=GridBagConstraints.NONE; this.gridBagConstraintsFacturaPuntoVenta.anchor = GridBagConstraints.WEST; //if(!this.conCargarMinimo) { //} this.conMaximoRelaciones=true; if(this.parametroGeneralUsuario.getcon_cargar_por_parte()) { } Boolean tieneColumnasOcultas=false; tieneColumnasOcultas=true; if(!Constantes.ISDEVELOPING) { } else { if(tieneColumnasOcultas) { } } } else { //DISENO_DETALLE COMENTAR Y //DISENO_DETALLE(Solo Descomentar Seccion Inferior) //NOTA-DISENO_DETALLE(Si cambia lo de abajo, cambiar lo comentado, Al final no es lo mismo) } //DISENO_DETALLE-(Descomentar) /* this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.gridy = iGridyPrincipal++; this.gridBagConstraintsFacturaPuntoVenta.gridx = 0; this.jContentPane.add(this.jPanelCamposFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.gridy = iGridyPrincipal++; this.gridBagConstraintsFacturaPuntoVenta.gridx = 0; this.jContentPane.add(this.jPanelCamposOcultosFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.gridy =iGridyPrincipal++; this.gridBagConstraintsFacturaPuntoVenta.gridx =0; this.jContentPane.add(this.jPanelAccionesFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); */ //pack(); return this.jScrollPanelDatosGeneralFacturaPuntoVenta;//jContentPane; } /* public void cargarReporteDinamicoFacturaPuntoVenta() throws Exception { int iWidthReporteDinamico=350; int iHeightReporteDinamico=450;//250;400; iHeightReporteDinamico+=180; int iPosXReporteDinamico=0; int iPosYReporteDinamico=0; GridBagLayout gridaBagLayoutReporteDinamicoFacturaPuntoVenta = new GridBagLayout(); //PANEL this.jPanelReporteDinamicoFacturaPuntoVenta = new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true); this.jPanelReporteDinamicoFacturaPuntoVenta.setBorder(javax.swing.BorderFactory.createTitledBorder("Campos")); this.jPanelReporteDinamicoFacturaPuntoVenta.setName("jPanelReporteDinamicoFacturaPuntoVenta"); this.jPanelReporteDinamicoFacturaPuntoVenta.setMinimumSize(new Dimension(iWidthReporteDinamico,iHeightReporteDinamico)); this.jPanelReporteDinamicoFacturaPuntoVenta.setMaximumSize(new Dimension(iWidthReporteDinamico,iHeightReporteDinamico)); this.jPanelReporteDinamicoFacturaPuntoVenta.setPreferredSize(new Dimension(iWidthReporteDinamico,iHeightReporteDinamico)); this.jPanelReporteDinamicoFacturaPuntoVenta.setLayout(gridaBagLayoutReporteDinamicoFacturaPuntoVenta); this.jInternalFrameReporteDinamicoFacturaPuntoVenta= new ReporteDinamicoJInternalFrame(); this.jScrollPanelReporteDinamicoFacturaPuntoVenta = new JScrollPane(); //PANEL_CONTROLES //this.jScrollColumnasSelectReporteFacturaPuntoVenta= new JScrollPane(); //JINTERNAL FRAME this.jInternalFrameReporteDinamicoFacturaPuntoVenta.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE); this.jInternalFrameReporteDinamicoFacturaPuntoVenta.setjInternalFrameParent(this); this.jInternalFrameReporteDinamicoFacturaPuntoVenta.setTitle("REPORTE DINAMICO"); this.jInternalFrameReporteDinamicoFacturaPuntoVenta.setSize(iWidthReporteDinamico+70,iHeightReporteDinamico+100); this.jInternalFrameReporteDinamicoFacturaPuntoVenta.setLocation(xOffset*(openFrameCount + Constantes.INUM_MAX_VENTANAS_DET_X), yOffset*(openFrameCount+Constantes.INUM_MAX_VENTANAS_DET_Y)); this.jInternalFrameReporteDinamicoFacturaPuntoVenta.setResizable(true); this.jInternalFrameReporteDinamicoFacturaPuntoVenta.setClosable(true); this.jInternalFrameReporteDinamicoFacturaPuntoVenta.setMaximizable(true); //SCROLL PANEL //this.jScrollPanelReporteDinamicoFacturaPuntoVenta.setMinimumSize(new Dimension(iWidthReporteDinamico,iHeightReporteDinamico)); //this.jScrollPanelReporteDinamicoFacturaPuntoVenta.setMaximumSize(new Dimension(iWidthReporteDinamico,iHeightReporteDinamico)); //this.jScrollPanelReporteDinamicoFacturaPuntoVenta.setPreferredSize(new Dimension(iWidthReporteDinamico,iHeightReporteDinamico)); //this.jScrollPanelReporteDinamicoFacturaPuntoVenta.setBorder(javax.swing.BorderFactory.createTitledBorder("Datos Factura Punto Ventas")); //CONTROLES-ELEMENTOS //LABEL SELECT COLUMNAS this.jLabelColumnasSelectReporteFacturaPuntoVenta = new JLabelMe(); this.jLabelColumnasSelectReporteFacturaPuntoVenta.setText("Columnas Seleccion"); this.jLabelColumnasSelectReporteFacturaPuntoVenta.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelColumnasSelectReporteFacturaPuntoVenta.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelColumnasSelectReporteFacturaPuntoVenta.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); iPosXReporteDinamico=0; iPosYReporteDinamico=0; this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = iPosYReporteDinamico; this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXReporteDinamico++; this.jPanelReporteDinamicoFacturaPuntoVenta.add(this.jLabelColumnasSelectReporteFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //LISTA SELECT COLUMNAS this.jListColumnasSelectReporteFacturaPuntoVenta = new JList<Reporte>(); this.jListColumnasSelectReporteFacturaPuntoVenta.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); this.jListColumnasSelectReporteFacturaPuntoVenta.setToolTipText("Tipos de Seleccion"); this.jListColumnasSelectReporteFacturaPuntoVenta.setMinimumSize(new Dimension(145,300)); this.jListColumnasSelectReporteFacturaPuntoVenta.setMaximumSize(new Dimension(145,300)); this.jListColumnasSelectReporteFacturaPuntoVenta.setPreferredSize(new Dimension(145,300)); //SCROLL_PANEL_CONTROL this.jScrollColumnasSelectReporteFacturaPuntoVenta=new JScrollPane(this.jListColumnasSelectReporteFacturaPuntoVenta); this.jScrollColumnasSelectReporteFacturaPuntoVenta.setMinimumSize(new Dimension(180,150)); this.jScrollColumnasSelectReporteFacturaPuntoVenta.setMaximumSize(new Dimension(180,150)); this.jScrollColumnasSelectReporteFacturaPuntoVenta.setPreferredSize(new Dimension(180,150)); this.jScrollColumnasSelectReporteFacturaPuntoVenta.setBorder(javax.swing.BorderFactory.createTitledBorder("COLUMNAS")); this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = iPosYReporteDinamico; this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXReporteDinamico++; //this.jPanelReporteDinamicoFacturaPuntoVenta.add(this.jListColumnasSelectReporteFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); this.jPanelReporteDinamicoFacturaPuntoVenta.add(this.jScrollColumnasSelectReporteFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //LABEL SELECT RELACIONES this.jLabelRelacionesSelectReporteFacturaPuntoVenta = new JLabelMe(); this.jLabelRelacionesSelectReporteFacturaPuntoVenta.setText("Relaciones Seleccion"); this.jLabelRelacionesSelectReporteFacturaPuntoVenta.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelRelacionesSelectReporteFacturaPuntoVenta.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelRelacionesSelectReporteFacturaPuntoVenta.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); iPosXReporteDinamico=0; iPosYReporteDinamico++; this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = iPosYReporteDinamico; this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXReporteDinamico++; this.jPanelReporteDinamicoFacturaPuntoVenta.add(this.jLabelRelacionesSelectReporteFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //LABEL SELECT RELACIONES_FIN //LISTA SELECT RELACIONES this.jListRelacionesSelectReporteFacturaPuntoVenta = new JList<Reporte>(); this.jListRelacionesSelectReporteFacturaPuntoVenta.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); this.jListRelacionesSelectReporteFacturaPuntoVenta.setToolTipText("Tipos de Seleccion"); this.jListRelacionesSelectReporteFacturaPuntoVenta.setMinimumSize(new Dimension(145,300)); this.jListRelacionesSelectReporteFacturaPuntoVenta.setMaximumSize(new Dimension(145,300)); this.jListRelacionesSelectReporteFacturaPuntoVenta.setPreferredSize(new Dimension(145,300)); //SCROLL_PANEL_CONTROL this.jScrollRelacionesSelectReporteFacturaPuntoVenta=new JScrollPane(this.jListRelacionesSelectReporteFacturaPuntoVenta); this.jScrollRelacionesSelectReporteFacturaPuntoVenta.setMinimumSize(new Dimension(180,120)); this.jScrollRelacionesSelectReporteFacturaPuntoVenta.setMaximumSize(new Dimension(180,120)); this.jScrollRelacionesSelectReporteFacturaPuntoVenta.setPreferredSize(new Dimension(180,120)); this.jScrollRelacionesSelectReporteFacturaPuntoVenta.setBorder(javax.swing.BorderFactory.createTitledBorder("RELACIONES")); this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = iPosYReporteDinamico; this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXReporteDinamico++; //this.jPanelReporteDinamicoFacturaPuntoVenta.add(this.jListRelacionesSelectReporteFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); this.jPanelReporteDinamicoFacturaPuntoVenta.add(this.jScrollRelacionesSelectReporteFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //LISTA SELECT RELACIONES_FIN this.jCheckBoxConGraficoDinamicoFacturaPuntoVenta = new JCheckBoxMe(); this.jComboBoxColumnaCategoriaGraficoFacturaPuntoVenta = new JComboBoxMe(); this.jListColumnasValoresGraficoFacturaPuntoVenta = new JList<Reporte>(); //COMBO TIPOS REPORTES this.jComboBoxTiposReportesDinamicoFacturaPuntoVenta = new JComboBoxMe(); this.jComboBoxTiposReportesDinamicoFacturaPuntoVenta.setToolTipText("Tipos De Reporte"); this.jComboBoxTiposReportesDinamicoFacturaPuntoVenta.setMinimumSize(new Dimension(100,20)); this.jComboBoxTiposReportesDinamicoFacturaPuntoVenta.setMaximumSize(new Dimension(100,20)); this.jComboBoxTiposReportesDinamicoFacturaPuntoVenta.setPreferredSize(new Dimension(100,20)); FuncionesSwing.setBoldComboBox(this.jComboBoxTiposReportesDinamicoFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this);; //COMBO TIPOS REPORTES //COMBO TIPOS ARCHIVOS this.jComboBoxTiposArchivosReportesDinamicoFacturaPuntoVenta = new JComboBoxMe(); this.jComboBoxTiposArchivosReportesDinamicoFacturaPuntoVenta.setToolTipText("Tipos Archivos"); this.jComboBoxTiposArchivosReportesDinamicoFacturaPuntoVenta.setMinimumSize(new Dimension(100,20)); this.jComboBoxTiposArchivosReportesDinamicoFacturaPuntoVenta.setMaximumSize(new Dimension(100,20)); this.jComboBoxTiposArchivosReportesDinamicoFacturaPuntoVenta.setPreferredSize(new Dimension(100,20)); FuncionesSwing.setBoldComboBox(this.jComboBoxTiposArchivosReportesDinamicoFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this);; //COMBO TIPOS ARCHIVOS //LABEL CON GRAFICO DINAMICO this.jLabelConGraficoDinamicoFacturaPuntoVenta = new JLabelMe(); this.jLabelConGraficoDinamicoFacturaPuntoVenta.setText("Con Grafico"); this.jLabelConGraficoDinamicoFacturaPuntoVenta.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelConGraficoDinamicoFacturaPuntoVenta.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelConGraficoDinamicoFacturaPuntoVenta.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); iPosXReporteDinamico=0; iPosYReporteDinamico++; this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = iPosYReporteDinamico; this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXReporteDinamico++; this.jPanelReporteDinamicoFacturaPuntoVenta.add(this.jLabelConGraficoDinamicoFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //CHECKBOX CON GRAFICO DINAMICO this.jCheckBoxConGraficoDinamicoFacturaPuntoVenta = new JCheckBoxMe(); this.jCheckBoxConGraficoDinamicoFacturaPuntoVenta.setText("Graf."); this.jCheckBoxConGraficoDinamicoFacturaPuntoVenta.setToolTipText("Con Grafico"); this.jCheckBoxConGraficoDinamicoFacturaPuntoVenta.setMinimumSize(new Dimension(100,20)); this.jCheckBoxConGraficoDinamicoFacturaPuntoVenta.setMaximumSize(new Dimension(100,20)); this.jCheckBoxConGraficoDinamicoFacturaPuntoVenta.setPreferredSize(new Dimension(100,20)); this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = iPosYReporteDinamico; this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXReporteDinamico++; this.jPanelReporteDinamicoFacturaPuntoVenta.add(this.jCheckBoxConGraficoDinamicoFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //LABEL COMBO COLUMNA CATEGORIA this.jLabelColumnaCategoriaGraficoFacturaPuntoVenta = new JLabelMe(); this.jLabelColumnaCategoriaGraficoFacturaPuntoVenta.setText("Categoria Grafico"); this.jLabelColumnaCategoriaGraficoFacturaPuntoVenta.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelColumnaCategoriaGraficoFacturaPuntoVenta.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelColumnaCategoriaGraficoFacturaPuntoVenta.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); iPosXReporteDinamico=0; iPosYReporteDinamico++; this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = iPosYReporteDinamico; this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXReporteDinamico++; this.jPanelReporteDinamicoFacturaPuntoVenta.add(this.jLabelColumnaCategoriaGraficoFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //COMBO COLUMNA CATEGORIA this.jComboBoxColumnaCategoriaGraficoFacturaPuntoVenta = new JComboBoxMe(); //this.jComboBoxColumnaCategoriaGraficoFacturaPuntoVenta.setText("Accion"); this.jComboBoxColumnaCategoriaGraficoFacturaPuntoVenta.setToolTipText("Tipos de Seleccion"); this.jComboBoxColumnaCategoriaGraficoFacturaPuntoVenta.setMinimumSize(new Dimension(145,20)); this.jComboBoxColumnaCategoriaGraficoFacturaPuntoVenta.setMaximumSize(new Dimension(145,20)); this.jComboBoxColumnaCategoriaGraficoFacturaPuntoVenta.setPreferredSize(new Dimension(145,20)); this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = iPosYReporteDinamico; this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXReporteDinamico++; this.jPanelReporteDinamicoFacturaPuntoVenta.add(this.jComboBoxColumnaCategoriaGraficoFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //LABEL COMBO COLUMNA CATEGORIA VALOR this.jLabelColumnaCategoriaValorFacturaPuntoVenta = new JLabelMe(); this.jLabelColumnaCategoriaValorFacturaPuntoVenta.setText("Categoria Valor"); this.jLabelColumnaCategoriaValorFacturaPuntoVenta.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelColumnaCategoriaValorFacturaPuntoVenta.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelColumnaCategoriaValorFacturaPuntoVenta.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); iPosXReporteDinamico=0; iPosYReporteDinamico++; this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = iPosYReporteDinamico; this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXReporteDinamico++; this.jPanelReporteDinamicoFacturaPuntoVenta.add(this.jLabelColumnaCategoriaValorFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //COMBO COLUMNA CATEGORIA VALOR this.jComboBoxColumnaCategoriaValorFacturaPuntoVenta = new JComboBoxMe(); //this.jComboBoxColumnaCategoriaValorFacturaPuntoVenta.setText("Accion"); this.jComboBoxColumnaCategoriaValorFacturaPuntoVenta.setToolTipText("Tipos de Seleccion"); this.jComboBoxColumnaCategoriaValorFacturaPuntoVenta.setMinimumSize(new Dimension(145,20)); this.jComboBoxColumnaCategoriaValorFacturaPuntoVenta.setMaximumSize(new Dimension(145,20)); this.jComboBoxColumnaCategoriaValorFacturaPuntoVenta.setPreferredSize(new Dimension(145,20)); this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = iPosYReporteDinamico; this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXReporteDinamico++; this.jPanelReporteDinamicoFacturaPuntoVenta.add(this.jComboBoxColumnaCategoriaValorFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //LABEL VALORES GRAFICO COLUMNAS this.jLabelColumnasValoresGraficoFacturaPuntoVenta = new JLabelMe(); this.jLabelColumnasValoresGraficoFacturaPuntoVenta.setText("Columnas Valor Graf."); this.jLabelColumnasValoresGraficoFacturaPuntoVenta.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelColumnasValoresGraficoFacturaPuntoVenta.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelColumnasValoresGraficoFacturaPuntoVenta.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); iPosXReporteDinamico=0; iPosYReporteDinamico++; this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = iPosYReporteDinamico; this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXReporteDinamico++; this.jPanelReporteDinamicoFacturaPuntoVenta.add(this.jLabelColumnasValoresGraficoFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //LISTA VALORES GRAFICO COLUMNAS this.jListColumnasValoresGraficoFacturaPuntoVenta = new JList<Reporte>(); this.jListColumnasValoresGraficoFacturaPuntoVenta.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); this.jListColumnasValoresGraficoFacturaPuntoVenta.setToolTipText("VALORES GRAFICO"); this.jListColumnasValoresGraficoFacturaPuntoVenta.setMinimumSize(new Dimension(145,300)); this.jListColumnasValoresGraficoFacturaPuntoVenta.setMaximumSize(new Dimension(145,300)); this.jListColumnasValoresGraficoFacturaPuntoVenta.setPreferredSize(new Dimension(145,300)); //SCROLL_VALORES GRAFICO COLUMNAS this.jScrollColumnasValoresGraficoFacturaPuntoVenta=new JScrollPane(this.jListColumnasValoresGraficoFacturaPuntoVenta); this.jScrollColumnasValoresGraficoFacturaPuntoVenta.setMinimumSize(new Dimension(180,150)); this.jScrollColumnasValoresGraficoFacturaPuntoVenta.setMaximumSize(new Dimension(180,150)); this.jScrollColumnasValoresGraficoFacturaPuntoVenta.setPreferredSize(new Dimension(180,150)); this.jScrollColumnasValoresGraficoFacturaPuntoVenta.setBorder(javax.swing.BorderFactory.createTitledBorder("COLUMNAS")); this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = iPosYReporteDinamico; this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXReporteDinamico++; //this.jPanelReporteDinamicoFacturaPuntoVenta.add(this.jListColumnasSelectReporteFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); this.jPanelReporteDinamicoFacturaPuntoVenta.add(this.jScrollColumnasValoresGraficoFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //LABEL TIPOS GRAFICO REPORTES this.jLabelTiposGraficosReportesDinamicoFacturaPuntoVenta = new JLabelMe(); this.jLabelTiposGraficosReportesDinamicoFacturaPuntoVenta.setText("Tipo Grafico"); this.jLabelTiposGraficosReportesDinamicoFacturaPuntoVenta.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelTiposGraficosReportesDinamicoFacturaPuntoVenta.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelTiposGraficosReportesDinamicoFacturaPuntoVenta.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); iPosXReporteDinamico=0; iPosYReporteDinamico++; this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = iPosYReporteDinamico; this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXReporteDinamico++; this.jPanelReporteDinamicoFacturaPuntoVenta.add(this.jLabelTiposGraficosReportesDinamicoFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //COMBO TIPO GRAFICO REPORTE this.jComboBoxTiposGraficosReportesDinamicoFacturaPuntoVenta = new JComboBoxMe(); //this.jComboBoxColumnaCategoriaGraficoFacturaPuntoVenta.setText("Accion"); this.jComboBoxTiposGraficosReportesDinamicoFacturaPuntoVenta.setToolTipText("Tipos de Seleccion"); this.jComboBoxTiposGraficosReportesDinamicoFacturaPuntoVenta.setMinimumSize(new Dimension(145,20)); this.jComboBoxTiposGraficosReportesDinamicoFacturaPuntoVenta.setMaximumSize(new Dimension(145,20)); this.jComboBoxTiposGraficosReportesDinamicoFacturaPuntoVenta.setPreferredSize(new Dimension(145,20)); this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = iPosYReporteDinamico; this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXReporteDinamico++; this.jPanelReporteDinamicoFacturaPuntoVenta.add(this.jComboBoxTiposGraficosReportesDinamicoFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //LABEL GENERAR EXCEL this.jLabelGenerarExcelReporteDinamicoFacturaPuntoVenta = new JLabelMe(); this.jLabelGenerarExcelReporteDinamicoFacturaPuntoVenta.setText("Tipos de Reporte"); this.jLabelGenerarExcelReporteDinamicoFacturaPuntoVenta.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelGenerarExcelReporteDinamicoFacturaPuntoVenta.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelGenerarExcelReporteDinamicoFacturaPuntoVenta.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); iPosXReporteDinamico=0; iPosYReporteDinamico++; this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = iPosYReporteDinamico; this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXReporteDinamico++; this.jPanelReporteDinamicoFacturaPuntoVenta.add(this.jLabelGenerarExcelReporteDinamicoFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //BOTON GENERAR EXCEL this.jButtonGenerarExcelReporteDinamicoFacturaPuntoVenta = new JButtonMe(); this.jButtonGenerarExcelReporteDinamicoFacturaPuntoVenta.setText("Generar Excel"); FuncionesSwing.addImagenButtonGeneral(this.jButtonGenerarExcelReporteDinamicoFacturaPuntoVenta,"generar_excel_reporte_dinamico_button","Generar EXCEL"); this.jButtonGenerarExcelReporteDinamicoFacturaPuntoVenta.setToolTipText("Generar EXCEL"+" "+FacturaPuntoVentaConstantesFunciones.SCLASSWEBTITULO); //this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); //this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; //this.gridBagConstraintsFacturaPuntoVenta.gridy = iPosYReporteDinamico; //this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXReporteDinamico++; //this.jPanelReporteDinamicoFacturaPuntoVenta.add(this.jButtonGenerarExcelReporteDinamicoFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //COMBO TIPOS REPORTES this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = iPosYReporteDinamico; this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXReporteDinamico++; this.jPanelReporteDinamicoFacturaPuntoVenta.add(this.jComboBoxTiposReportesDinamicoFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //LABEL TIPOS DE ARCHIVO this.jLabelTiposArchivoReporteDinamicoFacturaPuntoVenta = new JLabelMe(); this.jLabelTiposArchivoReporteDinamicoFacturaPuntoVenta.setText("Tipos de Archivo"); this.jLabelTiposArchivoReporteDinamicoFacturaPuntoVenta.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelTiposArchivoReporteDinamicoFacturaPuntoVenta.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelTiposArchivoReporteDinamicoFacturaPuntoVenta.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); iPosXReporteDinamico=0; iPosYReporteDinamico++; this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = iPosYReporteDinamico; this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXReporteDinamico++; this.jPanelReporteDinamicoFacturaPuntoVenta.add(this.jLabelTiposArchivoReporteDinamicoFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //COMBO TIPOS ARCHIVOS this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = iPosYReporteDinamico; this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXReporteDinamico++; this.jPanelReporteDinamicoFacturaPuntoVenta.add(this.jComboBoxTiposArchivosReportesDinamicoFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //BOTON GENERAR this.jButtonGenerarReporteDinamicoFacturaPuntoVenta = new JButtonMe(); this.jButtonGenerarReporteDinamicoFacturaPuntoVenta.setText("Generar"); FuncionesSwing.addImagenButtonGeneral(this.jButtonGenerarReporteDinamicoFacturaPuntoVenta,"generar_reporte_dinamico_button","Generar"); this.jButtonGenerarReporteDinamicoFacturaPuntoVenta.setToolTipText("Generar"+" "+FacturaPuntoVentaConstantesFunciones.SCLASSWEBTITULO); iPosXReporteDinamico=0; iPosYReporteDinamico++; this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = iPosYReporteDinamico; this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXReporteDinamico++; this.jPanelReporteDinamicoFacturaPuntoVenta.add(this.jButtonGenerarReporteDinamicoFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //BOTON CERRAR this.jButtonCerrarReporteDinamicoFacturaPuntoVenta = new JButtonMe(); this.jButtonCerrarReporteDinamicoFacturaPuntoVenta.setText("Cancelar"); FuncionesSwing.addImagenButtonGeneral(this.jButtonCerrarReporteDinamicoFacturaPuntoVenta,"cerrar_reporte_dinamico_button","Cancelar"); this.jButtonCerrarReporteDinamicoFacturaPuntoVenta.setToolTipText("Cancelar"+" "+FacturaPuntoVentaConstantesFunciones.SCLASSWEBTITULO); this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = iPosYReporteDinamico; this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXReporteDinamico++; this.jPanelReporteDinamicoFacturaPuntoVenta.add(this.jButtonCerrarReporteDinamicoFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //GLOBAL AGREGAR PANELES GridBagLayout gridaBagLayoutReporteDinamicoPrincipalFacturaPuntoVenta = new GridBagLayout(); this.jScrollPanelReporteDinamicoFacturaPuntoVenta= new JScrollPane(jPanelReporteDinamicoFacturaPuntoVenta,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); this.jScrollPanelReporteDinamicoFacturaPuntoVenta.setMinimumSize(new Dimension(iWidthReporteDinamico+90,iHeightReporteDinamico+90)); this.jScrollPanelReporteDinamicoFacturaPuntoVenta.setMaximumSize(new Dimension(iWidthReporteDinamico+90,iHeightReporteDinamico+90)); this.jScrollPanelReporteDinamicoFacturaPuntoVenta.setPreferredSize(new Dimension(iWidthReporteDinamico+90,iHeightReporteDinamico+90)); this.jScrollPanelReporteDinamicoFacturaPuntoVenta.setBorder(javax.swing.BorderFactory.createTitledBorder("Datos Factura Punto Ventas")); iPosXReporteDinamico=0; iPosYReporteDinamico=0; this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.gridy =iPosYReporteDinamico; this.gridBagConstraintsFacturaPuntoVenta.gridx =iPosXReporteDinamico; this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.BOTH; this.jInternalFrameReporteDinamicoFacturaPuntoVenta.setContentPane(new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true)); this.jInternalFrameReporteDinamicoFacturaPuntoVenta.getContentPane().setLayout(gridaBagLayoutReporteDinamicoPrincipalFacturaPuntoVenta); this.jInternalFrameReporteDinamicoFacturaPuntoVenta.getContentPane().add(this.jScrollPanelReporteDinamicoFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); } */ /* public void cargarImportacionFacturaPuntoVenta() throws Exception { int iWidthImportacion=350; int iHeightImportacion=250;//400; int iPosXImportacion=0; int iPosYImportacion=0; GridBagLayout gridaBagLayoutImportacionFacturaPuntoVenta = new GridBagLayout(); //PANEL this.jPanelImportacionFacturaPuntoVenta = new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true); this.jPanelImportacionFacturaPuntoVenta.setBorder(javax.swing.BorderFactory.createTitledBorder("Campos")); this.jPanelImportacionFacturaPuntoVenta.setName("jPanelImportacionFacturaPuntoVenta"); this.jPanelImportacionFacturaPuntoVenta.setMinimumSize(new Dimension(iWidthImportacion,iHeightImportacion)); this.jPanelImportacionFacturaPuntoVenta.setMaximumSize(new Dimension(iWidthImportacion,iHeightImportacion)); this.jPanelImportacionFacturaPuntoVenta.setPreferredSize(new Dimension(iWidthImportacion,iHeightImportacion)); this.jPanelImportacionFacturaPuntoVenta.setLayout(gridaBagLayoutImportacionFacturaPuntoVenta); this.jInternalFrameImportacionFacturaPuntoVenta= new ImportacionJInternalFrame(); //this.jInternalFrameImportacionFacturaPuntoVenta= new ImportacionJInternalFrame(); this.jScrollPanelImportacionFacturaPuntoVenta = new JScrollPane(); //PANEL_CONTROLES //this.jScrollColumnasSelectReporteFacturaPuntoVenta= new JScrollPane(); //JINTERNAL FRAME this.jInternalFrameImportacionFacturaPuntoVenta.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE); this.jInternalFrameImportacionFacturaPuntoVenta.setjInternalFrameParent(this); this.jInternalFrameImportacionFacturaPuntoVenta.setTitle("REPORTE DINAMICO"); this.jInternalFrameImportacionFacturaPuntoVenta.setSize(iWidthImportacion+70,iHeightImportacion+100); this.jInternalFrameImportacionFacturaPuntoVenta.setLocation(xOffset*(openFrameCount + Constantes.INUM_MAX_VENTANAS_DET_X), yOffset*(openFrameCount+Constantes.INUM_MAX_VENTANAS_DET_Y)); this.jInternalFrameImportacionFacturaPuntoVenta.setResizable(true); this.jInternalFrameImportacionFacturaPuntoVenta.setClosable(true); this.jInternalFrameImportacionFacturaPuntoVenta.setMaximizable(true); //JINTERNAL FRAME IMPORTACION this.jInternalFrameImportacionFacturaPuntoVenta.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE); this.jInternalFrameImportacionFacturaPuntoVenta.setjInternalFrameParent(this); this.jInternalFrameImportacionFacturaPuntoVenta.setTitle("IMPORTACION"); this.jInternalFrameImportacionFacturaPuntoVenta.setSize(iWidthImportacion+70,iHeightImportacion+100); this.jInternalFrameImportacionFacturaPuntoVenta.setLocation(xOffset*(openFrameCount + Constantes.INUM_MAX_VENTANAS_DET_X), yOffset*(openFrameCount+Constantes.INUM_MAX_VENTANAS_DET_Y)); this.jInternalFrameImportacionFacturaPuntoVenta.setResizable(true); this.jInternalFrameImportacionFacturaPuntoVenta.setClosable(true); this.jInternalFrameImportacionFacturaPuntoVenta.setMaximizable(true); //SCROLL PANEL this.jScrollPanelImportacionFacturaPuntoVenta.setMinimumSize(new Dimension(iWidthImportacion,iHeightImportacion)); this.jScrollPanelImportacionFacturaPuntoVenta.setMaximumSize(new Dimension(iWidthImportacion,iHeightImportacion)); this.jScrollPanelImportacionFacturaPuntoVenta.setPreferredSize(new Dimension(iWidthImportacion,iHeightImportacion)); this.jScrollPanelImportacionFacturaPuntoVenta.setBorder(javax.swing.BorderFactory.createTitledBorder("Datos Factura Punto Ventas")); //LABEL ARCHIVO IMPORTACION this.jLabelArchivoImportacionFacturaPuntoVenta = new JLabelMe(); this.jLabelArchivoImportacionFacturaPuntoVenta.setText("ARCHIVO IMPORTACION"); this.jLabelArchivoImportacionFacturaPuntoVenta.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelArchivoImportacionFacturaPuntoVenta.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelArchivoImportacionFacturaPuntoVenta.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); iPosXImportacion=0; iPosYImportacion++; this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = iPosYImportacion; this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXImportacion++; this.jPanelImportacionFacturaPuntoVenta.add(this.jLabelArchivoImportacionFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //BOTON ABRIR IMPORTACION this.jFileChooserImportacionFacturaPuntoVenta = new JFileChooser(); this.jFileChooserImportacionFacturaPuntoVenta.setToolTipText("ESCOGER ARCHIVO"+" "+FacturaPuntoVentaConstantesFunciones.SCLASSWEBTITULO); this.jButtonAbrirImportacionFacturaPuntoVenta = new JButtonMe(); this.jButtonAbrirImportacionFacturaPuntoVenta.setText("ESCOGER"); FuncionesSwing.addImagenButtonGeneral(this.jButtonAbrirImportacionFacturaPuntoVenta,"generar_importacion_button","ESCOGER"); this.jButtonAbrirImportacionFacturaPuntoVenta.setToolTipText("Generar"+" "+FacturaPuntoVentaConstantesFunciones.SCLASSWEBTITULO); this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = iPosYImportacion; this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXImportacion++; this.jPanelImportacionFacturaPuntoVenta.add(this.jButtonAbrirImportacionFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //LABEL PATH IMPORTACION this.jLabelPathArchivoImportacionFacturaPuntoVenta = new JLabelMe(); this.jLabelPathArchivoImportacionFacturaPuntoVenta.setText("PATH ARCHIVO"); this.jLabelPathArchivoImportacionFacturaPuntoVenta.setMinimumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelPathArchivoImportacionFacturaPuntoVenta.setMaximumSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); this.jLabelPathArchivoImportacionFacturaPuntoVenta.setPreferredSize(new Dimension(Constantes.ISWING_ANCHO_CONTROL,Constantes.ISWING_ALTO_CONTROL)); iPosXImportacion=0; iPosYImportacion++; this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.HORIZONTAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = iPosYImportacion; this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXImportacion++; this.jPanelImportacionFacturaPuntoVenta.add(this.jLabelPathArchivoImportacionFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //PATH IMPORTACION this.jTextFieldPathArchivoImportacionFacturaPuntoVenta=new JTextFieldMe(); this.jTextFieldPathArchivoImportacionFacturaPuntoVenta.setMinimumSize(new Dimension(150,Constantes.ISWING_ALTO_CONTROL)); this.jTextFieldPathArchivoImportacionFacturaPuntoVenta.setMaximumSize(new Dimension(150,Constantes.ISWING_ALTO_CONTROL)); this.jTextFieldPathArchivoImportacionFacturaPuntoVenta.setPreferredSize(new Dimension(150,Constantes.ISWING_ALTO_CONTROL)); this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = iPosYImportacion; this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXImportacion++; this.jPanelImportacionFacturaPuntoVenta.add(this.jTextFieldPathArchivoImportacionFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //BOTON IMPORTACION this.jButtonGenerarImportacionFacturaPuntoVenta = new JButtonMe(); this.jButtonGenerarImportacionFacturaPuntoVenta.setText("IMPORTAR"); FuncionesSwing.addImagenButtonGeneral(this.jButtonGenerarImportacionFacturaPuntoVenta,"generar_importacion_button","IMPORTAR"); this.jButtonGenerarImportacionFacturaPuntoVenta.setToolTipText("Generar"+" "+FacturaPuntoVentaConstantesFunciones.SCLASSWEBTITULO); iPosXImportacion=0; iPosYImportacion++; this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = iPosYImportacion; this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXImportacion++; this.jPanelImportacionFacturaPuntoVenta.add(this.jButtonGenerarImportacionFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //BOTON CERRAR this.jButtonCerrarImportacionFacturaPuntoVenta = new JButtonMe(); this.jButtonCerrarImportacionFacturaPuntoVenta.setText("Cancelar"); FuncionesSwing.addImagenButtonGeneral(this.jButtonCerrarImportacionFacturaPuntoVenta,"cerrar_reporte_dinamico_button","Cancelar"); this.jButtonCerrarImportacionFacturaPuntoVenta.setToolTipText("Cancelar"+" "+FacturaPuntoVentaConstantesFunciones.SCLASSWEBTITULO); this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = iPosYImportacion; this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXImportacion++; this.jPanelImportacionFacturaPuntoVenta.add(this.jButtonCerrarImportacionFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //GLOBAL AGREGAR PANELES GridBagLayout gridaBagLayoutImportacionPrincipalFacturaPuntoVenta = new GridBagLayout(); this.jScrollPanelImportacionFacturaPuntoVenta= new JScrollPane(jPanelImportacionFacturaPuntoVenta,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); iPosXImportacion=0; iPosYImportacion=0; this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.gridy =iPosYImportacion; this.gridBagConstraintsFacturaPuntoVenta.gridx =iPosXImportacion; this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.BOTH; this.jInternalFrameImportacionFacturaPuntoVenta.setContentPane(new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true)); this.jInternalFrameImportacionFacturaPuntoVenta.getContentPane().setLayout(gridaBagLayoutImportacionPrincipalFacturaPuntoVenta); this.jInternalFrameImportacionFacturaPuntoVenta.getContentPane().add(this.jScrollPanelImportacionFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); } */ /* public void cargarOrderByFacturaPuntoVenta(Boolean cargaMinima) throws Exception { String sMapKey = ""; InputMap inputMap =null; int iWidthOrderBy=350; int iHeightOrderBy=300;//400; int iPosXOrderBy=0; int iPosYOrderBy=0; if(!cargaMinima) { this.jButtonAbrirOrderByFacturaPuntoVenta = new JButtonMe(); this.jButtonAbrirOrderByFacturaPuntoVenta.setText("Orden"); this.jButtonAbrirOrderByFacturaPuntoVenta.setToolTipText("Orden"+FuncionesSwing.getKeyMensaje("ORDEN")); FuncionesSwing.addImagenButtonGeneral(this.jButtonAbrirOrderByFacturaPuntoVenta,"orden_button","Orden"); FuncionesSwing.setBoldButton(this.jButtonAbrirOrderByFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this);; sMapKey = "AbrirOrderByFacturaPuntoVenta"; inputMap = this.jButtonAbrirOrderByFacturaPuntoVenta.getInputMap(FuncionesSwing.getTipoFocusedKeyEvent("NORMAL")); inputMap.put(KeyStroke.getKeyStroke(FuncionesSwing.getKeyEvent("ORDEN") , FuncionesSwing.getMaskKey("ORDEN")), sMapKey); this.jButtonAbrirOrderByFacturaPuntoVenta.getActionMap().put(sMapKey,new ButtonAbstractAction(this,"AbrirOrderByFacturaPuntoVenta")); GridBagLayout gridaBagLayoutOrderByFacturaPuntoVenta = new GridBagLayout(); //PANEL this.jPanelOrderByFacturaPuntoVenta = new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true); this.jPanelOrderByFacturaPuntoVenta.setBorder(javax.swing.BorderFactory.createTitledBorder("Campos")); this.jPanelOrderByFacturaPuntoVenta.setName("jPanelOrderByFacturaPuntoVenta"); this.jPanelOrderByFacturaPuntoVenta.setMinimumSize(new Dimension(iWidthOrderBy,iHeightOrderBy)); this.jPanelOrderByFacturaPuntoVenta.setMaximumSize(new Dimension(iWidthOrderBy,iHeightOrderBy)); this.jPanelOrderByFacturaPuntoVenta.setPreferredSize(new Dimension(iWidthOrderBy,iHeightOrderBy)); FuncionesSwing.setBoldPanel(this.jPanelOrderByFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this);; this.jPanelOrderByFacturaPuntoVenta.setLayout(gridaBagLayoutOrderByFacturaPuntoVenta); this.jTableDatosFacturaPuntoVentaOrderBy = new JTableMe(); this.jTableDatosFacturaPuntoVentaOrderBy.setAutoCreateRowSorter(true); FuncionesSwing.setBoldTable(jTableDatosFacturaPuntoVentaOrderBy,STIPO_TAMANIO_GENERAL,false,true,this); this.jScrollPanelDatosFacturaPuntoVentaOrderBy = new JScrollPane(); this.jScrollPanelDatosFacturaPuntoVentaOrderBy.setBorder(javax.swing.BorderFactory.createTitledBorder("Orden")); this.jScrollPanelDatosFacturaPuntoVentaOrderBy.setViewportView(this.jTableDatosFacturaPuntoVentaOrderBy); this.jTableDatosFacturaPuntoVentaOrderBy.setFillsViewportHeight(true); this.jTableDatosFacturaPuntoVentaOrderBy.setAutoResizeMode(JTable.AUTO_RESIZE_OFF); this.jInternalFrameOrderByFacturaPuntoVenta= new OrderByJInternalFrame(); this.jInternalFrameOrderByFacturaPuntoVenta= new OrderByJInternalFrame(); this.jScrollPanelOrderByFacturaPuntoVenta = new JScrollPane(); //PANEL_CONTROLES //this.jScrollColumnasSelectReporteFacturaPuntoVenta= new JScrollPane(); //JINTERNAL FRAME OrderBy this.jInternalFrameOrderByFacturaPuntoVenta.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE); this.jInternalFrameOrderByFacturaPuntoVenta.setjInternalFrameParent(this); this.jInternalFrameOrderByFacturaPuntoVenta.setTitle("Orden"); this.jInternalFrameOrderByFacturaPuntoVenta.setSize(iWidthOrderBy+70,iHeightOrderBy+100); this.jInternalFrameOrderByFacturaPuntoVenta.setLocation(xOffset*(openFrameCount + Constantes.INUM_MAX_VENTANAS_DET_X), yOffset*(openFrameCount+Constantes.INUM_MAX_VENTANAS_DET_Y)); this.jInternalFrameOrderByFacturaPuntoVenta.setResizable(true); this.jInternalFrameOrderByFacturaPuntoVenta.setClosable(true); this.jInternalFrameOrderByFacturaPuntoVenta.setMaximizable(true); //FuncionesSwing.setBoldPanel(this.jInternalFrameOrderByFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this);; //SCROLL PANEL this.jScrollPanelOrderByFacturaPuntoVenta.setMinimumSize(new Dimension(iWidthOrderBy,iHeightOrderBy)); this.jScrollPanelOrderByFacturaPuntoVenta.setMaximumSize(new Dimension(iWidthOrderBy,iHeightOrderBy)); this.jScrollPanelOrderByFacturaPuntoVenta.setPreferredSize(new Dimension(iWidthOrderBy,iHeightOrderBy)); FuncionesSwing.setBoldScrollPanel(this.jScrollPanelOrderByFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this);; this.jScrollPanelOrderByFacturaPuntoVenta.setBorder(javax.swing.BorderFactory.createTitledBorder("Datos Factura Punto Ventas")); //DATOS TOTALES this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.gridy =iPosYOrderBy++; this.gridBagConstraintsFacturaPuntoVenta.gridx =iPosXOrderBy; this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.BOTH; //this.gridBagConstraintsFacturaPuntoVenta.ipady =150; this.jPanelOrderByFacturaPuntoVenta.add(jScrollPanelDatosFacturaPuntoVentaOrderBy, this.gridBagConstraintsFacturaPuntoVenta);//this.jTableDatosFacturaPuntoVentaTotales //BOTON CERRAR this.jButtonCerrarOrderByFacturaPuntoVenta = new JButtonMe(); this.jButtonCerrarOrderByFacturaPuntoVenta.setText("Salir"); FuncionesSwing.addImagenButtonGeneral(this.jButtonCerrarOrderByFacturaPuntoVenta,"cerrar","Salir");//cerrar_reporte_dinamico_button this.jButtonCerrarOrderByFacturaPuntoVenta.setToolTipText("Cancelar"+" "+FacturaPuntoVentaConstantesFunciones.SCLASSWEBTITULO); FuncionesSwing.setBoldButton(this.jButtonCerrarOrderByFacturaPuntoVenta, STIPO_TAMANIO_GENERAL,false,true,this);; this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.VERTICAL; this.gridBagConstraintsFacturaPuntoVenta.gridy = iPosYOrderBy++; this.gridBagConstraintsFacturaPuntoVenta.gridx = iPosXOrderBy; this.jPanelOrderByFacturaPuntoVenta.add(this.jButtonCerrarOrderByFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); //GLOBAL AGREGAR PANELES GridBagLayout gridaBagLayoutOrderByPrincipalFacturaPuntoVenta = new GridBagLayout(); this.jScrollPanelOrderByFacturaPuntoVenta= new JScrollPane(jPanelOrderByFacturaPuntoVenta,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); iPosXOrderBy=0; iPosYOrderBy=0; this.gridBagConstraintsFacturaPuntoVenta = new GridBagConstraints(); this.gridBagConstraintsFacturaPuntoVenta.gridy =iPosYOrderBy; this.gridBagConstraintsFacturaPuntoVenta.gridx =iPosXOrderBy; this.gridBagConstraintsFacturaPuntoVenta.fill = GridBagConstraints.BOTH; this.jInternalFrameOrderByFacturaPuntoVenta.setContentPane(new JPanelMe(FuncionesSwing.getFondoImagen(parametroGeneralUsuario.getid_tipo_fondo()),true)); this.jInternalFrameOrderByFacturaPuntoVenta.getContentPane().setLayout(gridaBagLayoutOrderByPrincipalFacturaPuntoVenta); this.jInternalFrameOrderByFacturaPuntoVenta.getContentPane().add(this.jScrollPanelOrderByFacturaPuntoVenta, this.gridBagConstraintsFacturaPuntoVenta); } else { this.jButtonAbrirOrderByFacturaPuntoVenta = new JButtonMe(); } } */ public void redimensionarTablaDatos(int iNumFilas) { this.redimensionarTablaDatos(iNumFilas,0); } public void redimensionarTablaDatos(int iNumFilas,int iTamanioFilaTabla) { Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); int iWidthTable=screenSize.width*2;//screenSize.width - (screenSize.width/8); int iWidthTableScroll=screenSize.width - (screenSize.width/8); int iWidthTableCalculado=0;//6130 int iHeightTable=0;//screenSize.height/3; int iHeightTableTotal=0; //ANCHO COLUMNAS SIMPLES iWidthTableCalculado+=2830; //ANCHO COLUMNAS OCULTAS if(Constantes.ISDEVELOPING) { iWidthTableCalculado+=3100; } //ANCHO COLUMNAS RELACIONES iWidthTableCalculado+=200; //ESPACION PARA SELECT RELACIONES if(this.conMaximoRelaciones && this.facturapuntoventaSessionBean.getConGuardarRelaciones() ) { if(this.conFuncionalidadRelaciones) { iWidthTableCalculado+=Constantes.ISWING_ANCHO_COLUMNA; } } //SI CALCULADO ES MENOR QUE MAXIMO /* if(iWidthTableCalculado<=iWidthTable) { iWidthTable=iWidthTableCalculado; } */ //SI TABLA ES MENOR QUE SCROLL if(iWidthTableCalculado<=iWidthTableScroll) { iWidthTableScroll=iWidthTableCalculado; } //NO VALE SIEMPRE PONE TAMANIO COLUMNA 200 /* int iTotalWidth=0; int iWidthColumn=0; int iCountColumns=this.jTableDatosFacturaPuntoVenta.getColumnModel().getColumnCount(); if(iCountColumns>0) { for(int i = 0; i < this.jTableDatosFacturaPuntoVenta.getColumnModel().getColumnCount(); i++) { TableColumn column = this.jTableDatosFacturaPuntoVenta.getColumnModel().getColumn(i); iWidthColumn=column.getWidth(); iTotalWidth+=iWidthColumn; } //iWidthTableCalculado=iTotalWidth; } */ if(iTamanioFilaTabla<=0) { iTamanioFilaTabla=this.jTableDatosFacturaPuntoVenta.getRowHeight();//FacturaPuntoVentaConstantesFunciones.ITAMANIOFILATABLA; } if(iNumFilas>0) { iHeightTable=(iNumFilas * iTamanioFilaTabla); } else { iHeightTable=iTamanioFilaTabla; } iHeightTableTotal=iHeightTable; if(!this.facturapuntoventaSessionBean.getEsGuardarRelacionado()) { if(iHeightTable > FacturaPuntoVentaConstantesFunciones.TAMANIO_ALTO_MAXIMO_TABLADATOS) { //Constantes.ISWING_TAMANIOMAXIMO_TABLADATOS) { //SI SE SELECCIONA MAXIMO TABLA SE AMPLIA A ALTO MAXIMO DE SCROLL, PARA QUE SCROLL NO SEA TAN PEQUE?O if(!this.jCheckBoxConAltoMaximoTablaFacturaPuntoVenta.isSelected()) { iHeightTable=FacturaPuntoVentaConstantesFunciones.TAMANIO_ALTO_MAXIMO_TABLADATOS; //Constantes.ISWING_TAMANIOMAXIMO_TABLADATOS; } else { iHeightTable=iHeightTableTotal + FuncionesSwing.getValorProporcion(iHeightTableTotal,30); } } else { if(iHeightTable < FacturaPuntoVentaConstantesFunciones.TAMANIO_ALTO_MINIMO_TABLADATOS) {//Constantes.ISWING_TAMANIOMINIMO_TABLADATOS) { iHeightTable=FacturaPuntoVentaConstantesFunciones.TAMANIO_ALTO_MINIMO_TABLADATOS; //Constantes.ISWING_TAMANIOMINIMO_TABLADATOS; } } } else { if(iHeightTable > FacturaPuntoVentaConstantesFunciones.TAMANIO_ALTO_MAXIMO_TABLADATOSREL) { //Constantes.ISWING_TAMANIOMAXIMO_TABLADATOS) { //SI SE SELECCIONA MAXIMO TABLA SE AMPLIA A ALTO MAXIMO DE SCROLL, PARA QUE SCROLL NO SEA TAN PEQUE?O if(!this.jCheckBoxConAltoMaximoTablaFacturaPuntoVenta.isSelected()) { iHeightTable=FacturaPuntoVentaConstantesFunciones.TAMANIO_ALTO_MAXIMO_TABLADATOSREL; //Constantes.ISWING_TAMANIOMAXIMO_TABLADATOS; } else { iHeightTable=iHeightTableTotal + FuncionesSwing.getValorProporcion(iHeightTableTotal,30); } } else { if(iHeightTable < FacturaPuntoVentaConstantesFunciones.TAMANIO_ALTO_MINIMO_TABLADATOSREL) {//Constantes.ISWING_TAMANIOMINIMO_TABLADATOS) { iHeightTable=FacturaPuntoVentaConstantesFunciones.TAMANIO_ALTO_MINIMO_TABLADATOSREL; //Constantes.ISWING_TAMANIOMINIMO_TABLADATOS; } } } //OJO:SE DESHABILITA CALCULADO //NO SE UTILIZA CALCULADO SI POR DEFINICION if(iWidthTableDefinicion>0) { iWidthTableCalculado=iWidthTableDefinicion; } this.jTableDatosFacturaPuntoVenta.setMinimumSize(new Dimension(iWidthTableCalculado,iHeightTableTotal)); this.jTableDatosFacturaPuntoVenta.setMaximumSize(new Dimension(iWidthTableCalculado,iHeightTableTotal)); this.jTableDatosFacturaPuntoVenta.setPreferredSize(new Dimension(iWidthTableCalculado,iHeightTableTotal));//iWidthTable this.jScrollPanelDatosFacturaPuntoVenta.setMinimumSize(new Dimension(iWidthTableScroll,iHeightTable)); this.jScrollPanelDatosFacturaPuntoVenta.setMaximumSize(new Dimension(iWidthTableScroll,iHeightTable)); this.jScrollPanelDatosFacturaPuntoVenta.setPreferredSize(new Dimension(iWidthTableScroll,iHeightTable)); //ORDER BY //OrderBy int iHeightTableOrderBy=0; int iNumFilasOrderBy=this.arrOrderBy.size(); int iTamanioFilaTablaOrderBy=0; if(this.jInternalFrameOrderByFacturaPuntoVenta!=null && this.jInternalFrameOrderByFacturaPuntoVenta.getjTableDatosOrderBy()!=null) { //if(!this.facturapuntoventaSessionBean.getEsGuardarRelacionado()) { iTamanioFilaTablaOrderBy=this.jInternalFrameOrderByFacturaPuntoVenta.getjTableDatosOrderBy().getRowHeight(); if(iNumFilasOrderBy>0) { iHeightTableOrderBy=iNumFilasOrderBy * iTamanioFilaTablaOrderBy; } else { iHeightTableOrderBy=iTamanioFilaTablaOrderBy; } this.jInternalFrameOrderByFacturaPuntoVenta.getjTableDatosOrderBy().setMinimumSize(new Dimension(Constantes2.ISWING_TAMANIO_ANCHO_TABLADATOS_ORDERBY,iHeightTableOrderBy));//iWidthTableCalculado/4 this.jInternalFrameOrderByFacturaPuntoVenta.getjTableDatosOrderBy().setMaximumSize(new Dimension(Constantes2.ISWING_TAMANIO_ANCHO_TABLADATOS_ORDERBY,iHeightTableOrderBy)); this.jInternalFrameOrderByFacturaPuntoVenta.getjTableDatosOrderBy().setPreferredSize(new Dimension(Constantes2.ISWING_TAMANIO_ANCHO_TABLADATOS_ORDERBY,iHeightTableOrderBy));//iWidthTable this.jInternalFrameOrderByFacturaPuntoVenta.getjScrollPanelDatosOrderBy().setMinimumSize(new Dimension(Constantes2.ISWING_TAMANIO_ANCHO_TABLADATOS_ORDERBY+30,Constantes2.ISWING_TAMANIO_ALTO_TABLADATOS_ORDERBY));//iHeightTableOrderBy,iWidthTableScroll this.jInternalFrameOrderByFacturaPuntoVenta.getjScrollPanelDatosOrderBy().setMaximumSize(new Dimension(Constantes2.ISWING_TAMANIO_ANCHO_TABLADATOS_ORDERBY+30,Constantes2.ISWING_TAMANIO_ALTO_TABLADATOS_ORDERBY)); this.jInternalFrameOrderByFacturaPuntoVenta.getjScrollPanelDatosOrderBy().setPreferredSize(new Dimension(Constantes2.ISWING_TAMANIO_ANCHO_TABLADATOS_ORDERBY+30,Constantes2.ISWING_TAMANIO_ALTO_TABLADATOS_ORDERBY)); } //ORDER BY //this.jScrollPanelDatosFacturaPuntoVenta.setMinimumSize(new Dimension(iWidthTableScroll,iHeightTable)); //this.jScrollPanelDatosFacturaPuntoVenta.setMaximumSize(new Dimension(iWidthTableScroll,iHeightTable)); //this.jScrollPanelDatosFacturaPuntoVenta.setPreferredSize(new Dimension(iWidthTableScroll,iHeightTable)); //VERSION 0 /* //SI CALCULADO ES MENOR QUE MAXIMO if(iWidthTableCalculado<=iWidthTable) { iWidthTable=iWidthTableCalculado; } //SI TABLA ES MENOR QUE SCROLL if(iWidthTable<=iWidthTableScroll) { iWidthTableScroll=iWidthTable; } */ } public void redimensionarTablaDatosConTamanio(int iTamanioFilaTabla) throws Exception { int iSizeTabla=0; //ARCHITECTURE if(Constantes.ISUSAEJBLOGICLAYER) { iSizeTabla=facturapuntoventaLogic.getFacturaPuntoVentas().size(); } else if(Constantes.ISUSAEJBREMOTE || Constantes.ISUSAEJBHOME) { iSizeTabla=facturapuntoventas.size(); } //ARCHITECTURE this.redimensionarTablaDatos(iSizeTabla,iTamanioFilaTabla); } /* PARA MANEJAR EL TAB RELACIONES CON TABLA DE DATOS SE DEBE MODIFICAR Y VERIFICAR LOS VALORES CONTANTES: final public static Integer ISWING_TAMANIOMAXIMO_TABLADATOSREL=240;//230;350; final public static Integer ISWING_TAMANIOMINIMO_TABLADATOSREL=240;//230;260 final public static Integer ISWING_ALTO_TABPANE=375;//375;400;260; CASO CONTRARIO, ESTOS VALORES SERIAN PARA CADA CASO (NO CONSTANTES) NOTA: * LA ALINEACION HORIZONTAL,FALTA */ //PARA REPORTES public static List<FacturaPuntoVenta> TraerFacturaPuntoVentaBeans(List<FacturaPuntoVenta> facturapuntoventas,ArrayList<Classe> classes)throws Exception { try { for(FacturaPuntoVenta facturapuntoventa:facturapuntoventas) { if(!(FacturaPuntoVentaConstantesFunciones.S_TIPOREPORTE_EXTRA.equals(Constantes2.S_REPORTE_EXTRA_GROUP_GENERICO) || FacturaPuntoVentaConstantesFunciones.S_TIPOREPORTE_EXTRA.equals(Constantes2.S_REPORTE_EXTRA_GROUP_TOTALES_GENERICO)) ) { facturapuntoventa.setsDetalleGeneralEntityReporte(FacturaPuntoVentaConstantesFunciones.getFacturaPuntoVentaDescripcion(facturapuntoventa)); if(facturapuntoventa.getFormaPagoPuntoVentas()!=null && Funciones.existeClass(classes,FormaPagoPuntoVenta.class)) { try{facturapuntoventa.setformapagopuntoventasDescripcionReporte(new JRBeanCollectionDataSource(FormaPagoPuntoVentaJInternalFrame.TraerFormaPagoPuntoVentaBeans(facturapuntoventa.getFormaPagoPuntoVentas(),classes)));}catch(Exception e){e.printStackTrace();} } if(facturapuntoventa.getDetalleFacturaPuntoVentas()!=null && Funciones.existeClass(classes,DetalleFacturaPuntoVenta.class)) { try{facturapuntoventa.setdetallefacturapuntoventasDescripcionReporte(new JRBeanCollectionDataSource(DetalleFacturaPuntoVentaJInternalFrame.TraerDetalleFacturaPuntoVentaBeans(facturapuntoventa.getDetalleFacturaPuntoVentas(),classes)));}catch(Exception e){e.printStackTrace();} } } else { //facturapuntoventa.setsDetalleGeneralEntityReporte(facturapuntoventa.getsDetalleGeneralEntityReporte()); } //facturapuntoventabeans.add(facturapuntoventabean); } } catch(Exception ex) { throw ex; } return facturapuntoventas; } //PARA REPORTES FIN }
466ed8aca41d84539db347e0d365effcc03cccd0
370b6b6e7ffab88824ce7765059c956bc965f87c
/nexus/nexus-core-plugins/nexus-lvo-plugin/src/main/java/org/sonatype/nexus/plugins/lvo/LvoPlugin.java
b53e19aa493f2a382f32d199ef6ab444a15a5457
[]
no_license
peterlynch/nexus-core
d191866de6774e5c7eb76b6e518bf5af9d593bc8
c3c8e986e396124e028b3d7fa8e3adc25cfe4e3d
refs/heads/master
2021-01-16T22:54:27.609399
2010-10-15T15:53:02
2010-10-15T15:53:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,475
java
package org.sonatype.nexus.plugins.lvo; import java.io.IOException; import org.sonatype.nexus.proxy.NoSuchRepositoryException; /** * The LVO Plugin interface. * * @author cstamas */ public interface LvoPlugin { /** * Returns the latest V (V from GAV) that fits the properties specified by key. * * @param key * @return the V, null if key exists but we are unable to calculate LV. * @throws NoSuchKeyException * @throws NoSuchStrategyException * @throws NoSuchRepositoryException * @throws IOException */ DiscoveryResponse getLatestVersionForKey( String key ) throws NoSuchKeyException, NoSuchStrategyException, NoSuchRepositoryException, IOException; /** * Queries for the latest V (V from GAV) that fits the properties specified by key. If the passed in v is equal of * the latest v, returns null. * * @param key * @param v current version associated with key. * @return the V if newer found, null if key exists but we are unable to calculate LV or no newer version exists. * @throws NoSuchKeyException * @throws NoSuchStrategyException * @throws NoSuchRepositoryException * @throws IOException */ DiscoveryResponse queryLatestVersionForKey( String key, String v ) throws NoSuchKeyException, NoSuchStrategyException, NoSuchRepositoryException, IOException; }
[ "cstamas@2aa8b3fc-8ebb-4439-a84f-95066eaea8ab" ]
cstamas@2aa8b3fc-8ebb-4439-a84f-95066eaea8ab
374c0eebaddcea4c78e52b58a6f33abea0a1f7e2
a70a49fe455cfed43fa42d2406a67d2518d5b77d
/src/main/java/sda/lukaszs/addressbookfx/manager/HibernateEntityManager.java
3dc5808de97359f25db0a65dc6e232a4aa25550c
[]
no_license
javabyd6/AddressBookFX_LS
d7446cdd78ef789b300c62cab385508041ea2e27
45edcaf20defb399419e411345c230bd2635e784
refs/heads/master
2020-05-01T04:04:37.123362
2019-04-13T12:03:42
2019-04-13T12:03:42
177,263,881
0
0
null
2019-03-23T08:29:19
2019-03-23T08:29:18
null
UTF-8
Java
false
false
659
java
package sda.lukaszs.addressbookfx.manager; import sda.lukaszs.addressbookfx.HibernateInit; import javax.persistence.EntityManager; public class HibernateEntityManager implements AutoCloseable{ private EntityManager entityManager; public HibernateEntityManager() { entityManager = HibernateInit.getEntityManagerFactory().createEntityManager(); } public EntityManager getEntityManager() { return entityManager; } @Override public void close() throws Exception { if (!entityManager.isOpen()) entityManager.close(); if(entityManager != null) entityManager.clear(); } }
132c0a61079605330401a2bde28448c11bb67064
7e916e83e714a2df8e0af21e96b4a43ba8e7d319
/core/src/ru/naztrans/space/ship/MainShip.java
d5cbcca2e4be4ce6c8ccfed34290d2d80f91fd40
[]
no_license
karelalex/SpaceGame
d4f469f415c826e45d1f548c0ca029c462ca88f4
d106096a734279fc5af271dd8ea7618ad9382628
refs/heads/master
2021-05-09T04:46:47.388341
2018-02-22T07:18:22
2018-02-22T07:18:22
119,286,893
0
0
null
null
null
null
UTF-8
Java
false
false
3,920
java
package ru.naztrans.space.ship; import com.badlogic.gdx.Input; import com.badlogic.gdx.audio.Sound; import com.badlogic.gdx.graphics.g2d.TextureAtlas; import com.badlogic.gdx.math.Vector2; import com.sun.org.apache.regexp.internal.RE; import ru.naztrans.space.engine.math.Rect; import ru.naztrans.space.bullet.BulletPool; import ru.naztrans.space.explosion.ExplosionPool; /** * Created by alexk on 10.02.2018. */ public class MainShip extends Ship { private static final float SHIP_HEIGHT = 0.15f; private static final float BOTTOM_MARGIN = 0.05f; private final Vector2 v0 = new Vector2(0.5f, 0.0f); public Vector2 getV() { return v; } private boolean pressedLeft; private boolean pressedRight; private int currentPointer; public MainShip(TextureAtlas atlas, BulletPool bp, ExplosionPool explosionPool, Rect worldBounds, Sound fireSound) { super(atlas.findRegion("main_ship"), 1, 2, 2, bp, explosionPool, worldBounds, fireSound); setHeightProportion(SHIP_HEIGHT); this.bulletRegion = atlas.findRegion("bulletMainShip"); } public void setToNewGame(){ pos.x=worldBounds.pos.x; this.bulletHeight = 0.01f; this.bulletV.set(0, 0.5f); this.bulletDamage = 1; this.reloadInterval = 0.2f; this.hp=100; setDestroyed(false); } @Override public void update(float delta) { super.update(delta); pos.mulAdd(v, delta); reloadTimer+=delta; if (reloadTimer>=reloadInterval){ reloadTimer=0; fire(); } if (getRight() > worldBounds.getRight()) { setRight(worldBounds.getRight()); stop(); } if (getLeft() < worldBounds.getLeft()) { setLeft(worldBounds.getLeft()); stop(); } } @Override public void resize(Rect worldBounds) { super.resize(worldBounds); setBottom(worldBounds.getBottom() + BOTTOM_MARGIN); } public void keyDown(int keycode) { switch (keycode) { case Input.Keys.A: case Input.Keys.LEFT: pressedLeft = true; moveLeft(); break; case Input.Keys.D: case Input.Keys.RIGHT: pressedRight = true; moveRight(); break; } } public void keyUp(int keycode) { switch (keycode) { case Input.Keys.A: case Input.Keys.LEFT: pressedLeft = false; if (pressedRight) { moveRight(); } else { stop(); } break; case Input.Keys.D: case Input.Keys.RIGHT: pressedRight = false; if (pressedLeft) { moveLeft(); } else { stop(); } break; case Input.Keys.UP: fire(); break; } } @Override public void touchDown(Vector2 touch, int pointer) { if (worldBounds.pos.x > touch.x) { moveLeft(); } else { moveRight(); } currentPointer=pointer; } @Override public void touchUp(Vector2 touch, int pointer) { if (pointer==currentPointer) { stop(); } } private void moveRight() { v.set(v0); } private void moveLeft() { v.set(v0).rotate(180); } private void stop() { v.setZero(); } public boolean isBulletCollision(Rect bullet) { return !(bullet.getRight() < getLeft() || bullet.getLeft() > getRight() || bullet.getTop() < getBottom() || bullet.getBottom() > pos.y ); } }
a66698ee43ee1217e3801220f4e91ba9c363a43d
9202ccff6d631c68be58d51febeb57b936c21949
/src/main/java/vn/poly/group2/pro2111/common/entities/Major.java
72deedc798da910f5bfb90fee684270786faeaf9
[ "MIT" ]
permissive
trinmph04407/application-manager
8a85be5f5ef1afe3473b0a409206dff2026c1d14
7da2e5fb40553f52d9afaee4134ff0cb1907bc92
refs/heads/master
2020-03-27T04:21:20.321806
2018-08-24T03:04:19
2018-08-24T03:04:19
145,932,373
0
0
null
null
null
null
UTF-8
Java
false
false
3,005
java
/** * tri nguyen */ package vn.poly.group2.pro2111.common.entities; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; /** * Major Entity * * @author minht * */ @Entity @Table(name = "MAJOR") public class Major { /*===================================================================================================== *===== PRIVATE PROPERTIES ===== *=====================================================================================================*/ /** * MAJOR.ID */ @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "ID") private Long id; /** * MAJOR.CODE */ @Column(name = "CODE") private String code; /** * MAJOR.NAME */ @Column(name = "NAME") private String name; /** * MAJOR.LECTURERID */ @Column(name = "LECTURERID") private Long lecturerId; /** * MAJOR.LECTURER */ @ManyToOne @JoinColumn(name = "LECTURERID", insertable = false, updatable = false) private Lecturer lecturer; /*===================================================================================================== *===== CONSTRUCTOR METHOD ===== *=====================================================================================================*/ /** * Default constructor */ public Major() { super(); } /*===================================================================================================== *===== GETTER & SETTER ===== *=====================================================================================================*/ /** * @return the id */ public Long getId() { return id; } /** * @param id the id to set */ public void setId(Long id) { this.id = id; } /** * @return the code */ public String getCode() { return code; } /** * @param code the code to set */ public void setCode(String code) { this.code = code; } /** * @return the name */ public String getName() { return name; } /** * @param name the name to set */ public void setName(String name) { this.name = name; } /** * @return the lecturerId */ public Long getLecturerId() { return lecturerId; } /** * @param lecturerId the lecturerId to set */ public void setLecturerId(Long lecturerId) { this.lecturerId = lecturerId; } /** * @return the lecturer */ public Lecturer getLecturer() { return lecturer; } /** * @param lecturer the lecturer to set */ public void setLecturer(Lecturer lecturer) { this.lecturer = lecturer; } }
e44b1303aff17cec3cd82e243f4cc2a8ed1d1cca
d41b16037b37d302786ccd2f9d531b1a3f044058
/app/src/androidTest/java/com/example/fling/flower/ExampleInstrumentedTest.java
791bbb24af397ec1df6393f1256b373d72bb5c21
[]
no_license
FreyaOne/Android_flower
e2384405b5d21cd79d259c465154abbf6cadda77
22acb5c539f7d12001076ed7e448acd61c78a283
refs/heads/master
2021-09-26T12:13:45.826852
2018-10-30T02:21:38
2018-10-30T02:21:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
732
java
package com.example.fling.flower; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("com.example.fling.flower", appContext.getPackageName()); } }
[ "xhfl511621638" ]
xhfl511621638
3acec9b3be102ddc5fe32f2fb004cc4f663d20f3
5800b347bcaf5a3d3b1e543e971b0affa93d326b
/module-main/src/main/java/com/fxx/component/main/mvp/presenter/MainHomePresenter.java
d89a2088817177619c07edd47b4f6b321c0f0f8b
[]
no_license
fxx1120/MVPCompmonet
5a050adf81353c3ed446ed0c3b96dee055cc218b
1ab5d3ab86fe5249334de0a8769865bdc88d0ff2
refs/heads/master
2020-04-14T11:18:07.486721
2019-01-02T07:48:41
2019-01-02T07:48:41
163,810,139
2
0
null
null
null
null
UTF-8
Java
false
false
1,056
java
package com.fxx.component.main.mvp.presenter; import android.app.Application; import com.jess.arms.integration.AppManager; import com.jess.arms.di.scope.ActivityScope; import com.jess.arms.mvp.BasePresenter; import com.jess.arms.http.imageloader.ImageLoader; import me.jessyan.rxerrorhandler.core.RxErrorHandler; import javax.inject.Inject; import com.fxx.component.main.mvp.contract.MainHomeContract; @ActivityScope public class MainHomePresenter extends BasePresenter<MainHomeContract.Model, MainHomeContract.View> { @Inject RxErrorHandler mErrorHandler; @Inject Application mApplication; @Inject ImageLoader mImageLoader; @Inject AppManager mAppManager; @Inject public MainHomePresenter(MainHomeContract.Model model, MainHomeContract.View rootView) { super(model, rootView); } @Override public void onDestroy() { super.onDestroy(); this.mErrorHandler = null; this.mAppManager = null; this.mImageLoader = null; this.mApplication = null; } }
2b86a1b38145b62b4b8ad323d204b5366d0bc594
36613b5c390bf984224c4a840f1d05d2dec0678a
/src/main/MainFrame.java
b2719937cdd7e681748a48c3fc6453d37a8fd37b
[]
no_license
HumnoyCmDev/One2Car
64e0c2070c4487b9596e36bf924f6404a4557a83
002ed233c271c0f1450a9bf4f1ddc314af93cab9
refs/heads/master
2016-08-12T21:18:37.380190
2016-02-10T09:29:46
2016-02-10T09:29:46
51,431,521
0
0
null
null
null
null
UTF-8
Java
false
false
27,444
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package main; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.List; import javax.swing.ButtonGroup; import javax.swing.JLabel; import javax.swing.JTable; import javax.swing.table.DefaultTableCellRenderer; import javax.swing.table.DefaultTableModel; import onetwocar.CallBackResuil; import onetwocar.CallBackResuilBrand; import onetwocar.FeedBrand; import onetwocar.FeedData; import model.BrandModel; import unseencar.FeedBrandUnSeen; /** * * @author humnoy */ public class MainFrame extends javax.swing.JFrame { private int start = 1; private int end = 1; private List<BrandModel> BrandModel; private String brand_valuse = ""; private List<String> list; public MainFrame() { initComponents(); intiListData(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { buttonGroup1 = new javax.swing.ButtonGroup(); jScrollPane1 = new javax.swing.JScrollPane(); List_Brand = new javax.swing.JList<>(); jPanel1 = new javax.swing.JPanel(); lbl_pageCount = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); input_start = new javax.swing.JTextField(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); input_end = new javax.swing.JTextField(); ButtonStart = new javax.swing.JButton(); lbl_Status = new javax.swing.JLabel(); jScrollPane2 = new javax.swing.JScrollPane(); TableData = new javax.swing.JTable(); ProgressBar = new javax.swing.JProgressBar(); jLabel5 = new javax.swing.JLabel(); jPanel3 = new javax.swing.JPanel(); jRadioButton_One2Car = new javax.swing.JRadioButton(); jRadioButton_UnSeenCar = new javax.swing.JRadioButton(); jButton_Load = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("Feed Data v.1.1 By Humnoy Developer"); jScrollPane1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Brands", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Lucida Grande", 1, 14), javax.swing.UIManager.getDefaults().getColor("CheckBox.disabledText"))); // NOI18N List_Brand.setFont(new java.awt.Font("Lucida Grande", 0, 14)); // NOI18N List_Brand.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); List_Brand.setToolTipText("คลิกเลือก Brand"); List_Brand.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent evt) { List_BrandValueChanged(evt); } }); jScrollPane1.setViewportView(List_Brand); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Page")); lbl_pageCount.setFont(new java.awt.Font("Lucida Grande", 1, 14)); // NOI18N lbl_pageCount.setForeground(javax.swing.UIManager.getDefaults().getColor("Button.select")); lbl_pageCount.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); lbl_pageCount.setText("Number Page"); lbl_pageCount.setToolTipText(""); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(lbl_pageCount, javax.swing.GroupLayout.PREFERRED_SIZE, 153, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(lbl_pageCount, javax.swing.GroupLayout.DEFAULT_SIZE, 37, Short.MAX_VALUE) .addContainerGap()) ); jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Feed Data")); input_start.setFont(new java.awt.Font("Lucida Grande", 1, 14)); // NOI18N input_start.setToolTipText(""); input_start.setEnabled(false); input_start.setPreferredSize(new java.awt.Dimension(70, 29)); input_start.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { input_startKeyReleased(evt); } }); jLabel1.setFont(new java.awt.Font("Lucida Grande", 0, 14)); // NOI18N jLabel1.setText("Start"); jLabel1.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT); jLabel2.setFont(new java.awt.Font("Lucida Grande", 0, 14)); // NOI18N jLabel2.setText("End"); jLabel2.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT); input_end.setFont(new java.awt.Font("Lucida Grande", 1, 14)); // NOI18N input_end.setToolTipText(""); input_end.setEnabled(false); input_end.setPreferredSize(new java.awt.Dimension(70, 29)); input_end.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { input_endKeyReleased(evt); } }); ButtonStart.setFont(new java.awt.Font("Lucida Grande", 1, 18)); // NOI18N ButtonStart.setForeground(javax.swing.UIManager.getDefaults().getColor("Button.select")); ButtonStart.setText("START"); ButtonStart.setEnabled(false); ButtonStart.setName(""); // NOI18N ButtonStart.setPreferredSize(new java.awt.Dimension(87, 30)); ButtonStart.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { ButtonStartMouseClicked(evt); } }); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(25, 25, 25) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(input_start, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(input_end, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() .addContainerGap() .addComponent(ButtonStart, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(input_start, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel1)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(input_end, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2)) .addGap(18, 18, 18) .addComponent(ButtonStart, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18)) ); lbl_Status.setFont(new java.awt.Font("Lucida Grande", 1, 30)); // NOI18N lbl_Status.setForeground(java.awt.Color.red); lbl_Status.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); lbl_Status.setText("Loading..."); lbl_Status.setToolTipText(""); TableData.setFont(new java.awt.Font("Lucida Grande", 0, 14)); // NOI18N TableData.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { }, new String [] { "No.", "Data" } ) { Class[] types = new Class [] { java.lang.Integer.class, java.lang.String.class }; public Class getColumnClass(int columnIndex) { return types [columnIndex]; } }); TableData.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_LAST_COLUMN); TableData.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); TableData.setRowHeight(27); TableData.setRowSelectionAllowed(false); jScrollPane2.setViewportView(TableData); ProgressBar.setFont(new java.awt.Font("Lucida Grande", 0, 14)); // NOI18N ProgressBar.setForeground(new java.awt.Color(51, 51, 255)); ProgressBar.setToolTipText(""); ProgressBar.setPreferredSize(new java.awt.Dimension(146, 50)); ProgressBar.setSize(new java.awt.Dimension(146, 50)); jLabel5.setFont(new java.awt.Font("Lucida Grande", 0, 14)); // NOI18N jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel5.setText("Feed Data V.1.1"); jPanel3.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jRadioButton_One2Car.setSelected(true); jRadioButton_One2Car.setText("One2Car"); jRadioButton_UnSeenCar.setText("UnSeenCar"); jButton_Load.setFont(new java.awt.Font("Lucida Grande", 1, 14)); // NOI18N jButton_Load.setForeground(javax.swing.UIManager.getDefaults().getColor("Button.light")); jButton_Load.setText("Load"); jButton_Load.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseReleased(java.awt.event.MouseEvent evt) { jButton_LoadMouseReleased(evt); } }); javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jRadioButton_One2Car) .addComponent(jRadioButton_UnSeenCar) .addGroup(jPanel3Layout.createSequentialGroup() .addGap(29, 29, 29) .addComponent(jButton_Load, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(37, Short.MAX_VALUE)) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addContainerGap() .addComponent(jRadioButton_One2Car) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jRadioButton_UnSeenCar) .addGap(18, 18, 18) .addComponent(jButton_Load, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(12, Short.MAX_VALUE)) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 236, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(22, 22, 22) .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(55, 55, 55)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18))) .addComponent(jScrollPane2) .addContainerGap()) .addGroup(layout.createSequentialGroup() .addGap(254, 254, 254) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(ProgressBar, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 208, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(lbl_Status, javax.swing.GroupLayout.PREFERRED_SIZE, 214, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(512, 512, 512)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createSequentialGroup() .addComponent(jLabel5) .addGap(18, 18, 18) .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(lbl_Status, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(ProgressBar, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 100, Short.MAX_VALUE)) .addComponent(jScrollPane2)) .addContainerGap()) .addComponent(jScrollPane1))) ); pack(); }// </editor-fold>//GEN-END:initComponents private void ButtonStartMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_ButtonStartMouseClicked // TODO add your handling code here: if(!ButtonStart.isEnabled()) return; lbl_Status.setText("Loading..."); new FeedData(start, end, brand_valuse, new CallBackResuil() { @Override public void onStart() { ProgressBar.setValue(0); } @Override public void onProgressBar(int size, int i) { lbl_Status.setText("Loading:"+i); ProgressBar.setValue(((i*100)/size)+1); } @Override public void succeed(List<String> data, String pagerView) { lbl_pageCount.setText(pagerView); addDataTable(data); lbl_Status.setText("Succeed!!"); } }).execute(); }//GEN-LAST:event_ButtonStartMouseClicked private void input_startKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_input_startKeyReleased // TODO add your handling code here: // lbl_Status.setText(""); if(!input_start.getText().equals("")){ try { start = Integer.valueOf(input_start.getText()); } catch (NumberFormatException e) { input_end.setEnabled(false); ButtonStart.setEnabled(false); return; } input_end.setEnabled(true); ButtonStart.setEnabled(true); }else{ input_end.setEnabled(false); ButtonStart.setEnabled(false); } }//GEN-LAST:event_input_startKeyReleased private void input_endKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_input_endKeyReleased // TODO add your handling code here: // lbl_Status.setText(""); if(!input_end.getText().equals("")){ try { end = Integer.valueOf(input_end.getText()); } catch (NumberFormatException e) { ButtonStart.setEnabled(false); return; } ButtonStart.setEnabled(true); }else{ ButtonStart.setEnabled(false); } }//GEN-LAST:event_input_endKeyReleased private void List_BrandValueChanged(javax.swing.event.ListSelectionEvent evt) {//GEN-FIRST:event_List_BrandValueChanged if(!evt.getValueIsAdjusting()){ input_start.setEnabled(true); brand_valuse = BrandModel.get(List_Brand.getSelectedIndex()-1).getValuse(); new FeedData(start, end, brand_valuse, new CallBackResuil() { @Override public void onStart() { lbl_Status.setText("Loading..."); ProgressBar.setValue(0); } @Override public void onProgressBar(int size, int i) { ProgressBar.setValue(((i*100)/size)+1); } @Override public void succeed(List<String> data, String pagerView) { lbl_pageCount.setText(pagerView); addDataTable(data); lbl_Status.setText("Succeed!!"); } }).execute(); } }//GEN-LAST:event_List_BrandValueChanged private void jButton_LoadMouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton_LoadMouseReleased if (jRadioButton_One2Car.isSelected()) { lbl_Status.setText("Loading..."); new FeedBrand(new CallBackResuilBrand() { @Override public void onStart() { ProgressBar.setValue(0); } @Override public void onProgressBar(int size, int i) { ProgressBar.setValue(((i * 100) / size) + 1); } @Override public void succeed(String[] obj_list_brand, List<BrandModel> brandModels) { List_Brand.setListData(obj_list_brand); BrandModel = brandModels; lbl_Status.setText("Succed!!"); } }).execute(); } if(jRadioButton_UnSeenCar.isSelected()){ // new FeedBrandUnSeen(new CallBackResuilBrand() { // @Override // public void onStart() { // ProgressBar.setValue(0); // } // // @Override // public void onProgressBar(int size, int i) { // ProgressBar.setValue(((i * 100) / size) + 1); // } // // @Override // public void succeed(String[] obj_list_brand, List<BrandModel> brandModels) { // BrandModel = brandModels; // lbl_Status.setText("Succed!!"); // obj_list_brand = new String[brandModels.size()]; // for(int i =0 ; i < obj_list_brand.length;i++){ // obj_list_brand[i] = brandModels.get(i).getBrang(); // } // } // }).execute(); } }//GEN-LAST:event_jButton_LoadMouseReleased /** * @param args the command line arguments */ public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(MainFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(MainFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(MainFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(MainFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> /* Create and display the form */ // java.awt.EventQueue.invokeLater(new Runnable() { // public void run() { // new MainFrame().setVisible(true); // } // }); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton ButtonStart; private javax.swing.JList<String> List_Brand; private javax.swing.JProgressBar ProgressBar; private javax.swing.JTable TableData; private javax.swing.ButtonGroup buttonGroup1; private javax.swing.JTextField input_end; private javax.swing.JTextField input_start; private javax.swing.JButton jButton_Load; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel5; private javax.swing.JPanel jPanel1; private javax.swing.JPanel jPanel2; private javax.swing.JPanel jPanel3; private javax.swing.JRadioButton jRadioButton_One2Car; private javax.swing.JRadioButton jRadioButton_UnSeenCar; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JScrollPane jScrollPane2; private javax.swing.JLabel lbl_Status; private javax.swing.JLabel lbl_pageCount; // End of variables declaration//GEN-END:variables private void intiListData() { TableData.getColumnModel().getColumn(0).setPreferredWidth(20); TableData.getColumnModel().getColumn(1).setPreferredWidth(280); TableData.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN); DefaultTableCellRenderer centerRenderer = new DefaultTableCellRenderer(); centerRenderer.setHorizontalAlignment( JLabel.LEFT ); TableData.getColumnModel().getColumn(0).setCellRenderer( centerRenderer ); ButtonGroup group = new ButtonGroup(); group.add(jRadioButton_One2Car); group.add(jRadioButton_UnSeenCar); } private void addDataTable(List<String> data){ DefaultTableModel model = (DefaultTableModel) TableData.getModel(); // Collections.sort(data,new Comparator<String>(){ // @Override // public int compare(String o1, String o2) { // return o1.compareToIgnoreCase(o2); // } // }); if (model.getRowCount() > 0) { for (int i = model.getRowCount() - 1; i > -1; i--) { model.removeRow(i); } } for(int i=0;i <= data.size()-1; i++){ model.addRow(new Object[0]); model.setValueAt(i+1, i, 0); model.setValueAt(data.get(i), i, 1); } } }
cb7e641f2a2799569a3dbfbebd91f8d8047301e8
a9ff70e7c4c656946b751c5826850b8141b80c6c
/src/test/java/hu/nml/web/rest/UserResourceIntTest.java
ad0291bf7adf017211c6784b96a52e89d227455b
[]
no_license
hajda/nml
9fb82923cf0cb49458830823f4ee98db2cae5280
8a356f43387c0848c04a3ad47edb44ba7cd0236b
refs/heads/master
2021-09-20T17:24:20.853599
2016-03-17T20:56:37
2016-03-17T20:56:37
54,151,943
0
0
null
null
null
null
UTF-8
Java
false
false
2,256
java
package hu.nml.web.rest; import hu.nml.Application; import hu.nml.repository.UserRepository; import hu.nml.service.UserService; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.IntegrationTest; import org.springframework.boot.test.SpringApplicationConfiguration; import org.springframework.http.MediaType; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.util.ReflectionTestUtils; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import javax.inject.Inject; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; /** * Test class for the UserResource REST controller. * * @see UserResource */ @RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(classes = Application.class) @WebAppConfiguration @IntegrationTest public class UserResourceIntTest { @Inject private UserRepository userRepository; @Inject private UserService userService; private MockMvc restUserMockMvc; @Before public void setup() { UserResource userResource = new UserResource(); ReflectionTestUtils.setField(userResource, "userRepository", userRepository); ReflectionTestUtils.setField(userResource, "userService", userService); this.restUserMockMvc = MockMvcBuilders.standaloneSetup(userResource).build(); } @Test public void testGetExistingUser() throws Exception { restUserMockMvc.perform(get("/api/users/admin") .accept(MediaType.APPLICATION_JSON)) .andExpect(status().isOk()) .andExpect(content().contentType("application/json")) .andExpect(jsonPath("$.lastName").value("Administrator")); } @Test public void testGetUnknownUser() throws Exception { restUserMockMvc.perform(get("/api/users/unknown") .accept(MediaType.APPLICATION_JSON)) .andExpect(status().isNotFound()); } }
77dad02614fc60ce721d7450cb63f612dbb3d1c5
5d0ea709483eadffcb9b12bd7293f6889649e7c3
/src/pizza/servlet/CustomerServlet.java
e2a209c90d657130ebc8859d1bef03ad863afd64
[]
no_license
Arshatt/EndTerm-Proj-Java
3e02ae23b709d73c4d49d54133f0fd79ceff4faa
2bd9ce24f56fbc4de677f0157e003681be0cba30
refs/heads/master
2023-03-20T01:06:12.687933
2021-03-15T14:50:31
2021-03-15T14:50:31
347,996,106
0
0
null
null
null
null
UTF-8
Java
false
false
1,245
java
package pizza.servlet; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * Servlet implementation class CustomerServlet */ @WebServlet("/CustomerServlet") public class CustomerServlet extends HttpServlet { private static final long serialVersionUID = 1L; /** * @see HttpServlet#HttpServlet() */ public CustomerServlet() { super(); // TODO Auto-generated constructor stub } /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub response.getWriter().append("Served at: ").append(request.getContextPath()); } /** * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub //doGet(request, response); } }
8d35d94f99fa01614e809d277cf0102f26e11b14
6f5ab40bfbb1ea241adc344f0e8485077e1ef7f8
/src/main/java/org/obiba/onyx/core/service/ParticipantService.java
cbe62f54fbca172b8dd7fe73742a129d5b864b8a
[]
no_license
brisskit-uol/onyx-core-1.8.1-appts-list-fix
435b21dcd5d162b8775930c566550780809f75a6
41667c3dec1b84c906912ba157d4d3e23efdaa9b
refs/heads/master
2021-01-10T14:19:21.724815
2015-12-14T21:17:10
2015-12-14T21:17:10
46,785,936
0
0
null
null
null
null
UTF-8
Java
false
false
4,396
java
/******************************************************************************* * Copyright 2008(c) The OBiBa Consortium. All rights reserved. * * This program and the accompanying materials * are made available under the terms of the GNU Public License v3.0. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. ******************************************************************************/ package org.obiba.onyx.core.service; import java.util.Date; import java.util.List; import org.obiba.core.service.PagingClause; import org.obiba.core.service.SortingClause; import org.obiba.onyx.core.domain.participant.InterviewStatus; import org.obiba.onyx.core.domain.participant.Participant; import org.obiba.onyx.core.domain.user.User; import org.obiba.onyx.core.exception.NonUniqueParticipantException; import org.obiba.onyx.engine.Action; import org.obiba.onyx.util.data.Data; public interface ParticipantService { /** * search by code, appointment code or name * @param input field * @param paging * @param clauses * @return */ public List<Participant> getParticipantsByInputField(String inputField, PagingClause paging, SortingClause... clauses); /** * search by code, appointment code or name * @param input field * @return */ public int countParticipantsByInputField(String inputField); /** * Get the list of participants by their interview status. * @param status * @param paging * @param clauses * @return */ public List<Participant> getParticipants(InterviewStatus status, PagingClause paging, SortingClause... clauses); /** * Count the participants by their interview status. * @param status * @return */ public int countParticipants(InterviewStatus status); /** * Get the list of participants having an appointment between the given dates. * @param from * @param to * @param paging * @param clauses * @return */ public List<Participant> getParticipants(Date from, Date to, PagingClause paging, SortingClause... clauses); /** * Count the participants having an appointment between the given dates. * @param from * @param to * @return */ public int countParticipants(Date from, Date to); /** * Assign a barcode to a participant. * @param participant * @param barcode * @param receptionComment * @param user */ public void assignCodeToParticipant(Participant participant, String barcode, String receptionComment, User user); /** * Save the participant, its appointment and metadata. * @param participant */ public void updateParticipant(Participant participant); /** * Get Participant actions. * @param participant * @return */ public List<Action> getActions(Participant participant); /** * Get Participant actions on a stage. * @param participant * @param stage * @return */ public List<Action> getActions(Participant participant, String stage); /** * Get the data for the participant configured attribute. * @param participant * @param attributeName * @return null if no attribute with the given name */ public Data getConfiguredAttributeValue(Participant participant, String attributeName); /** * Get the participant corresponding to the specified template * @param template * @return */ public Participant getParticipant(Participant participant); /** * Lookup for a Participant based on both of its unique identifiers (barcode and enrollmentId). * * @param participantIdentifier The Participant identifier to look for. * @return A Participant matching the specified identifier. * @throws NonUniqueParticipantException If multiple Participant are found for the specified identifier (this is the * case where ParticipantA.barcode == PArticipantB.enrollmentId) an exception is thrown. */ public Participant getParticipant(String participantIdentifier) throws NonUniqueParticipantException; /** * Delete all appointments that have not been received */ public void cleanUpAppointment(); /** * Deletes the participant and his data (including the data stored by each {@link Module} of Onyx) * * @param participant Participant to delete. */ public void deleteParticipant(Participant participant); }
a6cc9bad0c61ae12b6fa3fb0427112c35022cd65
873b4a8f99f236dfe9622f7086e349419569470c
/app/src/main/java/com/donute/tencenthelper/fragments/ContactFragment.java
0996401568e3a3bef4dd499c64518dadf34ac071
[]
no_license
liuxinfeng/android-wechat
18669bd303d6055e48c4b9f85665760236600678
307b507f67b646063b8d85dcb585573e03b32895
refs/heads/master
2020-04-12T17:45:29.515142
2017-09-15T14:10:15
2017-09-15T14:10:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,795
java
package com.donute.tencenthelper.fragments; import android.app.Fragment; import android.content.Intent; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.alibaba.android.vlayout.VirtualLayoutManager; import com.donute.tencenthelper.MainApp; import com.donute.tencenthelper.R; import com.donute.tencenthelper.adapters.ContactAdapter; import com.donute.tencenthelper.chatui.ui.activity.WeChatActivity; import com.donute.tencenthelper.events.ContactUpdateEvent; import com.donute.tencenthelper.listener.OnRecyclerItemClickListener; import com.donute.tencenthelper.utils.Constant; import com.donute.tencenthelper.utils.TipManager; import com.donute.tencenthelper.views.ContactDecoration; import com.donute.wechat.beans.Contact; import com.donute.wechat.beans.msg.AddMsgList; import com.donute.wechat.helpers.LoginHelper; import com.donute.wechat.helpers.WechatManager; import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; import java.util.List; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.Unbinder; public class ContactFragment extends Fragment{ @BindView(R.id.wechat_contact_list) RecyclerView rvContact; private ContactAdapter adapter; private Unbinder unbinder; private LoginHelper loginHelper; VirtualLayoutManager layoutManager; private List<Contact> contactList; private WechatManager wechatManager; public ContactFragment() { } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView=inflater.inflate(R.layout.fragment_contact, container, false); unbinder= ButterKnife.bind(this,rootView); return rootView; } @Override public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); init(); } private void init() { EventBus.getDefault().register(this); wechatManager= MainApp.getWechatManager(); loginHelper =wechatManager.getLoginHelper(); contactList= loginHelper.getContacts(); layoutManager = new VirtualLayoutManager(getActivity()); rvContact.setLayoutManager(layoutManager); rvContact.setHasFixedSize(true); rvContact.addItemDecoration(new ContactDecoration(getActivity(),true,contactList)); rvContact.addOnItemTouchListener(new OnRecyclerItemClickListener(rvContact) { @Override public void onItemClick(RecyclerView.ViewHolder viewHolder, int position) { Contact contact=contactList.get(position); Intent intent=new Intent(getActivity(), WeChatActivity.class); intent.putExtra(Constant.CONTACT_KEY,contact); startActivity(intent); } @Override public void onLongClick(RecyclerView.ViewHolder viewHolder, int position) { } }); adapter=new ContactAdapter(layoutManager,contactList); rvContact.setAdapter(adapter); } @Subscribe(threadMode = ThreadMode.MAIN) public void onMessageEvent(ContactUpdateEvent event) { contactList= loginHelper.getContacts(); adapter.notifyDataSetChanged(); } @Override public void onDestroyView() { super.onDestroyView(); if (unbinder!=null){ unbinder.unbind(); } } @Override public void onDetach() { super.onDetach(); EventBus.getDefault().unregister(this); } }
12cbb75f40294d1b93d3c8dfad12c66b7a0180fd
6d5566e05f10ee76da92cc3aaa396da239fafc05
/src/main/java/com/fundark/salary/bean/Salary.java
eae4a41b1425eda47f1694eb4268302ffe2e85cc
[ "Apache-2.0" ]
permissive
silencefly96/Salary-server
36f2b62c6a8ee50964ea85d7b6d9ef7241906230
1ad40668ea4d89a6f16942e3ad3242f0cefed127
refs/heads/main
2023-04-13T18:58:37.317729
2021-04-25T14:59:54
2021-04-25T14:59:54
361,132,966
0
0
null
null
null
null
UTF-8
Java
false
false
1,012
java
package com.fundark.salary.bean; public class Salary { //工资id private int id; //统计月份,时间为当月最后一天,关联任务开始时间为准 private String time; //员工id private int workerId; //员工姓名 private String worker; //员工工资 private double salary; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getTime() { return time; } public void setTime(String time) { this.time = time; } public int getWorkerId() { return workerId; } public void setWorkerId(int workerId) { this.workerId = workerId; } public String getWorker() { return worker; } public void setWorker(String worker) { this.worker = worker; } public double getSalary() { return salary; } public void setSalary(double salary) { this.salary = salary; } }
200951c3a364801f01a80ee15bc349e988e79b80
06bc1009fe123703185a3e806e449ebdefac3baa
/gokick-common/src/main/java/it/newmedia/gokick/data/enums/EnumAuditType.java
4755bb37ce64746b70d7cd24cd351422b7cb99a3
[]
no_license
Vrizzo/vaicalcio
cec26265a8e6cb56e84806627f2b6ad5f7dacb3b
69df9d33ad5df93478acb003f9b2710817565dbf
refs/heads/master
2021-01-21T18:34:30.995032
2017-06-12T06:13:31
2017-06-12T06:13:31
92,061,277
0
0
null
null
null
null
UTF-8
Java
false
false
1,042
java
package it.newmedia.gokick.data.enums; /** * * Enum che definisce il l'elenco degli audits che possono essere registrati */ public enum EnumAuditType { /** * Login utente */ UserLogin("UserLogin"); private String type; /** * Restituisce la stringa associata ad un enum * @return La stringa corrispondente all'Enum */ public String getValue() { return type; } EnumAuditType(String type) { this.type = type; } /** * Restituisce un EnumCobrandType in funzione della stringa passata * @param auditType Stringa indicante il tipo azione * @return Un istanza di EnumAuditType valida. Se non è possibile * trasformare la stringa viene restituito EnumCobrandType.UserLogin (DEVE esserci qualcosa sempre!) */ public static EnumAuditType getEnum( String auditType ) { for (EnumAuditType enumCobrandType : EnumAuditType.values()) { if( enumCobrandType.getValue().equals(auditType) ) return enumCobrandType; } return EnumAuditType.UserLogin; } }
[ "gokick@5bbe43ed-7e20-41cc-9c66-d7c7ab93afa1" ]
gokick@5bbe43ed-7e20-41cc-9c66-d7c7ab93afa1
ade15df80b5371c58e666c468ec120197b22e4e7
a407678d9973a09183ca556b54d9d35cd7a2b765
/src/main/java/org/darkstorm/darkbot/settings/SettingsHandler.java
e8924e53c41fe5cc473f2dc7f00678b3b969aab5
[ "BSD-2-Clause" ]
permissive
dahquan1/DarkBot
d4920b6f196e9b5a8bffe1adcfe150abc7e88d50
09ff65b67060486eaa723a68e3faf4a6296a194c
refs/heads/master
2020-12-25T04:17:12.624939
2014-03-04T21:02:02
2014-03-04T21:02:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,682
java
package org.darkstorm.darkbot.settings; import java.io.*; import java.util.*; import java.util.Map.Entry; import org.darkstorm.darkbot.tools.FileTools; import org.jdom.*; import org.jdom.input.SAXBuilder; import org.jdom.output.*; /** * @created Jun 30, 2010 at 5:48:44 PM * @author DarkStorm */ public class SettingsHandler { private SettingList settings; private SettingList defaultSettings; private XMLOutputter prettyXMLOutputter; private File settingsFile; private volatile boolean saveSettingsOnExit = true; public SettingsHandler(String directory, String fileName) { this(directory, fileName, new HashMap<String, String>()); } public SettingsHandler(String directory, String fileName, SettingList defaultSettings) { if(fileName == null) throw new NullPointerException(); if(defaultSettings == null) throw new NullPointerException(); this.defaultSettings = defaultSettings; instantiateVariables(directory, fileName); init(); } public SettingsHandler(String directory, String fileName, Map<String, String> defaultSettings) { if(fileName == null) throw new IllegalArgumentException("param 0 (type String) is null"); if(defaultSettings == null) throw new IllegalArgumentException( "param 1 (type HashMap<String, String>) is null"); instantiateVariables(directory, fileName); this.defaultSettings = produceSettingsFromMap(defaultSettings); init(); } private SettingList produceSettingsFromMap(Map<String, String> settingsMap) { SettingList settings = new SettingList(); for(Entry<String, String> entry : settingsMap.entrySet()) { String entryKey = entry.getKey(); String entryValue = entry.getValue(); if(entryKey == null || entryValue == null) continue; Setting setting = new Setting(entry.getKey(), entry.getValue()); settings.add(setting); } return settings; } private void instantiateVariables(String directory, String fileName) { settings = new SettingList(); locateSettingsFileDir(directory, fileName); prettyXMLOutputter = new XMLOutputter(Format.getPrettyFormat()); } private void locateSettingsFileDir(String directory, String fileName) { File settingsFileDir = FileTools.getDirectoryFormatted(directory); if(!settingsFileDir.exists()) settingsFileDir.mkdirs(); settingsFile = new File(settingsFileDir.getPath() + "/" + fileName + ".xml"); } private void init() { createShutdownHook(); reloadSettings(); addMissingDefaultSettings(); } private void createShutdownHook() { Runtime runtime = Runtime.getRuntime(); Runnable shutdownRunnable = new Runnable() { @Override public void run() { if(saveSettingsOnExit) saveSettings(); } }; Thread shutdownHook = new Thread(shutdownRunnable); runtime.addShutdownHook(shutdownHook); } public final void reloadSettings() { synchronized(settingsFile) { settings.clear(); checkFile(); readAndParseDocuments(); System.gc(); } } private void checkFile() { if(!settingsFile.exists()) { settings.addAll(defaultSettings); saveSettings(); } } private void readAndParseDocuments() { try { List<Element> settingElementList = readDocument(); parseElementsToSettings(settingElementList); addMissingDefaultSettings(); } catch(JDOMException e) { System.err.println("The settings file is corrupt or invalid."); } catch(IOException exception) { System.err.println("Unable to connect/read error"); } } @SuppressWarnings("unchecked") private List<Element> readDocument() throws JDOMException, IOException { Document doc = new SAXBuilder().build(settingsFile); Element rootElement = doc.getRootElement(); return rootElement.getChildren("setting"); } private void parseElementsToSettings(List<Element> settingElementList) { for(Element settingElement : settingElementList) { Setting setting = createSettingForElement(settingElement); settings.add(setting); } } private Setting createSettingForElement(Element element) { String key = element.getAttributeValue("key"); String value = element.getAttributeValue("value"); if(value == null) value = ""; SettingList subSettings = readSubSettings(element); Setting setting = new Setting(key, value, subSettings); return setting; } private SettingList readSubSettings(Element settingElement) { SettingList subSettings = new SettingList(); Element subSettingContainer = settingElement.getChild("subsettings"); if(subSettingContainer != null) { readSubSettingElements(subSettingContainer, subSettings); } return subSettings; } @SuppressWarnings("unchecked") private void readSubSettingElements(Element subSettingContainer, SettingList subSettings) { List<Element> subSettingElements = subSettingContainer .getChildren("setting"); for(Element subSettingElement : subSettingElements) { Setting subSetting = createSettingForElement(subSettingElement); subSettings.add(subSetting); } } private void addMissingDefaultSettings() { for(Setting defaultSetting : defaultSettings) { String defaultSettingKey = defaultSetting.getKey(); boolean containsDefaultSetting = false; for(Setting setting : settings) { String settingKey = setting.getKey(); if(settingKey.equals(defaultSettingKey)) containsDefaultSetting = true; } if(!containsDefaultSetting) settings.add(defaultSetting); } } public final void saveSettings() { synchronized(settingsFile) { try { Document doc = new Document(new Element("settings")); Element rootElement = doc.getRootElement(); for(Setting setting : settings) { if(setting != null && setting.getKey() != null) { Element settingElement = createElementForSetting(setting); handleSubSettings(setting, settingElement); rootElement.addContent(settingElement); } } FileWriter fileWriterToSettingsFile = new FileWriter( settingsFile); prettyXMLOutputter.output(doc, fileWriterToSettingsFile); fileWriterToSettingsFile.close(); } catch(Exception e) { System.err.println("Error while saving settings to " + settingsFile.getPath()); } System.gc(); } } private void handleSubSettings(Setting setting, Element settingElement) { SettingList subSettings = setting.getSubSettings(); if(subSettings.size() > 0) { Element subSettingsElement = new Element("subsettings"); createSubSettingElements(subSettings, subSettingsElement); settingElement.addContent(subSettingsElement); } } private void createSubSettingElements(SettingList subSettings, Element subSettingsElement) { for(Setting subSetting : subSettings) { if(subSetting != null && subSetting.getKey() != null) { Element subSettingElement = createElementForSetting(subSetting); subSettingsElement.addContent(subSettingElement); } } } private Element createElementForSetting(Setting setting) { Element settingElement = new Element("setting"); settingElement.setAttribute("key", setting.getKey()); String settingValue = setting.getValue(); if(settingValue != null && !settingValue.equals("")) settingElement.setAttribute("value", setting.getValue()); return settingElement; } public SettingList getSettings() { return settings; } public void setSaveSettingsOnExit(boolean saveSettingsOnExit) { this.saveSettingsOnExit = saveSettingsOnExit; } public boolean isSaveSettingsOnExit() { return saveSettingsOnExit; } }
fa82cf08eab37f77ae698ac4df487ffd6d3c32a5
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_7d87b79653ca3fee7ab1121a771ed6c363476fb8/MacInputStream/2_7d87b79653ca3fee7ab1121a771ed6c363476fb8_MacInputStream_s.java
9d7259ffc1539eb824aaac4d02db64c4e20e3cea
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,008
java
package org.bouncycastle.cms; import java.io.IOException; import java.io.InputStream; import javax.crypto.Mac; class MacInputStream extends InputStream { private final InputStream inStream; private final Mac mac; MacInputStream(InputStream inStream, Mac mac) { this.inStream = inStream; this.mac = mac; } public int read(byte[] buf) throws IOException { return read(buf, 0, buf.length); } public int read(byte[] buf, int off, int len) throws IOException { int i = inStream.read(buf, off, len); if (i > 0) { mac.update(buf, off, i); } return i; } public int read() throws IOException { int i = inStream.read(); if (i > 0) { mac.update((byte)i); } return i; } public byte[] getMac() { return mac.doFinal(); } }
32a12ae1dbf6991668c83f225693f55da91d5cb8
ef1c393afbb8210ec75f8ea56ddd5e5fe57eb236
/app/src/main/java/com/example/myapplication/car/Car.java
5ce4104196f6bc7c0c02ecf3cf9a9a8f8dbaf495
[]
no_license
dinmiranda/dagger_trial
c971921b7dd20be31df251fe9362663f7a98da66
6aaf87bfcd84179a0ba407c4ff56e7e00d5577fb
refs/heads/master
2023-01-09T18:17:36.926011
2020-11-16T08:37:40
2020-11-16T08:37:40
305,311,331
0
0
null
null
null
null
UTF-8
Java
false
false
716
java
package com.example.myapplication.car; import android.util.Log; import com.example.myapplication.dagger.PerActivity; import javax.inject.Inject; @PerActivity public class Car { private static final String TAG = "Car"; private Driver driver; private final Engine engine; private final Wheels wheels; @Inject public Car(Driver driver, Engine engine, Wheels wheels) { this.driver = driver; this.engine = engine; this.wheels = wheels; } @Inject public void enableRemote(Remote remote) { remote.setListener(this); } public void drive() { engine.start(); Log.d(TAG, driver + " " + driver.name + " drives " + this); } }
774d7384b1d067f3f2cf3a1e563a6015de99c174
889b5bc66866f3aca85691529a444c675073fec9
/oop_Crash/ArrayElement/src/com/techlab/nameStartwith/TestArray.java
615b91458ba69307a619380164c08ed17119b3d6
[]
no_license
Trupti567/SwabhavTechlabs
d66c5656c104a3e14985d287ce183bc1b3d62e93
e679b9332ebef09d6ef581e3411216fee659a9d9
refs/heads/master
2020-04-08T15:33:18.029720
2019-01-10T08:32:41
2019-01-10T08:32:41
159,483,497
0
0
null
null
null
null
UTF-8
Java
false
false
344
java
package com.techlab.nameStartwith; public class TestArray { public static void main(String[] args) { String names[]=new String[]{"Trupti","Nikita","Karishma","vaishu"}; TestArray2 array=new TestArray2(); String filterednames[]=array.getAllNamesWithS(names); for(String name2:filterednames) { System.out.println(name2); } } }
36d699fe818f99e77a69f42ee183200c1a1e960b
be6493f7b63c997df4c46f6e51683e509443a9a7
/src/test/java/utilities/PropReader.java
80b8df8ecaf91fda4eaa4c7dbd60f8946eeca156
[]
no_license
shilpiee2/Appium-Parallel-Exec--Android-IOS
42a912e748adec07948a0d778d9b490f8c9a9f99
46a9975a4aaa7db07011b2b67fe2daca6052d1ed
refs/heads/master
2020-05-19T04:27:03.182130
2019-05-06T20:50:37
2019-05-06T20:50:37
184,826,348
1
0
null
null
null
null
UTF-8
Java
false
false
2,218
java
package utilities; import java.io.FileInputStream; import java.io.IOException; import java.util.Properties; public class PropReader { private static PropReader instance; private static final Object lock = new Object(); private static String deviceName; private static String udid; private static String platformName; private static String platformVersion; private static String appPackage; private static String appActivity; private static String noReset; private static String URL; private PropReader() { } public static PropReader GetInstance() { if (instance == null) { synchronized (lock) { if (instance == null) { instance = new PropReader(); instance.LoadDeviceData(); } } } return instance; } private void LoadDeviceData() { Properties prop = new Properties(); try { prop.load(new FileInputStream("device-configuration.properties")); } catch (IOException e) { System.out.println("Device Configuration properties file cannot be found"); } deviceName = prop.getProperty("DeviceName"); udid = prop.getProperty("UDID"); platformName = prop.getProperty("PlatformName"); platformVersion = prop.getProperty("PlatformVersion"); appPackage = prop.getProperty("AppPackage"); appActivity = prop.getProperty("AppActivity"); noReset = prop.getProperty("NoReset"); URL = prop.getProperty("URL"); } //Getters (Get Methods) public static String getDeviceName(){ return deviceName; } public static String getUDID(){ return udid; } public static String getPlatformName(){ return platformName; } public static String getPlatformVersion(){ return platformVersion; } public static String getAppPackage(){ return appPackage; } public static String getAppActivity(){ return appActivity; } public static String getNoReset(){ return noReset; } public static String getURL(){ return URL; } }
4723d18da295ee420aa152c6eed7b3af1c28e0e1
6b623fa4ce706827037adf56f4bf3b91f51a7d9a
/Kaprekar number/Main.java
cb4b19193a8dc5cc470ef634fd765132eac3ba96
[]
no_license
kavyasri-anupa/Playground
667546ac81690cf572f7bccb3dcd60806421fb9f
d2269044cb8490421bf1e02401f3876c910b3188
refs/heads/master
2022-11-08T02:28:06.141250
2020-06-21T13:14:14
2020-06-21T13:14:14
269,717,766
0
0
null
null
null
null
UTF-8
Java
false
false
395
java
#include<string> #include<iostream> using namespace std; int main() { int num,f,s; cin>>num; int sqrvalue=num*num; string str=to_string(num); int length=str.length(); int div=1; for(int i=0;i<length;i++){ div*=10; s=sqrvalue%div; f=sqrvalue/div; if(f+s==num){ cout<<"Kaprekar Number"; break; } } if(f+s!=num){ cout<<"Not a Kaprekar Number"; } }
080ad3f73943f695ca7e1a2cb8b3edbcf08ef592
2df28ac782745293b9623e3c7562ca8ae61702b3
/caseStudies/Jest/Jest-master/jest-common/src/test/java/io/searchbox/indices/CloseIndexTest.java
58681c1162bd7bcfc7ecb70c054becdbbd8bf190
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
benbehringer/peopl
81b9508b2893533e6576b0a71f60e7698f6b6d01
8a1bbde434d3ef381507741d0dbaf6a56b9b7574
refs/heads/master
2022-05-30T18:37:57.799489
2019-05-25T11:44:23
2019-05-25T11:44:23
123,710,183
7
3
Apache-2.0
2021-08-09T20:52:33
2018-03-03T16:31:59
Java
UTF-8
Java
false
false
1,038
java
package io.searchbox.indices; import org.junit.Test; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; /** * @author cihat keser */ public class CloseIndexTest { @Test public void testBasicUrlGeneration() { CloseIndex closeIndex = new CloseIndex.Builder("twitter").build(); assertEquals("POST", closeIndex.getRestMethodName()); assertEquals("twitter/_close", closeIndex.getURI()); } @Test public void equalsReturnsTrueForSameIndices() { CloseIndex closeIndex1 = new CloseIndex.Builder("twitter").build(); CloseIndex closeIndex1Duplicate = new CloseIndex.Builder("twitter").build(); assertEquals(closeIndex1, closeIndex1Duplicate); } @Test public void equalsReturnsFalseForDifferentIndices() { CloseIndex closeIndex1 = new CloseIndex.Builder("twitter").build(); CloseIndex closeIndex2 = new CloseIndex.Builder("myspace").build(); assertNotEquals(closeIndex1, closeIndex2); } }
1ebda581f2550aab6a7de1844c7f56c638c246cf
a0477e396e410883fc7cda8a46fa31f85ff8c1ad
/helloworld/src/main/java/com/demo/streamx/Generator.java
1068f6436263a5a1931ffe03412197de93b29911
[ "MIT" ]
permissive
kingreatwill/java_study
1103c693eb2e45e7dab1c875f74da61fd24e22a2
089c910af815c12dbf118e4a76df3b759d25c3e3
refs/heads/master
2022-11-24T07:57:52.517950
2020-01-15T08:00:24
2020-01-15T08:00:24
205,988,202
0
0
MIT
2022-11-16T11:33:18
2019-09-03T04:21:17
Java
UTF-8
Java
false
false
851
java
package com.demo.streamx; import java.util.Random; import java.util.function.Supplier; import java.util.stream.Collectors; import java.util.stream.Stream; public class Generator implements Supplier<String> { Random rand = new Random(47); char[] letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".toCharArray(); public String get() { return "" + letters[rand.nextInt(letters.length)]; } public static void main(String[] args) { String word = Stream.generate(new Generator()) .limit(30) .collect(Collectors.joining()); System.out.println(word); Stream.generate(() -> "duplicate") .limit(3) .forEach(System.out::println); Stream.generate(Bubble::bubbler) .limit(5) .forEach(System.out::println); } }
2f9d2149dbccb5546d32781edb077c89129d61b7
919515034129a712a0cb02acd59b6b7b198ecfc1
/app/src/main/java/com/example/simplechatapplication/view/HomeActivity.java
f4a92065720cd864d194b75e2bbe72ce83eb39cf
[]
no_license
yigitkemal/SimpleChatApplication
8f03b9a6a96d1914a06e0ba50e85af159afbfd5d
1aa81c9260447e806bf7d75ad4dc812e87cb793f
refs/heads/master
2023-09-04T00:49:11.947873
2021-10-14T08:09:13
2021-10-14T08:09:13
415,897,247
0
0
null
null
null
null
UTF-8
Java
false
false
5,173
java
package com.example.simplechatapplication.view; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import androidx.recyclerview.widget.DefaultItemAnimator; import androidx.recyclerview.widget.LinearLayoutManager; import android.content.Intent; import android.os.Bundle; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; import android.view.View; import android.widget.Toast; import com.example.simplechatapplication.R; import com.example.simplechatapplication.adapter.HomeRecyclerviewAdapter; import com.example.simplechatapplication.databinding.ActivityHomeBinding; import com.google.firebase.auth.FirebaseAuth; 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.Query; import com.google.firebase.database.ServerValue; import com.google.firebase.database.ValueEventListener; import com.onesignal.OneSignal; import java.util.ArrayList; import java.util.HashMap; import java.util.UUID; public class HomeActivity extends AppCompatActivity { ActivityHomeBinding binding; private FirebaseAuth mAuth; FirebaseDatabase database; DatabaseReference databaseReference; HomeRecyclerviewAdapter homeRecyclerviewAdapter; private ArrayList<String> chatMessages = new ArrayList<>(); private static final String ONESIGNAL_APP_ID = "7e777d90-968d-4237-948f-195709804a6a"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); binding = ActivityHomeBinding.inflate(getLayoutInflater()); View view = binding.getRoot(); setContentView(view); homeRecyclerviewAdapter = new HomeRecyclerviewAdapter(chatMessages); binding.recyclerView.setLayoutManager(new LinearLayoutManager(getApplicationContext())); binding.recyclerView.setItemAnimator(new DefaultItemAnimator()); binding.recyclerView.setAdapter(homeRecyclerviewAdapter); mAuth = FirebaseAuth.getInstance(); database = FirebaseDatabase.getInstance("https://chatapplication-c841c-default-rtdb.europe-west1.firebasedatabase.app/"); databaseReference = database.getReference(); getData(); OneSignal.setLogLevel(OneSignal.LOG_LEVEL.VERBOSE,OneSignal.LOG_LEVEL.NONE); OneSignal.initWithContext(this); OneSignal.setAppId(ONESIGNAL_APP_ID); } @Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater menuInflater = getMenuInflater(); menuInflater.inflate(R.menu.menu, menu); return super.onCreateOptionsMenu(menu); } @Override public boolean onOptionsItemSelected(@NonNull MenuItem item) { if (item.getItemId() == R.id.menu_profile) { startActivity(new Intent(HomeActivity.this, ProfileActivity.class)); } else if (item.getItemId() == R.id.menu_signout) { mAuth.signOut(); startActivity(new Intent(HomeActivity.this, MainActivity.class)); } else { } return super.onOptionsItemSelected(item); } public void sendMessage(View view) { String messageToSend = binding.messageText.getText().toString(); UUID uuid = UUID.randomUUID(); String uuidString = uuid.toString(); databaseReference.child("Chats") .child(uuidString) .child("usermessage") .setValue(messageToSend); databaseReference.child("Chats") .child(uuidString) .child("useremail") .setValue(mAuth.getCurrentUser().getEmail().toString()); databaseReference.child("Chats") .child(uuidString) .child("usermessagetime") .setValue(ServerValue.TIMESTAMP); binding.messageText.setText(""); } public void getData(){ DatabaseReference newReference = database.getReference("Chats"); Query query = newReference.orderByChild("usermessagetime"); query.addValueEventListener(new ValueEventListener() { @Override public void onDataChange(@NonNull DataSnapshot snapshot) { chatMessages.clear(); for(DataSnapshot ds: snapshot.getChildren()){ HashMap<String, String> hashMap = (HashMap<String, String>) ds.getValue(); String userEmail = hashMap.get("useremail"); String userMessage = hashMap.get("usermessage"); System.out.println(userMessage+"-----------------------------------------"); chatMessages.add(userEmail +" "+userMessage); homeRecyclerviewAdapter.notifyDataSetChanged(); } } @Override public void onCancelled(@NonNull DatabaseError error) { Toast.makeText(getApplicationContext(),error.getMessage().toString(),Toast.LENGTH_LONG).show(); } }); } }
fcc83a6cc6a5d6ca6ae40078d3129029889837bb
42d49a2c4ff372f2f97d5622fc2ddcdf89bee19c
/src/main/java/NEO/Core/BookKeeping.java
674f93f6c4e70dda1d4923b3abf3ab576f9da31e
[ "MIT" ]
permissive
allendongyx/neoj
418fe9e3e79b4e47f97406af6d26bab4a919313c
afdbc5152bbc068abdac61800151afa3919a4cf5
refs/heads/master
2020-03-22T00:19:16.695397
2018-06-06T09:35:11
2018-06-06T09:35:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
581
java
package NEO.Core; import java.io.IOException; import NEO.IO.BinaryReader; import NEO.IO.BinaryWriter; public class BookKeeping extends Transaction { private long nonce; // nonce is not exist when version=2 public BookKeeping() { super(TransactionType.BookKeeping); } @Override protected void deserializeExclusiveData(BinaryReader reader) throws IOException { if(version == 3) { nonce = reader.readLong(); } } @Override protected void serializeExclusiveData(BinaryWriter writer) throws IOException { if(version == 3) { writer.writeLong(nonce); } } }
66d80a84d49e5973a98947aa819328cb573d2daf
4399b42937dbc4255f2b9d091ff4765d217864cd
/Solutions/containsDuplicate.java
dd7a911e33fb88216b6e862817846a6cd7c77a1a
[]
no_license
rohan1959/LeetCode-Practice
4b7703ede38e7e906503e44796ad3c8d3a03746a
f21fc67292d8b524a3299a57e7dd2ad4fbe939db
refs/heads/master
2021-09-10T16:58:13.468521
2018-03-29T19:48:51
2018-03-29T19:48:51
125,582,217
0
0
null
null
null
null
UTF-8
Java
false
false
490
java
Problem : Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return false if every element is distinct. Solution : public class Solution { public boolean containsDuplicate(int[] nums) { HashSet<Integer> hash = new HashSet<>(); for(int i =0;i<nums.length;i++){ if(!hash.add(nums[i])) return true; } return false; } }
d64a6a65e3069d3ed07ed1d9ba3b2bf558f599e0
c9ebec84d0096f90baee091868e3dab7342b8013
/commands/src/main/java/org/wildfly/extras/creaper/commands/elytron/tls/AddKeyManager.java
a32ac4302ec3710ec9f1a6481fc9a1635e04785a
[ "Apache-2.0" ]
permissive
wildfly-extras/creaper
f6e7bb411c895ef7d57c905af7a8b2e334577749
6cb92d412e4edab9658492e6ca3707c5783e4a86
refs/heads/main
2023-08-22T04:39:49.822379
2023-07-06T15:40:49
2023-07-07T07:56:08
44,525,387
21
28
Apache-2.0
2023-07-07T07:56:10
2015-10-19T09:47:10
Java
UTF-8
Java
false
false
5,570
java
package org.wildfly.extras.creaper.commands.elytron.tls; import org.wildfly.extras.creaper.commands.elytron.CredentialRef; import org.wildfly.extras.creaper.commands.foundation.offline.xml.GroovyXmlTransform; import org.wildfly.extras.creaper.commands.foundation.offline.xml.Subtree; import org.wildfly.extras.creaper.core.ServerVersion; import org.wildfly.extras.creaper.core.offline.OfflineCommand; import org.wildfly.extras.creaper.core.offline.OfflineCommandContext; import org.wildfly.extras.creaper.core.online.OnlineCommand; import org.wildfly.extras.creaper.core.online.OnlineCommandContext; import org.wildfly.extras.creaper.core.online.operations.Address; import org.wildfly.extras.creaper.core.online.operations.Operations; import org.wildfly.extras.creaper.core.online.operations.Values; import org.wildfly.extras.creaper.core.online.operations.admin.Administration; public final class AddKeyManager implements OnlineCommand, OfflineCommand { private final String name; private final String algorithm; private final String aliasFilter; private final String keyStore; private final CredentialRef credentialReference; private final String providerName; private final String providers; private final boolean replaceExisting; private AddKeyManager(Builder builder) { this.name = builder.name; this.algorithm = builder.algorithm; this.aliasFilter = builder.aliasFilter; this.keyStore = builder.keyStore; this.providerName = builder.providerName; this.providers = builder.providers; this.credentialReference = builder.credentialReference; // Replace existing this.replaceExisting = builder.replaceExisting; } @Override public void apply(OnlineCommandContext ctx) throws Exception { if (ctx.version.lessThan(ServerVersion.VERSION_5_0_0)) { throw new AssertionError("Elytron is available since WildFly 11."); } Operations ops = new Operations(ctx.client); Address keyManagerAddress = Address.subsystem("elytron").and("key-manager", name); if (replaceExisting) { ops.removeIfExists(keyManagerAddress); new Administration(ctx.client).reloadIfRequired(); } ops.add(keyManagerAddress, Values.empty() .and("key-store", keyStore) .andObject("credential-reference", credentialReference.toValues()) .andOptional("algorithm", algorithm) .andOptional("alias-filter", aliasFilter) .andOptional("provider-name", providerName) .andOptional("providers", providers)); } @Override public void apply(OfflineCommandContext ctx) throws Exception { if (ctx.version.lessThan(ServerVersion.VERSION_5_0_0)) { throw new AssertionError("Elytron is available since WildFly 11."); } ctx.client.apply(GroovyXmlTransform.of(AddKeyManager.class) .subtree("elytronSubsystem", Subtree.subsystem("elytron")) .parameter("atrName", name) .parameter("atrAlgorithm", algorithm) .parameter("atrAliasFilter", aliasFilter) .parameter("atrKeyStore", keyStore) .parameters(credentialReference.toParameters()) .parameter("atrProviderName", providerName) .parameter("atrProviders", providers) .parameter("atrReplaceExisting", replaceExisting) .build()); } public static final class Builder { private final String name; private String algorithm; private String aliasFilter; private String keyStore; private CredentialRef credentialReference; private String providerName; private String providers; private boolean replaceExisting; public Builder(String name) { if (name == null || name.isEmpty()) { throw new IllegalArgumentException("Name of the key-manager must be specified as non empty value"); } this.name = name; } public Builder algorithm(String algorithm) { this.algorithm = algorithm; return this; } public Builder aliasFilter(String aliasFilter) { this.aliasFilter = aliasFilter; return this; } public Builder keyStore(String keyStore) { this.keyStore = keyStore; return this; } public Builder providerName(String providerName) { this.providerName = providerName; return this; } public Builder providers(String providers) { this.providers = providers; return this; } public Builder credentialReference(CredentialRef credentialReference) { this.credentialReference = credentialReference; return this; } public Builder replaceExisting() { this.replaceExisting = true; return this; } public AddKeyManager build() { if (keyStore == null || keyStore.isEmpty()) { throw new IllegalArgumentException("key-store must not be null and must include at least one entry"); } if (credentialReference == null) { throw new IllegalArgumentException("Credential reference of the key-manager must be specified"); } return new AddKeyManager(this); } } }
7934b5acbd4a6e483e0dac8070d9baca1a927f99
abb8d7318ffda2a82953583f13709b7588b94bcf
/src/com/tek/interview/question/Foo.java
750b2cc6c39dc15d89d252447995a14f0aba622a
[]
no_license
gangulagoutham/OrderPrjt
1733bc571820a0cb5476f5865b4da5e8d20f9c68
18bfe73fd3a5ad9cfcf14e3d09bce248bb6a36c7
refs/heads/master
2021-01-12T11:51:02.210143
2016-09-30T15:52:33
2016-09-30T15:52:33
69,590,182
0
0
null
null
null
null
UTF-8
Java
false
false
6,244
java
package com.tek.interview.question; import static org.junit.Assert.*; import java.math.BigDecimal; import java.math.RoundingMode; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.TreeMap; import org.junit.Test; /* **************************************************************************************** Please remove all bugs from the code below to get the following output: <pre> *******Order 1******* 1 book: 13.74 1 music CD: 16.49 1 chocolate bar: 0.94 Sales Tax: 2.84 Total: 28.33 *******Order 2******* 1 imported box of chocolate: 11.5 1 imported bottle of perfume: 54.62 Sales Tax: 8.62 Total: 57.5 *******Order 3******* 1 Imported bottle of perfume: 32.19 1 bottle of perfume: 20.89 1 packet of headache pills: 10.73 1 box of imported chocolates: 12.94 Sales Tax: 8.77 Total: 67.98 Sum of orders: 153.81 </pre> ******************************************************************************************** */ /* * represents an item, contains a price and a description. * */ class Item { private String description; private float price; public Item(String description, float price) { super(); this.description = description; this.price = price; } public String getDescription() { return description; } public float getPrice() { return price; } } /* * represents an order line which contains the @link Item and the quantity. * */ class OrderLine { private int quantity; private Item item; /* * @param item Item of the order * * @param quantity Quantity of the item */ public OrderLine(Item item, int quantity) throws Exception { if (item == null) { System.err.println("ERROR - Item is NULL"); throw new Exception("Item is NULL"); } assert quantity > 0; //bug2 this.item = item; this.quantity = quantity; } public Item getItem() { return item; } public int getQuantity() { return quantity; } } class Order { //bug1 private List<OrderLine> orderLines=new ArrayList<OrderLine>(); public void add(OrderLine o) throws Exception { if (o == null) { System.err.println("ERROR - Order is NULL"); throw new IllegalArgumentException("Order is NULL"); } orderLines.add(o); } public int size() { return orderLines.size(); } public OrderLine get(int i) { return orderLines.get(i); } public void clear() { this.orderLines.clear(); } } class calculator { //bug7 changed rounding method public static double rounding(double value) { return ( Math.round(value * 100.0)) / 100.0; } /** * receives a collection of orders. For each order, iterates on the order lines and calculate the total price which * is the item's price * quantity * taxes. * * For each order, print the total Sales Tax paid and Total price without taxes for this order */ public void calculate(Map<String, Order> o) { double grandtotal = 0; // Iterate through the orders for (Map.Entry<String, Order> entry : o.entrySet()) { System.out.println("*******" + entry.getKey() + "*******"); //bug11 removed setting grandtotal to zero Order r = entry.getValue(); double totalTax = 0; double total = 0; // Iterate through the items in the order //bug3 for (int i = 0; i <r.size(); i++) { // Calculate the taxes double tax = 0; //bug12 added toLowecase item description if (r.get(i).getItem().getDescription().toLowerCase().contains("imported")) { tax = rounding(r.get(i).getItem().getPrice() * 0.15); // Extra 5% tax on // imported items } else { tax = rounding(r.get(i).getItem().getPrice() * 0.10); } //bug8 removed math.floor for tax // Calculate the total price double totalprice = r.get(i).getItem().getPrice() + tax; //bug9 used rounding when ever needed // Print out the item's total price System.out.println(r.get(i).getQuantity()+" "+r.get(i).getItem().getDescription() + ": " + rounding(totalprice)); // Keep a running total totalTax += tax; total += r.get(i).getItem().getPrice(); } // Print out the total taxes System.out.println("Sales Tax: " + rounding(totalTax)); //bug10 changed the total calculation // Print out the total amount System.out.println("Total: " + rounding(total)); grandtotal += total; } System.out.println("Sum of orders: " + rounding(grandtotal)); } } public class Foo { public static void main(String[] args) throws Exception { //bug6 used TreeMap for sorting orders Map<String, Order> o = new TreeMap<String, Order>(); Order c1 = new Order(); double grandTotal = 0; c1.add(new OrderLine(new Item("book", (float) 12.49), 1)); c1.add(new OrderLine(new Item("music CD", (float) 14.99), 1)); c1.add(new OrderLine(new Item("chocolate bar", (float) 0.85), 1)); o.put("Order 1", c1); // Reuse cart for an other order //c.clear(); Order c2 = new Order(); c2.add(new OrderLine(new Item("imported box of chocolate", 10), 1)); c2.add(new OrderLine(new Item("imported bottle of perfume", (float) 47.50), 1)); o.put("Order 2", c2); // Reuse cart for an other order //c.clear(); Order c3 = new Order(); c3.add(new OrderLine(new Item("Imported bottle of perfume", (float) 27.99), 1)); c3.add(new OrderLine(new Item("bottle of perfume", (float) 18.99), 1)); c3.add(new OrderLine(new Item("packet of headache pills", (float) 9.75), 1)); //bug13 modified the grammatical error c3.add(new OrderLine(new Item("box of imported chocolates", (float) 11.25), 1)); o.put("Order 3", c3); new calculator().calculate(o); } private static final double DELTA = 1e-15; //testcase for adding item @Test public void testAddItem() { assertEquals(10.0, new Item("book",10).getPrice(),DELTA); } //testcase for adding OrderLine @Test public void testAddOrderLine() throws Exception { assertEquals(1, new OrderLine(new Item("Imported bottle of perfume", (float) 27.99), 1).getQuantity()); } //testcase for adding Order @Test public void testAddOrder() throws Exception { Order c3 = new Order(); c3.add(new OrderLine(new Item("Imported bottle of perfume", (float) 27.99), 1)); assertEquals(1,c3.size()); } }
[ "Goutham Gangula" ]
Goutham Gangula