List of usage examples for javax.swing SwingConstants LEFT
int LEFT
To view the source code for javax.swing SwingConstants LEFT.
Click Source Link
From source file:edu.harvard.i2b2.query.ui.GroupPanel.java
/** * This method is called from within the constructor to initialize the form. */// w w w .j ava 2 s .com private void initComponents() { jScrollPane1 = new javax.swing.JScrollPane(); jClearButton = new javax.swing.JButton(); jConstrainButton = new javax.swing.JButton(); jExcludeButton = new javax.swing.JButton(); jOccurrenceButton = new javax.swing.JButton(); jNameLabel = new javax.swing.JLabel(); jHintLabel = new javax.swing.JLabel(); jTimingComboBox = new javax.swing.JComboBox(); // jAnyvisitToggleButton = new javax.swing.JToggleButton(); // jSamevisitToggleButton = new javax.swing.JToggleButton(); setLayout(null); QueryConceptTreeNodeData tmpData = new QueryConceptTreeNodeData(); tmpData.name("working ......"); tmpData.tooltip("A root node"); tmpData.visualAttribute("FAO"); top = new DefaultMutableTreeNode(tmpData); // top = new DefaultMutableTreeNode("Root Node"); treeModel = new DefaultTreeModel(top); // treeModel.addTreeModelListener(new MyTreeModelListener()); jTree1 = new JTree(treeModel); jTree1.setDragEnabled(true); jTree1.setEditable(true); // jTree1.getSelectionModel().setSelectionMode // (TreeSelectionModel.SINGLE_TREE_SELECTION); // jTree1.setShowsRootHandles(true); // JScrollPane treeView = new JScrollPane(jTree1); jTree1.setRootVisible(false); jTree1.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION); jTree1.setCellRenderer(new MyRenderer()); ToolTipManager.sharedInstance().registerComponent(jTree1); setBorder(javax.swing.BorderFactory.createEtchedBorder()); add(jScrollPane1); // jScrollPane1.setBounds(0, 40, 180, 200); jClearButton.setFont(new java.awt.Font("Tahoma", 1, 10)); jClearButton.setText("X"); jClearButton.setToolTipText("Clear all items from panel"); jClearButton.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); jClearButton.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT); jClearButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); if (System.getProperty("os.name").toLowerCase().indexOf("mac") > -1) { jClearButton.setMargin(new java.awt.Insets(-10, -15, -10, -20)); } jClearButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jClearButtonActionPerformed(evt); } }); add(jClearButton); jClearButton.setBounds(160, 0, 18, 20); jConstrainButton.setText("Dates"); jConstrainButton.setToolTipText("Constrain group by dates"); jConstrainButton.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT); jConstrainButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); // jConstrainButton.setMargin(new java.awt.Insets(-10, -15, -10,-20)); if (System.getProperty("os.name").toLowerCase().indexOf("mac") > -1) { jConstrainButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); // jConstrainButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); jConstrainButton.setMargin(new java.awt.Insets(-10, -15, -10, -20)); } jConstrainButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jConstrainButtonActionPerformed(evt); } }); add(jConstrainButton); jConstrainButton.setBounds(0, 20, 40, 21); jOccurrenceButton.setText("Occurs > 0x"); jOccurrenceButton.setToolTipText("Set occurrence times"); jOccurrenceButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jOccurrenceButton.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jOccurrenceButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); if (System.getProperty("os.name").toLowerCase().indexOf("mac") > -1) { jOccurrenceButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jOccurrenceButton.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jOccurrenceButton.setMargin(new java.awt.Insets(-10, -10, -10, -10)); } jOccurrenceButton.setIconTextGap(0); jOccurrenceButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jOccurrenceButtonActionPerformed(evt); } }); jOccurrenceButton.setBounds(40, 20, 90, 21); add(jOccurrenceButton); // jExcludeButton.setMnemonic('E'); jExcludeButton.setText("Exclude"); jExcludeButton.setToolTipText("Exclude all items in group"); jExcludeButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jExcludeButton.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jExcludeButton.setMargin(new java.awt.Insets(2, 2, 2, 2)); if (System.getProperty("os.name").toLowerCase().indexOf("mac") > -1) { jExcludeButton.setMargin(new java.awt.Insets(-10, -15, -10, -20)); jExcludeButton.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); } jExcludeButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jExcludeButtonActionPerformed(evt); } }); add(jExcludeButton); jExcludeButton.setBounds(130, 20, 48, 21); jNameLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jNameLabel.setText("Group 1"); jNameLabel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); jNameLabel.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); add(jNameLabel); jNameLabel.setBounds(0, 0, 160, 20); jNameLabel.setTransferHandler(new GroupLabelTextHandler()); jNameLabel.addMouseListener(new DragMouseAdapter()); jNameLabel.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() { public void mouseMoved(java.awt.event.MouseEvent evt) { jNameLabelMouseMoved(evt); // System.out.println("mouse x: "+evt.getX()+" y: "+evt. // getY()); // System.out.println("name label x: "+jNameLabel.getX()+ // " width: "+ // jNameLabel.getWidth()+" y: " // +jNameLabel.getY()+" height "+jNameLabel.getHeight()); } }); jNameLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseExited(java.awt.event.MouseEvent evt) { jNameLabelMouseExited(evt); } }); /* * jAnyvisitToggleButton.setText("Any Visit"); * add(jAnyvisitToggleButton); jAnyvisitToggleButton.setBounds(0, 40, * 89, 20); * * jSamevisitToggleButton.setText("Same Visit"); * add(jSamevisitToggleButton); jSamevisitToggleButton.setBounds(90, 40, * 88, 20); * * ButtonGroup group = new ButtonGroup(); * group.add(jAnyvisitToggleButton); group.add(jSamevisitToggleButton); * jAnyvisitToggleButton.setSelected(true); */ jTree1.addTreeExpansionListener(this); jTree1.setTransferHandler(new TextHandler()); add(jScrollPane1); jScrollPane1.setViewportView(jTree1); // jTree1.setToolTipText( // "Double click on a folder to view the items inside"); // jScrollPane1.getViewport().setToolTipText( // "Double click on a folder to view the items inside"); jScrollPane1.setBounds(0, 60, 180, 120); // jScrollPane1.setBounds(0, 60, 190, 270); // jScrollPane1.setBorder(javax.swing.BorderFactory.createLineBorder(new // java.awt.Color(0, 0, 0))); // jTree1.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() // { // public void mouseMoved(java.awt.event.MouseEvent evt) { // jScrollPane1MouseMoved(evt); // } // @Override // public void mouseDragged(MouseEvent e) { // jScrollPane1MouseMoved(e); // } // }); // jTree1.addMouseListener(new java.awt.event.MouseAdapter() { // public void mouseExited(java.awt.event.MouseEvent evt) { // jScrollPane1MouseExited(evt); // } // @Override // public void mouseEntered(MouseEvent e) { // jScrollPane1MouseEntered(e); // } // }); jHintLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jHintLabel.setText( "<html><center>Drag terms from Navigate, <br>" + "<left>Find and Workplace into this group"); // jHintLabel.getFont(); jHintLabel.setFont(new Font("SansSerif", Font.PLAIN, 9)); // jHintLabel.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jHintLabel.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jHintLabel.setVerticalAlignment(javax.swing.SwingConstants.CENTER); // jHintLabel.setBackground(Color.WHITE); // jHintLabel.setForeground(Color.WHITE); add(jHintLabel); jHintLabel.setBounds(0, 120, 180, 30); jTimingComboBox.setModel(new javax.swing.DefaultComboBoxModel( new String[] { "Treat Independently", "Occurs in Same Encounter", "Items instance will be same" })); jTimingComboBox.setAlignmentX(5.0F); ListCellRenderer renderer = new DefaultListCellRenderer(); ((JLabel) renderer).setHorizontalAlignment(SwingConstants.CENTER); jTimingComboBox.setRenderer(renderer); // jTimingComboBox.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED)); add(jTimingComboBox); jTimingComboBox.setBounds(1, 40, 177, 20); jTimingComboBox.setEnabled(false); }
From source file:com.maxl.java.amikodesk.AMiKoDesk.java
private static void setupToggleButton(JToggleButton button) { button.setBackground(m_but_color_bg); button.setFocusPainted(false);/*from w w w .jav a 2 s . c om*/ button.setBorder(new CompoundBorder(new LineBorder(m_but_color_bg), new EmptyBorder(0, 3, 0, 0))); button.setHorizontalAlignment(SwingConstants.LEFT); }
From source file:de.tor.tribes.ui.windows.DSWorkbenchMainFrame.java
/** * 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.// w w w. j av a 2s. c o m */ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; jExportDialog = new javax.swing.JDialog(); jScrollPane1 = new javax.swing.JScrollPane(); jAttackExportTable = new javax.swing.JTable(); jExportButton = new javax.swing.JButton(); jCancelExportButton = new javax.swing.JButton(); jScrollPane4 = new javax.swing.JScrollPane(); jMarkerSetExportTable = new javax.swing.JTable(); jScrollPane5 = new javax.swing.JScrollPane(); jReportSetExportTable = new javax.swing.JTable(); jScrollPane6 = new javax.swing.JScrollPane(); jNoteSetExportTable = new javax.swing.JTable(); jScrollPane7 = new javax.swing.JScrollPane(); jTroopSetExportTable = new javax.swing.JTable(); jPanel5 = new javax.swing.JPanel(); jExportTags = new javax.swing.JCheckBox(); jExportForms = new javax.swing.JCheckBox(); jExportVillageInformation = new javax.swing.JCheckBox(); jExportStdAttacks = new javax.swing.JCheckBox(); jExportFarminfos = new javax.swing.JCheckBox(); jExportSplits = new javax.swing.JCheckBox(); jExportSOS = new javax.swing.JCheckBox(); jAddROIDialog = new javax.swing.JDialog(); jLabel7 = new javax.swing.JLabel(); jROIRegion = new javax.swing.JTextField(); jLabel8 = new javax.swing.JLabel(); jROITextField = new javax.swing.JTextField(); jLabel9 = new javax.swing.JLabel(); jROIPosition = new javax.swing.JComboBox(); jAddNewROIButton = new javax.swing.JButton(); jButton5 = new javax.swing.JButton(); jCustomPanel = new javax.swing.JPanel(); jNavigationPanel = new javax.swing.JPanel(); jMoveE = new javax.swing.JButton(); jMoveNE = new javax.swing.JButton(); jMoveN = new javax.swing.JButton(); jMoveNW = new javax.swing.JButton(); jMoveW = new javax.swing.JButton(); jMoveSW = new javax.swing.JButton(); jMoveS = new javax.swing.JButton(); jMoveSE = new javax.swing.JButton(); jCenterX = new javax.swing.JTextField(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jCenterY = new javax.swing.JTextField(); jRefreshButton = new javax.swing.JButton(); jMoveE1 = new javax.swing.JButton(); jZoomInButton = new javax.swing.JButton(); jZoomOutButton = new javax.swing.JButton(); jCenterCoordinateIngame = new javax.swing.JButton(); jMapPanel = new javax.swing.JPanel(); jShowMapPopup = new javax.swing.JCheckBox(); jLabel5 = new javax.swing.JLabel(); jLabel12 = new javax.swing.JLabel(); jGraphicPacks = new javax.swing.JComboBox(); jHighlightTribeVillages = new javax.swing.JCheckBox(); jShowRuler = new javax.swing.JCheckBox(); jHourField = new javax.swing.JTextField(); jMinuteField = new javax.swing.JTextField(); jLabel11 = new javax.swing.JLabel(); jLabel13 = new javax.swing.JLabel(); jShowMouseOverInfo = new javax.swing.JCheckBox(); jIncludeSupport = new javax.swing.JCheckBox(); jLabel3 = new javax.swing.JLabel(); jDisplayWatchtower = new javax.swing.JCheckBox(); jDisplayChurch = new javax.swing.JCheckBox(); jROIPanel = new javax.swing.JPanel(); jLabel6 = new javax.swing.JLabel(); jROIBox = new javax.swing.JComboBox(); jRemoveROIButton = new javax.swing.JButton(); jAddROIButton = new javax.swing.JButton(); jInformationPanel = new javax.swing.JPanel(); jCurrentPlayerVillages = new javax.swing.JComboBox(); jCurrentPlayer = new javax.swing.JLabel(); jCenterIngameButton = new javax.swing.JButton(); jOnlineLabel = new javax.swing.JLabel(); jCurrentToolLabel = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); jEnableClipboardWatchButton = new javax.swing.JButton(); jXTipOfTheDay1 = new org.jdesktop.swingx.JXTipOfTheDay(); jPanel4 = new javax.swing.JPanel(); jStatusPanel = new javax.swing.JPanel(); capabilityInfoPanel1 = new de.tor.tribes.ui.components.CapabilityInfoPanel(); infoPanel = new org.jdesktop.swingx.JXCollapsiblePane(); jXLabel1 = new org.jdesktop.swingx.JXLabel(); jMapPanelHolder = new javax.swing.JPanel(); jMinimapPanel = new javax.swing.JPanel(); jSettingsScrollPane = new javax.swing.JScrollPane(); jExportDialog.setTitle("Export"); jExportDialog.setMinimumSize(new java.awt.Dimension(560, 500)); jExportDialog.setPreferredSize(new java.awt.Dimension(560, 500)); jExportDialog.setResizable(false); jExportDialog.getContentPane().setLayout(new java.awt.GridBagLayout()); jScrollPane1.setMinimumSize(new java.awt.Dimension(260, 100)); jScrollPane1.setPreferredSize(new java.awt.Dimension(260, 100)); jAttackExportTable.setModel(new javax.swing.table.DefaultTableModel(new Object[][] { }, new String[] { "Angriffplan", "Exportieren" }) { Class[] types = new Class[] { java.lang.String.class, java.lang.Boolean.class }; public Class getColumnClass(int columnIndex) { return types[columnIndex]; } }); jAttackExportTable.setOpaque(false); jScrollPane1.setViewportView(jAttackExportTable); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 0.3; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jExportDialog.getContentPane().add(jScrollPane1, gridBagConstraints); jExportButton.setText("Exportieren"); jExportButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { fireExportEvent(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 3; gridBagConstraints.anchor = java.awt.GridBagConstraints.LAST_LINE_END; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jExportDialog.getContentPane().add(jExportButton, gridBagConstraints); jCancelExportButton.setText("Abbrechen"); jCancelExportButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { fireExportEvent(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 3; gridBagConstraints.anchor = java.awt.GridBagConstraints.LAST_LINE_START; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jExportDialog.getContentPane().add(jCancelExportButton, gridBagConstraints); jScrollPane4.setMinimumSize(new java.awt.Dimension(260, 100)); jScrollPane4.setPreferredSize(new java.awt.Dimension(260, 100)); jMarkerSetExportTable.setModel(new javax.swing.table.DefaultTableModel(new Object[][] { }, new String[] { "Markierungsset", "Exportieren" }) { Class[] types = new Class[] { java.lang.String.class, java.lang.Boolean.class }; public Class getColumnClass(int columnIndex) { return types[columnIndex]; } }); jMarkerSetExportTable.setOpaque(false); jScrollPane4.setViewportView(jMarkerSetExportTable); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 0; gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 0.3; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jExportDialog.getContentPane().add(jScrollPane4, gridBagConstraints); jScrollPane5.setMinimumSize(new java.awt.Dimension(260, 100)); jScrollPane5.setPreferredSize(new java.awt.Dimension(260, 100)); jReportSetExportTable.setModel(new javax.swing.table.DefaultTableModel(new Object[][] { }, new String[] { "Berichtsset", "Exportieren" }) { Class[] types = new Class[] { java.lang.String.class, java.lang.Boolean.class }; public Class getColumnClass(int columnIndex) { return types[columnIndex]; } }); jReportSetExportTable.setOpaque(false); jScrollPane5.setViewportView(jReportSetExportTable); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 0.3; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jExportDialog.getContentPane().add(jScrollPane5, gridBagConstraints); jScrollPane6.setMinimumSize(new java.awt.Dimension(260, 100)); jScrollPane6.setPreferredSize(new java.awt.Dimension(260, 100)); jNoteSetExportTable.setModel(new javax.swing.table.DefaultTableModel(new Object[][] { }, new String[] { "Notizset", "Exportieren" }) { Class[] types = new Class[] { java.lang.String.class, java.lang.Boolean.class }; public Class getColumnClass(int columnIndex) { return types[columnIndex]; } }); jNoteSetExportTable.setOpaque(false); jScrollPane6.setViewportView(jNoteSetExportTable); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 1; gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 0.3; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jExportDialog.getContentPane().add(jScrollPane6, gridBagConstraints); jScrollPane7.setMinimumSize(new java.awt.Dimension(260, 100)); jScrollPane7.setPreferredSize(new java.awt.Dimension(260, 100)); jTroopSetExportTable.setModel(new javax.swing.table.DefaultTableModel(new Object[][] { }, new String[] { "Truppeninformationen", "Exportieren" }) { Class[] types = new Class[] { java.lang.String.class, java.lang.Boolean.class }; public Class getColumnClass(int columnIndex) { return types[columnIndex]; } }); jTroopSetExportTable.setOpaque(false); jScrollPane7.setViewportView(jTroopSetExportTable); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 0.3; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jExportDialog.getContentPane().add(jScrollPane7, gridBagConstraints); jPanel5.setPreferredSize(new java.awt.Dimension(260, 100)); jPanel5.setLayout(new java.awt.GridBagLayout()); jExportTags.setText("Gruppen"); jExportTags.setMaximumSize(new java.awt.Dimension(2147483647, 2147483647)); jExportTags.setMinimumSize(new java.awt.Dimension(130, 24)); jExportTags.setPreferredSize(new java.awt.Dimension(130, 24)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.PAGE_START; gridBagConstraints.weightx = 1.0; jPanel5.add(jExportTags, gridBagConstraints); jExportForms.setText("Zeichnungen"); jExportForms.setMaximumSize(new java.awt.Dimension(2147483647, 2147483647)); jExportForms.setMinimumSize(new java.awt.Dimension(130, 24)); jExportForms.setPreferredSize(new java.awt.Dimension(130, 24)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.PAGE_START; gridBagConstraints.weightx = 1.0; jPanel5.add(jExportForms, gridBagConstraints); jExportVillageInformation.setText("Dorfinfos"); jExportVillageInformation.setToolTipText("Enthlt Gebudeinfos (z.B. Kichrche, Wachturm)"); jExportVillageInformation.setMaximumSize(new java.awt.Dimension(2147483647, 2147483647)); jExportVillageInformation.setMinimumSize(new java.awt.Dimension(130, 24)); jExportVillageInformation.setPreferredSize(new java.awt.Dimension(130, 24)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.PAGE_START; gridBagConstraints.weightx = 1.0; jPanel5.add(jExportVillageInformation, gridBagConstraints); jExportStdAttacks.setText("Standardangriffe"); jExportStdAttacks.setMaximumSize(new java.awt.Dimension(2147483647, 2147483647)); jExportStdAttacks.setMinimumSize(new java.awt.Dimension(130, 24)); jExportStdAttacks.setPreferredSize(new java.awt.Dimension(130, 24)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 3; gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.PAGE_START; gridBagConstraints.weightx = 1.0; jPanel5.add(jExportStdAttacks, gridBagConstraints); jExportFarminfos.setText("Farminfos"); jExportFarminfos.setMaximumSize(new java.awt.Dimension(2147483647, 2147483647)); jExportFarminfos.setMinimumSize(new java.awt.Dimension(130, 24)); jExportFarminfos.setPreferredSize(new java.awt.Dimension(130, 24)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.PAGE_START; gridBagConstraints.weightx = 1.0; jPanel5.add(jExportFarminfos, gridBagConstraints); jExportSplits.setText("Split Sets"); jExportSplits.setToolTipText("Enthlt Gebudeinfos (z.B. Kichrche, Wachturm)"); jExportSplits.setMaximumSize(new java.awt.Dimension(2147483647, 2147483647)); jExportSplits.setMinimumSize(new java.awt.Dimension(130, 24)); jExportSplits.setPreferredSize(new java.awt.Dimension(130, 24)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.PAGE_START; gridBagConstraints.weightx = 1.0; jPanel5.add(jExportSplits, gridBagConstraints); jExportSOS.setText("SOS Requests"); jExportSOS.setMaximumSize(new java.awt.Dimension(2147483647, 2147483647)); jExportSOS.setMinimumSize(new java.awt.Dimension(130, 24)); jExportSOS.setPreferredSize(new java.awt.Dimension(130, 24)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.PAGE_START; gridBagConstraints.weightx = 1.0; jPanel5.add(jExportSOS, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 2; gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 0.3; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jExportDialog.getContentPane().add(jPanel5, gridBagConstraints); jAddROIDialog.setTitle("ROI hinzufgen"); jLabel7.setText("Zentrum"); jROIRegion.setEnabled(false); jROIRegion.setMaximumSize(new java.awt.Dimension(120, 20)); jROIRegion.setMinimumSize(new java.awt.Dimension(120, 20)); jROIRegion.setPreferredSize(new java.awt.Dimension(120, 20)); jLabel8.setText("Bezeichnung"); jROITextField.setToolTipText("Eindeutige Bezeichnung zur Kennzeichnung der ROI"); jLabel9.setText("Position"); jROIPosition.setModel(new javax.swing.DefaultComboBoxModel( new String[] { "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "Ende" })); jROIPosition.setToolTipText("Position der ROI (Positionen 1-10 knnen per Shortcut gewhlt werden)"); jAddNewROIButton.setText("Hinzufgen"); jAddNewROIButton.setToolTipText("ROI hinzufgen"); jAddNewROIButton.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { fireAddROIDoneEvent(evt); } }); jButton5.setText("Abbrechen"); jButton5.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { fireAddROIDoneEvent(evt); } }); javax.swing.GroupLayout jAddROIDialogLayout = new javax.swing.GroupLayout(jAddROIDialog.getContentPane()); jAddROIDialog.getContentPane().setLayout(jAddROIDialogLayout); jAddROIDialogLayout.setHorizontalGroup(jAddROIDialogLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jAddROIDialogLayout.createSequentialGroup().addContainerGap().addGroup(jAddROIDialogLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jAddROIDialogLayout.createSequentialGroup().addComponent(jButton5) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jAddNewROIButton)) .addGroup(jAddROIDialogLayout.createSequentialGroup().addGroup(jAddROIDialogLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jAddROIDialogLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jLabel8, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel7, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addComponent(jLabel9)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jAddROIDialogLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jROIRegion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jROITextField, javax.swing.GroupLayout.DEFAULT_SIZE, 227, Short.MAX_VALUE) .addComponent(jROIPosition, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) .addContainerGap(16, Short.MAX_VALUE))); jAddROIDialogLayout.setVerticalGroup(jAddROIDialogLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jAddROIDialogLayout.createSequentialGroup().addContainerGap().addGroup(jAddROIDialogLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel7) .addComponent(jROIRegion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup( jAddROIDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel8) .addComponent(jROITextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup( jAddROIDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel9) .addComponent(jROIPosition, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup( jAddROIDialogLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jAddNewROIButton).addComponent(jButton5)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); javax.swing.GroupLayout jCustomPanelLayout = new javax.swing.GroupLayout(jCustomPanel); jCustomPanel.setLayout(jCustomPanelLayout); jCustomPanelLayout.setHorizontalGroup(jCustomPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 572, Short.MAX_VALUE)); jCustomPanelLayout.setVerticalGroup(jCustomPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 501, Short.MAX_VALUE)); jNavigationPanel.setBackground(new java.awt.Color(239, 235, 223)); jNavigationPanel.setMinimumSize(new java.awt.Dimension(236, 95)); jMoveE.setBackground(new java.awt.Color(239, 235, 223)); jMoveE.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/map_e.png"))); // NOI18N jMoveE.setMaximumSize(new java.awt.Dimension(21, 21)); jMoveE.setMinimumSize(new java.awt.Dimension(21, 21)); jMoveE.setPreferredSize(new java.awt.Dimension(21, 21)); jMoveE.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { fireMoveMapEvent(evt); } }); jMoveNE.setBackground(new java.awt.Color(239, 235, 223)); jMoveNE.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/map_ne.png"))); // NOI18N jMoveNE.setMaximumSize(new java.awt.Dimension(21, 21)); jMoveNE.setMinimumSize(new java.awt.Dimension(21, 21)); jMoveNE.setPreferredSize(new java.awt.Dimension(21, 21)); jMoveNE.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { fireMoveMapEvent(evt); } }); jMoveN.setBackground(new java.awt.Color(239, 235, 223)); jMoveN.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/map_n.png"))); // NOI18N jMoveN.setMaximumSize(new java.awt.Dimension(21, 21)); jMoveN.setMinimumSize(new java.awt.Dimension(21, 21)); jMoveN.setPreferredSize(new java.awt.Dimension(21, 21)); jMoveN.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { fireMoveMapEvent(evt); } }); jMoveNW.setBackground(new java.awt.Color(239, 235, 223)); jMoveNW.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/map_nw.png"))); // NOI18N jMoveNW.setMaximumSize(new java.awt.Dimension(21, 21)); jMoveNW.setMinimumSize(new java.awt.Dimension(21, 21)); jMoveNW.setPreferredSize(new java.awt.Dimension(21, 21)); jMoveNW.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { fireMoveMapEvent(evt); } }); jMoveW.setBackground(new java.awt.Color(239, 235, 223)); jMoveW.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/map_w.png"))); // NOI18N jMoveW.setMaximumSize(new java.awt.Dimension(21, 21)); jMoveW.setMinimumSize(new java.awt.Dimension(21, 21)); jMoveW.setPreferredSize(new java.awt.Dimension(21, 21)); jMoveW.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { fireMoveMapEvent(evt); } }); jMoveSW.setBackground(new java.awt.Color(239, 235, 223)); jMoveSW.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/map_sw.png"))); // NOI18N jMoveSW.setMaximumSize(new java.awt.Dimension(21, 21)); jMoveSW.setMinimumSize(new java.awt.Dimension(21, 21)); jMoveSW.setPreferredSize(new java.awt.Dimension(21, 21)); jMoveSW.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { fireMoveMapEvent(evt); } }); jMoveS.setBackground(new java.awt.Color(239, 235, 223)); jMoveS.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/map_s.png"))); // NOI18N jMoveS.setMaximumSize(new java.awt.Dimension(21, 21)); jMoveS.setMinimumSize(new java.awt.Dimension(21, 21)); jMoveS.setPreferredSize(new java.awt.Dimension(21, 21)); jMoveS.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { fireMoveMapEvent(evt); } }); jMoveSE.setBackground(new java.awt.Color(239, 235, 223)); jMoveSE.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/map_se.png"))); // NOI18N jMoveSE.setMaximumSize(new java.awt.Dimension(21, 21)); jMoveSE.setMinimumSize(new java.awt.Dimension(21, 21)); jMoveSE.setPreferredSize(new java.awt.Dimension(21, 21)); jMoveSE.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { fireMoveMapEvent(evt); } }); jCenterX.setText("500"); jCenterX.setMaximumSize(new java.awt.Dimension(40, 25)); jCenterX.setMinimumSize(new java.awt.Dimension(40, 25)); jCenterX.setPreferredSize(new java.awt.Dimension(40, 25)); jCenterX.addFocusListener(new java.awt.event.FocusAdapter() { public void focusLost(java.awt.event.FocusEvent evt) { fireCheckForVillagePositionEvent(evt); } }); jLabel1.setText("X"); jLabel2.setText("Y"); jCenterY.setText("500"); jCenterY.setMaximumSize(new java.awt.Dimension(40, 25)); jCenterY.setMinimumSize(new java.awt.Dimension(40, 25)); jCenterY.setPreferredSize(new java.awt.Dimension(40, 25)); jRefreshButton.setBackground(new java.awt.Color(239, 235, 223)); jRefreshButton.setToolTipText("Position aktualisieren"); jRefreshButton.setMaximumSize(new java.awt.Dimension(30, 30)); jRefreshButton.setMinimumSize(new java.awt.Dimension(30, 30)); jRefreshButton.setPreferredSize(new java.awt.Dimension(30, 30)); jRefreshButton.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { fireReloadMapKoordinatesEvent(evt); } }); jMoveE1.setBackground(new java.awt.Color(239, 235, 223)); jMoveE1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED)); jMoveE1.setEnabled(false); jMoveE1.setMaximumSize(new java.awt.Dimension(21, 21)); jMoveE1.setMinimumSize(new java.awt.Dimension(21, 21)); jMoveE1.setPreferredSize(new java.awt.Dimension(21, 21)); jZoomInButton.setBackground(new java.awt.Color(239, 235, 223)); jZoomInButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/zoom_out.png"))); // NOI18N jZoomInButton.setMaximumSize(new java.awt.Dimension(30, 30)); jZoomInButton.setMinimumSize(new java.awt.Dimension(30, 30)); jZoomInButton.setPreferredSize(new java.awt.Dimension(30, 30)); jZoomInButton.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { fireZoomEvent(evt); } }); jZoomOutButton.setBackground(new java.awt.Color(239, 235, 223)); jZoomOutButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/zoom_in.png"))); // NOI18N jZoomOutButton.setMaximumSize(new java.awt.Dimension(30, 30)); jZoomOutButton.setMinimumSize(new java.awt.Dimension(30, 30)); jZoomOutButton.setPreferredSize(new java.awt.Dimension(30, 30)); jZoomOutButton.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { fireZoomEvent(evt); } }); jCenterCoordinateIngame.setBackground(new java.awt.Color(239, 235, 223)); jCenterCoordinateIngame.setToolTipText("Zentrieren (InGame)"); jCenterCoordinateIngame.setMaximumSize(new java.awt.Dimension(30, 30)); jCenterCoordinateIngame.setMinimumSize(new java.awt.Dimension(30, 30)); jCenterCoordinateIngame.setPreferredSize(new java.awt.Dimension(30, 30)); jCenterCoordinateIngame.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { fireCenterCurrentPosInGameEvent(evt); } }); javax.swing.GroupLayout jNavigationPanelLayout = new javax.swing.GroupLayout(jNavigationPanel); jNavigationPanel.setLayout(jNavigationPanelLayout); jNavigationPanelLayout.setHorizontalGroup(jNavigationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jNavigationPanelLayout.createSequentialGroup().addContainerGap() .addGroup(jNavigationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jNavigationPanelLayout.createSequentialGroup() .addGroup(jNavigationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jNavigationPanelLayout.createSequentialGroup() .addComponent(jMoveNW, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jMoveN, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jNavigationPanelLayout.createSequentialGroup() .addComponent(jMoveW, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jMoveE1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jNavigationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jMoveNE, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jMoveE, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(jNavigationPanelLayout.createSequentialGroup() .addComponent(jMoveSW, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jMoveS, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jMoveSE, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jNavigationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jZoomInButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jZoomOutButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(15, 15, 15) .addGroup(jNavigationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jNavigationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jCenterX, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jCenterY, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jNavigationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jRefreshButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jCenterCoordinateIngame, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap())); jNavigationPanelLayout.setVerticalGroup(jNavigationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jNavigationPanelLayout.createSequentialGroup().addContainerGap() .addGroup(jNavigationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jNavigationPanelLayout.createSequentialGroup() .addGroup(jNavigationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jMoveNE, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jMoveN, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jMoveNW, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(4, 4, 4) .addGroup(jNavigationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jMoveE, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jMoveW, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jMoveE1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jNavigationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jMoveSW, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jMoveS, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jMoveSE, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(jNavigationPanelLayout.createSequentialGroup() .addGroup(jNavigationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jCenterX, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel1)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jNavigationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2).addComponent(jCenterY, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(jNavigationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addGroup(jNavigationPanelLayout.createSequentialGroup() .addComponent(jRefreshButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jCenterCoordinateIngame, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(5, 5, 5)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jNavigationPanelLayout .createSequentialGroup() .addComponent(jZoomInButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jZoomOutButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jMapPanel.setBackground(new java.awt.Color(239, 235, 223)); jMapPanel.setMinimumSize(new java.awt.Dimension(193, 250)); jMapPanel.setPreferredSize(new java.awt.Dimension(193, 250)); jMapPanel.setLayout(new java.awt.GridBagLayout()); jShowMapPopup.setText("Kartenpopup anzeigen"); jShowMapPopup.setToolTipText("Zeigt Informationen ber das Dorf unter dem Mauszeiger an"); jShowMapPopup.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); jShowMapPopup.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { fireShowMapPopupChangedEvent(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.gridwidth = 5; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jMapPanel.add(jShowMapPopup, gridBagConstraints); jLabel5.setText("Laufzeitradius"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 6; gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jMapPanel.add(jLabel5, gridBagConstraints); jLabel12.setText("Grafikpaket"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jMapPanel.add(jLabel12, gridBagConstraints); jGraphicPacks.setMaximumSize(new java.awt.Dimension(28, 20)); jGraphicPacks.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { fireGraphicPackChangedEvent(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 0; gridBagConstraints.gridwidth = 4; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jMapPanel.add(jGraphicPacks, gridBagConstraints); jHighlightTribeVillages.setText("Spielerdrfer hervorheben"); jHighlightTribeVillages.setToolTipText( "Markiert im Kartenausschnitt alle Drfer des Spielers, dessen Dorf unter dem Mauszeiger liegt"); jHighlightTribeVillages.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); jHighlightTribeVillages.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { fireHighlightTribeVillagesChangedEvent(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 4; gridBagConstraints.gridwidth = 5; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jMapPanel.add(jHighlightTribeVillages, gridBagConstraints); jShowRuler.setText("Lineal anzeigen"); jShowRuler.setToolTipText("Zeichnet ein Koordinatenlineal am Kartenrand"); jShowRuler.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); jShowRuler.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { fireShowRulerChangedEvent(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 5; gridBagConstraints.gridwidth = 5; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jMapPanel.add(jShowRuler, gridBagConstraints); jHourField.setHorizontalAlignment(javax.swing.JTextField.CENTER); jHourField.setText("1"); jHourField.setMaximumSize(new java.awt.Dimension(24, 25)); jHourField.setMinimumSize(new java.awt.Dimension(24, 25)); jHourField.setPreferredSize(new java.awt.Dimension(24, 25)); jHourField.addCaretListener(new javax.swing.event.CaretListener() { public void caretUpdate(javax.swing.event.CaretEvent evt) { fireRadarValueChangedEvent(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 6; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 0.5; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jMapPanel.add(jHourField, gridBagConstraints); jMinuteField.setHorizontalAlignment(javax.swing.JTextField.CENTER); jMinuteField.setText("0"); jMinuteField.setMaximumSize(new java.awt.Dimension(24, 25)); jMinuteField.setMinimumSize(new java.awt.Dimension(24, 25)); jMinuteField.setPreferredSize(new java.awt.Dimension(24, 25)); jMinuteField.addCaretListener(new javax.swing.event.CaretListener() { public void caretUpdate(javax.swing.event.CaretEvent evt) { fireRadarValueChangedEvent(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 6; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 0.5; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jMapPanel.add(jMinuteField, gridBagConstraints); jLabel11.setText("h"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 6; gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jMapPanel.add(jLabel11, gridBagConstraints); jLabel13.setText("min"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 6; gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jMapPanel.add(jLabel13, gridBagConstraints); jShowMouseOverInfo.setText("MouseOver Infos anzeigen"); jShowMouseOverInfo.setToolTipText("Zeigt Informationen ber das Dorf unter dem Mauszeiger an"); jShowMouseOverInfo.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); jShowMouseOverInfo.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { fireShowMouseOverInfoEvent(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; gridBagConstraints.gridwidth = 5; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jMapPanel.add(jShowMouseOverInfo, gridBagConstraints); jIncludeSupport.setText("Untersttzungen einbeziehen"); jIncludeSupport.setToolTipText( " Untersttzungen bei den MouseOver Infos und bei der Anzeige der Truppendichte mit einbeziehen"); jIncludeSupport.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { fireShowHideSupportsEvent(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 3; gridBagConstraints.gridwidth = 5; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jMapPanel.add(jIncludeSupport, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 9; gridBagConstraints.gridwidth = 5; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.weighty = 1.0; jMapPanel.add(jLabel3, gridBagConstraints); jDisplayWatchtower.setText("Wachturmradien Zeichnen"); jDisplayWatchtower.setToolTipText("Wachturmradien Zeichnen"); jDisplayWatchtower.setActionCommand(""); jDisplayWatchtower.setAutoscrolls(true); jDisplayWatchtower.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { fireDisplayWatchtower(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 8; gridBagConstraints.gridwidth = 5; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jMapPanel.add(jDisplayWatchtower, gridBagConstraints); jDisplayChurch.setText("Kirchenradien Zeichnen"); jDisplayChurch.setToolTipText("Kirchenradien Zeichnen"); jDisplayChurch.setActionCommand("Kirchenradien zeichnen"); jDisplayChurch.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { fireDisplayChurch(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 7; gridBagConstraints.gridwidth = 5; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jMapPanel.add(jDisplayChurch, gridBagConstraints); jROIPanel.setBackground(new java.awt.Color(239, 235, 223)); jROIPanel.setMaximumSize(new java.awt.Dimension(293, 70)); jROIPanel.setMinimumSize(new java.awt.Dimension(293, 70)); jROIPanel.setPreferredSize(new java.awt.Dimension(293, 70)); jLabel6.setText("ROIs"); jLabel6.setMaximumSize(new java.awt.Dimension(40, 25)); jLabel6.setMinimumSize(new java.awt.Dimension(40, 25)); jLabel6.setPreferredSize(new java.awt.Dimension(40, 25)); jROIBox.setMinimumSize(new java.awt.Dimension(23, 15)); jROIBox.setPreferredSize(new java.awt.Dimension(28, 25)); jROIBox.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { fireROISelectedEvent(evt); } }); jRemoveROIButton.setBackground(new java.awt.Color(239, 235, 223)); jRemoveROIButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/remove.gif"))); // NOI18N jRemoveROIButton.setMaximumSize(new java.awt.Dimension(23, 23)); jRemoveROIButton.setMinimumSize(new java.awt.Dimension(23, 23)); jRemoveROIButton.setPreferredSize(new java.awt.Dimension(23, 23)); jRemoveROIButton.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { fireChangeROIEvent(evt); } }); jAddROIButton.setBackground(new java.awt.Color(239, 235, 223)); jAddROIButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/add.gif"))); // NOI18N jAddROIButton.setMaximumSize(new java.awt.Dimension(23, 23)); jAddROIButton.setMinimumSize(new java.awt.Dimension(23, 23)); jAddROIButton.setPreferredSize(new java.awt.Dimension(23, 23)); jAddROIButton.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { fireChangeROIEvent(evt); } }); javax.swing.GroupLayout jROIPanelLayout = new javax.swing.GroupLayout(jROIPanel); jROIPanel.setLayout(jROIPanelLayout); jROIPanelLayout.setHorizontalGroup(jROIPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jROIPanelLayout.createSequentialGroup().addContainerGap().addGroup(jROIPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jROIPanelLayout.createSequentialGroup() .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jROIBox, 0, 223, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jROIPanelLayout.createSequentialGroup() .addComponent(jRemoveROIButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jAddROIButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap())); jROIPanelLayout.setVerticalGroup(jROIPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jROIPanelLayout.createSequentialGroup().addContainerGap().addGroup(jROIPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jROIBox, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jROIPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jRemoveROIButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jAddROIButton, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap())); jInformationPanel.setBackground(new java.awt.Color(239, 235, 223)); jCurrentPlayerVillages.setToolTipText("Aktives Dorf als Ausgangspunkt fr InGame Aktionen"); jCurrentPlayerVillages.addPopupMenuListener(new javax.swing.event.PopupMenuListener() { public void popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent evt) { } public void popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent evt) { fireCurrentPlayerVillagePopupEvent(evt); } public void popupMenuCanceled(javax.swing.event.PopupMenuEvent evt) { } }); jCurrentPlayer.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jCurrentPlayer.setMaximumSize(new java.awt.Dimension(155, 14)); jCurrentPlayer.setMinimumSize(new java.awt.Dimension(155, 14)); jCurrentPlayer.setPreferredSize(new java.awt.Dimension(155, 14)); jCenterIngameButton.setBackground(new java.awt.Color(239, 235, 223)); jCenterIngameButton.setToolTipText("Zentrieren (InGame)"); jCenterIngameButton.setMaximumSize(new java.awt.Dimension(30, 30)); jCenterIngameButton.setMinimumSize(new java.awt.Dimension(30, 30)); jCenterIngameButton.setPreferredSize(new java.awt.Dimension(30, 30)); jCenterIngameButton.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { fireCenterVillageIngameEvent(evt); } }); jOnlineLabel.setToolTipText("Online/Offline Modus"); jOnlineLabel.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jOnlineLabel.setMaximumSize(new java.awt.Dimension(30, 30)); jOnlineLabel.setMinimumSize(new java.awt.Dimension(30, 30)); jOnlineLabel.setPreferredSize(new java.awt.Dimension(30, 30)); jCurrentToolLabel.setToolTipText("Momentan gewhltes Werkzeug"); jCurrentToolLabel.setAlignmentY(0.0F); jCurrentToolLabel.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jCurrentToolLabel.setFocusable(false); jCurrentToolLabel.setIconTextGap(0); jCurrentToolLabel.setMaximumSize(new java.awt.Dimension(30, 30)); jCurrentToolLabel.setMinimumSize(new java.awt.Dimension(30, 30)); jCurrentToolLabel.setPreferredSize(new java.awt.Dimension(30, 30)); jCurrentToolLabel.setRequestFocusEnabled(false); jButton1.setBackground(new java.awt.Color(239, 235, 223)); jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/ui/camera.png"))); // NOI18N jButton1.setToolTipText("Foto der Hauptkarte erstellen"); jButton1.setMaximumSize(new java.awt.Dimension(30, 30)); jButton1.setMinimumSize(new java.awt.Dimension(30, 30)); jButton1.setPreferredSize(new java.awt.Dimension(30, 30)); jButton1.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { fireCreateMapShotEvent(evt); } }); jEnableClipboardWatchButton.setBackground(new java.awt.Color(239, 235, 223)); jEnableClipboardWatchButton .setToolTipText("Suche nach Informationen in der Zwischenablage an-/ausschalten"); jEnableClipboardWatchButton.setMaximumSize(new java.awt.Dimension(30, 30)); jEnableClipboardWatchButton.setMinimumSize(new java.awt.Dimension(30, 30)); jEnableClipboardWatchButton.setPreferredSize(new java.awt.Dimension(30, 30)); jEnableClipboardWatchButton.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { fireChangeClipboardWatchEvent(evt); } }); javax.swing.GroupLayout jInformationPanelLayout = new javax.swing.GroupLayout(jInformationPanel); jInformationPanel.setLayout(jInformationPanelLayout); jInformationPanelLayout.setHorizontalGroup(jInformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jInformationPanelLayout .createSequentialGroup().addContainerGap() .addGroup(jInformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jCurrentPlayer, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 227, Short.MAX_VALUE) .addComponent(jCurrentPlayerVillages, javax.swing.GroupLayout.Alignment.LEADING, 0, 227, Short.MAX_VALUE) .addGroup(jInformationPanelLayout.createSequentialGroup() .addComponent(jCurrentToolLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jOnlineLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 63, Short.MAX_VALUE) .addComponent(jCenterIngameButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(4, 4, 4).addComponent(jEnableClipboardWatchButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap())); jInformationPanelLayout.setVerticalGroup(jInformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jInformationPanelLayout.createSequentialGroup().addContainerGap() .addComponent(jCurrentPlayer, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jCurrentPlayerVillages, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jInformationPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jCenterIngameButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jCurrentToolLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jEnableClipboardWatchButton, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jOnlineLabel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("DS Workbench 0.92b"); setBackground(new java.awt.Color(225, 213, 190)); addComponentListener(new java.awt.event.ComponentAdapter() { public void componentResized(java.awt.event.ComponentEvent evt) { fireFrameResizedEvent(evt); } }); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { fireDSWorkbenchClosingEvent(evt); } }); jStatusPanel.setMaximumSize(new java.awt.Dimension(32, 30)); jStatusPanel.setLayout(new java.awt.BorderLayout()); capabilityInfoPanel1.setDeletable(false); capabilityInfoPanel1.setPastable(false); capabilityInfoPanel1.setSearchable(false); jStatusPanel.add(capabilityInfoPanel1, java.awt.BorderLayout.WEST); infoPanel.setAnimated(false); infoPanel.setCollapsed(true); infoPanel.setDirection(org.jdesktop.swingx.JXCollapsiblePane.Direction.LEFT); infoPanel.setInheritAlpha(false); infoPanel.setMaximumSize(new java.awt.Dimension(2147483647, 30)); jXLabel1.setText("jXLabel1"); jXLabel1.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseReleased(java.awt.event.MouseEvent evt) { fireHideNotificationEvent(evt); } }); infoPanel.add(jXLabel1, java.awt.BorderLayout.CENTER); jStatusPanel.add(infoPanel, java.awt.BorderLayout.LINE_END); jMapPanelHolder.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(128, 64, 0), 2)); jMapPanelHolder.setForeground(new java.awt.Color(240, 240, 240)); jMapPanelHolder.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); jMapPanelHolder.setDoubleBuffered(false); jMapPanelHolder.setLayout(new java.awt.BorderLayout()); jMinimapPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(128, 64, 0), 2)); jMinimapPanel.setDoubleBuffered(false); jMinimapPanel.setLayout(new java.awt.BorderLayout()); jSettingsScrollPane.setFocusTraversalPolicyProvider(true); javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4); jPanel4.setLayout(jPanel4Layout); jPanel4Layout.setHorizontalGroup(jPanel4Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup() .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jStatusPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 725, Short.MAX_VALUE) .addComponent(jMapPanelHolder, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 725, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jSettingsScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 320, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jMinimapPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 320, javax.swing.GroupLayout.PREFERRED_SIZE)))); jPanel4Layout.setVerticalGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup() .addComponent(jMinimapPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 300, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent( jSettingsScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 406, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup() .addComponent(jMapPanelHolder, javax.swing.GroupLayout.DEFAULT_SIZE, 689, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jStatusPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))); getContentPane().add(jPanel4, java.awt.BorderLayout.CENTER); }
From source file:ECallCenter21.java
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { lookAndFeelGroup = new javax.swing.ButtonGroup(); colorMaskPanel = new javax.swing.JPanel(); tabPane = new javax.swing.JTabbedPane(); callCenterPanel = new javax.swing.JPanel(); layeredImagePane = new javax.swing.JLayeredPane(); phonesPoolTableScrollPane = new javax.swing.JScrollPane(); phonesPoolTable = new javax.swing.JTable(); imageBrandLabel = new javax.swing.JLabel(); imageProductLabel = new javax.swing.JLabel(); imagePostfixLabel = new javax.swing.JLabel(); imageLinkLabel = new javax.swing.JLabel(); imageIconLabel = new javax.swing.JLabel(); statisticsPanel = new javax.swing.JPanel(); mainPanel = new javax.swing.JPanel(); systemStatsLabel = new javax.swing.JLabel(); systemStatsScrollPane = new javax.swing.JScrollPane(); systemStatsTable = new javax.swing.JTable(); orderLabel = new javax.swing.JLabel(); orderStatsScrollPane = new javax.swing.JScrollPane(); orderTable = new javax.swing.JTable(); phoneStatsLabel = new javax.swing.JLabel(); phoneStatsScrollPane = new javax.swing.JScrollPane(); phoneStatsTable = new javax.swing.JTable(); reponseStatsLabel = new javax.swing.JLabel(); responseStatsScrollPane = new javax.swing.JScrollPane(); responseStatsTable = new javax.swing.JTable(); campaignLabel = new javax.swing.JLabel(); campaignScrollPane = new javax.swing.JScrollPane(); campaignTable = new javax.swing.JTable(); turnoverStatsLabel = new javax.swing.JLabel(); turnoverStatsScrollPane = new javax.swing.JScrollPane(); turnoverStatsTable = new javax.swing.JTable(); graphPanel = new javax.swing.JPanel(); graphInnerPanel = new javax.swing.JPanel(); phoneDisplayTabPanel = new javax.swing.JPanel(); phoneDisplayPanel = new javax.swing.JPanel(); softphoneInfoLabel = new javax.swing.JLabel(); proxyInfoLabel = new javax.swing.JLabel(); primaryStatusLabel = new javax.swing.JLabel(); primaryStatusDetailsLabel = new javax.swing.JLabel(); secondaryStatusLabel = new javax.swing.JLabel(); secondaryStatusDetailsLabel = new javax.swing.JLabel(); onPanel = new javax.swing.JPanel(); onLabel = new javax.swing.JLabel(); idlePanel = new javax.swing.JPanel(); idleLabel = new javax.swing.JLabel(); connectingPanel = new javax.swing.JPanel(); connectingLabel = new javax.swing.JLabel(); callingPanel = new javax.swing.JPanel(); callingLabel = new javax.swing.JLabel(); ringingPanel = new javax.swing.JPanel(); ringingLabel = new javax.swing.JLabel(); acceptingPanel = new javax.swing.JPanel(); acceptingLabel = new javax.swing.JLabel(); talkingPanel = new javax.swing.JPanel(); talkingLabel = new javax.swing.JLabel(); registeredPanel = new javax.swing.JPanel(); registeredLabel = new javax.swing.JLabel(); answerPanel = new javax.swing.JPanel(); answerLabel = new javax.swing.JLabel(); mutePanel = new javax.swing.JPanel(); muteLabel = new javax.swing.JLabel(); cancelPanel = new javax.swing.JPanel(); cancelLabel = new javax.swing.JLabel(); toolsPanel = new javax.swing.JPanel(); toolsInnerPanel = new javax.swing.JPanel(); netManagerOutboundServerToggleButton = new javax.swing.JToggleButton(); netManagerInboundServerToggleButton = new javax.swing.JToggleButton(); controlsPanel = new javax.swing.JPanel(); displayLabel = new javax.swing.JLabel(); enableDisplayCheckBox = new javax.swing.JCheckBox(); snmpLabel1 = new javax.swing.JLabel(); smoothCheckBox = new javax.swing.JCheckBox(); scanCheckBox = new javax.swing.JCheckBox(); smoothLabel = new javax.swing.JLabel(); lookAndFeelPanel = new javax.swing.JPanel(); lookAndFeelRButtonMotif = new javax.swing.JRadioButton(); lookAndFeelRButtonGTK = new javax.swing.JRadioButton(); lookAndFeelRButtonNimbus = new javax.swing.JRadioButton(); lookAndFeelRButtonWindows = new javax.swing.JRadioButton(); sipInfoPanel = new javax.swing.JPanel(); destinationScrollPane = new javax.swing.JScrollPane(); destinationTextArea = new javax.swing.JTextArea(); netConfigPanel = new javax.swing.JPanel(); authenticationPanel = new javax.swing.JPanel(); iconsLabel = new javax.swing.JLabel(); iconsCheckBox = new javax.swing.JCheckBox(); clientIPLabel = new javax.swing.JLabel(); clientIPField = new javax.swing.JTextField(); pubIPLabel = new javax.swing.JLabel(); pubIPField = new javax.swing.JTextField(); clientPortLabel = new javax.swing.JLabel(); registerCheckBox = new javax.swing.JCheckBox(); registerLabel = new javax.swing.JLabel(); clientPortField = new javax.swing.JTextField(); domainLabel = new javax.swing.JLabel(); domainField = new javax.swing.JTextField(); serverIPLabel = new javax.swing.JLabel(); serverIPField = new javax.swing.JTextField(); serverPortLabel = new javax.swing.JLabel(); serverPortField = new javax.swing.JTextField(); pfixLabel = new javax.swing.JLabel(); usersecretLabel = new javax.swing.JLabel(); suffixLabel = new javax.swing.JLabel(); prefixField = new javax.swing.JTextField(); usernameField = new javax.swing.JTextField(); suffixField = new javax.swing.JTextField(); saveConfigurationButton = new javax.swing.JButton(); toegangField = new javax.swing.JPasswordField(); secretLabel = new javax.swing.JLabel(); prefPhoneLinesPanel = new javax.swing.JPanel(); prefPhoneLinesSlider = new javax.swing.JSlider(); licensePanel = new javax.swing.JPanel(); licenseTypePanel = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); vergunningTypeList = new javax.swing.JList(); licenseDatePanel = new javax.swing.JPanel(); vergunningDateChooserPanel = new datechooser.beans.DateChooserPanel(); licensePeriodPanel = new javax.swing.JPanel(); licensePeriodScrollPane = new javax.swing.JScrollPane(); vergunningPeriodList = new javax.swing.JList(); activationCodePanel = new javax.swing.JPanel(); activationCodeField = new javax.swing.JTextField(); licenseCodePanel = new javax.swing.JPanel(); vergunningCodeField = new javax.swing.JTextField(); licenseDetailsPanel = new javax.swing.JPanel(); licenseDetailsScrollPane = new javax.swing.JScrollPane(); vergunningDetailsTable = new javax.swing.JTable(); applyVergunningButton = new javax.swing.JButton(); requestVergunningButton = new javax.swing.JButton(); logPanel = new javax.swing.JPanel(); logScrollPane = new javax.swing.JScrollPane(); textLogArea = new javax.swing.JTextArea(); aboutPanel = new javax.swing.JPanel(); brandLabel = new javax.swing.JLabel(); brandDescriptionLabel = new javax.swing.JTextArea(); productLabel = new javax.swing.JLabel(); productDescriptionLabel = new javax.swing.JTextArea(); copyrightLabel = new javax.swing.JTextArea(); displayPanel = new javax.swing.JPanel(); captionTable = new javax.swing.JTable(); statusBar = new javax.swing.JTextPane(); controlButtonPanel = new javax.swing.JPanel(); callButton = new javax.swing.JButton(); serviceLoopProgressBar = new javax.swing.JProgressBar(); autoSpeedToggleButton = new javax.swing.JToggleButton(); powerToggleButton = new javax.swing.JToggleButton(); runCampaignToggleButton = new javax.swing.JToggleButton(); endButton = new javax.swing.JButton(); phoneButton = new javax.swing.JButton(); stopCampaignButton = new javax.swing.JButton(); muteAudioToggleButton = new javax.swing.JToggleButton(); campaignProgressBar = new javax.swing.JProgressBar(); humanResponseSimulatorToggleButton = new javax.swing.JToggleButton(); registerToggleButton = new javax.swing.JToggleButton(); campaignComboBox = new javax.swing.JComboBox(); debugToggleButton = new javax.swing.JToggleButton(); resizeWindowButton = new javax.swing.JButton(); controlSliderPanel = new javax.swing.JPanel(); buttonPanel = new javax.swing.JPanel(); outboundSliderPanel = new javax.swing.JPanel(); vmUsageThresholdLabel = new javax.swing.JLabel(); vmUsagePauseValue = new javax.swing.JLabel(); vmUsageThresholdSlider = new javax.swing.JSlider(); memFreeThresholdLabel = new javax.swing.JLabel(); memFreeThresholdValue = new javax.swing.JLabel(); memFreeThresholdSlider = new javax.swing.JSlider(); heapMemFreeThresholdLabel = new javax.swing.JLabel(); heapMemFreeThresholdValue = new javax.swing.JLabel(); heapMemFreeThresholdSlider = new javax.swing.JSlider(); connectingTallyLimitLabel = new javax.swing.JLabel(); connectingTallyLimitValue = new javax.swing.JLabel(); connectingTallyLimitSlider = new javax.swing.JSlider(); callingTallyLimitLabel = new javax.swing.JLabel(); callingTallyLimitValue = new javax.swing.JLabel(); callingTallyLimitSlider = new javax.swing.JSlider(); establishedTallyLimitLabel = new javax.swing.JLabel(); establishedTallyLimitValue = new javax.swing.JLabel(); establishedTallyLimitSlider = new javax.swing.JSlider(); callSpeedLabel = new javax.swing.JLabel(); callSpeedValue = new javax.swing.JLabel(); callSpeedSlider = new javax.swing.JSlider(); performanceMeterPanel = new javax.swing.JPanel(); inboundSliderPanel = new javax.swing.JPanel(); registerSpeedLabel = new javax.swing.JLabel(); inboundRingingResponseDelayLabel = new javax.swing.JLabel(); inboundRingingResponseBusyRatioLabel = new javax.swing.JLabel(); inboundEndDelayLabel = new javax.swing.JLabel(); inboundEndDelayValue = new javax.swing.JLabel(); registerSpeedValue = new javax.swing.JLabel(); inboundRingingResponseDelayValue = new javax.swing.JLabel(); inboundRingingResponseBusyRatioValue = new javax.swing.JLabel(); registerSpeedSlider = new javax.swing.JSlider(); inboundRingingResponseDelaySlider = new javax.swing.JSlider(); inboundRingingResponseBusyRatioSlider = new javax.swing.JSlider(); inboundEndDelaySlider = new javax.swing.JSlider(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setBackground(new java.awt.Color(216, 216, 222)); setBounds(new java.awt.Rectangle(0, 22, 710, 796)); setFocusable(false);/*from w w w.ja va 2 s .c o m*/ setFont(new java.awt.Font("STHeiti", 0, 10)); setMinimumSize(new java.awt.Dimension(710, 598)); setName(""); // NOI18N setSize(new java.awt.Dimension(710, 830)); colorMaskPanel.setFont(new java.awt.Font("STHeiti", 0, 13)); colorMaskPanel.setMaximumSize(new java.awt.Dimension(700, 785)); colorMaskPanel.setMinimumSize(new java.awt.Dimension(700, 400)); tabPane.setBackground(new java.awt.Color(204, 204, 204)); tabPane.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("STHeiti", 0, 13))); // NOI18N tabPane.setTabLayoutPolicy(javax.swing.JTabbedPane.SCROLL_TAB_LAYOUT); tabPane.setToolTipText(""); tabPane.setFocusTraversalKeysEnabled(false); tabPane.setFont(new java.awt.Font("STHeiti", 0, 13)); tabPane.setMaximumSize(new java.awt.Dimension(695, 390)); tabPane.setMinimumSize(new java.awt.Dimension(695, 390)); tabPane.setNextFocusableComponent(statisticsPanel); tabPane.setPreferredSize(new java.awt.Dimension(695, 390)); tabPane.setSize(new java.awt.Dimension(695, 390)); tabPane.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { tabPaneMouseClicked(evt); } }); callCenterPanel.setBackground(new java.awt.Color(255, 255, 255)); callCenterPanel.setToolTipText("Visualised status & stats of all Phones in Pool"); callCenterPanel.setFocusTraversalKeysEnabled(false); callCenterPanel.setFont(new java.awt.Font("STHeiti", 0, 12)); callCenterPanel.setNextFocusableComponent(statisticsPanel); callCenterPanel.setOpaque(false); callCenterPanel.addKeyListener(new java.awt.event.KeyAdapter() { public void keyPressed(java.awt.event.KeyEvent evt) { callCenterPanelKeyPressed(evt); } }); layeredImagePane.setFont(new java.awt.Font("STHeiti", 0, 13)); layeredImagePane.setMaximumSize(new java.awt.Dimension(670, 333)); layeredImagePane.setSize(new java.awt.Dimension(670, 333)); phonesPoolTableScrollPane .setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); phonesPoolTableScrollPane .setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); phonesPoolTableScrollPane.setAutoscrolls(true); phonesPoolTableScrollPane.setColumnHeaderView(null); phonesPoolTableScrollPane.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); phonesPoolTableScrollPane.setEnabled(false); phonesPoolTableScrollPane.setFocusTraversalKeysEnabled(false); phonesPoolTableScrollPane.setFocusable(false); phonesPoolTableScrollPane.setMaximumSize(new java.awt.Dimension(670, 330)); phonesPoolTableScrollPane.setMinimumSize(new java.awt.Dimension(670, 330)); phonesPoolTableScrollPane.setPreferredSize(new java.awt.Dimension(670, 330)); phonesPoolTable.setFont(new java.awt.Font("STHeiti", 0, 14)); // NOI18N phonesPoolTable.setForeground(new java.awt.Color(102, 102, 102)); phonesPoolTable.setModel(new javax.swing.table.DefaultTableModel(new Object[][] { }, new String[] { })); phonesPoolTable.setToolTipText("Double click to show Phone"); phonesPoolTable.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF); phonesPoolTable.setAutoscrolls(false); phonesPoolTable.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); phonesPoolTable.setDoubleBuffered(true); phonesPoolTable.setFocusTraversalKeysEnabled(false); phonesPoolTable.setFocusable(false); phonesPoolTable.setRequestFocusEnabled(false); phonesPoolTable.setRowSelectionAllowed(false); phonesPoolTable.setSelectionBackground(new java.awt.Color(204, 204, 204)); phonesPoolTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); phonesPoolTable.setShowGrid(false); phonesPoolTable.getTableHeader().setResizingAllowed(false); phonesPoolTable.getTableHeader().setReorderingAllowed(false); phonesPoolTable.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { phonesPoolTableMouseClicked(evt); } }); phonesPoolTableScrollPane.setViewportView(phonesPoolTable); phonesPoolTableScrollPane.setBounds(0, 0, 660, 330); layeredImagePane.add(phonesPoolTableScrollPane, javax.swing.JLayeredPane.DEFAULT_LAYER); imageBrandLabel.setFont(new java.awt.Font("STHeiti", 0, 48)); imageBrandLabel.setForeground(new java.awt.Color(255, 255, 255)); imageBrandLabel.setText("VoipStorm"); imageBrandLabel.setToolTipText(""); imageBrandLabel.setBounds(30, 30, 250, 50); layeredImagePane.add(imageBrandLabel, javax.swing.JLayeredPane.DEFAULT_LAYER); imageProductLabel.setFont(new java.awt.Font("STHeiti", 0, 18)); imageProductLabel.setForeground(new java.awt.Color(233, 232, 232)); imageProductLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); imageProductLabel.setText("ECallCenter 21"); imageProductLabel.setToolTipText(""); imageProductLabel.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM); imageProductLabel.setBounds(30, 80, 140, 20); layeredImagePane.add(imageProductLabel, javax.swing.JLayeredPane.DEFAULT_LAYER); imagePostfixLabel.setFont(new java.awt.Font("STHeiti", 2, 18)); imagePostfixLabel.setForeground(new java.awt.Color(203, 254, 254)); imagePostfixLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); imagePostfixLabel.setText("st Century"); imagePostfixLabel.setToolTipText(""); imagePostfixLabel.setBounds(170, 80, 100, 20); layeredImagePane.add(imagePostfixLabel, javax.swing.JLayeredPane.DEFAULT_LAYER); imageLinkLabel.setFont(new java.awt.Font("STHeiti", 0, 14)); imageLinkLabel.setForeground(new java.awt.Color(204, 204, 204)); imageLinkLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); imageLinkLabel.setText("http://www.voipstorm.nl/"); imageLinkLabel.setToolTipText(""); imageLinkLabel.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); imageLinkLabel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { imageLinkLabelMouseClicked(evt); } public void mouseExited(java.awt.event.MouseEvent evt) { imageLinkLabelMouseExited(evt); } public void mouseEntered(java.awt.event.MouseEvent evt) { imageLinkLabelMouseEntered(evt); } }); imageLinkLabel.setBounds(240, 300, 190, 20); layeredImagePane.add(imageLinkLabel, javax.swing.JLayeredPane.DEFAULT_LAYER); imageIconLabel.setFont(new java.awt.Font("STHeiti", 0, 12)); imageIconLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); imageIconLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/vsheader.jpg"))); // NOI18N imageIconLabel.setToolTipText(""); imageIconLabel.setMaximumSize(new java.awt.Dimension(670, 333)); imageIconLabel.setMinimumSize(new java.awt.Dimension(670, 333)); imageIconLabel.setOpaque(true); imageIconLabel.setPreferredSize(new java.awt.Dimension(670, 333)); imageIconLabel.setBounds(-2, 0, 670, 330); layeredImagePane.add(imageIconLabel, javax.swing.JLayeredPane.DEFAULT_LAYER); org.jdesktop.layout.GroupLayout callCenterPanelLayout = new org.jdesktop.layout.GroupLayout( callCenterPanel); callCenterPanel.setLayout(callCenterPanelLayout); callCenterPanelLayout.setHorizontalGroup( callCenterPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(callCenterPanelLayout.createSequentialGroup().addContainerGap().add(layeredImagePane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 656, Short.MAX_VALUE))); callCenterPanelLayout .setVerticalGroup(callCenterPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(callCenterPanelLayout.createSequentialGroup().addContainerGap() .add(layeredImagePane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 333, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); tabPane.addTab("Call Center", callCenterPanel); statisticsPanel.setToolTipText("Overview Overall Statistics Campaign"); statisticsPanel.setFocusTraversalKeysEnabled(false); statisticsPanel.setFont(new java.awt.Font("STHeiti", 0, 12)); statisticsPanel.setNextFocusableComponent(graphPanel); statisticsPanel.addKeyListener(new java.awt.event.KeyAdapter() { public void keyPressed(java.awt.event.KeyEvent evt) { statisticsPanelKeyPressed(evt); } }); mainPanel.setBackground(new java.awt.Color(255, 255, 255)); mainPanel.setFont(new java.awt.Font("STHeiti", 0, 13)); mainPanel.setMaximumSize(new java.awt.Dimension(1600, 1600)); mainPanel.setPreferredSize(new java.awt.Dimension(800, 241)); systemStatsLabel.setFont(new java.awt.Font("STHeiti", 0, 12)); systemStatsLabel.setForeground(new java.awt.Color(102, 102, 102)); systemStatsLabel.setText("System (Health)"); systemStatsScrollPane .setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); systemStatsScrollPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); systemStatsTable.setFont(new java.awt.Font("STHeiti", 0, 10)); // NOI18N systemStatsTable.setForeground(new java.awt.Color(102, 102, 102)); systemStatsTable.setModel(new javax.swing.table.DefaultTableModel(new Object[][] { { "VM Usage", new Long(0), "%" }, { "Threads", new Long(0), "" }, { "MemFree", new Long(0), "MB" }, { "HeapMemMax", new Long(0), "MB" }, { "HeapMemTot", new Long(0), "MB" }, { "HeapMemFree", new Long(0), "MB" }, { " ", null, null } }, new String[] { "", "", "" }) { Class[] types = new Class[] { java.lang.String.class, java.lang.Long.class, java.lang.String.class }; boolean[] canEdit = new boolean[] { false, false, false }; public Class getColumnClass(int columnIndex) { return types[columnIndex]; } public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit[columnIndex]; } }); systemStatsTable.setToolTipText("System Utilization Statistics used by Automated Call Burst Rate Slider"); systemStatsTable.setAutoCreateRowSorter(true); systemStatsTable.setAutoscrolls(false); systemStatsTable.setDoubleBuffered(true); systemStatsTable.setFocusable(false); systemStatsTable.setMaximumSize(new java.awt.Dimension(55, 110)); systemStatsTable.setMinimumSize(new java.awt.Dimension(55, 110)); systemStatsTable.setName("name"); // NOI18N systemStatsTable.setPreferredSize(new java.awt.Dimension(55, 110)); systemStatsTable.setRowHeight(15); systemStatsTable.setRowSelectionAllowed(false); systemStatsTable.setSelectionBackground(new java.awt.Color(51, 102, 255)); systemStatsTable.setShowGrid(false); systemStatsTable.setSize(new java.awt.Dimension(55, 110)); systemStatsScrollPane.setViewportView(systemStatsTable); systemStatsTable.getColumnModel().getColumn(0).setResizable(false); systemStatsTable.getColumnModel().getColumn(0).setPreferredWidth(80); systemStatsTable.getColumnModel().getColumn(1).setResizable(false); systemStatsTable.getColumnModel().getColumn(1).setPreferredWidth(50); systemStatsTable.getColumnModel().getColumn(2).setResizable(false); systemStatsTable.getColumnModel().getColumn(2).setPreferredWidth(20); orderLabel.setFont(new java.awt.Font("STHeiti", 0, 12)); orderLabel.setForeground(new java.awt.Color(102, 102, 102)); orderLabel.setText("Order"); orderStatsScrollPane .setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); orderStatsScrollPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); orderTable.setFont(new java.awt.Font("STHeiti", 0, 10)); orderTable.setForeground(new java.awt.Color(102, 102, 102)); orderTable.setModel(new javax.swing.table.DefaultTableModel(new Object[][] { { "Recipients", "-" }, { "Time Window", "-" }, { "Total Calls", "-" }, { "Call Duration", "-" }, { "Message Rate", "-" }, { "Message Rate", "-" }, { "SubTotal", "-" } }, new String[] { "", "" }) { Class[] types = new Class[] { java.lang.String.class, java.lang.String.class }; boolean[] canEdit = new boolean[] { false, false }; public Class getColumnClass(int columnIndex) { return types[columnIndex]; } public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit[columnIndex]; } }); orderTable.setToolTipText("Represents highlevel Running Campaign Info based on Customer Order"); orderTable.setAutoCreateRowSorter(true); orderTable.setAutoscrolls(false); orderTable.setDoubleBuffered(true); orderTable.setFocusable(false); orderTable.setMaximumSize(new java.awt.Dimension(55, 110)); orderTable.setMinimumSize(new java.awt.Dimension(55, 110)); orderTable.setName("name"); // NOI18N orderTable.setPreferredSize(new java.awt.Dimension(55, 110)); orderTable.setRowHeight(15); orderTable.setRowSelectionAllowed(false); orderTable.setSelectionBackground(new java.awt.Color(51, 102, 255)); orderTable.setShowGrid(false); orderTable.setSize(new java.awt.Dimension(55, 110)); orderStatsScrollPane.setViewportView(orderTable); orderTable.getColumnModel().getColumn(0).setResizable(false); orderTable.getColumnModel().getColumn(0).setPreferredWidth(40); orderTable.getColumnModel().getColumn(1).setResizable(false); orderTable.getColumnModel().getColumn(1).setPreferredWidth(15); phoneStatsLabel.setFont(new java.awt.Font("STHeiti", 0, 12)); phoneStatsLabel.setForeground(new java.awt.Color(102, 102, 102)); phoneStatsLabel.setText("Phone Pool"); phoneStatsScrollPane .setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); phoneStatsScrollPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); phoneStatsScrollPane.setFont(new java.awt.Font("STHeiti", 0, 13)); phoneStatsTable.setFont(new java.awt.Font("STHeiti", 0, 10)); phoneStatsTable.setForeground(new java.awt.Color(102, 102, 102)); phoneStatsTable.setModel(new javax.swing.table.DefaultTableModel( new Object[][] { { "Phones", new Long(0) }, { "Processing", new Long(0) }, { "On", new Long(0) }, { "Registered", new Long(0) }, { "Listening", new Long(0) }, { "Connecting", new Long(0) }, { "Trying", new Long(0) }, { "Calling", new Long(0) }, { "Accepting", new Long(0) }, { "Ringing", new Long(0) }, { "Established", new Long(0) }, { "Total Calls", new Long(0) }, { " Total Established", new Long(0) }, { " ", null }, { " ", null }, { " ", null }, { " ", null }, { " ", null }, { " ", null }, { null, null }, { " ", null } }, new String[] { "", "" }) { Class[] types = new Class[] { java.lang.String.class, java.lang.Long.class }; boolean[] canEdit = new boolean[] { true, false }; public Class getColumnClass(int columnIndex) { return types[columnIndex]; } public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit[columnIndex]; } }); phoneStatsTable.setToolTipText("Overall Status of all Phones in Pool"); phoneStatsTable.setAutoCreateRowSorter(true); phoneStatsTable.setAutoscrolls(false); phoneStatsTable.setDoubleBuffered(true); phoneStatsTable.setEditingColumn(0); phoneStatsTable.setEditingRow(0); phoneStatsTable.setFocusable(false); phoneStatsTable.setMaximumSize(new java.awt.Dimension(1400, 330)); phoneStatsTable.setMinimumSize(new java.awt.Dimension(30, 330)); phoneStatsTable.setName("name"); // NOI18N phoneStatsTable.setPreferredSize(new java.awt.Dimension(75, 330)); phoneStatsTable.setRowHeight(15); phoneStatsTable.setRowSelectionAllowed(false); phoneStatsTable.setSelectionBackground(new java.awt.Color(51, 102, 255)); phoneStatsTable.setShowGrid(false); phoneStatsTable.setSize(new java.awt.Dimension(75, 190)); phoneStatsScrollPane.setViewportView(phoneStatsTable); phoneStatsTable.getColumnModel().getColumn(0).setResizable(false); phoneStatsTable.getColumnModel().getColumn(0).setPreferredWidth(40); phoneStatsTable.getColumnModel().getColumn(1).setResizable(false); phoneStatsTable.getColumnModel().getColumn(1).setPreferredWidth(40); reponseStatsLabel.setFont(new java.awt.Font("STHeiti", 0, 12)); reponseStatsLabel.setForeground(new java.awt.Color(102, 102, 102)); reponseStatsLabel.setText("Response"); responseStatsScrollPane .setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); responseStatsScrollPane .setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); responseStatsTable.setFont(new java.awt.Font("STHeiti", 0, 10)); responseStatsTable.setForeground(new java.awt.Color(102, 102, 102)); responseStatsTable.setModel(new javax.swing.table.DefaultTableModel( new Object[][] { { "Info", "1XX", new Long(0) }, { "Success", "2XX", new Long(0) }, { "Redirection", "3XX", new Long(0) }, { "Client Error", "4XX", new Long(0) }, { "Server Error", "5XX", new Long(0) }, { "Gen. Error", "6XX", new Long(0) }, { "", "", null }, { null, null, null }, { null, null, null }, { null, null, null }, { null, null, null }, { "Timeout", null, new Long(0) }, { " ", null, null }, { " ", null, null }, { " ", null, null }, { " ", null, null }, { " ", null, null }, { " ", null, null }, { " ", null, null }, { " ", null, null }, { " ", null, null } }, new String[] { "", "", "" }) { Class[] types = new Class[] { java.lang.String.class, java.lang.String.class, java.lang.Long.class }; boolean[] canEdit = new boolean[] { true, false, false }; public Class getColumnClass(int columnIndex) { return types[columnIndex]; } public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit[columnIndex]; } }); responseStatsTable.setToolTipText("Represents Highlevel Proxy/Answerer Response Statistics"); responseStatsTable.setAutoCreateRowSorter(true); responseStatsTable.setAutoscrolls(false); responseStatsTable.setDoubleBuffered(true); responseStatsTable.setFocusable(false); responseStatsTable.setMaximumSize(new java.awt.Dimension(2000, 330)); responseStatsTable.setMinimumSize(new java.awt.Dimension(45, 330)); responseStatsTable.setName("name"); // NOI18N responseStatsTable.setPreferredSize(new java.awt.Dimension(95, 330)); responseStatsTable.setRowHeight(15); responseStatsTable.setRowSelectionAllowed(false); responseStatsTable.setSelectionBackground(new java.awt.Color(51, 102, 255)); responseStatsTable.setShowGrid(false); responseStatsScrollPane.setViewportView(responseStatsTable); responseStatsTable.getColumnModel().getColumn(0).setResizable(false); responseStatsTable.getColumnModel().getColumn(0).setPreferredWidth(60); responseStatsTable.getColumnModel().getColumn(1).setResizable(false); responseStatsTable.getColumnModel().getColumn(1).setPreferredWidth(10); responseStatsTable.getColumnModel().getColumn(2).setResizable(false); responseStatsTable.getColumnModel().getColumn(2).setPreferredWidth(25); campaignLabel.setFont(new java.awt.Font("STHeiti", 0, 12)); campaignLabel.setForeground(new java.awt.Color(102, 102, 102)); campaignLabel.setText("Campaign"); campaignScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); campaignScrollPane.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); campaignTable.setFont(new java.awt.Font("STHeiti", 0, 10)); campaignTable.setForeground(new java.awt.Color(102, 102, 102)); campaignTable .setModel( new javax.swing.table.DefaultTableModel( new Object[][] { { "Start Sched", "-" }, { "End Sched", "-" }, { "Start Exp", "-" }, { "End Exp", "-" }, { "Start Reg", "-" }, { "End Reg", "-" }, { "Time Total", "-" }, { "Time Past", "-" }, { "Time ETA", "-" }, { "Throughput", "-" }, { " ", null }, { " ", null } }, new String[] { "", "" }) { Class[] types = new Class[] { java.lang.String.class, java.lang.String.class }; public Class getColumnClass(int columnIndex) { return types[columnIndex]; } }); campaignTable.setToolTipText("Time Statistics related to running Campaign"); campaignTable.setAutoCreateRowSorter(true); campaignTable.setAutoscrolls(false); campaignTable.setDoubleBuffered(true); campaignTable.setEditingColumn(0); campaignTable.setEditingRow(0); campaignTable.setFocusable(false); campaignTable.setMaximumSize(new java.awt.Dimension(55, 180)); campaignTable.setMinimumSize(new java.awt.Dimension(55, 180)); campaignTable.setName("name"); // NOI18N campaignTable.setPreferredSize(new java.awt.Dimension(55, 180)); campaignTable.setRowHeight(15); campaignTable.setRowSelectionAllowed(false); campaignTable.setSelectionBackground(new java.awt.Color(51, 102, 255)); campaignTable.setShowGrid(false); campaignTable.setSize(new java.awt.Dimension(55, 160)); campaignScrollPane.setViewportView(campaignTable); campaignTable.getColumnModel().getColumn(0).setResizable(false); campaignTable.getColumnModel().getColumn(0).setPreferredWidth(30); campaignTable.getColumnModel().getColumn(1).setResizable(false); campaignTable.getColumnModel().getColumn(1).setPreferredWidth(75); turnoverStatsLabel.setFont(new java.awt.Font("STHeiti", 0, 12)); turnoverStatsLabel.setForeground(new java.awt.Color(102, 102, 102)); turnoverStatsLabel.setText("Turnover"); turnoverStatsScrollPane .setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); turnoverStatsScrollPane .setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); turnoverStatsTable.setFont(new java.awt.Font("STHeiti", 0, 10)); turnoverStatsTable.setForeground(new java.awt.Color(102, 102, 102)); turnoverStatsTable.setModel(new javax.swing.table.DefaultTableModel( new Object[][] { { "Hourly", "", new Float(0.0) }, { "Progress", "", new Float(0.0) }, { "Total (excl.)", "", new Float(0.0) }, { " ", null, null }, { " ", null, null }, { " ", null, null }, { " ", null, null }, { " ", null, null }, { " ", null, null }, { " ", null, null }, { " ", null, null }, { null, null, null } }, new String[] { "", "", "" }) { Class[] types = new Class[] { java.lang.String.class, java.lang.String.class, java.lang.Float.class }; boolean[] canEdit = new boolean[] { false, false, false }; public Class getColumnClass(int columnIndex) { return types[columnIndex]; } public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit[columnIndex]; } }); turnoverStatsTable.setToolTipText("Financial Statistics"); turnoverStatsTable.setAutoCreateRowSorter(true); turnoverStatsTable.setAutoscrolls(false); turnoverStatsTable.setDoubleBuffered(true); turnoverStatsTable.setFocusable(false); turnoverStatsTable.setMaximumSize(new java.awt.Dimension(55, 180)); turnoverStatsTable.setMinimumSize(new java.awt.Dimension(55, 180)); turnoverStatsTable.setName("name"); // NOI18N turnoverStatsTable.setPreferredSize(new java.awt.Dimension(55, 180)); turnoverStatsTable.setRowHeight(15); turnoverStatsTable.setRowSelectionAllowed(false); turnoverStatsTable.setSelectionBackground(new java.awt.Color(51, 102, 255)); turnoverStatsTable.setShowGrid(false); turnoverStatsTable.setSize(new java.awt.Dimension(55, 160)); turnoverStatsScrollPane.setViewportView(turnoverStatsTable); turnoverStatsTable.getColumnModel().getColumn(0).setResizable(false); turnoverStatsTable.getColumnModel().getColumn(0).setPreferredWidth(60); turnoverStatsTable.getColumnModel().getColumn(1).setResizable(false); turnoverStatsTable.getColumnModel().getColumn(1).setPreferredWidth(10); turnoverStatsTable.getColumnModel().getColumn(2).setResizable(false); turnoverStatsTable.getColumnModel().getColumn(2).setPreferredWidth(50); org.jdesktop.layout.GroupLayout mainPanelLayout = new org.jdesktop.layout.GroupLayout(mainPanel); mainPanel.setLayout(mainPanelLayout); mainPanelLayout.setHorizontalGroup(mainPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(mainPanelLayout.createSequentialGroup().add(mainPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(mainPanelLayout.createSequentialGroup().add(mainPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(mainPanelLayout.createSequentialGroup().add(60, 60, 60).add(systemStatsLabel)) .add(mainPanelLayout.createSequentialGroup().addContainerGap().add(mainPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(systemStatsScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 183, Short.MAX_VALUE) .add(campaignScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 183, Short.MAX_VALUE)))) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(mainPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(mainPanelLayout.createSequentialGroup().add(mainPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(turnoverStatsScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE) .add(orderStatsScrollPane, 0, 0, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)) .add(mainPanelLayout.createSequentialGroup().add(orderLabel).add(80, 80, 80)))) .add(org.jdesktop.layout.GroupLayout.TRAILING, mainPanelLayout.createSequentialGroup() .add(75, 75, 75).add(campaignLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 93, Short.MAX_VALUE) .add(turnoverStatsLabel).add(69, 69, 69))) .add(mainPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING).add( org.jdesktop.layout.GroupLayout.LEADING, mainPanelLayout.createSequentialGroup() .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(phoneStatsScrollPane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 140, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(responseStatsScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 161, Short.MAX_VALUE)) .add(org.jdesktop.layout.GroupLayout.LEADING, mainPanelLayout.createSequentialGroup().add(43, 43, 43).add(phoneStatsLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 90, Short.MAX_VALUE) .add(reponseStatsLabel).add(53, 53, 53))) .addContainerGap())); mainPanelLayout.setVerticalGroup(mainPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(mainPanelLayout.createSequentialGroup().add(mainPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(mainPanelLayout.createSequentialGroup() .add(mainPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(reponseStatsLabel).add(phoneStatsLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(mainPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(phoneStatsScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 310, Short.MAX_VALUE) .add(responseStatsScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 310, Short.MAX_VALUE))) .add(mainPanelLayout.createSequentialGroup() .add(mainPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(systemStatsLabel).add(orderLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(mainPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false) .add(systemStatsScrollPane, 0, 0, Short.MAX_VALUE).add(orderStatsScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 119, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(mainPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(turnoverStatsLabel).add(campaignLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(mainPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(turnoverStatsScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 166, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.LEADING, campaignScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 166, Short.MAX_VALUE)))) .addContainerGap())); org.jdesktop.layout.GroupLayout statisticsPanelLayout = new org.jdesktop.layout.GroupLayout( statisticsPanel); statisticsPanel.setLayout(statisticsPanelLayout); statisticsPanelLayout.setHorizontalGroup( statisticsPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(mainPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 662, Short.MAX_VALUE)); statisticsPanelLayout .setVerticalGroup(statisticsPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(mainPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 335, Short.MAX_VALUE)); tabPane.addTab("Statistics", statisticsPanel); graphPanel.setEnabled(false); graphPanel.setFocusTraversalKeysEnabled(false); graphPanel.setFont(new java.awt.Font("STHeiti", 0, 12)); graphPanel.setNextFocusableComponent(phoneDisplayPanel); graphPanel.addKeyListener(new java.awt.event.KeyAdapter() { public void keyPressed(java.awt.event.KeyEvent evt) { graphPanelKeyPressed(evt); } }); org.jdesktop.layout.GroupLayout graphInnerPanelLayout = new org.jdesktop.layout.GroupLayout( graphInnerPanel); graphInnerPanel.setLayout(graphInnerPanelLayout); graphInnerPanelLayout.setHorizontalGroup(graphInnerPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(0, 662, Short.MAX_VALUE)); graphInnerPanelLayout.setVerticalGroup(graphInnerPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(0, 323, Short.MAX_VALUE)); org.jdesktop.layout.GroupLayout graphPanelLayout = new org.jdesktop.layout.GroupLayout(graphPanel); graphPanel.setLayout(graphPanelLayout); graphPanelLayout.setHorizontalGroup(graphPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(0, 662, Short.MAX_VALUE) .add(graphPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add( graphInnerPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); graphPanelLayout.setVerticalGroup(graphPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(0, 335, Short.MAX_VALUE) .add(graphPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(graphPanelLayout.createSequentialGroup().addContainerGap() .add(graphInnerPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()))); tabPane.addTab("Graph", graphPanel); phoneDisplayTabPanel.setToolTipText("Display for all individual SoftPhones in Pool"); phoneDisplayTabPanel.setFocusTraversalKeysEnabled(false); phoneDisplayTabPanel.setFont(new java.awt.Font("STHeiti", 0, 12)); phoneDisplayTabPanel.setNextFocusableComponent(netConfigPanel); phoneDisplayTabPanel.addKeyListener(new java.awt.event.KeyAdapter() { public void keyPressed(java.awt.event.KeyEvent evt) { phoneDisplayTabPanelKeyPressed(evt); } }); phoneDisplayPanel.setBackground(new java.awt.Color(255, 255, 255)); phoneDisplayPanel.setToolTipText(""); phoneDisplayPanel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseExited(java.awt.event.MouseEvent evt) { phoneDisplayPanelMouseExited(evt); } public void mouseEntered(java.awt.event.MouseEvent evt) { phoneDisplayPanelMouseEntered(evt); } }); softphoneInfoLabel.setFont(new java.awt.Font("STHeiti", 0, 8)); softphoneInfoLabel.setForeground(new java.awt.Color(102, 102, 102)); softphoneInfoLabel.setToolTipText(""); proxyInfoLabel.setFont(new java.awt.Font("STHeiti", 0, 8)); proxyInfoLabel.setForeground(new java.awt.Color(102, 102, 102)); proxyInfoLabel.setToolTipText(""); proxyInfoLabel.setHorizontalAlignment(SwingConstants.RIGHT); primaryStatusLabel.setFont(new java.awt.Font("STHeiti", 1, 24)); primaryStatusLabel.setForeground(new java.awt.Color(102, 102, 102)); primaryStatusLabel.setToolTipText(""); primaryStatusLabel.setHorizontalAlignment(SwingConstants.CENTER); primaryStatusDetailsLabel.setFont(new java.awt.Font("STHeiti", 0, 12)); primaryStatusDetailsLabel.setForeground(new java.awt.Color(102, 102, 102)); primaryStatusDetailsLabel.setToolTipText(""); primaryStatusDetailsLabel.setHorizontalAlignment(SwingConstants.CENTER); secondaryStatusLabel.setFont(new java.awt.Font("STHeiti", 1, 24)); secondaryStatusLabel.setForeground(new java.awt.Color(102, 102, 102)); secondaryStatusLabel.setToolTipText(""); secondaryStatusLabel.setHorizontalAlignment(SwingConstants.CENTER); secondaryStatusDetailsLabel.setFont(new java.awt.Font("STHeiti", 0, 12)); secondaryStatusDetailsLabel.setForeground(new java.awt.Color(102, 102, 102)); secondaryStatusDetailsLabel.setToolTipText(""); secondaryStatusDetailsLabel.setHorizontalAlignment(SwingConstants.CENTER); onPanel.setBackground(new java.awt.Color(255, 255, 255)); onPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); onPanel.setToolTipText("Powered On"); onLabel.setFont(new java.awt.Font("STHeiti", 1, 8)); onLabel.setForeground(new java.awt.Color(204, 204, 204)); onLabel.setText("ON"); org.jdesktop.layout.GroupLayout onPanelLayout = new org.jdesktop.layout.GroupLayout(onPanel); onPanel.setLayout(onPanelLayout); onPanelLayout .setHorizontalGroup(onPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, onPanelLayout.createSequentialGroup() .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(onLabel).addContainerGap())); onPanelLayout.setVerticalGroup( onPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(onLabel)); idlePanel.setBackground(new java.awt.Color(255, 255, 255)); idlePanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); idlePanel.setToolTipText("Phone is Ready"); idleLabel.setFont(new java.awt.Font("STHeiti", 1, 8)); idleLabel.setForeground(new java.awt.Color(204, 204, 204)); idleLabel.setText("IDL"); org.jdesktop.layout.GroupLayout idlePanelLayout = new org.jdesktop.layout.GroupLayout(idlePanel); idlePanel.setLayout(idlePanelLayout); idlePanelLayout .setHorizontalGroup(idlePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, idlePanelLayout.createSequentialGroup() .addContainerGap(11, Short.MAX_VALUE).add(idleLabel).addContainerGap())); idlePanelLayout.setVerticalGroup( idlePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(idleLabel)); connectingPanel.setBackground(new java.awt.Color(255, 255, 255)); connectingPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); connectingPanel.setToolTipText("Connecting Callout"); connectingLabel.setFont(new java.awt.Font("STHeiti", 1, 8)); connectingLabel.setForeground(new java.awt.Color(204, 204, 204)); connectingLabel.setText("CON"); org.jdesktop.layout.GroupLayout connectingPanelLayout = new org.jdesktop.layout.GroupLayout( connectingPanel); connectingPanel.setLayout(connectingPanelLayout); connectingPanelLayout.setHorizontalGroup( connectingPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(connectingPanelLayout.createSequentialGroup().addContainerGap().add(connectingLabel) .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); connectingPanelLayout.setVerticalGroup(connectingPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(connectingLabel)); callingPanel.setBackground(new java.awt.Color(255, 255, 255)); callingPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); callingPanel.setToolTipText("Calling"); callingLabel.setFont(new java.awt.Font("STHeiti", 1, 8)); callingLabel.setForeground(new java.awt.Color(204, 204, 204)); callingLabel.setText("CLL"); org.jdesktop.layout.GroupLayout callingPanelLayout = new org.jdesktop.layout.GroupLayout(callingPanel); callingPanel.setLayout(callingPanelLayout); callingPanelLayout .setHorizontalGroup(callingPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(callingPanelLayout.createSequentialGroup().addContainerGap().add(callingLabel) .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); callingPanelLayout.setVerticalGroup( callingPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(callingLabel)); ringingPanel.setBackground(new java.awt.Color(255, 255, 255)); ringingPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); ringingPanel.setToolTipText("Ringing"); ringingLabel.setFont(new java.awt.Font("STHeiti", 1, 8)); ringingLabel.setForeground(new java.awt.Color(204, 204, 204)); ringingLabel.setText("RNG"); org.jdesktop.layout.GroupLayout ringingPanelLayout = new org.jdesktop.layout.GroupLayout(ringingPanel); ringingPanel.setLayout(ringingPanelLayout); ringingPanelLayout .setHorizontalGroup(ringingPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, ringingPanelLayout.createSequentialGroup() .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(ringingLabel).addContainerGap())); ringingPanelLayout.setVerticalGroup( ringingPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(ringingLabel)); acceptingPanel.setBackground(new java.awt.Color(255, 255, 255)); acceptingPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); acceptingPanel.setToolTipText("Accepting Incoming Call"); acceptingLabel.setFont(new java.awt.Font("STHeiti", 1, 8)); acceptingLabel.setForeground(new java.awt.Color(204, 204, 204)); acceptingLabel.setText("ACC"); org.jdesktop.layout.GroupLayout acceptingPanelLayout = new org.jdesktop.layout.GroupLayout(acceptingPanel); acceptingPanel.setLayout(acceptingPanelLayout); acceptingPanelLayout.setHorizontalGroup( acceptingPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(acceptingPanelLayout.createSequentialGroup().addContainerGap().add(acceptingLabel) .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); acceptingPanelLayout.setVerticalGroup(acceptingPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(acceptingLabel)); talkingPanel.setBackground(new java.awt.Color(255, 255, 255)); talkingPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); talkingPanel.setToolTipText("Phonecall Established (Talking)"); talkingLabel.setFont(new java.awt.Font("STHeiti", 1, 8)); talkingLabel.setForeground(new java.awt.Color(204, 204, 204)); talkingLabel.setText("TALK"); org.jdesktop.layout.GroupLayout talkingPanelLayout = new org.jdesktop.layout.GroupLayout(talkingPanel); talkingPanel.setLayout(talkingPanelLayout); talkingPanelLayout .setHorizontalGroup(talkingPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(talkingPanelLayout.createSequentialGroup().addContainerGap().add(talkingLabel) .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); talkingPanelLayout.setVerticalGroup( talkingPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(talkingLabel)); registeredPanel.setBackground(new java.awt.Color(255, 255, 255)); registeredPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); registeredPanel.setToolTipText("Registered with Proxy (Incoming Proxy Calls Enabled)"); registeredLabel.setFont(new java.awt.Font("STHeiti", 1, 8)); registeredLabel.setForeground(new java.awt.Color(204, 204, 204)); registeredLabel.setText("REG"); org.jdesktop.layout.GroupLayout registeredPanelLayout = new org.jdesktop.layout.GroupLayout( registeredPanel); registeredPanel.setLayout(registeredPanelLayout); registeredPanelLayout.setHorizontalGroup( registeredPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(registeredPanelLayout.createSequentialGroup().addContainerGap().add(registeredLabel) .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); registeredPanelLayout.setVerticalGroup(registeredPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(registeredLabel)); answerPanel.setBackground(new java.awt.Color(255, 255, 255)); answerPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); answerPanel.setToolTipText("Auto Answer Calls"); answerLabel.setFont(new java.awt.Font("STHeiti", 1, 8)); answerLabel.setForeground(new java.awt.Color(204, 204, 204)); answerLabel.setText("ANS"); org.jdesktop.layout.GroupLayout answerPanelLayout = new org.jdesktop.layout.GroupLayout(answerPanel); answerPanel.setLayout(answerPanelLayout); answerPanelLayout .setHorizontalGroup(answerPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(answerPanelLayout.createSequentialGroup().addContainerGap().add(answerLabel) .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); answerPanelLayout.setVerticalGroup( answerPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(answerLabel)); mutePanel.setBackground(new java.awt.Color(255, 255, 255)); mutePanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); mutePanel.setToolTipText("Mute Audio"); muteLabel.setFont(new java.awt.Font("STHeiti", 1, 8)); muteLabel.setForeground(new java.awt.Color(204, 204, 204)); muteLabel.setText("MUT"); org.jdesktop.layout.GroupLayout mutePanelLayout = new org.jdesktop.layout.GroupLayout(mutePanel); mutePanel.setLayout(mutePanelLayout); mutePanelLayout .setHorizontalGroup(mutePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(mutePanelLayout.createSequentialGroup().addContainerGap().add(muteLabel) .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); mutePanelLayout.setVerticalGroup( mutePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(muteLabel)); cancelPanel.setBackground(new java.awt.Color(255, 255, 255)); cancelPanel.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 204, 204))); cancelPanel.setToolTipText("Auto Cancel Calls"); cancelLabel.setFont(new java.awt.Font("STHeiti", 1, 8)); cancelLabel.setForeground(new java.awt.Color(204, 204, 204)); cancelLabel.setText("CAN"); org.jdesktop.layout.GroupLayout cancelPanelLayout = new org.jdesktop.layout.GroupLayout(cancelPanel); cancelPanel.setLayout(cancelPanelLayout); cancelPanelLayout .setHorizontalGroup(cancelPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(cancelPanelLayout.createSequentialGroup().addContainerGap().add(cancelLabel) .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); cancelPanelLayout.setVerticalGroup( cancelPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(cancelLabel)); org.jdesktop.layout.GroupLayout phoneDisplayPanelLayout = new org.jdesktop.layout.GroupLayout( phoneDisplayPanel); phoneDisplayPanel.setLayout(phoneDisplayPanelLayout); phoneDisplayPanelLayout.setHorizontalGroup(phoneDisplayPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(phoneDisplayPanelLayout.createSequentialGroup().addContainerGap().add(phoneDisplayPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(phoneDisplayPanelLayout.createSequentialGroup().add(phoneDisplayPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(primaryStatusLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 650, Short.MAX_VALUE) .add(phoneDisplayPanelLayout.createSequentialGroup() .add(softphoneInfoLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 351, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(proxyInfoLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 287, Short.MAX_VALUE)) .add(primaryStatusDetailsLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 650, Short.MAX_VALUE) .add(secondaryStatusDetailsLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 650, Short.MAX_VALUE) .add(secondaryStatusLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 650, Short.MAX_VALUE)) .addContainerGap()) .add(org.jdesktop.layout.GroupLayout.TRAILING, phoneDisplayPanelLayout.createSequentialGroup() .add(onPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(idlePanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(connectingPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 31, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(callingPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(ringingPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 31, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(acceptingPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 31, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(talkingPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 31, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(registeredPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(answerPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(cancelPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(mutePanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(148, 148, 148))))); phoneDisplayPanelLayout.setVerticalGroup(phoneDisplayPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(phoneDisplayPanelLayout.createSequentialGroup().add(phoneDisplayPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(softphoneInfoLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 18, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(proxyInfoLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 18, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(24, 24, 24) .add(primaryStatusLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 31, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(primaryStatusDetailsLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 18, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(24, 24, 24) .add(secondaryStatusLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 31, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(secondaryStatusDetailsLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 17, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 143, Short.MAX_VALUE) .add(phoneDisplayPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(phoneDisplayPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(phoneDisplayPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(acceptingPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(org.jdesktop.layout.GroupLayout.LEADING, phoneDisplayPanelLayout .createParallelGroup( org.jdesktop.layout.GroupLayout.TRAILING) .add(ringingPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(org.jdesktop.layout.GroupLayout.LEADING, phoneDisplayPanelLayout.createParallelGroup( org.jdesktop.layout.GroupLayout.TRAILING) .add(callingPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(org.jdesktop.layout.GroupLayout.LEADING, phoneDisplayPanelLayout .createParallelGroup( org.jdesktop.layout.GroupLayout.TRAILING) .add(connectingPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(org.jdesktop.layout.GroupLayout.LEADING, phoneDisplayPanelLayout .createParallelGroup( org.jdesktop.layout.GroupLayout.TRAILING) .add(idlePanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(org.jdesktop.layout.GroupLayout.LEADING, onPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))))) .add(talkingPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(phoneDisplayPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(org.jdesktop.layout.GroupLayout.LEADING, registeredPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(answerPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) .add(cancelPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(mutePanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addContainerGap())); org.jdesktop.layout.GroupLayout phoneDisplayTabPanelLayout = new org.jdesktop.layout.GroupLayout( phoneDisplayTabPanel); phoneDisplayTabPanel.setLayout(phoneDisplayTabPanelLayout); phoneDisplayTabPanelLayout.setHorizontalGroup( phoneDisplayTabPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add( phoneDisplayPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); phoneDisplayTabPanelLayout.setVerticalGroup( phoneDisplayTabPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add( phoneDisplayPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); tabPane.addTab("Display", phoneDisplayTabPanel); toolsInnerPanel.setBorder( javax.swing.BorderFactory.createTitledBorder(null, "Tools", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, new java.awt.Font("STHeiti", 0, 14))); // NOI18N toolsInnerPanel.setToolTipText(""); toolsInnerPanel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { toolsInnerPanelMouseClicked(evt); } }); netManagerOutboundServerToggleButton.setFont(new java.awt.Font("STHeiti", 0, 8)); netManagerOutboundServerToggleButton.setText("OutManagementClient"); netManagerOutboundServerToggleButton.setToolTipText("Outbound NetManager Server (Managed Mode)"); netManagerOutboundServerToggleButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { netManagerOutboundServerToggleButtonActionPerformed(evt); } }); netManagerInboundServerToggleButton.setFont(new java.awt.Font("STHeiti", 0, 8)); netManagerInboundServerToggleButton.setText("InManagementClient"); netManagerInboundServerToggleButton .setToolTipText("Start Inbound NetManager Server for CallCenter Manager"); netManagerInboundServerToggleButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { netManagerInboundServerToggleButtonActionPerformed(evt); } }); controlsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Controls", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, new java.awt.Font("STHeiti", 0, 10))); // NOI18N displayLabel.setFont(new java.awt.Font("STHeiti", 0, 10)); displayLabel.setText("Display"); enableDisplayCheckBox.setFont(new java.awt.Font("STHeiti", 0, 10)); enableDisplayCheckBox.setToolTipText("Enable SoftPhones Display Feedback"); enableDisplayCheckBox.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); enableDisplayCheckBox.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); enableDisplayCheckBox.setIconTextGap(0); snmpLabel1.setFont(new java.awt.Font("STHeiti", 0, 10)); snmpLabel1.setText("Scan"); smoothCheckBox.setFont(new java.awt.Font("STHeiti", 0, 10)); smoothCheckBox.setSelected(true); smoothCheckBox.setToolTipText("Smooth Meter Animation (disabling slightly increases performance)"); smoothCheckBox.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); smoothCheckBox.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); smoothCheckBox.setIconTextGap(0); scanCheckBox.setFont(new java.awt.Font("STHeiti", 0, 10)); scanCheckBox.setToolTipText("Campaign Scan Phonenumbers Mode"); scanCheckBox.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); scanCheckBox.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); scanCheckBox.setIconTextGap(0); smoothLabel.setFont(new java.awt.Font("STHeiti", 0, 10)); smoothLabel.setText("Smooth"); org.jdesktop.layout.GroupLayout controlsPanelLayout = new org.jdesktop.layout.GroupLayout(controlsPanel); controlsPanel.setLayout(controlsPanelLayout); controlsPanelLayout.setHorizontalGroup(controlsPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(controlsPanelLayout.createSequentialGroup().addContainerGap() .add(controlsPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(displayLabel).add(enableDisplayCheckBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 14, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(controlsPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(snmpLabel1).add(scanCheckBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 14, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(10, 10, 10) .add(controlsPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(smoothLabel) .add(controlsPanelLayout.createSequentialGroup().add(6, 6, 6).add(smoothCheckBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 14, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) .addContainerGap(183, Short.MAX_VALUE))); controlsPanelLayout.linkSize( new java.awt.Component[] { enableDisplayCheckBox, scanCheckBox, smoothCheckBox }, org.jdesktop.layout.GroupLayout.HORIZONTAL); controlsPanelLayout .setVerticalGroup(controlsPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(controlsPanelLayout.createSequentialGroup().add(displayLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(enableDisplayCheckBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 11, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(12, 12, 12)) .add(controlsPanelLayout.createSequentialGroup() .add(controlsPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(snmpLabel1).add(smoothLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(controlsPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(smoothCheckBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 21, Short.MAX_VALUE) .add(scanCheckBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 11, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addContainerGap())); controlsPanelLayout.linkSize( new java.awt.Component[] { enableDisplayCheckBox, scanCheckBox, smoothCheckBox }, org.jdesktop.layout.GroupLayout.VERTICAL); lookAndFeelPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Look and Feel", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, new java.awt.Font("STHeiti", 0, 10))); // NOI18N lookAndFeelGroup.add(lookAndFeelRButtonMotif); lookAndFeelRButtonMotif.setFont(new java.awt.Font("STHeiti", 0, 8)); lookAndFeelRButtonMotif.setText("Motif"); lookAndFeelRButtonMotif.setToolTipText("Set Look & Feel"); lookAndFeelRButtonMotif.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { lookAndFeelRButtonMotifMouseClicked(evt); } }); lookAndFeelGroup.add(lookAndFeelRButtonGTK); lookAndFeelRButtonGTK.setFont(new java.awt.Font("STHeiti", 0, 8)); lookAndFeelRButtonGTK.setText("GTK"); lookAndFeelRButtonGTK.setToolTipText("Set Look & Feel"); lookAndFeelRButtonGTK.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { lookAndFeelRButtonGTKMouseClicked(evt); } }); lookAndFeelGroup.add(lookAndFeelRButtonNimbus); lookAndFeelRButtonNimbus.setFont(new java.awt.Font("STHeiti", 0, 8)); lookAndFeelRButtonNimbus.setSelected(true); lookAndFeelRButtonNimbus.setText("Nimbus"); lookAndFeelRButtonNimbus.setToolTipText("Set Look & Feel"); lookAndFeelRButtonNimbus.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { lookAndFeelRButtonNimbusMouseClicked(evt); } }); lookAndFeelGroup.add(lookAndFeelRButtonWindows); lookAndFeelRButtonWindows.setFont(new java.awt.Font("STHeiti", 0, 8)); lookAndFeelRButtonWindows.setText("Windows"); lookAndFeelRButtonWindows.setToolTipText("Set Look & Feel"); lookAndFeelRButtonWindows.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { lookAndFeelRButtonWindowsMouseClicked(evt); } }); org.jdesktop.layout.GroupLayout lookAndFeelPanelLayout = new org.jdesktop.layout.GroupLayout( lookAndFeelPanel); lookAndFeelPanel.setLayout(lookAndFeelPanelLayout); lookAndFeelPanelLayout.setHorizontalGroup(lookAndFeelPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(lookAndFeelPanelLayout.createSequentialGroup().add(19, 19, 19).add(lookAndFeelRButtonNimbus) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED).add(lookAndFeelRButtonWindows) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(lookAndFeelRButtonGTK) .add(18, 18, 18).add(lookAndFeelRButtonMotif).addContainerGap(18, Short.MAX_VALUE))); lookAndFeelPanelLayout.setVerticalGroup(lookAndFeelPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(lookAndFeelPanelLayout.createSequentialGroup().addContainerGap() .add(lookAndFeelPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(lookAndFeelRButtonNimbus, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 14, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(lookAndFeelRButtonWindows, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 17, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(lookAndFeelRButtonGTK, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 17, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(lookAndFeelRButtonMotif, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 17, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); org.jdesktop.layout.GroupLayout toolsInnerPanelLayout = new org.jdesktop.layout.GroupLayout( toolsInnerPanel); toolsInnerPanel.setLayout(toolsInnerPanelLayout); toolsInnerPanelLayout.setHorizontalGroup( toolsInnerPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(toolsInnerPanelLayout.createSequentialGroup().addContainerGap() .add(toolsInnerPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) .add(org.jdesktop.layout.GroupLayout.LEADING, lookAndFeelPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.LEADING, controlsPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.LEADING, toolsInnerPanelLayout.createSequentialGroup() .add(netManagerOutboundServerToggleButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 153, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(netManagerInboundServerToggleButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 153, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); toolsInnerPanelLayout.setVerticalGroup(toolsInnerPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(toolsInnerPanelLayout.createSequentialGroup().addContainerGap().add(toolsInnerPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(netManagerOutboundServerToggleButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 37, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(netManagerInboundServerToggleButton)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(controlsPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(lookAndFeelPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addContainerGap(75, Short.MAX_VALUE))); toolsInnerPanelLayout.linkSize(new java.awt.Component[] { netManagerInboundServerToggleButton, netManagerOutboundServerToggleButton }, org.jdesktop.layout.GroupLayout.VERTICAL); sipInfoPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "SIP Information", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, new java.awt.Font("STHeiti", 0, 12))); // NOI18N sipInfoPanel.setToolTipText(""); destinationScrollPane .setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); destinationTextArea.setBackground(new java.awt.Color(204, 204, 204)); destinationTextArea.setColumns(1); destinationTextArea.setFont(new java.awt.Font("STHeiti", 0, 10)); destinationTextArea.setRows(16); destinationTextArea.setToolTipText("Telephone Addresses"); destinationTextArea.setEnabled(false); destinationTextArea.setMinimumSize(new java.awt.Dimension(330, 65)); destinationScrollPane.setViewportView(destinationTextArea); org.jdesktop.layout.GroupLayout sipInfoPanelLayout = new org.jdesktop.layout.GroupLayout(sipInfoPanel); sipInfoPanel.setLayout(sipInfoPanelLayout); sipInfoPanelLayout.setHorizontalGroup( sipInfoPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add( destinationScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 261, Short.MAX_VALUE)); sipInfoPanelLayout .setVerticalGroup(sipInfoPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(sipInfoPanelLayout .createSequentialGroup().addContainerGap().add(destinationScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 244, Short.MAX_VALUE) .addContainerGap())); org.jdesktop.layout.GroupLayout toolsPanelLayout = new org.jdesktop.layout.GroupLayout(toolsPanel); toolsPanel.setLayout(toolsPanelLayout); toolsPanelLayout .setHorizontalGroup(toolsPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(toolsPanelLayout.createSequentialGroup() .add(toolsInnerPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(sipInfoPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addContainerGap(47, Short.MAX_VALUE))); toolsPanelLayout.setVerticalGroup(toolsPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(toolsPanelLayout.createSequentialGroup() .add(toolsInnerPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(54, 54, 54)) .add(toolsPanelLayout.createSequentialGroup() .add(sipInfoPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addContainerGap())); toolsPanelLayout.linkSize(new java.awt.Component[] { sipInfoPanel, toolsInnerPanel }, org.jdesktop.layout.GroupLayout.VERTICAL); tabPane.addTab("Tools", toolsPanel); netConfigPanel.setToolTipText("Mainly Proxy Configuration"); netConfigPanel.setFocusTraversalKeysEnabled(false); netConfigPanel.setFont(new java.awt.Font("STHeiti", 0, 12)); netConfigPanel.setNextFocusableComponent(logPanel); netConfigPanel.addKeyListener(new java.awt.event.KeyAdapter() { public void keyPressed(java.awt.event.KeyEvent evt) { netConfigPanelKeyPressed(evt); } }); authenticationPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Network Configuration", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, new java.awt.Font("STHeiti", 0, 12))); // NOI18N authenticationPanel.setToolTipText(""); iconsLabel.setFont(new java.awt.Font("STHeiti", 0, 10)); iconsLabel.setText("Icons"); iconsCheckBox.setFont(new java.awt.Font("STHeiti", 0, 10)); iconsCheckBox.setSelected(true); iconsCheckBox.setToolTipText("Smooth needle movement Meters / Dials"); iconsCheckBox.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); iconsCheckBox.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); iconsCheckBox.setIconTextGap(0); clientIPLabel.setFont(new java.awt.Font("STHeiti", 0, 10)); clientIPLabel.setText("Client"); clientIPField.setBackground(new java.awt.Color(204, 204, 204)); clientIPField.setFont(new java.awt.Font("STHeiti", 0, 10)); clientIPField.setToolTipText("Your computer's IP (Automatic)"); pubIPLabel.setFont(new java.awt.Font("STHeiti", 0, 10)); pubIPLabel.setText("Pub IP"); pubIPField.setFont(new java.awt.Font("STHeiti", 0, 10)); pubIPField.setToolTipText( "Please fill in your public IP address (type: \"myip\" in google to find you public ip address)"); pubIPField.setNextFocusableComponent(usernameField); clientPortLabel.setFont(new java.awt.Font("STHeiti", 0, 10)); clientPortLabel.setText("Port"); registerCheckBox.setFont(new java.awt.Font("STHeiti", 0, 10)); registerCheckBox.setToolTipText("Enable Automatic Proxy Login at startup"); registerCheckBox.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); registerCheckBox.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); registerCheckBox.setIconTextGap(0); registerLabel.setFont(new java.awt.Font("STHeiti", 0, 10)); registerLabel.setText("Reg"); clientPortField.setBackground(new java.awt.Color(204, 204, 204)); clientPortField.setFont(new java.awt.Font("STHeiti", 0, 10)); clientPortField.setToolTipText("Client Port (Tip: \"auto\")"); clientPortField.setNextFocusableComponent(usernameField); domainLabel.setFont(new java.awt.Font("STHeiti", 0, 10)); domainLabel.setText("Domain"); domainField.setFont(new java.awt.Font("STHeiti", 0, 10)); domainField.setToolTipText("Internet Telephone Provider Domain (Tip: sip1.budgetphone.nl)"); serverIPLabel.setFont(new java.awt.Font("STHeiti", 0, 10)); serverIPLabel.setText("Server"); serverIPField.setFont(new java.awt.Font("STHeiti", 0, 10)); serverIPField.setToolTipText("Internet Telephone Provider Server (Tip: sip1.budgetphone.nl)"); serverIPField.setNextFocusableComponent(usernameField); serverPortLabel.setFont(new java.awt.Font("STHeiti", 0, 10)); serverPortLabel.setText("Port"); serverPortField.setFont(new java.awt.Font("STHeiti", 0, 10)); serverPortField.setToolTipText("Internet Telephone Provider Port (Tip: \"5060\")"); serverPortField.setNextFocusableComponent(usernameField); pfixLabel.setFont(new java.awt.Font("STHeiti", 0, 10)); pfixLabel.setText("PFix"); usersecretLabel.setFont(new java.awt.Font("STHeiti", 0, 10)); usersecretLabel.setText("User"); suffixLabel.setFont(new java.awt.Font("STHeiti", 0, 10)); suffixLabel.setText("SFix"); prefixField.setBackground(new java.awt.Color(204, 204, 204)); prefixField.setFont(new java.awt.Font("STHeiti", 0, 10)); prefixField.setToolTipText("Password Prefix (advanced usage normally not needed)"); prefixField.setNextFocusableComponent(usernameField); usernameField.setFont(new java.awt.Font("STHeiti", 0, 10)); usernameField.setToolTipText("Username (comes from your Internet Telephone Provider)"); suffixField.setBackground(new java.awt.Color(204, 204, 204)); suffixField.setFont(new java.awt.Font("STHeiti", 0, 10)); suffixField.setToolTipText("Password Suffix (advanced usage normally not needed)"); suffixField.setNextFocusableComponent(usernameField); saveConfigurationButton.setFont(new java.awt.Font("STHeiti", 0, 10)); saveConfigurationButton.setText("Save"); saveConfigurationButton.setToolTipText("Saves Config (Tip: Power Cycle again after Save)"); saveConfigurationButton.setFocusPainted(false); saveConfigurationButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { saveConfigurationButtonActionPerformed(evt); } }); toegangField.setFont(new java.awt.Font("STHeiti", 0, 10)); toegangField.setToolTipText("Password (comes from your Internet Telephone Provider)"); secretLabel.setFont(new java.awt.Font("STHeiti", 0, 10)); secretLabel.setText("Secr"); prefPhoneLinesPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Preferred number of CallCenter Phone Lines", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, new java.awt.Font("STHeiti", 0, 10))); // NOI18N prefPhoneLinesSlider.setFont(new java.awt.Font("STHeiti", 0, 8)); prefPhoneLinesSlider.setMajorTickSpacing(50); prefPhoneLinesSlider.setMaximum(500); prefPhoneLinesSlider.setMinimum(100); prefPhoneLinesSlider.setMinorTickSpacing(25); prefPhoneLinesSlider.setPaintLabels(true); prefPhoneLinesSlider.setPaintTicks(true); prefPhoneLinesSlider.setSnapToTicks(true); prefPhoneLinesSlider.setToolTipText("The number of preferred CallCenter phonelines"); prefPhoneLinesSlider.setValue(500); org.jdesktop.layout.GroupLayout prefPhoneLinesPanelLayout = new org.jdesktop.layout.GroupLayout( prefPhoneLinesPanel); prefPhoneLinesPanel.setLayout(prefPhoneLinesPanelLayout); prefPhoneLinesPanelLayout.setHorizontalGroup( prefPhoneLinesPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(prefPhoneLinesPanelLayout .createSequentialGroup().add(18, 18, 18).add(prefPhoneLinesSlider, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 383, Short.MAX_VALUE) .addContainerGap())); prefPhoneLinesPanelLayout.setVerticalGroup( prefPhoneLinesPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(prefPhoneLinesPanelLayout.createSequentialGroup() .add(prefPhoneLinesSlider, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 34, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addContainerGap(7, Short.MAX_VALUE))); org.jdesktop.layout.GroupLayout authenticationPanelLayout = new org.jdesktop.layout.GroupLayout( authenticationPanel); authenticationPanel.setLayout(authenticationPanelLayout); authenticationPanelLayout.setHorizontalGroup(authenticationPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(authenticationPanelLayout.createSequentialGroup().addContainerGap() .add(authenticationPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(authenticationPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(prefPhoneLinesPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(authenticationPanelLayout.createSequentialGroup() .add(authenticationPanelLayout .createParallelGroup( org.jdesktop.layout.GroupLayout.LEADING, false) .add(clientIPLabel) .add(serverIPLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(domainLabel)) .add(13, 13, 13) .add(authenticationPanelLayout .createParallelGroup( org.jdesktop.layout.GroupLayout.LEADING) .add(authenticationPanelLayout.createSequentialGroup() .add(authenticationPanelLayout.createParallelGroup( org.jdesktop.layout.GroupLayout.TRAILING) .add(authenticationPanelLayout .createSequentialGroup() .add(pfixLabel).add(21, 21, 21)) .add(prefixField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 35, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap( org.jdesktop.layout.LayoutStyle.RELATED) .add(authenticationPanelLayout.createParallelGroup( org.jdesktop.layout.GroupLayout.LEADING) .add(usernameField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 43, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(usersecretLabel)) .addPreferredGap( org.jdesktop.layout.LayoutStyle.RELATED) .add(authenticationPanelLayout.createParallelGroup( org.jdesktop.layout.GroupLayout.LEADING) .add(toegangField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 53, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(secretLabel)) .add(authenticationPanelLayout.createParallelGroup( org.jdesktop.layout.GroupLayout.LEADING) .add(authenticationPanelLayout .createSequentialGroup() .add(11, 11, 11).add(suffixLabel) .add(17, 17, 17)) .add(authenticationPanelLayout .createSequentialGroup() .addPreferredGap( org.jdesktop.layout.LayoutStyle.UNRELATED) .add(suffixField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 86, Short.MAX_VALUE)))) .add(serverIPField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 245, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.TRAILING, authenticationPanelLayout.createSequentialGroup() .add(clientIPField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 118, Short.MAX_VALUE) .addPreferredGap( org.jdesktop.layout.LayoutStyle.RELATED) .add(pubIPLabel) .addPreferredGap( org.jdesktop.layout.LayoutStyle.RELATED) .add(pubIPField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 85, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(domainField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 245, Short.MAX_VALUE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(authenticationPanelLayout .createParallelGroup( org.jdesktop.layout.GroupLayout.LEADING) .add(authenticationPanelLayout.createSequentialGroup() .add(authenticationPanelLayout.createParallelGroup( org.jdesktop.layout.GroupLayout.LEADING) .add(clientPortLabel).add(serverPortLabel)) .add(17, 17, 17) .add(authenticationPanelLayout.createParallelGroup( org.jdesktop.layout.GroupLayout.TRAILING) .add(org.jdesktop.layout.GroupLayout.LEADING, serverPortField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 75, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.LEADING, clientPortField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 75, Short.MAX_VALUE))) .add(authenticationPanelLayout.createSequentialGroup().add( registerCheckBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 14, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(24, 24, 24) .add(authenticationPanelLayout.createParallelGroup( org.jdesktop.layout.GroupLayout.LEADING) .add(iconsCheckBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 14, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(iconsLabel))) .add(registerLabel)) .addContainerGap())) .add(org.jdesktop.layout.GroupLayout.TRAILING, authenticationPanelLayout.createSequentialGroup() .add(saveConfigurationButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 94, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(166, 166, 166))))); authenticationPanelLayout.linkSize(new java.awt.Component[] { clientPortLabel, serverPortLabel }, org.jdesktop.layout.GroupLayout.HORIZONTAL); authenticationPanelLayout.setVerticalGroup(authenticationPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(authenticationPanelLayout.createSequentialGroup().addContainerGap() .add(authenticationPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(authenticationPanelLayout.createSequentialGroup() .add(authenticationPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(clientIPLabel).add(clientPortLabel) .add(clientIPField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(pubIPLabel).add(pubIPField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 19, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(authenticationPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(domainLabel).add(domainField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 19, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(authenticationPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(serverIPField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 19, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(serverIPLabel).add(serverPortLabel))) .add(authenticationPanelLayout.createSequentialGroup() .add(clientPortField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 19, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(47, 47, 47).add(serverPortField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 19, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) .add(7, 7, 7) .add(authenticationPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(authenticationPanelLayout.createSequentialGroup().add(suffixLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(authenticationPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.CENTER) .add(prefixField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 19, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(toegangField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 19, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(usernameField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 19, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(suffixField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 19, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(registerCheckBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 17, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(iconsCheckBox, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .add(authenticationPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(pfixLabel).add(usersecretLabel).add(secretLabel)) .add(registerLabel).add(iconsLabel)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(prefPhoneLinesPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(saveConfigurationButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 15, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addContainerGap())); authenticationPanelLayout.linkSize(new java.awt.Component[] { clientIPLabel, domainLabel, serverIPLabel }, org.jdesktop.layout.GroupLayout.VERTICAL); authenticationPanelLayout.linkSize( new java.awt.Component[] { clientIPField, clientPortField, domainField, prefixField, pubIPField, serverIPField, serverPortField, suffixField, toegangField, usernameField }, org.jdesktop.layout.GroupLayout.VERTICAL); authenticationPanelLayout.linkSize(new java.awt.Component[] { clientPortLabel, serverPortLabel }, org.jdesktop.layout.GroupLayout.VERTICAL); org.jdesktop.layout.GroupLayout netConfigPanelLayout = new org.jdesktop.layout.GroupLayout(netConfigPanel); netConfigPanel.setLayout(netConfigPanelLayout); netConfigPanelLayout.setHorizontalGroup( netConfigPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add( org.jdesktop.layout.GroupLayout.TRAILING, netConfigPanelLayout.createSequentialGroup().addContainerGap(114, Short.MAX_VALUE) .add(authenticationPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(111, 111, 111))); netConfigPanelLayout .setVerticalGroup(netConfigPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(netConfigPanelLayout.createSequentialGroup() .add(authenticationPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addContainerGap(67, Short.MAX_VALUE))); tabPane.addTab("Config", netConfigPanel); licensePanel.setName("licensePanel"); // NOI18N licensePanel.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { licensePanelMouseClicked(evt); } }); licenseTypePanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "License Type", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, new java.awt.Font("STHeiti", 0, 10))); // NOI18N licenseTypePanel.setToolTipText(""); licenseTypePanel.setFont(new java.awt.Font("STHeiti", 0, 13)); licenseTypePanel.setMaximumSize(new java.awt.Dimension(200, 239)); licenseTypePanel.setPreferredSize(new java.awt.Dimension(200, 239)); licenseTypePanel.setSize(new java.awt.Dimension(200, 239)); vergunningTypeList.setFont(new java.awt.Font("Courier New", 1, 12)); vergunningTypeList.setModel(new javax.swing.AbstractListModel() { String[] strings = { "Demo", "Standard", "Professional", "Enterprise" }; public int getSize() { return strings.length; } public Object getElementAt(int i) { return strings[i]; } }); vergunningTypeList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); vergunningTypeList.setToolTipText(""); vergunningTypeList.setSelectedIndices(new int[] { 0 }); vergunningTypeList.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { vergunningTypeListMouseClicked(evt); } }); jScrollPane1.setViewportView(vergunningTypeList); org.jdesktop.layout.GroupLayout licenseTypePanelLayout = new org.jdesktop.layout.GroupLayout( licenseTypePanel); licenseTypePanel.setLayout(licenseTypePanelLayout); licenseTypePanelLayout.setHorizontalGroup( licenseTypePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jScrollPane1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 116, Short.MAX_VALUE)); licenseTypePanelLayout.setVerticalGroup( licenseTypePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(licenseTypePanelLayout.createSequentialGroup() .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 157, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addContainerGap(17, Short.MAX_VALUE))); licenseDatePanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "License Start", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, new java.awt.Font("STHeiti", 0, 10))); // NOI18N licenseDatePanel.setToolTipText(""); licenseDatePanel.setFont(new java.awt.Font("STHeiti", 0, 13)); licenseDatePanel.setMaximumSize(new java.awt.Dimension(200, 239)); licenseDatePanel.setMinimumSize(new java.awt.Dimension(200, 239)); licenseDatePanel.setSize(new java.awt.Dimension(200, 239)); vergunningDateChooserPanel.setCurrentView(new datechooser.view.appearance.AppearancesList("Bordered", new datechooser.view.appearance.ViewAppearance("custom", new datechooser.view.appearance.swing.SwingCellAppearance( new java.awt.Font("Lucida Grande", java.awt.Font.PLAIN, 13), new java.awt.Color(0, 0, 0), new java.awt.Color(0, 0, 255), false, true, new datechooser.view.appearance.swing.ButtonPainter()), new datechooser.view.appearance.swing.SwingCellAppearance( new java.awt.Font("Lucida Grande", java.awt.Font.PLAIN, 13), new java.awt.Color(0, 0, 0), new java.awt.Color(0, 0, 255), true, true, new datechooser.view.appearance.swing.ButtonPainter()), new datechooser.view.appearance.swing.SwingCellAppearance( new java.awt.Font("Lucida Grande", java.awt.Font.PLAIN, 13), new java.awt.Color(0, 0, 255), new java.awt.Color(0, 0, 255), false, true, new datechooser.view.appearance.swing.ButtonPainter()), new datechooser.view.appearance.swing.SwingCellAppearance( new java.awt.Font("Lucida Grande", java.awt.Font.PLAIN, 13), new java.awt.Color(128, 128, 128), new java.awt.Color(0, 0, 255), false, true, new datechooser.view.appearance.swing.LabelPainter()), new datechooser.view.appearance.swing.SwingCellAppearance( new java.awt.Font("Lucida Grande", java.awt.Font.PLAIN, 13), new java.awt.Color(0, 0, 0), new java.awt.Color(0, 0, 255), false, true, new datechooser.view.appearance.swing.LabelPainter()), new datechooser.view.appearance.swing.SwingCellAppearance( new java.awt.Font("Lucida Grande", java.awt.Font.PLAIN, 13), new java.awt.Color(0, 0, 0), new java.awt.Color(255, 0, 0), false, false, new datechooser.view.appearance.swing.ButtonPainter()), (datechooser.view.BackRenderer) null, false, true))); vergunningDateChooserPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder( javax.swing.border.EtchedBorder.LOWERED, (java.awt.Color) null, (java.awt.Color) null)); vergunningDateChooserPanel.setLocale(new java.util.Locale("en", "", "")); vergunningDateChooserPanel.setNavigateFont(new java.awt.Font("STHeiti", java.awt.Font.PLAIN, 10)); vergunningDateChooserPanel.setBehavior(datechooser.model.multiple.MultyModelBehavior.SELECT_SINGLE); vergunningDateChooserPanel.addSelectionChangedListener(new datechooser.events.SelectionChangedListener() { public void onSelectionChange(datechooser.events.SelectionChangedEvent evt) { vergunningDateChooserPanelOnSelectionChange(evt); } }); org.jdesktop.layout.GroupLayout licenseDatePanelLayout = new org.jdesktop.layout.GroupLayout( licenseDatePanel); licenseDatePanel.setLayout(licenseDatePanelLayout); licenseDatePanelLayout.setHorizontalGroup( licenseDatePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add( org.jdesktop.layout.GroupLayout.TRAILING, licenseDatePanelLayout.createSequentialGroup() .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(vergunningDateChooserPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 220, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addContainerGap())); licenseDatePanelLayout.setVerticalGroup( licenseDatePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(licenseDatePanelLayout.createSequentialGroup() .add(vergunningDateChooserPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 155, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addContainerGap(19, Short.MAX_VALUE))); licensePeriodPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "License Period", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, new java.awt.Font("STHeiti", 0, 10))); // NOI18N licensePeriodPanel.setToolTipText(""); licensePeriodPanel.setFont(new java.awt.Font("STHeiti", 0, 13)); licensePeriodPanel.setMaximumSize(new java.awt.Dimension(200, 239)); licensePeriodPanel.setPreferredSize(new java.awt.Dimension(200, 239)); licensePeriodPanel.setSize(new java.awt.Dimension(200, 239)); vergunningPeriodList.setFont(new java.awt.Font("Courier New", 1, 12)); vergunningPeriodList.setModel(new javax.swing.AbstractListModel() { String[] strings = { "Month", "Year" }; public int getSize() { return strings.length; } public Object getElementAt(int i) { return strings[i]; } }); vergunningPeriodList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); vergunningPeriodList.setToolTipText(""); vergunningPeriodList.setEnabled(false); vergunningPeriodList.setFocusable(false); vergunningPeriodList.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { vergunningPeriodListMouseClicked(evt); } }); licensePeriodScrollPane.setViewportView(vergunningPeriodList); org.jdesktop.layout.GroupLayout licensePeriodPanelLayout = new org.jdesktop.layout.GroupLayout( licensePeriodPanel); licensePeriodPanel.setLayout(licensePeriodPanelLayout); licensePeriodPanelLayout.setHorizontalGroup(licensePeriodPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(licensePeriodScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 83, Short.MAX_VALUE)); licensePeriodPanelLayout.setVerticalGroup( licensePeriodPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(licensePeriodPanelLayout.createSequentialGroup() .add(licensePeriodScrollPane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 156, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addContainerGap(18, Short.MAX_VALUE))); activationCodePanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Activation Code", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, new java.awt.Font("STHeiti", 0, 10))); // NOI18N activationCodePanel.setToolTipText(""); activationCodePanel.setFont(new java.awt.Font("STHeiti", 0, 13)); activationCodePanel.setMaximumSize(new java.awt.Dimension(200, 239)); activationCodePanel.setMinimumSize(new java.awt.Dimension(200, 239)); activationCodePanel.setSize(new java.awt.Dimension(200, 239)); activationCodeField.setBackground(new java.awt.Color(204, 204, 204)); activationCodeField.setFont(new java.awt.Font("Courier New", 1, 10)); activationCodeField.setToolTipText("Please give this ActivationCode to the Sales department"); activationCodeField.setCursor(new java.awt.Cursor(java.awt.Cursor.TEXT_CURSOR)); activationCodeField.setMaximumSize(new java.awt.Dimension(483, 20)); activationCodeField.setMinimumSize(new java.awt.Dimension(483, 20)); activationCodeField.setPreferredSize(new java.awt.Dimension(483, 20)); activationCodeField.setSize(new java.awt.Dimension(483, 20)); org.jdesktop.layout.GroupLayout activationCodePanelLayout = new org.jdesktop.layout.GroupLayout( activationCodePanel); activationCodePanel.setLayout(activationCodePanelLayout); activationCodePanelLayout .setHorizontalGroup( activationCodePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(activationCodePanelLayout.createSequentialGroup().add(activationCodeField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 461, Short.MAX_VALUE) .addContainerGap())); activationCodePanelLayout.setVerticalGroup( activationCodePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(activationCodePanelLayout.createSequentialGroup() .add(activationCodeField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addContainerGap(17, Short.MAX_VALUE))); licenseCodePanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "License Code", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, new java.awt.Font("STHeiti", 0, 10))); // NOI18N licenseCodePanel.setToolTipText(""); licenseCodePanel.setFont(new java.awt.Font("STHeiti", 0, 13)); licenseCodePanel.setMaximumSize(new java.awt.Dimension(200, 239)); licenseCodePanel.setMinimumSize(new java.awt.Dimension(200, 239)); licenseCodePanel.setSize(new java.awt.Dimension(200, 239)); vergunningCodeField.setFont(new java.awt.Font("Courier New", 1, 10)); vergunningCodeField.setToolTipText( "Please fill in the LicenseCode here that you recieved from the Sales Department or Doubleclick to enter License Authorisation Code"); vergunningCodeField.setEnabled(false); vergunningCodeField.setMaximumSize(new java.awt.Dimension(483, 20)); vergunningCodeField.setMinimumSize(new java.awt.Dimension(483, 20)); vergunningCodeField.setPreferredSize(new java.awt.Dimension(483, 20)); vergunningCodeField.setSize(new java.awt.Dimension(483, 20)); vergunningCodeField.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { vergunningCodeFieldMouseClicked(evt); } }); vergunningCodeField.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { vergunningCodeFieldActionPerformed(evt); } }); vergunningCodeField.addKeyListener(new java.awt.event.KeyAdapter() { public void keyReleased(java.awt.event.KeyEvent evt) { vergunningCodeFieldKeyReleased(evt); } }); org.jdesktop.layout.GroupLayout licenseCodePanelLayout = new org.jdesktop.layout.GroupLayout( licenseCodePanel); licenseCodePanel.setLayout(licenseCodePanelLayout); licenseCodePanelLayout .setHorizontalGroup( licenseCodePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(licenseCodePanelLayout.createSequentialGroup().add(vergunningCodeField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 461, Short.MAX_VALUE) .addContainerGap())); licenseCodePanelLayout.setVerticalGroup( licenseCodePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(licenseCodePanelLayout.createSequentialGroup() .add(vergunningCodeField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addContainerGap(17, Short.MAX_VALUE))); licenseDetailsPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "License Details", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, new java.awt.Font("STHeiti", 0, 10))); // NOI18N licenseDetailsPanel.setToolTipText(""); licenseDetailsPanel.setFont(new java.awt.Font("STHeiti", 0, 13)); licenseDetailsPanel.setMaximumSize(new java.awt.Dimension(200, 239)); licenseDetailsPanel.setPreferredSize(new java.awt.Dimension(200, 239)); licenseDetailsPanel.setSize(new java.awt.Dimension(200, 239)); licenseDetailsScrollPane .setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); licenseDetailsScrollPane .setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); licenseDetailsScrollPane.setFont(new java.awt.Font("STHeiti", 0, 13)); vergunningDetailsTable.setFont(new java.awt.Font("STHeiti", 0, 8)); vergunningDetailsTable.setModel(new javax.swing.table.DefaultTableModel( new Object[][] { { "Licensed", null }, { "Type", null }, { "Period", null }, { "Start Date", null }, { "End Date", null }, { "Phonelines", null }, { "Calls / Hour", null }, { "Calls / Run", null }, { " Digits", null }, { "", null } }, new String[] { "", "" }) { Class[] types = new Class[] { java.lang.String.class, java.lang.String.class }; boolean[] canEdit = new boolean[] { true, false }; public Class getColumnClass(int columnIndex) { return types[columnIndex]; } public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit[columnIndex]; } }); vergunningDetailsTable.setToolTipText("Overall Status of all Phones in Pool"); vergunningDetailsTable.setAutoCreateRowSorter(true); vergunningDetailsTable.setAutoscrolls(false); vergunningDetailsTable.setDoubleBuffered(true); vergunningDetailsTable.setEditingColumn(0); vergunningDetailsTable.setEditingRow(0); vergunningDetailsTable.setFocusable(false); vergunningDetailsTable.setMaximumSize(new java.awt.Dimension(75, 190)); vergunningDetailsTable.setMinimumSize(new java.awt.Dimension(75, 190)); vergunningDetailsTable.setName("name"); // NOI18N vergunningDetailsTable.setPreferredSize(new java.awt.Dimension(75, 190)); vergunningDetailsTable.setRowSelectionAllowed(false); vergunningDetailsTable.setSelectionBackground(new java.awt.Color(51, 102, 255)); vergunningDetailsTable.setShowGrid(false); vergunningDetailsTable.setSize(new java.awt.Dimension(75, 190)); licenseDetailsScrollPane.setViewportView(vergunningDetailsTable); vergunningDetailsTable.getColumnModel().getColumn(0).setResizable(false); vergunningDetailsTable.getColumnModel().getColumn(0).setPreferredWidth(50); vergunningDetailsTable.getColumnModel().getColumn(1).setResizable(false); vergunningDetailsTable.getColumnModel().getColumn(1).setPreferredWidth(50); org.jdesktop.layout.GroupLayout licenseDetailsPanelLayout = new org.jdesktop.layout.GroupLayout( licenseDetailsPanel); licenseDetailsPanel.setLayout(licenseDetailsPanelLayout); licenseDetailsPanelLayout.setHorizontalGroup(licenseDetailsPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(licenseDetailsScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 141, Short.MAX_VALUE)); licenseDetailsPanelLayout.setVerticalGroup( licenseDetailsPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(licenseDetailsPanelLayout.createSequentialGroup() .add(licenseDetailsScrollPane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 156, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addContainerGap(18, Short.MAX_VALUE))); applyVergunningButton.setFont(new java.awt.Font("STHeiti", 0, 14)); applyVergunningButton.setText("Apply License"); applyVergunningButton.setToolTipText("Apply LicenseCode"); applyVergunningButton.setEnabled(false); applyVergunningButton.setFocusPainted(false); applyVergunningButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { applyVergunningButtonActionPerformed(evt); } }); requestVergunningButton.setFont(new java.awt.Font("STHeiti", 0, 14)); requestVergunningButton.setText("Request License"); requestVergunningButton.setToolTipText("Request a License"); requestVergunningButton.setEnabled(false); requestVergunningButton.setFocusPainted(false); requestVergunningButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { requestVergunningButtonActionPerformed(evt); } }); org.jdesktop.layout.GroupLayout licensePanelLayout = new org.jdesktop.layout.GroupLayout(licensePanel); licensePanel.setLayout(licensePanelLayout); licensePanelLayout.setHorizontalGroup(licensePanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(licensePanelLayout.createSequentialGroup().addContainerGap().add(licensePanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(licensePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(licensePanelLayout.createSequentialGroup() .add(licenseTypePanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 128, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(licenseDatePanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(licensePeriodPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 95, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(6, 6, 6)) .add(licensePanelLayout.createSequentialGroup() .add(activationCodePanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED))) .add(licensePanelLayout.createSequentialGroup() .add(licenseCodePanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED))) .add(licensePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(requestVergunningButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(applyVergunningButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 153, Short.MAX_VALUE) .add(licenseDetailsPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 153, Short.MAX_VALUE)) .add(56, 56, 56))); licensePanelLayout.linkSize(new java.awt.Component[] { activationCodePanel, licenseCodePanel }, org.jdesktop.layout.GroupLayout.HORIZONTAL); licensePanelLayout.setVerticalGroup(licensePanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(licensePanelLayout.createSequentialGroup().add(licensePanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(licenseDatePanel, 0, 197, Short.MAX_VALUE) .add(licenseTypePanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 197, Short.MAX_VALUE) .add(licensePeriodPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 197, Short.MAX_VALUE) .add(licenseDetailsPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 197, Short.MAX_VALUE)) .add(5, 5, 5) .add(licensePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(requestVergunningButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 61, Short.MAX_VALUE) .add(activationCodePanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 60, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(licensePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) .add(applyVergunningButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(licenseCodePanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 60, Short.MAX_VALUE)) .addContainerGap())); licensePanelLayout.linkSize(new java.awt.Component[] { licenseDatePanel, licenseTypePanel }, org.jdesktop.layout.GroupLayout.VERTICAL); licensePanelLayout.linkSize(new java.awt.Component[] { activationCodePanel, licenseCodePanel }, org.jdesktop.layout.GroupLayout.VERTICAL); tabPane.addTab("License", licensePanel); logPanel.setToolTipText("Clicking clears Display"); logPanel.setFocusTraversalKeysEnabled(false); logPanel.setFont(new java.awt.Font("STHeiti", 0, 12)); logPanel.addKeyListener(new java.awt.event.KeyAdapter() { public void keyPressed(java.awt.event.KeyEvent evt) { logPanelKeyPressed(evt); } }); logScrollPane.setForeground(new java.awt.Color(255, 255, 255)); logScrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); logScrollPane.setDoubleBuffered(true); logScrollPane.setFont(new java.awt.Font("STHeiti", 0, 13)); textLogArea.setBackground(new java.awt.Color(51, 51, 51)); textLogArea.setColumns(20); textLogArea.setEditable(false); textLogArea.setFont(new java.awt.Font("Courier", 0, 8)); textLogArea.setForeground(new java.awt.Color(255, 255, 255)); textLogArea.setLineWrap(true); textLogArea.setRows(5); textLogArea.setToolTipText("Doubleclick to Clear"); textLogArea.setDoubleBuffered(true); textLogArea.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { textLogAreaMouseClicked(evt); } }); logScrollPane.setViewportView(textLogArea); org.jdesktop.layout.GroupLayout logPanelLayout = new org.jdesktop.layout.GroupLayout(logPanel); logPanel.setLayout(logPanelLayout); logPanelLayout .setHorizontalGroup(logPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(logScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 662, Short.MAX_VALUE)); logPanelLayout.setVerticalGroup(logPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, logScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 335, Short.MAX_VALUE)); tabPane.addTab("Log", logPanel); aboutPanel.setBackground(new java.awt.Color(51, 51, 51)); aboutPanel.setToolTipText("Background Information on this Product"); aboutPanel.setFocusTraversalKeysEnabled(false); aboutPanel.setFont(new java.awt.Font("STHeiti", 0, 12)); aboutPanel.addKeyListener(new java.awt.event.KeyAdapter() { public void keyPressed(java.awt.event.KeyEvent evt) { aboutPanelKeyPressed(evt); } }); brandLabel.setFont(new java.awt.Font("STHeiti", 1, 24)); brandLabel.setForeground(new java.awt.Color(51, 51, 51)); brandLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); brandDescriptionLabel.setBackground(new java.awt.Color(51, 51, 51)); brandDescriptionLabel.setColumns(20); brandDescriptionLabel.setEditable(false); brandDescriptionLabel.setFont(new java.awt.Font("STHeiti", 0, 14)); brandDescriptionLabel.setForeground(new java.awt.Color(51, 51, 51)); brandDescriptionLabel.setLineWrap(true); brandDescriptionLabel.setRows(5); brandDescriptionLabel.setWrapStyleWord(true); brandDescriptionLabel.setAutoscrolls(false); brandDescriptionLabel.setBorder(null); brandDescriptionLabel.setDragEnabled(false); brandDescriptionLabel.setFocusable(false); productLabel.setFont(new java.awt.Font("STHeiti", 1, 24)); productLabel.setForeground(new java.awt.Color(51, 51, 51)); productLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); productDescriptionLabel.setBackground(new java.awt.Color(51, 51, 51)); productDescriptionLabel.setColumns(20); productDescriptionLabel.setEditable(false); productDescriptionLabel.setFont(new java.awt.Font("STHeiti", 0, 14)); productDescriptionLabel.setForeground(new java.awt.Color(51, 51, 51)); productDescriptionLabel.setLineWrap(true); productDescriptionLabel.setRows(5); productDescriptionLabel.setWrapStyleWord(true); productDescriptionLabel.setAutoscrolls(false); productDescriptionLabel.setBorder(null); productDescriptionLabel.setDragEnabled(false); productDescriptionLabel.setFocusable(false); copyrightLabel.setBackground(new java.awt.Color(51, 51, 51)); copyrightLabel.setColumns(20); copyrightLabel.setEditable(false); copyrightLabel.setFont(new java.awt.Font("STHeiti", 0, 14)); copyrightLabel.setForeground(new java.awt.Color(51, 51, 51)); copyrightLabel.setLineWrap(true); copyrightLabel.setRows(5); copyrightLabel.setWrapStyleWord(true); copyrightLabel.setAutoscrolls(false); copyrightLabel.setBorder(null); copyrightLabel.setDragEnabled(false); copyrightLabel.setFocusable(false); org.jdesktop.layout.GroupLayout aboutPanelLayout = new org.jdesktop.layout.GroupLayout(aboutPanel); aboutPanel.setLayout(aboutPanelLayout); aboutPanelLayout.setHorizontalGroup(aboutPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, aboutPanelLayout.createSequentialGroup().addContainerGap() .add(aboutPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(org.jdesktop.layout.GroupLayout.LEADING, productDescriptionLabel) .add(org.jdesktop.layout.GroupLayout.LEADING, brandLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 650, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.LEADING, brandDescriptionLabel) .add(org.jdesktop.layout.GroupLayout.LEADING, productLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 650, Short.MAX_VALUE)) .add(22, 22, 22)) .add(aboutPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(aboutPanelLayout .createSequentialGroup().addContainerGap().add(copyrightLabel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 650, Short.MAX_VALUE) .addContainerGap()))); aboutPanelLayout .linkSize( new java.awt.Component[] { brandDescriptionLabel, brandLabel, copyrightLabel, productDescriptionLabel, productLabel }, org.jdesktop.layout.GroupLayout.HORIZONTAL); aboutPanelLayout .setVerticalGroup(aboutPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(aboutPanelLayout.createSequentialGroup().addContainerGap() .add(brandLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 27, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(brandDescriptionLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(productLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 34, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(productDescriptionLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addContainerGap(92, Short.MAX_VALUE)) .add(aboutPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(aboutPanelLayout.createSequentialGroup().add(277, 277, 277) .add(copyrightLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 36, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addContainerGap(22, Short.MAX_VALUE)))); tabPane.addTab("About", aboutPanel); displayPanel.setBorder(javax.swing.BorderFactory.createTitledBorder("")); displayPanel.setToolTipText(""); displayPanel.setFont(new java.awt.Font("STHeiti", 0, 13)); displayPanel.setMaximumSize(new java.awt.Dimension(695, 105)); displayPanel.setMinimumSize(new java.awt.Dimension(695, 105)); displayPanel.setPreferredSize(new java.awt.Dimension(695, 105)); displayPanel.setSize(new java.awt.Dimension(695, 105)); captionTable.setBackground(new java.awt.Color(240, 240, 240)); captionTable.setFont(new java.awt.Font("STHeiti", 0, 10)); captionTable.setForeground(new java.awt.Color(102, 102, 102)); captionTable.setModel(new javax.swing.table.DefaultTableModel( new Object[][] { { "", null, null, null, null, null, null, null, null, null, null }, { null, null, null, null, null, null, null, null, null, null, null }, { null, null, null, null, null, null, null, null, null, null, null } }, new String[] { "", "", "", "", "", "", "", "", "", "", "" }) { Class[] types = new Class[] { java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class }; boolean[] canEdit = new boolean[] { false, false, false, false, false, false, false, false, false, false, false }; public Class getColumnClass(int columnIndex) { return types[columnIndex]; } public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit[columnIndex]; } }); captionTable.setToolTipText("CallCenter Statistics"); captionTable.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_ALL_COLUMNS); captionTable.setAutoscrolls(false); captionTable.setColumnSelectionAllowed(true); captionTable.setDoubleBuffered(true); captionTable.setEnabled(false); captionTable.setFocusable(false); captionTable.setIntercellSpacing(new java.awt.Dimension(0, 0)); captionTable.setMaximumSize(new java.awt.Dimension(660, 45)); captionTable.setMinimumSize(new java.awt.Dimension(660, 45)); captionTable.setPreferredSize(new java.awt.Dimension(660, 45)); captionTable.setRowHeight(15); captionTable.setRowSelectionAllowed(false); captionTable.setShowGrid(false); captionTable.setSize(new java.awt.Dimension(660, 45)); captionTable.setUpdateSelectionOnSort(false); captionTable.setVerifyInputWhenFocusTarget(false); statusBar.setBackground(new java.awt.Color(230, 230, 230)); statusBar.setBorder(javax.swing.BorderFactory.createEtchedBorder()); statusBar.setEditable(false); statusBar.setFont(new java.awt.Font("Synchro LET", 2, 14)); statusBar.setForeground(new java.awt.Color(102, 102, 102)); statusBar.setToolTipText("Status Bar"); statusBar.setMaximumSize(new java.awt.Dimension(500, 25)); statusBar.setMinimumSize(new java.awt.Dimension(500, 25)); statusBar.setPreferredSize(new java.awt.Dimension(500, 25)); statusBar.setSize(new java.awt.Dimension(500, 25)); org.jdesktop.layout.GroupLayout displayPanelLayout = new org.jdesktop.layout.GroupLayout(displayPanel); displayPanel.setLayout(displayPanelLayout); displayPanelLayout .setHorizontalGroup(displayPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(captionTable, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 683, Short.MAX_VALUE) .add(statusBar, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 683, Short.MAX_VALUE)); displayPanelLayout .setVerticalGroup(displayPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(displayPanelLayout.createSequentialGroup() .add(captionTable, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(statusBar, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 36, Short.MAX_VALUE) .addContainerGap())); captionTable.getColumnModel().getSelectionModel() .setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); captionTable.getColumnModel().getColumn(0).setResizable(false); captionTable.getColumnModel().getColumn(1).setResizable(false); captionTable.getColumnModel().getColumn(2).setResizable(false); captionTable.getColumnModel().getColumn(3).setResizable(false); captionTable.getColumnModel().getColumn(4).setResizable(false); captionTable.getColumnModel().getColumn(5).setResizable(false); captionTable.getColumnModel().getColumn(6).setResizable(false); captionTable.getColumnModel().getColumn(7).setResizable(false); captionTable.getColumnModel().getColumn(8).setResizable(false); captionTable.getColumnModel().getColumn(9).setResizable(false); captionTable.getColumnModel().getColumn(10).setResizable(false); controlButtonPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("STHeiti", 0, 13), new java.awt.Color(255, 255, 255))); // NOI18N controlButtonPanel.setMaximumSize(new java.awt.Dimension(695, 63)); controlButtonPanel.setMinimumSize(new java.awt.Dimension(695, 63)); controlButtonPanel.setPreferredSize(new java.awt.Dimension(695, 63)); controlButtonPanel.setSize(new java.awt.Dimension(695, 63)); callButton.setFont(new java.awt.Font("STHeiti", 0, 8)); callButton.setForeground(new java.awt.Color(51, 204, 0)); callButton.setText(""); callButton.setToolTipText("Call Button"); callButton.setEnabled(false); callButton.setFocusPainted(false); callButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { callButtonActionPerformed(evt); } }); serviceLoopProgressBar.setFont(new java.awt.Font("STHeiti", 0, 8)); serviceLoopProgressBar.setToolTipText("Service Progress"); serviceLoopProgressBar.setBorderPainted(false); serviceLoopProgressBar.setEnabled(false); serviceLoopProgressBar.setFocusTraversalKeysEnabled(false); serviceLoopProgressBar.setFocusable(false); serviceLoopProgressBar.setName("progressBar"); // NOI18N serviceLoopProgressBar.setOpaque(true); serviceLoopProgressBar.setStringPainted(true); autoSpeedToggleButton.setFont(new java.awt.Font("STHeiti", 0, 8)); autoSpeedToggleButton.setSelected(true); autoSpeedToggleButton.setText(""); autoSpeedToggleButton.setToolTipText("Automatic Speed"); autoSpeedToggleButton.setEnabled(false); autoSpeedToggleButton.setFocusPainted(false); autoSpeedToggleButton.setFocusable(false); autoSpeedToggleButton.setMaximumSize(new java.awt.Dimension(55, 29)); autoSpeedToggleButton.setMinimumSize(new java.awt.Dimension(55, 29)); autoSpeedToggleButton.setPreferredSize(new java.awt.Dimension(55, 29)); autoSpeedToggleButton.setRequestFocusEnabled(false); autoSpeedToggleButton.setSize(new java.awt.Dimension(55, 29)); autoSpeedToggleButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { autoSpeedToggleButtonActionPerformed(evt); } }); powerToggleButton.setFont(new java.awt.Font("STHeiti", 0, 8)); powerToggleButton.setText(""); powerToggleButton.setToolTipText("Power Button"); powerToggleButton.setEnabled(false); powerToggleButton.setMaximumSize(new java.awt.Dimension(50, 29)); powerToggleButton.setMinimumSize(new java.awt.Dimension(50, 29)); powerToggleButton.setPreferredSize(new java.awt.Dimension(50, 29)); powerToggleButton.setSize(new java.awt.Dimension(55, 29)); powerToggleButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { powerToggleButtonActionPerformed(evt); } }); runCampaignToggleButton.setFont(new java.awt.Font("STHeiti", 0, 8)); runCampaignToggleButton.setText(""); runCampaignToggleButton.setToolTipText("Run / Pause Campaign"); runCampaignToggleButton.setEnabled(false); runCampaignToggleButton.setFocusPainted(false); runCampaignToggleButton.setFocusable(false); runCampaignToggleButton.setMaximumSize(new java.awt.Dimension(55, 29)); runCampaignToggleButton.setMinimumSize(new java.awt.Dimension(55, 29)); runCampaignToggleButton.setPreferredSize(new java.awt.Dimension(55, 29)); runCampaignToggleButton.setRequestFocusEnabled(false); runCampaignToggleButton.setSize(new java.awt.Dimension(55, 29)); runCampaignToggleButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { runCampaignToggleButtonActionPerformed(evt); } }); endButton.setFont(new java.awt.Font("STHeiti", 0, 8)); endButton.setForeground(new java.awt.Color(255, 0, 0)); endButton.setText(""); endButton.setToolTipText("End Button"); endButton.setEnabled(false); endButton.setFocusPainted(false); endButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { endButtonActionPerformed(evt); } }); phoneButton.setFont(new java.awt.Font("STHeiti", 0, 8)); phoneButton.setForeground(new java.awt.Color(51, 51, 255)); phoneButton.setText(""); phoneButton.setToolTipText("SoftPhone"); phoneButton.setEnabled(false); phoneButton.setFocusPainted(false); phoneButton.setMaximumSize(new java.awt.Dimension(100, 29)); phoneButton.setMinimumSize(new java.awt.Dimension(100, 29)); phoneButton.setPreferredSize(new java.awt.Dimension(100, 29)); phoneButton.setSize(new java.awt.Dimension(35, 30)); phoneButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { phoneButtonActionPerformed(evt); } }); stopCampaignButton.setFont(new java.awt.Font("STHeiti", 0, 5)); stopCampaignButton.setText(""); stopCampaignButton.setToolTipText("Stop Campaign"); stopCampaignButton.setEnabled(false); stopCampaignButton.setFocusPainted(false); stopCampaignButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { stopCampaignButtonActionPerformed(evt); } }); muteAudioToggleButton.setFont(new java.awt.Font("STHeiti", 0, 8)); muteAudioToggleButton.setText(""); muteAudioToggleButton.setToolTipText("Mute Audio"); muteAudioToggleButton.setAlignmentY(0.0F); muteAudioToggleButton.setEnabled(false); muteAudioToggleButton.setFocusable(false); muteAudioToggleButton.setMaximumSize(new java.awt.Dimension(100, 30)); muteAudioToggleButton.setMinimumSize(new java.awt.Dimension(100, 30)); muteAudioToggleButton.setPreferredSize(new java.awt.Dimension(100, 30)); muteAudioToggleButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { muteAudioToggleButtonActionPerformed(evt); } }); campaignProgressBar.setFont(new java.awt.Font("STHeiti", 0, 8)); campaignProgressBar.setMaximum(1000); campaignProgressBar.setToolTipText("Campaign Progress"); campaignProgressBar.setBorderPainted(false); campaignProgressBar.setEnabled(false); campaignProgressBar.setFocusTraversalKeysEnabled(false); campaignProgressBar.setFocusable(false); campaignProgressBar.setName("campaignProgressBar"); // NOI18N campaignProgressBar.setOpaque(true); campaignProgressBar.setStringPainted(true); humanResponseSimulatorToggleButton.setFont(new java.awt.Font("STHeiti", 0, 8)); humanResponseSimulatorToggleButton.setText(""); humanResponseSimulatorToggleButton.setToolTipText("Simulate Human Behavior (Inbound)"); humanResponseSimulatorToggleButton.setAlignmentY(0.0F); humanResponseSimulatorToggleButton.setEnabled(false); humanResponseSimulatorToggleButton.setFocusable(false); humanResponseSimulatorToggleButton.setMaximumSize(new java.awt.Dimension(100, 30)); humanResponseSimulatorToggleButton.setMinimumSize(new java.awt.Dimension(100, 30)); humanResponseSimulatorToggleButton.setPreferredSize(new java.awt.Dimension(100, 30)); humanResponseSimulatorToggleButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { humanResponseSimulatorToggleButtonActionPerformed(evt); } }); registerToggleButton.setFont(new java.awt.Font("STHeiti", 0, 8)); registerToggleButton.setText(""); registerToggleButton.setToolTipText("Register to PBX (Switchboard)"); registerToggleButton.setAlignmentY(0.0F); registerToggleButton.setEnabled(false); registerToggleButton.setFocusable(false); registerToggleButton.setMaximumSize(new java.awt.Dimension(100, 30)); registerToggleButton.setMinimumSize(new java.awt.Dimension(100, 30)); registerToggleButton.setPreferredSize(new java.awt.Dimension(100, 30)); registerToggleButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { registerToggleButtonActionPerformed(evt); } }); campaignComboBox.setFont(new java.awt.Font("STHeiti", 0, 8)); campaignComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "" })); campaignComboBox.setToolTipText("Choose Campaign"); campaignComboBox.setEnabled(false); campaignComboBox.setFocusable(false); campaignComboBox.setMinimumSize(new java.awt.Dimension(70, 35)); campaignComboBox.setPreferredSize(new java.awt.Dimension(70, 35)); campaignComboBox.setSize(new java.awt.Dimension(70, 35)); campaignComboBox.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { campaignComboBoxActionPerformed(evt); } }); debugToggleButton.setFont(new java.awt.Font("STHeiti", 0, 8)); debugToggleButton.setText(""); debugToggleButton.setToolTipText("Debugging"); debugToggleButton.setAlignmentY(0.0F); debugToggleButton.setEnabled(false); debugToggleButton.setFocusable(false); debugToggleButton.setMaximumSize(new java.awt.Dimension(100, 30)); debugToggleButton.setMinimumSize(new java.awt.Dimension(100, 30)); debugToggleButton.setPreferredSize(new java.awt.Dimension(100, 30)); debugToggleButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { debugToggleButtonActionPerformed(evt); } }); resizeWindowButton.setFont(new java.awt.Font("STHeiti", 0, 8)); resizeWindowButton.setText(""); resizeWindowButton.setToolTipText("Hide Controls"); resizeWindowButton.setFocusPainted(false); resizeWindowButton.setMaximumSize(new java.awt.Dimension(100, 29)); resizeWindowButton.setMinimumSize(new java.awt.Dimension(100, 29)); resizeWindowButton.setPreferredSize(new java.awt.Dimension(100, 29)); resizeWindowButton.setSize(new java.awt.Dimension(35, 30)); resizeWindowButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { resizeWindowButtonActionPerformed(evt); } }); org.jdesktop.layout.GroupLayout controlButtonPanelLayout = new org.jdesktop.layout.GroupLayout( controlButtonPanel); controlButtonPanel.setLayout(controlButtonPanelLayout); controlButtonPanelLayout.setHorizontalGroup(controlButtonPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(controlButtonPanelLayout.createSequentialGroup().addContainerGap() .add(controlButtonPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false) .add(controlButtonPanelLayout.createSequentialGroup() .add(registerToggleButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 38, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(humanResponseSimulatorToggleButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(muteAudioToggleButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 32, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(debugToggleButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 32, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(serviceLoopProgressBar, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .add(9, 9, 9) .add(controlButtonPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(controlButtonPanelLayout.createSequentialGroup() .add(phoneButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 35, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(powerToggleButton, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 99, Short.MAX_VALUE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(resizeWindowButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 46, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(campaignComboBox, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 70, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(runCampaignToggleButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 38, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(stopCampaignButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 35, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(callButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 34, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(endButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 32, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(autoSpeedToggleButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 36, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(7, 7, 7)) .add(controlButtonPanelLayout .createSequentialGroup().add(campaignProgressBar, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 492, Short.MAX_VALUE) .addContainerGap())))); controlButtonPanelLayout .linkSize( new java.awt.Component[] { debugToggleButton, humanResponseSimulatorToggleButton, muteAudioToggleButton, registerToggleButton }, org.jdesktop.layout.GroupLayout.HORIZONTAL); controlButtonPanelLayout .linkSize( new java.awt.Component[] { autoSpeedToggleButton, callButton, endButton, phoneButton, runCampaignToggleButton, stopCampaignButton }, org.jdesktop.layout.GroupLayout.HORIZONTAL); controlButtonPanelLayout.setVerticalGroup(controlButtonPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(controlButtonPanelLayout.createSequentialGroup().addContainerGap().add(controlButtonPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(controlButtonPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(debugToggleButton, 0, 0, Short.MAX_VALUE) .add(phoneButton, 0, 0, Short.MAX_VALUE) .add(powerToggleButton, 0, 0, Short.MAX_VALUE)) .add(registerToggleButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 21, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(humanResponseSimulatorToggleButton, 0, 0, Short.MAX_VALUE) .add(muteAudioToggleButton, 0, 0, Short.MAX_VALUE) .add(autoSpeedToggleButton, 0, 0, Short.MAX_VALUE) .add(runCampaignToggleButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 21, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(stopCampaignButton, 0, 0, Short.MAX_VALUE).add(endButton, 0, 0, Short.MAX_VALUE) .add(callButton, 0, 0, Short.MAX_VALUE).add(campaignComboBox, 0, 0, Short.MAX_VALUE) .add(resizeWindowButton, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 19, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(controlButtonPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(serviceLoopProgressBar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 9, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(campaignProgressBar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 9, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(9, 9, 9))); controlButtonPanelLayout .linkSize( new java.awt.Component[] { autoSpeedToggleButton, callButton, campaignComboBox, debugToggleButton, endButton, humanResponseSimulatorToggleButton, muteAudioToggleButton, phoneButton, powerToggleButton, registerToggleButton, resizeWindowButton, runCampaignToggleButton, stopCampaignButton }, org.jdesktop.layout.GroupLayout.VERTICAL); controlSliderPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("STHeiti", 0, 10), new java.awt.Color(51, 51, 51))); // NOI18N controlSliderPanel.setToolTipText(""); controlSliderPanel.setFont(new java.awt.Font("STHeiti", 0, 13)); controlSliderPanel.setMaximumSize(new java.awt.Dimension(695, 220)); controlSliderPanel.setMinimumSize(new java.awt.Dimension(695, 0)); controlSliderPanel.setPreferredSize(new java.awt.Dimension(695, 220)); controlSliderPanel.setSize(new java.awt.Dimension(695, 220)); buttonPanel.setToolTipText(""); buttonPanel.setFont(new java.awt.Font("STHeiti", 0, 10)); buttonPanel.setMaximumSize(new java.awt.Dimension(670, 32767)); buttonPanel.setMinimumSize(new java.awt.Dimension(670, 0)); buttonPanel.setPreferredSize(new java.awt.Dimension(670, 252)); outboundSliderPanel.setToolTipText(""); outboundSliderPanel.setFont(new java.awt.Font("STHeiti", 0, 13)); outboundSliderPanel.setOpaque(false); outboundSliderPanel.setPreferredSize(new java.awt.Dimension(304, 190)); vmUsageThresholdLabel.setFont(new java.awt.Font("STHeiti", 0, 8)); vmUsageThresholdLabel.setText("CPU %"); registerSpeedValue.setHorizontalAlignment(SwingConstants.CENTER); vmUsagePauseValue.setFont(new java.awt.Font("STHeiti", 0, 8)); vmUsagePauseValue.setText("0"); vmUsagePauseValue.setHorizontalAlignment(SwingConstants.CENTER); vmUsageThresholdSlider.setFont(new java.awt.Font("STHeiti", 0, 5)); vmUsageThresholdSlider.setMajorTickSpacing(10); vmUsageThresholdSlider.setMinorTickSpacing(1); vmUsageThresholdSlider.setOrientation(javax.swing.JSlider.VERTICAL); vmUsageThresholdSlider.setPaintLabels(true); vmUsageThresholdSlider.setPaintTicks(true); vmUsageThresholdSlider.setSnapToTicks(true); vmUsageThresholdSlider.setToolTipText("VM Usage Threshold (Pause Campaign)"); vmUsageThresholdSlider.setValue(100); vmUsageThresholdSlider.setFocusable(false); vmUsageThresholdSlider.setMaximumSize(new java.awt.Dimension(40, 150)); vmUsageThresholdSlider.setMinimumSize(new java.awt.Dimension(40, 150)); vmUsageThresholdSlider.setPreferredSize(new java.awt.Dimension(40, 150)); vmUsageThresholdSlider.setSize(new java.awt.Dimension(40, 150)); vmUsageThresholdSlider.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { vmUsageThresholdSliderStateChanged(evt); } }); memFreeThresholdLabel.setFont(new java.awt.Font("STHeiti", 0, 8)); memFreeThresholdLabel.setText("MF MB"); registerSpeedValue.setHorizontalAlignment(SwingConstants.CENTER); memFreeThresholdValue.setFont(new java.awt.Font("STHeiti", 0, 8)); memFreeThresholdValue.setText("0"); memFreeThresholdValue.setHorizontalAlignment(SwingConstants.CENTER); memFreeThresholdSlider.setFont(new java.awt.Font("STHeiti", 0, 5)); memFreeThresholdSlider.setMajorTickSpacing(10); memFreeThresholdSlider.setMinorTickSpacing(1); memFreeThresholdSlider.setOrientation(javax.swing.JSlider.VERTICAL); memFreeThresholdSlider.setPaintLabels(true); memFreeThresholdSlider.setPaintTicks(true); memFreeThresholdSlider.setSnapToTicks(true); memFreeThresholdSlider.setToolTipText("Memory Free Threshold (Pause Campaign)"); memFreeThresholdSlider.setValue(5); memFreeThresholdSlider.setFocusable(false); memFreeThresholdSlider.setMaximumSize(new java.awt.Dimension(40, 150)); memFreeThresholdSlider.setMinimumSize(new java.awt.Dimension(40, 150)); memFreeThresholdSlider.setPreferredSize(new java.awt.Dimension(40, 150)); memFreeThresholdSlider.setSize(new java.awt.Dimension(40, 150)); memFreeThresholdSlider.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { memFreeThresholdSliderStateChanged(evt); } }); heapMemFreeThresholdLabel.setFont(new java.awt.Font("STHeiti", 0, 8)); heapMemFreeThresholdLabel.setText("HMF MB"); registerSpeedValue.setHorizontalAlignment(SwingConstants.CENTER); heapMemFreeThresholdValue.setFont(new java.awt.Font("STHeiti", 0, 8)); heapMemFreeThresholdValue.setText("0"); heapMemFreeThresholdValue.setHorizontalAlignment(SwingConstants.CENTER); heapMemFreeThresholdSlider.setFont(new java.awt.Font("STHeiti", 0, 5)); heapMemFreeThresholdSlider.setMajorTickSpacing(10); heapMemFreeThresholdSlider.setMinorTickSpacing(1); heapMemFreeThresholdSlider.setOrientation(javax.swing.JSlider.VERTICAL); heapMemFreeThresholdSlider.setPaintLabels(true); heapMemFreeThresholdSlider.setPaintTicks(true); heapMemFreeThresholdSlider.setSnapToTicks(true); heapMemFreeThresholdSlider.setToolTipText("HeapMemory Free Threshold (Pause Campaign)"); heapMemFreeThresholdSlider.setValue(0); heapMemFreeThresholdSlider.setFocusable(false); heapMemFreeThresholdSlider.setMaximumSize(new java.awt.Dimension(40, 150)); heapMemFreeThresholdSlider.setMinimumSize(new java.awt.Dimension(40, 150)); heapMemFreeThresholdSlider.setPreferredSize(new java.awt.Dimension(40, 150)); heapMemFreeThresholdSlider.setSize(new java.awt.Dimension(40, 150)); heapMemFreeThresholdSlider.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { heapMemFreeThresholdSliderStateChanged(evt); } }); connectingTallyLimitLabel.setFont(new java.awt.Font("STHeiti", 0, 8)); connectingTallyLimitLabel.setText("CON"); registerSpeedValue.setHorizontalAlignment(SwingConstants.CENTER); connectingTallyLimitValue.setFont(new java.awt.Font("STHeiti", 0, 8)); connectingTallyLimitValue.setText("0"); heapMemFreeThresholdValue.setHorizontalAlignment(SwingConstants.CENTER); connectingTallyLimitSlider.setFont(new java.awt.Font("STHeiti", 0, 5)); connectingTallyLimitSlider.setMajorTickSpacing(10); connectingTallyLimitSlider.setMinorTickSpacing(1); connectingTallyLimitSlider.setOrientation(javax.swing.JSlider.VERTICAL); connectingTallyLimitSlider.setPaintLabels(true); connectingTallyLimitSlider.setPaintTicks(true); connectingTallyLimitSlider.setSnapToTicks(true); connectingTallyLimitSlider.setToolTipText("Concurrent Connecting States Maximum (Pause Campaign)"); connectingTallyLimitSlider.setValue(10); connectingTallyLimitSlider.setFocusable(false); connectingTallyLimitSlider.setMaximumSize(new java.awt.Dimension(40, 150)); connectingTallyLimitSlider.setMinimumSize(new java.awt.Dimension(40, 150)); connectingTallyLimitSlider.setName(""); // NOI18N connectingTallyLimitSlider.setPreferredSize(new java.awt.Dimension(40, 150)); connectingTallyLimitSlider.setSize(new java.awt.Dimension(40, 150)); connectingTallyLimitSlider.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { connectingTallyLimitSliderStateChanged(evt); } }); callingTallyLimitLabel.setFont(new java.awt.Font("STHeiti", 0, 8)); callingTallyLimitLabel.setText("CALL"); registerSpeedValue.setHorizontalAlignment(SwingConstants.CENTER); callingTallyLimitValue.setFont(new java.awt.Font("STHeiti", 0, 8)); callingTallyLimitValue.setText("0"); callingTallyLimitValue.setHorizontalAlignment(SwingConstants.CENTER); callingTallyLimitSlider.setFont(new java.awt.Font("STHeiti", 0, 5)); callingTallyLimitSlider.setMajorTickSpacing(10); callingTallyLimitSlider.setMaximum(200); callingTallyLimitSlider.setMinorTickSpacing(5); callingTallyLimitSlider.setOrientation(javax.swing.JSlider.VERTICAL); callingTallyLimitSlider.setPaintLabels(true); callingTallyLimitSlider.setPaintTicks(true); callingTallyLimitSlider.setSnapToTicks(true); callingTallyLimitSlider.setToolTipText("Concurrent Calls Maximum (Pause Campaign)"); callingTallyLimitSlider.setValue(100); callingTallyLimitSlider.setExtent(20); callingTallyLimitSlider.setFocusable(false); callingTallyLimitSlider.setMaximumSize(new java.awt.Dimension(40, 150)); callingTallyLimitSlider.setMinimumSize(new java.awt.Dimension(40, 150)); callingTallyLimitSlider.setPreferredSize(new java.awt.Dimension(40, 150)); callingTallyLimitSlider.setSize(new java.awt.Dimension(40, 150)); callingTallyLimitSlider.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { callingTallyLimitSliderStateChanged(evt); } }); establishedTallyLimitLabel.setFont(new java.awt.Font("STHeiti", 0, 8)); establishedTallyLimitLabel.setText("EST"); registerSpeedValue.setHorizontalAlignment(SwingConstants.CENTER); establishedTallyLimitValue.setFont(new java.awt.Font("STHeiti", 0, 8)); establishedTallyLimitValue.setText("0"); establishedTallyLimitValue.setHorizontalAlignment(SwingConstants.CENTER); establishedTallyLimitSlider.setFont(new java.awt.Font("STHeiti", 0, 5)); establishedTallyLimitSlider.setMajorTickSpacing(10); establishedTallyLimitSlider.setMaximum(200); establishedTallyLimitSlider.setMinorTickSpacing(5); establishedTallyLimitSlider.setOrientation(javax.swing.JSlider.VERTICAL); establishedTallyLimitSlider.setPaintLabels(true); establishedTallyLimitSlider.setPaintTicks(true); establishedTallyLimitSlider.setSnapToTicks(true); establishedTallyLimitSlider.setToolTipText("Concurrent Established Calls Maximum (Pause Campaign)"); establishedTallyLimitSlider.setFocusable(false); establishedTallyLimitSlider.setMaximumSize(new java.awt.Dimension(40, 150)); establishedTallyLimitSlider.setMinimumSize(new java.awt.Dimension(40, 150)); establishedTallyLimitSlider.setPreferredSize(new java.awt.Dimension(40, 150)); establishedTallyLimitSlider.setSize(new java.awt.Dimension(40, 150)); establishedTallyLimitSlider.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { establishedTallyLimitSliderStateChanged(evt); } }); callSpeedLabel.setFont(new java.awt.Font("STHeiti", 0, 8)); callSpeedLabel.setText("Speed"); callSpeedValue.setHorizontalAlignment(SwingConstants.CENTER); callSpeedValue.setFont(new java.awt.Font("STHeiti", 0, 8)); callSpeedValue.setText("0"); callSpeedValue.setHorizontalAlignment(SwingConstants.CENTER); callSpeedSlider.setFont(new java.awt.Font("STHeiti", 0, 5)); callSpeedSlider.setMajorTickSpacing(1000); callSpeedSlider.setMaximum(10000); callSpeedSlider.setMinimum(350); callSpeedSlider.setMinorTickSpacing(1); callSpeedSlider.setOrientation(javax.swing.JSlider.VERTICAL); callSpeedSlider.setPaintLabels(true); callSpeedSlider.setPaintTicks(true); callSpeedSlider.setSnapToTicks(true); callSpeedSlider.setToolTipText("Automated Outbound Call Rate (mSec)"); callSpeedSlider.setFocusable(false); callSpeedSlider.setInverted(true); callSpeedSlider.setMaximumSize(new java.awt.Dimension(40, 150)); callSpeedSlider.setMinimumSize(new java.awt.Dimension(40, 150)); callSpeedSlider.setPreferredSize(new java.awt.Dimension(40, 150)); callSpeedSlider.setSize(new java.awt.Dimension(40, 150)); callSpeedSlider.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { callSpeedSliderStateChanged(evt); } }); org.jdesktop.layout.GroupLayout outboundSliderPanelLayout = new org.jdesktop.layout.GroupLayout( outboundSliderPanel); outboundSliderPanel.setLayout(outboundSliderPanelLayout); outboundSliderPanelLayout.setHorizontalGroup(outboundSliderPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(outboundSliderPanelLayout.createSequentialGroup().addContainerGap() .add(outboundSliderPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(outboundSliderPanelLayout.createSequentialGroup() .add(vmUsageThresholdSlider, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 40, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(memFreeThresholdSlider, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 40, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(heapMemFreeThresholdSlider, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 40, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(connectingTallyLimitSlider, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 40, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(callingTallyLimitSlider, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 40, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(establishedTallyLimitSlider, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 40, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(callSpeedSlider, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 40, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addContainerGap()) .add(outboundSliderPanelLayout.createSequentialGroup() .add(outboundSliderPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(outboundSliderPanelLayout.createSequentialGroup() .add(vmUsageThresholdLabel).add(14, 14, 14)) .add(vmUsagePauseValue, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(10, 10, 10) .add(outboundSliderPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(outboundSliderPanelLayout.createSequentialGroup() .add(memFreeThresholdValue, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(16, 16, 16)) .add(outboundSliderPanelLayout.createSequentialGroup() .add(memFreeThresholdLabel).add(11, 11, 11))) .add(outboundSliderPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(heapMemFreeThresholdLabel).add(heapMemFreeThresholdValue, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 25, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED) .add(outboundSliderPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(outboundSliderPanelLayout.createSequentialGroup() .add(connectingTallyLimitLabel).add(7, 7, 7)) .add(connectingTallyLimitValue, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 25, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(18, 18, 18) .add(outboundSliderPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, callingTallyLimitLabel) .add(org.jdesktop.layout.GroupLayout.TRAILING, callingTallyLimitValue, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(18, 18, 18) .add(outboundSliderPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(establishedTallyLimitLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 29, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(establishedTallyLimitValue, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 19, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(outboundSliderPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false) .add(callSpeedValue, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(callSpeedLabel)) .add(28, 28, 28))))); outboundSliderPanelLayout.linkSize( new java.awt.Component[] { connectingTallyLimitSlider, heapMemFreeThresholdSlider }, org.jdesktop.layout.GroupLayout.HORIZONTAL); outboundSliderPanelLayout.setVerticalGroup(outboundSliderPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(outboundSliderPanelLayout.createSequentialGroup().addContainerGap() .add(outboundSliderPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(outboundSliderPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(vmUsageThresholdLabel) .add(outboundSliderPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(outboundSliderPanelLayout .createParallelGroup( org.jdesktop.layout.GroupLayout.LEADING) .add(outboundSliderPanelLayout.createSequentialGroup() .add(memFreeThresholdLabel) .addPreferredGap( org.jdesktop.layout.LayoutStyle.RELATED) .add(memFreeThresholdValue)) .add(outboundSliderPanelLayout.createSequentialGroup() .add(15, 15, 15).add(heapMemFreeThresholdValue)) .add(heapMemFreeThresholdLabel) .add(outboundSliderPanelLayout.createSequentialGroup() .add(connectingTallyLimitLabel) .addPreferredGap( org.jdesktop.layout.LayoutStyle.RELATED) .add(connectingTallyLimitValue))) .add(vmUsagePauseValue, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 9, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) .add(outboundSliderPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(outboundSliderPanelLayout.createSequentialGroup() .add(establishedTallyLimitLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(establishedTallyLimitValue)) .add(outboundSliderPanelLayout.createSequentialGroup() .add(callingTallyLimitLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(callingTallyLimitValue))) .add(outboundSliderPanelLayout.createSequentialGroup().add(callSpeedLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(callSpeedValue))) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(outboundSliderPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE) .add(establishedTallyLimitSlider, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 150, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(callingTallyLimitSlider, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 150, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(connectingTallyLimitSlider, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 150, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(heapMemFreeThresholdSlider, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE) .add(memFreeThresholdSlider, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE) .add(vmUsageThresholdSlider, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 150, Short.MAX_VALUE) .add(callSpeedSlider, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 150, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(186, 186, 186))); performanceMeterPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Calls per Hour", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.TOP, new java.awt.Font("STHeiti", 0, 10), new java.awt.Color(102, 102, 102))); // NOI18N performanceMeterPanel.setToolTipText("Call Speed & VM Workload"); performanceMeterPanel.setFocusable(false); performanceMeterPanel.setFont(new java.awt.Font("STHeiti", 0, 13)); performanceMeterPanel.setMaximumSize(new java.awt.Dimension(190, 190)); performanceMeterPanel.setMinimumSize(new java.awt.Dimension(190, 190)); performanceMeterPanel.setPreferredSize(new java.awt.Dimension(190, 190)); performanceMeterPanel.setSize(new java.awt.Dimension(190, 190)); org.jdesktop.layout.GroupLayout performanceMeterPanelLayout = new org.jdesktop.layout.GroupLayout( performanceMeterPanel); performanceMeterPanel.setLayout(performanceMeterPanelLayout); performanceMeterPanelLayout.setHorizontalGroup(performanceMeterPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(0, 176, Short.MAX_VALUE)); performanceMeterPanelLayout.setVerticalGroup(performanceMeterPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add(0, 167, Short.MAX_VALUE)); inboundSliderPanel.setToolTipText(""); inboundSliderPanel.setFont(new java.awt.Font("STHeiti", 0, 13)); inboundSliderPanel.setMaximumSize(new java.awt.Dimension(190, 190)); inboundSliderPanel.setMinimumSize(new java.awt.Dimension(190, 190)); inboundSliderPanel.setOpaque(false); inboundSliderPanel.setPreferredSize(new java.awt.Dimension(190, 190)); inboundSliderPanel.setSize(new java.awt.Dimension(190, 190)); registerSpeedLabel.setFont(new java.awt.Font("STHeiti", 0, 8)); registerSpeedLabel.setText("Speed"); registerSpeedValue.setHorizontalAlignment(SwingConstants.CENTER); inboundRingingResponseDelayLabel.setFont(new java.awt.Font("STHeiti", 0, 8)); inboundRingingResponseDelayLabel.setText("RngDlay"); inboundRingingResponseDelayLabel.setToolTipText("Auto Ringing Response Delay Limit in mSec"); registerSpeedValue.setHorizontalAlignment(SwingConstants.CENTER); inboundRingingResponseBusyRatioLabel.setFont(new java.awt.Font("STHeiti", 0, 8)); inboundRingingResponseBusyRatioLabel.setText("Busy %"); inboundRingingResponseBusyRatioLabel .setToolTipText("The Ratio Between Answering or Denying inbound Phonecalls (bottom is deny)"); registerSpeedValue.setHorizontalAlignment(SwingConstants.CENTER); inboundEndDelayLabel.setFont(new java.awt.Font("STHeiti", 0, 8)); inboundEndDelayLabel.setText("EndDlay"); inboundEndDelayLabel.setToolTipText("Auto Ringing Response Delay Limit in mSec"); registerSpeedValue.setHorizontalAlignment(SwingConstants.CENTER); inboundEndDelayValue.setFont(new java.awt.Font("STHeiti", 0, 8)); inboundEndDelayValue.setText("0"); registerSpeedValue.setHorizontalAlignment(SwingConstants.CENTER); registerSpeedValue.setFont(new java.awt.Font("STHeiti", 0, 8)); registerSpeedValue.setText("0"); registerSpeedValue.setHorizontalAlignment(SwingConstants.CENTER); inboundRingingResponseDelayValue.setFont(new java.awt.Font("STHeiti", 0, 8)); inboundRingingResponseDelayValue.setText("0"); registerSpeedValue.setHorizontalAlignment(SwingConstants.CENTER); inboundRingingResponseBusyRatioValue.setFont(new java.awt.Font("STHeiti", 0, 8)); inboundRingingResponseBusyRatioValue.setText("0"); registerSpeedValue.setHorizontalAlignment(SwingConstants.CENTER); registerSpeedSlider.setFont(new java.awt.Font("STHeiti", 0, 5)); registerSpeedSlider.setMajorTickSpacing(10); registerSpeedSlider.setMinorTickSpacing(1); registerSpeedSlider.setOrientation(javax.swing.JSlider.VERTICAL); registerSpeedSlider.setPaintLabels(true); registerSpeedSlider.setPaintTicks(true); registerSpeedSlider.setSnapToTicks(true); registerSpeedSlider.setToolTipText("Register Speed"); registerSpeedSlider.setValue(20); registerSpeedSlider.setFocusable(false); registerSpeedSlider.setInverted(true); registerSpeedSlider.setMaximumSize(new java.awt.Dimension(40, 150)); registerSpeedSlider.setMinimumSize(new java.awt.Dimension(40, 150)); registerSpeedSlider.setName(""); // NOI18N registerSpeedSlider.setPreferredSize(new java.awt.Dimension(40, 150)); registerSpeedSlider.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { registerSpeedSliderStateChanged(evt); } }); inboundRingingResponseDelaySlider.setFont(new java.awt.Font("STHeiti", 0, 5)); inboundRingingResponseDelaySlider.setMajorTickSpacing(5000); inboundRingingResponseDelaySlider.setMaximum(60000); inboundRingingResponseDelaySlider.setMinorTickSpacing(1000); inboundRingingResponseDelaySlider.setOrientation(javax.swing.JSlider.VERTICAL); inboundRingingResponseDelaySlider.setPaintLabels(true); inboundRingingResponseDelaySlider.setPaintTicks(true); inboundRingingResponseDelaySlider.setSnapToTicks(true); inboundRingingResponseDelaySlider.setToolTipText("Random Ring Delay"); inboundRingingResponseDelaySlider.setValue(30000); inboundRingingResponseDelaySlider.setFocusable(false); inboundRingingResponseDelaySlider.setMaximumSize(new java.awt.Dimension(40, 150)); inboundRingingResponseDelaySlider.setMinimumSize(new java.awt.Dimension(40, 150)); inboundRingingResponseDelaySlider.setName(""); // NOI18N inboundRingingResponseDelaySlider.setPreferredSize(new java.awt.Dimension(40, 150)); inboundRingingResponseDelaySlider.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { inboundRingingResponseDelaySliderStateChanged(evt); } }); inboundRingingResponseBusyRatioSlider.setFont(new java.awt.Font("STHeiti", 0, 5)); inboundRingingResponseBusyRatioSlider.setMajorTickSpacing(10); inboundRingingResponseBusyRatioSlider.setMinorTickSpacing(1); inboundRingingResponseBusyRatioSlider.setOrientation(javax.swing.JSlider.VERTICAL); inboundRingingResponseBusyRatioSlider.setPaintLabels(true); inboundRingingResponseBusyRatioSlider.setPaintTicks(true); inboundRingingResponseBusyRatioSlider.setSnapToTicks(true); inboundRingingResponseBusyRatioSlider.setToolTipText("Busy Percentage"); inboundRingingResponseBusyRatioSlider.setValue(10); inboundRingingResponseBusyRatioSlider.setFocusable(false); inboundRingingResponseBusyRatioSlider.setMaximumSize(new java.awt.Dimension(40, 150)); inboundRingingResponseBusyRatioSlider.setMinimumSize(new java.awt.Dimension(40, 150)); inboundRingingResponseBusyRatioSlider.setName(""); // NOI18N inboundRingingResponseBusyRatioSlider.setPreferredSize(new java.awt.Dimension(40, 150)); inboundRingingResponseBusyRatioSlider.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { inboundRingingResponseBusyRatioSliderStateChanged(evt); } }); inboundEndDelaySlider.setFont(new java.awt.Font("STHeiti", 0, 5)); inboundEndDelaySlider.setMajorTickSpacing(6000); inboundEndDelaySlider.setMaximum(60000); inboundEndDelaySlider.setMinimum(1000); inboundEndDelaySlider.setMinorTickSpacing(1000); inboundEndDelaySlider.setOrientation(javax.swing.JSlider.VERTICAL); inboundEndDelaySlider.setPaintLabels(true); inboundEndDelaySlider.setPaintTicks(true); inboundEndDelaySlider.setSnapToTicks(true); inboundEndDelaySlider.setToolTipText("Random End Call Delay"); inboundEndDelaySlider.setValue(30000); inboundEndDelaySlider.setFocusable(false); inboundEndDelaySlider.setMaximumSize(new java.awt.Dimension(40, 150)); inboundEndDelaySlider.setMinimumSize(new java.awt.Dimension(40, 150)); inboundEndDelaySlider.setName(""); // NOI18N inboundEndDelaySlider.setPreferredSize(new java.awt.Dimension(40, 150)); inboundEndDelaySlider.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { inboundEndDelaySliderStateChanged(evt); } }); org.jdesktop.layout.GroupLayout inboundSliderPanelLayout = new org.jdesktop.layout.GroupLayout( inboundSliderPanel); inboundSliderPanel.setLayout(inboundSliderPanelLayout); inboundSliderPanelLayout.setHorizontalGroup(inboundSliderPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(inboundSliderPanelLayout.createSequentialGroup().addContainerGap().add(inboundSliderPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(inboundSliderPanelLayout.createSequentialGroup() .add(inboundSliderPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(registerSpeedLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 31, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(registerSpeedValue, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 25, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(inboundSliderPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(inboundSliderPanelLayout.createSequentialGroup().add(2, 2, 2).add( inboundRingingResponseDelayLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 35, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(inboundRingingResponseDelayValue, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 29, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(inboundSliderPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false) .add(inboundRingingResponseBusyRatioLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 31, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(inboundSliderPanelLayout.createSequentialGroup().add(2, 2, 2).add( inboundRingingResponseBusyRatioValue, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 29, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(inboundSliderPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(inboundEndDelayValue, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 29, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(inboundEndDelayLabel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 35, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) .add(inboundSliderPanelLayout.createSequentialGroup() .add(registerSpeedSlider, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 34, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(inboundRingingResponseDelaySlider, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(inboundRingingResponseBusyRatioSlider, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(inboundEndDelaySlider, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); inboundSliderPanelLayout.setVerticalGroup(inboundSliderPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(inboundSliderPanelLayout.createSequentialGroup() .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(inboundSliderPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(inboundSliderPanelLayout.createSequentialGroup() .add(inboundRingingResponseDelayLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(inboundRingingResponseDelayValue)) .add(inboundSliderPanelLayout.createSequentialGroup() .add(inboundSliderPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(inboundSliderPanelLayout.createSequentialGroup() .add(registerSpeedLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(registerSpeedValue)) .add(inboundSliderPanelLayout.createSequentialGroup() .add(inboundRingingResponseBusyRatioLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(inboundRingingResponseBusyRatioValue)) .add(inboundSliderPanelLayout.createSequentialGroup() .add(inboundEndDelayLabel) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(inboundEndDelayValue))) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(inboundSliderPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(org.jdesktop.layout.GroupLayout.LEADING, inboundEndDelaySlider, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 150, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(org.jdesktop.layout.GroupLayout.LEADING, inboundSliderPanelLayout .createParallelGroup( org.jdesktop.layout.GroupLayout.BASELINE) .add(registerSpeedSlider, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 150, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(inboundRingingResponseDelaySlider, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 150, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(inboundRingingResponseBusyRatioSlider, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 150, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))))); org.jdesktop.layout.GroupLayout buttonPanelLayout = new org.jdesktop.layout.GroupLayout(buttonPanel); buttonPanel.setLayout(buttonPanelLayout); buttonPanelLayout .setHorizontalGroup(buttonPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(org.jdesktop.layout.GroupLayout.TRAILING, buttonPanelLayout.createSequentialGroup().addContainerGap() .add(inboundSliderPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 164, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(12, 12, 12) .add(performanceMeterPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 188, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(outboundSliderPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 288, Short.MAX_VALUE) .addContainerGap())); buttonPanelLayout.setVerticalGroup(buttonPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(buttonPanelLayout.createSequentialGroup().addContainerGap().add(buttonPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(performanceMeterPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(buttonPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false) .add(org.jdesktop.layout.GroupLayout.LEADING, inboundSliderPanel, 0, 186, Short.MAX_VALUE) .add(org.jdesktop.layout.GroupLayout.LEADING, outboundSliderPanel, 0, 186, Short.MAX_VALUE))) .addContainerGap(12, Short.MAX_VALUE))); org.jdesktop.layout.GroupLayout controlSliderPanelLayout = new org.jdesktop.layout.GroupLayout( controlSliderPanel); controlSliderPanel.setLayout(controlSliderPanelLayout); controlSliderPanelLayout.setHorizontalGroup( controlSliderPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(controlSliderPanelLayout.createSequentialGroup() .add(buttonPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addContainerGap(13, Short.MAX_VALUE))); controlSliderPanelLayout.setVerticalGroup( controlSliderPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(buttonPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 208, Short.MAX_VALUE)); org.jdesktop.layout.GroupLayout colorMaskPanelLayout = new org.jdesktop.layout.GroupLayout(colorMaskPanel); colorMaskPanel.setLayout(colorMaskPanelLayout); colorMaskPanelLayout.setHorizontalGroup(colorMaskPanelLayout .createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(colorMaskPanelLayout.createSequentialGroup().addContainerGap() .add(colorMaskPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(controlSliderPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(tabPane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(displayPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(controlButtonPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addContainerGap(9, Short.MAX_VALUE))); colorMaskPanelLayout .setVerticalGroup(colorMaskPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(colorMaskPanelLayout.createSequentialGroup() .add(tabPane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(displayPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(controlButtonPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(controlSliderPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addContainerGap(32, Short.MAX_VALUE))); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add( colorMaskPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); layout.setVerticalGroup(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING).add( colorMaskPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); pack(); }
From source file:net.sf.dvstar.transmission.TransmissionView.java
/** This method is called from within the constructor to * initialize the form./*from w ww.ja v a 2 s . co m*/ * 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() { java.awt.GridBagConstraints gridBagConstraints; mainPanel = new javax.swing.JPanel(); spMain = new javax.swing.JSplitPane(); jPanel1 = new javax.swing.JPanel(); jPanel10 = new javax.swing.JPanel(); lbFind = new javax.swing.JLabel(); tfFindItem = new javax.swing.JTextField(); lbFindInfo = new javax.swing.JLabel(); cbFilterStatus = new javax.swing.JComboBox(); jPanel11 = new javax.swing.JPanel(); spTorrentList = new javax.swing.JScrollPane(); tblTorrentList = new javax.swing.JTable(); jPanel3 = new javax.swing.JPanel(); btFirst = new javax.swing.JButton(); btPrev = new javax.swing.JButton(); tfCurrentRow = new javax.swing.JTextField(); btNext = new javax.swing.JButton(); btLast = new javax.swing.JButton(); jPanel2 = new javax.swing.JPanel(); jTabbedPane1 = new javax.swing.JTabbedPane(); plInfo = new javax.swing.JPanel(); plInfoCommon = new javax.swing.JPanel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); tfTimeAll = new javax.swing.JTextField(); tfDownloaded = new javax.swing.JTextField(); tfSpeedDn = new javax.swing.JTextField(); tfState = new javax.swing.JTextField(); tfComment = new javax.swing.JTextField(); jLabel10 = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); jLabel9 = new javax.swing.JLabel(); tfTimeAll1 = new javax.swing.JTextField(); tfUploaded = new javax.swing.JTextField(); tfSpeedDn1 = new javax.swing.JTextField(); tfStartedAt = new javax.swing.JTextField(); jLabel14 = new javax.swing.JLabel(); jLabel12 = new javax.swing.JLabel(); jLabel11 = new javax.swing.JLabel(); lbErrorInfo = new javax.swing.JLabel(); tfSeeds = new javax.swing.JTextField(); tfLeechers = new javax.swing.JTextField(); tfRate = new javax.swing.JTextField(); tfCreatedAt = new javax.swing.JTextField(); jLabel16 = new javax.swing.JLabel(); tfStorePath = new javax.swing.JTextField(); jLabel17 = new javax.swing.JLabel(); tfSpeedDn3 = new javax.swing.JTextField(); jLabel18 = new javax.swing.JLabel(); tfSpeedUp = new javax.swing.JTextField(); jLabel19 = new javax.swing.JLabel(); tfCreator = new javax.swing.JTextField(); tfErrorInfo = new javax.swing.JTextField(); jLabel15 = new javax.swing.JLabel(); jPanel9 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); plPieces = new javax.swing.JPanel(); lbProgress = new javax.swing.JLabel(); plFiles = new javax.swing.JPanel(); jScrollPane3 = new javax.swing.JScrollPane(); tblTorrentFiles = new javax.swing.JTable(); plPeers = new javax.swing.JPanel(); jScrollPane2 = new javax.swing.JScrollPane(); tblTorrentPeers = new javax.swing.JTable(); plTrackers = new javax.swing.JPanel(); plSpeed = new javax.swing.JPanel(); menuBar = new javax.swing.JMenuBar(); javax.swing.JMenu fileMenu = new javax.swing.JMenu(); miFileConnect = new javax.swing.JMenuItem(); jSeparator3 = new javax.swing.JSeparator(); miFileQuickAddFile = new javax.swing.JMenuItem(); miFileExtAddFile = new javax.swing.JMenuItem(); miFileInfo = new javax.swing.JMenuItem(); miFileAddURL = new javax.swing.JMenuItem(); jSeparator2 = new javax.swing.JSeparator(); javax.swing.JMenuItem miFileExit = new javax.swing.JMenuItem(); configMenu = new javax.swing.JMenu(); miConfigClient = new javax.swing.JMenuItem(); miConfigServer = new javax.swing.JMenuItem(); jSeparator1 = new javax.swing.JSeparator(); mnConfigLocale = new javax.swing.JMenu(); torrentMenu = new javax.swing.JMenu(); miTorrentStart = new javax.swing.JMenuItem(); miTorrentStop = new javax.swing.JMenuItem(); miTorrentRefresh = new javax.swing.JMenuItem(); miTorrentCheck = new javax.swing.JMenuItem(); miTorrentProperties = new javax.swing.JMenuItem(); miTorrentDelete = new javax.swing.JMenuItem(); miTorrentDeleteAll = new javax.swing.JMenuItem(); miTorrentAnnounce = new javax.swing.JMenuItem(); miTorrentMove = new javax.swing.JMenuItem(); miTorrentLocation = new javax.swing.JMenuItem(); jSeparator4 = new javax.swing.JSeparator(); miTorrentStartAll = new javax.swing.JMenuItem(); miTorrentStopAll = new javax.swing.JMenuItem(); javax.swing.JMenu helpMenu = new javax.swing.JMenu(); javax.swing.JMenuItem miHelpAbout = new javax.swing.JMenuItem(); statusPanel = new javax.swing.JPanel(); javax.swing.JSeparator statusPanelSeparator = new javax.swing.JSeparator(); statusMessageLabel = new javax.swing.JLabel(); statusAnimationLabel = new javax.swing.JLabel(); progressBar = new javax.swing.JProgressBar(); maiToolBar = new javax.swing.JToolBar(); btConnect = new javax.swing.JButton(); jSeparator5 = new javax.swing.JToolBar.Separator(); btAdd = new javax.swing.JButton(); btAddUrl = new javax.swing.JButton(); jSeparator8 = new javax.swing.JToolBar.Separator(); btStart = new javax.swing.JButton(); btStop = new javax.swing.JButton(); btRefresh = new javax.swing.JButton(); jSeparator9 = new javax.swing.JToolBar.Separator(); btStatistic = new javax.swing.JButton(); jSeparator6 = new javax.swing.JToolBar.Separator(); btConfigCli = new javax.swing.JButton(); jSeparator7 = new javax.swing.JToolBar.Separator(); btExit = new javax.swing.JButton(); mainPanel.setName("mainPanel"); // NOI18N mainPanel.setLayout(new java.awt.BorderLayout()); spMain.setDividerLocation(250); spMain.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT); spMain.setResizeWeight(1.0); spMain.setName("spMain"); // NOI18N jPanel1.setMinimumSize(new java.awt.Dimension(21, 200)); jPanel1.setName("jPanel1"); // NOI18N jPanel1.setLayout(new java.awt.BorderLayout()); jPanel10.setName("jPanel10"); // NOI18N jPanel10.setPreferredSize(new java.awt.Dimension(680, 24)); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application .getInstance(net.sf.dvstar.transmission.TransmissionApp.class).getContext() .getResourceMap(TransmissionView.class); lbFind.setIcon(resourceMap.getIcon("lbFind.icon")); // NOI18N lbFind.setText(resourceMap.getString("lbFind.text")); // NOI18N lbFind.setName("lbFind"); // NOI18N tfFindItem.setText(null); tfFindItem.setName("tfFindItem"); // NOI18N lbFindInfo.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); lbFindInfo.setText(resourceMap.getString("lbFindInfo.text")); // NOI18N lbFindInfo.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); lbFindInfo.setName("lbFindInfo"); // NOI18N cbFilterStatus.setModel(new javax.swing.DefaultComboBoxModel( new String[] { "All", "Downloading", "Paused", "Seeding", "Checking", "Error" })); cbFilterStatus.setName("cbFilterStatus"); // NOI18N cbFilterStatus.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cbFilterStatusActionPerformed(evt); } }); javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10); jPanel10.setLayout(jPanel10Layout); jPanel10Layout.setHorizontalGroup(jPanel10Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel10Layout.createSequentialGroup().addContainerGap().addComponent(lbFind) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(tfFindItem, javax.swing.GroupLayout.DEFAULT_SIZE, 531, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(lbFindInfo, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(cbFilterStatus, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap())); jPanel10Layout.setVerticalGroup(jPanel10Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel10Layout.createSequentialGroup() .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(tfFindItem, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lbFind).addComponent(lbFindInfo).addComponent(cbFilterStatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jPanel1.add(jPanel10, java.awt.BorderLayout.NORTH); jPanel11.setName("jPanel11"); // NOI18N jPanel11.setLayout(new java.awt.BorderLayout()); spTorrentList.setName("spTorrentList"); // NOI18N spTorrentList.setPreferredSize(new java.awt.Dimension(454, 200)); tblTorrentList.setModel(new javax.swing.table.DefaultTableModel(new Object[][] { }, new String[] { "", "Name", "Size", "Progress", "Status", "Seed", "Leech", "Dn Speed", "Up Speed", "Upload" }) { Class[] types = new Class[] { java.lang.Integer.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class, java.lang.Object.class }; boolean[] canEdit = new boolean[] { false, false, false, false, false, false, false, false, false, false }; public Class getColumnClass(int columnIndex) { return types[columnIndex]; } public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit[columnIndex]; } }); tblTorrentList.setColumnSelectionAllowed(true); tblTorrentList.setName("tblTorrentList"); // NOI18N tblTorrentList.setSelectionMode(javax.swing.ListSelectionModel.MULTIPLE_INTERVAL_SELECTION); tblTorrentList.getTableHeader().setReorderingAllowed(false); spTorrentList.setViewportView(tblTorrentList); tblTorrentList.getColumnModel().getSelectionModel() .setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); tblTorrentList.getColumnModel().getColumn(0) .setHeaderValue(resourceMap.getString("tblTorrentList.columnModel.title0")); // NOI18N tblTorrentList.getColumnModel().getColumn(1) .setHeaderValue(resourceMap.getString("tblTorrentList.columnModel.title1")); // NOI18N tblTorrentList.getColumnModel().getColumn(2) .setHeaderValue(resourceMap.getString("tblTorrentList.columnModel.title2")); // NOI18N tblTorrentList.getColumnModel().getColumn(3) .setHeaderValue(resourceMap.getString("tblTorrentList.columnModel.title3")); // NOI18N tblTorrentList.getColumnModel().getColumn(4) .setHeaderValue(resourceMap.getString("tblTorrentList.columnModel.title4")); // NOI18N tblTorrentList.getColumnModel().getColumn(5) .setHeaderValue(resourceMap.getString("tblTorrentList.columnModel.title5")); // NOI18N tblTorrentList.getColumnModel().getColumn(6) .setHeaderValue(resourceMap.getString("tblTorrentList.columnModel.title6")); // NOI18N tblTorrentList.getColumnModel().getColumn(7) .setHeaderValue(resourceMap.getString("tblTorrentList.columnModel.title7")); // NOI18N tblTorrentList.getColumnModel().getColumn(8) .setHeaderValue(resourceMap.getString("tblTorrentList.columnModel.title8")); // NOI18N tblTorrentList.getColumnModel().getColumn(9) .setHeaderValue(resourceMap.getString("tblTorrentList.columnModel.title9")); // NOI18N jPanel11.add(spTorrentList, java.awt.BorderLayout.CENTER); jPanel1.add(jPanel11, java.awt.BorderLayout.CENTER); jPanel3.setName("jPanel3"); // NOI18N jPanel3.setPreferredSize(new java.awt.Dimension(981, 26)); jPanel3.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.RIGHT, 4, 2)); btFirst.setIcon(resourceMap.getIcon("btFirst.icon")); // NOI18N btFirst.setText(resourceMap.getString("btFirst.text")); // NOI18N btFirst.setName("btFirst"); // NOI18N btFirst.setPreferredSize(new java.awt.Dimension(22, 22)); btFirst.addActionListener(new NavigatorButtonActionListener(NavigatorButtonActionListener.NAV_BUTTON_FIRS)); jPanel3.add(btFirst); btPrev.setIcon(resourceMap.getIcon("btPrev.icon")); // NOI18N btPrev.setName("btPrev"); // NOI18N btPrev.setPreferredSize(new java.awt.Dimension(22, 22)); btPrev.addActionListener(new NavigatorButtonActionListener(NavigatorButtonActionListener.NAV_BUTTON_PREV)); jPanel3.add(btPrev); tfCurrentRow.setColumns(6); tfCurrentRow.setText(resourceMap.getString("tfCurrentRow.text")); // NOI18N tfCurrentRow.setName("tfCurrentRow"); // NOI18N jPanel3.add(tfCurrentRow); btNext.setIcon(resourceMap.getIcon("btNext.icon")); // NOI18N btNext.setName("btNext"); // NOI18N btNext.setPreferredSize(new java.awt.Dimension(22, 22)); btNext.addActionListener(new NavigatorButtonActionListener(NavigatorButtonActionListener.NAV_BUTTON_NEXT)); jPanel3.add(btNext); btLast.setIcon(resourceMap.getIcon("btLast.icon")); // NOI18N btLast.setName("btLast"); // NOI18N btLast.setPreferredSize(new java.awt.Dimension(22, 22)); btLast.addActionListener(new NavigatorButtonActionListener(NavigatorButtonActionListener.NAV_BUTTON_LAST)); jPanel3.add(btLast); jPanel1.add(jPanel3, java.awt.BorderLayout.SOUTH); spMain.setLeftComponent(jPanel1); jPanel2.setName("jPanel2"); // NOI18N jPanel2.setPreferredSize(new java.awt.Dimension(590, 80)); jPanel2.setLayout(new java.awt.BorderLayout()); jTabbedPane1.setTabPlacement(javax.swing.JTabbedPane.BOTTOM); jTabbedPane1.setName("jTabbedPane1"); // NOI18N plInfo.setName("plInfo"); // NOI18N plInfo.setLayout(new java.awt.BorderLayout()); plInfoCommon.setBorder(javax.swing.BorderFactory.createTitledBorder("...")); plInfoCommon.setMinimumSize(new java.awt.Dimension(661, 162)); plInfoCommon.setName("plInfoCommon"); // NOI18N plInfoCommon.setPreferredSize(new java.awt.Dimension(661, 162)); plInfoCommon.setLayout(new java.awt.GridBagLayout()); jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N jLabel2.setName("jLabel2"); // NOI18N jLabel2.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(jLabel2, gridBagConstraints); jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N jLabel3.setName("jLabel3"); // NOI18N jLabel3.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(jLabel3, gridBagConstraints); jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N jLabel4.setName("jLabel4"); // NOI18N jLabel4.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 3; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(jLabel4, gridBagConstraints); jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N jLabel5.setName("jLabel5"); // NOI18N jLabel5.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 4; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(jLabel5, gridBagConstraints); jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N jLabel6.setName("jLabel6"); // NOI18N jLabel6.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 6; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(jLabel6, gridBagConstraints); tfTimeAll.setEditable(false); tfTimeAll.setBorder( javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("tfTimeAll.border.lineColor"))); // NOI18N tfTimeAll.setMinimumSize(new java.awt.Dimension(68, 16)); tfTimeAll.setName("tfTimeAll"); // NOI18N gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.ipadx = 30; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfTimeAll, gridBagConstraints); tfDownloaded.setEditable(false); tfDownloaded.setBorder( javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("tfTimeAll.border.lineColor"))); // NOI18N tfDownloaded.setMinimumSize(new java.awt.Dimension(68, 16)); tfDownloaded.setName("tfDownloaded"); // NOI18N tfDownloaded.setPreferredSize(new java.awt.Dimension(68, 16)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.ipadx = 30; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfDownloaded, gridBagConstraints); tfSpeedDn.setEditable(false); tfSpeedDn.setBorder( javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("tfTimeAll.border.lineColor"))); // NOI18N tfSpeedDn.setMinimumSize(new java.awt.Dimension(68, 16)); tfSpeedDn.setName("tfSpeedDn"); // NOI18N tfSpeedDn.setPreferredSize(new java.awt.Dimension(68, 16)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.ipadx = 30; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfSpeedDn, gridBagConstraints); tfState.setEditable(false); tfState.setBorder( javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("tfTimeAll.border.lineColor"))); // NOI18N tfState.setMinimumSize(new java.awt.Dimension(68, 16)); tfState.setName("tfState"); // NOI18N tfState.setPreferredSize(new java.awt.Dimension(68, 16)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 4; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.ipadx = 30; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfState, gridBagConstraints); tfComment.setEditable(false); tfComment.setBorder( javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("tfTimeAll.border.lineColor"))); // NOI18N tfComment.setName("tfComment"); // NOI18N gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 5; gridBagConstraints.gridwidth = 3; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 3.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfComment, gridBagConstraints); jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N jLabel10.setName("jLabel10"); // NOI18N jLabel10.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 0; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(jLabel10, gridBagConstraints); jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N jLabel8.setName("jLabel8"); // NOI18N jLabel8.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 1; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(jLabel8, gridBagConstraints); jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N jLabel7.setName("jLabel7"); // NOI18N jLabel7.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 3; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(jLabel7, gridBagConstraints); jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N jLabel9.setName("jLabel9"); // NOI18N jLabel9.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 4; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(jLabel9, gridBagConstraints); tfTimeAll1.setEditable(false); tfTimeAll1.setBorder( javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("tfTimeAll.border.lineColor"))); // NOI18N tfTimeAll1.setMaximumSize(new java.awt.Dimension(68, 16)); tfTimeAll1.setMinimumSize(new java.awt.Dimension(68, 16)); tfTimeAll1.setName("tfTimeAll1"); // NOI18N gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 3; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.ipadx = 30; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfTimeAll1, gridBagConstraints); tfUploaded.setEditable(false); tfUploaded.setBorder( javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("tfTimeAll.border.lineColor"))); // NOI18N tfUploaded.setMinimumSize(new java.awt.Dimension(68, 16)); tfUploaded.setName("tfUploaded"); // NOI18N tfUploaded.setPreferredSize(new java.awt.Dimension(68, 16)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.ipadx = 30; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfUploaded, gridBagConstraints); tfSpeedDn1.setEditable(false); tfSpeedDn1.setBorder( javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("tfTimeAll.border.lineColor"))); // NOI18N tfSpeedDn1.setMinimumSize(new java.awt.Dimension(68, 16)); tfSpeedDn1.setName("tfSpeedDn1"); // NOI18N tfSpeedDn1.setPreferredSize(new java.awt.Dimension(68, 16)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.ipadx = 30; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfSpeedDn1, gridBagConstraints); tfStartedAt.setEditable(false); tfStartedAt.setBorder( javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("tfTimeAll.border.lineColor"))); // NOI18N tfStartedAt.setMinimumSize(new java.awt.Dimension(68, 16)); tfStartedAt.setName("tfStartedAt"); // NOI18N tfStartedAt.setPreferredSize(new java.awt.Dimension(68, 16)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 4; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.ipadx = 30; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfStartedAt, gridBagConstraints); jLabel14.setText(resourceMap.getString("jLabel14.text")); // NOI18N jLabel14.setName("jLabel14"); // NOI18N jLabel14.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 0; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(jLabel14, gridBagConstraints); jLabel12.setText(resourceMap.getString("jLabel12.text")); // NOI18N jLabel12.setName("jLabel12"); // NOI18N jLabel12.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 1; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(jLabel12, gridBagConstraints); jLabel11.setText(resourceMap.getString("jLabel11.text")); // NOI18N jLabel11.setName("jLabel11"); // NOI18N jLabel11.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 2; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(jLabel11, gridBagConstraints); lbErrorInfo.setForeground(resourceMap.getColor("tfErrorInfo.foreground")); // NOI18N lbErrorInfo.setText(resourceMap.getString("lbErrorInfo.text")); // NOI18N lbErrorInfo.setName("lbErrorInfo"); // NOI18N lbErrorInfo.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 5; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(lbErrorInfo, gridBagConstraints); tfSeeds.setEditable(false); tfSeeds.setBorder( javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("tfTimeAll.border.lineColor"))); // NOI18N tfSeeds.setMinimumSize(new java.awt.Dimension(68, 16)); tfSeeds.setName("tfSeeds"); // NOI18N tfSeeds.setPreferredSize(new java.awt.Dimension(68, 16)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 5; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.ipadx = 30; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfSeeds, gridBagConstraints); tfLeechers.setEditable(false); tfLeechers.setText(resourceMap.getString("tfLeechers.text")); // NOI18N tfLeechers.setBorder( javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("tfTimeAll.border.lineColor"))); // NOI18N tfLeechers.setMinimumSize(new java.awt.Dimension(68, 16)); tfLeechers.setName("tfLeechers"); // NOI18N tfLeechers.setPreferredSize(new java.awt.Dimension(68, 16)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 5; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.ipadx = 30; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfLeechers, gridBagConstraints); tfRate.setEditable(false); tfRate.setBorder( javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("tfTimeAll.border.lineColor"))); // NOI18N tfRate.setMinimumSize(new java.awt.Dimension(68, 16)); tfRate.setName("tfRate"); // NOI18N gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 5; gridBagConstraints.gridy = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.ipadx = 30; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfRate, gridBagConstraints); tfCreatedAt.setEditable(false); tfCreatedAt.setBorder( javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("tfTimeAll.border.lineColor"))); // NOI18N tfCreatedAt.setMinimumSize(new java.awt.Dimension(68, 16)); tfCreatedAt.setName("tfCreatedAt"); // NOI18N tfCreatedAt.setPreferredSize(new java.awt.Dimension(68, 16)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 5; gridBagConstraints.gridy = 4; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.ipadx = 30; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfCreatedAt, gridBagConstraints); jLabel16.setText(resourceMap.getString("jLabel16.text")); // NOI18N jLabel16.setName("jLabel16"); // NOI18N jLabel16.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 5; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(jLabel16, gridBagConstraints); tfStorePath.setEditable(false); tfStorePath.setBorder( javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("tfStorePath.border.lineColor"))); // NOI18N tfStorePath.setName("tfStorePath"); // NOI18N gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 6; gridBagConstraints.gridwidth = 5; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 3.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfStorePath, gridBagConstraints); jLabel17.setText(resourceMap.getString("jLabel17.text")); // NOI18N jLabel17.setName("jLabel17"); // NOI18N jLabel17.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(jLabel17, gridBagConstraints); tfSpeedDn3.setEditable(false); tfSpeedDn3.setBorder( javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("tfSpeedDn3.border.lineColor"))); // NOI18N tfSpeedDn3.setMinimumSize(new java.awt.Dimension(68, 16)); tfSpeedDn3.setName("tfSpeedDn3"); // NOI18N tfSpeedDn3.setPreferredSize(new java.awt.Dimension(68, 16)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 3; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.ipadx = 30; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfSpeedDn3, gridBagConstraints); jLabel18.setText(resourceMap.getString("jLabel18.text")); // NOI18N jLabel18.setName("jLabel18"); // NOI18N jLabel18.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 2; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(jLabel18, gridBagConstraints); tfSpeedUp.setEditable(false); tfSpeedUp.setBorder( javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("tfSpeedUp.border.lineColor"))); // NOI18N tfSpeedUp.setMaximumSize(new java.awt.Dimension(68, 16)); tfSpeedUp.setMinimumSize(new java.awt.Dimension(68, 16)); tfSpeedUp.setName("tfSpeedUp"); // NOI18N gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.ipadx = 30; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfSpeedUp, gridBagConstraints); jLabel19.setText(resourceMap.getString("jLabel19.text")); // NOI18N jLabel19.setName("jLabel19"); // NOI18N jLabel19.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 3; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(jLabel19, gridBagConstraints); tfCreator.setEditable(false); tfCreator.setBorder( javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("tfCreator.border.lineColor"))); // NOI18N tfCreator.setMinimumSize(new java.awt.Dimension(68, 16)); tfCreator.setName("tfCreator"); // NOI18N gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 5; gridBagConstraints.gridy = 3; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.ipadx = 30; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfCreator, gridBagConstraints); tfErrorInfo.setEditable(false); tfErrorInfo.setForeground(resourceMap.getColor("tfErrorInfo.foreground")); // NOI18N tfErrorInfo.setText(null); tfErrorInfo.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0))); tfErrorInfo.setName("tfErrorInfo"); // NOI18N gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 5; gridBagConstraints.gridy = 5; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2); plInfoCommon.add(tfErrorInfo, gridBagConstraints); jLabel15.setText(resourceMap.getString("jLabel15.text")); // NOI18N jLabel15.setName("jLabel15"); // NOI18N jLabel15.setPreferredSize(new java.awt.Dimension(72, 15)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 4; gridBagConstraints.ipadx = 20; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(2, 6, 2, 2); plInfoCommon.add(jLabel15, gridBagConstraints); plInfo.add(plInfoCommon, java.awt.BorderLayout.CENTER); jPanel9.setName("jPanel9"); // NOI18N jPanel9.setPreferredSize(new java.awt.Dimension(644, 56)); jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N jLabel1.setName("jLabel1"); // NOI18N plPieces.setBackground(resourceMap.getColor("plPieces.background")); // NOI18N plPieces.setName("plPieces"); // NOI18N plPieces.setLayout(new java.awt.BorderLayout()); lbProgress.setText(resourceMap.getString("lbProgress.text")); // NOI18N lbProgress.setName("lbProgress"); // NOI18N javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9); jPanel9.setLayout(jPanel9Layout); jPanel9Layout .setHorizontalGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel9Layout.createSequentialGroup().addContainerGap().addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(plPieces, javax.swing.GroupLayout.DEFAULT_SIZE, 667, Short.MAX_VALUE) .addGap(18, 18, 18).addComponent(lbProgress).addContainerGap())); jPanel9Layout.setVerticalGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel9Layout.createSequentialGroup().addGroup(jPanel9Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel9Layout.createSequentialGroup().addGap(24, 24, 24).addComponent(jLabel1)) .addGroup(jPanel9Layout.createSequentialGroup().addGap(25, 25, 25).addComponent(lbProgress)) .addGroup(jPanel9Layout.createSequentialGroup().addContainerGap().addComponent(plPieces, javax.swing.GroupLayout.DEFAULT_SIZE, 32, Short.MAX_VALUE))) .addContainerGap())); lbProgress.getAccessibleContext() .setAccessibleName(resourceMap.getString("lbProgress.AccessibleContext.accessibleName")); // NOI18N plInfo.add(jPanel9, java.awt.BorderLayout.NORTH); jTabbedPane1.addTab(resourceMap.getString("plInfo.TabConstraints.tabTitle"), plInfo); // NOI18N plFiles.setName("plFiles"); // NOI18N plFiles.setLayout(new java.awt.BorderLayout()); jScrollPane3.setName("jScrollPane3"); // NOI18N tblTorrentFiles.setModel(new javax.swing.table.DefaultTableModel(new Object[][] { }, new String[] { "Path", "Type", "Complete", "Done", "Size" }) { boolean[] canEdit = new boolean[] { false, false, false, false, false }; public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit[columnIndex]; } }); tblTorrentFiles.setName("tblTorrentFiles"); // NOI18N tblTorrentFiles.getTableHeader().setReorderingAllowed(false); jScrollPane3.setViewportView(tblTorrentFiles); tblTorrentFiles.getColumnModel().getColumn(0) .setHeaderValue(resourceMap.getString("tblTorrentFiles.columnModel.title0")); // NOI18N tblTorrentFiles.getColumnModel().getColumn(1) .setHeaderValue(resourceMap.getString("tblTorrentFiles.columnModel.title1")); // NOI18N tblTorrentFiles.getColumnModel().getColumn(2) .setHeaderValue(resourceMap.getString("tblTorrentFiles.columnModel.title2")); // NOI18N tblTorrentFiles.getColumnModel().getColumn(3) .setHeaderValue(resourceMap.getString("tblTorrentFiles.columnModel.title3")); // NOI18N tblTorrentFiles.getColumnModel().getColumn(4) .setHeaderValue(resourceMap.getString("tblTorrentFiles.columnModel.title4")); // NOI18N plFiles.add(jScrollPane3, java.awt.BorderLayout.CENTER); jTabbedPane1.addTab(resourceMap.getString("plFiles.TabConstraints.tabTitle"), plFiles); // NOI18N plPeers.setName("plPeers"); // NOI18N plPeers.setLayout(new java.awt.BorderLayout()); jScrollPane2.setName("jScrollPane2"); // NOI18N tblTorrentPeers.setModel(new javax.swing.table.DefaultTableModel(new Object[][] { }, new String[] { "IP", "Country", "Flags", "Client", "Port", "Progress", "Dn rate", "Up rate" }) { boolean[] canEdit = new boolean[] { false, false, false, false, false, false, false, false }; public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit[columnIndex]; } }); tblTorrentPeers.setName("tblTorrentPeers"); // NOI18N tblTorrentPeers.getTableHeader().setReorderingAllowed(false); jScrollPane2.setViewportView(tblTorrentPeers); tblTorrentPeers.getColumnModel().getColumn(0) .setHeaderValue(resourceMap.getString("tblTorrentPeers.columnModel.title0")); // NOI18N tblTorrentPeers.getColumnModel().getColumn(1) .setHeaderValue(resourceMap.getString("tblTorrentPeers.columnModel.title1")); // NOI18N tblTorrentPeers.getColumnModel().getColumn(2) .setHeaderValue(resourceMap.getString("tblTorrentPeers.columnModel.title2")); // NOI18N tblTorrentPeers.getColumnModel().getColumn(3) .setHeaderValue(resourceMap.getString("tblTorrentPeers.columnModel.title3")); // NOI18N tblTorrentPeers.getColumnModel().getColumn(4) .setHeaderValue(resourceMap.getString("tblTorrentPeers.columnModel.title4")); // NOI18N tblTorrentPeers.getColumnModel().getColumn(5) .setHeaderValue(resourceMap.getString("tblTorrentPeers.columnModel.title5")); // NOI18N tblTorrentPeers.getColumnModel().getColumn(6) .setHeaderValue(resourceMap.getString("tblTorrentPeers.columnModel.title6")); // NOI18N tblTorrentPeers.getColumnModel().getColumn(7) .setHeaderValue(resourceMap.getString("tblTorrentPeers.columnModel.title7")); // NOI18N plPeers.add(jScrollPane2, java.awt.BorderLayout.CENTER); jTabbedPane1.addTab(resourceMap.getString("plPeers.TabConstraints.tabTitle"), plPeers); // NOI18N plTrackers.setName("plTrackers"); // NOI18N javax.swing.GroupLayout plTrackersLayout = new javax.swing.GroupLayout(plTrackers); plTrackers.setLayout(plTrackersLayout); plTrackersLayout.setHorizontalGroup(plTrackersLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 822, Short.MAX_VALUE)); plTrackersLayout.setVerticalGroup(plTrackersLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 233, Short.MAX_VALUE)); jTabbedPane1.addTab(resourceMap.getString("plTrackers.TabConstraints.tabTitle"), plTrackers); // NOI18N plSpeed.setName("plSpeed"); // NOI18N javax.swing.GroupLayout plSpeedLayout = new javax.swing.GroupLayout(plSpeed); plSpeed.setLayout(plSpeedLayout); plSpeedLayout.setHorizontalGroup(plSpeedLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 822, Short.MAX_VALUE)); plSpeedLayout.setVerticalGroup(plSpeedLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 233, Short.MAX_VALUE)); jTabbedPane1.addTab(resourceMap.getString("plSpeed.TabConstraints.tabTitle"), plSpeed); // NOI18N jPanel2.add(jTabbedPane1, java.awt.BorderLayout.CENTER); spMain.setRightComponent(jPanel2); mainPanel.add(spMain, java.awt.BorderLayout.CENTER); menuBar.setName("menuBar"); // NOI18N fileMenu.setText(resourceMap.getString("fileMenu.text")); // NOI18N fileMenu.setName("fileMenu"); // NOI18N javax.swing.ActionMap actionMap = org.jdesktop.application.Application .getInstance(net.sf.dvstar.transmission.TransmissionApp.class).getContext() .getActionMap(TransmissionView.class, this); miFileConnect.setAction(actionMap.get("doConnect")); // NOI18N miFileConnect.setIcon(resourceMap.getIcon("miFileConnect.icon")); // NOI18N miFileConnect.setText(resourceMap.getString("miFileConnect.text")); // NOI18N miFileConnect.setName("miFileConnect"); // NOI18N fileMenu.add(miFileConnect); jSeparator3.setName("jSeparator3"); // NOI18N fileMenu.add(jSeparator3); miFileQuickAddFile.setAction(actionMap.get("doAddTorrentQuick")); // NOI18N miFileQuickAddFile.setIcon(resourceMap.getIcon("miFileQuickAddFile.icon")); // NOI18N miFileQuickAddFile.setText(resourceMap.getString("miFileQuickAddFile.text")); // NOI18N miFileQuickAddFile.setName("miFileQuickAddFile"); // NOI18N fileMenu.add(miFileQuickAddFile); miFileExtAddFile.setAction(actionMap.get("doAddTorrentExt")); // NOI18N miFileExtAddFile.setIcon(resourceMap.getIcon("miFileExtAddFile.icon")); // NOI18N miFileExtAddFile.setText(resourceMap.getString("miFileExtAddFile.text")); // NOI18N miFileExtAddFile.setName("miFileExtAddFile"); // NOI18N fileMenu.add(miFileExtAddFile); miFileInfo.setAction(actionMap.get("doTorrentInfo")); // NOI18N miFileInfo.setIcon(resourceMap.getIcon("miFileInfo.icon")); // NOI18N miFileInfo.setText(resourceMap.getString("miFileInfo.text")); // NOI18N miFileInfo.setName("miFileInfo"); // NOI18N fileMenu.add(miFileInfo); miFileAddURL.setIcon(resourceMap.getIcon("miFileAddURL.icon")); // NOI18N miFileAddURL.setText(resourceMap.getString("miFileAddURL.text")); // NOI18N miFileAddURL.setName("miFileAddURL"); // NOI18N fileMenu.add(miFileAddURL); jSeparator2.setName("jSeparator2"); // NOI18N fileMenu.add(jSeparator2); miFileExit.setAction(actionMap.get("doQuit")); // NOI18N miFileExit.setIcon(resourceMap.getIcon("miFileExit.icon")); // NOI18N miFileExit.setName("miFileExit"); // NOI18N fileMenu.add(miFileExit); menuBar.add(fileMenu); configMenu.setText(resourceMap.getString("configMenu.text")); // NOI18N configMenu.setName("configMenu"); // NOI18N miConfigClient.setAction(actionMap.get("doConfigClient")); // NOI18N miConfigClient.setIcon(resourceMap.getIcon("miConfigClient.icon")); // NOI18N miConfigClient.setText(resourceMap.getString("miConfigClient.text")); // NOI18N miConfigClient.setName("miConfigClient"); // NOI18N configMenu.add(miConfigClient); miConfigServer.setAction(actionMap.get("doConfigServer")); // NOI18N miConfigServer.setIcon(resourceMap.getIcon("miConfigServer.icon")); // NOI18N miConfigServer.setText(resourceMap.getString("miConfigServer.text")); // NOI18N miConfigServer.setName("miConfigServer"); // NOI18N configMenu.add(miConfigServer); jSeparator1.setName("jSeparator1"); // NOI18N configMenu.add(jSeparator1); mnConfigLocale.setIcon(resourceMap.getIcon("mnConfigLocale.icon")); // NOI18N mnConfigLocale.setText(resourceMap.getString("mnConfigLocale.text")); // NOI18N mnConfigLocale.setName("mnConfigLocale"); // NOI18N configMenu.add(mnConfigLocale); menuBar.add(configMenu); torrentMenu.setAction(actionMap.get("doMoveTorrent")); // NOI18N torrentMenu.setText(resourceMap.getString("torrentMenu.text")); // NOI18N torrentMenu.setName("torrentMenu"); // NOI18N miTorrentStart.setAction(actionMap.get("doStartTorrent")); // NOI18N miTorrentStart.setIcon(resourceMap.getIcon("miTorrentStart.icon")); // NOI18N miTorrentStart.setText(resourceMap.getString("miTorrentStart.text")); // NOI18N miTorrentStart.setName("miTorrentStart"); // NOI18N torrentMenu.add(miTorrentStart); miTorrentStop.setAction(actionMap.get("doPauseTorrent")); // NOI18N miTorrentStop.setIcon(resourceMap.getIcon("miTorrentStop.icon")); // NOI18N miTorrentStop.setText(resourceMap.getString("miTorrentStop.text")); // NOI18N miTorrentStop.setName("miTorrentStop"); // NOI18N torrentMenu.add(miTorrentStop); miTorrentRefresh.setAction(actionMap.get("doRefresh")); // NOI18N miTorrentRefresh.setIcon(resourceMap.getIcon("miTorrentRefresh.icon")); // NOI18N miTorrentRefresh.setText(resourceMap.getString("miTorrentRefresh.text")); // NOI18N miTorrentRefresh.setName("miTorrentRefresh"); // NOI18N torrentMenu.add(miTorrentRefresh); miTorrentCheck.setIcon(resourceMap.getIcon("miTorrentCheck.icon")); // NOI18N miTorrentCheck.setText(resourceMap.getString("miTorrentCheck.text")); // NOI18N miTorrentCheck.setName("miTorrentCheck"); // NOI18N torrentMenu.add(miTorrentCheck); miTorrentProperties.setIcon(resourceMap.getIcon("miTorrentProperties.icon")); // NOI18N miTorrentProperties.setText(resourceMap.getString("miTorrentProperties.text")); // NOI18N miTorrentProperties.setName("miTorrentProperties"); // NOI18N torrentMenu.add(miTorrentProperties); miTorrentDelete.setIcon(resourceMap.getIcon("miTorrentDelete.icon")); // NOI18N miTorrentDelete.setText(resourceMap.getString("miTorrentDelete.text")); // NOI18N miTorrentDelete.setName("miTorrentDelete"); // NOI18N torrentMenu.add(miTorrentDelete); miTorrentDeleteAll.setIcon(resourceMap.getIcon("miTorrentDeleteAll.icon")); // NOI18N miTorrentDeleteAll.setText(resourceMap.getString("miTorrentDeleteAll.text")); // NOI18N miTorrentDeleteAll.setName("miTorrentDeleteAll"); // NOI18N torrentMenu.add(miTorrentDeleteAll); miTorrentAnnounce.setIcon(resourceMap.getIcon("miTorrentAnnounce.icon")); // NOI18N miTorrentAnnounce.setText(resourceMap.getString("miTorrentAnnounce.text")); // NOI18N miTorrentAnnounce.setName("miTorrentAnnounce"); // NOI18N torrentMenu.add(miTorrentAnnounce); miTorrentMove.setAction(actionMap.get("doMoveTorrent")); // NOI18N miTorrentMove.setIcon(resourceMap.getIcon("miTorrentMove.icon")); // NOI18N miTorrentMove.setText(resourceMap.getString("miTorrentMove.text")); // NOI18N miTorrentMove.setName("miTorrentMove"); // NOI18N torrentMenu.add(miTorrentMove); miTorrentLocation.setIcon(resourceMap.getIcon("miTorrentLocation.icon")); // NOI18N miTorrentLocation.setText(resourceMap.getString("miTorrentLocation.text")); // NOI18N miTorrentLocation.setName("miTorrentLocation"); // NOI18N torrentMenu.add(miTorrentLocation); jSeparator4.setName("jSeparator4"); // NOI18N torrentMenu.add(jSeparator4); miTorrentStartAll.setIcon(resourceMap.getIcon("miTorrentStartAll.icon")); // NOI18N miTorrentStartAll.setText(resourceMap.getString("miTorrentStartAll.text")); // NOI18N miTorrentStartAll.setName("miTorrentStartAll"); // NOI18N torrentMenu.add(miTorrentStartAll); miTorrentStopAll.setIcon(resourceMap.getIcon("miTorrentStopAll.icon")); // NOI18N miTorrentStopAll.setText(resourceMap.getString("miTorrentStopAll.text")); // NOI18N miTorrentStopAll.setName("miTorrentStopAll"); // NOI18N torrentMenu.add(miTorrentStopAll); menuBar.add(torrentMenu); helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N helpMenu.setName("helpMenu"); // NOI18N miHelpAbout.setAction(actionMap.get("showAboutBox")); // NOI18N miHelpAbout.setIcon(resourceMap.getIcon("miHelpAbout.icon")); // NOI18N miHelpAbout.setName("miHelpAbout"); // NOI18N helpMenu.add(miHelpAbout); menuBar.add(helpMenu); statusPanel.setName("statusPanel"); // NOI18N statusPanelSeparator.setName("statusPanelSeparator"); // NOI18N statusMessageLabel.setName("statusMessageLabel"); // NOI18N statusAnimationLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); statusAnimationLabel.setName("statusAnimationLabel"); // NOI18N progressBar.setName("progressBar"); // NOI18N javax.swing.GroupLayout statusPanelLayout = new javax.swing.GroupLayout(statusPanel); statusPanel.setLayout(statusPanelLayout); statusPanelLayout.setHorizontalGroup(statusPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(statusPanelSeparator, javax.swing.GroupLayout.DEFAULT_SIZE, 829, Short.MAX_VALUE) .addGroup(statusPanelLayout.createSequentialGroup().addContainerGap() .addComponent(statusMessageLabel) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 645, Short.MAX_VALUE) .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(statusAnimationLabel).addContainerGap())); statusPanelLayout.setVerticalGroup(statusPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(statusPanelLayout.createSequentialGroup() .addComponent(statusPanelSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(statusMessageLabel).addComponent(statusAnimationLabel) .addComponent(progressBar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(3, 3, 3))); maiToolBar.setRollover(true); maiToolBar.setName("maiToolBar"); // NOI18N btConnect.setAction(actionMap.get("doConnect")); // NOI18N btConnect.setIcon(resourceMap.getIcon("btConnect.icon")); // NOI18N btConnect.setFocusable(false); btConnect.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btConnect.setMinimumSize(new java.awt.Dimension(0, 0)); btConnect.setName("btConnect"); // NOI18N btConnect.setPreferredSize(new java.awt.Dimension(45, 43)); btConnect.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); maiToolBar.add(btConnect); jSeparator5.setName("jSeparator5"); // NOI18N jSeparator5.setSeparatorSize(new java.awt.Dimension(5, 40)); maiToolBar.add(jSeparator5); btAdd.setAction(actionMap.get("doAddTorrentExt")); // NOI18N btAdd.setIcon(resourceMap.getIcon("btAdd.icon")); // NOI18N btAdd.setFocusable(false); btAdd.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btAdd.setName("btAdd"); // NOI18N btAdd.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); maiToolBar.add(btAdd); btAddUrl.setAction(actionMap.get("addTorentURL")); // NOI18N btAddUrl.setIcon(resourceMap.getIcon("btAddUrl.icon")); // NOI18N btAddUrl.setFocusable(false); btAddUrl.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btAddUrl.setName("btAddUrl"); // NOI18N btAddUrl.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); maiToolBar.add(btAddUrl); jSeparator8.setName("jSeparator8"); // NOI18N jSeparator8.setSeparatorSize(new java.awt.Dimension(5, 40)); maiToolBar.add(jSeparator8); btStart.setAction(actionMap.get("doStartTorrent")); // NOI18N btStart.setIcon(resourceMap.getIcon("btStart.icon")); // NOI18N btStart.setFocusable(false); btStart.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btStart.setName("btStart"); // NOI18N btStart.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); maiToolBar.add(btStart); btStop.setAction(actionMap.get("doPauseTorrent")); // NOI18N btStop.setIcon(resourceMap.getIcon("btStop.icon")); // NOI18N btStop.setFocusable(false); btStop.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btStop.setName("btStop"); // NOI18N btStop.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); maiToolBar.add(btStop); btRefresh.setAction(actionMap.get("doRefresh")); // NOI18N btRefresh.setIcon(resourceMap.getIcon("btRefresh.icon")); // NOI18N btRefresh.setFocusable(false); btRefresh.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btRefresh.setName("btRefresh"); // NOI18N btRefresh.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); maiToolBar.add(btRefresh); jSeparator9.setName("jSeparator9"); // NOI18N jSeparator9.setSeparatorSize(new java.awt.Dimension(5, 40)); maiToolBar.add(jSeparator9); btStatistic.setAction(actionMap.get("doStatisticDialog")); // NOI18N btStatistic.setIcon(resourceMap.getIcon("btStatistic.icon")); // NOI18N btStatistic.setFocusable(false); btStatistic.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btStatistic.setName("btStatistic"); // NOI18N btStatistic.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); maiToolBar.add(btStatistic); jSeparator6.setName("jSeparator6"); // NOI18N jSeparator6.setSeparatorSize(new java.awt.Dimension(5, 40)); maiToolBar.add(jSeparator6); btConfigCli.setAction(actionMap.get("doConfigClient")); // NOI18N btConfigCli.setIcon(resourceMap.getIcon("btConfigCli.icon")); // NOI18N btConfigCli.setFocusable(false); btConfigCli.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btConfigCli.setName("btConfigCli"); // NOI18N btConfigCli.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); maiToolBar.add(btConfigCli); jSeparator7.setName("jSeparator7"); // NOI18N jSeparator7.setSeparatorSize(new java.awt.Dimension(5, 40)); maiToolBar.add(jSeparator7); btExit.setAction(actionMap.get("doQuit")); // NOI18N btExit.setIcon(resourceMap.getIcon("btExit.icon")); // NOI18N btExit.setText(resourceMap.getString("btExit.text")); // NOI18N btExit.setFocusable(false); btExit.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btExit.setName("btExit"); // NOI18N btExit.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); maiToolBar.add(btExit); setComponent(mainPanel); setMenuBar(menuBar); setStatusBar(statusPanel); setToolBar(maiToolBar); }
From source file:com.maxl.java.amikodesk.AMiKoDesk.java
private static void createAndShowFullGUI() { // Create and setup window final JFrame jframe = new JFrame(Constants.APP_NAME); jframe.setName(Constants.APP_NAME + ".main"); int min_width = CML_OPT_WIDTH; int min_height = CML_OPT_HEIGHT; jframe.setPreferredSize(new Dimension(min_width, min_height)); jframe.setMinimumSize(new Dimension(min_width, min_height)); Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); int x = (screen.width - min_width) / 2; int y = (screen.height - min_height) / 2; jframe.setBounds(x, y, min_width, min_height); // Set application icon if (Utilities.appCustomization().equals("ywesee")) { ImageIcon img = new ImageIcon(Constants.AMIKO_ICON); jframe.setIconImage(img.getImage()); } else if (Utilities.appCustomization().equals("desitin")) { ImageIcon img = new ImageIcon(Constants.DESITIN_ICON); jframe.setIconImage(img.getImage()); } else if (Utilities.appCustomization().equals("meddrugs")) { ImageIcon img = new ImageIcon(Constants.MEDDRUGS_ICON); jframe.setIconImage(img.getImage()); } else if (Utilities.appCustomization().equals("zurrose")) { ImageIcon img = new ImageIcon(Constants.AMIKO_ICON); jframe.setIconImage(img.getImage()); }/*w w w . j a v a2 s . c om*/ // ------ Setup menubar ------ JMenuBar menu_bar = new JMenuBar(); // menu_bar.add(Box.createHorizontalGlue()); // --> aligns menu items to the right! // -- Menu "Datei" -- JMenu datei_menu = new JMenu("Datei"); if (Utilities.appLanguage().equals("fr")) datei_menu.setText("Fichier"); menu_bar.add(datei_menu); JMenuItem print_item = new JMenuItem("Drucken..."); JMenuItem settings_item = new JMenuItem(m_rb.getString("settings") + "..."); JMenuItem quit_item = new JMenuItem("Beenden"); if (Utilities.appLanguage().equals("fr")) { print_item.setText("Imprimer"); quit_item.setText("Terminer"); } datei_menu.add(print_item); datei_menu.addSeparator(); datei_menu.add(settings_item); datei_menu.addSeparator(); datei_menu.add(quit_item); // -- Menu "Aktualisieren" -- JMenu update_menu = new JMenu("Aktualisieren"); if (Utilities.appLanguage().equals("fr")) update_menu.setText("Mise jour"); menu_bar.add(update_menu); final JMenuItem updatedb_item = new JMenuItem("Aktualisieren via Internet..."); updatedb_item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_A, ActionEvent.CTRL_MASK)); JMenuItem choosedb_item = new JMenuItem("Aktualisieren via Datei..."); update_menu.add(updatedb_item); update_menu.add(choosedb_item); if (Utilities.appLanguage().equals("fr")) { updatedb_item.setText("Tlcharger la banque de donnes..."); updatedb_item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_T, ActionEvent.CTRL_MASK)); choosedb_item.setText("Ajourner la banque de donnes..."); } // -- Menu "Hilfe" -- JMenu hilfe_menu = new JMenu("Hilfe"); if (Utilities.appLanguage().equals("fr")) hilfe_menu.setText("Aide"); menu_bar.add(hilfe_menu); JMenuItem about_item = new JMenuItem("ber " + Constants.APP_NAME + "..."); JMenuItem ywesee_item = new JMenuItem(Constants.APP_NAME + " im Internet"); if (Utilities.appCustomization().equals("meddrugs")) ywesee_item.setText("med-drugs im Internet"); JMenuItem report_item = new JMenuItem("Error Report..."); JMenuItem contact_item = new JMenuItem("Kontakt..."); if (Utilities.appLanguage().equals("fr")) { // Extrawunsch med-drugs if (Utilities.appCustomization().equals("meddrugs")) about_item.setText(Constants.APP_NAME); else about_item.setText("A propos de " + Constants.APP_NAME + "..."); contact_item.setText("Contact..."); if (Utilities.appCustomization().equals("meddrugs")) ywesee_item.setText("med-drugs sur Internet"); else ywesee_item.setText(Constants.APP_NAME + " sur Internet"); report_item.setText("Rapport d'erreur..."); } hilfe_menu.add(about_item); hilfe_menu.add(ywesee_item); hilfe_menu.addSeparator(); hilfe_menu.add(report_item); hilfe_menu.addSeparator(); hilfe_menu.add(contact_item); // Menu "Abonnieren" (only for ywesee) JMenu subscribe_menu = new JMenu("Abonnieren"); if (Utilities.appLanguage().equals("fr")) subscribe_menu.setText("Abonnement"); if (Utilities.appCustomization().equals("ywesee")) { menu_bar.add(subscribe_menu); } jframe.setJMenuBar(menu_bar); // ------ Setup toolbar ------ JToolBar toolBar = new JToolBar("Database"); toolBar.setPreferredSize(new Dimension(jframe.getWidth(), 64)); final JToggleButton selectAipsButton = new JToggleButton( new ImageIcon(Constants.IMG_FOLDER + "aips32x32_bright.png")); final JToggleButton selectFavoritesButton = new JToggleButton( new ImageIcon(Constants.IMG_FOLDER + "favorites32x32_bright.png")); final JToggleButton selectInteractionsButton = new JToggleButton( new ImageIcon(Constants.IMG_FOLDER + "interactions32x32_bright.png")); final JToggleButton selectShoppingCartButton = new JToggleButton( new ImageIcon(Constants.IMG_FOLDER + "shoppingcart32x32_bright.png")); final JToggleButton selectComparisonCartButton = new JToggleButton( new ImageIcon(Constants.IMG_FOLDER + "comparisoncart32x32_bright.png")); final JToggleButton list_of_buttons[] = { selectAipsButton, selectFavoritesButton, selectInteractionsButton, selectShoppingCartButton, selectComparisonCartButton }; if (Utilities.appLanguage().equals("de")) { setupButton(selectAipsButton, "Kompendium", "aips32x32_gray.png", "aips32x32_dark.png"); setupButton(selectFavoritesButton, "Favoriten", "favorites32x32_gray.png", "favorites32x32_dark.png"); setupButton(selectInteractionsButton, "Interaktionen", "interactions32x32_gray.png", "interactions32x32_dark.png"); setupButton(selectShoppingCartButton, "Warenkorb", "shoppingcart32x32_gray.png", "shoppingcart32x32_dark.png"); setupButton(selectComparisonCartButton, "Preisvergleich", "comparisoncart32x32_gray.png", "comparisoncart32x32_dark.png"); } else if (Utilities.appLanguage().equals("fr")) { setupButton(selectAipsButton, "Compendium", "aips32x32_gray.png", "aips32x32_dark.png"); setupButton(selectFavoritesButton, "Favorites", "favorites32x32_gray.png", "favorites32x32_dark.png"); setupButton(selectInteractionsButton, "Interactions", "interactions32x32_gray.png", "interactions32x32_dark.png"); setupButton(selectShoppingCartButton, "Panier", "shoppingcart32x32_gray.png", "shoppingcart32x32_dark.png"); setupButton(selectComparisonCartButton, "Preisvergleich", "comparisoncart32x32_gray.png", "comparisoncart32x32_dark.png"); } // Add to toolbar and set up toolBar.setBackground(m_toolbar_bg); toolBar.add(selectAipsButton); toolBar.addSeparator(); toolBar.add(selectFavoritesButton); toolBar.addSeparator(); toolBar.add(selectInteractionsButton); if (!Utilities.appCustomization().equals("zurrose")) { toolBar.addSeparator(); toolBar.add(selectShoppingCartButton); } if (Utilities.appCustomization().equals("zurrorse")) { toolBar.addSeparator(); toolBar.add(selectComparisonCartButton); } toolBar.setRollover(true); toolBar.setFloatable(false); // Progress indicator (not working...) toolBar.addSeparator(new Dimension(32, 32)); toolBar.add(m_progress_indicator); // ------ Setup settingspage ------ final SettingsPage settingsPage = new SettingsPage(jframe, m_rb); // Attach observer to it settingsPage.addObserver(new Observer() { public void update(Observable o, Object arg) { System.out.println(arg); if (m_shopping_cart != null) { // Refresh some stuff m_shopping_basket.clear(); int index = m_shopping_cart.getCartIndex(); if (index > 0) m_web_panel.saveShoppingCartWithIndex(index); m_web_panel.updateShoppingHtml(); } } }); jframe.addWindowListener(new WindowListener() { // Use WindowAdapter! @Override public void windowOpened(WindowEvent e) { } @Override public void windowClosed(WindowEvent e) { m_web_panel.dispose(); Runtime.getRuntime().exit(0); } @Override public void windowClosing(WindowEvent e) { // Save shopping cart int index = m_shopping_cart.getCartIndex(); if (index > 0 && m_web_panel != null) m_web_panel.saveShoppingCartWithIndex(index); } @Override public void windowIconified(WindowEvent e) { } @Override public void windowDeiconified(WindowEvent e) { } @Override public void windowActivated(WindowEvent e) { } @Override public void windowDeactivated(WindowEvent e) { } }); print_item.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent event) { m_web_panel.print(); } }); settings_item.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent event) { settingsPage.display(); } }); quit_item.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent event) { try { // Save shopping cart int index = m_shopping_cart.getCartIndex(); if (index > 0 && m_web_panel != null) m_web_panel.saveShoppingCartWithIndex(index); // Save settings WindowSaver.saveSettings(); m_web_panel.dispose(); Runtime.getRuntime().exit(0); } catch (Exception e) { System.out.println(e); } } }); subscribe_menu.addMenuListener(new MenuListener() { @Override public void menuSelected(MenuEvent event) { if (Utilities.appCustomization().equals("ywesee")) { if (Desktop.isDesktopSupported()) { try { Desktop.getDesktop().browse(new URI( "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=3UM84Z6WLFKZE")); } catch (IOException e) { // TODO: } catch (URISyntaxException r) { // TODO: } } } } @Override public void menuDeselected(MenuEvent event) { // do nothing } @Override public void menuCanceled(MenuEvent event) { // do nothing } }); contact_item.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent event) { if (Utilities.appCustomization().equals("ywesee")) { if (Desktop.isDesktopSupported()) { try { URI mail_to_uri = URI .create("mailto:zdavatz@ywesee.com?subject=AmiKo%20Desktop%20Feedback"); Desktop.getDesktop().mail(mail_to_uri); } catch (IOException e) { // TODO: } } else { AmiKoDialogs cd = new AmiKoDialogs(Utilities.appLanguage(), Utilities.appCustomization()); cd.ContactDialog(); } } else if (Utilities.appCustomization().equals("desitin")) { if (Desktop.isDesktopSupported()) { try { URI mail_to_uri = URI .create("mailto:info@desitin.ch?subject=AmiKo%20Desktop%20Desitin%20Feedback"); Desktop.getDesktop().mail(mail_to_uri); } catch (IOException e) { // TODO: } } else { AmiKoDialogs cd = new AmiKoDialogs(Utilities.appLanguage(), Utilities.appCustomization()); cd.ContactDialog(); } } else if (Utilities.appCustomization().equals("meddrugs")) { if (Desktop.isDesktopSupported()) { try { URI mail_to_uri = URI.create( "mailto:med-drugs@just-medical.com?subject=med-drugs%20desktop%20Feedback"); Desktop.getDesktop().mail(mail_to_uri); } catch (IOException e) { // TODO: } } else { AmiKoDialogs cd = new AmiKoDialogs(Utilities.appLanguage(), Utilities.appCustomization()); cd.ContactDialog(); } } else if (Utilities.appCustomization().equals("zurrose")) { if (Desktop.isDesktopSupported()) { try { Desktop.getDesktop().browse(new URI("www.zurrose.ch/amiko")); } catch (IOException e) { // TODO: } catch (URISyntaxException r) { // TODO: } } } } }); report_item.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent event) { // Check first m_application_folder otherwise resort to // pre-installed report String report_file = m_application_data_folder + "\\" + Constants.DEFAULT_AMIKO_REPORT_BASE + Utilities.appLanguage() + ".html"; if (!(new File(report_file)).exists()) report_file = System.getProperty("user.dir") + "/dbs/" + Constants.DEFAULT_AMIKO_REPORT_BASE + Utilities.appLanguage() + ".html"; // Open report file in browser if (Desktop.isDesktopSupported()) { try { Desktop.getDesktop().browse(new File(report_file).toURI()); } catch (IOException e) { // TODO: } } } }); ywesee_item.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent event) { if (Utilities.appCustomization().equals("ywesee")) { if (Desktop.isDesktopSupported()) { try { Desktop.getDesktop().browse(new URI("http://www.ywesee.com/AmiKo/Desktop")); } catch (IOException e) { // TODO: } catch (URISyntaxException r) { // TODO: } } } else if (Utilities.appCustomization().equals("desitin")) { if (Desktop.isDesktopSupported()) { try { Desktop.getDesktop().browse( new URI("http://www.desitin.ch/produkte/arzneimittel-kompendium-apps/")); } catch (IOException e) { // TODO: } catch (URISyntaxException r) { // TODO: } } } else if (Utilities.appCustomization().equals("meddrugs")) { if (Desktop.isDesktopSupported()) { try { if (Utilities.appLanguage().equals("de")) Desktop.getDesktop().browse(new URI("http://www.med-drugs.ch")); else if (Utilities.appLanguage().equals("fr")) Desktop.getDesktop() .browse(new URI("http://www.med-drugs.ch/index.cfm?&newlang=fr")); } catch (IOException e) { // TODO: } catch (URISyntaxException r) { // TODO: } } } else if (Utilities.appCustomization().equals("zurrose")) { if (Desktop.isDesktopSupported()) { try { Desktop.getDesktop().browse(new URI("www.zurrose.ch/amiko")); } catch (IOException e) { // TODO: } catch (URISyntaxException r) { // TODO: } } } } }); about_item.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent event) { AmiKoDialogs ad = new AmiKoDialogs(Utilities.appLanguage(), Utilities.appCustomization()); ad.AboutDialog(); } }); // Container final Container container = jframe.getContentPane(); container.setBackground(Color.WHITE); container.setLayout(new BorderLayout()); // ==== Toolbar ===== container.add(toolBar, BorderLayout.NORTH); // ==== Left panel ==== JPanel left_panel = new JPanel(); left_panel.setBackground(Color.WHITE); left_panel.setLayout(new GridBagLayout()); GridBagConstraints gbc = new GridBagConstraints(); gbc.fill = GridBagConstraints.BOTH; gbc.anchor = GridBagConstraints.CENTER; gbc.insets = new Insets(2, 2, 2, 2); // ---- Search field ---- final SearchField searchField = new SearchField("Suche Prparat"); if (Utilities.appLanguage().equals("fr")) searchField.setText("Recherche Specialit"); gbc.gridx = 0; gbc.gridy = 0; gbc.gridwidth = gbc.gridheight = 1; gbc.weightx = gbc.weighty = 0.0; // --> container.add(searchField, gbc); left_panel.add(searchField, gbc); // ---- Buttons ---- // Names String l_title = "Prparat"; String l_author = "Inhaberin"; String l_atccode = "Wirkstoff / ATC Code"; String l_regnr = "Zulassungsnummer"; String l_ingredient = "Wirkstoff"; String l_therapy = "Therapie"; String l_search = "Suche"; if (Utilities.appLanguage().equals("fr")) { l_title = "Spcialit"; l_author = "Titulaire"; l_atccode = "Principe Active / Code ATC"; l_regnr = "Nombre Enregistration"; l_ingredient = "Principe Active"; l_therapy = "Thrapie"; l_search = "Recherche"; } ButtonGroup bg = new ButtonGroup(); JToggleButton but_title = new JToggleButton(l_title); setupToggleButton(but_title); bg.add(but_title); gbc.gridx = 0; gbc.gridy = 1; gbc.gridwidth = gbc.gridheight = 1; gbc.weightx = gbc.weighty = 0.0; // --> container.add(but_title, gbc); left_panel.add(but_title, gbc); JToggleButton but_auth = new JToggleButton(l_author); setupToggleButton(but_auth); bg.add(but_auth); gbc.gridx = 0; gbc.gridy += 1; gbc.gridwidth = gbc.gridheight = 1; gbc.weightx = gbc.weighty = 0.0; // --> container.add(but_auth, gbc); left_panel.add(but_auth, gbc); JToggleButton but_atccode = new JToggleButton(l_atccode); setupToggleButton(but_atccode); bg.add(but_atccode); gbc.gridx = 0; gbc.gridy += 1; gbc.gridwidth = gbc.gridheight = 1; gbc.weightx = gbc.weighty = 0.0; // --> container.add(but_atccode, gbc); left_panel.add(but_atccode, gbc); JToggleButton but_regnr = new JToggleButton(l_regnr); setupToggleButton(but_regnr); bg.add(but_regnr); gbc.gridx = 0; gbc.gridy += 1; gbc.gridwidth = gbc.gridheight = 1; gbc.weightx = gbc.weighty = 0.0; // --> container.add(but_regnr, gbc); left_panel.add(but_regnr, gbc); JToggleButton but_therapy = new JToggleButton(l_therapy); setupToggleButton(but_therapy); bg.add(but_therapy); gbc.gridx = 0; gbc.gridy += 1; gbc.gridwidth = gbc.gridheight = 1; gbc.weightx = gbc.weighty = 0.0; // --> container.add(but_therapy, gbc); left_panel.add(but_therapy, gbc); // ---- Card layout ---- final CardLayout cardl = new CardLayout(); cardl.setHgap(-4); // HACK to make things look better!! final JPanel p_results = new JPanel(cardl); m_list_titles = new ListPanel(); m_list_auths = new ListPanel(); m_list_regnrs = new ListPanel(); m_list_atccodes = new ListPanel(); m_list_ingredients = new ListPanel(); m_list_therapies = new ListPanel(); // Contraints gbc.fill = GridBagConstraints.BOTH; gbc.gridx = 0; gbc.gridy += 1; gbc.gridwidth = 1; gbc.gridheight = 10; gbc.weightx = 1.0; gbc.weighty = 1.0; // p_results.add(m_list_titles, l_title); p_results.add(m_list_auths, l_author); p_results.add(m_list_regnrs, l_regnr); p_results.add(m_list_atccodes, l_atccode); p_results.add(m_list_ingredients, l_ingredient); p_results.add(m_list_therapies, l_therapy); // --> container.add(p_results, gbc); left_panel.add(p_results, gbc); left_panel.setBorder(null); // First card to show cardl.show(p_results, l_title); // ==== Right panel ==== JPanel right_panel = new JPanel(); right_panel.setBackground(Color.WHITE); right_panel.setLayout(new GridBagLayout()); // ---- Section titles ---- m_section_titles = null; if (Utilities.appLanguage().equals("de")) { m_section_titles = new IndexPanel(SectionTitle_DE); } else if (Utilities.appLanguage().equals("fr")) { m_section_titles = new IndexPanel(SectionTitle_FR); } m_section_titles.setMinimumSize(new Dimension(150, 150)); m_section_titles.setMaximumSize(new Dimension(320, 1000)); // ---- Fachinformation ---- m_web_panel = new WebPanel2(); m_web_panel.setMinimumSize(new Dimension(320, 150)); // Add JSplitPane on the RIGHT final int Divider_location = 150; final int Divider_size = 10; final JSplitPane split_pane_right = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, m_section_titles, m_web_panel); split_pane_right.setOneTouchExpandable(true); split_pane_right.setDividerLocation(Divider_location); split_pane_right.setDividerSize(Divider_size); // Add JSplitPane on the LEFT JSplitPane split_pane_left = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, left_panel, split_pane_right /* right_panel */); split_pane_left.setOneTouchExpandable(true); split_pane_left.setDividerLocation(320); // Sets the pane divider location split_pane_left.setDividerSize(Divider_size); container.add(split_pane_left, BorderLayout.CENTER); // Add status bar on the bottom JPanel statusPanel = new JPanel(); statusPanel.setPreferredSize(new Dimension(jframe.getWidth(), 16)); statusPanel.setLayout(new BoxLayout(statusPanel, BoxLayout.X_AXIS)); container.add(statusPanel, BorderLayout.SOUTH); final JLabel m_status_label = new JLabel(""); m_status_label.setHorizontalAlignment(SwingConstants.LEFT); statusPanel.add(m_status_label); // Add mouse listener searchField.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { searchField.setText(""); } }); final String final_title = l_title; final String final_author = l_author; final String final_atccode = l_atccode; final String final_regnr = l_regnr; final String final_therapy = l_therapy; final String final_search = l_search; // Internal class that implements switching between buttons final class Toggle { public void toggleButton(JToggleButton jbn) { for (int i = 0; i < list_of_buttons.length; ++i) { if (jbn == list_of_buttons[i]) list_of_buttons[i].setSelected(true); else list_of_buttons[i].setSelected(false); } } } ; // ------ Add toolbar action listeners ------ selectAipsButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent event) { new Toggle().toggleButton(selectAipsButton); // Set state 'aips' if (!m_curr_uistate.getUseMode().equals("aips")) { m_curr_uistate.setUseMode("aips"); // Show middle pane split_pane_right.setDividerSize(Divider_size); split_pane_right.setDividerLocation(Divider_location); m_section_titles.setVisible(true); // SwingUtilities.invokeLater(new Runnable() { @Override public void run() { m_start_time = System.currentTimeMillis(); m_query_str = searchField.getText(); int num_hits = retrieveAipsSearchResults(false); m_status_label.setText(med_search.size() + " Suchresultate in " + (System.currentTimeMillis() - m_start_time) / 1000.0f + " Sek."); // if (med_index < 0 && prev_med_index >= 0) med_index = prev_med_index; m_web_panel.updateText(); if (num_hits == 0) { m_web_panel.emptyPage(); } } }); } } }); selectFavoritesButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent event) { new Toggle().toggleButton(selectFavoritesButton); // Set state 'favorites' if (!m_curr_uistate.getUseMode().equals("favorites")) { m_curr_uistate.setUseMode("favorites"); // Show middle pane split_pane_right.setDividerSize(Divider_size); split_pane_right.setDividerLocation(Divider_location); m_section_titles.setVisible(true); // SwingUtilities.invokeLater(new Runnable() { @Override public void run() { m_start_time = System.currentTimeMillis(); // m_query_str = searchField.getText(); // Clear the search container med_search.clear(); for (String regnr : favorite_meds_set) { List<Medication> meds = m_sqldb.searchRegNr(regnr); if (!meds.isEmpty()) { // Add med database ID med_search.add(meds.get(0)); } } // Sort list of meds Collections.sort(med_search, new Comparator<Medication>() { @Override public int compare(final Medication m1, final Medication m2) { return m1.getTitle().compareTo(m2.getTitle()); } }); sTitle(); cardl.show(p_results, final_title); m_status_label.setText(med_search.size() + " Suchresultate in " + (System.currentTimeMillis() - m_start_time) / 1000.0f + " Sek."); } }); } } }); selectInteractionsButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent event) { new Toggle().toggleButton(selectInteractionsButton); // Set state 'interactions' if (!m_curr_uistate.getUseMode().equals("interactions")) { m_curr_uistate.setUseMode("interactions"); // Show middle pane split_pane_right.setDividerSize(Divider_size); split_pane_right.setDividerLocation(Divider_location); m_section_titles.setVisible(true); // SwingUtilities.invokeLater(new Runnable() { @Override public void run() { m_query_str = searchField.getText(); retrieveAipsSearchResults(false); // Switch to interaction mode m_web_panel.updateInteractionsCart(); m_web_panel.repaint(); m_web_panel.validate(); } }); } } }); selectShoppingCartButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent event) { String email_adr = m_prefs.get("emailadresse", ""); if (email_adr != null && email_adr.length() > 2) // Two chars is the minimum lenght for an email address m_preferences_ok = true; if (m_preferences_ok) { m_preferences_ok = false; // Check always new Toggle().toggleButton(selectShoppingCartButton); // Set state 'shopping' if (!m_curr_uistate.getUseMode().equals("shopping")) { m_curr_uistate.setUseMode("shopping"); // Show middle pane split_pane_right.setDividerSize(Divider_size); split_pane_right.setDividerLocation(Divider_location); m_section_titles.setVisible(true); // Set right panel title m_web_panel.setTitle(m_rb.getString("shoppingCart")); // Switch to shopping cart int index = 1; if (m_shopping_cart != null) { index = m_shopping_cart.getCartIndex(); m_web_panel.loadShoppingCartWithIndex(index); // m_shopping_cart.printShoppingBasket(); } // m_web_panel.updateShoppingHtml(); m_web_panel.updateListOfPackages(); if (m_first_pass == true) { m_first_pass = false; if (Utilities.appCustomization().equals("ywesee")) med_search = m_sqldb.searchAuth("ibsa"); else if (Utilities.appCustomization().equals("desitin")) med_search = m_sqldb.searchAuth("desitin"); sAuth(); cardl.show(p_results, final_author); } } } else { selectShoppingCartButton.setSelected(false); settingsPage.display(); } } }); selectComparisonCartButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent event) { new Toggle().toggleButton(selectComparisonCartButton); // Set state 'comparison' if (!m_curr_uistate.getUseMode().equals("comparison")) { m_curr_uistate.setUseMode("comparison"); // Hide middle pane m_section_titles.setVisible(false); split_pane_right.setDividerLocation(0); split_pane_right.setDividerSize(0); // SwingUtilities.invokeLater(new Runnable() { @Override public void run() { m_start_time = System.currentTimeMillis(); // Set right panel title m_web_panel.setTitle(getTitle("priceComp")); if (med_index >= 0) { if (med_id != null && med_index < med_id.size()) { Medication m = m_sqldb.getMediWithId(med_id.get(med_index)); String atc_code = m.getAtcCode(); if (atc_code != null) { String atc = atc_code.split(";")[0]; m_web_panel.fillComparisonBasket(atc); m_web_panel.updateComparisonCartHtml(); // Update pane on the left retrieveAipsSearchResults(false); } } } m_status_label.setText(rose_search.size() + " Suchresultate in " + (System.currentTimeMillis() - m_start_time) / 1000.0f + " Sek."); } }); } } }); // ------ Add keylistener to text field (type as you go feature) ------ searchField.addKeyListener(new KeyAdapter() { @Override public void keyTyped(KeyEvent e) { // keyReleased(KeyEvent e) // invokeLater potentially in the wrong place... more testing // required SwingUtilities.invokeLater(new Runnable() { @Override public void run() { if (m_curr_uistate.isLoadCart()) m_curr_uistate.restoreUseMode(); m_start_time = System.currentTimeMillis(); m_query_str = searchField.getText(); // Queries for SQLite DB if (!m_query_str.isEmpty()) { if (m_query_type == 0) { if (m_curr_uistate.isComparisonMode()) { rose_search = m_rosedb.searchTitle(m_query_str); } else { med_search = m_sqldb.searchTitle(m_query_str); if (m_curr_uistate.databaseUsed().equals("favorites")) retrieveFavorites(); } sTitle(); cardl.show(p_results, final_title); } else if (m_query_type == 1) { if (m_curr_uistate.isComparisonMode()) { rose_search = m_rosedb.searchSupplier(m_query_str); } else { med_search = m_sqldb.searchAuth(m_query_str); if (m_curr_uistate.databaseUsed().equals("favorites")) retrieveFavorites(); } sAuth(); cardl.show(p_results, final_author); } else if (m_query_type == 2) { if (m_curr_uistate.isComparisonMode()) { rose_search = m_rosedb.searchATC(m_query_str); } else { med_search = m_sqldb.searchATC(m_query_str); if (m_curr_uistate.databaseUsed().equals("favorites")) retrieveFavorites(); } sATC(); cardl.show(p_results, final_atccode); } else if (m_query_type == 3) { if (m_curr_uistate.isComparisonMode()) { rose_search = m_rosedb.searchEan(m_query_str); } else { med_search = m_sqldb.searchRegNr(m_query_str); if (m_curr_uistate.databaseUsed().equals("favorites")) retrieveFavorites(); } sRegNr(); cardl.show(p_results, final_regnr); } else if (m_query_type == 4) { if (m_curr_uistate.isComparisonMode()) { rose_search = m_rosedb.searchTherapy(m_query_str); } else { med_search = m_sqldb.searchApplication(m_query_str); if (m_curr_uistate.databaseUsed().equals("favorites")) retrieveFavorites(); } sTherapy(); cardl.show(p_results, final_therapy); } else { // do nothing } int num_hits = 0; if (m_curr_uistate.isComparisonMode()) num_hits = rose_search.size(); else num_hits = med_search.size(); m_status_label.setText(num_hits + " Suchresultate in " + (System.currentTimeMillis() - m_start_time) / 1000.0f + " Sek."); } } }); } }); // Add actionlisteners but_title.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent ae) { if (m_curr_uistate.isLoadCart()) m_curr_uistate.restoreUseMode(); searchField.setText(final_search + " " + final_title); m_curr_uistate.setQueryType(m_query_type = 0); sTitle(); cardl.show(p_results, final_title); } }); but_auth.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent ae) { if (m_curr_uistate.isLoadCart()) m_curr_uistate.restoreUseMode(); searchField.setText(final_search + " " + final_author); m_curr_uistate.setQueryType(m_query_type = 1); sAuth(); cardl.show(p_results, final_author); } }); but_atccode.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent ae) { if (m_curr_uistate.isLoadCart()) m_curr_uistate.restoreUseMode(); searchField.setText(final_search + " " + final_atccode); m_curr_uistate.setQueryType(m_query_type = 2); sATC(); cardl.show(p_results, final_atccode); } }); but_regnr.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent ae) { if (m_curr_uistate.isLoadCart()) m_curr_uistate.restoreUseMode(); searchField.setText(final_search + " " + final_regnr); m_curr_uistate.setQueryType(m_query_type = 3); sRegNr(); cardl.show(p_results, final_regnr); } }); but_therapy.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent ae) { if (m_curr_uistate.isLoadCart()) m_curr_uistate.restoreUseMode(); searchField.setText(final_search + " " + final_therapy); m_curr_uistate.setQueryType(m_query_type = 4); sTherapy(); cardl.show(p_results, final_therapy); } }); // Display window jframe.pack(); // jframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); jframe.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); // jframe.setAlwaysOnTop(true); jframe.setVisible(true); // Check if user has selected an alternative database /* * NOTE: 21/11/2013: This solution is put on ice. Favored is a solution * where the database selected by the user is saved in a default folder * (see variable "m_application_data_folder") */ /* * try { WindowSaver.loadSettings(jframe); String database_path = * WindowSaver.getDbPath(); if (database_path!=null) * m_sqldb.loadDBFromPath(database_path); } catch(IOException e) { * e.printStackTrace(); } */ // Load AIPS database selectAipsButton.setSelected(true); selectFavoritesButton.setSelected(false); m_curr_uistate.setUseMode("aips"); med_search = m_sqldb.searchTitle(""); sTitle(); // Used instead of sTitle (which is slow) cardl.show(p_results, final_title); // Add menu item listeners updatedb_item.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent event) { if (m_mutex_update == false) { m_mutex_update = true; String db_file = m_maindb_update.doIt(jframe, Utilities.appLanguage(), Utilities.appCustomization(), m_application_data_folder, m_full_db_update); // ... and update time if (m_full_db_update == true) { DateTime dT = new DateTime(); m_prefs.put("updateTime", dT.now().toString()); } // if (!db_file.isEmpty()) { // Save db path (can't hurt) WindowSaver.setDbPath(db_file); } } } }); choosedb_item.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent event) { String db_file = m_maindb_update.chooseFromFile(jframe, Utilities.appLanguage(), Utilities.appCustomization(), m_application_data_folder); // ... and update time DateTime dT = new DateTime(); m_prefs.put("updateTime", dT.now().toString()); // if (!db_file.isEmpty()) { // Save db path (can't hurt) WindowSaver.setDbPath(db_file); } } }); /** * Observers */ // Attach observer to 'm_update' m_maindb_update.addObserver(new Observer() { @Override public void update(Observable o, Object arg) { System.out.println(arg); // Reset flag m_full_db_update = true; m_mutex_update = false; // Refresh some stuff after update loadAuthors(); m_emailer.loadMap(); settingsPage.load_gln_codes(); if (m_shopping_cart != null) { m_shopping_cart.load_conditions(); m_shopping_cart.load_glns(); } // Empty shopping basket if (m_curr_uistate.isShoppingMode()) { m_shopping_basket.clear(); int index = m_shopping_cart.getCartIndex(); if (index > 0) m_web_panel.saveShoppingCartWithIndex(index); m_web_panel.updateShoppingHtml(); } if (m_curr_uistate.isComparisonMode()) m_web_panel.setTitle(getTitle("priceComp")); } }); // Attach observer to 'm_emailer' m_emailer.addObserver(new Observer() { @Override public void update(Observable o, Object arg) { System.out.println(arg); // Empty shopping basket m_shopping_basket.clear(); int index = m_shopping_cart.getCartIndex(); if (index > 0) m_web_panel.saveShoppingCartWithIndex(index); m_web_panel.updateShoppingHtml(); } }); // Attach observer to "m_comparison_cart" m_comparison_cart.addObserver(new Observer() { @Override public void update(Observable o, Object arg) { System.out.println(arg); m_web_panel.setTitle(getTitle("priceComp")); m_comparison_cart.clearUploadList(); m_web_panel.updateComparisonCartHtml(); new AmiKoDialogs(Utilities.appLanguage(), Utilities.appCustomization()).UploadDialog((String) arg); } }); // If command line options are provided start app with a particular title or eancode if (commandLineOptionsProvided()) { if (!CML_OPT_TITLE.isEmpty()) startAppWithTitle(but_title); else if (!CML_OPT_EANCODE.isEmpty()) startAppWithEancode(but_regnr); else if (!CML_OPT_REGNR.isEmpty()) startAppWithRegnr(but_regnr); } // Start timer Timer global_timer = new Timer(); // Time checks all 2 minutes (120'000 milliseconds) global_timer.scheduleAtFixedRate(new TimerTask() { @Override public void run() { checkIfUpdateRequired(updatedb_item); } }, 2 * 60 * 1000, 2 * 60 * 1000); }
From source file:atlas.kingj.roi.FrmMain.java
/** * Initialize the contents of the frame. *//*from w w w . j ava2 s.c om*/ private void initialize() { frmTitanRoiCalculator = new JFrame(); frmTitanRoiCalculator.addWindowListener(new FrmTitanRoiCalculatorWindowListener()); frmTitanRoiCalculator.setResizable(false); frmTitanRoiCalculator.setTitle("Titan Production Calculator"); try { frmTitanRoiCalculator.setIconImage(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/logo.png")));//Toolkit.getDefaultToolkit().getImage(FrmMain.class.getResource("/atlas/logo.png"))); } catch (NullPointerException e) { System.out.println("Image load error"); } catch (IOException e1) { e1.printStackTrace(); } frmTitanRoiCalculator.setBounds(100, 100, 800, 600); frmTitanRoiCalculator.setLocationRelativeTo(null); frmTitanRoiCalculator.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);//JFrame.EXIT_ON_CLOSE); JMenuBar menuBar = new JMenuBar(); frmTitanRoiCalculator.setJMenuBar(menuBar); JMenu mnFile = new JMenu("File"); mnFile.setMnemonic('F'); menuBar.add(mnFile); mntmOpen = new JMenuItem("Open"); mntmOpen.setMnemonic('O'); mntmOpen.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, InputEvent.CTRL_MASK)); mntmOpen.addActionListener(new MntmOpenActionListener()); mnFile.add(mntmOpen); mntmSave = new JMenuItem("Save"); mntmSave.setMnemonic('S'); mntmSave.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, InputEvent.CTRL_MASK)); mntmSave.addActionListener(new MntmSaveActionListener()); mnFile.add(mntmSave); JMenuItem mntmExit = new JMenuItem("Exit"); mntmExit.setMnemonic('X'); mntmExit.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { SaveAndClose(); } }); mntmSaveAll = new JMenuItem("Save All"); mntmSaveAll.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { SaveAll(); } }); mntmOpenAll = new JMenuItem("Open All"); mntmOpenAll.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { OpenAll(); } }); mnFile.add(mntmOpenAll); mntmSaveAll.setMnemonic('V'); mnFile.add(mntmSaveAll); mnExport = new JMenu("Export"); mnFile.add(mnExport); mntmSpreadsheet = new JMenuItem("Spreadsheet"); mntmSpreadsheet.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { ResetStatusLabel(); fc = new OpenSaveFileChooser(); fc.setFileFilter(new XLSfilter()); fc.type = 3; int returnVal = fc.showSaveDialog(frmTitanRoiCalculator); if (returnVal == JFileChooser.APPROVE_OPTION) { File file = fc.getSelectedFile(); String path = file.getAbsolutePath(); String extension = ".xls"; if (!path.endsWith(extension)) { file = new File(path + extension); } StatusDialog a = new StatusDialog("Generating spreadsheet..."); SaveFileWorker worker = new SaveFileWorker(file, a, false); worker.execute(); a.setLocationRelativeTo(frmTitanRoiCalculator); a.setVisible(true); if (FileSaveError) ShowMessage("File save error"); else if (FileSaveWarning) ShowMessage("File saved, but possible errors."); else ShowMessageSuccess("File saved."); } } }); mnExport.add(mntmSpreadsheet); mnFile.add(mntmExit); JMenu mnView = new JMenu("View"); mnView.setMnemonic('V'); menuBar.add(mnView); RoiData = new ROIData(); mntmUnitConverter = new JMenuItem("Unit Converter"); mntmUnitConverter.setMnemonic('C'); mntmUnitConverter.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_U, InputEvent.CTRL_MASK)); mntmUnitConverter.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { new UnitConverter(); } }); mnView.add(mntmUnitConverter); mnSettings = new JMenu("Settings"); mnSettings.setMnemonic('E'); menuBar.add(mnSettings); mnUnits = new JMenu("Units"); mnUnits.setMnemonic('U'); mnSettings.add(mnUnits); rdbtnmntmImperial = new JRadioButtonMenuItem("Imperial"); rdbtnmntmImperial.setMnemonic('I'); rdbtnmntmImperial.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_I, InputEvent.CTRL_MASK)); rdbtnmntmImperial.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { if (metric) { // Change units from metric to imperial ChangeUnits(); } } }); mnUnits.add(rdbtnmntmImperial); rdbtnmntmMetric = new JRadioButtonMenuItem("Metric"); rdbtnmntmMetric.setMnemonic('M'); rdbtnmntmMetric.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_M, InputEvent.CTRL_MASK)); rdbtnmntmMetric.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (!metric) { // Change units from imperial to metric ChangeUnits(); } } }); rdbtnmntmMetric.setSelected(true); mnUnits.add(rdbtnmntmMetric); btnsUnits.add(rdbtnmntmMetric); btnsUnits.add(rdbtnmntmImperial); JMenuItem mntmOptions_1 = new JMenuItem("Options"); mntmOptions_1.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_T, InputEvent.CTRL_MASK)); mntmOptions_1.setMnemonic('O'); mntmOptions_1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { Machine machine = null; if (listMachines.getSelectedIndex() > -1) machine = (Machine) listMachines.getSelectedValue(); OptionDialog options = new OptionDialog(environment, machine); options.setLocationRelativeTo(frmTitanRoiCalculator); options.addWindowListener(new WindowAdapter() { @Override public void windowClosed(WindowEvent e) { UpdateAnalysis(); } }); options.setVisible(true); } }); mnTimings = new JMenu("Timings"); mnSettings.add(mnTimings); mntmSaveToFile = new JMenuItem("Save to File"); mntmSaveToFile.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { OperatorTimings times = environment.timings; fc = new OpenSaveFileChooser(); fc.setFileFilter(new OBJfilter(3)); fc.type = 1; int returnVal = fc.showSaveDialog(frmTitanRoiCalculator); if (returnVal == JFileChooser.APPROVE_OPTION) { File file = fc.getSelectedFile(); String path = file.getAbsolutePath(); String extension = ".ser"; if (!path.endsWith(extension)) { file = new File(path + extension); } try { FileOutputStream fout = new FileOutputStream(file); ObjectOutputStream oos = new ObjectOutputStream(fout); oos.writeObject(times); oos.close(); ShowMessageSuccess("File saved."); } catch (Exception e1) { JOptionPane.showMessageDialog(frmTitanRoiCalculator, "Error writing file.", "Error", JOptionPane.ERROR_MESSAGE); } } } }); mnTimings.add(mntmSaveToFile); mntmLoadFromFile = new JMenuItem("Load from File"); mntmLoadFromFile.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { fc = new OpenSaveFileChooser(); fc.setFileFilter(new OBJfilter(3)); fc.type = 1; int returnVal = fc.showOpenDialog(frmTitanRoiCalculator); if (returnVal == JFileChooser.APPROVE_OPTION) { File file = fc.getSelectedFile(); try { FileInputStream fin = new FileInputStream(file); ObjectInputStream ois = new ObjectInputStream(fin); environment.timings = (OperatorTimings) ois.readObject(); ois.close(); ShowMessageSuccess("File loaded."); } catch (Exception e1) { ShowMessage("File error."); } } } }); mnTimings.add(mntmLoadFromFile); mnSettings.add(mntmOptions_1); JMenu mnHelp = new JMenu("Help"); mnHelp.setMnemonic('H'); menuBar.add(mnHelp); JMenuItem mntmInstructions = new JMenuItem("Instructions"); mntmInstructions.setMnemonic('I'); mntmInstructions.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { InstructDialog instructions = new InstructDialog(); instructions.setLocationRelativeTo(frmTitanRoiCalculator); instructions.setVisible(true); } }); mnHelp.add(mntmInstructions); JMenuItem mntmAbout = new JMenuItem("About"); mntmAbout.setMnemonic('A'); mntmAbout.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { AboutDialog about = new AboutDialog(); about.setLocationRelativeTo(frmTitanRoiCalculator); about.setVisible(true); } }); mnHelp.add(mntmAbout); tabbedPane = new JTabbedPane(JTabbedPane.TOP); tabbedPane.addChangeListener(TabChangeListener); frmTitanRoiCalculator.getContentPane().add(tabbedPane, BorderLayout.CENTER); pnlMachine = new JPanel(); tabbedPane.addTab("Machine Selection", null, pnlMachine, "Add and configure machine setups"); tabbedPane.setEnabledAt(0, true); pnlMachine.setLayout(null); grpMachines = new JPanel(); grpMachines.setFont(new Font("Tahoma", Font.PLAIN, 11)); grpMachines.setBounds(20, 72, 182, 256); grpMachines.setBorder( new TitledBorder(null, "Machine Type", TitledBorder.LEADING, TitledBorder.TOP, null, null)); pnlMachine.add(grpMachines); grpMachines.setLayout(null); try { rdbtnER610 = new JRadioButton( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/er610.png")))); rdbtnER610.setDisabledIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/er610_dis.png")))); rdbtnER610.setDisabledSelectedIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/er610_dis.png")))); rdbtnER610.setEnabled(false); rdbtnER610.setToolTipText("Titan ER610"); } catch (NullPointerException e1) { System.out.println("Image load error"); } catch (IOException e1) { e1.printStackTrace(); } rdbtnER610.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { rdbtnClick("ER610"); UpdateMachine(); listMachines.repaint(); } }); rdbtnER610.setSelected(true); rdbtnER610.setBounds(13, 24, 155, 40); try { rdbtnER610.setPressedIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/er610_down.png")))); rdbtnER610.setRolloverEnabled(true); rdbtnER610.setRolloverIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/er610_over.png")))); rdbtnER610.setSelectedIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/er610_select.png")))); } catch (NullPointerException e11) { System.out.println("Image load error"); } catch (IOException e1) { e1.printStackTrace(); } grpMachines.add(rdbtnER610); try { rdbtnSR9DS = new JRadioButton( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/sr9ds.png")))); rdbtnSR9DS.setDisabledIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/sr9ds_dis.png")))); rdbtnSR9DS.setEnabled(false); rdbtnSR9DS.setToolTipText("Titan SR9-DS"); } catch (NullPointerException e11) { System.out.println("Image load error"); } catch (IOException e1) { e1.printStackTrace(); } rdbtnSR9DS.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { rdbtnClick("SR9DS"); UpdateMachine(); listMachines.repaint(); } }); try { rdbtnSR9DS.setPressedIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/sr9ds_down.png")))); rdbtnSR9DS.setRolloverEnabled(true); rdbtnSR9DS.setRolloverIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/sr9ds_over.png")))); rdbtnSR9DS.setSelectedIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/sr9ds_select.png")))); rdbtnSR9DS.setBounds(13, 68, 155, 40); grpMachines.add(rdbtnSR9DS); rdbtnSR9DT = new JRadioButton( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/sr9dt.png")))); rdbtnSR9DT.setDisabledIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/sr9dt_dis.png")))); rdbtnSR9DT.setEnabled(false); rdbtnSR9DT.setToolTipText("Titan SR9-DT"); } catch (NullPointerException e11) { System.out.println("Image load error"); } catch (IOException e1) { e1.printStackTrace(); } rdbtnSR9DT.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { rdbtnClick("SR9DT"); UpdateMachine(); listMachines.repaint(); } }); rdbtnSR9DT.setBounds(13, 112, 155, 40); try { rdbtnSR9DT.setPressedIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/sr9dt_down.png")))); rdbtnSR9DT.setRolloverEnabled(true); rdbtnSR9DT.setRolloverIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/sr9dt_over.png")))); rdbtnSR9DT.setSelectedIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/sr9dt_select.png")))); } catch (NullPointerException e11) { System.out.println("Image load error"); } catch (IOException e1) { e1.printStackTrace(); } grpMachines.add(rdbtnSR9DT); try { rdbtnSR800 = new JRadioButton( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/sr800.png")))); rdbtnSR800.setDisabledIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/sr800_dis.png")))); rdbtnSR800.setEnabled(false); rdbtnSR800.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { rdbtnClick("SR800"); UpdateMachine(); listMachines.repaint(); } }); rdbtnSR800.setPressedIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/sr800_down.png")))); rdbtnSR800.setRolloverEnabled(true); rdbtnSR800.setRolloverIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/sr800_over.png")))); rdbtnSR800.setSelectedIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/sr800_select.png")))); } catch (IOException e2) { e2.printStackTrace(); } rdbtnSR800.setToolTipText("Titan SR800"); rdbtnSR800.setRolloverEnabled(true); rdbtnSR800.setBounds(13, 156, 155, 40); grpMachines.add(rdbtnSR800); try { rdbtnCustom = new JRadioButton( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/custom.png")))); rdbtnCustom.setDisabledIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/custom_dis.png")))); rdbtnCustom.setEnabled(false); rdbtnCustom.setPressedIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/custom_down.png")))); rdbtnCustom.setRolloverEnabled(true); rdbtnCustom.setRolloverIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/custom_over.png")))); rdbtnCustom.setSelectedIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/custom_select.png")))); } catch (IOException e2) { e2.printStackTrace(); } rdbtnCustom.setToolTipText("Custom Machine"); rdbtnCustom.setRolloverEnabled(true); rdbtnCustom.setBounds(13, 200, 155, 40); grpMachines.add(rdbtnCustom); rdbtnCustom.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { rdbtnClick("Custom"); UpdateMachine(); ResetStatusLabel(); listMachines.repaint(); } }); rdbtnsMachines.add(rdbtnER610); rdbtnsMachines.add(rdbtnSR9DS); rdbtnsMachines.add(rdbtnSR9DT); rdbtnsMachines.add(rdbtnSR800); rdbtnsMachines.add(rdbtnCustom); grpVariants = new JPanel(); grpVariants.setFont(new Font("Tahoma", Font.PLAIN, 11)); grpVariants.setBounds(20, 339, 482, 112); grpVariants .setBorder(new TitledBorder(null, "Variants", TitledBorder.LEADING, TitledBorder.TOP, null, null)); pnlMachine.add(grpVariants); grpVariants.setLayout(null); cmbCorepos = new JComboBox(); cmbCorepos.setFont(new Font("Tahoma", Font.PLAIN, 11)); cmbCorepos.setToolTipText("Set the core positioning system"); cmbCorepos.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (formReady) UpdateMachine(); } }); cmbCorepos.setEnabled(false); cmbCorepos.setBounds(104, 70, 122, 20); grpVariants.add(cmbCorepos); cmbCorepos.setModel(new DefaultComboBoxModel(new String[] { "Manual", "Laser" })); lblCorePositioning = new JLabel("Core Positioning:"); lblCorePositioning.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblCorePositioning.setToolTipText("Set the core positioning system"); lblCorePositioning.setEnabled(false); lblCorePositioning.setHorizontalAlignment(SwingConstants.RIGHT); lblCorePositioning.setBounds(12, 73, 88, 14); grpVariants.add(lblCorePositioning); lblKnifeControl = new JLabel("Knife Control:"); lblKnifeControl.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblKnifeControl.setToolTipText("Set the type of knife positioning system"); lblKnifeControl.setEnabled(false); lblKnifeControl.setHorizontalAlignment(SwingConstants.RIGHT); lblKnifeControl.setBounds(22, 48, 78, 14); grpVariants.add(lblKnifeControl); cmbKnives = new JComboBox(); cmbKnives.setFont(new Font("Tahoma", Font.PLAIN, 11)); cmbKnives.setToolTipText("Set the type of knife positioning system"); cmbKnives.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (formReady) UpdateMachine(); } }); cmbKnives.setEnabled(false); cmbKnives.setBounds(104, 45, 122, 20); grpVariants.add(cmbKnives); cmbKnives.setModel(new DefaultComboBoxModel(new String[] { "Manual", "Auto" })); cmbUnloader = new JComboBox(); cmbUnloader.setFont(new Font("Tahoma", Font.PLAIN, 11)); cmbUnloader.setToolTipText("Set the unloader type"); cmbUnloader.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (formReady) UpdateMachine(); } }); cmbUnloader.setEnabled(false); cmbUnloader.setBounds(350, 20, 122, 20); grpVariants.add(cmbUnloader); cmbUnloader.setModel(new DefaultComboBoxModel(new String[] { "Manual", "Pneumatic", "Electric" })); lblUnloader = new JLabel("Unloader:"); lblUnloader.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblUnloader.setToolTipText("Set the unloader type"); lblUnloader.setEnabled(false); lblUnloader.setHorizontalAlignment(SwingConstants.RIGHT); lblUnloader.setBounds(259, 23, 87, 14); grpVariants.add(lblUnloader); cmbSpeed = new JComboBox(); cmbSpeed.setFont(new Font("Tahoma", Font.PLAIN, 11)); cmbSpeed.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { if (formReady) UpdateMachine(); } }); cmbSpeed.setEnabled(false); cmbSpeed.setToolTipText("Machine top speed in metres/min"); cmbSpeed.setBounds(104, 20, 122, 20); grpVariants.add(cmbSpeed); cmbSpeed.setModel(new DefaultComboBoxModel(new String[] { "450", "550" })); lblSpeed = new JLabel("Speed:"); lblSpeed.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblSpeed.setToolTipText("Machine top speed in metres/min"); lblSpeed.setEnabled(false); lblSpeed.setHorizontalAlignment(SwingConstants.RIGHT); lblSpeed.setBounds(54, 23, 46, 14); grpVariants.add(lblSpeed); cmbUnwindDrive = new JComboBox(); cmbUnwindDrive.setFont(new Font("Tahoma", Font.PLAIN, 11)); cmbUnwindDrive.setToolTipText("Unwind drive type"); cmbUnwindDrive.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (formReady) UpdateMachine(); } }); cmbUnwindDrive.setEnabled(false); cmbUnwindDrive.setBounds(350, 45, 122, 20); grpVariants.add(cmbUnwindDrive); cmbUnwindDrive.setModel(new DefaultComboBoxModel(new String[] { "Single", "Double" })); lblUnwindDrive = new JLabel("Unwind Drive:"); lblUnwindDrive.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblUnwindDrive.setToolTipText("Unwind drive type"); lblUnwindDrive.setEnabled(false); lblUnwindDrive.setHorizontalAlignment(SwingConstants.RIGHT); lblUnwindDrive.setBounds(259, 48, 87, 14); grpVariants.add(lblUnwindDrive); lblRewindControlLoop = new JLabel("Rewind Control Loop:"); lblRewindControlLoop.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblRewindControlLoop.setToolTipText("Rewind control loop type"); lblRewindControlLoop.setEnabled(false); lblRewindControlLoop.setHorizontalAlignment(SwingConstants.RIGHT); lblRewindControlLoop.setBounds(224, 73, 122, 14); grpVariants.add(lblRewindControlLoop); cmbRewindCtrl = new JComboBox(); cmbRewindCtrl.setFont(new Font("Tahoma", Font.PLAIN, 11)); cmbRewindCtrl.setToolTipText("Rewind control loop type"); cmbRewindCtrl.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (formReady) UpdateMachine(); } }); cmbRewindCtrl.setEnabled(false); cmbRewindCtrl.setBounds(350, 70, 122, 20); grpVariants.add(cmbRewindCtrl); cmbRewindCtrl.setModel(new DefaultComboBoxModel(new String[] { "Open", "Closed" })); listModel = new DefaultListModel(); jobModel = new DefaultListModel(); scheduleModel = new DefaultListModel(); listModel.removeAllElements(); /*listMachines.setModel(new AbstractListModel() { String[] values = new String[] {"ER610: My test 1", "SR9-DS: this is another test", "SR9-DT: third test", "ER610: test 2", "ER610: bla bla", "SR9-DS: this is another test", "SR9-DT: hello", "SR9-DT: third test"}; public int getSize() { return values.length; } public Object getElementAt(int index) { return values[index]; } });*/ JLabel lblMachines = new JLabel("Machines"); lblMachines.setFont(new Font("Tahoma", Font.BOLD, 12)); lblMachines.setBounds(522, 19, 85, 14); pnlMachine.add(lblMachines); btnMachDelete = new JButton(""); try { btnMachDelete .setIcon(new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/delete.png")))); btnMachDelete.setRolloverEnabled(true); btnMachDelete.setRolloverIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/delete_over.png")))); btnMachDelete.setDisabledIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/delete_dis.png")))); } catch (NullPointerException e11) { System.out.println("Image load error"); } catch (IOException e1) { e1.printStackTrace(); } btnMachDelete.setToolTipText("Delete machine"); btnMachDelete.setEnabled(false); btnMachDelete.addActionListener(new DeleteButtonListener()); btnMachDelete.setBounds(651, 460, 36, 36); pnlMachine.add(btnMachDelete); btnMachUp = new JButton(""); btnMachUp.setToolTipText("Move machine up"); btnMachUp.setEnabled(false); try { btnMachUp.setIcon(new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/up.png")))); btnMachUp.setRolloverEnabled(true); btnMachUp.setRolloverIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/up_over.png")))); btnMachUp.setDisabledIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/up_dis.png")))); } catch (NullPointerException e11) { System.out.println("Image load error"); } catch (IOException e1) { e1.printStackTrace(); } btnMachUp.addActionListener(new UpListener()); btnMachUp.setBounds(700, 463, 30, 30); pnlMachine.add(btnMachUp); btnMachDown = new JButton(""); btnMachDown.setToolTipText("Move machine down"); btnMachDown.setEnabled(false); try { btnMachDown.setIcon(new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/down.png")))); btnMachDown.setRolloverEnabled(true); btnMachDown.setRolloverIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/down_over.png")))); btnMachDown.setDisabledIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/down_dis.png")))); } catch (NullPointerException e11) { System.out.println("Image load error"); } catch (IOException e1) { e1.printStackTrace(); } btnMachDown.addActionListener(new DownListener()); btnMachDown.setBounds(737, 463, 30, 30); pnlMachine.add(btnMachDown); btnMachReset = new JButton("Reset"); btnMachReset.setFont(new Font("Tahoma", Font.PLAIN, 11)); btnMachReset.setEnabled(false); btnMachReset.setToolTipText("Reset the form"); btnMachReset.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { ResetForm(); } }); btnMachReset.setBounds(20, 460, 100, 36); pnlMachine.add(btnMachReset); /*txtMachName.addKeyListener(new KeyAdapter() { @Override public void keyPressed(KeyEvent e) { int key = e.getKeyCode(); if (e.getKeyCode() == KeyEvent.VK_ENTER) btnAddMachine.doClick(); } });*/ btnNewMachine = new JButton("Add New"); btnNewMachine.setFont(new Font("Tahoma", Font.BOLD, 11)); btnNewMachine.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { formReady = false; ResetStatusLabel(); int index = listMachines.getSelectedIndex(); int size = listModel.getSize(); if (size >= Consts.MACH_LIST_LIMIT) { // Max list size ShowMessage( "Maximum number of machines allocated. Please delete before attempting to add more."); return; } String newName = getUniqueName("Machine"); txtMachName.setText(newName); machine = new Machine(newName); machNames.add(newName.toLowerCase()); //If no selection or if item in last position is selected, //add the new one to end of list, and select new one. if (index == -1 || (index + 1 == size)) { listModel.addElement(machine); listMachines.setSelectedIndex(size); RoiData.energies.add(RoiData.new EnergyData()); RoiData.maintenance.add(RoiData.new MaintData()); listCompare.addSelectionInterval(size, size); //Otherwise insert the new one after the current selection, //and select new one. } else { int[] sel = listCompare.getSelectedIndices(); int[] selection = new int[sel.length + 1]; System.arraycopy(sel, 0, selection, 0, sel.length); listCompare.setSelectedIndices(new int[] {}); listModel.insertElementAt(machine, index + 1); boolean max = false; for (int i = 0; i < selection.length; i++) { if (selection[i] >= index + 1 && !max) { if (i < selection.length - 1) System.arraycopy(selection, i, selection, i + 1, selection.length - i - 1); selection[i] = index + 1; max = true; } else if (selection[i] >= index + 1) selection[i] = selection[i] + 1; } RoiData.energies.add(index + 1, RoiData.new EnergyData()); RoiData.maintenance.add(index + 1, RoiData.new MaintData()); listCompare.setSelectedIndices(selection); //listCompareRoi.setSelectedIndices(selection); listMachines.setSelectedIndex(index + 1); //listCompare.addSelectionInterval(index + 1, index + 1); } ResetStatusLabel(); //UpdateForm(); already triggered in listchanged formReady = true; txtMachName.requestFocusInWindow(); } }); try { btnNewMachine .setIcon(new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/plus.png")))); } catch (IOException e1) { e1.printStackTrace(); } btnNewMachine.setToolTipText("Add new machine"); btnNewMachine.setBounds(522, 460, 110, 36); pnlMachine.add(btnNewMachine); grpOptions = new JPanel(); grpOptions.setFont(new Font("Tahoma", Font.PLAIN, 11)); grpOptions.setBounds(212, 72, 290, 256); pnlMachine.add(grpOptions); grpOptions.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Options", TitledBorder.LEADING, TitledBorder.TOP, null, null)); grpOptions.setLayout(null); chckbxFlag = new JCheckBox("Flag Detection"); chckbxFlag.setFont(new Font("Tahoma", Font.PLAIN, 11)); chckbxFlag.setToolTipText("Whether an automatic flag detection system is used"); chckbxFlag.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (formReady) UpdateMachine(); if (!chckbxFlag.isSelected()) chckbxSelectAll.setSelected(false); else UpdateSelectAllChckbx(); } }); chckbxFlag.setEnabled(false); chckbxFlag.setBounds(155, 104, 109, 23); grpOptions.add(chckbxFlag); chckbxSpliceTable = new JCheckBox("Splice Table"); chckbxSpliceTable.setFont(new Font("Tahoma", Font.PLAIN, 11)); chckbxSpliceTable.setToolTipText("Whether a splice table is fitted"); chckbxSpliceTable.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (formReady) UpdateMachine(); if (!chckbxSpliceTable.isSelected()) chckbxSelectAll.setSelected(false); else UpdateSelectAllChckbx(); } }); chckbxSpliceTable.setEnabled(false); chckbxSpliceTable.setBounds(22, 104, 109, 23); grpOptions.add(chckbxSpliceTable); chckbxAlignmentGuide = new JCheckBox("Alignment Guide"); chckbxAlignmentGuide.setFont(new Font("Tahoma", Font.PLAIN, 11)); chckbxAlignmentGuide.setToolTipText("Whether an alignment guide is fitted"); chckbxAlignmentGuide.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (formReady) UpdateMachine(); if (!chckbxAlignmentGuide.isSelected()) chckbxSelectAll.setSelected(false); else UpdateSelectAllChckbx(); } }); chckbxAlignmentGuide.setEnabled(false); chckbxAlignmentGuide.setBounds(22, 130, 127, 23); grpOptions.add(chckbxAlignmentGuide); chckbxRollConditioning = new JCheckBox("Roll Conditioning"); chckbxRollConditioning.setFont(new Font("Tahoma", Font.PLAIN, 11)); chckbxRollConditioning.setToolTipText("Whether the machine supports roll conditioning"); chckbxRollConditioning.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (formReady) UpdateMachine(); if (!chckbxRollConditioning.isSelected()) chckbxSelectAll.setSelected(false); else UpdateSelectAllChckbx(); } }); chckbxRollConditioning.setEnabled(false); chckbxRollConditioning.setBounds(22, 156, 127, 23); grpOptions.add(chckbxRollConditioning); chckbxTurretSupport = new JCheckBox("Turret Support"); chckbxTurretSupport.setFont(new Font("Tahoma", Font.PLAIN, 11)); chckbxTurretSupport.setToolTipText("For dual turret machines: extra turret support"); chckbxTurretSupport.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (formReady) UpdateMachine(); if (!chckbxTurretSupport.isSelected()) chckbxSelectAll.setSelected(false); else UpdateSelectAllChckbx(); } }); chckbxTurretSupport.setEnabled(false); chckbxTurretSupport.setBounds(22, 182, 127, 23); grpOptions.add(chckbxTurretSupport); chckbxAutostripping = new JCheckBox("Autostripping"); chckbxAutostripping.setFont(new Font("Tahoma", Font.PLAIN, 11)); chckbxAutostripping.setToolTipText("Whether an autostripping feature is present for reel unloading"); chckbxAutostripping.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (formReady) UpdateMachine(); if (!chckbxAutostripping.isSelected()) chckbxSelectAll.setSelected(false); else UpdateSelectAllChckbx(); } }); chckbxAutostripping.setEnabled(false); chckbxAutostripping.setBounds(22, 208, 97, 23); grpOptions.add(chckbxAutostripping); chckbxExtraRewind = new JCheckBox("850mm Rewind"); chckbxExtraRewind.setFont(new Font("Tahoma", Font.PLAIN, 11)); chckbxExtraRewind.setToolTipText("Extra wide 850mm max diameter rewind support"); chckbxExtraRewind.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (formReady) UpdateMachine(); if (!chckbxExtraRewind.isSelected()) chckbxSelectAll.setSelected(false); else UpdateSelectAllChckbx(); } }); chckbxExtraRewind.setEnabled(false); chckbxExtraRewind.setBounds(155, 208, 109, 23); grpOptions.add(chckbxExtraRewind); chckbxAutoCutoff = new JCheckBox("Auto Cut-off"); chckbxAutoCutoff.setFont(new Font("Tahoma", Font.PLAIN, 11)); chckbxAutoCutoff.setToolTipText("Whether the web is cut automatically when a run completes"); chckbxAutoCutoff.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (formReady) UpdateMachine(); if (!chckbxAutoCutoff.isSelected()) chckbxSelectAll.setSelected(false); else UpdateSelectAllChckbx(); } }); chckbxAutoCutoff.setEnabled(false); chckbxAutoCutoff.setBounds(155, 130, 109, 23); grpOptions.add(chckbxAutoCutoff); chckbxAutoTapeCore = new JCheckBox("Auto Tape Core"); chckbxAutoTapeCore.setFont(new Font("Tahoma", Font.PLAIN, 11)); chckbxAutoTapeCore.setToolTipText("Whether new reels are automatically taped before a run begins"); chckbxAutoTapeCore.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (formReady) UpdateMachine(); if (!chckbxAutoTapeCore.isSelected()) chckbxSelectAll.setSelected(false); else UpdateSelectAllChckbx(); } }); chckbxAutoTapeCore.setEnabled(false); chckbxAutoTapeCore.setBounds(155, 156, 109, 23); grpOptions.add(chckbxAutoTapeCore); chckbxAutoTapeTail = new JCheckBox("Auto Tape Tail"); chckbxAutoTapeTail.setFont(new Font("Tahoma", Font.PLAIN, 11)); chckbxAutoTapeTail.setToolTipText("Whether the tails of completed reels are automatically taped down"); chckbxAutoTapeTail.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (formReady) UpdateMachine(); if (!chckbxAutoTapeTail.isSelected()) chckbxSelectAll.setSelected(false); else UpdateSelectAllChckbx(); } }); chckbxAutoTapeTail.setEnabled(false); chckbxAutoTapeTail.setBounds(155, 182, 109, 23); grpOptions.add(chckbxAutoTapeTail); txtMachName = new JTextField(); txtMachName.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtMachName.selectAll(); } }); txtMachName.getDocument().addDocumentListener(new DocumentListener() { @Override public void changedUpdate(DocumentEvent arg0) { } @Override public void insertUpdate(DocumentEvent arg0) { UpdateMachineName(); } @Override public void removeUpdate(DocumentEvent arg0) { UpdateMachineName(); } }); txtMachName.setEnabled(false); txtMachName.setBounds(125, 35, 137, 28); grpOptions.add(txtMachName); txtMachName.getDocument().addDocumentListener(new DocumentListener() { public void changedUpdate(DocumentEvent e) { } public void removeUpdate(DocumentEvent e) { // text was deleted } public void insertUpdate(DocumentEvent e) { // text was inserted } }); txtMachName.setToolTipText("Enter a name to refer to this particular machine by"); txtMachName.setFont(new Font("Tahoma", Font.BOLD, 12)); txtMachName.setColumns(10); lblMachName = new JLabel("Machine name:"); lblMachName.setToolTipText("Enter a name to refer to this particular machine by"); lblMachName.setEnabled(false); lblMachName.setBounds(26, 36, 91, 24); grpOptions.add(lblMachName); lblMachName.setFont(new Font("Tahoma", Font.PLAIN, 13)); chckbxSelectAll = new JCheckBox("Select All"); chckbxSelectAll.setFont(new Font("Tahoma", Font.PLAIN, 11)); chckbxSelectAll.setToolTipText("Select all available options"); chckbxSelectAll.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (chckbxSelectAll.isSelected()) { if (chckbxAlignmentGuide.isEnabled()) chckbxAlignmentGuide.setSelected(true); if (chckbxAutoCutoff.isEnabled()) chckbxAutoCutoff.setSelected(true); if (chckbxAutostripping.isEnabled()) chckbxAutostripping.setSelected(true); if (chckbxAutoTapeCore.isEnabled()) chckbxAutoTapeCore.setSelected(true); if (chckbxAutoTapeTail.isEnabled()) chckbxAutoTapeTail.setSelected(true); if (chckbxExtraRewind.isEnabled()) chckbxExtraRewind.setSelected(true); if (chckbxFlag.isEnabled()) chckbxFlag.setSelected(true); if (chckbxRollConditioning.isEnabled()) chckbxRollConditioning.setSelected(true); if (chckbxSpliceTable.isEnabled()) chckbxSpliceTable.setSelected(true); if (chckbxTurretSupport.isEnabled()) chckbxTurretSupport.setSelected(true); } else { chckbxAlignmentGuide.setSelected(false); chckbxAutoCutoff.setSelected(false); chckbxAutostripping.setSelected(false); chckbxAutoTapeCore.setSelected(false); chckbxAutoTapeTail.setSelected(false); chckbxExtraRewind.setSelected(false); chckbxFlag.setSelected(false); chckbxRollConditioning.setSelected(false); chckbxSpliceTable.setSelected(false); chckbxTurretSupport.setSelected(false); } if (formReady) UpdateMachine(); } }); chckbxSelectAll.setEnabled(false); chckbxSelectAll.setBounds(22, 78, 97, 23); grpOptions.add(chckbxSelectAll); lblMachineConfiguration = new JLabel("Machine Configuration"); lblMachineConfiguration.setFont(new Font("Tahoma", Font.BOLD, 18)); lblMachineConfiguration.setBounds(29, 18, 269, 22); pnlMachine.add(lblMachineConfiguration); lblAddNewMachines = new JLabel( "Add new machines to the list on the right, then configure their options and variants below"); lblAddNewMachines.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblAddNewMachines.setBounds(29, 45, 433, 14); pnlMachine.add(lblAddNewMachines); btnCustomMachine = new JButton("Custom Machine Options"); btnCustomMachine.setEnabled(false); btnCustomMachine.setFont(new Font("Tahoma", Font.PLAIN, 11)); btnCustomMachine.setBounds(322, 460, 180, 36); pnlMachine.add(btnCustomMachine); btnCustomMachine.setToolTipText("Edit settings for a custom machine type"); scrollPane = new JScrollPane(); scrollPane.setBorder(null); scrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); scrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); scrollPane.setBounds(522, 44, 245, 405); pnlMachine.add(scrollPane); panel_6 = new JPanel(); panel_6.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, new Color(192, 192, 192), null, null, null)); panel_6.setBackground(Color.WHITE); panel_6.setToolTipText("Select a machine to edit options, re-order, or delete"); scrollPane.setViewportView(panel_6); panel_6.setLayout(new BorderLayout(0, 0)); //Create the list and put it in a scroll pane. listMachines = new JList(listModel); panel_6.add(listMachines, BorderLayout.NORTH); listMachines.addListSelectionListener(new MachineListSelectionListener()); listMachines.setCellRenderer(new MachineListRenderer()); listMachines.setBorder(null); listMachines.setToolTipText("Select a machine to edit options, re-order, or delete"); listMachines.setFont(new Font("Tahoma", Font.PLAIN, 13)); listMachines.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); btnOverrideDefaultAcceleration = new JButton("Override Default Acceleration"); btnOverrideDefaultAcceleration.setFont(new Font("Tahoma", Font.PLAIN, 11)); btnOverrideDefaultAcceleration .setToolTipText("Set new values for the acceleration/deceleration of this machine"); btnOverrideDefaultAcceleration.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { try { // check list selected listMachines.getSelectedIndex(); } catch (Exception e2) { return; } Machine currMachine = (Machine) listMachines.getSelectedValue(); AccelDecel dialog = new AccelDecel(currMachine); dialog.setLocationRelativeTo(frmTitanRoiCalculator); dialog.setVisible(true); } }); btnOverrideDefaultAcceleration.setEnabled(false); btnOverrideDefaultAcceleration.setBounds(130, 460, 182, 36); pnlMachine.add(btnOverrideDefaultAcceleration); btnCustomMachine.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { ResetStatusLabel(); //rdbtnOther.doClick(); MachineBuilder newmach = new MachineBuilder(machine); newmach.setLocationRelativeTo(frmTitanRoiCalculator); newmach.setVisible(true); } }); pnlJob = new JPanel(); tabbedPane.addTab("Job Selection", null, pnlJob, "Add and configure machine jobs"); tabbedPane.setEnabledAt(1, true); pnlJob.setLayout(null); JPanel pnlMaterials = new JPanel(); pnlMaterials.setBounds(280, 72, 227, 124); pnlMaterials.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Material Settings", TitledBorder.LEADING, TitledBorder.TOP, null, null)); pnlJob.add(pnlMaterials); pnlMaterials.setLayout(null); Material[] materials = { new Material("Custom", 1.0, 20), new Material("Aluminium", 2.7, 40), new Material("Board", 1.3, 80), new Material("Cellophane", 1.5, 20), new Material("HDPE/BOPE", 0.94, 20), new Material("Laminate", 1.0, 20), new Material("LDPE/BOPE", 0.91, 20), new Material("LLDPE", 0.9, 20), new Material("MDPE", 0.925, 20), new Material("Nylon", 1.12, 20), new Material("Polypropylene", 0.91, 20), new Material("Polystyrene", 1.04, 20), new Material("Paper", 0.8, 100), new Material("PEEK", 1.3, 20), new Material("Polyester", 1.4, 20), new Material("PLA", 1.24, 20), new Material("Polyolefin", 0.92, 20), new Material("PSA Label", 1.1, 20), new Material("PVC", 1.36, 20), new Material("Shrink label", 0.91, 20), new Material("Tri. Lam.", 1.1, 20) }; cmbMaterials = new JComboBox(materials); cmbMaterials.setMaximumRowCount(20); cmbMaterials.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { if (jobFormReady) { Material m = (Material) cmbMaterials.getSelectedItem(); if (!(m.name.equals("Custom"))) { jobFormReady = false; txtThickness.setText(Double.toString(roundTwoDecimals(m.getThickness()))); if (lblGsm.getText().equals("(gsm)")) txtDensity.setText(Double.toString(roundTwoDecimals(m.getDensity()))); else txtDensity .setText(Double.toString(roundTwoDecimals(m.getDensity() * m.getThickness()))); if (!metric) { txtThickness .setText(Double.toString(roundTwoDecimals(Core.MicroToMil(m.getThickness())))); } jobFormReady = true; } UpdateJob(); } } }); cmbMaterials.setEnabled(false); cmbMaterials.setSelectedIndex(0); cmbMaterials.setToolTipText("Choose a preset material"); cmbMaterials.setBounds(81, 26, 117, 22); pnlMaterials.add(cmbMaterials); lblPresets = new JLabel("Presets:"); lblPresets.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblPresets.setToolTipText("Choose a preset material"); lblPresets.setEnabled(false); lblPresets.setBounds(37, 29, 40, 15); pnlMaterials.add(lblPresets); lblThickness_1 = new JLabel("Thickness:"); lblThickness_1.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblThickness_1.setToolTipText("Material thickness"); lblThickness_1.setEnabled(false); lblThickness_1.setHorizontalAlignment(SwingConstants.RIGHT); lblThickness_1.setBounds(7, 61, 70, 14); pnlMaterials.add(lblThickness_1); lblDensity_1 = new JLabel("Density:"); lblDensity_1.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblDensity_1.setToolTipText("Material density (per volume, not area)"); lblDensity_1.setEnabled(false); lblDensity_1.setHorizontalAlignment(SwingConstants.RIGHT); lblDensity_1.setBounds(31, 86, 46, 14); pnlMaterials.add(lblDensity_1); txtThickness = new JTextField(); txtThickness.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtThickness.selectAll(); } }); txtThickness.setEnabled(false); txtThickness.getDocument().addDocumentListener(new JobInputChangeListener()); txtThickness.setToolTipText("Material thickness"); txtThickness.setText("20"); txtThickness.setBounds(81, 58, 86, 20); pnlMaterials.add(txtThickness); txtThickness.setColumns(10); txtDensity = new JTextField(); txtDensity.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtDensity.selectAll(); } }); txtDensity.setEnabled(false); txtDensity.getDocument().addDocumentListener(new JobInputChangeListener()); txtDensity.setToolTipText("Material density (per volume, not area)"); txtDensity.setText("0.92"); txtDensity.setBounds(81, 83, 86, 20); pnlMaterials.add(txtDensity); txtDensity.setColumns(10); lblmicro0 = new JLabel("(\u00B5m)"); lblmicro0.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblmicro0.setEnabled(false); lblmicro0.setBounds(177, 61, 46, 14); pnlMaterials.add(lblmicro0); lblgm3 = new JLabel("(g/cm )"); lblgm3.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblgm3.setEnabled(false); lblgm3.setBounds(177, 86, 46, 14); pnlMaterials.add(lblgm3); label_3 = new JLabel("3"); label_3.setEnabled(false); label_3.setFont(new Font("Tahoma", Font.PLAIN, 8)); label_3.setBounds(204, 83, 14, 14); pnlMaterials.add(label_3); JPanel pnlJobs = new JPanel(); pnlJobs.setBounds(20, 168, 250, 283); pnlJobs.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Rewind Settings", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0))); pnlJob.add(pnlJobs); pnlJobs.setLayout(null); lblTargetRewindLength = new JLabel("Rewind Output:"); lblTargetRewindLength.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblTargetRewindLength.setToolTipText("Quantity of rewind output"); lblTargetRewindLength.setEnabled(false); lblTargetRewindLength.setHorizontalAlignment(SwingConstants.RIGHT); lblTargetRewindLength.setBounds(17, 197, 88, 14); pnlJobs.add(lblTargetRewindLength); lblSlitWidth = new JLabel("Slit Width:"); lblSlitWidth.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblSlitWidth.setToolTipText("Width of each output reel"); lblSlitWidth.setEnabled(false); lblSlitWidth.setHorizontalAlignment(SwingConstants.RIGHT); lblSlitWidth.setBounds(46, 60, 59, 14); pnlJobs.add(lblSlitWidth); lblSlitCount = new JLabel("Reel Count:"); lblSlitCount.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblSlitCount.setToolTipText("Number of reels per set at the output"); lblSlitCount.setEnabled(false); lblSlitCount.setHorizontalAlignment(SwingConstants.RIGHT); lblSlitCount.setBounds(46, 33, 59, 14); pnlJobs.add(lblSlitCount); lblTrimtotal = new JLabel("Trim (total):"); lblTrimtotal.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblTrimtotal.setToolTipText("The trim resulting from the given slit widths"); lblTrimtotal.setEnabled(false); lblTrimtotal.setHorizontalAlignment(SwingConstants.RIGHT); lblTrimtotal.setBounds(20, 114, 85, 14); pnlJobs.add(lblTrimtotal); txtSlits = new JTextField(); txtSlits.setToolTipText("Number of reels per set at the output"); txtSlits.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtSlits.selectAll(); } }); txtSlits.getDocument().addDocumentListener(new JobInputChangeListener()); txtSlits.setEnabled(false); txtSlits.setText("1"); txtSlits.setBounds(109, 30, 86, 20); pnlJobs.add(txtSlits); txtSlits.setColumns(10); txtSlitWidth = new JTextField(); txtSlitWidth.setToolTipText("Width of each output reel"); txtSlitWidth.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtSlitWidth.selectAll(); } }); txtSlitWidth.getDocument().addDocumentListener(new JobInputChangeListener()); txtSlitWidth.setEnabled(false); txtSlitWidth.setText("1350"); txtSlitWidth.setBounds(109, 58, 86, 20); pnlJobs.add(txtSlitWidth); txtSlitWidth.setColumns(10); txtRewindAmount = new JTextField(); txtRewindAmount.setToolTipText("Quantity of rewind output"); txtRewindAmount.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtRewindAmount.selectAll(); } }); txtRewindAmount.getDocument().addDocumentListener(new JobInputChangeListener()); txtRewindAmount.setEnabled(false); txtRewindAmount.setName("RewindLength"); txtRewindAmount.setText("1000"); txtRewindAmount.setBounds(109, 194, 86, 20); pnlJobs.add(txtRewindAmount); txtRewindAmount.setColumns(10); lblTrim = new JLabel("0 mm"); lblTrim.setToolTipText("The trim resulting from the given slit widths"); lblTrim.setEnabled(false); lblTrim.setBounds(111, 114, 65, 14); pnlJobs.add(lblTrim); cmbRewindCore = new JComboBox(); cmbRewindCore.setToolTipText("Core diameter of rewind reels"); ((JTextField) cmbRewindCore.getEditor().getEditorComponent()).getDocument() .addDocumentListener(new DocumentListener() { @Override public void removeUpdate(DocumentEvent arg0) { UpdateJob(); } @Override public void insertUpdate(DocumentEvent arg0) { UpdateJob(); } @Override public void changedUpdate(DocumentEvent arg0) { } }); /*cmbRewindCore.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { UpdateJob(jobIndex); } });*/ cmbRewindCore.setEnabled(false); cmbRewindCore.setModel(new DefaultComboBoxModel(Consts.REWIND_CORE_MM)); cmbRewindCore.setSelectedIndex(1); cmbRewindCore.setBounds(109, 137, 87, 20); pnlJobs.add(cmbRewindCore); cmbRewindCore.setEditable(true); lblRewindCoremm = new JLabel("Rewind Core:"); lblRewindCoremm.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblRewindCoremm.setToolTipText("Core diameter of rewind reels"); lblRewindCoremm.setEnabled(false); lblRewindCoremm.setBounds(40, 140, 65, 14); pnlJobs.add(lblRewindCoremm); lblPer_1 = new JLabel("per:"); lblPer_1.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblPer_1.setToolTipText("Set whether rewind output is measured per reel or per set"); lblPer_1.setEnabled(false); lblPer_1.setBounds(85, 248, 20, 14); pnlJobs.add(lblPer_1); cmbJobDomain = new JComboBox(); cmbJobDomain.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { UpdateSetReel(); //UpdateJob(); } }); cmbJobDomain.setEnabled(false); cmbJobDomain.setToolTipText("Set whether rewind output is measured per reel or per set"); cmbJobDomain.setModel(new DefaultComboBoxModel(new String[] { "Reel", "Set" })); cmbJobDomain.setBounds(109, 246, 95, 20); pnlJobs.add(cmbJobDomain); lblmm3 = new JLabel("(mm)"); lblmm3.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblmm3.setEnabled(false); lblmm3.setBounds(205, 61, 27, 14); pnlJobs.add(lblmm3); lblmm2 = new JLabel("(mm)"); lblmm2.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblmm2.setEnabled(false); lblmm2.setBounds(206, 140, 27, 14); pnlJobs.add(lblmm2); pnlUnwinds = new JPanel(); pnlUnwinds.setLayout(null); pnlUnwinds.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Unwind Settings", TitledBorder.LEADING, TitledBorder.TOP, null, null)); pnlUnwinds.setBounds(280, 207, 227, 162); pnlJob.add(pnlUnwinds); lblUnwindLength = new JLabel("Unwind Size:"); lblUnwindLength.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblUnwindLength.setToolTipText("Quantity of material per mother roll"); lblUnwindLength.setEnabled(false); lblUnwindLength.setHorizontalAlignment(SwingConstants.RIGHT); lblUnwindLength.setBounds(21, 104, 66, 14); pnlUnwinds.add(lblUnwindLength); txtUnwindAmount = new JTextField(); txtUnwindAmount.setToolTipText("Quantity of material per mother roll"); txtUnwindAmount.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent arg0) { txtUnwindAmount.selectAll(); } }); txtUnwindAmount.getDocument().addDocumentListener(new JobInputChangeListener()); txtUnwindAmount.setEnabled(false); txtUnwindAmount.setName("UnwindLength"); txtUnwindAmount.setText("10000"); txtUnwindAmount.setBounds(92, 100, 86, 20); pnlUnwinds.add(txtUnwindAmount); txtUnwindAmount.setColumns(10); lblWebWidthmm = new JLabel("Web Width:"); lblWebWidthmm.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblWebWidthmm.setToolTipText("Width of mother rolls"); lblWebWidthmm.setEnabled(false); lblWebWidthmm.setBounds(31, 29, 57, 14); pnlUnwinds.add(lblWebWidthmm); lblUnwindCoremm = new JLabel("Unwind Core:"); lblUnwindCoremm.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblUnwindCoremm.setToolTipText("Core diameter of mother rolls"); lblUnwindCoremm.setEnabled(false); lblUnwindCoremm.setBounds(22, 54, 66, 14); pnlUnwinds.add(lblUnwindCoremm); cmbUnwindCore = new JComboBox(); cmbUnwindCore.setToolTipText("Core diameter of mother rolls"); ((JTextField) cmbUnwindCore.getEditor().getEditorComponent()).getDocument() .addDocumentListener(new DocumentListener() { @Override public void removeUpdate(DocumentEvent arg0) { UpdateJob(); } @Override public void insertUpdate(DocumentEvent arg0) { UpdateJob(); } @Override public void changedUpdate(DocumentEvent arg0) { } }); cmbUnwindCore.setEnabled(false); cmbUnwindCore.setModel(new DefaultComboBoxModel(new String[] { "76", "152", "254" })); cmbUnwindCore.setBounds(92, 51, 86, 20); pnlUnwinds.add(cmbUnwindCore); cmbUnwindCore.setEditable(true); lblmm0 = new JLabel("(mm)"); lblmm0.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblmm0.setEnabled(false); lblmm0.setBounds(189, 29, 32, 14); pnlUnwinds.add(lblmm0); lblmm1 = new JLabel("(mm)"); lblmm1.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblmm1.setEnabled(false); lblmm1.setBounds(189, 53, 32, 14); pnlUnwinds.add(lblmm1); pnlEnviron = new JPanel(); tabbedPane.addTab("Job Scheduling", null, pnlEnviron, "Edit the schedule of jobs to be analysed"); tabbedPane.setEnabledAt(2, true); pnlEnviron.setLayout(null); JPanel pnlShifts = new JPanel(); pnlShifts.setLayout(null); pnlShifts.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Shift Options", TitledBorder.LEADING, TitledBorder.TOP, null, null)); pnlShifts.setBounds(20, 72, 287, 162); pnlEnviron.add(pnlShifts); JLabel lblShiftLength = new JLabel("Shift Length:"); lblShiftLength.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblShiftLength.setToolTipText("Hours per working shift"); lblShiftLength.setHorizontalAlignment(SwingConstants.RIGHT); lblShiftLength.setBounds(15, 28, 108, 14); pnlShifts.add(lblShiftLength); JLabel lblDayLength = new JLabel("Day Length:"); lblDayLength.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblDayLength.setToolTipText("Working hours per day"); lblDayLength.setHorizontalAlignment(SwingConstants.RIGHT); lblDayLength.setBounds(29, 78, 94, 14); pnlShifts.add(lblDayLength); JLabel lblShiftsDay = new JLabel("Shifts per Day:"); lblShiftsDay.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblShiftsDay.setToolTipText("Shifts per day"); lblShiftsDay.setHorizontalAlignment(SwingConstants.RIGHT); lblShiftsDay.setBounds(15, 53, 108, 14); pnlShifts.add(lblShiftsDay); JLabel lblDays = new JLabel("Days per Year:"); lblDays.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblDays.setToolTipText("Days per year"); lblDays.setHorizontalAlignment(SwingConstants.RIGHT); lblDays.setBounds(0, 106, 123, 14); pnlShifts.add(lblDays); txtShiftLength = new JTextField(); txtShiftLength.getDocument().addDocumentListener(new DocumentListener() { @Override public void removeUpdate(DocumentEvent arg0) { UpdateShifts(); } @Override public void insertUpdate(DocumentEvent arg0) { UpdateShifts(); } @Override public void changedUpdate(DocumentEvent arg0) { } }); txtShiftLength.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent arg0) { txtShiftLength.selectAll(); } }); txtShiftLength.setToolTipText("Hours per working shift"); txtShiftLength.setText("8"); txtShiftLength.setBounds(133, 25, 86, 20); pnlShifts.add(txtShiftLength); txtShiftLength.setColumns(10); txtShiftCount = new JTextField(); txtShiftCount.getDocument().addDocumentListener(new DocumentListener() { @Override public void removeUpdate(DocumentEvent arg0) { UpdateShifts(); } @Override public void insertUpdate(DocumentEvent arg0) { UpdateShifts(); } @Override public void changedUpdate(DocumentEvent arg0) { } }); txtShiftCount.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtShiftCount.selectAll(); } }); txtShiftCount.setToolTipText("Shifts per day"); txtShiftCount.setText("3"); txtShiftCount.setBounds(133, 50, 86, 20); pnlShifts.add(txtShiftCount); txtShiftCount.setColumns(10); txtDaysYear = new JTextField(); txtDaysYear.getDocument().addDocumentListener(new DocumentListener() { @Override public void removeUpdate(DocumentEvent arg0) { UpdateShifts(); } @Override public void insertUpdate(DocumentEvent arg0) { UpdateShifts(); } @Override public void changedUpdate(DocumentEvent arg0) { } }); txtDaysYear.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtDaysYear.selectAll(); } }); txtDaysYear.setToolTipText("Days per year"); txtDaysYear.setText("250"); txtDaysYear.setBounds(133, 103, 86, 20); pnlShifts.add(txtDaysYear); txtDaysYear.setColumns(10); lblDayLength2 = new JLabel("24 hours"); lblDayLength2.setToolTipText("Working hours per day"); lblDayLength2.setBounds(133, 78, 86, 14); pnlShifts.add(lblDayLength2); lblHoursYear = new JLabel("Hours per Year:"); lblHoursYear.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblHoursYear.setToolTipText("Working hours per year"); lblHoursYear.setBounds(47, 131, 76, 14); pnlShifts.add(lblHoursYear); lblHoursYear2 = new JLabel("6000 hours"); lblHoursYear2.setToolTipText("Working hours per year"); lblHoursYear2.setBounds(133, 131, 86, 14); pnlShifts.add(lblHoursYear2); lblHrs = new JLabel("hrs"); lblHrs.setBounds(229, 28, 46, 14); pnlShifts.add(lblHrs); btnAddAll = new JButton("Add All"); btnAddAll.setToolTipText("Add all jobs to the schedule in order"); btnAddAll.setFont(new Font("Tahoma", Font.BOLD, 11)); btnAddAll.setEnabled(false); try { btnAddAll.setIcon(new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/plus.png")))); } catch (IOException e1) { e1.printStackTrace(); } btnAddAll.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { for (int i = 0; i < jobModel.getSize(); ++i) { listJobsAvail.setSelectedIndex(i); btnAddJob.doClick(); } } }); btnAddAll.setBounds(327, 460, 110, 36); pnlEnviron.add(btnAddAll); btnAddJob = new JButton(""); btnAddJob.setToolTipText("Add this job to the schedule"); btnAddJob.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { //AddToSchedule(listJobsAvail.getSelectedValue()); ResetStatusLabel(); int index = listSchedule.getSelectedIndex(); //int source_index = listJobsAvail.getSelectedIndex(); Job sel = (Job) listJobsAvail.getSelectedValue(); JobItem j = environment.getSchedule().new JobItem(sel, 0, sel.getTotWeight(), sel.getTotLength()); int size = scheduleModel.getSize(); // no limit now there are scroll bars /* if(size >= Consts.JOB_LIST_LIMIT){ // Max list size ShowMessage("Maximum number of jobs scheduled. Please delete before attempting to add more."); return; }*/ //If no selection or if item in last position is selected, //add the new one to end of list, and select new one. if (index == -1 || (index + 1 == size)) { scheduleModel.addElement(sel); listSchedule.setSelectedIndex(size); environment.getSchedule().addJob(j); //Otherwise insert the new one after the current selection, //and select new one. } else { scheduleModel.insertElementAt(sel, index + 1); listSchedule.setSelectedIndex(index + 1); environment.getSchedule().insertJob(j, index + 1); } btnClearSchedule.setEnabled(true); } }); btnAddJob.setEnabled(false); try { btnAddJob.setIcon(new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/add_job.png")))); btnAddJob.setDisabledIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/add_job_dis.png")))); btnAddJob.setRolloverEnabled(true); btnAddJob.setRolloverIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/add_job_over.png")))); } catch (NullPointerException e111) { System.out.println("Image load error"); } catch (IOException e1) { e1.printStackTrace(); } btnAddJob.setBounds(521, 178, 54, 54); pnlEnviron.add(btnAddJob); btnRemoveJob = new JButton(""); btnRemoveJob.setToolTipText("Remove job from schedule"); btnRemoveJob.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { ResetStatusLabel(); // Uncomment this code to allow jobs to be saved back after removal from schedule /*if(listSchedule.getSelectedIndex() > -1){ Job j = (Job) listSchedule.getSelectedValue(); String name = j.getName().toLowerCase(); if(!jobNames.contains(name) && !jobModel.contains(j)){ if(jobModel.size() < Consts.JOB_LIST_LIMIT){ jobNames.add(name); jobFormReady = true; int index = -1; if(listJobsAvail.getSelectedIndex() > -1) index = listJobsAvail.getSelectedIndex(); if(index < 0){ jobModel.addElement(j); listJobsAvail.setSelectedIndex(jobModel.size()-1); listJobs.setSelectedIndex(jobModel.size()-1); }else{ jobModel.insertElementAt(j, index+1); listJobsAvail.setSelectedIndex(index+1); listJobs.setSelectedIndex(index+1); } } } }*/ ListSelectionModel lsm = listSchedule.getSelectionModel(); int firstSelected = lsm.getMinSelectionIndex(); int lastSelected = lsm.getMaxSelectionIndex(); scheduleModel.removeRange(firstSelected, lastSelected); environment.getSchedule().remove(firstSelected); int size = scheduleModel.size(); if (size == 0) { //List is empty: disable delete, up, and down buttons. btnClearSchedule.setEnabled(false); btnUpSchedule.setEnabled(false); btnDownSchedule.setEnabled(false); listSchedule.clearSelection(); btnRemoveJob.setEnabled(false); btnViewSchedule.setEnabled(false); } else { //Adjust the selection. if (firstSelected == scheduleModel.getSize()) { //Removed item in last position. firstSelected--; } listSchedule.setSelectedIndex(firstSelected); if (size == 21) { // No longer full list ResetStatusLabel(); } } } }); btnRemoveJob.setEnabled(false); try { btnRemoveJob .setIcon(new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/del_job.png")))); btnRemoveJob.setDisabledIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/del_job_dis.png")))); btnRemoveJob.setRolloverEnabled(true); btnRemoveJob.setRolloverIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/del_job_over.png")))); } catch (NullPointerException e111) { System.out.println("Image load error"); } catch (IOException e1) { e1.printStackTrace(); } btnRemoveJob.setBounds(520, 243, 54, 54); pnlEnviron.add(btnRemoveJob); lblJobSchedule_1 = new JLabel("Job Schedule"); lblJobSchedule_1.setFont(new Font("Tahoma", Font.BOLD, 18)); lblJobSchedule_1.setBounds(29, 18, 269, 22); pnlEnviron.add(lblJobSchedule_1); lblScheduleJobsTo = new JLabel("Schedule jobs to the right, then set shift options below"); lblScheduleJobsTo.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblScheduleJobsTo.setBounds(29, 45, 279, 14); pnlEnviron.add(lblScheduleJobsTo); lblAvailableJobs_1 = new JLabel("Available Jobs"); lblAvailableJobs_1.setFont(new Font("Tahoma", Font.BOLD, 12)); lblAvailableJobs_1.setBounds(327, 19, 137, 14); pnlEnviron.add(lblAvailableJobs_1); lblJobSchedule_2 = new JLabel("Job Schedule"); lblJobSchedule_2.setFont(new Font("Tahoma", Font.BOLD, 12)); lblJobSchedule_2.setBounds(577, 19, 110, 14); pnlEnviron.add(lblJobSchedule_2); panel = new JPanel(); panel.setLayout(null); panel.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Schedule Options", TitledBorder.LEADING, TitledBorder.TOP, null, null)); panel.setBounds(20, 245, 287, 104); pnlEnviron.add(panel); btnViewSchedule = new JButton("View Schedule Diagram"); btnViewSchedule.setFont(new Font("Tahoma", Font.PLAIN, 11)); btnViewSchedule.setToolTipText("View chart of schedule timings"); btnViewSchedule.setEnabled(false); btnViewSchedule.setBounds(33, 27, 170, 29); panel.add(btnViewSchedule); chckbxSimulateScheduleStart = new JCheckBox("Ignore machine config & knife positioning times"); chckbxSimulateScheduleStart.setFont(new Font("Tahoma", Font.PLAIN, 11)); chckbxSimulateScheduleStart.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (!initialising) environment.StartStopTimes = !chckbxSimulateScheduleStart.isSelected(); } }); chckbxSimulateScheduleStart.setToolTipText( "WARNING: Use ONLY when you wish to model the output of a single job over a long time period \u2013 such that the initial set-up time has no material impact on the production volume"); chckbxSimulateScheduleStart.setBounds(30, 62, 251, 18); panel.add(chckbxSimulateScheduleStart); lblhoverForInfo = new JLabel("(hover for info)"); lblhoverForInfo.setToolTipText( "WARNING: Use ONLY when you wish to model the output of a single job over a long time period \u2013 such that the initial set-up time has no material impact on the production volume"); lblhoverForInfo.setForeground(Color.GRAY); lblhoverForInfo.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblhoverForInfo.setBounds(34, 80, 147, 14); panel.add(lblhoverForInfo); btnUpSchedule = new JButton(""); btnUpSchedule.setToolTipText("Move job earlier in schedule"); btnUpSchedule.addActionListener(new ScheduleUpListener()); try { btnUpSchedule.setIcon(new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/up.png")))); btnUpSchedule.setRolloverEnabled(true); btnUpSchedule.setRolloverIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/up_over.png")))); btnUpSchedule.setDisabledIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/up_dis.png")))); } catch (NullPointerException e11) { System.out.println("Image load error"); } catch (IOException e1) { e1.printStackTrace(); } btnUpSchedule.setEnabled(false); btnUpSchedule.setBounds(700, 463, 30, 30); pnlEnviron.add(btnUpSchedule); btnDownSchedule = new JButton(""); btnDownSchedule.setToolTipText("Move job later in schedule"); btnDownSchedule.addActionListener(new ScheduleDownListener()); try { btnDownSchedule .setIcon(new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/down.png")))); btnDownSchedule.setRolloverEnabled(true); btnDownSchedule.setRolloverIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/down_over.png")))); btnDownSchedule.setDisabledIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/down_dis.png")))); } catch (NullPointerException e11) { System.out.println("Image load error"); } catch (IOException e1) { e1.printStackTrace(); } btnDownSchedule.setEnabled(false); btnDownSchedule.setBounds(737, 463, 30, 30); pnlEnviron.add(btnDownSchedule); btnClearSchedule = new JButton("Clear"); btnClearSchedule.setToolTipText("Clear all jobs from the schedule"); btnClearSchedule.setFont(new Font("Tahoma", Font.BOLD, 11)); btnClearSchedule.setEnabled(false); try { btnClearSchedule .setIcon(new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/delete.png")))); btnClearSchedule.setRolloverEnabled(true); btnClearSchedule.setRolloverIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/delete_over.png")))); btnClearSchedule.setDisabledIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/delete_dis.png")))); } catch (NullPointerException e11) { System.out.println("Image load error"); } catch (IOException e1) { e1.printStackTrace(); } btnClearSchedule.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { scheduleModel.removeAllElements(); environment.getSchedule().empty(); } }); btnClearSchedule.setBounds(577, 460, 110, 36); pnlEnviron.add(btnClearSchedule); //listSchedule.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, null, null, null, null)); //listSchedule.setBounds(577, 44, 190, 405); //pnlEnviron.add(listSchedule); btnViewSchedule.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { ScheduleChart ch = new ScheduleChart(environment.getSchedule()); ch.pack(); try { ch.setIconImage(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/logo.png"))); } catch (NullPointerException e11) { System.out.println("Image load error"); } catch (IOException e) { e.printStackTrace(); } ch.setLocationRelativeTo(frmTitanRoiCalculator); ch.setVisible(true); } }); scrlSchedule = new JScrollPane(); scrlSchedule.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); scrlSchedule.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, Color.LIGHT_GRAY, null, null, null)); scrlSchedule.setBounds(577, 44, 190, 405); scrlSchedule.getVerticalScrollBar().setUnitIncrement(16); pnlEnviron.add(scrlSchedule); panel_8 = new JPanel(); panel_8.setToolTipText("Select job to re-order or remove from schedule"); panel_8.setBackground(Color.WHITE); panel_8.setBorder(null); scrlSchedule.setViewportView(panel_8); panel_8.setLayout(new BorderLayout(0, 0)); listSchedule = new JList(scheduleModel); panel_8.add(listSchedule, BorderLayout.NORTH); listSchedule.setToolTipText("Select job to re-order or remove from schedule"); listSchedule.addListSelectionListener(new ScheduleSelectionListener()); listSchedule.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); listSchedule.setCellRenderer(new JobListRenderer()); panel_5 = new JPanel(); panel_5.setLayout(null); panel_5.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Notes", TitledBorder.LEADING, TitledBorder.TOP, null, null)); panel_5.setBounds(20, 360, 287, 136); pnlEnviron.add(panel_5); lblToViewAnalysis = new JLabel("To view analysis for 1 job only, add just that job"); lblToViewAnalysis.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblToViewAnalysis.setBounds(24, 24, 241, 14); panel_5.add(lblToViewAnalysis); lblToTheSchedule = new JLabel("to the schedule."); lblToTheSchedule.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblToTheSchedule.setBounds(24, 38, 241, 14); panel_5.add(lblToTheSchedule); lblToModelMaintenance = new JLabel("To model maintenance or other downtime, edit the"); lblToModelMaintenance.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblToModelMaintenance.setBounds(24, 59, 253, 14); panel_5.add(lblToModelMaintenance); lblShiftOptionsAbove = new JLabel("shift options above. This will affect annual output,"); lblShiftOptionsAbove.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblShiftOptionsAbove.setBounds(24, 73, 253, 14); panel_5.add(lblShiftOptionsAbove); lblButNotThe = new JLabel("but not the rates or efficiencies. For these, use the"); lblButNotThe.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblButNotThe.setBounds(24, 87, 253, 14); panel_5.add(lblButNotThe); lbladvancedTabIn = new JLabel("'advanced' tab in the options menu box."); lbladvancedTabIn.setFont(new Font("Tahoma", Font.PLAIN, 11)); lbladvancedTabIn.setBounds(24, 101, 253, 14); panel_5.add(lbladvancedTabIn); scrollPane_2 = new JScrollPane(); scrollPane_2.setBorder(null); scrollPane_2.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); scrollPane_2.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); scrollPane_2.setBounds(327, 44, 190, 405); pnlEnviron.add(scrollPane_2); panel_9 = new JPanel(); panel_9.setToolTipText("Select job to be added"); scrollPane_2.setViewportView(panel_9); panel_9.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, Color.LIGHT_GRAY, null, null, null)); panel_9.setBackground(Color.WHITE); panel_9.setLayout(new BorderLayout(0, 0)); listJobsAvail = new JList(jobModel); panel_9.add(listJobsAvail, BorderLayout.NORTH); listJobsAvail.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "add"); listJobsAvail.getActionMap().put("add", new AddScheduleBtn()); listJobsAvail.setToolTipText("Select job to be added"); listJobsAvail.addListSelectionListener(new JobAvailSelectionListener()); listJobsAvail.setCellRenderer(new JobListRenderer()); listJobsAvail.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); listJobsAvail.setBorder(null); pnlCompare = new JPanel(); tabbedPane.addTab("Productivity Comparison", null, pnlCompare, "Productivity comparison data & graphs"); tabbedPane.setEnabledAt(3, true); pnlCompare.setLayout(null); pnlResults = new JPanel(); pnlResults.setBorder( new TitledBorder(null, "Numerical Results", TitledBorder.LEADING, TitledBorder.TOP, null, null)); pnlResults.setBounds(20, 72, 479, 134); pnlCompare.add(pnlResults); pnlResults.setLayout(null); lblOutputLength = new JLabel("Output length over time period:"); lblOutputLength.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblOutputLength.setEnabled(false); lblOutputLength.setToolTipText("Quantity produced"); lblOutputLength.setBounds(220, 54, 152, 14); pnlResults.add(lblOutputLength); lblOutputWeight = new JLabel("Output weight over time period:"); lblOutputWeight.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblOutputWeight.setEnabled(false); lblOutputWeight.setToolTipText("Quantity produced"); lblOutputWeight.setBounds(220, 79, 162, 14); pnlResults.add(lblOutputWeight); cmbTimeRef = new JComboBox(); cmbTimeRef.setEnabled(false); cmbTimeRef.setToolTipText("Select a time range to display results over"); cmbTimeRef.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { // Refresh analyses UpdateNumericalAnalysis(); } }); cmbTimeRef.setModel( new DefaultComboBoxModel(new String[] { "Schedule", "Year", "Hour", "Shift", "Day"/*, "Week"*/ })); cmbTimeRef.setBounds(247, 98, 125, 24); pnlResults.add(cmbTimeRef); lblPer = new JLabel("Per:"); lblPer.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblPer.setEnabled(false); lblPer.setBounds(220, 103, 20, 14); pnlResults.add(lblPer); lblAverageMmin = new JLabel("Average rate:"); lblAverageMmin.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblAverageMmin.setEnabled(false); lblAverageMmin.setToolTipText("Average quantity processed"); lblAverageMmin.setBounds(20, 54, 95, 14); pnlResults.add(lblAverageMmin); lblNumericsWeight = new JLabel("0.0 tons"); lblNumericsWeight.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblNumericsWeight.setEnabled(false); lblNumericsWeight.setToolTipText("Quantity produced"); lblNumericsWeight.setBounds(380, 79, 89, 14); pnlResults.add(lblNumericsWeight); lblNumericsLength = new JLabel("0.0 metres"); lblNumericsLength.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblNumericsLength.setEnabled(false); lblNumericsLength.setToolTipText("Quantity produced"); lblNumericsLength.setBounds(380, 54, 89, 14); pnlResults.add(lblNumericsLength); lblNumericsRate = new JLabel("0.0 m/hr"); lblNumericsRate.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblNumericsRate.setEnabled(false); lblNumericsRate.setToolTipText("Average quantity processed"); lblNumericsRate.setBounds(128, 54, 82, 14); pnlResults.add(lblNumericsRate); lblEfficiency = new JLabel("Machine running:"); lblEfficiency.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblEfficiency.setEnabled(false); lblEfficiency.setToolTipText("Proportion of total time for which the machine is running"); lblEfficiency.setBounds(20, 104, 95, 14); pnlResults.add(lblEfficiency); cmbMachines = new JComboBox(); cmbMachines.setMaximumRowCount(15); cmbMachines.setFont(new Font("Tahoma", Font.BOLD, 11)); cmbMachines.setEnabled(false); cmbMachines.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { UpdateNumericalAnalysis(); } }); cmbMachines.setToolTipText("Select machine"); cmbMachines.setBounds(128, 20, 244, 24); pnlResults.add(cmbMachines); lblMachine = new JLabel("Select Machine:"); lblMachine.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblMachine.setEnabled(false); lblMachine.setToolTipText("Select machine"); lblMachine.setBounds(20, 25, 77, 14); pnlResults.add(lblMachine); lblNumericsEff = new JLabel("0.0 %"); lblNumericsEff.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblNumericsEff.setEnabled(false); lblNumericsEff.setToolTipText("Machine efficiency"); lblNumericsEff.setBounds(128, 104, 65, 14); pnlResults.add(lblNumericsEff); lblscheduletimelbl = new JLabel("Time to run schedule:"); lblscheduletimelbl.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblscheduletimelbl.setToolTipText("Time to run schedule"); lblscheduletimelbl.setEnabled(false); lblscheduletimelbl.setBounds(20, 79, 103, 14); pnlResults.add(lblscheduletimelbl); lblscheduletime = new JLabel("0.0 hr"); lblscheduletime.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblscheduletime.setToolTipText("Time to run schedule"); lblscheduletime.setEnabled(false); lblscheduletime.setBounds(128, 79, 77, 14); pnlResults.add(lblscheduletime); pnlROI = new JPanel(); tabbedPane.addTab("Return on Investment", (Icon) null, pnlROI, "Return on investment comparison and analysis"); pnlROI.setLayout(null); tabbedPane.setEnabledAt(4, true); lblProductivityComparison = new JLabel("Productivity Comparison"); lblProductivityComparison.setFont(new Font("Tahoma", Font.BOLD, 18)); lblProductivityComparison.setBounds(29, 18, 269, 22); pnlCompare.add(lblProductivityComparison); lblSelectMultipleMachines = new JLabel( "Select multiple machines from the list on the right, then compare them below"); lblSelectMultipleMachines.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblSelectMultipleMachines.setBounds(29, 45, 433, 14); pnlCompare.add(lblSelectMultipleMachines); label_2 = new JLabel("Machines"); label_2.setFont(new Font("Tahoma", Font.BOLD, 12)); label_2.setBounds(522, 19, 85, 14); pnlCompare.add(label_2); pnlProdGraph = new JPanel(); pnlProdGraph.setBounds(20, 222, 479, 274); pnlCompare.add(pnlProdGraph); pnlProdGraph.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Graphical Results", TitledBorder.LEADING, TitledBorder.TOP, null, null)); pnlProdGraph.setLayout(null); btnShowGraph = new JButton("Open Graph"); btnShowGraph.setFont(new Font("Tahoma", Font.BOLD, 11)); btnShowGraph.setToolTipText("Open graph in new window"); btnShowGraph.setEnabled(false); btnShowGraph.setBounds(366, 51, 99, 39); pnlProdGraph.add(btnShowGraph); btnSaveToFile = new JButton("Save to File"); btnSaveToFile.setFont(new Font("Tahoma", Font.PLAIN, 11)); btnSaveToFile.setToolTipText("Save image to disk"); btnSaveToFile.setEnabled(false); btnSaveToFile.addActionListener(SaveActionListener); btnSaveToFile.setBounds(366, 97, 99, 24); pnlProdGraph.add(btnSaveToFile); pnlPreview = new JPanel(); pnlPreview.setBackground(Color.WHITE); pnlPreview.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, Color.LIGHT_GRAY, null, null, null)); pnlPreview.setBounds(21, 51, 335, 205); pnlProdGraph.add(pnlPreview); pnlPreview.setLayout(null); pnlGraph = new ChartPanel(chart); pnlGraph.setBounds(2, 2, 331, 201); //pnlGraph.setPreferredSize(new java.awt.Dimension(243, 171)); pnlPreview.add(pnlGraph); try { picLabel = new JLabel( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/no_preview.png")))); } catch (IOException e2) { e2.printStackTrace(); } picLabel.setBounds(2, 2, 331, 201); pnlPreview.add(picLabel); pnlGraph.setVisible(false); lblPreview = new JLabel("Graph Preview"); lblPreview.setForeground(Color.DARK_GRAY); lblPreview.setFont(new Font("Tahoma", Font.BOLD, 12)); lblPreview.setEnabled(false); lblPreview.setBounds(21, 24, 99, 16); pnlProdGraph.add(lblPreview); lblType = new JLabel("Graph Type:"); lblType.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblType.setEnabled(false); lblType.setToolTipText("Choose measurement type"); lblType.setBounds(184, 26, 65, 14); pnlProdGraph.add(lblType); btnShowTimings = new JButton("Machine Runs"); btnShowTimings.setFont(new Font("Tahoma", Font.PLAIN, 11)); btnShowTimings.setToolTipText("Show timing diagram for a single machine run"); btnShowTimings.setEnabled(false); btnShowTimings.addActionListener(new BtnShowTimingsActionListener()); btnShowTimings.setBounds(366, 201, 99, 24); pnlProdGraph.add(btnShowTimings); btnDowntime = new JButton("Productivity"); btnDowntime.setFont(new Font("Tahoma", Font.PLAIN, 11)); btnDowntime.setToolTipText("View productivity breakdown charts for the selected machines"); btnDowntime.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { ShowTimingBreakdown(); } }); btnDowntime.setEnabled(false); btnDowntime.setBounds(366, 232, 99, 24); pnlProdGraph.add(btnDowntime); lblbreakdown1 = new JLabel("Show timing"); lblbreakdown1.setEnabled(false); lblbreakdown1.setBounds(370, 166, 99, 14); pnlProdGraph.add(lblbreakdown1); lblbreakdown2 = new JLabel("breakdown for:"); lblbreakdown2.setEnabled(false); lblbreakdown2.setBounds(370, 182, 99, 14); pnlProdGraph.add(lblbreakdown2); panel_3 = new JPanel(); panel_3.setBorder(new TitledBorder(null, "", TitledBorder.LEADING, TitledBorder.TOP, null, null)); panel_3.setBounds(522, 459, 245, 37); pnlCompare.add(panel_3); panel_3.setLayout(null); btnNone = new JButton("None"); btnNone.setFont(new Font("Tahoma", Font.PLAIN, 11)); btnNone.setEnabled(false); btnNone.setBounds(172, 7, 57, 23); panel_3.add(btnNone); btnNone.setToolTipText("Clear machine selection"); btnAll = new JButton("All"); btnAll.setFont(new Font("Tahoma", Font.PLAIN, 11)); btnAll.setEnabled(false); btnAll.setBounds(105, 7, 57, 23); panel_3.add(btnAll); btnAll.setToolTipText("Select all machines"); lblSelect = new JLabel("Select:"); lblSelect.setEnabled(false); lblSelect.setBounds(37, 11, 46, 14); panel_3.add(lblSelect); scrollPane_3 = new JScrollPane(); scrollPane_3.setBorder(null); scrollPane_3.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); scrollPane_3.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); scrollPane_3.setBounds(522, 44, 245, 405); pnlCompare.add(scrollPane_3); panel_10 = new JPanel(); panel_10.setToolTipText( "Click a machine to select it. Select multiple machines to compare their performance under the chosen job schedule."); panel_10.setBackground(Color.WHITE); scrollPane_3.setViewportView(panel_10); panel_10.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, Color.LIGHT_GRAY, null, null, null)); panel_10.setLayout(new BorderLayout(0, 0)); listCompare = new JList(listModel); panel_10.add(listCompare, BorderLayout.NORTH); listCompare.setCellRenderer(new MachineListRenderer()); listCompare.setToolTipText( "Click a machine to select it. Select multiple machines to compare their performance under the chosen job schedule."); listCompare.setBorder(null); listCompare.addListSelectionListener(new MultiSelectionListener()); btnAll.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { int[] count = new int[listModel.size()]; for (int i = 0; i < listModel.size(); ++i) count[i] = i; listCompare.setSelectedIndices(count); } }); btnNone.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { listCompare.clearSelection(); } }); btnShowGraph.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { // TODO base on cmbGraphType: or not if just using chart /*PieChart test = new PieChart("title","this is a pie chart"); test.pack(); test.setVisible(true); test.setLocationRelativeTo(null);*/ JFrame popGraph = new JFrame(); JFreeChart chartBig = null; try { chartBig = (JFreeChart) chart.clone(); } catch (CloneNotSupportedException e) { e.printStackTrace(); } //chartBig.setTitle("Productivity Comparison"); ChartPanel cpanel = new ChartPanel(chartBig); cpanel.setPreferredSize(new java.awt.Dimension(500, 300)); popGraph.setContentPane(cpanel); try { popGraph.setIconImage(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/logo.png"))); } catch (NullPointerException e11) { System.out.println("Image load error"); } catch (IOException e) { e.printStackTrace(); } popGraph.setTitle("Productivity Graph"); popGraph.setSize(450, 300); popGraph.pack(); popGraph.setVisible(true); popGraph.setLocationRelativeTo(frmTitanRoiCalculator); } }); cmbGraphType = new JComboBox(); cmbGraphType.setMaximumRowCount(10); cmbGraphType.setFont(new Font("Tahoma", Font.PLAIN, 11)); cmbGraphType.setEnabled(false); cmbGraphType.setToolTipText("Choose measurement type"); cmbGraphType.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { // Refresh analyses UpdateGraph(); } }); cmbGraphType.setModel(new DefaultComboBoxModel(new String[] { "Schedule Time", "Length per Hour", "Weight per Hour", "Length per Year", "Weight per Year", "Run Percentage" })); cmbGraphType.setSelectedIndex(0); cmbGraphType.setBounds(251, 21, 105, 24); pnlProdGraph.add(cmbGraphType); lblReturnOnInvestment = new JLabel("Return on Investment"); lblReturnOnInvestment.setFont(new Font("Tahoma", Font.BOLD, 18)); lblReturnOnInvestment.setBounds(29, 18, 269, 22); pnlROI.add(lblReturnOnInvestment); lblSelectMultipleMachines_1 = new JLabel( "Select multiple machines from the list on the right, then compare them below"); lblSelectMultipleMachines_1.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblSelectMultipleMachines_1.setBounds(29, 45, 433, 14); pnlROI.add(lblSelectMultipleMachines_1); lblCompareroiList = new JLabel("Machines"); lblCompareroiList.setFont(new Font("Tahoma", Font.BOLD, 12)); lblCompareroiList.setBounds(522, 19, 85, 14); pnlROI.add(lblCompareroiList); panel_4 = new JPanel(); panel_4.setLayout(null); panel_4.setBorder(new TitledBorder(null, "", TitledBorder.LEADING, TitledBorder.TOP, null, null)); panel_4.setBounds(522, 459, 245, 37); pnlROI.add(panel_4); btnROIselectnone = new JButton("None"); btnROIselectnone.setFont(new Font("Tahoma", Font.PLAIN, 11)); btnROIselectnone.setEnabled(false); btnROIselectnone.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { listCompareRoi.clearSelection(); } }); btnROIselectnone.setToolTipText("Clear machine selection"); btnROIselectnone.setBounds(172, 7, 57, 23); panel_4.add(btnROIselectnone); btnROIselectall = new JButton("All"); btnROIselectall.setFont(new Font("Tahoma", Font.PLAIN, 11)); btnROIselectall.setEnabled(false); btnROIselectall.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { int[] count = new int[listModel.size()]; for (int i = 0; i < listModel.size(); ++i) count[i] = i; listCompareRoi.setSelectedIndices(count); } }); btnROIselectall.setToolTipText("Select all machines"); btnROIselectall.setBounds(105, 7, 57, 23); panel_4.add(btnROIselectall); lblROIselect = new JLabel("Select:"); lblROIselect.setEnabled(false); lblROIselect.setBounds(37, 11, 46, 14); panel_4.add(lblROIselect); tabsROI = new JTabbedPane(JTabbedPane.TOP); tabsROI.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent arg0) { try { ResetStatusLabel(); } catch (NullPointerException e) { // Form is still initialising return; } int tab = tabsROI.getSelectedIndex(); switch (tab) { case 0: UpdateROIProd(); break; case 1: UpdateROIEnergy(); break; case 2: UpdateROIMaint(); break; case 3: UpdateROIWaste(); break; } } }); tabsROI.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, null, null, null, null)); tabsROI.setBounds(29, 72, 470, 424); pnlROI.add(tabsROI); pnlProdROI = new JPanel(); pnlProdROI.setBackground(Color.WHITE); tabsROI.addTab("Productivity", null, pnlProdROI, "ROI based on productivity"); pnlProdROI.setLayout(null); lblThisToolIlllustrates = new JLabel( "This tool illlustrates the long-term financial benfits of particular machines and options in"); lblThisToolIlllustrates.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblThisToolIlllustrates.setForeground(Color.GRAY); lblThisToolIlllustrates.setBounds(10, 11, 439, 14); pnlProdROI.add(lblThisToolIlllustrates); lblInTermsOf = new JLabel("terms of productivity gains."); lblInTermsOf.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblInTermsOf.setForeground(Color.GRAY); lblInTermsOf.setBounds(10, 27, 317, 14); pnlProdROI.add(lblInTermsOf); pnlGraphProd = new JPanel(); pnlGraphProd.setBackground(Color.WHITE); pnlGraphProd.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, Color.LIGHT_GRAY, null, null, null)); pnlGraphProd.setBounds(10, 100, 439, 230); pnlProdROI.add(pnlGraphProd); pnlGraphProd.setLayout(null); pnlGraphProdInner = new ChartPanel(null); pnlGraphProdInner.setBounds(2, 2, 435, 226); //pnlGraphProd.add(pnlGraphProdInner); try { lblNoGraph = new JLabel( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/no_preview.png")))); } catch (IOException e2) { e2.printStackTrace(); } lblNoGraph.setBounds(2, 2, 435, 226); pnlGraphProd.add(lblNoGraph); lblSellingPrice = new JLabel("Selling price:"); lblSellingPrice.setEnabled(false); lblSellingPrice.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblSellingPrice.setBounds(10, 52, 60, 14); pnlProdROI.add(lblSellingPrice); txtsellingprice = new JTextField(); txtsellingprice.setToolTipText("Average selling price of the material per unit weight"); txtsellingprice.setEnabled(false); txtsellingprice.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent arg0) { txtsellingprice.selectAll(); } }); txtsellingprice.getDocument().addDocumentListener(new DocumentListener() { @Override public void changedUpdate(DocumentEvent arg0) { } @Override public void insertUpdate(DocumentEvent arg0) { UpdateROIValue(); } @Override public void removeUpdate(DocumentEvent arg0) { UpdateROIValue(); } }); txtsellingprice.setFont(new Font("Tahoma", Font.PLAIN, 11)); txtsellingprice.setBounds(90, 49, 65, 20); pnlProdROI.add(txtsellingprice); txtsellingprice.setColumns(10); lblPerTonne = new JLabel("per tonne"); lblPerTonne.setEnabled(false); lblPerTonne.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblPerTonne.setBounds(160, 52, 70, 14); pnlProdROI.add(lblPerTonne); lblContribution = new JLabel("Contribution:"); lblContribution.setEnabled(false); lblContribution.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblContribution.setBounds(10, 75, 70, 14); pnlProdROI.add(lblContribution); txtcontribution = new JTextField(); txtcontribution.setToolTipText("Contribution percentage"); txtcontribution.setEnabled(false); txtcontribution.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtcontribution.selectAll(); } }); txtcontribution.getDocument().addDocumentListener(new DocumentListener() { @Override public void changedUpdate(DocumentEvent e) { } @Override public void insertUpdate(DocumentEvent e) { UpdateROIValue(); } @Override public void removeUpdate(DocumentEvent e) { UpdateROIValue(); } }); txtcontribution.setFont(new Font("Tahoma", Font.PLAIN, 11)); txtcontribution.setBounds(90, 73, 65, 20); pnlProdROI.add(txtcontribution); txtcontribution.setColumns(10); lblpercent = new JLabel("%"); lblpercent.setEnabled(false); lblpercent.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblpercent.setBounds(160, 76, 11, 14); pnlProdROI.add(lblpercent); lblValueAddedlbl = new JLabel("Value added:"); lblValueAddedlbl.setEnabled(false); lblValueAddedlbl.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblValueAddedlbl.setBounds(279, 52, 70, 14); pnlProdROI.add(lblValueAddedlbl); lblvalueadded = new JLabel("\u00A30.00 / tonne"); lblvalueadded.setToolTipText("Value added per unit weight"); lblvalueadded.setEnabled(false); lblvalueadded.setFont(new Font("Tahoma", Font.BOLD, 12)); lblvalueadded.setBounds(279, 71, 170, 20); pnlProdROI.add(lblvalueadded); cmbMarg1 = new JComboBox(); cmbMarg1.setToolTipText("Old machine"); cmbMarg1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { UpdateROIProd(); } }); cmbMarg1.setEnabled(false); cmbMarg1.setFont(new Font("Tahoma", Font.PLAIN, 11)); cmbMarg1.setBounds(10, 359, 111, 20); pnlProdROI.add(cmbMarg1); cmbMarg2 = new JComboBox(); cmbMarg2.setToolTipText("New machine"); cmbMarg2.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { UpdateROIProd(); } }); cmbMarg2.setEnabled(false); cmbMarg2.setFont(new Font("Tahoma", Font.PLAIN, 11)); cmbMarg2.setBounds(141, 359, 111, 20); pnlProdROI.add(cmbMarg2); lblMarginalImprovement = new JLabel("\u00A30.00 per annum"); lblMarginalImprovement.setToolTipText("Marginal improvement"); lblMarginalImprovement.setEnabled(false); lblMarginalImprovement.setFont(new Font("Tahoma", Font.BOLD, 13)); lblMarginalImprovement.setBounds(279, 358, 170, 20); pnlProdROI.add(lblMarginalImprovement); lblSelectMachines = new JLabel("Select 2 machines to view the marginal improvement between them:"); lblSelectMachines.setForeground(Color.GRAY); lblSelectMachines.setFont(new Font("Tahoma", Font.BOLD, 11)); lblSelectMachines.setBounds(10, 338, 412, 14); pnlProdROI.add(lblSelectMachines); lblpound1 = new JLabel("\u00A3"); lblpound1.setEnabled(false); lblpound1.setBounds(80, 52, 11, 14); pnlProdROI.add(lblpound1); lblTo = new JLabel("to"); lblTo.setForeground(Color.GRAY); lblTo.setFont(new Font("Tahoma", Font.BOLD, 11)); lblTo.setBounds(125, 362, 16, 14); pnlProdROI.add(lblTo); label = new JLabel("="); label.setForeground(Color.GRAY); label.setFont(new Font("Tahoma", Font.BOLD, 13)); label.setBounds(259, 362, 11, 14); pnlProdROI.add(label); pnlEnergy = new JPanel(); pnlEnergy.setBackground(Color.WHITE); tabsROI.addTab("Energy Efficiency", null, pnlEnergy, "ROI based on machine power usage"); pnlEnergy.setLayout(null); lblThisToolHighlights = new JLabel( "This tool highlights power consumption differences between machines, and the resulting"); lblThisToolHighlights.setForeground(Color.GRAY); lblThisToolHighlights.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblThisToolHighlights.setBounds(10, 11, 439, 14); pnlEnergy.add(lblThisToolHighlights); lblImpactOnFinancial = new JLabel("impact on financial returns."); lblImpactOnFinancial.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblImpactOnFinancial.setForeground(Color.GRAY); lblImpactOnFinancial.setBounds(10, 27, 439, 14); pnlEnergy.add(lblImpactOnFinancial); rdbtnAveragePower = new JRadioButton("Average power"); rdbtnAveragePower.setToolTipText("Select \"average power\" input type"); rdbtnAveragePower.setFont(new Font("Tahoma", Font.PLAIN, 11)); rdbtnAveragePower.setEnabled(false); rdbtnAveragePower.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { ClearPowerTxts(); txtaveragepower.setEnabled(true); txthourlyusage.setEnabled(false); txtannualusage.setEnabled(false); lblKw.setEnabled(true); lblKwh.setEnabled(false); lblKwh_1.setEnabled(false); txtaveragepower.requestFocusInWindow(); UpdateEnergyData(); } }); rdbtnAveragePower.setSelected(true); rdbtnAveragePower.setBackground(Color.WHITE); rdbtnAveragePower.setBounds(349, 44, 109, 23); pnlEnergy.add(rdbtnAveragePower); rdbtnHourlyUsage = new JRadioButton("Hourly usage"); rdbtnHourlyUsage.setToolTipText("Select \"hourly usage\" input type"); rdbtnHourlyUsage.setFont(new Font("Tahoma", Font.PLAIN, 11)); rdbtnHourlyUsage.setEnabled(false); rdbtnHourlyUsage.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { ClearPowerTxts(); txtaveragepower.setEnabled(false); txthourlyusage.setEnabled(true); txtannualusage.setEnabled(false); lblKw.setEnabled(false); lblKwh.setEnabled(true); lblKwh_1.setEnabled(false); txthourlyusage.requestFocusInWindow(); UpdateEnergyData(); } }); rdbtnHourlyUsage.setBackground(Color.WHITE); rdbtnHourlyUsage.setBounds(349, 70, 109, 23); pnlEnergy.add(rdbtnHourlyUsage); rdbtnAnnualUsage = new JRadioButton("Annual usage"); rdbtnAnnualUsage.setToolTipText("Select \"annual usage\" input type"); rdbtnAnnualUsage.setFont(new Font("Tahoma", Font.PLAIN, 11)); rdbtnAnnualUsage.setEnabled(false); rdbtnAnnualUsage.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { ClearPowerTxts(); txtaveragepower.setEnabled(false); txthourlyusage.setEnabled(false); txtannualusage.setEnabled(true); lblKw.setEnabled(false); lblKwh.setEnabled(false); lblKwh_1.setEnabled(true); txtannualusage.requestFocusInWindow(); UpdateEnergyData(); } }); rdbtnAnnualUsage.setBackground(Color.WHITE); rdbtnAnnualUsage.setBounds(349, 97, 109, 23); pnlEnergy.add(rdbtnAnnualUsage); rdbtnsPower.add(rdbtnAveragePower); rdbtnsPower.add(rdbtnHourlyUsage); rdbtnsPower.add(rdbtnAnnualUsage); lblEnergyCostl = new JLabel("Energy cost:"); lblEnergyCostl.setEnabled(false); lblEnergyCostl.setFont(new Font("Tahoma", Font.BOLD, 11)); lblEnergyCostl.setBounds(10, 101, 72, 14); pnlEnergy.add(lblEnergyCostl); lblpound2 = new JLabel("\u00A3"); lblpound2.setEnabled(false); lblpound2.setFont(new Font("Tahoma", Font.PLAIN, 12)); lblpound2.setBounds(91, 100, 13, 14); pnlEnergy.add(lblpound2); txtenergycost = new JTextField(); txtenergycost.setToolTipText("Raw energy cost, per kWh"); txtenergycost.setEnabled(false); txtenergycost.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent arg0) { txtenergycost.selectAll(); } }); txtenergycost.getDocument().addDocumentListener(new DocumentListener() { @Override public void removeUpdate(DocumentEvent arg0) { UpdateROIEnergy(); } @Override public void insertUpdate(DocumentEvent arg0) { UpdateROIEnergy(); } @Override public void changedUpdate(DocumentEvent arg0) { } }); txtenergycost.setFont(new Font("Tahoma", Font.PLAIN, 12)); txtenergycost.setBounds(102, 98, 74, 20); pnlEnergy.add(txtenergycost); txtenergycost.setColumns(10); lblPerKwh = new JLabel("per kWh"); lblPerKwh.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblPerKwh.setEnabled(false); lblPerKwh.setBounds(179, 101, 46, 14); pnlEnergy.add(lblPerKwh); txtaveragepower = new JTextField(); txtaveragepower.setToolTipText("Average power in kW"); txtaveragepower.setEnabled(false); txtaveragepower.getDocument().addDocumentListener(new DocumentListener() { @Override public void removeUpdate(DocumentEvent arg0) { UpdateEnergyData(); } @Override public void insertUpdate(DocumentEvent arg0) { UpdateEnergyData(); } @Override public void changedUpdate(DocumentEvent arg0) { } }); txtaveragepower.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtaveragepower.selectAll(); } }); txtaveragepower.addMouseListener(new MouseAdapter() { @Override public void mouseReleased(MouseEvent arg0) { if (txtLimitRunSpeed.contains(arg0.getPoint())) { if (!txtaveragepower.isEnabled()) { rdbtnAveragePower.doClick(); } } } }); txtaveragepower.setBounds(233, 47, 86, 20); pnlEnergy.add(txtaveragepower); txtaveragepower.setColumns(10); txthourlyusage = new JTextField(); txthourlyusage.setToolTipText("Average hourly energy usage"); txthourlyusage.setEnabled(false); txthourlyusage.getDocument().addDocumentListener(new DocumentListener() { @Override public void removeUpdate(DocumentEvent e) { UpdateEnergyData(); } @Override public void insertUpdate(DocumentEvent e) { UpdateEnergyData(); } @Override public void changedUpdate(DocumentEvent e) { } }); txthourlyusage.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txthourlyusage.selectAll(); } }); txthourlyusage.addMouseListener(new MouseAdapter() { @Override public void mouseReleased(MouseEvent arg0) { if (txtLimitRunSpeed.contains(arg0.getPoint())) { if (!txthourlyusage.isEnabled()) rdbtnHourlyUsage.doClick(); } } }); txthourlyusage.setColumns(10); txthourlyusage.setBounds(233, 73, 86, 20); pnlEnergy.add(txthourlyusage); txtannualusage = new JTextField(); txtannualusage.setToolTipText("Average annual energy usage"); txtannualusage.setEnabled(false); txtannualusage.getDocument().addDocumentListener(new DocumentListener() { @Override public void removeUpdate(DocumentEvent e) { UpdateEnergyData(); } @Override public void insertUpdate(DocumentEvent e) { UpdateEnergyData(); } @Override public void changedUpdate(DocumentEvent e) { } }); txtannualusage.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtannualusage.selectAll(); } }); txtannualusage.addMouseListener(new MouseAdapter() { @Override public void mouseReleased(MouseEvent arg0) { if (txtLimitRunSpeed.contains(arg0.getPoint())) { if (!txtannualusage.isEnabled()) rdbtnAnnualUsage.doClick(); } } }); txtannualusage.setColumns(10); txtannualusage.setBounds(233, 99, 86, 20); pnlEnergy.add(txtannualusage); cmbMachineEnergy = new JComboBox(); cmbMachineEnergy.setEnabled(false); cmbMachineEnergy.setToolTipText("Select machine to edit"); cmbMachineEnergy.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { UpdateEnergyView(); } }); cmbMachineEnergy.setBounds(69, 46, 152, 23); pnlEnergy.add(cmbMachineEnergy); lblMachine_1 = new JLabel("Machine:"); lblMachine_1.setEnabled(false); lblMachine_1.setFont(new Font("Tahoma", Font.BOLD, 11)); lblMachine_1.setBounds(10, 50, 59, 14); pnlEnergy.add(lblMachine_1); lblKw = new JLabel("kW"); lblKw.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblKw.setEnabled(false); lblKw.setBounds(323, 50, 15, 14); pnlEnergy.add(lblKw); lblKwh = new JLabel("kWh"); lblKwh.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblKwh.setEnabled(false); lblKwh.setBounds(323, 76, 26, 14); pnlEnergy.add(lblKwh); lblKwh_1 = new JLabel("MWh"); lblKwh_1.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblKwh_1.setEnabled(false); lblKwh_1.setBounds(323, 102, 26, 14); pnlEnergy.add(lblKwh_1); pnlGraphEnergy = new JPanel(); pnlGraphEnergy.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, Color.LIGHT_GRAY, null, null, null)); pnlGraphEnergy.setBackground(Color.WHITE); pnlGraphEnergy.setBounds(10, 126, 439, 226); pnlEnergy.add(pnlGraphEnergy); pnlGraphEnergy.setLayout(null); try { lblNoGraph2 = new JLabel( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/no_preview.png")))); } catch (IOException e2) { e2.printStackTrace(); } lblNoGraph2.setBounds(2, 2, 435, 222); pnlGraphEnergy.add(lblNoGraph2); lblPleaseSetPower = new JLabel("Please set power usage for each machine"); lblPleaseSetPower.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblPleaseSetPower.setEnabled(false); lblPleaseSetPower.setForeground(Color.GRAY); lblPleaseSetPower.setBounds(10, 74, 215, 14); pnlEnergy.add(lblPleaseSetPower); lblMarginalEnergy = new JLabel("\u00A30.00 per annum"); lblMarginalEnergy.setToolTipText("Marginal improvement"); lblMarginalEnergy.setFont(new Font("Tahoma", Font.BOLD, 13)); lblMarginalEnergy.setEnabled(false); lblMarginalEnergy.setBounds(279, 358, 170, 20); pnlEnergy.add(lblMarginalEnergy); label_4 = new JLabel("="); label_4.setForeground(Color.GRAY); label_4.setFont(new Font("Tahoma", Font.BOLD, 13)); label_4.setBounds(259, 362, 11, 14); pnlEnergy.add(label_4); cmbMargEnergy2 = new JComboBox(); cmbMargEnergy2.setToolTipText("New machine"); cmbMargEnergy2.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { UpdateROIEnergy(); } }); cmbMargEnergy2.setFont(new Font("Tahoma", Font.PLAIN, 11)); cmbMargEnergy2.setEnabled(false); cmbMargEnergy2.setBounds(141, 359, 111, 20); pnlEnergy.add(cmbMargEnergy2); label_5 = new JLabel("to"); label_5.setForeground(Color.GRAY); label_5.setFont(new Font("Tahoma", Font.BOLD, 11)); label_5.setBounds(125, 362, 16, 14); pnlEnergy.add(label_5); cmbMargEnergy1 = new JComboBox(); cmbMargEnergy1.setToolTipText("Old machine"); cmbMargEnergy1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { UpdateROIEnergy(); } }); cmbMargEnergy1.setFont(new Font("Tahoma", Font.PLAIN, 11)); cmbMargEnergy1.setEnabled(false); cmbMargEnergy1.setBounds(10, 359, 111, 20); pnlEnergy.add(cmbMargEnergy1); pnlMaint = new JPanel(); pnlMaint.setBackground(Color.WHITE); tabsROI.addTab("Maintenance", null, pnlMaint, "ROI based on maintenance costs"); tabsROI.setMnemonicAt(2, 65); pnlMaint.setLayout(null); lblThisToolDemonstrates_1 = new JLabel( "This tool demonstrates the maintenance reduction benefits of machines."); lblThisToolDemonstrates_1.setBounds(10, 11, 421, 14); lblThisToolDemonstrates_1.setForeground(Color.GRAY); lblThisToolDemonstrates_1.setFont(new Font("Tahoma", Font.PLAIN, 11)); pnlMaint.add(lblThisToolDemonstrates_1); lblMaintenanceHoursPer = new JLabel("Annual downtime:"); lblMaintenanceHoursPer.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblMaintenanceHoursPer.setEnabled(false); lblMaintenanceHoursPer.setBounds(10, 64, 86, 14); pnlMaint.add(lblMaintenanceHoursPer); lblRepairCostsPer = new JLabel("Labour costs per hour:"); lblRepairCostsPer.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblRepairCostsPer.setEnabled(false); lblRepairCostsPer.setBounds(255, 36, 111, 14); pnlMaint.add(lblRepairCostsPer); lblPartsCostsPer = new JLabel("Parts costs per year:"); lblPartsCostsPer.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblPartsCostsPer.setEnabled(false); lblPartsCostsPer.setBounds(255, 64, 101, 14); pnlMaint.add(lblPartsCostsPer); cmbMachinesmaintenance = new JComboBox(); cmbMachinesmaintenance.setEnabled(false); cmbMachinesmaintenance.setToolTipText("Please set maintenance costs for each machine"); cmbMachinesmaintenance.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { ViewMaintCosts(); } }); cmbMachinesmaintenance.setBounds(79, 30, 152, 23); pnlMaint.add(cmbMachinesmaintenance); txtmaintenancehours = new JTextField(); txtmaintenancehours.setToolTipText("Hours per year for which machine is not running due to maintenance"); txtmaintenancehours.setEnabled(false); txtmaintenancehours.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtmaintenancehours.selectAll(); } }); txtmaintenancehours.getDocument().addDocumentListener(new DocumentListener() { @Override public void removeUpdate(DocumentEvent e) { UpdateMaintCosts(); } @Override public void insertUpdate(DocumentEvent e) { UpdateMaintCosts(); } @Override public void changedUpdate(DocumentEvent e) { } }); txtmaintenancehours.setBounds(106, 61, 67, 20); pnlMaint.add(txtmaintenancehours); txtmaintenancehours.setColumns(10); txtmaintenanceperhour = new JTextField(); txtmaintenanceperhour.setToolTipText("Hourly labour costs for maintenance"); txtmaintenanceperhour.setEnabled(false); txtmaintenanceperhour.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtmaintenanceperhour.selectAll(); } }); txtmaintenanceperhour.getDocument().addDocumentListener(new DocumentListener() { @Override public void removeUpdate(DocumentEvent e) { UpdateMaintCosts(); } @Override public void insertUpdate(DocumentEvent e) { UpdateMaintCosts(); } @Override public void changedUpdate(DocumentEvent e) { } }); txtmaintenanceperhour.setColumns(10); txtmaintenanceperhour.setBounds(382, 33, 67, 20); pnlMaint.add(txtmaintenanceperhour); txtmaintenanceparts = new JTextField(); txtmaintenanceparts.setToolTipText("Annual cost of maintenance parts for this machine"); txtmaintenanceparts.setEnabled(false); txtmaintenanceparts.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtmaintenanceparts.selectAll(); } }); txtmaintenanceparts.getDocument().addDocumentListener(new DocumentListener() { @Override public void removeUpdate(DocumentEvent e) { UpdateMaintCosts(); } @Override public void insertUpdate(DocumentEvent e) { UpdateMaintCosts(); } @Override public void changedUpdate(DocumentEvent e) { } }); txtmaintenanceparts.setColumns(10); txtmaintenanceparts.setBounds(382, 61, 67, 20); pnlMaint.add(txtmaintenanceparts); lbltotalmaintcost = new JLabel("\u00A30.00 / year"); lbltotalmaintcost.setToolTipText("Total annual spend on maintenance for this machine (labour + parts)"); lbltotalmaintcost.setForeground(Color.GRAY); lbltotalmaintcost.setEnabled(false); lbltotalmaintcost.setHorizontalAlignment(SwingConstants.LEFT); lbltotalmaintcost.setFont(new Font("Tahoma", Font.BOLD, 11)); lbltotalmaintcost.setBounds(344, 87, 105, 14); pnlMaint.add(lbltotalmaintcost); lblpound10 = new JLabel("\u00A3"); lblpound10.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblpound10.setEnabled(false); lblpound10.setBounds(373, 36, 11, 14); pnlMaint.add(lblpound10); lblpound11 = new JLabel("\u00A3"); lblpound11.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblpound11.setEnabled(false); lblpound11.setBounds(373, 64, 11, 14); pnlMaint.add(lblpound11); pnlGraphMaint = new JPanel(); pnlGraphMaint.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, Color.LIGHT_GRAY, null, null, null)); pnlGraphMaint.setBackground(Color.WHITE); pnlGraphMaint.setBounds(10, 110, 439, 242); pnlMaint.add(pnlGraphMaint); pnlGraphMaint.setLayout(null); try { lblNoGraph3 = new JLabel( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/no_preview.png")))); } catch (IOException e2) { e2.printStackTrace(); } lblNoGraph3.setBounds(2, 2, 435, 238); pnlGraphMaint.add(lblNoGraph3); cmbMargMaint1 = new JComboBox(); cmbMargMaint1.setToolTipText("Old machine"); cmbMargMaint1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { UpdateROIMaint(); } }); cmbMargMaint1.setFont(new Font("Tahoma", Font.PLAIN, 11)); cmbMargMaint1.setEnabled(false); cmbMargMaint1.setBounds(10, 359, 111, 20); pnlMaint.add(cmbMargMaint1); label_8 = new JLabel("to"); label_8.setForeground(Color.GRAY); label_8.setFont(new Font("Tahoma", Font.BOLD, 11)); label_8.setBounds(125, 362, 16, 14); pnlMaint.add(label_8); cmbMargMaint2 = new JComboBox(); cmbMargMaint2.setToolTipText("New machine"); cmbMargMaint2.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { UpdateROIMaint(); } }); cmbMargMaint2.setFont(new Font("Tahoma", Font.PLAIN, 11)); cmbMargMaint2.setEnabled(false); cmbMargMaint2.setBounds(141, 359, 111, 20); pnlMaint.add(cmbMargMaint2); label_9 = new JLabel("="); label_9.setForeground(Color.GRAY); label_9.setFont(new Font("Tahoma", Font.BOLD, 13)); label_9.setBounds(259, 362, 11, 14); pnlMaint.add(label_9); lblMarginalMaint = new JLabel("\u00A30.00 per annum"); lblMarginalMaint.setToolTipText("Marginal improvement"); lblMarginalMaint.setFont(new Font("Tahoma", Font.BOLD, 13)); lblMarginalMaint.setEnabled(false); lblMarginalMaint.setBounds(279, 358, 170, 20); pnlMaint.add(lblMarginalMaint); lblProdLoss = new JLabel("\u00A30.00 / year"); lblProdLoss.setToolTipText("Loss in production value due to downtime"); lblProdLoss.setForeground(Color.GRAY); lblProdLoss.setEnabled(false); lblProdLoss.setHorizontalAlignment(SwingConstants.LEFT); lblProdLoss.setFont(new Font("Tahoma", Font.BOLD, 11)); lblProdLoss.setBounds(106, 87, 125, 14); pnlMaint.add(lblProdLoss); lblHrs_1 = new JLabel("hrs"); lblHrs_1.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblHrs_1.setEnabled(false); lblHrs_1.setBounds(180, 64, 16, 14); pnlMaint.add(lblHrs_1); label_10 = new JLabel("Machine:"); label_10.setEnabled(false); label_10.setFont(new Font("Tahoma", Font.BOLD, 11)); label_10.setBounds(10, 34, 59, 14); pnlMaint.add(label_10); label_11 = new JLabel("="); label_11.setEnabled(false); label_11.setForeground(Color.GRAY); label_11.setFont(new Font("Tahoma", Font.BOLD, 13)); label_11.setBounds(88, 87, 11, 14); pnlMaint.add(label_11); label_12 = new JLabel("="); label_12.setEnabled(false); label_12.setForeground(Color.GRAY); label_12.setFont(new Font("Tahoma", Font.BOLD, 13)); label_12.setBounds(323, 87, 11, 14); pnlMaint.add(label_12); lblAnnualTotal = new JLabel("Annual total"); lblAnnualTotal.setEnabled(false); lblAnnualTotal.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblAnnualTotal.setBounds(255, 87, 67, 14); pnlMaint.add(lblAnnualTotal); lblProductionLoss = new JLabel("Production loss"); lblProductionLoss.setEnabled(false); lblProductionLoss.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblProductionLoss.setBounds(10, 87, 77, 14); pnlMaint.add(lblProductionLoss); pnlWaste = new JPanel(); pnlWaste.setBackground(Color.WHITE); tabsROI.addTab("Waste Reduction", null, pnlWaste, "ROI based on waste reduction"); pnlWaste.setLayout(null); lblThisToolDemonstrates = new JLabel( "This tool demonstrates the waste reduction capabilities of particular machines."); lblThisToolDemonstrates.setForeground(Color.GRAY); lblThisToolDemonstrates.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblThisToolDemonstrates.setBounds(10, 11, 439, 14); pnlWaste.add(lblThisToolDemonstrates); lblWasteSavedPer_1 = new JLabel("Waste saved per splice due to flag detection camera:"); lblWasteSavedPer_1.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblWasteSavedPer_1.setEnabled(false); lblWasteSavedPer_1.setBounds(10, 39, 256, 14); pnlWaste.add(lblWasteSavedPer_1); txtwastesavedflags = new JTextField(); txtwastesavedflags.setToolTipText("Saving per splice"); txtwastesavedflags.setEnabled(false); txtwastesavedflags.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtwastesavedflags.selectAll(); } }); txtwastesavedflags.getDocument().addDocumentListener(new DocumentListener() { @Override public void removeUpdate(DocumentEvent e) { UpdateROIWaste(); } @Override public void insertUpdate(DocumentEvent e) { UpdateROIWaste(); } @Override public void changedUpdate(DocumentEvent e) { } }); txtwastesavedflags.setBounds(286, 36, 86, 20); pnlWaste.add(txtwastesavedflags); txtwastesavedflags.setColumns(10); lblM_1 = new JLabel("m"); lblM_1.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblM_1.setEnabled(false); lblM_1.setBounds(378, 39, 46, 14); pnlWaste.add(lblM_1); lblWasteSavedPer_2 = new JLabel("Waste saved per mother roll due to alignment guide:"); lblWasteSavedPer_2.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblWasteSavedPer_2.setEnabled(false); lblWasteSavedPer_2.setBounds(10, 64, 256, 14); pnlWaste.add(lblWasteSavedPer_2); txtwastesavedguide = new JTextField(); txtwastesavedguide.setToolTipText("Saving per mother roll"); txtwastesavedguide.setEnabled(false); txtwastesavedguide.getDocument().addDocumentListener(new DocumentListener() { @Override public void removeUpdate(DocumentEvent e) { UpdateROIWaste(); } @Override public void insertUpdate(DocumentEvent e) { UpdateROIWaste(); } @Override public void changedUpdate(DocumentEvent e) { } }); txtwastesavedguide.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtwastesavedguide.selectAll(); } }); txtwastesavedguide.setBounds(286, 61, 86, 20); pnlWaste.add(txtwastesavedguide); txtwastesavedguide.setColumns(10); lblM_2 = new JLabel("m"); lblM_2.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblM_2.setEnabled(false); lblM_2.setBounds(378, 64, 46, 14); pnlWaste.add(lblM_2); pnlGraphWaste = new JPanel(); pnlGraphWaste.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, Color.LIGHT_GRAY, null, null, null)); pnlGraphWaste.setBackground(Color.WHITE); pnlGraphWaste.setBounds(10, 90, 439, 262); pnlWaste.add(pnlGraphWaste); pnlGraphWaste.setLayout(null); try { lblNoGraph4 = new JLabel( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/no_preview.png")))); } catch (IOException e2) { e2.printStackTrace(); } lblNoGraph4.setBounds(2, 2, 435, 258); pnlGraphWaste.add(lblNoGraph4); cmbMargWaste1 = new JComboBox(); cmbMargWaste1.setToolTipText("Old machine"); cmbMargWaste1.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { UpdateROIWaste(); } }); cmbMargWaste1.setFont(new Font("Tahoma", Font.PLAIN, 11)); cmbMargWaste1.setEnabled(false); cmbMargWaste1.setBounds(10, 359, 111, 20); pnlWaste.add(cmbMargWaste1); label_1 = new JLabel("to"); label_1.setForeground(Color.GRAY); label_1.setFont(new Font("Tahoma", Font.BOLD, 11)); label_1.setBounds(125, 362, 16, 14); pnlWaste.add(label_1); cmbMargWaste2 = new JComboBox(); cmbMargWaste2.setToolTipText("New machine"); cmbMargWaste2.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { UpdateROIWaste(); } }); cmbMargWaste2.setFont(new Font("Tahoma", Font.PLAIN, 11)); cmbMargWaste2.setEnabled(false); cmbMargWaste2.setBounds(141, 359, 111, 20); pnlWaste.add(cmbMargWaste2); label_6 = new JLabel("="); label_6.setForeground(Color.GRAY); label_6.setFont(new Font("Tahoma", Font.BOLD, 13)); label_6.setBounds(259, 362, 11, 14); pnlWaste.add(label_6); lblMarginalWaste = new JLabel("0.00m per annum"); lblMarginalWaste.setToolTipText("Marginal improvement"); lblMarginalWaste.setFont(new Font("Tahoma", Font.BOLD, 13)); lblMarginalWaste.setEnabled(false); lblMarginalWaste.setBounds(279, 355, 170, 16); pnlWaste.add(lblMarginalWaste); lblMarginalWasteValue = new JLabel("(\u00A30.00 per annum)"); lblMarginalWasteValue.setToolTipText("Marginal improvement value"); lblMarginalWasteValue.setForeground(Color.GRAY); lblMarginalWasteValue.setFont(new Font("Tahoma", Font.BOLD, 11)); lblMarginalWasteValue.setBounds(279, 370, 170, 16); pnlWaste.add(lblMarginalWasteValue); machNames = new HashSet<String>(); jobNames = new HashSet<String>(); lblStatus = new JLabel(" Ready."); lblStatus.setFont(new Font("Tahoma", Font.PLAIN, 12)); frmTitanRoiCalculator.getContentPane().add(lblStatus, BorderLayout.SOUTH); lblmmin = new JLabel("(m/min)"); lblmmin.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblmmin.setEnabled(false); lblmmin.setBounds(206, 168, 44, 14); pnlJobs.add(lblmmin); objfilter = new OBJfilter(1); // labels for unit conversion labs = new JLabel[7]; labs[0] = lblmm0; labs[1] = lblmm1; labs[2] = lblmm2; labs[3] = lblgm3; labs[4] = lblmm3; labs[5] = lblmicro0; lblGsm = new JLabel("(gsm)"); lblGsm.setToolTipText("Switch the input type for density between gsm and g/cc"); lblGsm.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblGsm.setEnabled(false); lblGsm.addMouseListener(new MouseAdapter() { @Override public void mouseReleased(MouseEvent arg0) { if (lblGsm.isEnabled() && lblGsm.contains(arg0.getPoint())) { jobFormReady = false; try { //double oldval = Double.parseDouble(txtDensity.getText()); //double thickness = Double.parseDouble(txtThickness.getText()); double oldval = ((Job) listJobs.getSelectedValue()).getDensity(); double thickness = ((Job) listJobs.getSelectedValue()).getThickness(); if (lblGsm.getText().equals("(gsm)")) { lblGsm.setText("(g/cc)"); label_3.setVisible(false); lblgm3.setText("(gsm)"); txtDensity.setText(Double.toString(roundTwoDecimals(oldval * thickness))); ((Job) listJobs.getSelectedValue()).gsm = true; } else { lblGsm.setText("(gsm)"); label_3.setVisible(true); lblgm3.setText("(g/cm )"); txtDensity.setText(Double.toString(roundTwoDecimals(oldval))); ((Job) listJobs.getSelectedValue()).gsm = false; } } catch (Exception e) { lblGsm.setText("(gsm)"); label_3.setVisible(true); lblgm3.setText("(g/cm )"); txtDensity.setText("0.92"); } jobFormReady = true; } } @Override public void mouseEntered(MouseEvent arg0) { lblGsm.setForeground(new Color(0, 0, 128)); } @Override public void mouseExited(MouseEvent e) { lblGsm.setForeground(Color.black); } }); lblGsm.setForeground(new Color(0, 0, 0)); lblGsm.setCursor(new Cursor(Cursor.HAND_CURSOR)); lblGsm.setBounds(177, 102, 46, 14); pnlMaterials.add(lblGsm); lblOr = new JLabel("or:"); lblOr.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblOr.setEnabled(false); lblOr.setBounds(155, 102, 14, 14); pnlMaterials.add(lblOr); labs[6] = lblmmin; cmbUnwindType = new JComboBox(); cmbUnwindType.setToolTipText("Type of measure to use for the unwind quantity above"); cmbUnwindType.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { UpdateUnwindAmount(); } }); cmbUnwindType.setEnabled(false); cmbUnwindType .setModel(new DefaultComboBoxModel(new String[] { "Length (m)", "Weight (kg)", "Diameter (mm)" })); cmbUnwindType.setBounds(92, 124, 95, 20); pnlUnwinds.add(cmbUnwindType); txtWebWidth = new JTextField(); txtWebWidth.setToolTipText("Width of mother rolls"); txtWebWidth.setText("1350"); txtWebWidth.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent arg0) { txtWebWidth.selectAll(); } }); txtWebWidth.setEnabled(false); txtWebWidth.getDocument().addDocumentListener(new DocumentListener() { @Override public void removeUpdate(DocumentEvent arg0) { UpdateJob(); } @Override public void insertUpdate(DocumentEvent arg0) { UpdateJob(); } @Override public void changedUpdate(DocumentEvent arg0) { } }); txtWebWidth.setBounds(92, 26, 86, 20); pnlUnwinds.add(txtWebWidth); txtWebWidth.setColumns(10); lblAverageFlags = new JLabel("Average Flags:"); lblAverageFlags.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblAverageFlags.setToolTipText("The average number of flags in each mother roll"); lblAverageFlags.setEnabled(false); lblAverageFlags.setBounds(14, 79, 75, 14); pnlUnwinds.add(lblAverageFlags); txtFlagCount = new JTextField(); txtFlagCount.setToolTipText("The average number of flags in each mother roll"); txtFlagCount.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent arg0) { txtFlagCount.selectAll(); } }); txtFlagCount.getDocument().addDocumentListener(new JobInputChangeListener()); txtFlagCount.setEnabled(false); txtFlagCount.setText("1"); txtFlagCount.setBounds(92, 76, 43, 20); pnlUnwinds.add(txtFlagCount); txtFlagCount.setColumns(10); lblPerRoll = new JLabel("per roll"); lblPerRoll.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblPerRoll.setEnabled(false); lblPerRoll.setBounds(140, 79, 46, 14); pnlUnwinds.add(lblPerRoll); txtLimitRunSpeed = new JTextField(); txtLimitRunSpeed.setToolTipText( "Override for top machine speed (may be required for particular materials or environments)"); txtLimitRunSpeed.addMouseListener(new MouseAdapter() { @Override public void mouseReleased(MouseEvent arg0) { if (txtLimitRunSpeed.contains(arg0.getPoint())) { txtLimitRunSpeed.setEnabled(true); chckbxLimitRunSpeed.setSelected(true); txtLimitRunSpeed.requestFocusInWindow(); txtLimitRunSpeed.selectAll(); UpdateJob(); } } }); txtLimitRunSpeed.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { if (txtLimitRunSpeed.isEnabled()) { txtLimitRunSpeed.selectAll(); chckbxLimitRunSpeed.setSelected(true); } } }); txtLimitRunSpeed.getDocument().addDocumentListener(new JobInputChangeListener()); txtLimitRunSpeed.setEnabled(false); txtLimitRunSpeed.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { chckbxLimitRunSpeed.setSelected(true); } }); txtLimitRunSpeed.setText("800"); txtLimitRunSpeed.setColumns(10); txtLimitRunSpeed.setBounds(130, 165, 65, 20); pnlJobs.add(txtLimitRunSpeed); cmbRewindType = new JComboBox(); cmbRewindType.setToolTipText("Type of measure to use for rewind output above"); cmbRewindType.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { UpdateRewindAmount(); //UpdateJob(); } }); cmbRewindType.setEnabled(false); cmbRewindType .setModel(new DefaultComboBoxModel(new String[] { "Length (m)", "Weight (kg)", "Diameter (mm)" })); cmbRewindType.setBounds(109, 218, 95, 20); pnlJobs.add(cmbRewindType); chckbxLimitRunSpeed = new JCheckBox(""); chckbxLimitRunSpeed.setToolTipText( "Override for top machine speed (may be required for particular materials or environments)"); chckbxLimitRunSpeed.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (chckbxLimitRunSpeed.isSelected()) { txtLimitRunSpeed.setEnabled(true); txtLimitRunSpeed.requestFocusInWindow(); txtLimitRunSpeed.selectAll(); } else { txtLimitRunSpeed.setEnabled(false); } UpdateJob(); } }); chckbxLimitRunSpeed.setEnabled(false); chckbxLimitRunSpeed.setBounds(105, 164, 20, 20); pnlJobs.add(chckbxLimitRunSpeed); lblLimitRunSpeed = new JLabel("Speed Limit:"); lblLimitRunSpeed.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblLimitRunSpeed.setToolTipText( "Override for top machine speed (may be required for particular materials or environments)"); lblLimitRunSpeed.setEnabled(false); lblLimitRunSpeed.setBounds(47, 168, 59, 14); pnlJobs.add(lblLimitRunSpeed); lblKnifeType = new JLabel("Knife Type:"); lblKnifeType.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblKnifeType.setToolTipText("Select knife type for this job"); lblKnifeType.setEnabled(false); lblKnifeType.setHorizontalAlignment(SwingConstants.RIGHT); lblKnifeType.setBounds(46, 89, 59, 14); pnlJobs.add(lblKnifeType); cmbKnifeType = new JComboBox(); cmbKnifeType.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { UpdateJob(); } }); cmbKnifeType.setModel(new DefaultComboBoxModel(new String[] { "Razor in Air", "Rotary Shear" })); cmbKnifeType.setToolTipText("Select knife type for this job"); cmbKnifeType.setEnabled(false); cmbKnifeType.setBounds(109, 86, 95, 20); pnlJobs.add(cmbKnifeType); tabbedPane.setMnemonicAt(0, KeyEvent.VK_M); tabbedPane.setMnemonicAt(1, KeyEvent.VK_J); tabbedPane.setMnemonicAt(2, KeyEvent.VK_S); tabbedPane.setMnemonicAt(3, KeyEvent.VK_P); tabbedPane.setMnemonicAt(4, KeyEvent.VK_R); tabsROI.setMnemonicAt(0, KeyEvent.VK_D); tabsROI.setMnemonicAt(1, KeyEvent.VK_N); tabsROI.setMnemonicAt(3, KeyEvent.VK_W); scrollPane_4 = new JScrollPane(); scrollPane_4.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); scrollPane_4.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); scrollPane_4.setBorder(null); scrollPane_4.setBounds(522, 44, 245, 405); pnlROI.add(scrollPane_4); panel_11 = new JPanel(); panel_11.setToolTipText( "Click a machine to select it. Select two or more machines to compare their ROI measures."); scrollPane_4.setViewportView(panel_11); panel_11.setBackground(Color.WHITE); panel_11.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, Color.LIGHT_GRAY, null, null, null)); panel_11.setLayout(new BorderLayout(0, 0)); listCompareRoi = new JList(listModel); panel_11.add(listCompareRoi, BorderLayout.NORTH); listCompareRoi.setToolTipText( "Click a machine to select it. Select two or more machines to compare their ROI measures."); listCompareRoi.setBorder(null); listCompareRoi.setSelectionModel(new DefaultListSelectionModel() { private static final long serialVersionUID = 1L; boolean gestureStarted = false; @Override public void setSelectionInterval(int index0, int index1) { if (!gestureStarted) { if (isSelectedIndex(index0)) { super.removeSelectionInterval(index0, index1); } else { super.addSelectionInterval(index0, index1); } } gestureStarted = true; } @Override public void setValueIsAdjusting(boolean isAdjusting) { if (isAdjusting == false) { gestureStarted = false; } } }); listCompareRoi.addListSelectionListener(new ROIListSelectionListener()); listCompareRoi.setCellRenderer(new MachineListRenderer()); listCompare.setSelectionModel(listCompareRoi.getSelectionModel()); btnJobUp = new JButton(""); btnJobUp.setToolTipText("Move job up"); btnJobUp.addActionListener(new JobUpListener()); try { btnJobUp.setIcon(new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/up.png")))); btnJobUp.setRolloverEnabled(true); btnJobUp.setRolloverIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/up_over.png")))); btnJobUp.setDisabledIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/up_dis.png")))); } catch (NullPointerException e11) { System.out.println("Image load error"); } catch (IOException e1) { e1.printStackTrace(); } btnJobUp.setEnabled(false); btnJobUp.setBounds(700, 463, 30, 30); pnlJob.add(btnJobUp); btnJobDown = new JButton(""); btnJobDown.setToolTipText("Move job down"); btnJobDown.addActionListener(new JobDownListener()); try { btnJobDown.setIcon(new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/down.png")))); btnJobDown.setRolloverEnabled(true); btnJobDown.setRolloverIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/down_over.png")))); btnJobDown.setDisabledIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/down_dis.png")))); } catch (NullPointerException e11) { System.out.println("Image load error"); } catch (IOException e1) { e1.printStackTrace(); } btnJobDown.setEnabled(false); btnJobDown.setBounds(737, 463, 30, 30); pnlJob.add(btnJobDown); btnNewJob = new JButton("Add New"); btnNewJob.setFont(new Font("Tahoma", Font.BOLD, 11)); btnNewJob.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { jobFormReady = false; ResetStatusLabel(); EnableJobForm(); // new ResetJobForm(); lblGsm.setText("(gsm)"); label_3.setVisible(true); lblgm3.setText("(g/cm )"); txtDensity.setText("0.92"); btnJobDelete.setEnabled(true); btnAddAll.setEnabled(true); /*if(listJobs.getSelectedIndex() == 0) btnJobUp.setEnabled(false); else btnJobUp.setEnabled(true); if(listJobs.getSelectedIndex() == jobModel.getSize()-1) btnJobDown.setEnabled(false); else btnJobDown.setEnabled(true);*/ int index = listJobs.getSelectedIndex(); int size = jobModel.getSize(); if (size >= Consts.JOB_LIST_LIMIT) { // Max list size ShowMessage("Maximum number of jobs allocated. Please delete before attempting to add more."); return; } String newName = getUniqueJobName("Job"); txtJobName.setText(newName); job = new Job(newName); jobNames.add(newName.toLowerCase()); //If no selection or if item in last position is selected, //add the new one to end of list, and select new one. if (index == -1 || (index + 1 == size)) { jobModel.addElement(job); listJobs.setSelectedIndex(size); listJobsAvail.setSelectedIndex(size); if (size > 0) btnJobUp.setEnabled(true); //Otherwise insert the new one after the current selection, //and select new one. } else { jobModel.insertElementAt(job, index + 1); listJobs.setSelectedIndex(index + 1); listJobsAvail.setSelectedIndex(index + 1); } // TODO don't reset form, or add copy button ResetStatusLabel(); jobFormReady = true; UpdateJob(); txtJobName.requestFocusInWindow(); } }); try { btnNewJob.setIcon(new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/plus.png")))); } catch (IOException e1) { e1.printStackTrace(); } btnNewJob.setToolTipText("Add new job"); btnNewJob.setBounds(522, 460, 110, 36); pnlJob.add(btnNewJob); lblJobConfiguration = new JLabel("Job Configuration"); lblJobConfiguration.setFont(new Font("Tahoma", Font.BOLD, 18)); lblJobConfiguration.setBounds(29, 18, 269, 22); pnlJob.add(lblJobConfiguration); btnJobDelete = new JButton(""); btnJobDelete.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { ResetStatusLabel(); Job selected = (Job) listJobs.getSelectedValue(); jobNames.remove(selected.getName().toLowerCase()); ListSelectionModel lsm = listJobs.getSelectionModel(); int firstSelected = lsm.getMinSelectionIndex(); int lastSelected = lsm.getMaxSelectionIndex(); jobModel.removeRange(firstSelected, lastSelected); int size = jobModel.size(); if (size == 0) { //List is empty: disable delete, up, and down buttons. /*btnJobDelete.setEnabled(false); btnJobUp.setEnabled(false); btnJobDown.setEnabled(false);*/ } else { //Adjust the selection. if (firstSelected == jobModel.getSize()) { //Removed item in last position. firstSelected--; } listJobs.setSelectedIndex(firstSelected); if (size == 21) { // No longer full list ResetStatusLabel(); } job = (Job) listJobs.getSelectedValue(); } } }); try { btnJobDelete .setIcon(new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/delete.png")))); btnJobDelete.setRolloverEnabled(true); btnJobDelete.setRolloverIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/delete_over.png")))); btnJobDelete.setDisabledIcon( new ImageIcon(ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/delete_dis.png")))); } catch (NullPointerException e11) { System.out.println("Image load error"); } catch (IOException e1) { e1.printStackTrace(); } btnJobDelete.setToolTipText("Delete job"); btnJobDelete.setRolloverEnabled(true); btnJobDelete.setEnabled(false); btnJobDelete.setBounds(651, 460, 36, 36); pnlJob.add(btnJobDelete); lblAddNewJobs = new JLabel( "Add new jobs to the list on the right, then configure unwind, rewind and material settings below"); lblAddNewJobs.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblAddNewJobs.setBounds(29, 45, 483, 14); pnlJob.add(lblAddNewJobs); lblJobs = new JLabel("Jobs"); lblJobs.setFont(new Font("Tahoma", Font.BOLD, 12)); lblJobs.setBounds(522, 19, 85, 14); pnlJob.add(lblJobs); panel_1 = new JPanel(); panel_1.setLayout(null); panel_1.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Total Output", TitledBorder.LEADING, TitledBorder.TOP, null, null)); panel_1.setBounds(280, 380, 227, 116); pnlJob.add(panel_1); lblTargetOutputFor = new JLabel("Target output for job:"); lblTargetOutputFor.setEnabled(false); lblTargetOutputFor.setBounds(30, 22, 129, 14); panel_1.add(lblTargetOutputFor); txtTargetTotal = new JTextField(); txtTargetTotal.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtTargetTotal.selectAll(); } }); txtTargetTotal.getDocument().addDocumentListener(new JobInputChangeListener()); txtTargetTotal.setToolTipText("Total output quantity for this job"); txtTargetTotal.setText("10000"); txtTargetTotal.setEnabled(false); txtTargetTotal.setColumns(10); txtTargetTotal.setBounds(30, 43, 118, 20); panel_1.add(txtTargetTotal); cmbTargetTotal = new JComboBox(); cmbTargetTotal.setToolTipText("Type of measure to use for output quantity above"); cmbTargetTotal.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { UpdateTotalsAmount(); } }); cmbTargetTotal.setModel( new DefaultComboBoxModel(new String[] { "Length (m)", "Weight (kg)", "Weight (tonnes)" })); cmbTargetTotal.setEnabled(false); cmbTargetTotal.setBounds(30, 67, 118, 20); panel_1.add(cmbTargetTotal); lblCounts = new JLabel("0 reel(s), 0 set(s), 0 mother(s)"); lblCounts.setFont(new Font("Tahoma", Font.PLAIN, 11)); lblCounts.setForeground(Color.GRAY); lblCounts.setBounds(30, 92, 187, 14); panel_1.add(lblCounts); panel_2 = new JPanel(); panel_2.setLayout(null); panel_2.setBorder(new TitledBorder(UIManager.getBorder("TitledBorder.border"), "Name", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0))); panel_2.setBounds(20, 72, 250, 83); pnlJob.add(panel_2); txtJobName = new JTextField(); txtJobName.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { txtJobName.selectAll(); } }); txtJobName.setBounds(90, 30, 145, 28); panel_2.add(txtJobName); txtJobName.getDocument().addDocumentListener(new DocumentListener() { @Override public void changedUpdate(DocumentEvent arg0) { } @Override public void insertUpdate(DocumentEvent arg0) { UpdateJobName(); } @Override public void removeUpdate(DocumentEvent arg0) { UpdateJobName(); } }); txtJobName.setToolTipText("Set the name of this job"); txtJobName.setFont(new Font("Tahoma", Font.BOLD, 12)); txtJobName.setEnabled(false); txtJobName.setColumns(10); lblJobName = new JLabel("Job name:"); lblJobName.setToolTipText("Set the name of this job"); lblJobName.setEnabled(false); lblJobName.setBounds(22, 31, 60, 24); panel_2.add(lblJobName); lblJobName.setFont(new Font("Tahoma", Font.PLAIN, 13)); btnResetJobs = new JButton("Reset"); btnResetJobs.setBounds(20, 460, 100, 36); pnlJob.add(btnResetJobs); btnResetJobs.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { ResetJobForm(); UpdateJob(); } }); btnResetJobs.setToolTipText("Reset the form"); btnResetJobs.setEnabled(false); scrollPane_1 = new JScrollPane(); scrollPane_1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER); scrollPane_1.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); scrollPane_1.setBorder(null); scrollPane_1.setBounds(522, 44, 245, 405); pnlJob.add(scrollPane_1); panel_7 = new JPanel(); panel_7.setToolTipText("Select a job to edit options, re-order, or delete"); scrollPane_1.setViewportView(panel_7); panel_7.setBackground(Color.WHITE); panel_7.setBorder(new SoftBevelBorder(BevelBorder.LOWERED, Color.LIGHT_GRAY, null, null, null)); panel_7.setLayout(new BorderLayout(0, 0)); listJobs = new JList(jobModel); listJobs.setSelectionModel(listJobsAvail.getSelectionModel()); panel_7.add(listJobs, BorderLayout.NORTH); listJobs.setToolTipText("Select a job to edit options, re-order, or delete"); listJobs.addListSelectionListener(new JobListSelectionListener()); listJobs.setBorder(null); listJobs.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); listJobs.setCellRenderer(new JobListRenderer()); pnlJob.setFocusTraversalPolicy(new FocusTraversalOnArray( new Component[] { cmbMaterials, txtThickness, txtDensity, cmbUnwindCore, txtUnwindAmount, txtSlits, txtSlitWidth, cmbRewindCore, txtRewindAmount, cmbJobDomain, lblPresets, lblThickness_1, lblDensity_1, pnlMaterials, lblWebWidthmm, lblmm0, lblUnwindCoremm, lblmm1, lblUnwindLength, pnlUnwinds, lblmicro0, lblgm3, label_3, pnlJobs, lblTargetRewindLength, lblSlitWidth, lblSlitCount, lblTrimtotal, lblTrim, lblRewindCoremm, lblPer_1, lblmm3, lblmm2 })); Image img = null; try { img = ImageIO.read(FrmMain.class.getResourceAsStream("/atlas/refresh.png")); } catch (IOException e1) { e1.printStackTrace(); } BufferedImage bi = new BufferedImage(img.getWidth(null), img.getHeight(null), BufferedImage.TYPE_INT_ARGB); Graphics g = bi.createGraphics(); g.drawImage(img, 0, 0, 25, 25, null); LoadSettings(); DoLicenceCheck(); initialising = false; }
From source file:com.openbravo.pos.sales.JRetailPanelTicket.java
private JPanel getLabelPanel(String msg) { JPanel panel = new JPanel(); Font font = new Font("Verdana", Font.BOLD, 12); panel.setFont(font);// ww w.j av a 2 s.c om panel.setOpaque(true); JLabel label = new JLabel(msg, JLabel.LEFT); label.setForeground(Color.RED); label.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); panel.add(label); return panel; }
From source file:com.openbravo.pos.sales.JRetailPanelTicket.java
/** * This method is called from within the constructor to Tinitialize the * form. WARNING: Do NOT modify this code. The content of this method is * always regenerated by the FormEditor. *//*from w w w . ja v a2 s .c om*/ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { m_jPanContainer = new javax.swing.JPanel(); m_jOptions = new javax.swing.JPanel(); m_jButtons = new javax.swing.JPanel(); m_jPanelScripts = new javax.swing.JPanel(); m_jButtonsExt = new javax.swing.JPanel(); jPanel1 = new javax.swing.JPanel(); m_jbtnScale = new javax.swing.JButton(); m_jLogout = new javax.swing.JButton(); m_jbtnPrintBill = new javax.swing.JButton(); m_jSettleBill = new javax.swing.JButton(); m_jSplitBtn = new javax.swing.JButton(); m_jBtnDiscount = new javax.swing.JButton(); m_jBtnCancelBill = new javax.swing.JButton(); m_jBtnBillOnHold = new javax.swing.JButton(); m_jPanelBag = new javax.swing.JPanel(); jPanel6 = new javax.swing.JPanel(); jLabel3 = new javax.swing.JLabel(); m_jLblUserInfo = new javax.swing.JLabel(); m_jUser = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); m_jTable = new javax.swing.JLabel(); m_jLblCurrentDate = new javax.swing.JLabel(); m_jLblTime = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel(); m_jLblBillNo = new javax.swing.JLabel(); m_jPanTicket = new javax.swing.JPanel(); jPanel10 = new javax.swing.JPanel(); jButtonAddon = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jButton3 = new javax.swing.JButton(); m_jLblItemCode = new javax.swing.JLabel(); m_jTxtItemCode = new javax.swing.JTextField(); m_jLblItemName = new javax.swing.JLabel(); m_jCboItemName = new javax.swing.JComboBox(); m_jPanelCentral = new javax.swing.JPanel(); jPanel5 = new javax.swing.JPanel(); jPanel2 = new javax.swing.JPanel(); m_jPlus = new javax.swing.JButton(); m_jMinus = new javax.swing.JButton(); m_jEditLine = new javax.swing.JButton(); m_jCalculatePromotion = new javax.swing.JButton(); m_jAction = new javax.swing.JButton(); m_jDelete = new javax.swing.JButton(); m_jBtnServed = new javax.swing.JButton(); m_jKot = new javax.swing.JButton(); m_jEraser = new javax.swing.JButton(); m_jContEntries = new javax.swing.JPanel(); m_jPanEntries = new javax.swing.JPanel(); catcontainer = new javax.swing.JPanel(); jPanel12 = new javax.swing.JPanel(); jLayeredPane1 = new javax.swing.JLayeredPane(); jPanel4 = new javax.swing.JPanel(); jPanel7 = new javax.swing.JPanel(); jLabel7 = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel(); m_jTxtTotalPaid = new javax.swing.JLabel(); m_jTxtChange = new javax.swing.JLabel(); jPanel3 = new javax.swing.JPanel(); m_jTax = new javax.swing.JComboBox(); m_jPor = new javax.swing.JLabel(); m_jaddtax = new javax.swing.JToggleButton(); jLblPrinterStatus = new javax.swing.JLabel(); m_jKeyFactory = new javax.swing.JTextField(); jPanel8 = new javax.swing.JPanel(); jLabel2 = new javax.swing.JLabel(); m_jSubtotalEuros1 = new javax.swing.JLabel(); m_jLblTotalEuros4 = new javax.swing.JLabel(); m_jTaxesEuros1 = new javax.swing.JLabel(); m_jLblTotalEuros5 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); m_jLblTotalEuros6 = new javax.swing.JLabel(); m_jDiscount1 = new javax.swing.JLabel(); m_jTotalEuros = new javax.swing.JLabel(); jTaxPanel = new javax.swing.JPanel(); m_jServiceTaxLbl = new javax.swing.JLabel(); m_jServiceTax = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); m_jTaxList = new javax.swing.JList(); m_jSwachBharatLbl = new javax.swing.JLabel(); m_jSwachBharat = new javax.swing.JLabel(); jLabel9 = new javax.swing.JLabel(); m_jPromoDiscount = new javax.swing.JLabel(); m_jProducts = new javax.swing.JPanel(); setBackground(new java.awt.Color(222, 232, 231)); setPreferredSize(new java.awt.Dimension(1024, 768)); setLayout(new java.awt.CardLayout()); m_jPanContainer.setBackground(new java.awt.Color(222, 232, 231)); m_jPanContainer.setLayout(new java.awt.BorderLayout()); m_jOptions.setBackground(new java.awt.Color(222, 232, 231)); m_jOptions.setLayout(new java.awt.BorderLayout()); m_jButtons.setBackground(new java.awt.Color(222, 232, 231)); m_jButtons.setPreferredSize(new java.awt.Dimension(4, 10)); m_jOptions.add(m_jButtons, java.awt.BorderLayout.LINE_START); m_jPanelScripts.setBackground(new java.awt.Color(222, 232, 231)); m_jPanelScripts.setLayout(new java.awt.BorderLayout()); m_jButtonsExt.setBackground(new java.awt.Color(222, 232, 231)); m_jButtonsExt.setLayout(new javax.swing.BoxLayout(m_jButtonsExt, javax.swing.BoxLayout.LINE_AXIS)); jPanel1.setBackground(new java.awt.Color(222, 232, 231)); jPanel1.setPreferredSize(new java.awt.Dimension(620, 47)); jPanel1.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); m_jbtnScale.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/ark216.png"))); // NOI18N m_jbtnScale.setText(AppLocal.getIntString("button.scale")); // NOI18N m_jbtnScale.setFocusPainted(false); m_jbtnScale.setFocusable(false); m_jbtnScale.setMargin(new java.awt.Insets(8, 14, 8, 14)); m_jbtnScale.setRequestFocusEnabled(false); m_jbtnScale.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jbtnScaleActionPerformed(evt); } }); jPanel1.add(m_jbtnScale, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 5, -1)); m_jLogout.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/1logout.png"))); // NOI18N m_jLogout.setToolTipText("Logout"); m_jLogout.setFocusable(false); m_jLogout.setPreferredSize(new java.awt.Dimension(40, 40)); m_jLogout.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jLogoutActionPerformed(evt); } }); jPanel1.add(m_jLogout, new org.netbeans.lib.awtextra.AbsoluteConstraints(575, 0, -1, -1)); m_jbtnPrintBill.setIcon( new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/1Print-Bill.png"))); // NOI18N m_jbtnPrintBill.setPreferredSize(new java.awt.Dimension(90, 40)); m_jbtnPrintBill.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jbtnPrintBillActionPerformed(evt); } }); jPanel1.add(m_jbtnPrintBill, new org.netbeans.lib.awtextra.AbsoluteConstraints(290, 0, -1, -1)); m_jSettleBill.setIcon( new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/1Settle-Bill.png"))); // NOI18N m_jSettleBill.setPreferredSize(new java.awt.Dimension(90, 40)); m_jSettleBill.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jSettleBillActionPerformed(evt); } }); jPanel1.add(m_jSettleBill, new org.netbeans.lib.awtextra.AbsoluteConstraints(480, 0, -1, -1)); m_jSplitBtn.setIcon( new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/190-40-BUTTON.png"))); // NOI18N m_jSplitBtn.setMnemonic('f'); m_jSplitBtn.setFocusPainted(false); m_jSplitBtn.setFocusable(false); m_jSplitBtn.setMargin(new java.awt.Insets(8, 14, 8, 14)); m_jSplitBtn.setPreferredSize(new java.awt.Dimension(90, 40)); m_jSplitBtn.setRequestFocusEnabled(false); m_jSplitBtn.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jSplitBtnActionPerformed(evt); } }); jPanel1.add(m_jSplitBtn, new org.netbeans.lib.awtextra.AbsoluteConstraints(195, 0, -1, -1)); m_jBtnDiscount.setIcon( new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/bill-discount.png"))); // NOI18N m_jBtnDiscount.setMnemonic('i'); m_jBtnDiscount.setToolTipText("Add Discount"); m_jBtnDiscount.setFocusPainted(false); m_jBtnDiscount.setFocusable(false); m_jBtnDiscount.setMargin(new java.awt.Insets(8, 14, 8, 14)); m_jBtnDiscount.setPreferredSize(new java.awt.Dimension(90, 40)); m_jBtnDiscount.setRequestFocusEnabled(false); m_jBtnDiscount.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jBtnDiscountActionPerformed(evt); } }); jPanel1.add(m_jBtnDiscount, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 0, -1, -1)); m_jBtnCancelBill.setIcon( new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/pos/templates/can-bill.png"))); // NOI18N m_jBtnCancelBill.setToolTipText("Cancel the Bill"); m_jBtnCancelBill.setPreferredSize(new java.awt.Dimension(90, 40)); m_jBtnCancelBill.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jBtnCancelBillActionPerformed(evt); } }); jPanel1.add(m_jBtnCancelBill, new org.netbeans.lib.awtextra.AbsoluteConstraints(385, 0, -1, -1)); m_jBtnBillOnHold.setBackground(new java.awt.Color(130, 130, 65)); m_jBtnBillOnHold.setForeground(new java.awt.Color(153, 153, 136)); m_jBtnBillOnHold .setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/HOLD-BILL.png"))); // NOI18N m_jBtnBillOnHold.setToolTipText(""); m_jBtnBillOnHold.setPreferredSize(new java.awt.Dimension(90, 40)); m_jBtnBillOnHold.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jBtnBillOnHoldActionPerformed(evt); } }); jPanel1.add(m_jBtnBillOnHold, new org.netbeans.lib.awtextra.AbsoluteConstraints(5, 0, 90, 40)); m_jButtonsExt.add(jPanel1); m_jPanelScripts.add(m_jButtonsExt, java.awt.BorderLayout.LINE_END); m_jOptions.add(m_jPanelScripts, java.awt.BorderLayout.LINE_END); m_jPanelBag.setBackground(new java.awt.Color(222, 232, 231)); m_jPanelBag.setFocusable(false); m_jPanelBag.setPreferredSize(new java.awt.Dimension(800, 35)); m_jPanelBag.setRequestFocusEnabled(false); m_jPanelBag.setLayout(new java.awt.BorderLayout()); m_jOptions.add(m_jPanelBag, java.awt.BorderLayout.CENTER); jPanel6.setBackground(new java.awt.Color(80, 102, 116)); jPanel6.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); jPanel6.setPreferredSize(new java.awt.Dimension(1024, 90)); jPanel6.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); jLabel3.setBackground(new java.awt.Color(222, 232, 231)); jLabel3.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); jLabel3.setIcon(new javax.swing.ImageIcon( getClass().getResource("/com/openbravo/pos/templates/1header-habanero.png"))); // NOI18N jLabel3.setAutoscrolls(true); jLabel3.setFocusable(false); jLabel3.setHorizontalTextPosition(javax.swing.SwingConstants.LEADING); jLabel3.setMaximumSize(new java.awt.Dimension(1450, 61)); jLabel3.setMinimumSize(new java.awt.Dimension(1024, 61)); jLabel3.setPreferredSize(new java.awt.Dimension(1024, 45)); jLabel3.setRequestFocusEnabled(false); jLabel3.setVerticalTextPosition(javax.swing.SwingConstants.TOP); jPanel6.add(jLabel3, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 1551, -1)); m_jLblUserInfo.setBackground(new java.awt.Color(80, 102, 160)); m_jLblUserInfo.setForeground(new java.awt.Color(255, 255, 255)); m_jLblUserInfo.setText(" LOGGED IN USER:"); m_jLblUserInfo.setFocusable(false); m_jLblUserInfo.setPreferredSize(new java.awt.Dimension(340, 16)); m_jLblUserInfo.setRequestFocusEnabled(false); jPanel6.add(m_jLblUserInfo, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 40, 140, 50)); m_jUser.setForeground(new java.awt.Color(252, 248, 0)); m_jUser.setText("jLabel6"); jPanel6.add(m_jUser, new org.netbeans.lib.awtextra.AbsoluteConstraints(140, 40, 70, 50)); jLabel6.setForeground(new java.awt.Color(255, 255, 255)); jLabel6.setText("Table:"); jPanel6.add(jLabel6, new org.netbeans.lib.awtextra.AbsoluteConstraints(230, 40, 50, 50)); m_jTable.setForeground(new java.awt.Color(252, 248, 0)); m_jTable.setText("jLabel9"); jPanel6.add(m_jTable, new org.netbeans.lib.awtextra.AbsoluteConstraints(280, 40, 60, 50)); m_jLblCurrentDate.setBackground(new java.awt.Color(80, 102, 160)); m_jLblCurrentDate.setForeground(new java.awt.Color(255, 255, 255)); m_jLblCurrentDate.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); m_jLblCurrentDate .setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/Date-icon.png"))); // NOI18N m_jLblCurrentDate.setFocusable(false); m_jLblCurrentDate.setPreferredSize(new java.awt.Dimension(300, 16)); m_jLblCurrentDate.setRequestFocusEnabled(false); jPanel6.add(m_jLblCurrentDate, new org.netbeans.lib.awtextra.AbsoluteConstraints(590, 45, 180, 45)); m_jLblTime.setBackground(new java.awt.Color(80, 102, 160)); m_jLblTime.setForeground(new java.awt.Color(255, 255, 255)); m_jLblTime.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); m_jLblTime .setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/Clock-icon.png"))); // NOI18N m_jLblTime.setText( " jLabel2"); m_jLblTime.setFocusable(false); m_jLblTime.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT); m_jLblTime.setPreferredSize(new java.awt.Dimension(300, 16)); m_jLblTime.setRequestFocusEnabled(false); jPanel6.add(m_jLblTime, new org.netbeans.lib.awtextra.AbsoluteConstraints(780, 45, 230, 45)); jLabel1.setForeground(new java.awt.Color(255, 255, 255)); jLabel1.setText("Bill No:"); jPanel6.add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(360, 40, 50, 50)); m_jLblBillNo.setForeground(new java.awt.Color(252, 248, 0)); jPanel6.add(m_jLblBillNo, new org.netbeans.lib.awtextra.AbsoluteConstraints(420, 40, 90, 50)); m_jOptions.add(jPanel6, java.awt.BorderLayout.NORTH); m_jPanContainer.add(m_jOptions, java.awt.BorderLayout.NORTH); m_jPanTicket.setBackground(new java.awt.Color(222, 232, 231)); m_jPanTicket.setLayout(new java.awt.BorderLayout()); jPanel10.setBackground(new java.awt.Color(222, 232, 231)); jPanel10.setPreferredSize(new java.awt.Dimension(803, 48)); jPanel10.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); jButtonAddon .setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/1Add-on.png"))); // NOI18N jButtonAddon.setPreferredSize(new java.awt.Dimension(90, 40)); jButtonAddon.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonAddonActionPerformed(evt); } }); jPanel10.add(jButtonAddon, new org.netbeans.lib.awtextra.AbsoluteConstraints(690, 0, 90, 40)); jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/1Category.png"))); // NOI18N jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jPanel10.add(jButton2, new org.netbeans.lib.awtextra.AbsoluteConstraints(790, 0, 90, 40)); jButton3.setIcon( new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/subcategory.png"))); // NOI18N jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton3ActionPerformed(evt); } }); jPanel10.add(jButton3, new org.netbeans.lib.awtextra.AbsoluteConstraints(890, 0, 90, 40)); m_jLblItemCode.setText("ITEM CODE"); jPanel10.add(m_jLblItemCode, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 8, 90, 20)); m_jTxtItemCode.setBorder(javax.swing.BorderFactory.createCompoundBorder( javax.swing.BorderFactory .createLineBorder(javax.swing.UIManager.getDefaults().getColor("Button.darkShadow")), javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1))); m_jTxtItemCode.setMinimumSize(new java.awt.Dimension(123, 20)); m_jTxtItemCode.setPreferredSize(new java.awt.Dimension(123, 20)); m_jTxtItemCode.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jTxtItemCodeActionPerformed(evt); } }); jPanel10.add(m_jTxtItemCode, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 10, -1, 20)); m_jLblItemName.setText("ITEM NAME"); jPanel10.add(m_jLblItemName, new org.netbeans.lib.awtextra.AbsoluteConstraints(240, 10, -1, 20)); m_jCboItemName.setEditable(true); m_jCboItemName.setAutoscrolls(true); m_jCboItemName.setMaximumSize(new java.awt.Dimension(123, 20)); m_jCboItemName.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { m_jCboItemNameItemStateChanged(evt); } }); m_jCboItemName.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jCboItemNameActionPerformed(evt); } }); jPanel10.add(m_jCboItemName, new org.netbeans.lib.awtextra.AbsoluteConstraints(330, 10, 340, -1)); m_jPanTicket.add(jPanel10, java.awt.BorderLayout.PAGE_START); m_jPanelCentral.setFocusable(false); m_jPanelCentral.setRequestFocusEnabled(false); m_jPanelCentral.setLayout(new java.awt.BorderLayout()); jPanel5.setLayout(new java.awt.BorderLayout()); jPanel2.setBackground(new java.awt.Color(222, 232, 231)); jPanel2.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 5, 0, 5)); jPanel2.setMinimumSize(new java.awt.Dimension(66, 338)); jPanel2.setPreferredSize(new java.awt.Dimension(61, 400)); m_jPlus.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/TPlus.png"))); // NOI18N m_jPlus.setToolTipText("Increase selected item quantity by one"); m_jPlus.setFocusPainted(false); m_jPlus.setFocusable(false); m_jPlus.setMaximumSize(new java.awt.Dimension(51, 42)); m_jPlus.setMinimumSize(new java.awt.Dimension(51, 42)); m_jPlus.setPreferredSize(new java.awt.Dimension(51, 42)); m_jPlus.setRequestFocusEnabled(false); m_jPlus.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jPlusActionPerformed(evt); } }); m_jMinus.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/TMinus.png"))); // NOI18N m_jMinus.setToolTipText("Decrease selected item's quantity by one"); m_jMinus.setFocusPainted(false); m_jMinus.setFocusable(false); m_jMinus.setMaximumSize(new java.awt.Dimension(51, 42)); m_jMinus.setMinimumSize(new java.awt.Dimension(51, 42)); m_jMinus.setPreferredSize(new java.awt.Dimension(51, 42)); m_jMinus.setRequestFocusEnabled(false); m_jMinus.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jMinusActionPerformed(evt); } }); m_jEditLine.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/TEdit.png"))); // NOI18N m_jEditLine.setMnemonic('e'); m_jEditLine.setToolTipText("Edit Properties of selected item"); m_jEditLine.setFocusPainted(false); m_jEditLine.setFocusable(false); m_jEditLine.setMargin(new java.awt.Insets(8, 14, 8, 14)); m_jEditLine.setRequestFocusEnabled(false); m_jEditLine.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jEditLineActionPerformed(evt); } }); m_jCalculatePromotion .setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/pramo.png"))); // NOI18N m_jCalculatePromotion.setMnemonic('f'); m_jCalculatePromotion.setFocusPainted(false); m_jCalculatePromotion.setFocusable(false); m_jCalculatePromotion.setMargin(new java.awt.Insets(8, 14, 8, 14)); m_jCalculatePromotion.setPreferredSize(new java.awt.Dimension(51, 42)); m_jCalculatePromotion.setRequestFocusEnabled(false); m_jCalculatePromotion.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jCalculatePromotionActionPerformed(evt); } }); m_jAction.setBorder(null); m_jAction.setBorderPainted(false); m_jAction.setPreferredSize(new java.awt.Dimension(10, 2)); m_jAction.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jActionActionPerformed(evt); } }); m_jDelete.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/Tclose.png"))); // NOI18N m_jDelete.setMnemonic('d'); m_jDelete.setToolTipText("Remove total quantity of selected item"); m_jDelete.setFocusPainted(false); m_jDelete.setFocusable(false); m_jDelete.setMinimumSize(new java.awt.Dimension(51, 42)); m_jDelete.setPreferredSize(new java.awt.Dimension(51, 42)); m_jDelete.setRequestFocusEnabled(false); m_jDelete.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jDeleteActionPerformed(evt); } }); m_jBtnServed.setIcon( new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/servedsymbol.png"))); // NOI18N m_jBtnServed.setToolTipText("Serve Selected Item"); m_jBtnServed.setPreferredSize(new java.awt.Dimension(91, 73)); m_jBtnServed.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jBtnServedActionPerformed(evt); } }); m_jKot.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/TKOT.png"))); // NOI18N m_jKot.setToolTipText("Send All Fresh Items to Kitchen"); m_jKot.setPreferredSize(new java.awt.Dimension(51, 42)); m_jKot.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jBtnKotActionPerformed(evt); } }); m_jEraser.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/openbravo/images/TDelete.png"))); // NOI18N m_jEraser.setMnemonic('i'); m_jEraser.setToolTipText("Clear All Non KOT Items"); m_jEraser.setFocusPainted(false); m_jEraser.setFocusable(false); m_jEraser.setMargin(new java.awt.Insets(8, 14, 8, 14)); m_jEraser.setRequestFocusEnabled(false); m_jEraser.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { m_jEraserActionPerformed(evt); } }); org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup().add(168, 168, 168).add(m_jAction, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(m_jBtnServed, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 51, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(m_jEraser, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 51, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(m_jKot, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(m_jCalculatePromotion, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(m_jEditLine, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 51, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(m_jDelete, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(m_jMinus, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(m_jPlus, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)); jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup() .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel2Layout.createSequentialGroup().add(242, 242, 242) .add(m_jAction, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 14, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .add(jPanel2Layout.createSequentialGroup() .add(m_jPlus, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(3, 3, 3) .add(m_jMinus, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(3, 3, 3) .add(m_jDelete, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(2, 2, 2) .add(m_jEditLine, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 42, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(3, 3, 3) .add(m_jCalculatePromotion, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 7, Short.MAX_VALUE) .add(m_jBtnServed, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 40, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED))) .add(m_jKot, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(3, 3, 3).add(m_jEraser, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 45, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(36, 36, 36))); jPanel5.add(jPanel2, java.awt.BorderLayout.NORTH); m_jPanelCentral.add(jPanel5, java.awt.BorderLayout.LINE_END); m_jPanTicket.add(m_jPanelCentral, java.awt.BorderLayout.CENTER); m_jContEntries.setFocusable(false); m_jContEntries.setPreferredSize(new java.awt.Dimension(501, 500)); m_jContEntries.setRequestFocusEnabled(false); m_jContEntries.setLayout(new java.awt.BorderLayout()); m_jPanEntries.setMinimumSize(new java.awt.Dimension(508, 500)); m_jPanEntries.setPreferredSize(new java.awt.Dimension(495, 525)); m_jPanEntries.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); catcontainer.setPreferredSize(new java.awt.Dimension(300, 200)); catcontainer.setLayout(new java.awt.BorderLayout()); m_jPanEntries.add(catcontainer, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 508, 510)); m_jContEntries.add(m_jPanEntries, java.awt.BorderLayout.PAGE_START); m_jPanTicket.add(m_jContEntries, java.awt.BorderLayout.LINE_END); jPanel12.setBackground(new java.awt.Color(222, 232, 231)); jPanel12.setFocusable(false); jPanel12.setPreferredSize(new java.awt.Dimension(600, 5)); jPanel12.setRequestFocusEnabled(false); jPanel12.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); jLayeredPane1.setPreferredSize(new java.awt.Dimension(300, 402)); jPanel12.add(jLayeredPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(20, -500, 989, 509)); m_jPanTicket.add(jPanel12, java.awt.BorderLayout.PAGE_END); m_jPanContainer.add(m_jPanTicket, java.awt.BorderLayout.CENTER); jPanel4.setBackground(new java.awt.Color(222, 232, 231)); jPanel4.setPreferredSize(new java.awt.Dimension(1024, 210)); jPanel4.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); jPanel7.setBorder( javax.swing.BorderFactory.createMatteBorder(0, 1, 1, 1, new java.awt.Color(204, 204, 204))); jPanel7.setMaximumSize(new java.awt.Dimension(700, 158)); jPanel7.setPreferredSize(new java.awt.Dimension(320, 158)); jLabel7.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N jLabel7.setText("TOTAL PAID"); jLabel8.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N jLabel8.setText("CHANGE"); m_jTxtTotalPaid.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N m_jTxtTotalPaid.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); m_jTxtTotalPaid.setBorder(javax.swing.BorderFactory.createCompoundBorder( javax.swing.BorderFactory .createLineBorder(javax.swing.UIManager.getDefaults().getColor("Button.darkShadow")), javax.swing.BorderFactory.createEmptyBorder(1, 4, 1, 4))); m_jTxtTotalPaid.setFocusable(false); m_jTxtTotalPaid.setOpaque(true); m_jTxtTotalPaid.setPreferredSize(new java.awt.Dimension(123, 25)); m_jTxtTotalPaid.setRequestFocusEnabled(false); m_jTxtChange.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N m_jTxtChange.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); m_jTxtChange.setBorder(javax.swing.BorderFactory.createCompoundBorder( javax.swing.BorderFactory .createLineBorder(javax.swing.UIManager.getDefaults().getColor("Button.darkShadow")), javax.swing.BorderFactory.createEmptyBorder(1, 4, 1, 4))); m_jTxtChange.setFocusable(false); m_jTxtChange.setOpaque(true); m_jTxtChange.setPreferredSize(new java.awt.Dimension(123, 25)); m_jTxtChange.setRequestFocusEnabled(false); jPanel3.setPreferredSize(new java.awt.Dimension(228, 100)); m_jTax.setFocusable(false); m_jTax.setRequestFocusEnabled(false); m_jPor.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); m_jPor.setBorder(javax.swing.BorderFactory.createCompoundBorder( javax.swing.BorderFactory .createLineBorder(javax.swing.UIManager.getDefaults().getColor("Button.darkShadow")), javax.swing.BorderFactory.createEmptyBorder(1, 4, 1, 4))); m_jPor.setFocusable(false); m_jPor.setOpaque(true); m_jPor.setPreferredSize(new java.awt.Dimension(22, 22)); m_jPor.setRequestFocusEnabled(false); m_jaddtax.setText("+"); m_jaddtax.setFocusPainted(false); m_jaddtax.setFocusable(false); m_jaddtax.setRequestFocusEnabled(false); jLblPrinterStatus.setForeground(new java.awt.Color(255, 0, 0)); m_jKeyFactory.setBackground(javax.swing.UIManager.getDefaults().getColor("Panel.background")); m_jKeyFactory.setForeground(javax.swing.UIManager.getDefaults().getColor("Panel.background")); m_jKeyFactory.setBorder(null); m_jKeyFactory.setCaretColor(javax.swing.UIManager.getDefaults().getColor("Panel.background")); m_jKeyFactory.setPreferredSize(new java.awt.Dimension(4, 4)); m_jKeyFactory.setRequestFocusEnabled(false); m_jKeyFactory.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { m_jKeyFactoryKeyTyped(evt); } }); org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel3Layout.createSequentialGroup() .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel3Layout.createSequentialGroup().addContainerGap() .add(m_jKeyFactory, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 239, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(65, 65, 65).add(jLblPrinterStatus, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 68, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(jPanel3Layout.createSequentialGroup().add(20, 20, 20) .add(m_jaddtax, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 46, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(m_jPor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 12, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(jPanel3Layout.createSequentialGroup().addContainerGap().add(m_jTax, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 106, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))) .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel3Layout.createSequentialGroup() .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel3Layout.createSequentialGroup().add(6, 6, 6).add(jLblPrinterStatus, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 17, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(m_jKeyFactory, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 11, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED) .add(m_jTax, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 14, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(21, 21, 21) .add(jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING) .add(m_jPor, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(m_jaddtax, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 14, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); org.jdesktop.layout.GroupLayout jPanel7Layout = new org.jdesktop.layout.GroupLayout(jPanel7); jPanel7.setLayout(jPanel7Layout); jPanel7Layout.setHorizontalGroup(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel7Layout.createSequentialGroup().add(10, 10, 10) .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel7Layout.createSequentialGroup() .add(jLabel7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 126, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(3, 3, 3) .add(m_jTxtTotalPaid, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 120, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(jPanel7Layout.createSequentialGroup() .add(jLabel8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 110, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(19, 19, 19).add(m_jTxtChange, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 120, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))) .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel7Layout.createSequentialGroup() .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .add(jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 392, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .addContainerGap())); jPanel7Layout .setVerticalGroup(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jPanel7Layout.createSequentialGroup() .add(jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 89, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(270, 270, 270) .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jLabel7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 35, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(m_jTxtTotalPaid, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 35, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)) .add(10, 10, 10) .add(jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING) .add(jLabel8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 35, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE) .add(m_jTxtChange, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 35, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))); jPanel4.add(jPanel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(1325, 1, 170, 160)); jPanel8.setBackground(new java.awt.Color(255, 255, 255)); jPanel8.setBorder( javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(204, 204, 204))); jPanel8.setPreferredSize(new java.awt.Dimension(1551, 193)); jPanel8.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); jLabel2.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel2.setText("Bill Details"); jPanel8.add(jLabel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(15, 12, 188, -1)); m_jSubtotalEuros1.setBackground(new java.awt.Color(255, 255, 255)); m_jSubtotalEuros1.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); m_jSubtotalEuros1.setBorder(javax.swing.BorderFactory.createCompoundBorder( javax.swing.BorderFactory .createLineBorder(javax.swing.UIManager.getDefaults().getColor("Button.darkShadow")), javax.swing.BorderFactory.createEmptyBorder(1, 4, 1, 4))); m_jSubtotalEuros1.setFocusable(false); m_jSubtotalEuros1.setOpaque(true); m_jSubtotalEuros1.setPreferredSize(new java.awt.Dimension(123, 25)); m_jSubtotalEuros1.setRequestFocusEnabled(false); jPanel8.add(m_jSubtotalEuros1, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 40, 80, 23)); m_jLblTotalEuros4.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); m_jLblTotalEuros4.setText("SUB TOTAL"); jPanel8.add(m_jLblTotalEuros4, new org.netbeans.lib.awtextra.AbsoluteConstraints(11, 37, 94, 23)); m_jTaxesEuros1.setBackground(new java.awt.Color(255, 255, 255)); m_jTaxesEuros1.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); m_jTaxesEuros1.setBorder(javax.swing.BorderFactory.createCompoundBorder( javax.swing.BorderFactory .createLineBorder(javax.swing.UIManager.getDefaults().getColor("Button.darkShadow")), javax.swing.BorderFactory.createEmptyBorder(1, 4, 1, 4))); m_jTaxesEuros1.setFocusable(false); m_jTaxesEuros1.setOpaque(true); m_jTaxesEuros1.setPreferredSize(new java.awt.Dimension(123, 25)); m_jTaxesEuros1.setRequestFocusEnabled(false); jPanel8.add(m_jTaxesEuros1, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 70, 80, 23)); m_jLblTotalEuros5.setBackground(new java.awt.Color(255, 255, 255)); m_jLblTotalEuros5.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); m_jLblTotalEuros5.setText("TAXES"); jPanel8.add(m_jLblTotalEuros5, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 70, 60, 23)); jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); jLabel5.setText("DISCOUNT"); jPanel8.add(jLabel5, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 100, 80, 23)); m_jLblTotalEuros6.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); m_jLblTotalEuros6.setText("TOTAL SALES"); jPanel8.add(m_jLblTotalEuros6, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 160, 80, 20)); m_jDiscount1.setBackground(new java.awt.Color(255, 255, 255)); m_jDiscount1.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); m_jDiscount1.setBorder(javax.swing.BorderFactory.createCompoundBorder( javax.swing.BorderFactory .createLineBorder(javax.swing.UIManager.getDefaults().getColor("Button.darkShadow")), javax.swing.BorderFactory.createEmptyBorder(1, 4, 1, 4))); m_jDiscount1.setFocusable(false); m_jDiscount1.setOpaque(true); m_jDiscount1.setPreferredSize(new java.awt.Dimension(123, 25)); m_jDiscount1.setRequestFocusEnabled(false); jPanel8.add(m_jDiscount1, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 100, 80, 23)); m_jTotalEuros.setBackground(new java.awt.Color(255, 255, 255)); m_jTotalEuros.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); m_jTotalEuros.setBorder(javax.swing.BorderFactory.createCompoundBorder( javax.swing.BorderFactory .createLineBorder(javax.swing.UIManager.getDefaults().getColor("Button.darkShadow")), javax.swing.BorderFactory.createEmptyBorder(1, 4, 1, 4))); m_jTotalEuros.setFocusable(false); m_jTotalEuros.setOpaque(true); m_jTotalEuros.setPreferredSize(new java.awt.Dimension(123, 25)); m_jTotalEuros.setRequestFocusEnabled(false); jPanel8.add(m_jTotalEuros, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 160, 80, 23)); jTaxPanel.setBackground(new java.awt.Color(255, 255, 255)); jTaxPanel.setPreferredSize(new java.awt.Dimension(202, 157)); jTaxPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); m_jServiceTaxLbl.setText("SERVICE TAX"); jTaxPanel.add(m_jServiceTaxLbl, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 40, 100, 23)); m_jServiceTax.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jTaxPanel.add(m_jServiceTax, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 40, 70, 23)); jLabel4.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel4.setText("Tax Breakup"); jTaxPanel.add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 11, 194, -1)); jScrollPane1.setBorder(null); jScrollPane1.setViewportView(m_jTaxList); jTaxPanel.add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 37, 200, 140)); m_jSwachBharatLbl.setText("SWACHH BHARAT TAX"); jTaxPanel.add(m_jSwachBharatLbl, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 70, 130, 20)); m_jSwachBharat.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); jTaxPanel.add(m_jSwachBharat, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 70, 70, 20)); jPanel8.add(jTaxPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(221, 1, -1, 178)); jLabel9.setText("PROMO DISCOUNT"); jPanel8.add(jLabel9, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 130, 120, 20)); m_jPromoDiscount.setBackground(new java.awt.Color(255, 255, 255)); m_jPromoDiscount.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT); m_jPromoDiscount.setBorder(javax.swing.BorderFactory.createCompoundBorder( javax.swing.BorderFactory .createLineBorder(javax.swing.UIManager.getDefaults().getColor("Button.darkShadow")), javax.swing.BorderFactory.createEmptyBorder(1, 4, 1, 4))); m_jPromoDiscount.setFocusable(false); m_jPromoDiscount.setOpaque(true); m_jPromoDiscount.setPreferredSize(new java.awt.Dimension(123, 25)); m_jPromoDiscount.setRequestFocusEnabled(false); jPanel8.add(m_jPromoDiscount, new org.netbeans.lib.awtextra.AbsoluteConstraints(130, 130, 80, 23)); jPanel4.add(jPanel8, new org.netbeans.lib.awtextra.AbsoluteConstraints(7, 1, 434, -1)); m_jProducts.setBackground(new java.awt.Color(255, 255, 255)); m_jProducts.setLayout(new java.awt.CardLayout()); jPanel4.add(m_jProducts, new org.netbeans.lib.awtextra.AbsoluteConstraints(447, 1, 551, 190)); m_jPanContainer.add(jPanel4, java.awt.BorderLayout.SOUTH); add(m_jPanContainer, "ticket"); }
From source file:edu.ku.brc.af.ui.forms.FormViewObj.java
@Override public Component createSeparator(String title) { int titleAlignment = builder.isLeftToRight() ? SwingConstants.LEFT : SwingConstants.RIGHT; JComponent titledSeparator = builder.getComponentFactory().createSeparator(title, titleAlignment); setControlSize(titledSeparator);//from ww w .jav a2 s. c om return titledSeparator; }