Example usage for javax.swing BorderFactory createEtchedBorder

List of usage examples for javax.swing BorderFactory createEtchedBorder

Introduction

In this page you can find the example usage for javax.swing BorderFactory createEtchedBorder.

Prototype

public static Border createEtchedBorder() 

Source Link

Document

Creates a border with an "etched" look using the component's current background color for highlighting and shading.

Usage

From source file:it.illinois.adsc.ema.softgrid.monitoring.ui.SPMainFrame.java

private void setupGUI() throws Exception {
    this.getContentPane().setLayout(new GridBagLayout());
    chartPanel = getChartPanel();/* w w w.  ja v  a  2 s  .co m*/
    this.setPreferredSize(new Dimension(800, 700));

    alertPanel.setPreferredSize(new Dimension(200, 700));
    alertPanel.setMinimumSize(new Dimension(200, 700));
    alertPanel.setMaximumSize(new Dimension(200, 700));

    transientPanel.setPreferredSize(new Dimension(200, 700));
    transientPanel.setMinimumSize(new Dimension(200, 700));
    transientPanel.setMaximumSize(new Dimension(200, 700));

    queryTextArea.setPreferredSize(new Dimension(300, 100));
    queryTextArea.setMinimumSize(new Dimension(300, 100));
    queryTextArea.setMaximumSize(new Dimension(300, 100));

    monitorButton.setPreferredSize(new Dimension(30, 30));
    monitorButton.setMinimumSize(new Dimension(30, 30));
    monitorButton.setMaximumSize(new Dimension(30, 30));
    monitorButton.setToolTipText("Execute and Monitor");

    exitButton.setPreferredSize(new Dimension(30, 30));
    exitButton.setMinimumSize(new Dimension(30, 30));
    exitButton.setMaximumSize(new Dimension(30, 30));
    exitButton.setToolTipText("Close and Exit");

    clearButton.setPreferredSize(new Dimension(30, 30));
    clearButton.setMinimumSize(new Dimension(30, 30));
    clearButton.setMaximumSize(new Dimension(30, 30));
    clearButton.setToolTipText("Reset");

    runButton.setPreferredSize(new Dimension(30, 30));
    runButton.setMinimumSize(new Dimension(30, 30));
    runButton.setMaximumSize(new Dimension(30, 30));
    runButton.setToolTipText("Initialize the server...!");

    alertPanel.setLayout(new VerticalFlowLayout());
    transientPanel.setLayout(new BorderLayout());
    //      System.out.println("new File(\"../MonitorEngine/Images/execute-xxl.png\").exists() = " + new File("../MonitorEngine/Images/execute-xxl.png").exists());
    //      System.out.println("execute-xxl.png = " + new File("execute-xxl.png").exists());
    //      System.out.println("new File().getAbsolutePath() = " + new File("openmuc.jar").getAbsolutePath());
    Image img = new ImageIcon(ImageIO.read(getClass().getClassLoader().getResourceAsStream("execute-xxl.png")))
            .getImage();
    Image newimg = img.getScaledInstance(30, 30, java.awt.Image.SCALE_SMOOTH);
    ImageIcon icon = new ImageIcon(newimg);
    monitorButton.setIcon(icon);

    img = new ImageIcon(ImageIO.read(getClass().getClassLoader().getResourceAsStream("stop-xxl.png")))
            .getImage();
    newimg = img.getScaledInstance(30, 30, java.awt.Image.SCALE_SMOOTH);
    icon = new ImageIcon(newimg);
    exitButton.setIcon(icon);

    img = new ImageIcon(ImageIO.read(getClass().getClassLoader().getResourceAsStream("reset-xxl.png")))
            .getImage();
    newimg = img.getScaledInstance(30, 30, java.awt.Image.SCALE_SMOOTH);
    icon = new ImageIcon(newimg);
    clearButton.setIcon(icon);

    img = new ImageIcon(ImageIO.read(getClass().getClassLoader().getResourceAsStream("start-xxl.png")))
            .getImage();
    newimg = img.getScaledInstance(30, 30, java.awt.Image.SCALE_SMOOTH);
    icon = new ImageIcon(newimg);
    runButton.setIcon(icon);
    altertScrolPane.getViewport().add(alertPanel, null);
    altertScrolPane.setBorder(BorderFactory.createEtchedBorder());
    logAreaScrollPane.getViewport().add(logTextArea, null);
    logAreaScrollPane.setBorder(BorderFactory.createEtchedBorder());

    JPanel tempQueryPanel = new JPanel();
    JPanel buttonPanel = new JPanel();
    //      tempQueryPanel.setBorder(BorderFactory.createTitledBorder("Monitor Query"));
    tempQueryPanel.setLayout(new GridBagLayout());
    buttonPanel.setLayout(new GridBagLayout());
    buttonPanel.setBorder(BorderFactory.createEtchedBorder());
    buttonPanel.setOpaque(true);
    buttonPanel.setBackground(Color.gray);
    buttonPanel.add(runButton, new GridBagConstraints(0, 0, 1, 1, 0, 0, GridBagConstraints.CENTER,
            GridBagConstraints.NONE, new Insets(6, 12, 3, 12), 0, 0));
    buttonPanel.add(monitorButton, new GridBagConstraints(0, 2, 1, 1, 0, 0, GridBagConstraints.CENTER,
            GridBagConstraints.NONE, new Insets(3, 12, 3, 12), 0, 0));
    buttonPanel.add(clearButton, new GridBagConstraints(0, 3, 1, 1, 0, 0, GridBagConstraints.CENTER,
            GridBagConstraints.NONE, new Insets(3, 12, 3, 12), 0, 0));
    buttonPanel.add(exitButton, new GridBagConstraints(0, 4, 1, 1, 0, 0, GridBagConstraints.CENTER,
            GridBagConstraints.NONE, new Insets(3, 12, 3, 12), 0, 0));
    //      tempQueryPanel.add(splitPane, new GridBagConstraints(0, 0, 1, 6, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
    tempQueryPanel.add(buttonPanel, new GridBagConstraints(0, 0, 1, 1, 0, 1, GridBagConstraints.CENTER,
            GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), 0, 0));
    tempQueryPanel.add(queryScrolPane, new GridBagConstraints(1, 0, 1, 1, 1, 1, GridBagConstraints.CENTER,
            GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
    mainTabbedPane.add(splitPane, "Controller");

    mainTabbedPane.add(ConfigPanel.getInstance(), "Configuration");

    splitPane.setTopComponent(tempQueryPanel);
    splitPane.setDividerLocation(152);
    splitPane.setBottomComponent(resultTabbedPane);
    splitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
    this.getContentPane().add(mainTabbedPane, new GridBagConstraints(0, 0, 1, 2, 0.75, 0.25,
            GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(12, 12, 12, 0), 0, 0));
    //      this.getContentPane().add(alertTitile, new GridBagConstraints(1, 0, 1, 1, 0, 0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(12, 0, 0, 12), 0, 0));
    //      this.getContentPane().add(altertScrolPane, new GridBagConstraints(1, 1, 1, 2, 0, 1, GridBagConstraints.CENTER, GridBagConstraints.VERTICAL, new Insets(0, 0, 12, 12), 0, 0));
    //      tempQueryPanel.add(queryScrolPane, new GridBagConstraints(0, 0, 1, 5, 1, 1, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
    //      this.getContentPane().add(logAreaScrollPane, new GridBagConstraints(0, 2, 1, 1, 0.75, 0.75, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(12, 12, 12, 0), 0, 0));
    exitButton.addActionListener(this);
    monitorButton.addActionListener(this);
    clearButton.addActionListener(this);
    clearButton.setEnabled(false);
    clearButton.setVisible(false);
    monitorButton.setEnabled(true);
    runButton.addActionListener(this);
    queryTextArea.setContentType("text/html");
    queryTextArea.setText("select overloadrank from virtual");

    messageHandler = new MessageUIHandler(logTextArea, logAreaScrollPane);
    ConfigPanel.getInstance().setupConfigPanel();
}

From source file:com.josescalia.tumblr.form.PreferenceForm.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  ww  w.ja  va 2s .  c  om*/
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
    bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

    rbGroupUseProxy = new ButtonGroup();
    folderChooser = new JFileChooser();
    jTabbedPane1 = new JTabbedPane();
    jPanel1 = new JPanel();
    jPanel10 = new JPanel();
    jLabel29 = new JLabel();
    jLabel26 = new JLabel();
    jLabel25 = new JLabel();
    jLabel24 = new JLabel();
    jLabel28 = new JLabel();
    jLabel27 = new JLabel();
    jPanel12 = new JPanel();
    txtProxyPort = new JTextField();
    rbUseProxy = new JRadioButton();
    jLabel2 = new JLabel();
    rbNoProxy = new JRadioButton();
    txtProxyPassword = new JPasswordField();
    jLabel3 = new JLabel();
    txtProxyUsername = new JTextField();
    btnSaveProxyConfig = new JButton();
    jLabel1 = new JLabel();
    jLabel4 = new JLabel();
    txtProxyHost = new JTextField();
    checkProxyNeedAuth = new JCheckBox();
    jPanel2 = new JPanel();
    jPanel11 = new JPanel();
    jLabel35 = new JLabel();
    jLabel30 = new JLabel();
    jLabel33 = new JLabel();
    jLabel32 = new JLabel();
    jLabel31 = new JLabel();
    jLabel34 = new JLabel();
    jPanel14 = new JPanel();
    txtDefaultFolderPath1 = new JTextField();
    jLabel6 = new JLabel();
    txtDefaultFolderPath = new JTextField();
    jLabel7 = new JLabel();
    btnChooseFolder = new JButton();
    btnSaveAppConfig = new JButton();
    jPanel7 = new JPanel();
    jPanel9 = new JPanel();
    jLabel18 = new JLabel();
    jLabel23 = new JLabel();
    jLabel19 = new JLabel();
    jLabel21 = new JLabel();
    jLabel20 = new JLabel();
    jLabel22 = new JLabel();
    jPanel13 = new JPanel();
    jLabel8 = new JLabel();
    btnOpenOtherCacheFolder = new JButton();
    btnDeleteCache = new JButton();
    jLabel9 = new JLabel();
    txtTotalFileSize1 = new JTextField();
    txtTotalFileSize = new JTextField();
    jPanel3 = new JPanel();
    jPanel5 = new JPanel();
    txtTotalLogSize = new JTextField();
    jLabel11 = new JLabel();
    txtTotalLog = new JTextField();
    btnCleanLog = new JButton();
    jLabel13 = new JLabel();
    jPanel6 = new JPanel();
    jLabel12 = new JLabel();
    jScrollPane1 = new JScrollPane();
    txtLogContent = new JTextArea();
    jPanel8 = new JPanel();
    jLabel17 = new JLabel();
    jLabel16 = new JLabel();
    jLabel15 = new JLabel();
    jLabel14 = new JLabel();
    jPanel4 = new JPanel();
    jPanel15 = new JPanel();
    txtAppLookAndFeel = new JTextField();
    jLabel10 = new JLabel();
    btnSaveLF = new JButton();
    btnSelectLF = new JButton();
    jPanel16 = new JPanel();
    jLabel41 = new JLabel();
    jLabel36 = new JLabel();
    jLabel40 = new JLabel();
    jLabel37 = new JLabel();
    jLabel38 = new JLabel();
    jLabel39 = new JLabel();
    jLabel5 = new JLabel();

    jPanel1.setBorder(BorderFactory.createEtchedBorder());

    jPanel10.setBackground(Color.white);
    jPanel10.setBorder(BorderFactory.createEtchedBorder());

    jLabel29.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel29.setText("set up this Proxy Connection.");

    jLabel26.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel26.setText("if this application need to connect to the internet. The setting of this ");

    jLabel25.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel25.setText("The Proxy Connection is a set of configuration which will be applied");

    jLabel24.setFont(new Font("Liberation Sans", 1, 12)); // NOI18N
    jLabel24.setText("Info :");

    jLabel28.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel28.setText("configuration. Contact Computer Network Administrator to correctly");

    jLabel27.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel27.setText("Proxy Connection should be match with the computer network");

    GroupLayout jPanel10Layout = new GroupLayout(jPanel10);
    jPanel10.setLayout(jPanel10Layout);
    jPanel10Layout.setHorizontalGroup(jPanel10Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel10Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel28).addComponent(jLabel25).addComponent(jLabel24)
                            .addComponent(jLabel26).addComponent(jLabel27).addComponent(jLabel29))
                    .addContainerGap()));
    jPanel10Layout.setVerticalGroup(jPanel10Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup().addContainerGap().addComponent(jLabel24)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel25)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel26)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel27)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel28)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel29)
                    .addContainerGap()));

    jPanel12.setBorder(BorderFactory.createEtchedBorder());

    txtProxyPort.setEnabled(false);

    org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${proxyConnection.proxyPort}"), txtProxyPort,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    rbGroupUseProxy.add(rbUseProxy);
    rbUseProxy.setText("Use Proxy");
    rbUseProxy.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            rbUseProxyActionPerformed(evt);
        }
    });

    jLabel2.setText("Proxy Port");

    rbGroupUseProxy.add(rbNoProxy);
    rbNoProxy.setText("No Proxy");
    rbNoProxy.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            rbNoProxyActionPerformed(evt);
        }
    });

    txtProxyPassword.setEnabled(false);

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${proxyConnection.proxyPassword}"), txtProxyPassword,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    jLabel3.setText("Username ");

    txtProxyUsername.setEnabled(false);

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${proxyConnection.proxyUsername}"), txtProxyUsername,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    btnSaveProxyConfig.setIcon(new ImageIcon(getClass().getResource("/icons/edit.png"))); // NOI18N
    btnSaveProxyConfig.setText("Save");
    btnSaveProxyConfig.setHorizontalTextPosition(SwingConstants.CENTER);
    btnSaveProxyConfig.setVerticalTextPosition(SwingConstants.BOTTOM);
    btnSaveProxyConfig.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnSaveProxyConfigActionPerformed(evt);
        }
    });

    jLabel1.setText("Proxy Host");

    jLabel4.setText("Password");

    txtProxyHost.setEnabled(false);

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${proxyConnection.proxyHost}"), txtProxyHost,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    checkProxyNeedAuth.setText("Proxy Need Authentication");

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${bUseProxyAuth}"), checkProxyNeedAuth,
            org.jdesktop.beansbinding.BeanProperty.create("selected"));
    bindingGroup.addBinding(binding);

    checkProxyNeedAuth.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            checkProxyNeedAuthActionPerformed(evt);
        }
    });

    GroupLayout jPanel12Layout = new GroupLayout(jPanel12);
    jPanel12.setLayout(jPanel12Layout);
    jPanel12Layout.setHorizontalGroup(jPanel12Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel12Layout.createSequentialGroup().addContainerGap().addGroup(jPanel12Layout
                    .createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel12Layout.createSequentialGroup().addComponent(rbNoProxy)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(rbUseProxy))
                    .addGroup(jPanel12Layout.createSequentialGroup().addGroup(jPanel12Layout
                            .createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel1, GroupLayout.PREFERRED_SIZE, 80, GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel2, GroupLayout.PREFERRED_SIZE, 80, GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel3).addComponent(jLabel4))
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addGroup(jPanel12Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                                    .addComponent(txtProxyPort, GroupLayout.PREFERRED_SIZE, 105,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addComponent(txtProxyHost, GroupLayout.PREFERRED_SIZE, 297,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addGroup(jPanel12Layout
                                            .createParallelGroup(GroupLayout.Alignment.TRAILING, false)
                                            .addComponent(txtProxyPassword, GroupLayout.Alignment.LEADING)
                                            .addComponent(txtProxyUsername, GroupLayout.Alignment.LEADING,
                                                    GroupLayout.PREFERRED_SIZE, 227,
                                                    GroupLayout.PREFERRED_SIZE))))
                    .addComponent(checkProxyNeedAuth).addComponent(btnSaveProxyConfig,
                            GroupLayout.PREFERRED_SIZE, 89, GroupLayout.PREFERRED_SIZE))
                    .addContainerGap()));
    jPanel12Layout.setVerticalGroup(jPanel12Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel12Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel12Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(rbNoProxy).addComponent(rbUseProxy))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel12Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel1).addComponent(txtProxyHost, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel12Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel2).addComponent(txtProxyPort, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addGap(4, 4, 4).addComponent(checkProxyNeedAuth)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel12Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(txtProxyUsername, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel3))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(jPanel12Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(txtProxyPassword, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel4))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(btnSaveProxyConfig)
                    .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    GroupLayout jPanel1Layout = new GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout
            .setHorizontalGroup(
                    jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap()
                                    .addComponent(jPanel12, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jPanel10, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addContainerGap(286, Short.MAX_VALUE)));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addGap(11, 11, 11)
                    .addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(jPanel12, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE)
                            .addComponent(jPanel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(165, Short.MAX_VALUE)));

    jTabbedPane1.addTab("Proxy Connection", jPanel1);

    jPanel2.setBorder(BorderFactory.createEtchedBorder());

    jPanel11.setBackground(Color.white);
    jPanel11.setBorder(BorderFactory.createEtchedBorder());

    jLabel35.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel35.setText("the application is trigger to open a folder.");

    jLabel30.setFont(new Font("Liberation Sans", 1, 12)); // NOI18N
    jLabel30.setText("Info :");

    jLabel33.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel33.setText("application downloading stuff from the internet.");

    jLabel32.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel32.setText("Default Download Path  is the default folder location when the ");

    jLabel31.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel31.setText("This is the set of configuration will be used by this application.");

    jLabel34.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel34.setText("Default Folder Viewer is the default of computer programs when ");

    GroupLayout jPanel11Layout = new GroupLayout(jPanel11);
    jPanel11.setLayout(jPanel11Layout);
    jPanel11Layout.setHorizontalGroup(jPanel11Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel11Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel30).addComponent(jLabel31).addComponent(jLabel32)
                            .addComponent(jLabel33).addComponent(jLabel34).addComponent(jLabel35))
                    .addContainerGap()));
    jPanel11Layout.setVerticalGroup(jPanel11Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup().addContainerGap().addComponent(jLabel30)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel31)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel32)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel33)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel34)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel35)
                    .addContainerGap()));

    jPanel14.setBorder(BorderFactory.createEtchedBorder());

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${defaultFolderViewer}"), txtDefaultFolderPath1,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    jLabel6.setText("Default Download Path");

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${defaultDownloadPath}"), txtDefaultFolderPath,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    jLabel7.setText("Default Folder Viewer");

    btnChooseFolder.setText("Change");
    btnChooseFolder.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnChooseFolderActionPerformed(evt);
        }
    });

    btnSaveAppConfig.setIcon(new ImageIcon(getClass().getResource("/icons/edit.png"))); // NOI18N
    btnSaveAppConfig.setText("Save");
    btnSaveAppConfig.setHorizontalTextPosition(SwingConstants.CENTER);
    btnSaveAppConfig.setVerticalTextPosition(SwingConstants.BOTTOM);
    btnSaveAppConfig.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnSaveAppConfigActionPerformed(evt);
        }
    });

    GroupLayout jPanel14Layout = new GroupLayout(jPanel14);
    jPanel14.setLayout(jPanel14Layout);
    jPanel14Layout.setHorizontalGroup(jPanel14Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel14Layout.createSequentialGroup().addContainerGap().addGroup(jPanel14Layout
                    .createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel14Layout.createSequentialGroup()
                            .addComponent(jLabel7, GroupLayout.PREFERRED_SIZE, 161, GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(txtDefaultFolderPath1, GroupLayout.PREFERRED_SIZE, 258,
                                    GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel14Layout.createSequentialGroup()
                            .addComponent(jLabel6, GroupLayout.PREFERRED_SIZE, 161, GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(txtDefaultFolderPath, GroupLayout.PREFERRED_SIZE, 346,
                                    GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(btnChooseFolder))
                    .addComponent(btnSaveAppConfig, GroupLayout.PREFERRED_SIZE, 95, GroupLayout.PREFERRED_SIZE))
                    .addContainerGap()));
    jPanel14Layout.setVerticalGroup(jPanel14Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel14Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel14Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel6)
                            .addComponent(txtDefaultFolderPath, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnChooseFolder))
                    .addGap(4, 4, 4)
                    .addGroup(jPanel14Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel7).addComponent(txtDefaultFolderPath1,
                                    GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE,
                            Short.MAX_VALUE)
                    .addComponent(btnSaveAppConfig).addContainerGap()));

    GroupLayout jPanel2Layout = new GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout
            .setHorizontalGroup(
                    jPanel2Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel2Layout.createSequentialGroup().addContainerGap()
                                    .addComponent(jPanel14, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jPanel11, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addContainerGap()));
    jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel2Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
                            .addComponent(jPanel11, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addComponent(jPanel14, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE))
                    .addContainerGap(285, Short.MAX_VALUE)));

    jTabbedPane1.addTab("Application Config", jPanel2);

    jPanel9.setBackground(Color.white);
    jPanel9.setBorder(BorderFactory.createEtchedBorder());

    jLabel18.setFont(new Font("Liberation Sans", 1, 12)); // NOI18N
    jLabel18.setText("Info :");

    jLabel23.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel23.setText("make the application processing faster.");

    jLabel19.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel19.setText("Cache Info contains a summary of how much space in hard drive");

    jLabel21.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel21.setText("hard drive space by this application, but if the application need to");

    jLabel20.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel20.setText("used by this application. Deleting cache will reduce the usage of");

    jLabel22.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel22.setText("fetch the data from internet, this cache will be used in order to");

    GroupLayout jPanel9Layout = new GroupLayout(jPanel9);
    jPanel9.setLayout(jPanel9Layout);
    jPanel9Layout.setHorizontalGroup(jPanel9Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel9Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel18).addComponent(jLabel19).addComponent(jLabel20)
                            .addComponent(jLabel21).addComponent(jLabel22).addComponent(jLabel23))
                    .addContainerGap()));
    jPanel9Layout.setVerticalGroup(jPanel9Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup().addContainerGap().addComponent(jLabel18)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel19)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel20)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel21)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel22)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel23)
                    .addContainerGap()));

    jPanel13.setBorder(BorderFactory.createEtchedBorder());

    jLabel8.setText("Total Cache File Size");

    btnOpenOtherCacheFolder.setIcon(new ImageIcon(getClass().getResource("/icons/folder_open.png"))); // NOI18N
    btnOpenOtherCacheFolder.setText("Open Dir");
    btnOpenOtherCacheFolder.setHorizontalTextPosition(SwingConstants.CENTER);
    btnOpenOtherCacheFolder.setVerticalTextPosition(SwingConstants.BOTTOM);
    btnOpenOtherCacheFolder.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnOpenOtherCacheFolderActionPerformed(evt);
        }
    });

    btnDeleteCache.setIcon(new ImageIcon(getClass().getResource("/icons/cross2.png"))); // NOI18N
    btnDeleteCache.setText("Delete Cache");
    btnDeleteCache.setHorizontalTextPosition(SwingConstants.CENTER);
    btnDeleteCache.setVerticalTextPosition(SwingConstants.BOTTOM);
    btnDeleteCache.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnDeleteCacheActionPerformed(evt);
        }
    });

    jLabel9.setText("Total Cache File");

    txtTotalFileSize1.setEditable(false);

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${cacheFile.fileListSize}"), txtTotalFileSize1,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    txtTotalFileSize.setEditable(false);

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${cacheFile.totalFolderSize}"), txtTotalFileSize,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    GroupLayout jPanel13Layout = new GroupLayout(jPanel13);
    jPanel13.setLayout(jPanel13Layout);
    jPanel13Layout.setHorizontalGroup(jPanel13Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel13Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel8).addComponent(jLabel9).addComponent(btnDeleteCache))
                    .addGap(18, 18, 18)
                    .addGroup(jPanel13Layout.createParallelGroup(GroupLayout.Alignment.TRAILING, false)
                            .addComponent(txtTotalFileSize1, GroupLayout.Alignment.LEADING)
                            .addComponent(btnOpenOtherCacheFolder, GroupLayout.Alignment.LEADING,
                                    GroupLayout.DEFAULT_SIZE, 103, Short.MAX_VALUE)
                            .addComponent(txtTotalFileSize))
                    .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    jPanel13Layout.setVerticalGroup(jPanel13Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel13Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel8).addComponent(txtTotalFileSize, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel13Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel9).addComponent(txtTotalFileSize1, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(jPanel13Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
                            .addComponent(btnDeleteCache, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addComponent(btnOpenOtherCacheFolder))
                    .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    GroupLayout jPanel7Layout = new GroupLayout(jPanel7);
    jPanel7.setLayout(jPanel7Layout);
    jPanel7Layout.setHorizontalGroup(jPanel7Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup().addContainerGap()
                    .addComponent(jPanel13, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                            GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jPanel9,
                            GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(443, Short.MAX_VALUE)));
    jPanel7Layout.setVerticalGroup(jPanel7Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel7Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
                            .addComponent(jPanel9, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addComponent(jPanel13, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE))
                    .addContainerGap(289, Short.MAX_VALUE)));

    jTabbedPane1.addTab("Cache Info", jPanel7);

    jPanel5.setBorder(BorderFactory.createEtchedBorder());

    txtTotalLogSize.setEditable(false);

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${logFile.totalFolderSize}"), txtTotalLogSize,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    jLabel11.setText("Total File on Log Folder");

    txtTotalLog.setEditable(false);

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${logFile.fileListSize}"), txtTotalLog,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    btnCleanLog.setIcon(new ImageIcon(getClass().getResource("/icons/cross2.png"))); // NOI18N
    btnCleanLog.setText("Clean Log File");
    btnCleanLog.setHorizontalTextPosition(SwingConstants.CENTER);
    btnCleanLog.setVerticalTextPosition(SwingConstants.BOTTOM);
    btnCleanLog.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnCleanLogActionPerformed(evt);
        }
    });

    jLabel13.setText("Total Size on Log Folder ");

    GroupLayout jPanel5Layout = new GroupLayout(jPanel5);
    jPanel5.setLayout(jPanel5Layout);
    jPanel5Layout.setHorizontalGroup(jPanel5Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel5Layout.createParallelGroup(GroupLayout.Alignment.TRAILING, false)
                            .addComponent(btnCleanLog, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addGroup(jPanel5Layout.createSequentialGroup()
                                    .addGroup(jPanel5Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                                            .addComponent(jLabel13).addComponent(jLabel11))
                                    .addGap(18, 18, 18)
                                    .addGroup(jPanel5Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                                            .addComponent(txtTotalLog, GroupLayout.PREFERRED_SIZE, 66,
                                                    GroupLayout.PREFERRED_SIZE)
                                            .addComponent(txtTotalLogSize, GroupLayout.PREFERRED_SIZE, 123,
                                                    GroupLayout.PREFERRED_SIZE))))
                    .addContainerGap(22, Short.MAX_VALUE)));
    jPanel5Layout.setVerticalGroup(jPanel5Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel5Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(txtTotalLog, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel11))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel5Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel13).addComponent(txtTotalLogSize, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(btnCleanLog, GroupLayout.PREFERRED_SIZE, 50, GroupLayout.PREFERRED_SIZE)
                    .addContainerGap()));

    jPanel6.setBorder(BorderFactory.createEtchedBorder());

    jLabel12.setText("Log File Data :");

    txtLogContent.setEditable(false);
    txtLogContent.setColumns(20);
    txtLogContent.setLineWrap(true);
    txtLogContent.setRows(5);
    txtLogContent.setWrapStyleWord(true);

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${logFileData}"), txtLogContent,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    jScrollPane1.setViewportView(txtLogContent);

    GroupLayout jPanel6Layout = new GroupLayout(jPanel6);
    jPanel6.setLayout(jPanel6Layout);
    jPanel6Layout.setHorizontalGroup(jPanel6Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel6Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane1, GroupLayout.DEFAULT_SIZE, 724, Short.MAX_VALUE)
                            .addGroup(jPanel6Layout.createSequentialGroup().addComponent(jLabel12).addGap(0, 0,
                                    Short.MAX_VALUE)))
                    .addContainerGap()));
    jPanel6Layout
            .setVerticalGroup(jPanel6Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel6Layout.createSequentialGroup().addContainerGap().addComponent(jLabel12)
                            .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jScrollPane1,
                                    GroupLayout.PREFERRED_SIZE, 339, GroupLayout.PREFERRED_SIZE)
                            .addContainerGap()));

    jPanel8.setBackground(Color.white);
    jPanel8.setBorder(BorderFactory.createEtchedBorder());

    jLabel17.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel17.setText("application use it as a log tracker.");

    jLabel16.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel16.setText("These 2 log files cannot be delete, because the");

    jLabel15.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel15.setText("Minimal log files is 2 files.");

    jLabel14.setFont(new Font("Liberation Sans", 1, 12)); // NOI18N
    jLabel14.setText("Info :");

    GroupLayout jPanel8Layout = new GroupLayout(jPanel8);
    jPanel8.setLayout(jPanel8Layout);
    jPanel8Layout.setHorizontalGroup(jPanel8Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel8Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel14).addComponent(jLabel15).addComponent(jLabel16)
                            .addComponent(jLabel17))
                    .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    jPanel8Layout.setVerticalGroup(jPanel8Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup().addContainerGap().addComponent(jLabel14)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel15)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel16)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel17)
                    .addContainerGap()));

    GroupLayout jPanel3Layout = new GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout.setHorizontalGroup(jPanel3Layout.createParallelGroup(GroupLayout.Alignment.LEADING).addGroup(
            GroupLayout.Alignment.TRAILING,
            jPanel3Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel3Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
                            .addComponent(jPanel5, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addComponent(jPanel8, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jPanel6, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addContainerGap()));
    jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup().addGap(20, 20, 20)
                    .addGroup(jPanel3Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(jPanel6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                    GroupLayout.PREFERRED_SIZE)
                            .addGroup(jPanel3Layout.createSequentialGroup()
                                    .addComponent(jPanel5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jPanel8, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,
                                            GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(41, Short.MAX_VALUE)));

    jTabbedPane1.addTab("Log Monitor", jPanel3);

    jPanel15.setBorder(BorderFactory.createEtchedBorder());

    txtAppLookAndFeel.setEditable(false);

    binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(
            org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, this,
            org.jdesktop.beansbinding.ELProperty.create("${defaultLookAndFeel}"), txtAppLookAndFeel,
            org.jdesktop.beansbinding.BeanProperty.create("text"));
    bindingGroup.addBinding(binding);

    jLabel10.setText("Look And Feel ");

    btnSaveLF.setIcon(new ImageIcon(getClass().getResource("/icons/edit.png"))); // NOI18N
    btnSaveLF.setText("Save");
    btnSaveLF.setHorizontalTextPosition(SwingConstants.CENTER);
    btnSaveLF.setVerticalTextPosition(SwingConstants.BOTTOM);
    btnSaveLF.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnSaveLFActionPerformed(evt);
        }
    });

    btnSelectLF.setText("Change Look and Feel");
    btnSelectLF.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            btnSelectLFActionPerformed(evt);
        }
    });

    GroupLayout jPanel15Layout = new GroupLayout(jPanel15);
    jPanel15.setLayout(jPanel15Layout);
    jPanel15Layout.setHorizontalGroup(jPanel15Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel15Layout.createSequentialGroup().addContainerGap().addComponent(jLabel10)
                    .addGap(4, 4, 4)
                    .addGroup(jPanel15Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(btnSaveLF, GroupLayout.PREFERRED_SIZE, 90, GroupLayout.PREFERRED_SIZE)
                            .addComponent(txtAppLookAndFeel, GroupLayout.PREFERRED_SIZE, 395,
                                    GroupLayout.PREFERRED_SIZE)
                            .addComponent(btnSelectLF, GroupLayout.PREFERRED_SIZE, 176,
                                    GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    jPanel15Layout.setVerticalGroup(jPanel15Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel15Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel15Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel10).addComponent(txtAppLookAndFeel, GroupLayout.PREFERRED_SIZE,
                                    GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(btnSelectLF)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(btnSaveLF)
                    .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    jPanel16.setBackground(Color.white);
    jPanel16.setBorder(BorderFactory.createEtchedBorder());

    jLabel41.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel41.setText("to be restarted.");

    jLabel36.setFont(new Font("Liberation Sans", 1, 12)); // NOI18N
    jLabel36.setText("Info :");

    jLabel40.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel40.setText("System. Changing Look and Feel requires application");

    jLabel37.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel37.setText("Changing the Look and Feel means changing this");

    jLabel38.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel38.setText("application theme, the theme provided by it's installed");

    jLabel39.setFont(new Font("Liberation Sans", 0, 12)); // NOI18N
    jLabel39.setText("Look and Feel class in the Java Runtime Environment");

    GroupLayout jPanel16Layout = new GroupLayout(jPanel16);
    jPanel16.setLayout(jPanel16Layout);
    jPanel16Layout.setHorizontalGroup(jPanel16Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel16Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel16Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel36).addComponent(jLabel37).addComponent(jLabel38)
                            .addComponent(jLabel39).addComponent(jLabel40).addComponent(jLabel41))
                    .addContainerGap()));
    jPanel16Layout.setVerticalGroup(jPanel16Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel16Layout.createSequentialGroup().addContainerGap().addComponent(jLabel36)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel37)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel38)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel39)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel40)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jLabel41)
                    .addContainerGap()));

    GroupLayout jPanel4Layout = new GroupLayout(jPanel4);
    jPanel4.setLayout(jPanel4Layout);
    jPanel4Layout
            .setHorizontalGroup(
                    jPanel4Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel4Layout.createSequentialGroup().addContainerGap()
                                    .addComponent(jPanel15, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(jPanel16, GroupLayout.PREFERRED_SIZE,
                                            GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
                                    .addContainerGap(261, Short.MAX_VALUE)));
    jPanel4Layout.setVerticalGroup(jPanel4Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel4Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
                            .addComponent(jPanel16, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addComponent(jPanel15, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE))
                    .addContainerGap(289, Short.MAX_VALUE)));

    jTabbedPane1.addTab("Look And Feel", jPanel4);

    jLabel5.setFont(new Font("DejaVu Sans", 1, 18)); // NOI18N
    jLabel5.setHorizontalAlignment(SwingConstants.CENTER);
    jLabel5.setText("System Configuration");

    GroupLayout layout = new GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addComponent(jTabbedPane1).addComponent(jLabel5, GroupLayout.Alignment.TRAILING,
                    GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE));
    layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
            .addGroup(GroupLayout.Alignment.TRAILING, layout.createSequentialGroup().addComponent(jLabel5)
                    .addPreferredGap(LayoutStyle.ComponentPlacement.RELATED).addComponent(jTabbedPane1)));

    bindingGroup.bind();
}

