package home;
|
|
import java.awt.Desktop;
|
import java.awt.event.ActionEvent;
|
import java.awt.event.ActionListener;
|
import java.awt.event.KeyEvent;
|
import java.beans.PropertyVetoException;
|
import java.net.URI;
|
import javax.swing.ImageIcon;
|
import javax.swing.JDesktopPane;
|
import javax.swing.JInternalFrame;
|
import javax.swing.JLabel;
|
import javax.swing.JMenu;
|
import javax.swing.JMenuItem;
|
|
import Frame.*;
|
import LedShow.LEDPreview;
|
import LedShow.LedSet;
|
import PbuliClass.GetTxt;
|
import PbuliClass.Systems;
|
import PbuliClass.jmenu;
|
import relloc.RealLoc;
|
import rtkanchor.Now_rtk_move;
|
import rtkanchor.Rtkac_manage;
|
import tbDataModel_Dell.Map_Dell;
|
|
/**
|
* ¸ÃÀàÓÃÓÚ´´½¨²Ëµ¥À¸
|
*/
|
public class CreatMenuBar {
|
JDesktopPane desk = null;//ÉêÃ÷ÄÚ²¿´°Ìå
|
JMenu homepage = null;
|
JMenu gas_detection = null;//ÆøÌå¼ì²â
|
JMenu tagManage = null;
|
JMenu anchorManage = null;
|
JMenu jm_gps = null;//ÎÀÐǶ¨Î»
|
JMenu electricFence = null;
|
JMenu warning = null;
|
JMenu basicInformation = null;
|
JMenu trajectory = null;
|
JMenu kaoQing = null;
|
JMenu systemMaintenance = null;
|
JMenu engineManage = null;//ÒýÇæ¹ÜÀí
|
JMenu mapManage = null;
|
JMenu window = null;
|
JMenu help = null;
|
JMenu led = null;
|
RealLoc relloc = null;
|
TagPowerManage tagp = null;
|
StyleChoose styl = null;
|
TagHistoryPower hspower = null;
|
LookUdpTxt lokktxt = null;
|
Tag_IFrame tagiframe = null;
|
AnchorManage anchor_manage = null;
|
Fence fence = null;
|
FenceTable fence_table = null;
|
WarningManage warning_manage = null;
|
RealInWarningTable real_inwarning_table = null;
|
HistoryInWarningTable history_inwarning_table = null;
|
IconManagement icon_mangement = null;
|
DepartMentManage DepartMentManage1 = null;
|
PersonManage person_manage = null;
|
TagReaLocation tag_real_location = null;
|
TrackData track_data = null;
|
TrackPlay track_play = null;
|
RealKaoQingTable real_kaoqing_table = null;
|
KaoQingMage kaoqing_manage = null;
|
ModBusManage modbusm = null;
|
SystemSet system_set = null;
|
UserManage user_manage = null;
|
MapManage map_manage = null;
|
Versions version1 = null;
|
AnchorSet anchorset = null;
|
AnchorNearby anchornearby = null;
|
DebugManage debugmanage = null;
|
AnchorTongbuSet anchortrongbu = null;
|
BaoWenHuiFang baowenhf = null;//±¨ÎĻطÅ
|
S2Manage s2manage = null;
|
Tasktable tasktable = null;
|
ChaoyuanAndtime chaoyuan = null;
|
JinchumenWarnig jcmwaring = null;
|
|
JMenuItem addTag = null;
|
JMenuItem gas_manage = null;
|
JMenuItem gas_hiss = null;
|
JMenuItem colletc = null;
|
JMenuItem sendtag_jmenu = null;
|
JMenuItem datafword_jmenu = null;
|
JMenuItem anchorset_jmenu = null;
|
JMenuItem debug = null;
|
|
JInternalFrame[] allFrames = null;
|
DataBackAndRestore data_back_and_restore = null;
|
TcpIpManage tcp_server = null;
|
GasManage gsam = null;
|
GasHistory gashis = null;
|
CollectorManege collem = null;
|
ForwardManage forwoard;
|
LedSet ledshow = null;
|
LEDPreview led_prev = null;
|
SuanFaManage suanfa_manage = null;
|
AcPowerManage acPowerManage = null;
|
anchor_lixian_record lixianjl=null;
|
SendTag sendtag = null;
|
ForwardManage forword = null;//Êý¾Ýת·¢
|
WifiMange wifimanage = null;
|
Xunjian_Set xunjianset = null;//Ѳ¼ìÉèÖÃ
|
Xunjian_JL xunjianjl = null;//Ѳ¼ì¼Ç¼
|
Fence_inout_Set fence_ins = null;//ÇøÓò½øÈëȨÏÞÏÞÖÆ
|
Gps_Manage gps_manage = null;
|
Gps_data_hui_fang gdhf = null;
|
Gps_data_hui_fang gdhf1 = null;
|
CompanyController companyController = null;
|
SuanfaTable sftable = null;
|
BujuFrame bjy = null;
|
Julidebug juli = null;
|
ShipingManage shiping = null;
|
Tagstate tagsta = null;
|
UtrSet utrs = null;
|
Rtkac_manage rtkmanage = null;
|
Now_rtk_move nowrtk = null;
|
Tool tool = null;
|
Messagesendjilu msjl = null;
|
Heart_record heartrcd = null;
|
Taglixianrecord tgrcd = null;//±êÇ©ÀëÏ߼Ǽ±í
|
COFram cof = null;
|
Gas_anchor_frame gasanchor=null;//ÆøÑ¹¼Æ»ùÕ¾Ò³Ãæ
|
Tag_gas_value taggas;//±êǩУ׼״̬
|
|
public JDesktopPane getDest() {
|
if (desk == null) {
|
desk = new JDesktopPane();
|
final JLabel backJLabel = new JLabel();
|
ImageIcon icon = new ImageIcon(GetTxt.getTxt("BG", "BG"));//×ÀÃæµÄ±³¾°Í¼
|
backJLabel.setIcon(icon);
|
backJLabel.setBounds(0, 0, icon.getIconWidth(), icon.getIconHeight());
|
desk.add(backJLabel, new Integer(Integer.MIN_VALUE));
|
allFrames = desk.getAllFrames();
|
}
|
return desk;
|
}
|
|
//ÉèÖô°ÌåµÄ³õʼλÖÃ
|
public int getDestNum() {
|
allFrames = desk.getAllFrames();
|
int titleBarHight = 30 * allFrames.length;
|
return titleBarHight;
|
}
|
|
/**
|
* Ö÷Ò³¹ÜÀí
|
*/
|
public JMenu getHomepage() {
|
if (homepage == null) {
|
String name = "Çл»µØÍ¼";
|
if (Systems.sys().getLanguage().equals("English")) {
|
name = "MAP";
|
}
|
homepage = jmenu.getJmenu(name, "image/icon/mapicon.png");
|
for (int i = 0; i < Map_Dell.getMap_vector().size(); i++) {
|
String tuceng = Map_Dell.getMap_vector().get(i).getFloor();
|
String imageName = Map_Dell.getMap_vector().get(i).getMapname();
|
String imageName2[] = imageName.split("\\.");
|
JMenuItem floor = jmenu.createJmenuItem(imageName2[0]);
|
floor.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
relloc = new RealLoc(tuceng,imageName2[0]);
|
relloc.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(relloc);
|
try {
|
relloc.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
});
|
homepage.add(floor);
|
}
|
}
|
return homepage;
|
}
|
|
|
/**
|
* LEDͶÆÁ¹ÜÀí
|
*/
|
public JMenu get_LED_Manage() {
|
if (led == null) {
|
String name = "ͶÆÁ";
|
String name2 = "ͶÆÁÉèÖÃ";
|
String name3 = "ͶÆÁÔ¤ÀÀ";
|
String name4 = "°²È«²½¾à";
|
if (Systems.sys().getLanguage().equals("English")) {
|
name = "LED";
|
name2 = "LedSet";
|
name3 = "LedShow";
|
name4 = "Buju";
|
}
|
led = jmenu.getJmenu(name, "image/icon/LED.png");
|
|
JMenuItem led_show = jmenu.createJmenuItem(name2);
|
JMenuItem led_pre = jmenu.createJmenuItem(name3);
|
JMenuItem buju = jmenu.createJmenuItem(name4);
|
led_show.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (ledshow == null || ledshow.isClosed()) {
|
ledshow = new LedSet();
|
ledshow.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(ledshow);
|
try {
|
ledshow.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
|
}
|
});
|
|
led_pre.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (led_prev == null || led_prev.isClosed()) {
|
led_prev = new LEDPreview();
|
led_prev.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(led_prev);
|
try {
|
led_prev.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
|
}
|
});
|
|
buju.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (bjy == null || bjy.isClosed()) {
|
bjy = new BujuFrame();
|
bjy.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(bjy);
|
try {
|
bjy.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
led.add(led_show);
|
led.add(led_pre);
|
led.add(buju);
|
}
|
return led;
|
}
|
|
|
public JMenu get_gas_Manage() {
|
if (gas_detection == null) {
|
String name = "ÆøÌå";
|
String name1 = "ÆøÌå´«¸ÐÆ÷";
|
String name2 = "ÀúʷŨ¶ÈÖµ";
|
String name3 = "ÆøÌå²É¼¯ÒÇ";
|
if (Systems.sys().getLanguage().equals("English")) {
|
name = "GAS";
|
name1 = "GasSensor";
|
name2 = "GasHistory";
|
name3 = "GasCollector";
|
}
|
gas_detection = jmenu.getJmenu(name, "image/icon/gas.png");
|
|
if (gas_manage == null) {
|
gas_manage = jmenu.createJmenuItem(name1);
|
gas_manage.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (gsam == null || gsam.isClosed()) {
|
gsam = new GasManage();
|
gsam.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(gsam);
|
try {
|
gsam.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
}
|
|
if (gas_hiss == null) {
|
gas_hiss = jmenu.createJmenuItem(name2);
|
gas_hiss.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (gashis == null || gashis.isClosed()) {
|
gashis = new GasHistory();
|
gashis.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(gashis);
|
try {
|
gashis.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
}
|
|
if (colletc == null) {
|
colletc = jmenu.createJmenuItem(name3);
|
colletc.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (collem == null || collem.isClosed()) {
|
collem = new CollectorManege();
|
collem.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(collem);
|
try {
|
collem.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
}
|
|
}
|
gas_detection.add(gas_manage);
|
gas_detection.add(gas_hiss);
|
gas_detection.add(colletc);
|
return gas_detection;
|
}
|
|
|
/**
|
* ±êÇ©¹ÜÀí
|
*/
|
public JMenu getTagManage() {
|
if (tagManage == null) {
|
String name = "±êÇ©¹ÜÀí";
|
String name1 = "±êÇ©¹ÜÀí";
|
String name2 = "±êÇ©·¢·Å";
|
String name3 = "ʵʱµçÁ¿";
|
String name4 = "ÀúÊ·µçÁ¿";
|
String name5 = "±êǩ״̬";
|
String name6 = "ÆøÑ¹Ð£×¼";
|
if (Systems.sys().getLanguage().equals("English")) {
|
name = "TAG";
|
name1 = "TagManage";
|
name2 = "TagAssign";
|
name3 = "TagElectricity";
|
name4 = "HistoryBattery";
|
name5 = "state";
|
name5 = "gasvalue";
|
}
|
tagManage = jmenu.getJmenu(name, "image/icon/tagicon.png");
|
|
if (addTag == null) {
|
addTag = jmenu.createJmenuItem(name1);
|
addTag.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (tagiframe == null || tagiframe.isClosed()) {
|
tagiframe = new Tag_IFrame();
|
tagiframe.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(tagiframe);
|
try {
|
tagiframe.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
}
|
|
|
if (sendtag_jmenu == null) {
|
sendtag_jmenu = jmenu.createJmenuItem(name2);
|
sendtag_jmenu.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (sendtag == null || sendtag.isClosed()) {
|
sendtag = new SendTag();
|
sendtag.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(sendtag);
|
try {
|
sendtag.setSelected(true);
|
sendtag.setVisible(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
}
|
|
|
JMenuItem tagPower = jmenu.createJmenuItem(name3);
|
JMenuItem taghisPower = jmenu.createJmenuItem(name4);
|
JMenuItem tagstate = jmenu.createJmenuItem(name5);
|
JMenuItem gasvalue = jmenu.createJmenuItem(name6);
|
|
tagPower.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (tagp == null || tagp.isClosed()) {
|
tagp = new TagPowerManage();
|
tagp.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(tagp);
|
try {
|
tagp.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
taghisPower.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (hspower == null || hspower.isClosed()) {
|
hspower = new TagHistoryPower();
|
hspower.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(hspower);
|
try {
|
hspower.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
tagstate.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (tagsta == null || tagsta.isClosed()) {
|
tagsta = new Tagstate();
|
tagsta.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(tagsta);
|
try {
|
tagsta.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
gasvalue.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (taggas == null || taggas.isClosed()) {
|
taggas = new Tag_gas_value();
|
taggas.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(taggas);
|
try {
|
taggas.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
|
tagManage.add(addTag);
|
tagManage.add(sendtag_jmenu);
|
tagManage.add(tagPower);
|
tagManage.add(taghisPower);
|
tagManage.add(tagstate);
|
if(Systems.isIssanwei()) {
|
tagManage.add(gasvalue);
|
}
|
}
|
return tagManage;
|
}
|
|
|
/**
|
* »ùÕ¾¹ÜÀí
|
*/
|
public JMenu getAnchorManage() {
|
if (anchorManage == null) {
|
String name = "»ùÕ¾¹ÜÀí";
|
String name1 = "»ùÕ¾¹ÜÀí";
|
String name2 = "»ùÕ¾ÅäÖÃ";
|
String name3 = "ÁÙ½üÅäÖÃ";
|
String name4 = "ͬ²½ÅäÖÃ";
|
String name5 = "Ëã·¨ÅäÖÃ";
|
String name6 = "ÍøÂç¹ÜÀí";
|
String name7 = "WIFI¹ÜÀí";
|
String name8 = "ÀúÊ·µçÁ¿";
|
String name9 = "ÀëÏ߼Ǽ";
|
String name10="Ëã·¨Åä±í";
|
String name11="ÆøÑ¹»ùÕ¾";
|
if (Systems.sys().getLanguage().equals("English")) {
|
name = "ANCHOR";
|
name1 = "AnchorManage";
|
name2 = "AnchorSite";
|
name3 = "AnchorCloseTo";
|
name4 = "Synchronize";
|
name5 = "SuanfaSet";
|
name6 = "NetworkSite";
|
name7 = "WifiSite";
|
name8 = "HistoryPower";
|
name9 = "lixianRcord";
|
name10 = "suanfa";
|
name11 = "gasanchor";
|
}
|
anchorManage = jmenu.getJmenu(name, "image/icon/anchoricon.png");
|
|
JMenuItem anchorMana = jmenu.createJmenuItem(name1);
|
anchorMana.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (anchor_manage == null || anchor_manage.isClosed()) {
|
anchor_manage = new AnchorManage();
|
anchor_manage.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(anchor_manage);
|
try {
|
anchor_manage.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
JMenuItem anchorIP = jmenu.createJmenuItem(name6);
|
anchorIP.addActionListener(new ActionListener() {
|
@Override
|
public void actionPerformed(ActionEvent e) {
|
if (s2manage == null || s2manage.isClosed()) {
|
s2manage = new S2Manage();
|
s2manage.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(s2manage);
|
try {
|
s2manage.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
|
|
}
|
});
|
|
anchorset_jmenu = jmenu.createJmenuItem(name2);//
|
anchorset_jmenu.addActionListener(new ActionListener() {
|
@Override
|
public void actionPerformed(ActionEvent e) {
|
// TODO ×Ô¶¯Éú³ÉµÄ·½·¨´æ¸ù
|
if (anchorset == null || anchorset.isClosed()) {
|
anchorset = new AnchorSet();
|
anchorset.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(anchorset);
|
try {
|
anchorset.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
JMenuItem anchor_near = jmenu.createJmenuItem(name3);
|
anchor_near.addActionListener(new ActionListener() {
|
@Override
|
public void actionPerformed(ActionEvent e) {
|
// TODO ×Ô¶¯Éú³ÉµÄ·½·¨´æ¸ù
|
if (anchornearby == null || anchornearby.isClosed()) {
|
anchornearby = new AnchorNearby();
|
anchornearby.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(anchornearby);
|
try {
|
anchornearby.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
JMenuItem anchor_wifi = jmenu.createJmenuItem(name7);
|
anchor_wifi.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (wifimanage == null || wifimanage.isClosed()) {
|
wifimanage = new WifiMange();
|
wifimanage.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(wifimanage);
|
try {
|
wifimanage.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
|
|
}
|
});
|
|
JMenuItem anchoroot = jmenu.createJmenuItem(name4);
|
anchoroot.addActionListener(new ActionListener() {
|
@Override
|
public void actionPerformed(ActionEvent e) {
|
// TODO ×Ô¶¯Éú³ÉµÄ·½·¨´æ¸ù
|
if (anchortrongbu == null || anchortrongbu.isClosed()) {
|
anchortrongbu = new AnchorTongbuSet();
|
anchortrongbu.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(anchortrongbu);
|
try {
|
anchortrongbu.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
|
JMenuItem suanfaset = jmenu.createJmenuItem(name5);
|
suanfaset.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
|
if (suanfa_manage == null || suanfa_manage.isClosed()) {
|
suanfa_manage = new SuanFaManage();
|
suanfa_manage.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(suanfa_manage);
|
try {
|
suanfa_manage.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
|
}
|
});
|
|
|
JMenuItem hisPow = jmenu.createJmenuItem(name8);
|
hisPow.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
|
if (acPowerManage == null || acPowerManage.isClosed()) {
|
acPowerManage = new AcPowerManage();
|
acPowerManage.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(acPowerManage);
|
try {
|
acPowerManage.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
|
}
|
});
|
|
JMenuItem lixian = jmenu.createJmenuItem(name9);
|
lixian.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
|
if (lixianjl == null || lixianjl.isClosed()) {
|
lixianjl = new anchor_lixian_record();
|
lixianjl.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(lixianjl);
|
try {
|
lixianjl.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
|
}
|
});
|
|
|
JMenuItem suanfab = jmenu.createJmenuItem(name10);
|
suanfab.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (sftable == null || sftable.isClosed()) {
|
sftable = new SuanfaTable();
|
sftable.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(sftable);
|
try {
|
sftable.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
JMenuItem gasac = jmenu.createJmenuItem(name11);
|
gasac.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (gasanchor== null || gasanchor.isClosed()) {
|
gasanchor= new Gas_anchor_frame();
|
gasanchor.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(gasanchor);
|
try {
|
gasanchor.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
anchorManage.add(anchorMana);
|
anchorManage.add(anchorset_jmenu);
|
anchorManage.add(anchor_near);
|
anchorManage.add(anchoroot);
|
anchorManage.add(suanfaset);
|
anchorManage.add(suanfab);
|
anchorManage.add(anchorIP);
|
anchorManage.add(anchor_wifi);
|
if (Systems.isWuxian()){
|
anchorManage.add(hisPow);
|
}
|
anchorManage.add(lixian);
|
if (Systems.isIssanwei()){
|
anchorManage.add(gasac);
|
}
|
}
|
return anchorManage;
|
|
}
|
|
/**
|
* ÎÀÐǶ¨Î»
|
*/
|
public JMenu getJm_gps() {
|
if (jm_gps == null) {
|
String name = "ÎÀÐǶ¨Î»";
|
String name1 = "URTÊý¾Ý";
|
String name2 = "URTÉèÖÃ";
|
String name3 = "²î·Ö»ùÕ¾";
|
String name4 = "µ±Ç°Á¬½Ó";
|
|
if (Systems.sys().getLanguage().equals("English")) {
|
name = "GPS";
|
name1 = "GpsData";
|
name2 = "URTSET";
|
name3 = "RTKAC";
|
name4 = "NOWRTK";
|
}
|
jm_gps = jmenu.getJmenu(name, "image/icon/gpsm.png");
|
|
JMenuItem jmi_gps = jmenu.createJmenuItem(name1);
|
JMenuItem jmi_urt = jmenu.createJmenuItem(name2);
|
JMenuItem jmi_rtk = jmenu.createJmenuItem(name3);
|
JMenuItem jmi_nowrtk = jmenu.createJmenuItem(name4);
|
|
jmi_gps.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (gps_manage == null || gps_manage.isClosed()) {
|
gps_manage = new Gps_Manage();
|
gps_manage.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(gps_manage);
|
try {
|
gps_manage.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
|
jmi_urt.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (utrs == null || utrs.isClosed()) {
|
utrs = new UtrSet();
|
utrs.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(utrs);
|
try {
|
utrs.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
jmi_rtk.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (rtkmanage == null || rtkmanage.isClosed()) {
|
rtkmanage = new Rtkac_manage();
|
rtkmanage.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(rtkmanage);
|
try {
|
rtkmanage.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
jmi_nowrtk.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (nowrtk == null || nowrtk.isClosed()) {
|
nowrtk = new Now_rtk_move();
|
nowrtk.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(nowrtk);
|
try {
|
nowrtk.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
|
jm_gps.add(jmi_gps);
|
jm_gps.add(jmi_urt);
|
jm_gps.add(jmi_rtk);
|
jm_gps.add(jmi_nowrtk);
|
}
|
return jm_gps;
|
}
|
|
/**
|
* ΧÀ¸¹ÜÀí
|
*/
|
public JMenu getElectricFence() {
|
if (electricFence == null) {
|
String name = "ΧÀ¸¹ÜÀí";
|
String name1 = "ΧÀ¸»æÖÆ";
|
String name2 = "ΧÀ¸Áбí";
|
String name3 = "Ѳ¼ìÉèÖÃ";
|
String name4 = "Ѳ¼ì¼Ç¼";
|
String name5 = "ÇøÓòÉèÖÃ";
|
String name6 = "ÈÎÎñÁбí";
|
String name7 = "³¬Ô±³¬Ê±";
|
if (Systems.sys().getLanguage().equals("English")) {
|
name = "FENCE";
|
name1 = "DrawFence";
|
name2 = "FenceList";
|
name3 = "InspectionSite";
|
name4 = "InspectionRecord";
|
name5 = "AreaSite";
|
name6 = "TASK";
|
name7 = "OUTTIME";
|
}
|
electricFence = jmenu.getJmenu(name, "image/icon/fenceicon.png");
|
|
JMenuItem PaintedFence = jmenu.createJmenuItem(name1);
|
JMenuItem fenceList = jmenu.createJmenuItem(name2);
|
JMenuItem xunjset = jmenu.createJmenuItem(name3);
|
JMenuItem xunjjl = jmenu.createJmenuItem(name4);
|
JMenuItem fenceset = jmenu.createJmenuItem(name5);
|
JMenuItem jm_tasktable = jmenu.createJmenuItem(name6);
|
JMenuItem jm_outtime = jmenu.createJmenuItem(name7);
|
PaintedFence.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (fence == null || fence.isClosed()) {
|
fence = new Fence();
|
fence.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(fence);
|
try {
|
fence.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
fenceList.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (fence_table == null || fence_table.isClosed()) {
|
fence_table = new FenceTable();
|
fence_table.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(fence_table);
|
try {
|
fence_table.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
xunjset.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (xunjianset == null || xunjianset.isClosed()) {
|
xunjianset = new Xunjian_Set();
|
xunjianset.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(xunjianset);
|
try {
|
xunjianset.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
xunjjl.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (xunjianjl == null || xunjianjl.isClosed()) {
|
xunjianjl = new Xunjian_JL();
|
xunjianjl.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(xunjianjl);
|
try {
|
xunjianjl.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
fenceset.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (fence_ins == null || fence_ins.isClosed()) {
|
fence_ins = new Fence_inout_Set();
|
fence_ins.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(fence_ins);
|
try {
|
fence_ins.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
jm_tasktable.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (tasktable == null || tasktable.isClosed()) {
|
tasktable = new Tasktable();
|
tasktable.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(tasktable);
|
try {
|
tasktable.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
jm_outtime.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (chaoyuan == null || chaoyuan.isClosed()) {
|
chaoyuan = new ChaoyuanAndtime();
|
chaoyuan.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(chaoyuan);
|
try {
|
chaoyuan.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
electricFence.add(PaintedFence);
|
electricFence.add(fenceList);
|
electricFence.add(xunjset);
|
electricFence.add(xunjjl);
|
electricFence.add(fenceset);
|
electricFence.add(jm_tasktable);
|
electricFence.add(jm_outtime);
|
}
|
return electricFence;
|
}
|
|
|
/**
|
* ¸æ¾¯¹ÜÀí
|
*/
|
public JMenu getWarning() {
|
if (warning == null) {
|
String name = "¸æ¾¯¹ÜÀí";
|
String name1 = "¸æ¾¯»ã×Ü";
|
String name2 = "ʵʱ¸æ¾¯";
|
String name3 = "ÀúÊ·¸æ¾¯";
|
String name4 = "½ø³ö¸æ¾¯";
|
String name5 = "ÀëÏ߸澯";
|
|
if (Systems.sys().getLanguage().equals("English")) {
|
name = "WARNING";
|
name1 = "AllWarning";
|
name2 = "RealWarnig";
|
name3 = "HistoryWarnig";
|
name4 = "InOutWarning";
|
name5 = "lixianWarning";
|
}
|
warning = jmenu.getJmenu(name, "image/icon/sosicon.png");
|
|
JMenuItem warmesage = jmenu.createJmenuItem(name1);
|
JMenuItem inWaringMesage = jmenu.createJmenuItem(name2);
|
JMenuItem historyInw = jmenu.createJmenuItem(name3);
|
JMenuItem intoutw = jmenu.createJmenuItem(name4);
|
JMenuItem lixianw = jmenu.createJmenuItem(name5);
|
|
warmesage.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (warning_manage == null || warning_manage.isClosed()) {
|
warning_manage = new WarningManage();
|
warning_manage.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(warning_manage);
|
try {
|
warning_manage.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
inWaringMesage.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (real_inwarning_table == null || real_inwarning_table.isClosed()) {
|
real_inwarning_table = new RealInWarningTable();
|
real_inwarning_table.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(real_inwarning_table);
|
try {
|
real_inwarning_table.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
historyInw.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (history_inwarning_table == null || history_inwarning_table.isClosed()) {
|
history_inwarning_table = new HistoryInWarningTable();
|
history_inwarning_table.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(history_inwarning_table);
|
try {
|
history_inwarning_table.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
intoutw.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (jcmwaring == null || jcmwaring.isClosed()) {
|
jcmwaring = new JinchumenWarnig();
|
jcmwaring.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(jcmwaring);
|
try {
|
jcmwaring.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
lixianw.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (tgrcd == null || tgrcd.isClosed()) {
|
tgrcd = new Taglixianrecord();
|
tgrcd.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(tgrcd);
|
try {
|
tgrcd.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
warning.add(warmesage);
|
warning.add(inWaringMesage);
|
warning.add(historyInw);
|
warning.add(intoutw);
|
warning.add(lixianw);
|
}
|
return warning;
|
}
|
|
|
/**
|
* »ù´¡ÐÅÏ¢¹ÜÀí
|
*/
|
public JMenu getBasicInformation() {
|
if (basicInformation == null) {
|
String name = "»ù´¡ÐÅÏ¢";
|
String name1 = "ÈËÔ±¹ÜÀí";
|
String name2 = "²¿ÃŹÜÀí";
|
String name3 = "ͼ±ê¹ÜÀí";
|
String name4 = "ÊÓÆµ¹ÜÀí";
|
String name5 = "Êý¾Ý»Ø·Å";
|
String name6 = "¹«Ë¾¹ÜÀí";
|
|
|
if (Systems.sys().getLanguage().equals("English")) {
|
name = "BASIC";
|
name1 = "IconManage";
|
name2 = "Department";
|
name3 = "Person";
|
name4 = "video";
|
name5 = "huifang";
|
name6 = "company";
|
}
|
basicInformation = jmenu.getJmenu(name, "image/icon/renyuanicon.png");
|
|
JMenuItem personManage = jmenu.createJmenuItem(name1);
|
JMenuItem DepartMentManage = jmenu.createJmenuItem(name2);
|
JMenuItem iconManege = jmenu.createJmenuItem(name3);
|
JMenuItem video = jmenu.createJmenuItem(name4);
|
JMenuItem jmi_data = jmenu.createJmenuItem(name5);
|
JMenuItem company = jmenu.createJmenuItem(name6);
|
|
|
iconManege.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (icon_mangement == null || icon_mangement.isClosed()) {
|
icon_mangement = new IconManagement();
|
icon_mangement.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(icon_mangement);
|
try {
|
icon_mangement.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
|
}
|
});
|
|
DepartMentManage.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (DepartMentManage1 == null || DepartMentManage1.isClosed()) {
|
DepartMentManage1 = new DepartMentManage();
|
DepartMentManage1.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(DepartMentManage1);
|
try {
|
DepartMentManage1.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
personManage.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (person_manage == null || person_manage.isClosed()) {
|
person_manage = new PersonManage();
|
person_manage.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(person_manage);
|
try {
|
person_manage.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
video.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (shiping == null || shiping.isClosed()) {
|
shiping = new ShipingManage();
|
shiping.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(shiping);
|
try {
|
shiping.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
jmi_data.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (gdhf == null || gdhf.isClosed()) {
|
gdhf = new Gps_data_hui_fang();
|
gdhf.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(gdhf);
|
try {
|
gdhf.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
company.addActionListener(new ActionListener() {
|
@Override
|
public void actionPerformed(ActionEvent e) {
|
if (companyController == null || companyController.isClosed()) {
|
companyController = new CompanyController();
|
companyController.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(companyController);
|
try {
|
companyController.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
basicInformation.add(personManage);
|
basicInformation.add(DepartMentManage);
|
basicInformation.add(iconManege);
|
basicInformation.add(video);
|
basicInformation.add(jmi_data);
|
basicInformation.add(company);
|
|
|
}
|
return basicInformation;
|
}
|
|
|
/**
|
* ÀúÊ·¹ì¼£¹ÜÀí
|
*/
|
public JMenu getTrajectory() {
|
if (trajectory == null) {
|
String name = "ÀúÊ·¹ì¼£";
|
String name1 = "ʵʱλÖÃ";
|
String name2 = "¹ì¼£Êý¾Ý";
|
String name3 = "²éѯ¹ì¼£";
|
if (Systems.sys().getLanguage().equals("English")) {
|
name = "TRAJECTORY";
|
name1 = "RealLocation";
|
name2 = "LocationData";
|
name3 = "QueryTrajectory";
|
}
|
trajectory = jmenu.getJmenu(name, "image/icon/guijiicon.png");
|
|
JMenuItem realocation = jmenu.createJmenuItem(name1);
|
JMenuItem trackDate = jmenu.createJmenuItem(name2);
|
JMenuItem trackQuery = jmenu.createJmenuItem(name3);
|
realocation.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (tag_real_location == null || tag_real_location.isClosed()) {
|
tag_real_location = new TagReaLocation();
|
tag_real_location.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(tag_real_location);
|
try {
|
tag_real_location.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
trackDate.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (track_data == null || track_data.isClosed()) {
|
track_data = new TrackData();
|
track_data.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(track_data);
|
try {
|
track_data.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
trackQuery.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (track_play == null || track_play.isClosed()) {
|
track_play = new TrackPlay();
|
track_play.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(track_play);
|
try {
|
track_play.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
trajectory.add(realocation);
|
trajectory.add(trackDate);
|
trajectory.add(trackQuery);
|
}
|
return trajectory;
|
}
|
|
|
/**
|
* ¿¼ÇÚ¹ÜÀí
|
*/
|
public JMenu getKaoQing() {
|
if (kaoQing == null) {
|
String name = "ͳ¼Æ±¨±í";
|
String name1 = "ʵʱ¿¼ÇÚ";
|
String name2 = "ÀúÊ·¿¼ÇÚ";
|
String name3 = "ÐÄÂʼǼ";
|
String name4 = "ÐÅÏ¢¼Ç¼";
|
String name5 = "Ò»Ñõ»¯Ì¼";
|
|
if (Systems.sys().getLanguage().equals("English")) {
|
name = "ATTENDANCE";
|
name1 = "RealAttendance";
|
name2 = "HistoryAttendance";
|
name3 = "INFO";
|
name4 = "HERAT";
|
name5 = "CO";
|
}
|
kaoQing = jmenu.getJmenu(name, "image/icon/kaoqingicon.png");
|
|
JMenuItem kaoQing_1 = jmenu.createJmenuItem(name1);
|
JMenuItem kaoQing_2 = jmenu.createJmenuItem(name2);
|
JMenuItem heartrc = jmenu.createJmenuItem(name3);
|
JMenuItem mesrecord = jmenu.createJmenuItem(name4);
|
JMenuItem co = jmenu.createJmenuItem(name5);
|
|
kaoQing_1.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (real_kaoqing_table == null || real_kaoqing_table.isClosed()) {
|
real_kaoqing_table = new RealKaoQingTable();
|
real_kaoqing_table.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(real_kaoqing_table);
|
try {
|
real_kaoqing_table.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
kaoQing_2.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (kaoqing_manage == null || kaoqing_manage.isClosed()) {
|
kaoqing_manage = new KaoQingMage();
|
kaoqing_manage.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(kaoqing_manage);
|
try {
|
kaoqing_manage.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
|
heartrc.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (heartrcd == null || heartrcd.isClosed()) {
|
heartrcd = new Heart_record();
|
heartrcd.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(heartrcd);
|
try {
|
heartrcd.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
mesrecord.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (msjl == null || msjl.isClosed()) {
|
msjl = new Messagesendjilu();
|
msjl.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(msjl);
|
try {
|
msjl.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
co.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (cof == null || cof.isClosed()) {
|
cof = new COFram();
|
cof.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(cof);
|
try {
|
cof.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
kaoQing.add(kaoQing_1);
|
kaoQing.add(kaoQing_2);
|
kaoQing.add(heartrc);
|
kaoQing.add(mesrecord);
|
kaoQing.add(co);
|
|
}
|
return kaoQing;
|
}
|
|
|
/**
|
* ϵͳ¹ÜÀí
|
*/
|
public JMenu getSyStemMaintenance() {
|
if (systemMaintenance == null) {
|
String name = "ϵͳ";
|
String name1 = "±¨ÎIJ鿴";
|
String name2 = "ÆøÌ屨ÎÄ";
|
String name3 = "ϵͳÉèÖÃ";
|
String name4 = "Êý¾Ýת·¢";
|
String name5 = "Óû§¹ÜÀí";
|
String name6 = "±¸·Ý»Ö¸´";
|
String name7 = "±¨ÎĻطÅ";
|
String name8 = "ϵͳµ÷ÊÔ";
|
String name10 = "²â¾à·ÖÎö";
|
String name11 = "¿ì½Ý¼ÆËã";
|
if (Systems.sys().getLanguage().equals("English")) {
|
name = "SYSTEM";
|
name1 = "MessageView";
|
name2 = "GasMessage";
|
name3 = "SystemSite";
|
name4 = "ForwardingSite";
|
name5 = "UserManage";
|
name6 = "BackupRestore";
|
name7 = "MessagePlayback";
|
name8 = "Debugging";
|
name11 = "FastTool";
|
}
|
systemMaintenance = jmenu.getJmenu(name, "image/icon/systemicon.png");
|
|
JMenuItem tcpserver = jmenu.createJmenuItem(name1);
|
JMenuItem modbus = jmenu.createJmenuItem(name2);
|
JMenuItem sysSet = jmenu.createJmenuItem(name3);
|
datafword_jmenu = jmenu.createJmenuItem(name4);
|
JMenuItem user = jmenu.createJmenuItem(name5);
|
JMenuItem backdata = jmenu.createJmenuItem(name6);
|
JMenuItem baowenh = jmenu.createJmenuItem(name7);
|
JMenuItem julif = jmenu.createJmenuItem(name10);
|
JMenuItem fasttool = jmenu.createJmenuItem(name11);
|
|
julif.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
|
if (juli == null || juli.isClosed()) {
|
juli = new Julidebug();
|
juli.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(juli);
|
try {
|
juli.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
|
}
|
});
|
|
baowenh.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
|
if (gdhf1 == null || baowenhf.isClosed()) {
|
gdhf1 = new Gps_data_hui_fang();
|
gdhf1.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(gdhf1);
|
try {
|
gdhf1.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
|
}
|
});
|
|
|
tcpserver.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
|
if (tcp_server == null || tcp_server.isClosed()) {
|
tcp_server = new TcpIpManage();
|
tcp_server.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(tcp_server);
|
try {
|
tcp_server.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
|
}
|
});
|
|
sysSet.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (system_set == null || system_set.isClosed()) {
|
system_set = new SystemSet();
|
system_set.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(system_set);
|
try {
|
system_set.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
user.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (user_manage == null || user_manage.isClosed()) {
|
user_manage = new UserManage();
|
user_manage.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(user_manage);
|
try {
|
user_manage.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
|
backdata.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (data_back_and_restore == null || data_back_and_restore.isClosed()) {
|
data_back_and_restore = new DataBackAndRestore();
|
data_back_and_restore.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(data_back_and_restore);
|
try {
|
data_back_and_restore.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
|
}
|
});
|
|
//Êý¾Ýת·¢
|
datafword_jmenu.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
|
if (forword == null || forword.isClosed()) {
|
forword = new ForwardManage();
|
forword.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(forword);
|
try {
|
forword.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
|
}
|
});
|
|
|
modbus.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (modbusm == null || modbusm.isClosed()) {
|
modbusm = new ModBusManage();
|
modbusm.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(modbusm);
|
try {
|
modbusm.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
|
if (debug == null) {
|
debug = jmenu.createJmenuItem(name8);
|
debug.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (debugmanage == null || debugmanage.isClosed()) {
|
debugmanage = new DebugManage();
|
debugmanage.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(debugmanage);
|
try {
|
debugmanage.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
}
|
|
|
|
fasttool.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (tool == null || tool.isClosed()) {
|
tool = new Tool();
|
tool.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(tool);
|
try {
|
tool.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
|
systemMaintenance.add(tcpserver);
|
systemMaintenance.add(sysSet);
|
systemMaintenance.add(datafword_jmenu);
|
systemMaintenance.add(debug);
|
systemMaintenance.add(user);
|
systemMaintenance.add(backdata);
|
systemMaintenance.add(baowenh);
|
systemMaintenance.add(julif);
|
systemMaintenance.add(fasttool);
|
|
|
}
|
return systemMaintenance;
|
}
|
|
|
/**
|
* µØÍ¼¹ÜÀí
|
*/
|
public JMenu getMapManage() {
|
if (mapManage == null) {
|
String name = "µØÍ¼¹ÜÀí";
|
if (Systems.sys().getLanguage().equals("English")) {
|
name = "MapManage";
|
}
|
mapManage = jmenu.getJmenu(name, "image/icon/addmapicon.png");
|
|
JMenuItem addMap = jmenu.createJmenuItem(name);
|
addMap.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (map_manage == null || map_manage.isClosed()) {
|
map_manage = new MapManage();
|
map_manage.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(map_manage);
|
try {
|
map_manage.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
mapManage.add(addMap);
|
|
}
|
return mapManage;
|
}
|
|
/**
|
* ´°¿Ú¹ÜÀí
|
*/
|
public JMenu getWindow() {
|
if (window == null) {
|
String name = "´°¿Ú";
|
String name1 = "´°¿Ú²ãµþ";
|
String name2 = "È«²¿×îС";
|
String name3 = "»¹ÔÈ«²¿";
|
String name4 = "ϵͳ·ç¸ñ";
|
if (Systems.sys().getLanguage().equals("English")) {
|
name = "WINDOW";
|
name1 = "WindowCascade";
|
name2 = "Minimize";
|
name3 = "Reduction";
|
name4 = "SystemStyle";
|
}
|
window = jmenu.getJmenu(name, "image/icon/styleicon.png");
|
|
JMenuItem pingpuItem = jmenu.createJmenuItem(name1);
|
JMenuItem allIconItem = jmenu.createJmenuItem(name2);
|
JMenuItem allResumeItem = jmenu.createJmenuItem(name3);
|
JMenuItem choosestye = jmenu.createJmenuItem(name4);
|
|
pingpuItem.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
JInternalFrame[] allFrames = desk.getAllFrames();
|
int x = 0, y = 0;
|
for (JInternalFrame iFrame : allFrames) {
|
iFrame.setLocation(x, y);
|
try {
|
iFrame.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
e1.printStackTrace();
|
}
|
int frameH = iFrame.getPreferredSize().height;
|
int panelH = iFrame.getContentPane().getPreferredSize().height;
|
int fSpacing = frameH - panelH;
|
x += fSpacing;
|
y += fSpacing;
|
if (x + iFrame.getWidth() / 2 > desk.getWidth())
|
x = 0;
|
if (y + iFrame.getHeight() / 2 > desk.getHeight())
|
y = 0;
|
}
|
}
|
});
|
|
//È«²¿×îС»¯¼àÌý
|
allIconItem.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
JInternalFrame[] allFrames = desk.getAllFrames();
|
for (JInternalFrame frame : allFrames) {
|
try {
|
frame.setIcon(true);
|
} catch (PropertyVetoException e1) {
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
//È«²¿»¹Ô¼àÌý
|
allResumeItem.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
JInternalFrame[] allFrames = desk.getAllFrames();
|
for (JInternalFrame frame : allFrames) {
|
try {
|
frame.setIcon(false);
|
} catch (PropertyVetoException e1) {
|
e1.printStackTrace();
|
}
|
}
|
|
}
|
});
|
|
|
choosestye.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (styl == null || styl.isClosed()) {
|
styl = new StyleChoose();
|
styl.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(styl);
|
try {
|
styl.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
window.add(pingpuItem);
|
window.add(allIconItem);
|
window.add(allResumeItem);
|
window.add(choosestye);
|
}
|
return window;
|
}
|
|
|
/**
|
* °ïÖú
|
*/
|
public JMenu getHelp() {
|
if (help == null) {
|
String name = "°ïÖú";
|
String name1 = "Í˳öÈí¼þ";
|
String name2 = "¼¼ÊõÖ§³Ö";
|
String name3 = "°æ±¾ÐÅÏ¢";
|
if (Systems.sys().getLanguage().equals("English")) {
|
name = "HELP";
|
name1 = "ExitSystem";
|
name2 = "Support";
|
name3 = "Version";
|
}
|
help = jmenu.getJmenu(name, "image/icon/versionicon.png");
|
|
JMenuItem quit = jmenu.createJmenuItem(name1);
|
JMenuItem helpItem = jmenu.createJmenuItem(name2);
|
JMenuItem version = jmenu.createJmenuItem(name3);
|
quit.setMnemonic(KeyEvent.VK_Q);//Ö÷Ò³Ìí¼Ó¿ì½Ý¼ü
|
quit.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
System.exit(0);
|
}
|
});
|
|
helpItem.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (Desktop.isDesktopSupported()) {
|
Desktop desktop = Desktop.getDesktop();
|
try {
|
URI uri = new URI("mailto:hxzk@hxzk.com");
|
desktop.mail(uri);
|
} catch (Exception e1) {
|
e1.printStackTrace();
|
}
|
}
|
|
}
|
});
|
|
version.addActionListener(new ActionListener() {
|
public void actionPerformed(ActionEvent e) {
|
if (version1 == null || version1.isClosed()) {
|
version1 = new Versions();
|
version1.setLocation(340 + getDestNum(), 20 + getDestNum());
|
desk.add(version1);
|
try {
|
version1.setSelected(true);
|
} catch (PropertyVetoException e1) {
|
// TODO ×Ô¶¯Éú³ÉµÄ catch ¿é
|
e1.printStackTrace();
|
}
|
}
|
}
|
});
|
|
|
help.add(quit);
|
help.add(helpItem);
|
// help.add(zhuces);
|
help.add(version);
|
|
}
|
return help;
|
}
|
|
|
}
|