List of usage examples for javax.swing SwingConstants VERTICAL
int VERTICAL
To view the source code for javax.swing SwingConstants VERTICAL.
Click Source Link
From source file:com.pianobakery.complsa.LicenseKeyGUI.java
/** * Following "Generated Code" is generated by Netbeans form editor. *//*from ww w. j a va 2s. c o m*/ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); licenseExpirationDatejTextField = new javax.swing.JTextField(); licenseStatusjTextField = new javax.swing.JTextField(); closejButton = new javax.swing.JButton(); jPanel2 = new javax.swing.JPanel(); jLabel4 = new javax.swing.JLabel(); namejTextField = new javax.swing.JTextField(); jLabel5 = new javax.swing.JLabel(); emailjTextField = new javax.swing.JTextField(); companyjTextField = new javax.swing.JTextField(); jLabel6 = new javax.swing.JLabel(); changeProductKeyjButton = new javax.swing.JButton(); activatejButton = new javax.swing.JButton(); useTrialButton = new javax.swing.JButton(); buyButton = new javax.swing.JButton(); progressjLabel = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Licensing"); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Product License Information")); jLabel1.setText("License Status:"); jLabel2.setText("License Expiration Date:"); licenseExpirationDatejTextField.setEditable(false); licenseStatusjTextField.setEditable(false); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addGap(20, 20, 20) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel2).addComponent(jLabel1)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(licenseExpirationDatejTextField) .addComponent(licenseStatusjTextField)) .addContainerGap())); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(jLabel1) .addComponent(licenseStatusjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2).addComponent(licenseExpirationDatejTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap())); closejButton.setText("Close"); closejButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { closejButtonActionPerformed(evt); } }); jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Product is Licensed to")); jLabel4.setText("Name:"); namejTextField.setEditable(false); jLabel5.setText("e-mail:"); emailjTextField.setEditable(false); companyjTextField.setEditable(false); jLabel6.setText("Company:"); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup(jPanel2Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() .addGap(87, 87, 87) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel5, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel6, javax.swing.GroupLayout.Alignment.TRAILING)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(namejTextField, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(emailjTextField, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(companyjTextField, javax.swing.GroupLayout.Alignment.TRAILING)) .addContainerGap())); jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup().addContainerGap() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4).addComponent(namejTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel5).addComponent(emailjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel6).addComponent(companyjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap())); changeProductKeyjButton.setText("Change Product Key"); changeProductKeyjButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { changeProductKeyjButtonActionPerformed(evt); } }); useTrialButton.setText("Use 30 Day Trial"); useTrialButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { useTrialKeyButtonActionPerformed(e); } }); buyButton.setText("Buy License"); buyButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { buyButtonActionPerformed(e); } }); activatejButton.setText("Activate"); activatejButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { activatejButtonActionPerformed(evt); } }); progressjLabel.setForeground(Color.red); progressjLabel.setText(" "); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(progressjLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 195, Short.MAX_VALUE) .addGap(18, 18, 18).addComponent(buyButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(useTrialButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(activatejButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(changeProductKeyjButton) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(closejButton)) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap())); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(closejButton).addComponent(changeProductKeyjButton) .addComponent(activatejButton).addComponent(progressjLabel) .addComponent(useTrialButton).addComponent(buyButton)) .addContainerGap())); layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] { useTrialButton, activatejButton, changeProductKeyjButton, closejButton }); pack(); }
From source file:de.tor.tribes.ui.algo.AttackTimePanel.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.//from w ww . j a va2s . c o m */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; buttonGroup1 = new javax.swing.ButtonGroup(); jPanel2 = new javax.swing.JPanel(); jLabel2 = new javax.swing.JLabel(); minSendTimeField = new de.tor.tribes.ui.components.DateTimeField(); maxArriveTimeField = new de.tor.tribes.ui.components.DateTimeField(); jLabel3 = new javax.swing.JLabel(); jArriveInPastLabel = new javax.swing.JLabel(); jPanel3 = new javax.swing.JPanel(); jSendTimeFrame = new com.visutools.nav.bislider.BiSlider(); dateTimeField = new de.tor.tribes.ui.components.DateTimeField(); jPanel4 = new javax.swing.JPanel(); jAlwaysButton = new javax.swing.JRadioButton(); jDayButton = new javax.swing.JRadioButton(); jExactTimeButton = new javax.swing.JRadioButton(); jSeparator1 = new javax.swing.JSeparator(); jLabel8 = new javax.swing.JLabel(); jLabel9 = new javax.swing.JLabel(); jPanel1 = new javax.swing.JPanel(); jLabel5 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); jPanel5 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); jTimeFrameList = new javax.swing.JList(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); setLayout(new java.awt.GridBagLayout()); jPanel2.setLayout(new java.awt.GridBagLayout()); jLabel2.setText("Enddatum"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jPanel2.add(jLabel2, gridBagConstraints); minSendTimeField.setTimeEnabled(false); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 0; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jPanel2.add(minSendTimeField, gridBagConstraints); maxArriveTimeField.setTimeEnabled(false); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 0; gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jPanel2.add(maxArriveTimeField, gridBagConstraints); jLabel3.setText("Startdatum"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jPanel2.add(jLabel3, gridBagConstraints); jArriveInPastLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/ui/warning.png"))); // NOI18N jArriveInPastLabel.setToolTipText("Die Ankunftzeit liegt in der Vergangenheit!"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; jPanel2.add(jArriveInPastLabel, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); add(jPanel2, gridBagConstraints); jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Einstellungen")); jSendTimeFrame.setToolTipText("Zeitfenster des Zeitrahmens"); dateTimeField.setToolTipText("Datum und Uhrzeit des Zeitrahmens"); dateTimeField.setEnabled(false); dateTimeField.setTimeEnabled(false); jPanel4.setLayout(new java.awt.GridBagLayout()); buttonGroup1.add(jAlwaysButton); jAlwaysButton.setSelected(true); jAlwaysButton.setText("Immer"); jAlwaysButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/ui/att_remove.png"))); // NOI18N jAlwaysButton.setRolloverEnabled(false); jAlwaysButton.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/res/month.png"))); // NOI18N jAlwaysButton.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { fireValidityStateChangedEvent(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH; gridBagConstraints.weighty = 0.33; jPanel4.add(jAlwaysButton, gridBagConstraints); buttonGroup1.add(jDayButton); jDayButton.setText("Tag"); jDayButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/ui/att_remove.png"))); // NOI18N jDayButton.setRolloverEnabled(false); jDayButton.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/res/day.png"))); // NOI18N jDayButton.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { fireValidityStateChangedEvent(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.weighty = 0.33; jPanel4.add(jDayButton, gridBagConstraints); buttonGroup1.add(jExactTimeButton); jExactTimeButton.setText("Zeitpunkt"); jExactTimeButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/ui/att_remove.png"))); // NOI18N jExactTimeButton.setRolloverEnabled(false); jExactTimeButton.setSelectedIcon(new javax.swing.ImageIcon(getClass().getResource("/res/date-time.png"))); // NOI18N jExactTimeButton.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { fireValidityStateChangedEvent(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTH; gridBagConstraints.weighty = 0.33; jPanel4.add(jExactTimeButton, gridBagConstraints); jSeparator1.setOrientation(javax.swing.SwingConstants.VERTICAL); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.gridheight = 3; gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL; gridBagConstraints.ipadx = 10; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.weighty = 1.0; jPanel4.add(jSeparator1, gridBagConstraints); jLabel8.setText("Datum/Zeit"); jLabel9.setText("Zeitraum"); javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup().addContainerGap().addGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jLabel9, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel8, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)) .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup().addGap(18, 18, 18).addComponent( dateTimeField, javax.swing.GroupLayout.DEFAULT_SIZE, 372, Short.MAX_VALUE)) .addGroup(jPanel3Layout.createSequentialGroup().addGap(23, 23, 23).addComponent( jSendTimeFrame, javax.swing.GroupLayout.DEFAULT_SIZE, 371, Short.MAX_VALUE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED).addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE))); jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel3Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jPanel4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel3Layout.createSequentialGroup() .addGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(dateTimeField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(37, 37, 37) .addGroup(jPanel3Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jSendTimeFrame, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addContainerGap())); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 4; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); add(jPanel3, gridBagConstraints); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Zeitrahmenvorschau")); jLabel5.setBackground(new java.awt.Color(204, 204, 204)); jLabel5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/ui/move_out.png"))); // NOI18N jLabel5.setText("Am 13.04.11, von 10 bis 24 Uhr (Alle)"); jLabel5.setToolTipText("Abschickzeitrahmen fr die gewhlten Einstellungen"); jLabel5.setMaximumSize(new java.awt.Dimension(230, 16)); jLabel5.setMinimumSize(new java.awt.Dimension(230, 16)); jLabel5.setOpaque(true); jLabel5.setPreferredSize(new java.awt.Dimension(230, 16)); jLabel6.setBackground(new java.awt.Color(204, 204, 204)); jLabel6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/ui/move_in.png"))); // NOI18N jLabel6.setText("Am 13.04.11, von 10 bis 24 Uhr (Alle)"); jLabel6.setToolTipText("Ankunftszeitrahmen fr die gewhlten Einstellungen"); jLabel6.setMaximumSize(new java.awt.Dimension(230, 16)); jLabel6.setMinimumSize(new java.awt.Dimension(230, 16)); jLabel6.setOpaque(true); jLabel6.setPreferredSize(new java.awt.Dimension(230, 16)); jLabel7.setBackground(new java.awt.Color(204, 204, 204)); jLabel7.setForeground(new java.awt.Color(153, 153, 153)); jLabel7.setText("(Passenden Zeitrahmen per Drag&Drop in die Zeitrahmenliste ziehen)"); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap().addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, 271, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, 271, Short.MAX_VALUE)) .addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap())); jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup().addGroup(jPanel1Layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addComponent(jLabel7) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 3; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); add(jPanel1, gridBagConstraints); jPanel5.setLayout(new java.awt.GridBagLayout()); jScrollPane1.setBorder(javax.swing.BorderFactory.createTitledBorder("Verwendete Zeitrahmen")); jScrollPane1.setMinimumSize(new java.awt.Dimension(262, 60)); jTimeFrameList.setToolTipText( "<html>Liste der verwendeten Zeitrahmen<br/>\nUm Zeitrahmen zu entfernen, markieren einen oder mehrere Zeitrahmen und drcke <i>Entf</i>\n</html>"); jScrollPane1.setViewportView(jTimeFrameList); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.gridheight = 3; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jPanel5.add(jScrollPane1, gridBagConstraints); jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/ui/red_x.png"))); // NOI18N jButton1.setToolTipText("Die gewhlten Zeitrahmen lschen"); jButton1.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseReleased(java.awt.event.MouseEvent evt) { fireDeleteTimeFramesEvent(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 0; gridBagConstraints.insets = new java.awt.Insets(15, 5, 5, 5); jPanel5.add(jButton1, gridBagConstraints); jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/refresh.png"))); // NOI18N jButton2.setToolTipText("Alle Zeitrahmen lschen"); jButton2.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseReleased(java.awt.event.MouseEvent evt) { fireResetTimeFramesEvent(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 1; gridBagConstraints.insets = new java.awt.Insets(15, 5, 5, 5); jPanel5.add(jButton2, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); add(jPanel5, gridBagConstraints); }
From source file:md.mclama.com.ModManager.java
/** * Create the frame./*from w w w .j a va 2 s.c o m*/ */ @SuppressWarnings("serial") public ModManager() throws MalformedURLException { setResizable(false); setTitle("McLauncher " + McVersion); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setBounds(100, 100, 700, 400); contentPane = new JPanel(); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); setContentPane(contentPane); contentPane.setLayout(null); JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP); tabbedPane.setBounds(0, 0, 694, 372); contentPane.add(tabbedPane); profileListMdl = new DefaultListModel<String>(); ModListModel = new DefaultListModel<String>(); listModel = new DefaultListModel<String>(); getCurrentMods(); panelLauncher = new JPanel(); tabbedPane.addTab("Launcher", null, panelLauncher, null); panelLauncher.setLayout(null); JScrollPane scrollPane = new JScrollPane(); scrollPane.setBounds(556, 36, 132, 248); panelLauncher.add(scrollPane); profileList = new JList<String>(profileListMdl); profileList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); scrollPane.setViewportView(profileList); btnNewProfile = new JButton("New"); btnNewProfile.setFont(new Font("SansSerif", Font.PLAIN, 12)); btnNewProfile.setBounds(479, 4, 76, 20); panelLauncher.add(btnNewProfile); btnNewProfile.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { newProfile(txtProfile.getText()); } }); btnNewProfile.setToolTipText("Click to create a new profile."); JButton btnRenameProfile = new JButton("Rename"); btnRenameProfile.setBounds(479, 25, 76, 20); panelLauncher.add(btnRenameProfile); btnRenameProfile.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { renameProfile(); } }); btnRenameProfile.setToolTipText("Click to rename the selected profile"); JButton btnDelProfile = new JButton("Delete"); btnDelProfile.setBounds(479, 50, 76, 20); panelLauncher.add(btnDelProfile); btnDelProfile.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { deleteProfile(); } }); btnDelProfile.setToolTipText("Click to delete the selected profile."); JButton btnLaunch = new JButton("Launch"); btnLaunch.setBounds(605, 319, 89, 23); panelLauncher.add(btnLaunch); btnLaunch.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { if (selProfile != null) { LaunchFactorioWithSelectedMods(false); //dont ignore } } }); btnLaunch.setToolTipText("Click to launch factorio with the selected mod profile."); lblAvailableMods = new JLabel("Available Mods"); lblAvailableMods.setBounds(4, 155, 144, 14); panelLauncher.add(lblAvailableMods); lblAvailableMods.setFont(new Font("SansSerif", Font.PLAIN, 10)); lblAvailableMods.setText("Available Mods: " + -1); txtGamePath = new JTextField(); txtGamePath.setBounds(4, 5, 211, 23); panelLauncher.add(txtGamePath); txtGamePath.setToolTipText("Select tha path to your game!"); txtGamePath.setFont(new Font("Tahoma", Font.PLAIN, 8)); txtGamePath.setText("Game Path"); txtGamePath.setColumns(10); JButton btnFind = new JButton("find"); btnFind.setBounds(227, 3, 32, 23); panelLauncher.add(btnFind); txtProfile = new JTextField(); txtProfile.setBounds(556, 2, 132, 22); panelLauncher.add(txtProfile); txtProfile.setToolTipText("The name of NEW or RENAME profiles"); txtProfile.setText("Profile1"); txtProfile.setColumns(10); lblModsEnabled = new JLabel("Mods Enabled: -1"); lblModsEnabled.setBounds(335, 155, 95, 16); panelLauncher.add(lblModsEnabled); lblModsEnabled.setFont(new Font("SansSerif", Font.PLAIN, 10)); JScrollPane scrollPane_1 = new JScrollPane(); scrollPane_1.setBounds(0, 167, 211, 165); panelLauncher.add(scrollPane_1); modsList = new JList<String>(listModel); modsList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); modsList.addMouseListener(new MouseAdapter() { @Override public void mouseReleased(MouseEvent e) { String modName = util.getModVersion(modsList.getSelectedValue()); lblModVersion.setText("Mod Version: " + modName); checkDependency(modsList); if (modName.contains(".zip")) { new File(System.getProperty("java.io.tmpdir") + modName.replace(".zip", "")).delete(); } if (System.currentTimeMillis() - lastClickTime <= 300) { //Double click addMod(); } lastClickTime = System.currentTimeMillis(); } }); scrollPane_1.setViewportView(modsList); modsList.setFont(new Font("Tahoma", Font.PLAIN, 9)); JScrollPane scrollPane_2 = new JScrollPane(); scrollPane_2.setBounds(333, 167, 211, 165); panelLauncher.add(scrollPane_2); enabledModsList = new JList<String>(ModListModel); enabledModsList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); enabledModsList.addMouseListener(new MouseAdapter() { @Override public void mouseReleased(MouseEvent e) { lblModVersion.setText("Mod Version: " + util.getModVersion(enabledModsList.getSelectedValue())); checkDependency(enabledModsList); if (System.currentTimeMillis() - lastClickTime <= 300) { //Double click removeMod(); } lastClickTime = System.currentTimeMillis(); } }); enabledModsList.setFont(new Font("SansSerif", Font.PLAIN, 10)); scrollPane_2.setViewportView(enabledModsList); JButton btnEnable = new JButton("Enable"); btnEnable.setBounds(223, 200, 90, 28); panelLauncher.add(btnEnable); btnEnable.setToolTipText("Add mod -->"); JButton btnDisable = new JButton("Disable"); btnDisable.setBounds(223, 240, 90, 28); panelLauncher.add(btnDisable); btnDisable.setToolTipText("Disable mod "); JLabel lblModsAvailable = new JLabel("Mods available"); lblModsAvailable.setBounds(4, 329, 89, 14); panelLauncher.add(lblModsAvailable); lblModsAvailable.setFont(new Font("SansSerif", Font.PLAIN, 10)); JLabel lblEnabledMods = new JLabel("Enabled Mods"); lblEnabledMods.setBounds(337, 329, 89, 16); panelLauncher.add(lblEnabledMods); lblEnabledMods.setFont(new Font("SansSerif", Font.PLAIN, 10)); lblModVersion = new JLabel("Mod Version: (select a mod first)"); lblModVersion.setBounds(4, 117, 183, 14); panelLauncher.add(lblModVersion); lblModVersion.setFont(new Font("SansSerif", Font.PLAIN, 10)); lblRequiredMods = new JLabel("Required Mods: " + reqModsStr); lblRequiredMods.setBounds(6, 143, 538, 14); panelLauncher.add(lblRequiredMods); lblRequiredMods.setHorizontalAlignment(SwingConstants.RIGHT); lblRequiredMods.setFont(new Font("SansSerif", Font.PLAIN, 10)); JButton btnNewButton = new JButton("TEST"); btnNewButton.setVisible(testBtnEnabled); btnNewButton.setEnabled(testBtnEnabled); btnNewButton.setBounds(338, 61, 90, 28); panelLauncher.add(btnNewButton); btnUpdate.setBounds(218, 322, 103, 20); panelLauncher.add(btnUpdate); btnUpdate.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { util.updateLauncher(); } }); btnUpdate.setVisible(false); btnUpdate.setFont(new Font("SansSerif", Font.PLAIN, 9)); lblModRequires = new JLabel("Mod Requires: (Select a mod first)"); lblModRequires.setBounds(4, 127, 317, 16); panelLauncher.add(lblModRequires); btnLaunchIgnore = new JButton("Launch + ignore"); btnLaunchIgnore.setToolTipText("Ignore any errors that McLauncher may not correctly account for."); btnLaunchIgnore.setFont(new Font("SansSerif", Font.PLAIN, 11)); btnLaunchIgnore.setBounds(556, 284, 133, 23); panelLauncher.add(btnLaunchIgnore); JButton btnConsole = new JButton("Console"); btnConsole.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { boolean changeto = !con.isVisible(); con.setVisible(changeto); con.updateConsole(); } }); btnConsole.setBounds(335, 0, 90, 28); panelLauncher.add(btnConsole); JPanel panelDownloadMods = new JPanel(); tabbedPane.addTab("Download Mods", null, panelDownloadMods, null); panelDownloadMods.setLayout(null); scrollPane_3 = new JScrollPane(); scrollPane_3.setBounds(0, 0, 397, 303); panelDownloadMods.add(scrollPane_3); dlModel = new DefaultTableModel(new Object[][] {}, new String[] { "Mod Name", "Author", "Version", "Tags" }) { Class[] columnTypes = new Class[] { String.class, String.class, String.class, Object.class }; public Class getColumnClass(int columnIndex) { return columnTypes[columnIndex]; } boolean[] columnEditables = new boolean[] { false, false, false, false }; public boolean isCellEditable(int row, int column) { return columnEditables[column]; }; }; tSorter = new TableRowSorter<DefaultTableModel>(dlModel); tableDownloads = new JTable(); tableDownloads.setRowSorter(tSorter); tableDownloads.addMouseListener(new MouseAdapter() { @Override public void mouseReleased(MouseEvent e) { trow = tableDownloads.getSelectedRow(); trow = tableDownloads.getRowSorter().convertRowIndexToModel(trow); getDlModData(); canDownloadMod = true; } }); tableDownloads.addKeyListener(new KeyAdapter() { @Override public void keyReleased(KeyEvent e) { trow = tableDownloads.getSelectedRow(); trow = tableDownloads.getRowSorter().convertRowIndexToModel(trow); getDlModData(); canDownloadMod = true; } }); tableDownloads.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION); tableDownloads.setShowVerticalLines(true); tableDownloads.setShowHorizontalLines(true); tableDownloads.setModel(dlModel); tableDownloads.getColumnModel().getColumn(0).setPreferredWidth(218); tableDownloads.getColumnModel().getColumn(1).setPreferredWidth(97); tableDownloads.getColumnModel().getColumn(2).setPreferredWidth(77); scrollPane_3.setViewportView(tableDownloads); btnDownload = new JButton("Download"); btnDownload.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (canDownloadMod && !CurrentlyDownloading) { String dlUrl = getModDownloadUrl(); try { if (dlUrl.equals("") || dlUrl.equals(" ") || dlUrl == null) { con.log("Log", "No download link for mod, got... '" + dlUrl + "'"); } else { CurrentlyDownloading = true; CurrentDownload = new Download(new URL(dlUrl), McLauncher); } } catch (MalformedURLException e1) { con.log("Log", "Failed to download mod... No download URL?"); } } } }); btnDownload.setBounds(307, 308, 90, 28); panelDownloadMods.add(btnDownload); btnGotoMod = new JButton("Mod Page"); btnGotoMod.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { util.openWebpage(modPageUrl); } }); btnGotoMod.setEnabled(false); btnGotoMod.setBounds(134, 308, 90, 28); panelDownloadMods.add(btnGotoMod); pBarDownloadMod = new JProgressBar(); pBarDownloadMod.setBounds(538, 308, 150, 10); panelDownloadMods.add(pBarDownloadMod); pBarExtractMod = new JProgressBar(); pBarExtractMod.setBounds(538, 314, 150, 10); panelDownloadMods.add(pBarExtractMod); lblDownloadModInfo = new JLabel("Download progress"); lblDownloadModInfo.setBounds(489, 326, 199, 16); panelDownloadMods.add(lblDownloadModInfo); lblDownloadModInfo.setHorizontalAlignment(SwingConstants.TRAILING); panelModImg = new JPanel(); panelModImg.setBounds(566, 0, 128, 128); panelDownloadMods.add(panelModImg); txtFilterText = new JTextField(); txtFilterText.addFocusListener(new FocusAdapter() { @Override public void focusGained(FocusEvent e) { if (txtFilterText.getText().equals("Filter Text")) { txtFilterText.setText(""); newFilter(); } } }); txtFilterText.addKeyListener(new KeyAdapter() { @Override public void keyReleased(KeyEvent e) { if (!txtFilterText.getText().equals("Filter Text")) { newFilter(); } } }); txtFilterText.setText("Filter Text"); txtFilterText.setBounds(0, 308, 122, 28); panelDownloadMods.add(txtFilterText); txtFilterText.setColumns(10); comboBox = new JComboBox(); comboBox.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { newFilter(); } }); comboBox.setModel(new DefaultComboBoxModel(new String[] { "No tag filter", "Vanilla", "Machine", "Mechanic", "New Ore", "Module", "Big Mod", "Power", "GUI", "Map-Gen", "Must-Have", "Equipment" })); comboBox.setBounds(403, 44, 150, 26); panelDownloadMods.add(comboBox); lblModDlCounter = new JLabel("Mod database: "); lblModDlCounter.setFont(new Font("SansSerif", Font.PLAIN, 10)); lblModDlCounter.setBounds(403, 5, 162, 16); panelDownloadMods.add(lblModDlCounter); txtrDMModDescription = new JTextArea(); txtrDMModDescription.setBackground(Color.LIGHT_GRAY); txtrDMModDescription.setBorder(new LineBorder(new Color(0, 0, 0))); txtrDMModDescription.setFocusable(false); txtrDMModDescription.setEditable(false); txtrDMModDescription.setLineWrap(true); txtrDMModDescription.setWrapStyleWord(true); txtrDMModDescription.setText("Mod Description: "); txtrDMModDescription.setBounds(403, 132, 285, 75); panelDownloadMods.add(txtrDMModDescription); lblDMModTags = new JTextArea(); lblDMModTags.setFocusable(false); lblDMModTags.setEditable(false); lblDMModTags.setBorder(new LineBorder(new Color(0, 0, 0))); lblDMModTags.setWrapStyleWord(true); lblDMModTags.setLineWrap(true); lblDMModTags.setBackground(Color.LIGHT_GRAY); lblDMModTags.setText("Mod Tags: "); lblDMModTags.setBounds(403, 71, 160, 60); panelDownloadMods.add(lblDMModTags); lblDMRequiredMods = new JTextArea(); lblDMRequiredMods.setFocusable(false); lblDMRequiredMods.setEditable(false); lblDMRequiredMods.setText("Required Mods: "); lblDMRequiredMods.setWrapStyleWord(true); lblDMRequiredMods.setLineWrap(true); lblDMRequiredMods.setBorder(new LineBorder(new Color(0, 0, 0))); lblDMRequiredMods.setBackground(Color.LIGHT_GRAY); lblDMRequiredMods.setBounds(403, 208, 285, 57); panelDownloadMods.add(lblDMRequiredMods); lblDLModLicense = new JLabel(""); lblDLModLicense.setHorizontalAlignment(SwingConstants.RIGHT); lblDLModLicense.setBounds(403, 294, 285, 16); panelDownloadMods.add(lblDLModLicense); lblWipmod = new JLabel(""); lblWipmod.setBounds(395, 314, 64, 16); panelDownloadMods.add(lblWipmod); JButton btnCancel = new JButton("Cancel"); btnCancel.setToolTipText("Stop downloading"); btnCancel.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { CurrentDownload.cancel(); } }); btnCancel.setBounds(230, 308, 72, 28); panelDownloadMods.add(btnCancel); panelOptions = new JPanel(); tabbedPane.addTab("Options", null, panelOptions, null); panelOptions.setLayout(null); scrollPane_4.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); scrollPane_4.setBounds(0, 0, 694, 342); panelOptions.add(scrollPane_4); panel = new JPanel(); scrollPane_4.setViewportView(panel); panel.setLayout(null); lblCloseMclauncherAfter = new JLabel("Close McLauncher after launching Factorio?"); lblCloseMclauncherAfter.setBounds(6, 6, 274, 16); panel.add(lblCloseMclauncherAfter); lblCloseMclauncherAfter_1 = new JLabel("Close McLauncher after updating?"); lblCloseMclauncherAfter_1.setBounds(6, 34, 274, 16); panel.add(lblCloseMclauncherAfter_1); lblSortNewestDownloadable = new JLabel("Sort newest downloadable mods first?"); lblSortNewestDownloadable.setBounds(6, 62, 274, 16); panel.add(lblSortNewestDownloadable); tglbtnNewModsFirst = new JToggleButton("Toggle"); tglbtnNewModsFirst.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { lblNeedrestart.setText("McLauncher needs to restart for that to work"); writeData(); } }); tglbtnNewModsFirst.setSelected(true); tglbtnNewModsFirst.setBounds(281, 56, 66, 28); panel.add(tglbtnNewModsFirst); tglbtnCloseAfterUpdate = new JToggleButton("Toggle"); tglbtnCloseAfterUpdate.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { writeData(); } }); tglbtnCloseAfterUpdate.setBounds(281, 28, 66, 28); panel.add(tglbtnCloseAfterUpdate); tglbtnCloseAfterLaunch = new JToggleButton("Toggle"); tglbtnCloseAfterLaunch.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { writeData(); } }); tglbtnCloseAfterLaunch.setBounds(281, 0, 66, 28); panel.add(tglbtnCloseAfterLaunch); tglbtnDisplayon = new JToggleButton("On"); tglbtnDisplayon.setFont(new Font("SansSerif", Font.PLAIN, 10)); tglbtnDisplayon.setSelected(true); tglbtnDisplayon.setBounds(588, 308, 44, 28); panel.add(tglbtnDisplayon); tglbtnDisplayoff = new JToggleButton("Off"); tglbtnDisplayoff.setFont(new Font("SansSerif", Font.PLAIN, 10)); tglbtnDisplayoff.setBounds(644, 308, 44, 28); panel.add(tglbtnDisplayoff); lblInfo = new JLabel("What enabled and disabled look like"); lblInfo.setFont(new Font("SansSerif", Font.PLAIN, 10)); lblInfo.setHorizontalAlignment(SwingConstants.TRAILING); lblInfo.setBounds(359, 314, 231, 16); panel.add(lblInfo); JSeparator separator = new JSeparator(); separator.setBounds(6, 55, 676, 24); panel.add(separator); JSeparator separator_1 = new JSeparator(); separator_1.setBounds(6, 27, 676, 18); panel.add(separator_1); JSeparator separator_2 = new JSeparator(); separator_2.setBounds(6, 84, 676, 24); panel.add(separator_2); JSeparator separator_3 = new JSeparator(); separator_3.setOrientation(SwingConstants.VERTICAL); separator_3.setBounds(346, 0, 16, 336); panel.add(separator_3); lblNeedrestart = new JLabel(""); lblNeedrestart.setBounds(6, 314, 341, 16); panel.add(lblNeedrestart); tglbtnSendAnonData = new JToggleButton("Toggle"); tglbtnSendAnonData.setToolTipText("Information regarding the activity of McLauncher."); tglbtnSendAnonData.setSelected(true); //set enabled by default. tglbtnSendAnonData.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { writeData(); } }); tglbtnSendAnonData.setBounds(622, 0, 66, 28); panel.add(tglbtnSendAnonData); lblSendAnonymousUse = new JLabel("Send anonymous use data?"); lblSendAnonymousUse.setBounds(359, 6, 251, 16); panel.add(lblSendAnonymousUse); lblDeleteOldMod = new JLabel("Delete old mod before updating?"); lblDeleteOldMod.setBounds(359, 34, 251, 16); panel.add(lblDeleteOldMod); tglbtnDeleteBeforeUpdate = new JToggleButton("Toggle"); tglbtnDeleteBeforeUpdate.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { writeData(); } }); tglbtnDeleteBeforeUpdate.setBounds(622, 28, 66, 28); panel.add(tglbtnDeleteBeforeUpdate); tglbtnAlertOnModUpdateAvailable = new JToggleButton("Toggle"); tglbtnAlertOnModUpdateAvailable.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { writeData(); } }); tglbtnAlertOnModUpdateAvailable.setSelected(true); tglbtnAlertOnModUpdateAvailable.setBounds(281, 86, 66, 28); panel.add(tglbtnAlertOnModUpdateAvailable); separator_4 = new JSeparator(); separator_4.setBounds(0, 112, 676, 24); panel.add(separator_4); JLabel lblAlertModHas = new JLabel("Alert mod has update on launch?"); lblAlertModHas.setBounds(6, 92, 231, 16); panel.add(lblAlertModHas); panelChangelog = new JPanel(); tabbedPane.addTab("Changelog", null, panelChangelog, null); panelChangelog.setLayout(new BoxLayout(panelChangelog, BoxLayout.X_AXIS)); scrollPane_6 = new JScrollPane(); panelChangelog.add(scrollPane_6); textChangelog = new JTextArea(); scrollPane_6.setViewportView(textChangelog); textChangelog.setEditable(false); textChangelog.setText( "v0.4.6\r\n\r\n+Fix problem where config file would not save in the correct location. (Thanks Arano-kai)\r\n+McLauncher will now save when you select a path, or profile. (Thanks Arano-kai)\r\n+Fixed an issue where McLauncher could not get the version from a .zip mod. (Thanks Arano-kai)\r\n+Added a Cancel button to stop downloading the current mod. (Suggested by Arano-kai)\r\n\r\n\r\n\r\nv0.4.5\r\n\r\n+McLauncher should now correctly warn you on failed write/read access.\r\n+McLauncher should now work when a user has both zip and installer versions of factorio. (Thanks Jeroon)\r\n+Attempt to fix an error with dependency and .zip files, With versions. (Thanks Arano-kai)\r\n+Fix only allow single selection of mods. (Thanks Arano-kai)\r\n+Fix for the Launch+Ignore button problem on linux being cut off. (Thanks Arano-kai)\r\n+Display download progress.\r\n+Fixed an error that was thrown when clicking on some mods that had a single dependency mod.\r\n+Double clicking on a mod will now enable or disable the mod. (Thanks Arano-kai)"); btnLaunchIgnore.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (selProfile != null) { LaunchFactorioWithSelectedMods(true); //ignore errors, launch. } } }); btnLaunchIgnore.setVisible(false); //This is my test button. I use this to test things then implement them into the swing. btnNewButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { testButtonCode(e); } }); //Disable mods button. (from profile) btnDisable.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { removeMod(); } }); //Enable mods button. (to profile) btnEnable.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { addMod(); } }); //Game path button btnFind.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { findPath(); } }); //mouseClick event lister for when you click on a new profile profileList.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { selectedProfile(); } }); readData(); //Load settings init(); //some extra init getMods(); //Get the mods the user has installed }
From source file:Creator.WidgetPanel.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. java 2 s . com */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { _FileChooser_IoFile = new javax.swing.JFileChooser(); _ComboBox_DisplayPanel = new javax.swing.JComboBox(); _ScrollPane_VariableNames = new javax.swing.JScrollPane(); _List_WidgetVars = new javax.swing.JList(); _Label_VarNames = new javax.swing.JLabel(); _Button_LoadXls = new javax.swing.JButton(); _Label_Loaded = new javax.swing.JLabel(); _Panel_WidgetParams = new javax.swing.JPanel(); _Label_WidgetParams = new javax.swing.JLabel(); _Label_WigetParam_yPos = new javax.swing.JLabel(); _FTF_WigetParam_xPos = new javax.swing.JFormattedTextField(); _FTF_WigetParam_yPos = new javax.swing.JFormattedTextField(); _Label_WigetParam_xPos = new javax.swing.JLabel(); _FTF_WigetParam_xPosPer = new javax.swing.JFormattedTextField(); _Label_WigetParam_xPos1 = new javax.swing.JLabel(); _Label_WigetParam_yPos1 = new javax.swing.JLabel(); _FTF_WigetParam_yPosPer = new javax.swing.JFormattedTextField(); _Button_GenerateWidgetLink = new javax.swing.JButton(); _ScrollPane_Log = new javax.swing.JScrollPane(); _TextArea_Log = new javax.swing.JTextArea(); _ScrollPane_WidgetSettings = new javax.swing.JScrollPane(); _Panel_WidgetSettings = new javax.swing.JPanel(); _Button_LoadDefaults = new javax.swing.JButton(); _Button_LoadDefaults1 = new javax.swing.JButton(); _ScrollPane_WidgetNames = new javax.swing.JScrollPane(); _List_WidgetCodeList = new javax.swing.JList(); _Label_Widget = new javax.swing.JLabel(); _Button_widgetPositions = new javax.swing.JButton(); _ComboBox_Subgroup = new javax.swing.JComboBox(); _ScrollPane_MasterMap = new javax.swing.JScrollPane(); _List_MasterMapVariables = new javax.swing.JList(); _Label_VarsOnPanel = new javax.swing.JLabel(); _Button_ClearSelection = new javax.swing.JButton(); _Button_CreateImports = new javax.swing.JButton(); _Button_ClearLinks = new javax.swing.JButton(); _ScrollPane_Tree = new javax.swing.JScrollPane(); _JTree_WidgetLinks = new javax.swing.JTree(); _Panel_LinkPanel = new javax.swing.JPanel(); _Button_GenerateLinks = new javax.swing.JButton(); _ComboBox_Panels = new javax.swing.JComboBox(); _FTF_PanelID = new javax.swing.JFormattedTextField(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); _TF_PanelName = new javax.swing.JTextField(); _Button_Save = new javax.swing.JButton(); _FTF_XPOS = new javax.swing.JFormattedTextField(); jLabel5 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); _FTF_YPOS = new javax.swing.JFormattedTextField(); _Button_ClearCurrent = new javax.swing.JButton(); _Button_ClearAll = new javax.swing.JButton(); _Button_AddCurrent = new javax.swing.JButton(); _Button_AddAll = new javax.swing.JButton(); _FileChooser_IoFile.setApproveButtonText("Open"); _FileChooser_IoFile.setApproveButtonToolTipText("Open a xls file"); _FileChooser_IoFile.setCurrentDirectory( new java.io.File("C:\\Users\\EricGummerson\\Documents\\Background Creator Files")); _FileChooser_IoFile.setDialogTitle("Open a XLS File"); _FileChooser_IoFile.setFileFilter(new javax.swing.filechooser.FileNameExtensionFilter("XLS files", "xls")); setMinimumSize(new java.awt.Dimension(1031, 680)); setPreferredSize(new java.awt.Dimension(1031, 680)); _ComboBox_DisplayPanel.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N _ComboBox_DisplayPanel.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Main" })); _ComboBox_DisplayPanel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { _ComboBox_DisplayPanelActionPerformed(evt); } }); _List_WidgetVars.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N _List_WidgetVars.setModel(listModelWidgetsVars); _List_WidgetVars.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); _List_WidgetVars.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent evt) { _List_WidgetVarsValueChanged(evt); } }); _ScrollPane_VariableNames.setViewportView(_List_WidgetVars); _Label_VarNames.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N _Label_VarNames.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); _Label_VarNames.setText("Widget Vars"); _Button_LoadXls.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N _Button_LoadXls.setText("Load Export File (.xls)"); _Button_LoadXls.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { _Button_LoadXlsActionPerformed(evt); } }); _Label_Loaded.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N _Label_Loaded.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); _Label_Loaded.setText("XLS File Not loaded"); _Label_WidgetParams.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N _Label_WidgetParams.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); _Label_WidgetParams.setText("Widget Parameters"); _Label_WigetParam_yPos.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N _Label_WigetParam_yPos.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); _Label_WigetParam_yPos.setText("Positon Y"); _FTF_WigetParam_xPos.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory( new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0")))); _FTF_WigetParam_xPos.setHorizontalAlignment(javax.swing.JTextField.CENTER); _FTF_WigetParam_xPos.setText("10"); _FTF_WigetParam_yPos.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory( new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0")))); _FTF_WigetParam_yPos.setHorizontalAlignment(javax.swing.JTextField.CENTER); _FTF_WigetParam_yPos.setText("10"); _Label_WigetParam_xPos.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N _Label_WigetParam_xPos.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); _Label_WigetParam_xPos.setText("Positon X"); _FTF_WigetParam_xPosPer.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory( new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0")))); _FTF_WigetParam_xPosPer.setHorizontalAlignment(javax.swing.JTextField.CENTER); _FTF_WigetParam_xPosPer.setText("0"); _Label_WigetParam_xPos1.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N _Label_WigetParam_xPos1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); _Label_WigetParam_xPos1.setText("Percentage X"); _Label_WigetParam_yPos1.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N _Label_WigetParam_yPos1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); _Label_WigetParam_yPos1.setText("Percentage Y"); _FTF_WigetParam_yPosPer.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory( new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0")))); _FTF_WigetParam_yPosPer.setHorizontalAlignment(javax.swing.JTextField.CENTER); _FTF_WigetParam_yPosPer.setText("0"); _Button_GenerateWidgetLink.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N _Button_GenerateWidgetLink.setText("Generate"); _Button_GenerateWidgetLink.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { _Button_GenerateWidgetLinkActionPerformed(evt); } }); _TextArea_Log.setEditable(false); _TextArea_Log.setColumns(20); _TextArea_Log.setFont(new java.awt.Font("Arial", 0, 10)); // NOI18N _TextArea_Log.setLineWrap(true); _TextArea_Log.setRows(5); _ScrollPane_Log.setViewportView(_TextArea_Log); _ScrollPane_WidgetSettings.setPreferredSize(new java.awt.Dimension(232, 265)); javax.swing.GroupLayout _Panel_WidgetSettingsLayout = new javax.swing.GroupLayout(_Panel_WidgetSettings); _Panel_WidgetSettings.setLayout(_Panel_WidgetSettingsLayout); _Panel_WidgetSettingsLayout.setHorizontalGroup(_Panel_WidgetSettingsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 493, Short.MAX_VALUE)); _Panel_WidgetSettingsLayout.setVerticalGroup(_Panel_WidgetSettingsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGap(0, 362, Short.MAX_VALUE)); _ScrollPane_WidgetSettings.setViewportView(_Panel_WidgetSettings); _Button_LoadDefaults.setFont(new java.awt.Font("Arial", 0, 8)); // NOI18N _Button_LoadDefaults.setText("Load Defaults"); _Button_LoadDefaults.setToolTipText("Loads the default widget panel links from the /Home/ Directory"); _Button_LoadDefaults.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { _Button_LoadDefaultsActionPerformed(evt); } }); _Button_LoadDefaults1.setFont(new java.awt.Font("Arial", 0, 8)); // NOI18N _Button_LoadDefaults1.setText("Save Defaults"); _Button_LoadDefaults1.setToolTipText("Save the current set of widget links to the /Home/ directory"); _Button_LoadDefaults1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { _Button_LoadDefaults1ActionPerformed(evt); } }); _List_WidgetCodeList.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N _List_WidgetCodeList.setModel(listModelCodeWidgets); _List_WidgetCodeList.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION); _List_WidgetCodeList.addListSelectionListener(new javax.swing.event.ListSelectionListener() { public void valueChanged(javax.swing.event.ListSelectionEvent evt) { _List_WidgetCodeListValueChanged(evt); } }); _ScrollPane_WidgetNames.setViewportView(_List_WidgetCodeList); _Label_Widget.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N _Label_Widget.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); _Label_Widget.setText("Widget Code"); javax.swing.GroupLayout _Panel_WidgetParamsLayout = new javax.swing.GroupLayout(_Panel_WidgetParams); _Panel_WidgetParams.setLayout(_Panel_WidgetParamsLayout); _Panel_WidgetParamsLayout.setHorizontalGroup(_Panel_WidgetParamsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, _Panel_WidgetParamsLayout .createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(_Panel_WidgetParamsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(_ScrollPane_WidgetSettings, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) .addComponent(_ScrollPane_WidgetNames, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) .addComponent(_Label_Widget, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(_Label_WidgetParams, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 209, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(_Panel_WidgetParamsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(_Panel_WidgetParamsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, _Panel_WidgetParamsLayout.createSequentialGroup() .addComponent(_Button_GenerateWidgetLink, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(_Panel_WidgetParamsLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(_Button_LoadDefaults, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(_Button_LoadDefaults1, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, _Panel_WidgetParamsLayout.createSequentialGroup() .addGroup(_Panel_WidgetParamsLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(_Label_WigetParam_yPos, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(_Label_WigetParam_xPos, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(_Panel_WidgetParamsLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(_FTF_WigetParam_xPos) .addComponent(_FTF_WigetParam_yPos, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, _Panel_WidgetParamsLayout.createSequentialGroup() .addGroup(_Panel_WidgetParamsLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(_Label_WigetParam_xPos1, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(_Label_WigetParam_yPos1, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(_Panel_WidgetParamsLayout .createParallelGroup( javax.swing.GroupLayout.Alignment.LEADING) .addComponent(_FTF_WigetParam_yPosPer, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(_FTF_WigetParam_xPosPer, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addComponent(_ScrollPane_Log, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 236, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap())); _Panel_WidgetParamsLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] { _FTF_WigetParam_xPos, _FTF_WigetParam_yPos, _FTF_WigetParam_yPosPer, _Label_WigetParam_xPos, _Label_WigetParam_xPos1, _Label_WigetParam_yPos, _Label_WigetParam_yPos1 }); _Panel_WidgetParamsLayout.setVerticalGroup(_Panel_WidgetParamsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(_Panel_WidgetParamsLayout.createSequentialGroup().addContainerGap() .addGroup(_Panel_WidgetParamsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(_Panel_WidgetParamsLayout.createSequentialGroup() .addComponent(_Label_Widget, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(_ScrollPane_WidgetNames)) .addGroup(_Panel_WidgetParamsLayout.createSequentialGroup() .addGroup(_Panel_WidgetParamsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(_FTF_WigetParam_xPos, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(_Panel_WidgetParamsLayout.createSequentialGroup() .addComponent(_Label_WigetParam_xPos, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(1, 1, 1))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(_Panel_WidgetParamsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(_FTF_WigetParam_yPos, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(_Label_WigetParam_yPos, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(_Panel_WidgetParamsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(_Label_WigetParam_xPos1, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(_FTF_WigetParam_xPosPer, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(_Panel_WidgetParamsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(_FTF_WigetParam_yPosPer, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(_Label_WigetParam_yPos1, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(_Panel_WidgetParamsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(_Panel_WidgetParamsLayout.createSequentialGroup() .addComponent(_Button_LoadDefaults, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(_Button_LoadDefaults1, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(_Button_GenerateWidgetLink, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(_Panel_WidgetParamsLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(_Panel_WidgetParamsLayout.createSequentialGroup() .addComponent(_Label_WidgetParams, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(_ScrollPane_WidgetSettings, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)) .addComponent(_ScrollPane_Log, javax.swing.GroupLayout.PREFERRED_SIZE, 225, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); _Panel_WidgetParamsLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] { _Button_LoadDefaults, _Button_LoadDefaults1 }); _Panel_WidgetParamsLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] { _FTF_WigetParam_xPos, _FTF_WigetParam_xPosPer, _FTF_WigetParam_yPos, _FTF_WigetParam_yPosPer, _Label_WigetParam_xPos, _Label_WigetParam_xPos1, _Label_WigetParam_yPos, _Label_WigetParam_yPos1 }); _Button_widgetPositions.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N _Button_widgetPositions.setText("Get Positions"); _Button_widgetPositions.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { _Button_widgetPositionsActionPerformed(evt); } }); _ComboBox_Subgroup.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N _ComboBox_Subgroup.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Store" })); _ComboBox_Subgroup.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { _ComboBox_SubgroupActionPerformed(evt); } }); _List_MasterMapVariables.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N _List_MasterMapVariables.setModel(listModelMasterMap); _ScrollPane_MasterMap.setViewportView(_List_MasterMapVariables); _Label_VarsOnPanel.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N _Label_VarsOnPanel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); _Label_VarsOnPanel.setText("Variables on Panel"); _Button_ClearSelection.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N _Button_ClearSelection.setText("Clear Selection"); _Button_ClearSelection.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { _Button_ClearSelectionActionPerformed(evt); } }); _Button_CreateImports.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N _Button_CreateImports.setText("Create Imports"); _Button_CreateImports.setEnabled(false); _Button_CreateImports.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { _Button_CreateImportsActionPerformed(evt); } }); _Button_ClearLinks.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N _Button_ClearLinks.setText("Delete All Widgets"); _Button_ClearLinks.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { _Button_ClearLinksActionPerformed(evt); } }); _JTree_WidgetLinks.setModel(treeModel); _JTree_WidgetLinks.addTreeSelectionListener(new javax.swing.event.TreeSelectionListener() { public void valueChanged(javax.swing.event.TreeSelectionEvent evt) { _JTree_WidgetLinksValueChanged(evt); } }); _ScrollPane_Tree.setViewportView(_JTree_WidgetLinks); _Button_GenerateLinks.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N _Button_GenerateLinks.setText("Create Links"); _Button_GenerateLinks.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { _Button_GenerateLinksActionPerformed(evt); } }); _ComboBox_Panels.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N _ComboBox_Panels.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Main" })); _ComboBox_Panels.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { _ComboBox_PanelsActionPerformed(evt); } }); _FTF_PanelID.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory( new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0")))); _FTF_PanelID.setHorizontalAlignment(javax.swing.JTextField.CENTER); jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel2.setText("Panel Names"); jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel3.setText("Panel ID"); jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel4.setText("Panel Name"); _TF_PanelName.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N _TF_PanelName.setHorizontalAlignment(javax.swing.JTextField.CENTER); _TF_PanelName.setText("Main"); _Button_Save.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N _Button_Save.setText("Save & Next"); _Button_Save.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { _Button_SaveActionPerformed(evt); } }); _FTF_XPOS.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory( new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0")))); _FTF_XPOS.setHorizontalAlignment(javax.swing.JTextField.CENTER); jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel5.setText("X Position"); jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel7.setText("Y Position"); _FTF_YPOS.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory( new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#0")))); _FTF_YPOS.setHorizontalAlignment(javax.swing.JTextField.CENTER); javax.swing.GroupLayout _Panel_LinkPanelLayout = new javax.swing.GroupLayout(_Panel_LinkPanel); _Panel_LinkPanel.setLayout(_Panel_LinkPanelLayout); _Panel_LinkPanelLayout.setHorizontalGroup(_Panel_LinkPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(_Panel_LinkPanelLayout.createSequentialGroup().addContainerGap() .addGroup(_Panel_LinkPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 152, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(_ComboBox_Panels, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(_Panel_LinkPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(_Panel_LinkPanelLayout.createSequentialGroup() .addGroup(_Panel_LinkPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, 64, Short.MAX_VALUE) .addComponent(_FTF_PanelID)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(_Panel_LinkPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(_TF_PanelName) .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, 113, Short.MAX_VALUE))) .addComponent(_Button_Save, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(_Panel_LinkPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(_Panel_LinkPanelLayout.createSequentialGroup() .addGroup(_Panel_LinkPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(_FTF_XPOS, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(_Panel_LinkPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(_FTF_YPOS, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 59, javax.swing.GroupLayout.PREFERRED_SIZE))) .addComponent(_Button_GenerateLinks, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); _Panel_LinkPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] { _FTF_XPOS, _FTF_YPOS }); _Panel_LinkPanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] { jLabel5, jLabel7 }); _Panel_LinkPanelLayout.setVerticalGroup(_Panel_LinkPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(_Panel_LinkPanelLayout.createSequentialGroup().addContainerGap() .addGroup(_Panel_LinkPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(_Panel_LinkPanelLayout.createSequentialGroup() .addGroup(_Panel_LinkPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(7, 7, 7) .addGroup(_Panel_LinkPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(_ComboBox_Panels, javax.swing.GroupLayout.DEFAULT_SIZE, 44, Short.MAX_VALUE) .addComponent(_FTF_PanelID).addComponent(_TF_PanelName))) .addGroup(_Panel_LinkPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(_Panel_LinkPanelLayout.createSequentialGroup().addGap(32, 32, 32) .addGroup(_Panel_LinkPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(_FTF_YPOS, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(_FTF_XPOS, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(_Panel_LinkPanelLayout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(_Button_Save, javax.swing.GroupLayout.DEFAULT_SIZE, 31, Short.MAX_VALUE) .addComponent(_Button_GenerateLinks, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))); _Panel_LinkPanelLayout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] { jLabel2, jLabel3, jLabel4, jLabel5, jLabel7 }); _Button_ClearCurrent.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N _Button_ClearCurrent.setText("Clear Main Panel"); _Button_ClearCurrent.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { _Button_ClearCurrentActionPerformed(evt); } }); _Button_ClearAll.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N _Button_ClearAll.setText("Clear All Panels"); _Button_ClearAll.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { _Button_ClearAllActionPerformed(evt); } }); _Button_AddCurrent.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N _Button_AddCurrent.setText("Add Widgets Main Panel"); _Button_AddCurrent.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { _Button_AddCurrentActionPerformed(evt); } }); _Button_AddAll.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N _Button_AddAll.setText("Add Widgets All"); _Button_AddAll.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { _Button_AddAllActionPerformed(evt); } }); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); this.setLayout(layout); layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(_Panel_WidgetParams, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addComponent(_Label_VarNames, javax.swing.GroupLayout.PREFERRED_SIZE, 203, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(_Button_ClearSelection, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(_ComboBox_Subgroup, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(_ScrollPane_VariableNames, javax.swing.GroupLayout.PREFERRED_SIZE, 465, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(_Button_ClearCurrent, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(_Button_ClearAll, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(_Button_AddCurrent, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(_Button_AddAll, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(28, 28, 28) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(_Button_CreateImports, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(_Button_ClearLinks, javax.swing.GroupLayout.PREFERRED_SIZE, 138, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup().addGap(60, 60, 60) .addGroup(layout .createParallelGroup( javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(_Label_Loaded, javax.swing.GroupLayout.PREFERRED_SIZE, 169, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(_Button_LoadXls, javax.swing.GroupLayout.PREFERRED_SIZE, 169, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGap(29, 29, 29)) .addGroup(layout.createSequentialGroup().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(_ComboBox_DisplayPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createSequentialGroup() .addComponent(_Button_widgetPositions, javax.swing.GroupLayout.PREFERRED_SIZE, 163, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(_Label_VarsOnPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(0, 0, Short.MAX_VALUE)) .addComponent(_ScrollPane_Tree).addComponent(_ScrollPane_MasterMap) .addComponent(_Panel_LinkPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(27, 27, 27))); layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createSequentialGroup().addGap(11, 11, 11) .addComponent(_Label_VarNames, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(5, 5, 5).addComponent(_ScrollPane_VariableNames, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(_Label_VarsOnPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(7, 7, 7)) .addGroup(layout.createSequentialGroup().addContainerGap().addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(_Button_ClearSelection, javax.swing.GroupLayout.DEFAULT_SIZE, 29, Short.MAX_VALUE) .addComponent(_Button_widgetPositions, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))) .addComponent(_ScrollPane_MasterMap, javax.swing.GroupLayout.PREFERRED_SIZE, 134, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGap(6, 6, 6) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(_ComboBox_DisplayPanel, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(_ComboBox_Subgroup, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(_ScrollPane_Tree, javax.swing.GroupLayout.PREFERRED_SIZE, 148, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(_Panel_LinkPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(_Button_ClearCurrent, javax.swing.GroupLayout.DEFAULT_SIZE, 33, Short.MAX_VALUE) .addComponent(_Button_LoadXls, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(_Button_ClearAll).addComponent(_Label_Loaded, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(_Button_AddCurrent, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap( javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(_Button_AddAll).addGap(55, 55, 55)) .addGroup(layout.createSequentialGroup() .addGroup(layout .createParallelGroup( javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(_Button_CreateImports, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(_Button_ClearLinks, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(0, 0, Short.MAX_VALUE)))) .addComponent(_Panel_WidgetParams, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap())); layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] { _Button_AddAll, _Button_AddCurrent, _Button_ClearAll, _Button_ClearCurrent }); }
From source file:com.mirth.connect.client.ui.DashboardPanel.java
private void initComponents() { splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT); splitPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); splitPane.setOneTouchExpandable(true); topPanel = new JPanel(); topPanel.setBackground(UIConstants.BACKGROUND_COLOR); dashboardTable = null;/*from w w w. j a v a 2 s. co m*/ dashboardTableScrollPane = new JScrollPane(); dashboardTableScrollPane.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0)); dashboardTableScrollPane.setViewportView(dashboardTable); dashboardTableScrollPane.setDoubleBuffered(true); controlPanel = new JPanel(); controlPanel.setBorder(BorderFactory.createMatteBorder(1, 0, 0, 0, new Color(164, 164, 164))); controlPanel.setPreferredSize(new Dimension(100, 20)); tagFilterButton = new IconButton(); tagFilterButton .setIcon(new ImageIcon(getClass().getResource("/com/mirth/connect/client/ui/images/wrench.png"))); // NOI18N tagFilterButton.setToolTipText("Show Channel Filter"); tagFilterButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { tagFilterButtonActionPerformed(); } }); tagsLabel = new JLabel(); ButtonGroup showStatsButtonGroup = new ButtonGroup(); showCurrentStatsButton = new JRadioButton("Current Statistics"); showCurrentStatsButton.setSelected(true); showCurrentStatsButton .setToolTipText("Show the statistics accumulated since the last time the statistics were reset"); showCurrentStatsButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { showCurrentStatsButtonActionPerformed(); } }); showStatsButtonGroup.add(showCurrentStatsButton); showLifetimeStatsButton = new JRadioButton("Lifetime Statistics"); showLifetimeStatsButton .setToolTipText("Show the statistics accumulated over the entire lifetime of the channel"); showLifetimeStatsButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { showLifetimeStatsButtonActionPerformed(); } }); showStatsButtonGroup.add(showLifetimeStatsButton); pluginContainerPanel = new JPanel(); controlSeparator = new JSeparator(SwingConstants.VERTICAL); ButtonGroup tableModeButtonGroup = new ButtonGroup(); tableModeGroupsButton = new IconToggleButton(UIConstants.ICON_GROUP); tableModeGroupsButton.setToolTipText("Groups"); tableModeGroupsButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent evt) { switchTableMode(true); } }); tableModeButtonGroup.add(tableModeGroupsButton); tableModeChannelsButton = new IconToggleButton(UIConstants.ICON_CHANNEL); tableModeChannelsButton.setToolTipText("Channels"); tableModeChannelsButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent evt) { switchTableMode(false); } }); tableModeButtonGroup.add(tableModeChannelsButton); tabPane = new JTabbedPane(); splitPane.setTopComponent(topPanel); splitPane.setBottomComponent(tabPane); }
From source file:de.mendelson.comm.as2.client.AS2Gui.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.// ww w. j a v a 2 s . c o m */ // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; jPopupMenu = new javax.swing.JPopupMenu(); jMenuItemPopupMessageDetails = new javax.swing.JMenuItem(); jMenuItemPopupSendAgain = new javax.swing.JMenuItem(); jSeparator9 = new javax.swing.JPopupMenu.Separator(); jMenuItemPopupDeleteMessage = new javax.swing.JMenuItem(); jTabbedPane = new javax.swing.JTabbedPane(); jPanelLog = new javax.swing.JPanel(); jToolBar = new javax.swing.JToolBar(); jButtonPartner = new javax.swing.JButton(); jButtonMessageDetails = new javax.swing.JButton(); jButtonFilter = new javax.swing.JButton(); jToggleButtonStopRefresh = new javax.swing.JToggleButton(); jSeparator1 = new javax.swing.JSeparator(); jButtonDeleteMessage = new javax.swing.JButton(); jPanelMain = new javax.swing.JPanel(); jSplitPane = new javax.swing.JSplitPane(); jPanelMessageLog = new javax.swing.JPanel(); jPanelFilterOverview = new javax.swing.JPanel(); jCheckBoxFilterShowOk = new javax.swing.JCheckBox(); jCheckBoxFilterShowPending = new javax.swing.JCheckBox(); jCheckBoxFilterShowStopped = new javax.swing.JCheckBox(); jLabelFilterShowOk = new javax.swing.JLabel(); jLabelFilterShowPending = new javax.swing.JLabel(); jLabelFilterShowError = new javax.swing.JLabel(); jButtonHideFilter = new javax.swing.JButton(); jComboBoxFilterPartner = new javax.swing.JComboBox(); jPanelSpace = new javax.swing.JPanel(); jLabelFilterPartner = new javax.swing.JLabel(); jSeparator4 = new javax.swing.JSeparator(); jScrollPaneMessageOverview = new javax.swing.JScrollPane(); jTableMessageOverview = new de.mendelson.util.tables.JTableSortable(); jPanelServerLog = new javax.swing.JPanel(); jPanelRefreshWarning = new javax.swing.JPanel(); jLabelRefreshStopWarning = new javax.swing.JLabel(); htmlPanel = new de.mendelson.comm.as2.client.HTMLPanel(); jPanelInfo = new javax.swing.JPanel(); jButtonNewVersion = new javax.swing.JButton(); browserLinkedPanel = new de.mendelson.comm.as2.client.BrowserLinkedPanel(); as2StatusBar = new de.mendelson.comm.as2.client.AS2StatusBar(); jMenuBar = new javax.swing.JMenuBar(); jMenuFile = new javax.swing.JMenu(); jMenuItemManualSend = new javax.swing.JMenuItem(); jMenuItemKeyRefresh = new javax.swing.JMenuItem(); jSeparator2 = new javax.swing.JSeparator(); jMenuItemFilePreferences = new javax.swing.JMenuItem(); jMenuItemPartner = new javax.swing.JMenuItem(); jSeparator3 = new javax.swing.JSeparator(); jMenuItemExportConfig = new javax.swing.JMenuItem(); jMenuItemExportImport = new javax.swing.JMenuItem(); jSeparator6 = new javax.swing.JSeparator(); jMenuItemFileExit = new javax.swing.JMenuItem(); jMenuHelp = new javax.swing.JMenu(); jMenuItemHelpAbout = new javax.swing.JMenuItem(); jSeparator5 = new javax.swing.JSeparator(); jMenuItemHelpShop = new javax.swing.JMenuItem(); jMenuItemHelpForum = new javax.swing.JMenuItem(); jMenuItemHelpSystem = new javax.swing.JMenuItem(); jMenuItemPopupMessageDetails.setIcon(new javax.swing.ImageIcon( getClass().getResource("/de/mendelson/comm/as2/client/messagedetails16x16.gif"))); // NOI18N jMenuItemPopupMessageDetails.setText(this.rb.getResourceString("details")); jMenuItemPopupMessageDetails.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemPopupMessageDetailsActionPerformed(evt); } }); jPopupMenu.add(jMenuItemPopupMessageDetails); jMenuItemPopupSendAgain.setIcon( new javax.swing.ImageIcon(getClass().getResource("/de/mendelson/comm/as2/client/send_16x16.gif"))); // NOI18N jMenuItemPopupSendAgain.setText(this.rb.getResourceString("menu.file.resend")); jMenuItemPopupSendAgain.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemPopupSendAgainActionPerformed(evt); } }); jPopupMenu.add(jMenuItemPopupSendAgain); jPopupMenu.add(jSeparator9); jMenuItemPopupDeleteMessage.setIcon(new javax.swing.ImageIcon( getClass().getResource("/de/mendelson/comm/as2/client/delete_16x16.gif"))); // NOI18N jMenuItemPopupDeleteMessage.setText(this.rb.getResourceString("delete.msg")); jMenuItemPopupDeleteMessage.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemPopupDeleteMessageActionPerformed(evt); } }); jPopupMenu.add(jMenuItemPopupDeleteMessage); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setIconImage(new ImageIcon(AS2Gui.class.getResource("/de/mendelson/comm/as2/client/os_logo16x16.gif")) .getImage()); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { formWindowClosing(evt); } }); getContentPane().setLayout(new java.awt.GridBagLayout()); jPanelLog.setLayout(new java.awt.BorderLayout()); jToolBar.setFloatable(false); jToolBar.setRollover(true); jButtonPartner.setIcon(new javax.swing.ImageIcon( getClass().getResource("/de/mendelson/comm/as2/partner/gui/singlepartner16x16.gif"))); // NOI18N jButtonPartner.setText(this.rb.getResourceString("menu.file.partner")); jButtonPartner.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonPartnerActionPerformed(evt); } }); jToolBar.add(jButtonPartner); jButtonMessageDetails.setIcon(new javax.swing.ImageIcon( getClass().getResource("/de/mendelson/comm/as2/client/messagedetails16x16.gif"))); // NOI18N jButtonMessageDetails.setText(this.rb.getResourceString("details")); jButtonMessageDetails.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonMessageDetailsActionPerformed(evt); } }); jToolBar.add(jButtonMessageDetails); jButtonFilter.setIcon( new javax.swing.ImageIcon(getClass().getResource("/de/mendelson/comm/as2/client/filter16x16.gif"))); // NOI18N jButtonFilter.setText(this.rb.getResourceString("filter")); jButtonFilter.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonFilterActionPerformed(evt); } }); jToolBar.add(jButtonFilter); jToggleButtonStopRefresh.setIcon( new javax.swing.ImageIcon(getClass().getResource("/de/mendelson/comm/as2/client/stop_16x16.gif"))); // NOI18N jToggleButtonStopRefresh.setText(this.rb.getResourceString("stoprefresh.msg")); jToggleButtonStopRefresh.setFocusable(false); jToggleButtonStopRefresh.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); jToggleButtonStopRefresh.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jToggleButtonStopRefreshActionPerformed(evt); } }); jToolBar.add(jToggleButtonStopRefresh); jSeparator1.setOrientation(javax.swing.SwingConstants.VERTICAL); jSeparator1.setMaximumSize(new java.awt.Dimension(5, 32767)); jToolBar.add(jSeparator1); jButtonDeleteMessage.setIcon(new javax.swing.ImageIcon( getClass().getResource("/de/mendelson/comm/as2/client/delete_16x16.gif"))); // NOI18N jButtonDeleteMessage.setText(this.rb.getResourceString("delete.msg")); jButtonDeleteMessage.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonDeleteMessageActionPerformed(evt); } }); jToolBar.add(jButtonDeleteMessage); jPanelLog.add(jToolBar, java.awt.BorderLayout.NORTH); jPanelMain.setLayout(new java.awt.GridBagLayout()); jSplitPane.setDividerLocation(300); jSplitPane.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT); jPanelMessageLog.setLayout(new java.awt.GridBagLayout()); jPanelFilterOverview.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jPanelFilterOverview.setLayout(new java.awt.GridBagLayout()); jCheckBoxFilterShowOk.setSelected(true); jCheckBoxFilterShowOk.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jCheckBoxFilterShowOkActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 0); jPanelFilterOverview.add(jCheckBoxFilterShowOk, gridBagConstraints); jCheckBoxFilterShowPending.setSelected(true); jCheckBoxFilterShowPending.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jCheckBoxFilterShowPendingActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 0); jPanelFilterOverview.add(jCheckBoxFilterShowPending, gridBagConstraints); jCheckBoxFilterShowStopped.setSelected(true); jCheckBoxFilterShowStopped.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jCheckBoxFilterShowStoppedActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 0); jPanelFilterOverview.add(jCheckBoxFilterShowStopped, gridBagConstraints); jLabelFilterShowOk.setIcon(new javax.swing.ImageIcon( getClass().getResource("/de/mendelson/comm/as2/client/state_finished16x16.gif"))); // NOI18N jLabelFilterShowOk.setText(this.rb.getResourceString("filter.showfinished")); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 0; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jPanelFilterOverview.add(jLabelFilterShowOk, gridBagConstraints); jLabelFilterShowPending.setIcon(new javax.swing.ImageIcon( getClass().getResource("/de/mendelson/comm/as2/client/state_pending16x16.gif"))); // NOI18N jLabelFilterShowPending.setText(this.rb.getResourceString("filter.showpending")); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jPanelFilterOverview.add(jLabelFilterShowPending, gridBagConstraints); jLabelFilterShowError.setIcon(new javax.swing.ImageIcon( getClass().getResource("/de/mendelson/comm/as2/client/state_stopped16x16.gif"))); // NOI18N jLabelFilterShowError.setText(this.rb.getResourceString("filter.showstopped")); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 2; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jPanelFilterOverview.add(jLabelFilterShowError, gridBagConstraints); jButtonHideFilter.setIcon( new javax.swing.ImageIcon(getClass().getResource("/de/mendelson/comm/as2/client/hide_filter.gif"))); // NOI18N jButtonHideFilter.setMargin(new java.awt.Insets(0, 0, 0, 0)); jButtonHideFilter.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonHideFilterActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 6; gridBagConstraints.gridy = 0; gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHEAST; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jPanelFilterOverview.add(jButtonHideFilter, gridBagConstraints); jComboBoxFilterPartner.setMinimumSize(new java.awt.Dimension(100, 20)); jComboBoxFilterPartner.setPreferredSize(new java.awt.Dimension(100, 22)); jComboBoxFilterPartner.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jComboBoxFilterPartnerActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 0; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jPanelFilterOverview.add(jComboBoxFilterPartner, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 5; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; jPanelFilterOverview.add(jPanelSpace, gridBagConstraints); jLabelFilterPartner.setText(this.rb.getResourceString("filter.partner")); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 0; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jPanelFilterOverview.add(jLabelFilterPartner, gridBagConstraints); jSeparator4.setOrientation(javax.swing.SwingConstants.VERTICAL); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 2; gridBagConstraints.gridy = 0; gridBagConstraints.gridheight = 3; gridBagConstraints.fill = java.awt.GridBagConstraints.VERTICAL; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jPanelFilterOverview.add(jSeparator4, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHWEST; gridBagConstraints.weightx = 1.0; jPanelMessageLog.add(jPanelFilterOverview, gridBagConstraints); jTableMessageOverview.setModel(new TableModelMessageOverview()); jTableMessageOverview.setShowHorizontalLines(false); jTableMessageOverview.setShowVerticalLines(false); jTableMessageOverview.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jTableMessageOverviewMouseClicked(evt); } }); jScrollPaneMessageOverview.setViewportView(jTableMessageOverview); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.gridheight = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; jPanelMessageLog.add(jScrollPaneMessageOverview, gridBagConstraints); jSplitPane.setLeftComponent(jPanelMessageLog); jPanelServerLog.setLayout(new java.awt.BorderLayout()); jSplitPane.setRightComponent(jPanelServerLog); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; jPanelMain.add(jSplitPane, gridBagConstraints); jPanelRefreshWarning.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(204, 0, 0))); jPanelRefreshWarning.setLayout(new java.awt.GridBagLayout()); jLabelRefreshStopWarning.setFont(new java.awt.Font("Tahoma", 1, 11)); jLabelRefreshStopWarning.setForeground(new java.awt.Color(204, 51, 0)); jLabelRefreshStopWarning.setText(this.rb.getResourceString("warning.refreshstopped")); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(10, 10, 10, 10); jPanelRefreshWarning.add(jLabelRefreshStopWarning, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5); jPanelMain.add(jPanelRefreshWarning, gridBagConstraints); jPanelLog.add(jPanelMain, java.awt.BorderLayout.CENTER); jTabbedPane.addTab(this.rb.getResourceString("tab.transactions"), jPanelLog); jTabbedPane.addTab(this.rb.getResourceString("tab.welcome"), htmlPanel); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; getContentPane().add(jTabbedPane, gridBagConstraints); jPanelInfo.setLayout(new java.awt.GridBagLayout()); jButtonNewVersion.setIcon(new javax.swing.ImageIcon( getClass().getResource("/de/mendelson/comm/as2/client/newversion_16x16.gif"))); // NOI18N jButtonNewVersion.setToolTipText(this.rb.getResourceString("new.version")); jButtonNewVersion.setMargin(new java.awt.Insets(2, 5, 2, 5)); jButtonNewVersion.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonNewVersionActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 0; gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST; jPanelInfo.add(jButtonNewVersion, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; jPanelInfo.add(browserLinkedPanel, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.weightx = 1.0; jPanelInfo.add(as2StatusBar, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.weightx = 1.0; getContentPane().add(jPanelInfo, gridBagConstraints); jMenuFile.setText(this.rb.getResourceString("menu.file")); jMenuItemManualSend.setIcon( new javax.swing.ImageIcon(getClass().getResource("/de/mendelson/comm/as2/client/send_16x16.gif"))); // NOI18N jMenuItemManualSend.setText(this.rb.getResourceString("menu.file.send")); jMenuItemManualSend.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemManualSendActionPerformed(evt); } }); jMenuFile.add(jMenuItemManualSend); jMenuItemKeyRefresh.setIcon(new javax.swing.ImageIcon( getClass().getResource("/de/mendelson/util/security/cert/gui/keyrefresh16x16.gif"))); // NOI18N jMenuItemKeyRefresh.setText(this.rb.getResourceString("keyrefresh")); jMenuItemKeyRefresh.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemKeyRefreshActionPerformed(evt); } }); jMenuFile.add(jMenuItemKeyRefresh); jMenuFile.add(jSeparator2); jMenuItemFilePreferences.setIcon(new javax.swing.ImageIcon( getClass().getResource("/de/mendelson/comm/as2/preferences/preferences16x16.gif"))); // NOI18N jMenuItemFilePreferences.setText(this.rb.getResourceString("menu.file.preferences")); jMenuItemFilePreferences.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemFilePreferencesActionPerformed(evt); } }); jMenuFile.add(jMenuItemFilePreferences); jMenuItemPartner.setIcon(new javax.swing.ImageIcon( getClass().getResource("/de/mendelson/comm/as2/partner/gui/singlepartner16x16.gif"))); // NOI18N jMenuItemPartner.setText(this.rb.getResourceString("menu.file.partner")); jMenuItemPartner.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemPartnerActionPerformed(evt); } }); jMenuFile.add(jMenuItemPartner); jMenuFile.add(jSeparator3); jMenuItemExportConfig.setIcon(new javax.swing.ImageIcon( getClass().getResource("/de/mendelson/comm/as2/importexport/export_16x16.gif"))); // NOI18N jMenuItemExportConfig.setText(this.rb.getResourceString("menu.file.export")); jMenuItemExportConfig.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemExportConfigActionPerformed(evt); } }); jMenuFile.add(jMenuItemExportConfig); jMenuItemExportImport.setIcon(new javax.swing.ImageIcon( getClass().getResource("/de/mendelson/comm/as2/importexport/import_16x16.gif"))); // NOI18N jMenuItemExportImport.setText(this.rb.getResourceString("menu.file.import")); jMenuItemExportImport.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemExportImportActionPerformed(evt); } }); jMenuFile.add(jMenuItemExportImport); jMenuFile.add(jSeparator6); jMenuItemFileExit.setIcon( new javax.swing.ImageIcon(getClass().getResource("/de/mendelson/comm/as2/client/close16x16.gif"))); // NOI18N jMenuItemFileExit.setText(this.rb.getResourceString("menu.file.exit")); jMenuItemFileExit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemFileExitActionPerformed(evt); } }); jMenuFile.add(jMenuItemFileExit); jMenuBar.add(jMenuFile); jMenuHelp.setText(this.rb.getResourceString("menu.help")); jMenuItemHelpAbout.setIcon(new javax.swing.ImageIcon( getClass().getResource("/de/mendelson/comm/as2/client/os_logo16x16.gif"))); // NOI18N jMenuItemHelpAbout.setText(this.rb.getResourceString("menu.help.about")); jMenuItemHelpAbout.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemHelpAboutActionPerformed(evt); } }); jMenuHelp.add(jMenuItemHelpAbout); jMenuHelp.add(jSeparator5); jMenuItemHelpShop.setIcon(new javax.swing.ImageIcon( getClass().getResource("/de/mendelson/comm/as2/client/os_logo16x16.gif"))); // NOI18N jMenuItemHelpShop.setText(this.rb.getResourceString("menu.help.shop")); jMenuItemHelpShop.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemHelpShopActionPerformed(evt); } }); jMenuHelp.add(jMenuItemHelpShop); jMenuItemHelpForum.setIcon(new javax.swing.ImageIcon( getClass().getResource("/de/mendelson/comm/as2/client/os_logo16x16.gif"))); // NOI18N jMenuItemHelpForum.setText(this.rb.getResourceString("menu.help.forum")); jMenuItemHelpForum.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemHelpForumActionPerformed(evt); } }); jMenuHelp.add(jMenuItemHelpForum); jMenuItemHelpSystem.setIcon(new javax.swing.ImageIcon( getClass().getResource("/de/mendelson/comm/as2/client/os_logo16x16.gif"))); // NOI18N jMenuItemHelpSystem.setText(this.rb.getResourceString("menu.help.helpsystem")); jMenuItemHelpSystem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jMenuItemHelpSystemActionPerformed(evt); } }); jMenuHelp.add(jMenuItemHelpSystem); jMenuBar.add(jMenuHelp); setJMenuBar(jMenuBar); java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize(); setBounds((screenSize.width - 749) / 2, (screenSize.height - 581) / 2, 749, 581); }
From source file:de.bwravencl.controllerbuddy.gui.Main.java
private void initOverlay() { if (!preferences.getBoolean(PREFERENCES_SHOW_OVERLAY, Toolkit.getDefaultToolkit().isAlwaysOnTopSupported())) return;/* w ww .j a v a 2s . c o m*/ var longestDescription = ""; for (final var mode : input.getProfile().getModes()) { final var description = mode.getDescription(); if (description.length() > longestDescription.length()) longestDescription = description; } final var fontMetrics = labelCurrentMode.getFontMetrics(labelCurrentMode.getFont()); labelCurrentMode.setPreferredSize( new Dimension(fontMetrics.stringWidth(longestDescription), fontMetrics.getHeight())); labelCurrentMode.setForeground(Color.RED); labelCurrentMode.setText(input.getProfile().getActiveMode().getDescription()); overlayFrame = new JFrame("Overlay"); overlayFrame.setType(JFrame.Type.UTILITY); overlayFrame.setLayout(new BorderLayout()); overlayFrame.setFocusableWindowState(false); overlayFrame.setUndecorated(true); overlayFrame.setBackground(TRANSPARENT); overlayFrame.add(labelCurrentMode, BorderLayout.PAGE_END); overlayFrame.setAlwaysOnTop(true); indicatorPanelFlowLayout = new FlowLayout(); indicatorPanel = new JPanel(indicatorPanelFlowLayout); indicatorPanel.setBackground(TRANSPARENT); final var virtualAxisToOverlayAxisMap = input.getProfile().getVirtualAxisToOverlayAxisMap(); for (final var virtualAxis : Input.VirtualAxis.values()) { final var overlayAxis = virtualAxisToOverlayAxisMap.get(virtualAxis); if (overlayAxis != null) { final var progressBar = new JProgressBar(SwingConstants.VERTICAL) { private static final long serialVersionUID = 8167193907929992395L; @Override public void setMaximum(final int n) { if (overlayAxis.inverted) super.setMinimum(-n); else super.setMaximum(n); } @Override public void setMinimum(final int n) { if (overlayAxis.inverted) super.setMaximum(-n); else super.setMinimum(n); } @Override public void setValue(final int n) { super.setValue(overlayAxis.inverted ? -n : n); } }; progressBar.setPreferredSize(new Dimension(21, 149)); progressBar.setBorder(BorderFactory.createDashedBorder(Color.BLACK, (float) progressBar.getPreferredSize().getWidth(), (float) progressBar.getPreferredSize().getWidth())); progressBar.setBackground(Color.LIGHT_GRAY); progressBar.setForeground(overlayAxis.color); progressBar.setValue(1); indicatorPanel.add(progressBar); virtualAxisToProgressBarMap.put(virtualAxis, progressBar); } } overlayFrame.add(indicatorPanel); overlayFrameDragListener = new FrameDragListener(this, overlayFrame) { @Override public void mouseDragged(final MouseEvent e) { super.mouseDragged(e); final var maxWindowBounds = GraphicsEnvironment.getLocalGraphicsEnvironment() .getMaximumWindowBounds(); updateOverlayAlignment(maxWindowBounds); } }; overlayFrame.addMouseListener(overlayFrameDragListener); overlayFrame.addMouseMotionListener(overlayFrameDragListener); prevMaxWindowBounds = GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds(); updateOverlayLocation(prevMaxWindowBounds); overlayFrame.setVisible(true); }
From source file:course_generator.frmMain.java
/** * Separator for the status bar/* w w w .j av a 2s . com*/ * @return Separator object */ static JComponent createStatusbarSeparator() { JSeparator x = new JSeparator(SwingConstants.VERTICAL); x.setPreferredSize(new Dimension(3, 20)); return x; }
From source file:com.peterbochs.instrument.InstrumentPanel.java
private JPanel getJMemoryProfilingPanel() { if (jMemoryProfilingPanel == null) { jMemoryProfilingPanel = new JPanel(); GroupLayout jMemoryProfilingPanelLayout = new GroupLayout((JComponent) jMemoryProfilingPanel); jMemoryProfilingPanel.setLayout(jMemoryProfilingPanelLayout); jMemoryProfilingPanelLayout.setVerticalGroup(jMemoryProfilingPanelLayout.createSequentialGroup() .addContainerGap()/*from w ww.ja va2 s. com*/ .addComponent(getJLabel7(), GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addGroup(jMemoryProfilingPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(getJProfilingFromComboBox(), GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(getJLabel8(), GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(getJLabel9(), GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(getJProfilingToComboBox(), GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(getJAddZoneButton(), GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(getJScrollPane2(), GroupLayout.PREFERRED_SIZE, 254, GroupLayout.PREFERRED_SIZE) .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jMemoryProfilingPanelLayout.createParallelGroup(GroupLayout.Alignment.BASELINE) .addComponent(getJSortCheckBox(), GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(getJLabel17(), GroupLayout.Alignment.BASELINE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addComponent(getJScrollPane6(), GroupLayout.PREFERRED_SIZE, 214, GroupLayout.PREFERRED_SIZE) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(getJDeleteZoneButton(), GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE) .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)); jMemoryProfilingPanelLayout.linkSize(SwingConstants.VERTICAL, new Component[] { getJProfilingFromComboBox(), getJProfilingToComboBox() }); jMemoryProfilingPanelLayout.setHorizontalGroup(jMemoryProfilingPanelLayout.createSequentialGroup() .addContainerGap() .addGroup(jMemoryProfilingPanelLayout.createParallelGroup() .addGroup(GroupLayout.Alignment.LEADING, jMemoryProfilingPanelLayout.createSequentialGroup() .addComponent(getJLabel7(), GroupLayout.PREFERRED_SIZE, 608, GroupLayout.PREFERRED_SIZE) .addGap(0, 156, Short.MAX_VALUE)) .addGroup(GroupLayout.Alignment.LEADING, jMemoryProfilingPanelLayout .createSequentialGroup() .addGroup(jMemoryProfilingPanelLayout.createParallelGroup().addGroup( GroupLayout.Alignment.LEADING, jMemoryProfilingPanelLayout.createSequentialGroup() .addGroup(jMemoryProfilingPanelLayout.createParallelGroup() .addComponent(getJLabel17(), GroupLayout.Alignment.LEADING, GroupLayout.PREFERRED_SIZE, 108, GroupLayout.PREFERRED_SIZE) .addGroup(GroupLayout.Alignment.LEADING, jMemoryProfilingPanelLayout .createSequentialGroup() .addComponent(getJDeleteZoneButton(), GroupLayout.PREFERRED_SIZE, 62, GroupLayout.PREFERRED_SIZE) .addGap(46))) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addComponent(getJSortCheckBox(), GroupLayout.PREFERRED_SIZE, 79, GroupLayout.PREFERRED_SIZE)) .addGroup(GroupLayout.Alignment.LEADING, jMemoryProfilingPanelLayout .createSequentialGroup() .addComponent(getJLabel8(), GroupLayout.PREFERRED_SIZE, 39, GroupLayout.PREFERRED_SIZE) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addComponent(getJProfilingFromComboBox(), GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE) .addGap(29))) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, 74, GroupLayout.PREFERRED_SIZE) .addComponent(getJLabel9(), GroupLayout.PREFERRED_SIZE, 23, GroupLayout.PREFERRED_SIZE) .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addComponent(getJProfilingToComboBox(), GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE) .addComponent(getJAddZoneButton(), GroupLayout.PREFERRED_SIZE, 62, GroupLayout.PREFERRED_SIZE) .addGap(0, 275, Short.MAX_VALUE)) .addComponent(getJScrollPane2(), GroupLayout.Alignment.LEADING, 0, 764, Short.MAX_VALUE) .addComponent(getJScrollPane6(), GroupLayout.Alignment.LEADING, 0, 764, Short.MAX_VALUE)) .addContainerGap()); jMemoryProfilingPanelLayout.linkSize(SwingConstants.HORIZONTAL, new Component[] { getJProfilingFromComboBox(), getJProfilingToComboBox() }); } return jMemoryProfilingPanel; }
From source file:course_generator.frmMain.java
/** * Create the profil toolbar//from ww w . ja va2 s . c om */ private void Create_Profil_Toolbar() { ToolBarProfil = new javax.swing.JToolBar(); ToolBarProfil.setOrientation(javax.swing.SwingConstants.VERTICAL); ToolBarProfil.setFloatable(false); ToolBarProfil.setRollover(true); // -- Save // -------------------------------------------------------------- btProfilSave = new javax.swing.JButton(); btProfilSave .setIcon(new javax.swing.ImageIcon(getClass().getResource("/course_generator/images/save.png"))); btProfilSave.setToolTipText(bundle.getString("frmMain.btProfilSave.toolTipText")); btProfilSave.setFocusable(false); btProfilSave.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { // btOpenCGXActionPerformed(evt); //TODO } }); btProfilSave.setEnabled(false); ToolBarProfil.add(btProfilSave); // -- Separator // --------------------------------------------------------- ToolBarProfil.add(new javax.swing.JToolBar.Separator()); // -- Zoom X // ------------------------------------------------------------ btProfilZoomX = new javax.swing.JButton(); btProfilZoomX .setIcon(new javax.swing.ImageIcon(getClass().getResource("/course_generator/images/zoom_x.png"))); btProfilZoomX.setToolTipText(bundle.getString("frmMain.btProfilZoomX.toolTipText")); btProfilZoomX.setFocusable(false); btProfilZoomX.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { // btOpenCGXActionPerformed(evt); //TODO } }); btProfilZoomX.setEnabled(false); ToolBarProfil.add(btProfilZoomX); // -- Zoom Y // ------------------------------------------------------------ btProfilZoomY = new javax.swing.JButton(); btProfilZoomY .setIcon(new javax.swing.ImageIcon(getClass().getResource("/course_generator/images/zoom_y.png"))); btProfilZoomY.setToolTipText(bundle.getString("frmMain.btProfilZoomY.toolTipText")); btProfilZoomY.setFocusable(false); btProfilZoomY.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { // btOpenCGXActionPerformed(evt); //TODO } }); btProfilZoomY.setEnabled(false); ToolBarProfil.add(btProfilZoomY); // -- Separator // --------------------------------------------------------- ToolBarProfil.add(new javax.swing.JToolBar.Separator()); // -- Settings // ---------------------------------------------------------- btProfilSettings = new javax.swing.JButton(); btProfilSettings.setIcon( new javax.swing.ImageIcon(getClass().getResource("/course_generator/images/settings.png"))); btProfilSettings.setToolTipText(bundle.getString("frmMain.btProfilSettings.toolTipText")); btProfilSettings.setFocusable(false); btProfilSettings.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { // btOpenCGXActionPerformed(evt); //TODO } }); btProfilSettings.setEnabled(false); ToolBarProfil.add(btProfilSettings); }