From source file:be.ac.ua.comp.scarletnebula.gui.ServerCellRenderer.java

private JPanel createServerPanel(final Server server, final JList list, final int index,
        final boolean isSelected) {
    final JXPanel p = new JXPanel();
    p.setLayout(new GridBagLayout());
    final Color background = Colors.alpha(getBackgroundColor(list, index, isSelected), 0.4f);

    p.setBackground(background);/*from w  w  w. ja  v a  2  s . c om*/

    Color color1 = Colors.White.color(0.5f);
    Color color2 = Colors.Gray.color(0.95f);

    final Point2D start = new Point2D.Float(0, 0);
    Point2D stop = new Point2D.Float(150, 500);

    if (server != null && !server.sshWillFail() && server.getServerStatistics() != null) {
        final ServerStatisticsManager manager = server.getServerStatistics();
        final Datastream.WarnLevel warnlevel = manager.getHighestWarnLevel();

        if (warnlevel == Datastream.WarnLevel.HIGH) {
            color1 = Colors.Red.alpha(0.2f);
            color2 = Colors.Red.alpha(0.8f);
            stop = new Point2D.Float(500, 2);
        } else if (warnlevel == Datastream.WarnLevel.MEDIUM) {
            color1 = Colors.Orange.alpha(0.3f);
            color2 = Colors.Orange.alpha(0.8f);
            stop = new Point2D.Float(500, 2);
        } else if (warnlevel == Datastream.WarnLevel.LOW) {
            color1 = Colors.Orange.alpha(0.2f);
            color2 = Colors.Orange.alpha(0.4f);
            stop = new Point2D.Float(500, 2);
        }
    }

    final LinearGradientPaint gradientPaint = new LinearGradientPaint(start, stop, new float[] { 0.0f, 1.0f },
            new Color[] { color1, color2 });
    final MattePainter mattePainter = new MattePainter(gradientPaint, true);
    p.setBackgroundPainter(mattePainter);

    if (isSelected) {
        p.setBorder(BorderFactory.createCompoundBorder(
                BorderFactory.createLineBorder(UIManager.getColor("List.background"), 2),
                BorderFactory.createBevelBorder(BevelBorder.LOWERED)));
    } else {
        p.setBorder(BorderFactory.createCompoundBorder(
                BorderFactory.createLineBorder(UIManager.getColor("List.background"), 2),
                BorderFactory.createEtchedBorder()));

    }

    return p;
}

From source file:net.sf.xmm.moviemanager.gui.DialogIMDbMultiAdd.java

JPanel createFileLocationPanel() {
    // Panel file location
    JPanel fileLocationPanel = new JPanel();
    fileLocationPanel.setBorder(BorderFactory.createCompoundBorder(
            BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), " Movie parts "),
            BorderFactory.createEmptyBorder(0, 3, 3, 3)));
    fileLocationPanel.setLayout(new BorderLayout());
    fileLocation = new JTextArea();
    fileLocation.setEditable(false);/*w w w.j  a v  a2s  . com*/

    JScrollPane fileLocaScroll = new JScrollPane(fileLocation);

    fileLocationPanel.add(fileLocaScroll, BorderLayout.CENTER);
    fileLocation.addMouseListener(new MouseAdapter() {
        public void mouseClicked(MouseEvent e) {
            //handleFileLocationPopup(e);
        }
    });
    return fileLocationPanel;
}

From source file:edu.wpi.cs.wpisuitetng.modules.requirementsmanager.view.charts.StatView.java

/**
 * Builds the side panel with all the options for this StatViw
 * // w  ww. j  a  v a2s. c o  m
 * @return the formatted side panel
 */
public JPanel buildSidePanel() {
    final int VERTICAL_PADDING = 5;
    final int HORIZONTAL_PADDING = 5;
    final int FAR = 5;

    final SpringLayout sidePanelLayout = new SpringLayout();
    final JPanel sidePanel = new JPanel(sidePanelLayout);

    final JLabel lblStatisticType = new JLabel("Statistic Type");

    final String[] availableStatisticTypes = { "Status", "Assignees", "Iterations", "Velocity" };
    // TODO: Add Estimates, Effort, Tasks charts for future use.
    comboBoxStatisticType = new JComboBox(availableStatisticTypes);
    comboBoxStatisticType.addActionListener(this);

    makePieRadio = new JRadioButton("Pie Chart");
    makePieRadio.setMnemonic(KeyEvent.VK_P);
    makePieRadio.setActionCommand("Pie Chart");
    makePieRadio.addActionListener(this);

    makeBarRadio = new JRadioButton("Bar Chart");
    makeBarRadio.setMnemonic(KeyEvent.VK_B);
    makeBarRadio.setActionCommand("Bar Chart");
    makeBarRadio.addActionListener(this);

    makeLineRadio = new JRadioButton("Line Chart");
    makeLineRadio.setMnemonic(KeyEvent.VK_B);
    makeLineRadio.setActionCommand("Line Chart");
    makeLineRadio.addActionListener(this);
    makeLineRadio.setEnabled(false);

    final ButtonGroup group = new ButtonGroup();
    group.add(makePieRadio);
    group.add(makeBarRadio);
    group.add(makeLineRadio);
    updateSelectedItems();

    final JPanel radioPanel = new JPanel(new GridLayout(3, 1));
    radioPanel.add(makePieRadio);
    radioPanel.add(makeBarRadio);
    radioPanel.add(makeLineRadio);
    radioPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Chart Type"));

    sidePanel.add(lblStatisticType);
    sidePanel.add(comboBoxStatisticType);
    sidePanel.add(radioPanel);

    sidePanelLayout.putConstraint(SpringLayout.NORTH, lblStatisticType, VERTICAL_PADDING, SpringLayout.NORTH,
            sidePanel);
    sidePanelLayout.putConstraint(SpringLayout.WEST, lblStatisticType, HORIZONTAL_PADDING, SpringLayout.WEST,
            sidePanel);

    sidePanelLayout.putConstraint(SpringLayout.NORTH, comboBoxStatisticType, VERTICAL_PADDING,
            SpringLayout.SOUTH, lblStatisticType);
    sidePanelLayout.putConstraint(SpringLayout.WEST, comboBoxStatisticType, HORIZONTAL_PADDING,
            SpringLayout.WEST, sidePanel);

    sidePanelLayout.putConstraint(SpringLayout.NORTH, radioPanel, VERTICAL_PADDING + FAR, SpringLayout.SOUTH,
            comboBoxStatisticType);
    sidePanelLayout.putConstraint(SpringLayout.WEST, radioPanel, HORIZONTAL_PADDING, SpringLayout.WEST,
            sidePanel);

    return sidePanel;
}

From source file:org.gumtree.vis.hist2d.Hist2DChartEditor.java

private JPanel createMaskingPanel(JFreeChart chart) {
    JPanel wrap = new JPanel(new BorderLayout());

    JPanel maskingPanel = new JPanel(new GridLayout(1, 1));
    maskingPanel.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));

    //Horizontal group
    JPanel managePanel = new JPanel(new BorderLayout());
    managePanel.setBorder(/*w  w w .j a  v  a 2 s  .co  m*/
            BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Region of Interests"));

    JPanel inner = new JPanel(new LCBLayout(6));
    inner.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));
    inner.add(new JLabel("Select Region"));
    roiCombo = new JComboBox(panel.getMasks().toArray());
    //      colourScaleCombo.setMaximumRowCount(7);
    roiCombo.setActionCommand(CHANGE_ROI_COMMAND);
    roiCombo.addActionListener(this);
    roiCombo.setSelectedIndex(-1);
    inner.add(roiCombo);
    inner.add(new JLabel());

    inner.add(new JLabel("or create"));
    JPanel createNewPanel = new JPanel(new GridLayout(1, 2));
    newRectangleButton = new JButton("New Rectangle");
    newRectangleButton.setActionCommand(CREATE_NEW_RECT_REGION_COMMAND);
    newRectangleButton.addActionListener(this);
    newEllipseButton = new JButton("New Ellipse");
    newEllipseButton.setActionCommand(CREATE_NEW_ELLIPSE_REGION_COMMAND);
    newEllipseButton.addActionListener(this);
    createNewPanel.add(newRectangleButton);
    createNewPanel.add(newEllipseButton);
    inner.add(createNewPanel);
    inner.add(new JLabel());

    JPanel editPanel = new JPanel(new BorderLayout());
    editPanel
            .setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Edit the Region"));

    JPanel editInner = new JPanel(new LCBLayout(6));
    editInner.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));
    editInner.add(new JLabel("Name"));
    roiName = new JTextField(10);
    //      colourScaleCombo.setMaximumRowCount(7);
    roiName.setActionCommand(CHANGE_ROI_NAME_COMMAND);
    roiName.addActionListener(this);
    editInner.add(roiName);
    editInner.add(new JLabel());

    editInner.add(new JLabel("Usage"));
    ButtonGroup buttonGroup = new ButtonGroup();
    JPanel radioPanel = new JPanel(new GridLayout(1, 2));
    inclusiveRadio = new JRadioButton("inclusive");
    inclusiveRadio.setActionCommand(USE_INCLUSIVE_COMMAND);
    inclusiveRadio.addActionListener(this);
    buttonGroup.add(inclusiveRadio);
    radioPanel.add(inclusiveRadio);
    exclusiveRadio = new JRadioButton("exclusive");
    exclusiveRadio.setActionCommand(USE_EXCLUSIVE_COMMAND);
    exclusiveRadio.addActionListener(this);
    buttonGroup.add(exclusiveRadio);
    radioPanel.add(exclusiveRadio);
    editInner.add(radioPanel);
    editInner.add(new JLabel());

    editInner.add(new JLabel("Shape"));
    //      ButtonGroup shapeGroup = new ButtonGroup();
    //      JPanel shapePanel = new JPanel(new GridLayout(1, 2));
    //      rectangleRadio = new JRadioButton("rectangle");
    //      rectangleRadio.setActionCommand(CHOOSE_RECTANGLE_SHAPE_COMMAND);
    //      rectangleRadio.addActionListener(this);
    //      shapeGroup.add(rectangleRadio);
    //      shapePanel.add(rectangleRadio);
    //      ellipseRadio = new JRadioButton("ellipse");
    //      ellipseRadio.setActionCommand(CHOOSE_ELLIPSE_SHAPE_COMMAND);
    //      ellipseRadio.addActionListener(this);
    //      shapeGroup.add(ellipseRadio);
    //      shapePanel.add(ellipseRadio);
    //      editInner.add(shapePanel);
    shapeLabel = new JLabel();
    editInner.add(shapeLabel);
    editInner.add(new JLabel());

    editInner.add(new JLabel("X Range"));
    JPanel xRangePanel = new JPanel(new GridLayout(1, 2));
    JPanel xMinPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
    xMinPanel.add(new JLabel("min: "));
    xMin = new JTextField(10);
    //      xMin.setActionCommand(CHANGE_XMIN_COMMAND);
    //      xMin.addActionListener(this);
    xMin.addKeyListener(this);
    xMinPanel.add(xMin);
    xRangePanel.add(xMinPanel);
    JPanel xMaxPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
    xMaxPanel.add(new JLabel("max: "));
    xMax = new JTextField(10);
    //      xMax.setActionCommand(CHANGE_XMAX_COMMAND);
    xMax.addKeyListener(this);
    xMaxPanel.add(xMax);
    xRangePanel.add(xMaxPanel);
    editInner.add(xRangePanel);
    editInner.add(new JLabel());

    editInner.add(new JLabel("Y Range"));
    JPanel yRangePanel = new JPanel(new GridLayout(1, 2));
    JPanel yMinPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
    yMinPanel.add(new JLabel("min: "));
    yMin = new JTextField(10);
    //      yMin.setActionCommand(CHANGE_YMIN_COMMAND);
    //      yMin.addActionListener(this);
    yMin.addKeyListener(this);
    yMinPanel.add(yMin);
    yRangePanel.add(yMinPanel);
    JPanel yMaxPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT));
    yMaxPanel.add(new JLabel("max: "));
    yMax = new JTextField(10);
    //      yMax.setActionCommand(CHANGE_YMAX_COMMAND);
    //      yMax.addActionListener(this);
    yMax.addKeyListener(this);
    yMaxPanel.add(yMax);
    yRangePanel.add(yMaxPanel);
    editInner.add(yRangePanel);
    editInner.add(new JLabel());

    editInner.add(new JLabel());
    JPanel applyPanel = new JPanel(new GridLayout(1, 2));
    deleteButton = new JButton("Remove");
    deleteButton.setEnabled(false);
    deleteButton.setActionCommand(REMOVE_CHANGE_ACTION);
    deleteButton.addActionListener(this);
    applyPanel.add(deleteButton);
    applyPanel.add(new JLabel());
    applyButton = new JButton("Apply");
    applyButton.setEnabled(false);
    applyButton.setActionCommand(APPLY_CHANGE_ACTION);
    applyButton.addActionListener(this);
    applyPanel.add(applyButton);
    editInner.add(applyPanel);
    editInner.add(new JLabel());
    //      inner.add(new JLabel("X Range"));
    //      inner.add(inclusiveRadio);
    //      exclusiveRadio = new JRadioButton("exclusive");
    //      exclusiveRadio.setActionCommand(USE_EXCLUSIVE_COMMAND);
    //      exclusiveRadio.addActionListener(this);
    //      inner.add(exclusiveRadio);
    editPanel.add(editInner, BorderLayout.NORTH);
    managePanel.add(editPanel, BorderLayout.SOUTH);
    managePanel.add(inner, BorderLayout.NORTH);
    maskingPanel.add(managePanel);
    wrap.setName("ROI");

    wrap.add(maskingPanel, BorderLayout.NORTH);
    return wrap;
}

From source file:be.ac.ua.comp.scarletnebula.gui.windows.GUI.java

private JPanel getOverlayPanel() {
    final JPanel overlayPanel = new JPanel();
    overlayPanel.setOpaque(false);//w w w.jav a 2s.  c  om
    overlayPanel.setLayout(new GridBagLayout());
    filterTextField.addKeyListener(new KeyListener() {
        @Override
        public void keyTyped(final KeyEvent e) {

        }

        @Override
        public void keyReleased(final KeyEvent e) {
        }

        @Override
        public void keyPressed(final KeyEvent e) {
            if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
                hideFilter();
            }
        }
    });
    filterTextField.getDocument().addDocumentListener(new DocumentListener() {
        @Override
        public void removeUpdate(final DocumentEvent e) {
            textChanged();

        }

        @Override
        public void insertUpdate(final DocumentEvent e) {
            textChanged();
        }

        @Override
        public void changedUpdate(final DocumentEvent e) {

        }

        private void textChanged() {
            serverListModel.filter(filterTextField.getText());
        }
    });

    final SearchField searchField = new SearchField(filterTextField);

    final ImageIcon closeIcon = Utils.icon("cross16.png");
    final JButton closeButton = new JButton(closeIcon);
    closeButton.setBounds(10, 10, closeIcon.getIconWidth(), closeIcon.getIconHeight());
    closeButton.setMargin(new Insets(0, 0, 0, 0));
    closeButton.setOpaque(false);
    closeButton.setBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4));
    closeButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(final ActionEvent e) {
            hideFilter();
        }
    });

    searchPanel.add(searchField);
    searchPanel.add(closeButton);
    // searchPanel.setBorder(BorderFactory
    // .createBevelBorder(BevelBorder.RAISED));
    searchPanel.setBorder(BorderFactory.createEtchedBorder());
    searchPanel.setVisible(false);
    searchPanel.setAlignmentX(RIGHT_ALIGNMENT);

    final GridBagConstraints c = new GridBagConstraints();
    c.anchor = GridBagConstraints.LAST_LINE_END;
    c.fill = GridBagConstraints.NONE;
    c.gridx = 0;
    c.gridy = 0;
    c.weightx = 1.0;
    c.weighty = 1.0;
    c.insets = new Insets(3, 3, 3, 3);
    overlayPanel.add(searchPanel, c);
    return overlayPanel;
}

From source file:org.gumtree.vis.plot1d.Plot1DChartEditor.java

private JPanel createCurvesPanel() {
    JPanel wrap = new JPanel(new BorderLayout());
    JPanel curves = new JPanel(new BorderLayout());
    curves.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));

    JPanel general = new JPanel(new BorderLayout());
    general.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "General"));

    JPanel inner = new JPanel(new LCBLayout(6));
    inner.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));

    inner.add(new JLabel("Show Marker"));
    showMarker = new JCheckBox();
    showMarker.setActionCommand(SHOW_MARKER_COMMAND);
    showMarker.addActionListener(this);
    inner.add(showMarker);/*  w  w  w . ja v  a 2s.  c o m*/
    inner.add(new JLabel());

    inner.add(new JLabel("Show Error"));
    showError = new JCheckBox();
    showError.setActionCommand(SHOW_ERROR_COMMAND);
    showError.addActionListener(this);
    inner.add(showError);
    inner.add(new JLabel());

    general.add(inner, BorderLayout.NORTH);
    curves.add(general, BorderLayout.NORTH);

    JPanel individual = new JPanel(new BorderLayout());
    individual.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Individual"));

    JPanel interior = new JPanel(new LCBLayout(6));
    interior.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));

    XYDataset dataset = chart.getXYPlot().getDataset();
    int numberOfSeries = dataset.getSeriesCount();
    String[] seriesNames = new String[numberOfSeries];
    currentSeriesIndex = -1;
    for (int i = 0; i < numberOfSeries; i++) {
        seriesNames[i] = (String) dataset.getSeriesKey(i);
        if (seriesNames[i].equals(currentSeriesKey)) {
            currentSeriesIndex = i;
        }
    }
    if (currentSeriesIndex < 0 && seriesNames.length > 0) {
        currentSeriesIndex = 0;
        currentSeriesKey = seriesNames[currentSeriesIndex];
    }

    //Select curve combo
    this.seriesCombo = new JComboBox(seriesNames);
    seriesCombo.setActionCommand(CHANGE_CURVE_COMMAND);
    seriesCombo.addActionListener(this);
    interior.add(new JLabel("Select Curve"));
    interior.add(seriesCombo);
    interior.add(new JLabel(""));

    interior.add(new JLabel("Curve Stroke"));
    curveStrokeSample = new StrokeSample(new BasicStroke());
    curveStrokeSample.setEnabled(false);
    interior.add(curveStrokeSample);
    //      JButton button = new JButton(localizationResources.getString("Edit..."));
    Float[] strokes = new Float[] { 0f, 0.2f, 0.5f, 1f, 1.5f, 2f, 3f };
    strokeCombo = new JComboBox(strokes);
    strokeCombo.setActionCommand(CURVE_STROCK_COMMAND);
    strokeCombo.addActionListener(this);
    interior.add(strokeCombo);

    interior.add(new JLabel("Curve Colour"));
    curveColorPaint = new PaintSample(chart.getBackgroundPaint());
    interior.add(curveColorPaint);
    JButton button = new JButton(localizationResources.getString("Edit..."));
    button.setActionCommand(CURVE_COLOR_COMMAND);
    button.addActionListener(this);
    interior.add(button);

    interior.add(new JLabel("Marker Shape"));
    shapeLabel = new JLabel();
    interior.add(shapeLabel);
    Integer[] shapeIndex = new Integer[MarkerShape.size];
    for (int i = 0; i < shapeIndex.length; i++) {
        shapeIndex[i] = i;
    }
    shapeCombo = new JComboBox(shapeIndex);
    comboRender = new ImageComboRender();
    comboRender.setShapes(StaticValues.LOCAL_SHAPE_SERIES);
    shapeCombo.setRenderer(comboRender);
    shapeCombo.setMaximumRowCount(7);
    shapeCombo.setActionCommand(MARKER_SHAPE_COMMAND);
    shapeCombo.addActionListener(this);
    interior.add(shapeCombo);

    interior.add(new JLabel("Marker Filled"));
    markerFilled = new JCheckBox();
    markerFilled.setActionCommand(MARKER_FILLED_COMMAND);
    markerFilled.addActionListener(this);
    interior.add(markerFilled);
    interior.add(new JLabel());

    interior.add(new JLabel("Curve Visable"));
    curveVisable = new JCheckBox();
    curveVisable.setActionCommand(CURVE_VISIBLE_COMMAND);
    curveVisable.addActionListener(this);
    interior.add(curveVisable);
    interior.add(new JLabel());

    individual.add(interior, BorderLayout.NORTH);
    curves.add(individual);
    curves.setName("Curves");
    wrap.setName("Curves");
    wrap.add(curves, BorderLayout.NORTH);
    return wrap;
}

From source file:org.gumtree.vis.awt.time.TimePlotChartEditor.java

private JPanel createCordinatePanel() {
    JPanel wrap = new JPanel(new BorderLayout());
    JPanel coordinate = new JPanel(new GridLayout(2, 1));
    coordinate.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));

    //Horizontal group
    JPanel horizontal = new JPanel(new BorderLayout());
    horizontal.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Time Axis"));

    JPanel inner = new JPanel(new LCBLayout(6));
    inner.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));
    ButtonGroup axisControlGroup = new ButtonGroup();

    showAllHistory = new JRadioButton("Show all history");
    showAllHistory.setActionCommand(SHOW_ALL_HISTORY_COMMAND);
    showAllHistory.addActionListener(this);
    inner.add(showAllHistory);//from www .j a va2 s  . c  o  m
    inner.add(new JLabel());
    inner.add(new JLabel());
    //
    showPartHistory = new JRadioButton("Fix time range");
    showPartHistory.setActionCommand(FIXED_LENGTH_HISTORY_COMMAND);
    showPartHistory.addActionListener(this);
    inner.add(showPartHistory);
    timeField = new JTextField(5);
    inner.add(timeField);
    inner.add(new JLabel("seconds"));
    axisControlGroup.add(showAllHistory);
    axisControlGroup.add(showPartHistory);

    horizontal.add(inner, BorderLayout.NORTH);

    //Vertical group
    //       JPanel vertical = new JPanel(new BorderLayout());
    //       vertical.setBorder(BorderFactory.createTitledBorder(
    //            BorderFactory.createEtchedBorder(), "Vertical Axis"));
    //
    //       inner = new JPanel(new LCBLayout(6));
    //      inner.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));

    //      inner.add(new JLabel("Logarithm Y Axis"));
    //      logarithmY = new JCheckBox();
    //      logarithmY.setActionCommand(LOGARITHM_Y_AXIS_COMMAND);
    //      logarithmY.addActionListener(this);
    //      inner.add(logarithmY);
    //      inner.add(new JLabel());
    //
    //      inner.add(new JLabel("Flip Y Axis"));
    //      flipY = new JCheckBox();
    //      flipY.setActionCommand(FLIP_Y_AXIS_COMMAND);
    //      flipY.addActionListener(this);
    //      inner.add(flipY);
    //      inner.add(new JLabel());

    //       vertical.add(inner, BorderLayout.NORTH);

    coordinate.add(horizontal, BorderLayout.NORTH);
    //      coordinate.add(vertical);
    wrap.setName("Coordinate");
    wrap.add(coordinate, BorderLayout.NORTH);
    return wrap;
}

From source file:org.nuclos.client.layout.wysiwyg.component.properties.PropertyChartPropertyDomainStep.java

private PanelComponent getPanelComponent(ChartFunction chartFunction, String prefix) {
    JPanel editor = new JPanel();
    editor.setLayout(new BorderLayout());

    JPanel valueEditor = new JPanel(new GridBagLayout());
    valueEditor.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Werte"));

    JLabel propValue = new JLabel(SpringLocaleDelegate.getInstance().getMessage(
            "wysiwyg.chart.wizard.domain.value", "Bestimmen Sie die Spalte, die die Werte enthlt:"));
    valueEditor.add(propValue, new GridBagConstraints(0, 0, 1, 1, 1D, 1D, GridBagConstraints.NORTHWEST,
            GridBagConstraints.HORIZONTAL, new Insets(5, 0, 0, 0), 0, 0));

    ChartColumn[] valueColumns = chartFunction.getValueColumnDesc();
    for (int i = 0; i < valueColumns.length; i++) {
        ChartColumn chartColumn = valueColumns[i];
        PropertyEditorString propValueEditor = new PropertyEditorString(prefix + chartColumn.property,
                getFittingFieldnames(wysiwygChart.getEntityName(), chartColumn.clazz), true);
        propValueEditor.setEditorValue(getChartProperty(prefix + chartColumn.property));
        valueEditor.add(/*from w w  w  . ja v  a  2s. c o  m*/
                new JLabel(SpringLocaleDelegate.getInstance()
                        .getMessage("wysiwyg.chart.wizard.domain.column." + chartColumn.property, "")),
                new GridBagConstraints(0, i + 1, 1, 1, 1D, 1D, GridBagConstraints.NORTHWEST,
                        GridBagConstraints.HORIZONTAL, new Insets(10, 0, 10, 0), 0, 0));
        valueEditor.add(propValueEditor.getComponent(true),
                new GridBagConstraints(1, i + 1, 1, 1, 1D, 1D, GridBagConstraints.NORTHWEST,
                        GridBagConstraints.HORIZONTAL, new Insets(10, -152, 10, 0), 0, 0));
        propertyEditorList.add(propValueEditor);
    }

    editor.add(valueEditor, BorderLayout.NORTH);

    JPanel domainEditor = new JPanel(new GridBagLayout());
    domainEditor.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), "Domain"));

    ChartColumn[] domainColumns = chartFunction.getDomainColumnDesc();
    if (domainColumns.length > 0) {
        JLabel propDomain = new JLabel(
                SpringLocaleDelegate.getInstance().getMessage("wysiwyg.chart.wizard.domain.compare",
                        "Geben Sie hier die Spalte(n) fr die vergleichenden Werte oder weitere Angaben an:"));
        domainEditor.add(propDomain, new GridBagConstraints(0, 0, 1, 1, 1D, 1D, GridBagConstraints.NORTHWEST,
                GridBagConstraints.HORIZONTAL, new Insets(5, 0, 0, 0), 0, 0));

        int glue = 185;
        for (int i = 0; i < domainColumns.length; i++) {
            ChartColumn chartColumn = domainColumns[i];
            PropertyEditorString propDomainEditor = new PropertyEditorString(prefix + chartColumn.property,
                    getFittingFieldnames(wysiwygChart.getEntityName(), chartColumn.clazz), true);
            propDomainEditor.setEditorValue(getChartProperty(prefix + chartColumn.property));
            domainEditor.add(
                    new JLabel(SpringLocaleDelegate.getInstance()
                            .getMessage("wysiwyg.chart.wizard.domain.column." + chartColumn.property, "")),
                    new GridBagConstraints(0, i + 1, 1, 1, 1D, 1D, GridBagConstraints.NORTHWEST,
                            GridBagConstraints.HORIZONTAL, new Insets(10, 0, 10, 0), 0, 0));
            domainEditor.add(propDomainEditor.getComponent(true),
                    new GridBagConstraints(1, i + 1, 1, 1, 1D, 1D, GridBagConstraints.NORTHWEST,
                            GridBagConstraints.HORIZONTAL, new Insets(10, -240, 10, 0), 0, 0));
            glue -= propDomainEditor.comboBox.getPreferredSize().height + 10; // add size.
            propertyEditorList.add(propDomainEditor);
        }

        domainEditor.add(new JPanel(), new GridBagConstraints(0, 3, 1, 1, 1D, 1D, GridBagConstraints.NORTHWEST,
                GridBagConstraints.BOTH, new Insets(glue < 0 ? 0 : glue, 0, 10, 0), 0, 0));

        editor.add(domainEditor, BorderLayout.CENTER);
    }
    editor.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));

    PanelComponent pnlScroller = new PanelComponent(prefix, editor);
    pnlScroller.setPreferredSize(new Dimension(250, 80));
    pnlScroller.setAlignmentX(LEFT_ALIGNMENT);
    pnlScroller.setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));

    return pnlScroller;
}