Search in sources :

Example 31 with JToggleButton

use of javax.swing.JToggleButton in project vcell by virtualcell.

the class VCellClientTest method main.

/**
 * Starts the application.
 * @param args an array of command-line arguments
 */
public static void main(java.lang.String[] args) {
    class ParseVCellUserEvents implements Runnable {

        AWTEvent event;

        public ParseVCellUserEvents(AWTEvent event) {
            this.event = event;
        }

        @Override
        public void run() {
            if (event instanceof MouseEvent) {
                MouseEvent mouseEvent = (MouseEvent) event;
                Object details = null;
                if (mouseEvent.getID() == MouseEvent.MOUSE_RELEASED) {
                    if (mouseEvent.getComponent() instanceof JTable) {
                        JTable comp = (JTable) mouseEvent.getComponent();
                        int[] selRows = comp.getSelectedRows();
                        if (selRows != null && selRows.length > 0) {
                            StringBuffer sb = new StringBuffer();
                            for (int i = 0; i < selRows.length; i++) {
                                for (int j = 0; j < comp.getColumnCount(); j++) {
                                    try {
                                        sb.append((j == 0 ? "" : ",") + comp.getColumnName(j) + "='" + comp.getModel().getValueAt(selRows[i], j) + "'");
                                    } catch (Exception e) {
                                        e.printStackTrace();
                                    }
                                }
                            }
                            details = sb.toString();
                        }
                    } else if (mouseEvent.getComponent() instanceof JTree) {
                        JTree comp = (JTree) mouseEvent.getComponent();
                        TreePath treePath = comp.getSelectionPath();
                        if (treePath != null) {
                            details = treePath.getLastPathComponent();
                            // BioModel, MathModel, Geometry document tree selections
                            if (details instanceof BioModelNode) {
                                // VCellBasicCellRenderer.VCDocumentInfoNode
                                BioModelNode bioModelNode = (BioModelNode) details;
                                boolean isVCDocumentInfo = bioModelNode.getUserObject() instanceof VCDocumentInfo;
                                boolean isBioModelsNetModelInfo = bioModelNode.getUserObject() instanceof BioModelsNetModelInfo;
                                if (!isVCDocumentInfo && bioModelNode.getChildCount() > 0 && bioModelNode.getUserObject() instanceof VCellBasicCellRenderer.VCDocumentInfoNode) {
                                    TreeNode treeNode = bioModelNode.getFirstChild();
                                    if (treeNode instanceof BioModelNode && ((BioModelNode) treeNode).getUserObject() instanceof VCDocumentInfo) {
                                        details = ((BioModelNode) treeNode).getUserObject();
                                    }
                                } else if (isBioModelsNetModelInfo) {
                                    details = BioModelsNetModelInfo.class.getSimpleName() + " '" + ((BioModelsNetModelInfo) bioModelNode.getUserObject()).getName() + "'";
                                }
                            }
                        }
                    } else if (mouseEvent.getComponent() instanceof JTabbedPane) {
                        JTabbedPane comp = (JTabbedPane) mouseEvent.getComponent();
                        details = "'" + comp.getTitleAt(comp.getSelectedIndex()) + "'";
                    } else if (mouseEvent.getComponent() instanceof JMenuItem) {
                        JMenuItem comp = (JMenuItem) mouseEvent.getComponent();
                        details = "'" + comp.getText() + "'";
                    } else if (mouseEvent.getComponent() instanceof AbstractButton) {
                        AbstractButton comp = (AbstractButton) mouseEvent.getComponent();
                        Boolean bSelected = (comp instanceof JToggleButton ? ((JToggleButton) comp).isSelected() : null);
                        details = (bSelected != null ? "(" + (bSelected ? "selected" : "unselected") + ")" : "") + "'" + comp.getText() + "'";
                    } else if (mouseEvent.getComponent() instanceof JComboBox<?>) {
                        JComboBox<?> comp = (JComboBox<?>) mouseEvent.getComponent();
                        details = "'" + comp.getSelectedItem().toString() + "'";
                    } else if (mouseEvent.getComponent() instanceof JList<?>) {
                        JList<?> comp = (JList<?>) mouseEvent.getComponent();
                        details = "'" + comp.getSelectedValue() + "'";
                    } else {
                        details = "TBD " + mouseEvent.getComponent();
                    }
                    Component parentComponent = mouseEvent.getComponent();
                    StringBuffer parentInfo = new StringBuffer();
                    SimpleDateFormat simpleDateFormat = new SimpleDateFormat(BeanUtils.vcDateFormat, Locale.US);
                    do {
                        String title = "";
                        if (parentComponent instanceof Dialog) {
                            title = ((Dialog) parentComponent).getTitle();
                        } else if (parentComponent instanceof Frame) {
                            title = ((Frame) parentComponent).getTitle();
                        }
                        parentInfo.append(parentComponent.getClass().getTypeName() + "(" + parentComponent.getName() + (title != null && title.length() > 0 ? ",title='" + title + "'" : "") + ")");
                        if (parentComponent instanceof DocumentWindow && ((DocumentWindow) parentComponent).getTopLevelWindowManager() instanceof DocumentWindowManager) {
                            VCDocument vcDocument = ((DocumentWindowManager) ((DocumentWindow) parentComponent).getTopLevelWindowManager()).getVCDocument();
                            if (vcDocument != null) {
                                String date = (vcDocument.getVersion() != null && vcDocument.getVersion().getDate() != null ? simpleDateFormat.format(vcDocument.getVersion().getDate()) : "nodate");
                                parentInfo.append("doc=" + vcDocument.getDocumentType() + " '" + vcDocument.getName() + "' " + date);
                            }
                        }
                        parentInfo.append(" -> ");
                    } while ((parentComponent = parentComponent.getParent()) != null);
                    // try to add event, if full remove an event from the top
                    while (!recordedUserEvents.offer(mouseEvent.getClickCount() + " " + (details == null ? "null" : details.toString()) + BeanUtils.PLAINTEXT_EMAIL_NEWLINE + parentInfo.toString())) {
                        recordedUserEvents.poll();
                    }
                }
            }
        }
    }
    ;
    AWTEventListener awtEventListener = new AWTEventListener() {

        @Override
        public void eventDispatched(final AWTEvent event) {
            if (event instanceof MouseEvent) {
                if (((MouseEvent) event).getID() == MouseEvent.MOUSE_RELEASED) {
                    new Thread(new ParseVCellUserEvents(event)).start();
                }
            }
        }
    };
    Toolkit.getDefaultToolkit().addAWTEventListener(awtEventListener, AWTEvent.MOUSE_EVENT_MASK);
    // check synchronize Proxy prefs, Proxy Properties
    Preferences prefs = Preferences.userNodeForPackage(RemoteProxyVCellConnectionFactory.class);
    Boolean bHttp = (System.getProperty(NetworkProxyUtils.PROXY_HTTP_HOST) == null && System.getProperty(NetworkProxyUtils.PROXY_SOCKS_HOST) == null ? null : System.getProperty(NetworkProxyUtils.PROXY_HTTP_HOST) != null);
    String currentProxyHost = (bHttp == null ? null : (bHttp ? System.getProperty(NetworkProxyUtils.PROXY_HTTP_HOST) : System.getProperty(NetworkProxyUtils.PROXY_SOCKS_HOST)));
    String currentProxyPort = (bHttp == null ? null : (bHttp ? System.getProperty(NetworkProxyUtils.PROXY_HTTP_PORT) : System.getProperty(NetworkProxyUtils.PROXY_SOCKS_PORT)));
    NetworkProxyUtils.setProxyProperties(false, null, prefs.get(NetworkProxyPreferences.prefProxyType, NetworkProxyPreferences.prefProxyType), currentProxyHost, currentProxyPort, prefs.get(NetworkProxyPreferences.prefProxyType, NetworkProxyPreferences.prefProxyType), prefs.get(NetworkProxyPreferences.prefProxyHost, NetworkProxyPreferences.prefProxyHost), prefs.get(NetworkProxyPreferences.prefProxyPort, NetworkProxyPreferences.prefProxyPort));
    final boolean IS_DEBUG = ManagementFactory.getRuntimeMXBean().getInputArguments().toString().indexOf("-agentlib:jdwp") > 0;
    if (!IS_DEBUG) {
        String siteName = VCellSoftwareVersion.fromSystemProperty().getSite().name().toLowerCase();
        ConsoleCapture.getInstance().captureStandardOutAndError(new File(ResourceUtil.getLogDir(), "vcellrun_" + siteName + ".log"));
    }
    Logging.init();
    ErrorUtils.setDebug(IS_DEBUG);
    if (args != null && args.length >= 1 && args[0].equals("-console")) {
        // remove install4j parameter
        List<String> newArgs = new ArrayList<String>();
        newArgs.addAll(Arrays.asList(args));
        newArgs.remove(0);
        args = newArgs.toArray(new String[0]);
    }
    StringBuffer stringBuffer = new StringBuffer();
    for (int i = 0; i < args.length; i++) {
        stringBuffer.append("arg" + i + "=\"" + args[i] + "\" ");
    }
    System.out.println("starting with arguments [" + stringBuffer + "]");
    System.out.println("Running under Java major version: ONE point " + ResourceUtil.getJavaVersion().toString() + ".  Specifically: Java " + (System.getProperty("java.version")) + ", published by " + (System.getProperty("java.vendor")) + ", on the " + (System.getProperty("os.arch")) + " architecture running version " + (System.getProperty("os.version")) + " of the " + (System.getProperty("os.name")) + " operating system");
    ClientServerInfo csInfo = null;
    String hoststr = System.getProperty(PropertyLoader.vcellServerHost);
    String[] hosts = null;
    if (hoststr != null) {
        StringTokenizer st = new StringTokenizer(hoststr, " ,;");
        if (st.countTokens() >= 1) {
            hosts = new String[st.countTokens()];
            int count = 0;
            while (st.hasMoreTokens()) {
                hosts[count++] = st.nextToken();
            }
        }
    }
    if (hosts == null) {
        hosts = new String[1];
    }
    String user = null;
    String password = null;
    VCDocument initialDocument = null;
    if (args.length == 3) {
        hosts[0] = args[0];
        user = args[1];
        password = args[2];
    } else if (args.length == 0) {
    // this is ok
    } else if (args.length == 1) {
        // Check if arg is drag-n-drop file or a 'hostname'
        try {
            // drag and drop file on install4j VCell launcher will pass filepath as single arg to VCell
            File openThisVCellFile = new File(args[0]);
            if (openThisVCellFile.exists() && openThisVCellFile.isFile()) {
                initialDocument = startupWithOpen(args[0]);
            }
        } catch (Exception e) {
            e.printStackTrace();
        // continue to hostname check
        }
        // If startup file not exist assume arg is a hostname
        if (initialDocument == null) {
            hosts[0] = args[0];
        }
    // If install4j drag-n-drop, hosts[0] stays null and host is assumed to be loaded from a client property
    } else if (args.length == 2 && args[0].equals("-open")) {
        // hosts[0] = "-local";
        initialDocument = startupWithOpen(args[1]);
    } else {
        System.out.println("usage: VCellClientTest ( ((-local|host[:port]) [userid password]) | ([-open] filename) )");
        System.exit(1);
    }
    if (hosts[0] != null && hosts[0].equalsIgnoreCase("-local")) {
        csInfo = ClientServerInfo.createLocalServerInfo(user, (password == null || password.length() == 0 ? null : new UserLoginInfo.DigestedPassword(password)));
    } else {
        String[] hostParts = hosts[0].split(":");
        String apihost = hostParts[0];
        int apiport = Integer.parseInt(hostParts[1]);
        csInfo = ClientServerInfo.createRemoteServerInfo(apihost, apiport, user, (password == null || password.length() == 0 ? null : new UserLoginInfo.DigestedPassword(password)));
    }
    try {
        String propertyFile = PropertyLoader.getProperty(PropertyLoader.propertyFileProperty, "");
        if (propertyFile.length() > 0) {
            PropertyLoader.loadProperties(ArrayUtils.addAll(REQUIRED_CLIENT_PROPERTIES, REQUIRED_LOCAL_PROPERTIES));
            try {
                VCMongoMessage.enabled = true;
                VCMongoMessage.serviceStartup(ServiceName.client, null, null);
                PropertyLoader.sendErrorsToMongo();
            } catch (Exception e) {
                System.out.println("failed to start Mongo logging");
            }
        } else {
            PropertyLoader.loadProperties(REQUIRED_CLIENT_PROPERTIES);
            VCMongoMessage.enabled = false;
        }
        // call in main thread, since it's quick and not necessarily thread safe
        ResourceUtil.setNativeLibraryDirectory();
        vcellClient = VCellClient.startClient(initialDocument, csInfo);
        VCellClientDataService vcellClientDataService = new VCellClientDataServiceImpl(vcellClient);
        VCellProxyServer.startVCellVisitDataServerThread(vcellClientDataService);
        // starting loading libraries
        new LibraryLoaderThread(true).start();
        try {
            PythonSupport.verifyInstallation(PythonPackage.values());
        } catch (Exception e) {
            e.printStackTrace(System.out);
        }
    // SimulationService.Iface simService = new SimulationServiceImpl();
    // VCellIJServer.startVCellVisitDataServerThread(simService, false);
    } catch (Throwable exception) {
        ErrorUtils.sendRemoteLogMessage(csInfo.getUserLoginInfo(), csInfo.toString() + "\nvcell startup failed\n\n" + exception.getMessage());
        JOptionPane.showMessageDialog(null, exception.getMessage(), "Fatal Error", JOptionPane.OK_OPTION);
        System.err.println("Exception occurred in main() of VCellApplication");
        exception.printStackTrace(System.out);
    }
}
Also used : VCellClientDataService(cbit.vcell.client.pyvcellproxy.VCellClientDataService) BioModelsNetModelInfo(cbit.vcell.client.desktop.biomodel.BioModelsNetModelInfo) ArrayList(java.util.ArrayList) ClientServerInfo(cbit.vcell.client.server.ClientServerInfo) JToggleButton(javax.swing.JToggleButton) DocumentWindowManager(cbit.vcell.client.DocumentWindowManager) TreeNode(javax.swing.tree.TreeNode) Dialog(java.awt.Dialog) AWTEvent(java.awt.AWTEvent) AbstractButton(javax.swing.AbstractButton) VCDocument(org.vcell.util.document.VCDocument) DocumentWindow(cbit.vcell.client.desktop.DocumentWindow) JTree(javax.swing.JTree) JTable(javax.swing.JTable) File(java.io.File) JList(javax.swing.JList) Frame(java.awt.Frame) AWTEventListener(java.awt.event.AWTEventListener) JTabbedPane(javax.swing.JTabbedPane) BioModelNode(cbit.vcell.desktop.BioModelNode) VCellClientDataServiceImpl(cbit.vcell.client.data.VCellClientDataServiceImpl) JMenuItem(javax.swing.JMenuItem) Component(java.awt.Component) NetworkProxyPreferences(cbit.vcell.client.desktop.NetworkProxyPreferences) Preferences(java.util.prefs.Preferences) MouseEvent(java.awt.event.MouseEvent) JComboBox(javax.swing.JComboBox) LibraryLoaderThread(cbit.vcell.resource.LibraryLoaderThread) LibraryLoaderThread(cbit.vcell.resource.LibraryLoaderThread) StringTokenizer(java.util.StringTokenizer) TreePath(javax.swing.tree.TreePath) VCDocumentInfo(org.vcell.util.document.VCDocumentInfo) SimpleDateFormat(java.text.SimpleDateFormat)

Example 32 with JToggleButton

use of javax.swing.JToggleButton in project gephi by gephi.

the class SelectionToolbar method initContent.

private void initContent() {
    //Mouse
    final JToggleButton mouseButton = new JToggleButton(new ImageIcon(getClass().getResource("/org/gephi/visualization/component/mouse.png")));
    mouseButton.setToolTipText(NbBundle.getMessage(SelectionToolbar.class, "SelectionToolbar.mouse.tooltip"));
    mouseButton.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            if (mouseButton.isSelected()) {
                VizController.getInstance().getSelectionManager().setDirectMouseSelection();
            }
        }
    });
    add(mouseButton);
    //Rectangle
    final JToggleButton rectangleButton = new JToggleButton(new ImageIcon(getClass().getResource("/org/gephi/visualization/component/rectangle.png")));
    rectangleButton.setToolTipText(NbBundle.getMessage(SelectionToolbar.class, "SelectionToolbar.rectangle.tooltip"));
    rectangleButton.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            if (rectangleButton.isSelected()) {
                VizController.getInstance().getSelectionManager().setRectangleSelection();
            }
        }
    });
    add(rectangleButton);
    //Drag
    final JToggleButton dragButton = new JToggleButton(new ImageIcon(getClass().getResource("/org/gephi/visualization/component/hand.png")));
    dragButton.setToolTipText(NbBundle.getMessage(SelectionToolbar.class, "SelectionToolbar.drag.tooltip"));
    dragButton.addActionListener(new ActionListener() {

        @Override
        public void actionPerformed(ActionEvent e) {
            if (dragButton.isSelected()) {
                VizController.getInstance().getSelectionManager().setDraggingMouseSelection();
            }
        }
    });
    add(dragButton);
    addSeparator();
    buttonGroup.setSelected(rectangleButton.getModel(), VizController.getInstance().getVizConfig().isRectangleSelection());
    buttonGroup.setSelected(mouseButton.getModel(), !VizController.getInstance().getVizConfig().isRectangleSelection());
    buttonGroup.setSelected(dragButton.getModel(), VizController.getInstance().getVizConfig().isDraggingEnable());
    //Init events
    VizController.getInstance().getSelectionManager().addChangeListener(new ChangeListener() {

        @Override
        public void stateChanged(ChangeEvent e) {
            SelectionManager selectionManager = VizController.getInstance().getSelectionManager();
            if (selectionManager.isBlocked()) {
                buttonGroup.clearSelection();
            } else if (!selectionManager.isSelectionEnabled()) {
                buttonGroup.clearSelection();
            } else if (selectionManager.isDirectMouseSelection()) {
                if (!buttonGroup.isSelected(mouseButton.getModel())) {
                    buttonGroup.setSelected(mouseButton.getModel(), true);
                }
            }
        }
    });
}
Also used : ImageIcon(javax.swing.ImageIcon) SelectionManager(org.gephi.visualization.api.selection.SelectionManager) JToggleButton(javax.swing.JToggleButton) ActionListener(java.awt.event.ActionListener) ChangeEvent(javax.swing.event.ChangeEvent) ActionEvent(java.awt.event.ActionEvent) ChangeListener(javax.swing.event.ChangeListener)

Example 33 with JToggleButton

use of javax.swing.JToggleButton in project libgdx by libgdx.

the class EditorPanel method initializeComponents.

private void initializeComponents() {
    setLayout(new GridBagLayout());
    {
        titlePanel = new JPanel(new GridBagLayout());
        add(titlePanel, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(3, 0, 3, 0), 0, 0));
        titlePanel.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
        {
            JLabel label = new JLabel(name);
            titlePanel.add(label, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(3, 6, 3, 6), 0, 0));
            label.setFont(label.getFont().deriveFont(Font.BOLD));
        }
        {
            descriptionLabel = new JLabel(description);
            titlePanel.add(descriptionLabel, new GridBagConstraints(1, 0, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(3, 6, 3, 6), 0, 0));
        }
        {
            advancedButton = new JToggleButton("Advanced");
            titlePanel.add(advancedButton, new GridBagConstraints(2, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 6), 0, 0));
            advancedButton.setVisible(false);
        }
        {
            activeButton = new JToggleButton("Active");
            titlePanel.add(activeButton, new GridBagConstraints(3, 0, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(0, 0, 0, 6), 0, 0));
        }
    }
    {
        contentPanel = new JPanel(new GridBagLayout());
        add(contentPanel, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 6, 6, 6), 0, 0));
        contentPanel.setVisible(false);
    }
    {
        advancedPanel = new JPanel(new GridBagLayout());
        add(advancedPanel, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 6, 6, 6), 0, 0));
        advancedPanel.setVisible(false);
    }
}
Also used : JPanel(javax.swing.JPanel) GridBagConstraints(java.awt.GridBagConstraints) Insets(java.awt.Insets) GridBagLayout(java.awt.GridBagLayout) JToggleButton(javax.swing.JToggleButton) JLabel(javax.swing.JLabel)

Example 34 with JToggleButton

use of javax.swing.JToggleButton in project screenbird by adamhub.

the class RecorderPanel method initComponents.

/** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
@SuppressWarnings("unchecked")
private // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
void initComponents() {
    jpRecorderNonRec = new JRoundedPanel();
    lblClockNonRec = new JLabel();
    btnRecordNonRec = new JButton();
    btnCancelNonRec = new JButton();
    pbVolumeNonRec = new JProgressBar();
    toggleFullScreen = new JToggleButton();
    btnMinimizeNonRec = new JButton();
    jpRecorderMessage = new RecorderMessage();
    jpRecorderRec = new JRoundedPanel();
    lblClockRec = new JLabel();
    btnRecordRec = new JButton();
    pbVolumeRec = new JProgressBar();
    btnMinimizeRec = new JButton();
    jpRecorderBackup = new JRoundedPanel();
    lblClockBackup = new JLabel();
    btnFinalizeBackup = new JButton();
    btnCancelBackup = new JButton();
    pbVolumeBackup = new JProgressBar();
    toggleFullScreenBackup = new JToggleButton();
    jpRecorderMessageBackup = new RecorderMessage();
    btnMinimizeBackup1 = new JButton();
    btnPlayPauseBackup = new JButton();
    jpUpload = new JRoundedPanel();
    txtUrl = new JTextField();
    jLabel3 = new JLabel();
    btnPlay = new JButton();
    jScrollPane2 = new JScrollPane();
    txtDescription = new JTextArea();
    chkAutoUpload = new JCheckBox();
    chkPublic = new JCheckBox();
    lblUploadMessage = new JLabel();
    jLabel1 = new JLabel();
    jLabel8 = new JLabel();
    pbEncoding = new JProgressBar();
    btnUpload = new JButton();
    btnSaveAs = new JButton();
    btnCopy = new JButton();
    jLabel2 = new JLabel();
    txtTitle = new JTextField();
    btnAccount = new JButton();
    jPanel3 = new JPanel();
    btnCancel = new JButton();
    btnMinimize1 = new JButton();
    jLabel4 = new JLabel();
    recorderPanelBG1 = new RecorderPanelBG();
    jButton1 = new JButton();
    jButton2 = new JButton();
    jLabel5 = new JLabel();
    jToggleButton1 = new JToggleButton();
    jToggleButton2 = new JToggleButton();
    jLabel6 = new JLabel();
    jToggleButton3 = new JToggleButton();
    soundBar1 = new SoundBar();
    jToggleButton4 = new JToggleButton();
    FormListener formListener = new FormListener();
    setMaximumSize(new Dimension(1363, 45));
    setMinimumSize(new Dimension(378, 45));
    // NOI18N
    setName("RecorderPanel");
    setOpaque(false);
    setPreferredSize(new Dimension(579, 1000));
    setRequestFocusEnabled(false);
    jpRecorderNonRec.setMaximumSize(new Dimension(333, 44));
    jpRecorderNonRec.setMinimumSize(new Dimension(333, 44));
    jpRecorderNonRec.setPreferredSize(new Dimension(333, 44));
    jpRecorderNonRec.setLayout(new AbsoluteLayout());
    lblClockNonRec.setBackground(Color.darkGray);
    // NOI18N
    lblClockNonRec.setFont(new Font("Lucida Grande", 1, 14));
    lblClockNonRec.setForeground(new Color(255, 255, 255));
    lblClockNonRec.setHorizontalAlignment(SwingConstants.CENTER);
    // NOI18N
    lblClockNonRec.setIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/timer.png")));
    lblClockNonRec.setText("00:00");
    lblClockNonRec.setHorizontalTextPosition(SwingConstants.CENTER);
    lblClockNonRec.setIconTextGap(0);
    lblClockNonRec.setMaximumSize(new Dimension(54, 24));
    lblClockNonRec.setMinimumSize(new Dimension(54, 24));
    lblClockNonRec.setOpaque(true);
    lblClockNonRec.setPreferredSize(new Dimension(54, 24));
    jpRecorderNonRec.add(lblClockNonRec, new AbsoluteConstraints(100, 10, -1, 25));
    btnRecordNonRec.setBackground(Color.darkGray);
    // NOI18N
    btnRecordNonRec.setFont(new Font("Lucida Grande", 1, 12));
    btnRecordNonRec.setForeground(new Color(255, 255, 255));
    // NOI18N
    btnRecordNonRec.setIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/redButton.png")));
    btnRecordNonRec.setText("Record");
    btnRecordNonRec.setBorder(BorderFactory.createLineBorder(new Color(60, 60, 60), 2));
    btnRecordNonRec.setHorizontalTextPosition(SwingConstants.CENTER);
    // NOI18N
    btnRecordNonRec.setName("btnRecordNonRec");
    btnRecordNonRec.addActionListener(formListener);
    jpRecorderNonRec.add(btnRecordNonRec, new AbsoluteConstraints(200, 10, 66, 24));
    btnCancelNonRec.setBackground(Color.darkGray);
    btnCancelNonRec.setForeground(new Color(255, 255, 255));
    // NOI18N
    btnCancelNonRec.setIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/x.png")));
    btnCancelNonRec.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED));
    btnCancelNonRec.setDoubleBuffered(true);
    btnCancelNonRec.setHorizontalTextPosition(SwingConstants.CENTER);
    btnCancelNonRec.setMaximumSize(new Dimension(24, 24));
    btnCancelNonRec.setMinimumSize(new Dimension(24, 24));
    // NOI18N
    btnCancelNonRec.setName("btnCancelRecorder");
    btnCancelNonRec.setPreferredSize(new Dimension(24, 24));
    // NOI18N
    btnCancelNonRec.setPressedIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/x.png")));
    // NOI18N
    btnCancelNonRec.setRolloverIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/x.png")));
    btnCancelNonRec.addActionListener(formListener);
    jpRecorderNonRec.add(btnCancelNonRec, new AbsoluteConstraints(300, 10, -1, -1));
    pbVolumeNonRec.setBackground(Color.darkGray);
    pbVolumeNonRec.setForeground(new Color(102, 255, 102));
    pbVolumeNonRec.setMaximum(3700);
    pbVolumeNonRec.setToolTipText("Volume Level");
    pbVolumeNonRec.setBorderPainted(false);
    pbVolumeNonRec.setMaximumSize(new Dimension(47, 24));
    pbVolumeNonRec.setMinimumSize(new Dimension(27, 24));
    pbVolumeNonRec.setPreferredSize(new Dimension(47, 24));
    jpRecorderNonRec.add(pbVolumeNonRec, new AbsoluteConstraints(160, 10, 30, 25));
    toggleFullScreen.setBackground(Color.darkGray);
    toggleFullScreen.setForeground(Color.white);
    // NOI18N
    toggleFullScreen.setIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/button-large-unpressed.png")));
    toggleFullScreen.setSelected(true);
    toggleFullScreen.setText("Fullscreen");
    toggleFullScreen.setBorder(null);
    toggleFullScreen.setBorderPainted(false);
    toggleFullScreen.setContentAreaFilled(false);
    toggleFullScreen.setFocusable(false);
    toggleFullScreen.setHorizontalTextPosition(SwingConstants.CENTER);
    toggleFullScreen.setIconTextGap(0);
    // NOI18N
    toggleFullScreen.setName("toggleFullScreen");
    // NOI18N
    toggleFullScreen.setPressedIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/button-large-pressed.png")));
    // NOI18N
    toggleFullScreen.setSelectedIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/button-large-pressed.png")));
    toggleFullScreen.addActionListener(formListener);
    jpRecorderNonRec.add(toggleFullScreen, new AbsoluteConstraints(10, 10, -1, 25));
    toggleFullScreen.getAccessibleContext().setAccessibleDescription("Change between Fullscreen and Custom");
    btnMinimizeNonRec.setBackground(Color.darkGray);
    btnMinimizeNonRec.setForeground(new Color(255, 255, 255));
    // NOI18N
    btnMinimizeNonRec.setIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/min.png")));
    btnMinimizeNonRec.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED));
    btnMinimizeNonRec.setDoubleBuffered(true);
    btnMinimizeNonRec.setHorizontalTextPosition(SwingConstants.CENTER);
    btnMinimizeNonRec.setMaximumSize(new Dimension(24, 24));
    btnMinimizeNonRec.setMinimumSize(new Dimension(24, 24));
    // NOI18N
    btnMinimizeNonRec.setName("btnMinimizeRecorder");
    btnMinimizeNonRec.setPreferredSize(new Dimension(24, 24));
    // NOI18N
    btnMinimizeNonRec.setPressedIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/min.png")));
    // NOI18N
    btnMinimizeNonRec.setRolloverIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/min.png")));
    btnMinimizeNonRec.addActionListener(formListener);
    jpRecorderNonRec.add(btnMinimizeNonRec, new AbsoluteConstraints(270, 10, -1, -1));
    jpRecorderNonRec.add(jpRecorderMessage, new AbsoluteConstraints(10, 50, 310, 40));
    jpRecorderRec.setMaximumSize(new Dimension(244, 44));
    jpRecorderRec.setMinimumSize(new Dimension(244, 44));
    jpRecorderRec.setPreferredSize(new Dimension(244, 44));
    jpRecorderRec.setLayout(new AbsoluteLayout());
    lblClockRec.setBackground(Color.darkGray);
    // NOI18N
    lblClockRec.setFont(new Font("Lucida Grande", 1, 14));
    lblClockRec.setForeground(new Color(255, 255, 255));
    lblClockRec.setHorizontalAlignment(SwingConstants.CENTER);
    // NOI18N
    lblClockRec.setIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/timer.png")));
    lblClockRec.setText("00:00");
    lblClockRec.setHorizontalTextPosition(SwingConstants.CENTER);
    lblClockRec.setIconTextGap(0);
    lblClockRec.setMaximumSize(new Dimension(54, 24));
    lblClockRec.setMinimumSize(new Dimension(54, 24));
    lblClockRec.setOpaque(true);
    lblClockRec.setPreferredSize(new Dimension(54, 24));
    jpRecorderRec.add(lblClockRec, new AbsoluteConstraints(10, 10, -1, 25));
    btnRecordRec.setBackground(Color.darkGray);
    // NOI18N
    btnRecordRec.setFont(new Font("Lucida Grande", 1, 12));
    btnRecordRec.setForeground(new Color(255, 255, 255));
    // NOI18N
    btnRecordRec.setIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/redButton.png")));
    btnRecordRec.setText("Stop");
    btnRecordRec.setBorder(BorderFactory.createLineBorder(new Color(60, 60, 60), 2));
    btnRecordRec.setHorizontalTextPosition(SwingConstants.CENTER);
    // NOI18N
    btnRecordRec.setName("btnRecord");
    btnRecordRec.addActionListener(formListener);
    jpRecorderRec.add(btnRecordRec, new AbsoluteConstraints(110, 10, 66, 24));
    pbVolumeRec.setBackground(Color.darkGray);
    pbVolumeRec.setForeground(new Color(102, 255, 102));
    pbVolumeRec.setMaximum(3700);
    pbVolumeRec.setToolTipText("Volume Level");
    pbVolumeRec.setBorderPainted(false);
    pbVolumeRec.setMaximumSize(new Dimension(47, 24));
    pbVolumeRec.setMinimumSize(new Dimension(27, 24));
    pbVolumeRec.setPreferredSize(new Dimension(47, 24));
    jpRecorderRec.add(pbVolumeRec, new AbsoluteConstraints(70, 10, 30, 25));
    btnMinimizeRec.setBackground(Color.darkGray);
    btnMinimizeRec.setForeground(new Color(255, 255, 255));
    // NOI18N
    btnMinimizeRec.setIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/min.png")));
    btnMinimizeRec.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED));
    btnMinimizeRec.setDoubleBuffered(true);
    btnMinimizeRec.setHorizontalTextPosition(SwingConstants.CENTER);
    btnMinimizeRec.setMaximumSize(new Dimension(24, 24));
    btnMinimizeRec.setMinimumSize(new Dimension(24, 24));
    // NOI18N
    btnMinimizeRec.setName("btnMinimizeRecorder");
    btnMinimizeRec.setPreferredSize(new Dimension(24, 24));
    // NOI18N
    btnMinimizeRec.setPressedIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/min.png")));
    // NOI18N
    btnMinimizeRec.setRolloverIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/min.png")));
    btnMinimizeRec.addActionListener(formListener);
    jpRecorderRec.add(btnMinimizeRec, new AbsoluteConstraints(180, 10, -1, -1));
    jpRecorderBackup.setMaximumSize(new Dimension(333, 44));
    jpRecorderBackup.setMinimumSize(new Dimension(333, 44));
    jpRecorderBackup.setPreferredSize(new Dimension(333, 44));
    jpRecorderBackup.setLayout(new AbsoluteLayout());
    lblClockBackup.setBackground(Color.darkGray);
    // NOI18N
    lblClockBackup.setFont(new Font("Lucida Grande", 1, 14));
    lblClockBackup.setForeground(new Color(255, 255, 255));
    lblClockBackup.setHorizontalAlignment(SwingConstants.CENTER);
    // NOI18N
    lblClockBackup.setIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/timer.png")));
    lblClockBackup.setText("00:00");
    lblClockBackup.setHorizontalTextPosition(SwingConstants.CENTER);
    lblClockBackup.setIconTextGap(0);
    lblClockBackup.setMaximumSize(new Dimension(54, 24));
    lblClockBackup.setMinimumSize(new Dimension(54, 24));
    lblClockBackup.setOpaque(true);
    lblClockBackup.setPreferredSize(new Dimension(54, 24));
    jpRecorderBackup.add(lblClockBackup, new AbsoluteConstraints(100, 10, -1, 25));
    btnFinalizeBackup.setBackground(Color.darkGray);
    // NOI18N
    btnFinalizeBackup.setFont(new Font("Lucida Grande", 1, 12));
    btnFinalizeBackup.setForeground(new Color(255, 255, 255));
    // NOI18N
    btnFinalizeBackup.setIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/check-red.png")));
    btnFinalizeBackup.setEnabled(false);
    btnFinalizeBackup.setHorizontalTextPosition(SwingConstants.CENTER);
    btnFinalizeBackup.setMaximumSize(new Dimension(24, 24));
    btnFinalizeBackup.setMinimumSize(new Dimension(24, 24));
    // NOI18N
    btnFinalizeBackup.setName("btnFinalizeBackup");
    btnFinalizeBackup.setPreferredSize(new Dimension(24, 24));
    // NOI18N
    btnFinalizeBackup.setPressedIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/check-red-pressed.png")));
    btnFinalizeBackup.addActionListener(formListener);
    jpRecorderBackup.add(btnFinalizeBackup, new AbsoluteConstraints(230, 10, 24, 24));
    btnCancelBackup.setBackground(Color.darkGray);
    btnCancelBackup.setForeground(new Color(255, 255, 255));
    // NOI18N
    btnCancelBackup.setIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/x.png")));
    btnCancelBackup.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED));
    btnCancelBackup.setDoubleBuffered(true);
    btnCancelBackup.setHorizontalTextPosition(SwingConstants.CENTER);
    btnCancelBackup.setMaximumSize(new Dimension(24, 24));
    btnCancelBackup.setMinimumSize(new Dimension(24, 24));
    // NOI18N
    btnCancelBackup.setName("btnCancelRecorder");
    btnCancelBackup.setPreferredSize(new Dimension(24, 24));
    // NOI18N
    btnCancelBackup.setPressedIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/x.png")));
    // NOI18N
    btnCancelBackup.setRolloverIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/x.png")));
    btnCancelBackup.addActionListener(formListener);
    jpRecorderBackup.add(btnCancelBackup, new AbsoluteConstraints(290, 10, -1, -1));
    pbVolumeBackup.setBackground(Color.darkGray);
    pbVolumeBackup.setForeground(new Color(102, 255, 102));
    pbVolumeBackup.setMaximum(3700);
    pbVolumeBackup.setToolTipText("Volume Level");
    pbVolumeBackup.setBorderPainted(false);
    pbVolumeBackup.setMaximumSize(new Dimension(47, 24));
    pbVolumeBackup.setMinimumSize(new Dimension(27, 24));
    pbVolumeBackup.setPreferredSize(new Dimension(47, 24));
    jpRecorderBackup.add(pbVolumeBackup, new AbsoluteConstraints(160, 10, 30, 25));
    toggleFullScreenBackup.setBackground(Color.darkGray);
    toggleFullScreenBackup.setForeground(Color.white);
    // NOI18N
    toggleFullScreenBackup.setIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/button-large-unpressed.png")));
    toggleFullScreenBackup.setSelected(true);
    toggleFullScreenBackup.setText("Fullscreen");
    toggleFullScreenBackup.setBorder(null);
    toggleFullScreenBackup.setBorderPainted(false);
    toggleFullScreenBackup.setContentAreaFilled(false);
    toggleFullScreenBackup.setFocusable(false);
    toggleFullScreenBackup.setHorizontalTextPosition(SwingConstants.CENTER);
    toggleFullScreenBackup.setIconTextGap(0);
    // NOI18N
    toggleFullScreenBackup.setName("toggleFullScreen");
    // NOI18N
    toggleFullScreenBackup.setPressedIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/button-large-pressed.png")));
    // NOI18N
    toggleFullScreenBackup.setSelectedIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/button-large-pressed.png")));
    toggleFullScreenBackup.addActionListener(formListener);
    jpRecorderBackup.add(toggleFullScreenBackup, new AbsoluteConstraints(10, 10, -1, 25));
    jpRecorderBackup.add(jpRecorderMessageBackup, new AbsoluteConstraints(10, 50, 310, 30));
    btnMinimizeBackup1.setBackground(Color.darkGray);
    btnMinimizeBackup1.setForeground(new Color(255, 255, 255));
    // NOI18N
    btnMinimizeBackup1.setIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/min.png")));
    btnMinimizeBackup1.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED));
    btnMinimizeBackup1.setDoubleBuffered(true);
    btnMinimizeBackup1.setHorizontalTextPosition(SwingConstants.CENTER);
    btnMinimizeBackup1.setMaximumSize(new Dimension(24, 24));
    btnMinimizeBackup1.setMinimumSize(new Dimension(24, 24));
    // NOI18N
    btnMinimizeBackup1.setName("btnMinimizeRecorder");
    btnMinimizeBackup1.setPreferredSize(new Dimension(24, 24));
    // NOI18N
    btnMinimizeBackup1.setPressedIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/min.png")));
    // NOI18N
    btnMinimizeBackup1.setRolloverIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/min.png")));
    btnMinimizeBackup1.addActionListener(formListener);
    jpRecorderBackup.add(btnMinimizeBackup1, new AbsoluteConstraints(260, 10, -1, -1));
    btnPlayPauseBackup.setBackground(Color.darkGray);
    btnPlayPauseBackup.setForeground(new Color(255, 255, 255));
    // NOI18N
    btnPlayPauseBackup.setIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/record.png")));
    btnPlayPauseBackup.setToolTipText("");
    btnPlayPauseBackup.setHorizontalTextPosition(SwingConstants.CENTER);
    btnPlayPauseBackup.setMaximumSize(new Dimension(24, 24));
    btnPlayPauseBackup.setMinimumSize(new Dimension(24, 24));
    // NOI18N
    btnPlayPauseBackup.setName("btnPlay");
    btnPlayPauseBackup.setPreferredSize(new Dimension(24, 24));
    // NOI18N
    btnPlayPauseBackup.setPressedIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/record-pressed.png")));
    btnPlayPauseBackup.addActionListener(formListener);
    jpRecorderBackup.add(btnPlayPauseBackup, new AbsoluteConstraints(200, 10, 24, 24));
    jpUpload.setBackground(new Color(216, 216, 216));
    txtUrl.setEditable(false);
    txtUrl.setBackground(new Color(255, 255, 255));
    txtUrl.setPreferredSize(new Dimension(14, 34));
    txtUrl.addActionListener(formListener);
    // NOI18N
    jLabel3.setFont(new Font("Arial", 1, 14));
    jLabel3.setForeground(new Color(109, 109, 109));
    jLabel3.setText("Description");
    // NOI18N
    btnPlay.setIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/upload/play_normal.png")));
    btnPlay.setBorderPainted(false);
    btnPlay.setContentAreaFilled(false);
    // NOI18N
    btnPlay.setPressedIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/upload/play_pushed.png")));
    // NOI18N
    btnPlay.setRolloverIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/upload/play_upload.png")));
    btnPlay.addActionListener(formListener);
    txtDescription.setColumns(20);
    txtDescription.setLineWrap(true);
    txtDescription.setRows(5);
    jScrollPane2.setViewportView(txtDescription);
    chkAutoUpload.setBackground(new Color(216, 216, 216));
    // NOI18N
    chkAutoUpload.setFont(new Font("Arial", 0, 14));
    chkAutoUpload.setForeground(new Color(109, 109, 109));
    chkAutoUpload.setText("Auto Upload");
    // NOI18N
    chkAutoUpload.setIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/upload/checkbox_unchecked.png")));
    // NOI18N
    chkAutoUpload.setSelectedIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/upload/checkbox_checked.png")));
    chkAutoUpload.addActionListener(formListener);
    chkPublic.setBackground(new Color(216, 216, 216));
    // NOI18N
    chkPublic.setFont(new Font("Arial", 0, 14));
    chkPublic.setForeground(new Color(109, 109, 109));
    chkPublic.setText("Public");
    // NOI18N
    chkPublic.setIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/upload/checkbox_unchecked.png")));
    // NOI18N
    chkPublic.setSelectedIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/upload/checkbox_checked.png")));
    chkPublic.addActionListener(formListener);
    // NOI18N
    lblUploadMessage.setFont(new Font("Arial", 1, 14));
    lblUploadMessage.setForeground(new Color(109, 109, 109));
    lblUploadMessage.setText("Description");
    // NOI18N
    jLabel1.setFont(new Font("Arial", 1, 14));
    jLabel1.setForeground(new Color(109, 109, 109));
    jLabel1.setText("Title");
    // NOI18N
    jLabel8.setFont(new Font("Arial", 0, 14));
    jLabel8.setForeground(new Color(109, 109, 109));
    jLabel8.setText("Go to your");
    pbEncoding.setForeground(new Color(211, 56, 61));
    pbEncoding.setValue(33);
    // NOI18N
    btnUpload.setIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/upload/upload_normal.png")));
    btnUpload.setBorderPainted(false);
    btnUpload.setContentAreaFilled(false);
    // NOI18N
    btnUpload.setPressedIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/upload/upload_pushed.png")));
    // NOI18N
    btnUpload.setRolloverIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/upload/upload_hover.png")));
    btnUpload.addActionListener(formListener);
    // NOI18N
    btnSaveAs.setIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/upload/save-a-copy_normal.png")));
    btnSaveAs.setBorderPainted(false);
    btnSaveAs.setContentAreaFilled(false);
    // NOI18N
    btnSaveAs.setPressedIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/upload/save-a-copy_pushed.png")));
    // NOI18N
    btnSaveAs.setRolloverIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/upload/save-a-copy_hover.png")));
    btnSaveAs.addActionListener(formListener);
    // NOI18N
    btnCopy.setFont(new Font("Arial", 0, 14));
    btnCopy.setForeground(new Color(0, 51, 204));
    btnCopy.setText("copy");
    btnCopy.setBorderPainted(false);
    btnCopy.setContentAreaFilled(false);
    btnCopy.addActionListener(formListener);
    // NOI18N
    jLabel2.setFont(new Font("Arial", 1, 14));
    jLabel2.setForeground(new Color(109, 109, 109));
    jLabel2.setText("Link");
    txtTitle.setPreferredSize(new Dimension(14, 34));
    txtTitle.addActionListener(formListener);
    // NOI18N
    btnAccount.setFont(new Font("Arial", 0, 14));
    btnAccount.setForeground(new Color(0, 51, 204));
    btnAccount.setText("account");
    btnAccount.setBorderPainted(false);
    btnAccount.setContentAreaFilled(false);
    btnAccount.addActionListener(formListener);
    jPanel3.setBackground(new Color(76, 76, 76));
    jPanel3.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, new Color(56, 56, 56)));
    jPanel3.setPreferredSize(new Dimension(132, 23));
    btnCancel.setBackground(Color.white);
    btnCancel.setForeground(new Color(255, 255, 255));
    // NOI18N
    btnCancel.setIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/close_normal.png")));
    btnCancel.setAlignmentY(0.0F);
    btnCancel.setBorder(null);
    btnCancel.setBorderPainted(false);
    btnCancel.setContentAreaFilled(false);
    btnCancel.setDoubleBuffered(true);
    btnCancel.setFocusPainted(false);
    btnCancel.setFocusable(false);
    btnCancel.setHorizontalTextPosition(SwingConstants.CENTER);
    btnCancel.setMaximumSize(new Dimension(42, 16));
    btnCancel.setMinimumSize(new Dimension(42, 16));
    // NOI18N
    btnCancel.setName("btnCancelRecorder");
    btnCancel.setPreferredSize(new Dimension(42, 16));
    // NOI18N
    btnCancel.setPressedIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/close_normal.png")));
    // NOI18N
    btnCancel.setRolloverIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/close_hover.png")));
    btnCancel.setVerticalAlignment(SwingConstants.TOP);
    btnCancel.addActionListener(formListener);
    btnMinimize1.setBackground(Color.darkGray);
    btnMinimize1.setForeground(new Color(255, 255, 255));
    // NOI18N
    btnMinimize1.setIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/minimize_normal.png")));
    btnMinimize1.setBorder(null);
    btnMinimize1.setContentAreaFilled(false);
    btnMinimize1.setDoubleBuffered(true);
    btnMinimize1.setFocusPainted(false);
    btnMinimize1.setFocusable(false);
    btnMinimize1.setHorizontalTextPosition(SwingConstants.CENTER);
    btnMinimize1.setMargin(new Insets(2, 14, 0, 14));
    btnMinimize1.setMaximumSize(new Dimension(21, 16));
    btnMinimize1.setMinimumSize(new Dimension(21, 16));
    // NOI18N
    btnMinimize1.setName("btnMinimizeRecorder");
    btnMinimize1.setPreferredSize(new Dimension(21, 16));
    // NOI18N
    btnMinimize1.setPressedIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/minimize_normal.png")));
    // NOI18N
    btnMinimize1.setRolloverIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/minimize_hover.png")));
    btnMinimize1.addActionListener(formListener);
    // NOI18N
    jLabel4.setFont(new Font("Arial", 1, 13));
    jLabel4.setForeground(new Color(255, 255, 255));
    jLabel4.setText("Ready");
    GroupLayout jPanel3Layout = new GroupLayout(jPanel3);
    jPanel3.setLayout(jPanel3Layout);
    jPanel3Layout.setHorizontalGroup(jPanel3Layout.createParallelGroup(Alignment.LEADING).addGroup(Alignment.TRAILING, jPanel3Layout.createSequentialGroup().addContainerGap().addComponent(jLabel4, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addGap(18, 18, 18).addComponent(btnMinimize1, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE).addGap(0, 0, 0).addComponent(btnCancel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)));
    jPanel3Layout.setVerticalGroup(jPanel3Layout.createParallelGroup(Alignment.LEADING).addGroup(jPanel3Layout.createSequentialGroup().addGap(1, 1, 1).addGroup(jPanel3Layout.createParallelGroup(Alignment.LEADING).addComponent(jLabel4, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addGroup(jPanel3Layout.createSequentialGroup().addGroup(jPanel3Layout.createParallelGroup(Alignment.LEADING).addComponent(btnCancel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE).addComponent(btnMinimize1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)).addGap(0, 0, Short.MAX_VALUE))).addContainerGap()));
    GroupLayout jpUploadLayout = new GroupLayout(jpUpload);
    jpUpload.setLayout(jpUploadLayout);
    jpUploadLayout.setHorizontalGroup(jpUploadLayout.createParallelGroup(Alignment.LEADING).addGroup(jpUploadLayout.createSequentialGroup().addContainerGap().addGroup(jpUploadLayout.createParallelGroup(Alignment.LEADING).addComponent(jScrollPane2).addGroup(jpUploadLayout.createSequentialGroup().addComponent(lblUploadMessage).addPreferredGap(ComponentPlacement.UNRELATED).addComponent(pbEncoding, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)).addGroup(jpUploadLayout.createSequentialGroup().addComponent(chkAutoUpload).addPreferredGap(ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addComponent(btnSaveAs, GroupLayout.PREFERRED_SIZE, 104, GroupLayout.PREFERRED_SIZE).addPreferredGap(ComponentPlacement.RELATED).addComponent(btnPlay, GroupLayout.PREFERRED_SIZE, 56, GroupLayout.PREFERRED_SIZE)).addGroup(jpUploadLayout.createSequentialGroup().addComponent(chkPublic).addPreferredGap(ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addComponent(jLabel8).addPreferredGap(ComponentPlacement.RELATED).addComponent(btnAccount)).addGroup(jpUploadLayout.createSequentialGroup().addGroup(jpUploadLayout.createParallelGroup(Alignment.LEADING).addGroup(jpUploadLayout.createSequentialGroup().addComponent(jLabel2).addGap(0, 0, Short.MAX_VALUE)).addComponent(txtUrl, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)).addPreferredGap(ComponentPlacement.RELATED).addComponent(btnCopy)).addGroup(jpUploadLayout.createSequentialGroup().addGroup(jpUploadLayout.createParallelGroup(Alignment.LEADING).addComponent(jLabel3).addGroup(jpUploadLayout.createSequentialGroup().addComponent(txtTitle, GroupLayout.PREFERRED_SIZE, 427, GroupLayout.PREFERRED_SIZE).addPreferredGap(ComponentPlacement.RELATED).addComponent(btnUpload, GroupLayout.PREFERRED_SIZE, 65, GroupLayout.PREFERRED_SIZE)).addComponent(jLabel1)).addGap(0, 0, Short.MAX_VALUE))).addContainerGap()).addComponent(jPanel3, GroupLayout.DEFAULT_SIZE, 522, Short.MAX_VALUE));
    jpUploadLayout.setVerticalGroup(jpUploadLayout.createParallelGroup(Alignment.LEADING).addGroup(jpUploadLayout.createSequentialGroup().addComponent(jPanel3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE).addPreferredGap(ComponentPlacement.RELATED).addComponent(jLabel2).addPreferredGap(ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addGroup(jpUploadLayout.createParallelGroup(Alignment.BASELINE).addComponent(txtUrl, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE).addComponent(btnCopy, GroupLayout.PREFERRED_SIZE, 17, GroupLayout.PREFERRED_SIZE)).addGap(7, 7, 7).addComponent(jLabel1).addPreferredGap(ComponentPlacement.RELATED).addGroup(jpUploadLayout.createParallelGroup(Alignment.TRAILING).addComponent(txtTitle, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE).addComponent(btnUpload)).addGap(21, 21, 21).addComponent(jLabel3).addPreferredGap(ComponentPlacement.RELATED).addComponent(jScrollPane2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE).addGap(18, 18, 18).addGroup(jpUploadLayout.createParallelGroup(Alignment.TRAILING).addComponent(lblUploadMessage).addComponent(pbEncoding, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)).addGap(18, 18, 18).addGroup(jpUploadLayout.createParallelGroup(Alignment.LEADING).addGroup(jpUploadLayout.createSequentialGroup().addComponent(chkAutoUpload).addPreferredGap(ComponentPlacement.UNRELATED).addComponent(chkPublic)).addComponent(btnSaveAs).addGroup(jpUploadLayout.createSequentialGroup().addComponent(btnPlay).addPreferredGap(ComponentPlacement.RELATED).addGroup(jpUploadLayout.createParallelGroup(Alignment.BASELINE).addComponent(jLabel8).addComponent(btnAccount, GroupLayout.PREFERRED_SIZE, 17, GroupLayout.PREFERRED_SIZE)))).addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    recorderPanelBG1.setBackground(new Color(255, 255, 255));
    recorderPanelBG1.setMaximumSize(new Dimension(276, 62));
    recorderPanelBG1.setMinimumSize(new Dimension(276, 62));
    recorderPanelBG1.setPreferredSize(new Dimension(276, 62));
    // NOI18N
    jButton1.setIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/close_normal.png")));
    jButton1.setBorderPainted(false);
    jButton1.setContentAreaFilled(false);
    jButton1.setFocusPainted(false);
    jButton1.setFocusable(false);
    jButton1.setMaximumSize(new Dimension(42, 17));
    jButton1.setMinimumSize(new Dimension(42, 17));
    jButton1.setPreferredSize(new Dimension(42, 17));
    // NOI18N
    jButton1.setRolloverIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/close_hover.png")));
    jButton1.addActionListener(formListener);
    // NOI18N
    jButton2.setIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/minimize_normal.png")));
    jButton2.setBorderPainted(false);
    jButton2.setContentAreaFilled(false);
    jButton2.setDefaultCapable(false);
    jButton2.setFocusPainted(false);
    jButton2.setFocusable(false);
    jButton2.setMaximumSize(new Dimension(21, 17));
    jButton2.setMinimumSize(new Dimension(21, 17));
    jButton2.setPreferredSize(new Dimension(21, 17));
    // NOI18N
    jButton2.setRolloverIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/minimize_hover.png")));
    jButton2.addActionListener(formListener);
    // NOI18N
    jLabel5.setFont(new Font("Arial", 1, 13));
    jLabel5.setForeground(new Color(255, 255, 255));
    jLabel5.setText("Ready");
    jLabel5.setMaximumSize(new Dimension(27, 148));
    // NOI18N
    jToggleButton1.setIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/record-area-btn_normal.png")));
    jToggleButton1.setToolTipText("Capture part of the screen");
    jToggleButton1.setBorderPainted(false);
    jToggleButton1.setContentAreaFilled(false);
    // NOI18N
    jToggleButton1.setDisabledIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/record-area-btn_unavailable.png")));
    // NOI18N
    jToggleButton1.setDisabledSelectedIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/record-area-btn_unavailable.png")));
    jToggleButton1.setMaximumSize(new Dimension(66, 40));
    jToggleButton1.setMinimumSize(new Dimension(66, 40));
    jToggleButton1.setPreferredSize(new Dimension(66, 40));
    // NOI18N
    jToggleButton1.setRolloverIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/record-area-btn_hover.png")));
    // NOI18N
    jToggleButton1.setRolloverSelectedIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/record-area-btn_active.png")));
    // NOI18N
    jToggleButton1.setSelectedIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/record-area-btn_active.png")));
    jToggleButton1.addActionListener(formListener);
    // NOI18N
    jToggleButton2.setIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/full-screen-record-btn_normal.png")));
    jToggleButton2.setToolTipText("Capture entire screen");
    jToggleButton2.setBorderPainted(false);
    jToggleButton2.setContentAreaFilled(false);
    // NOI18N
    jToggleButton2.setDisabledIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/full-screen-record-btn_unavailable.png")));
    // NOI18N
    jToggleButton2.setDisabledSelectedIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/full-screen-record-btn_unavailable.png")));
    jToggleButton2.setMaximumSize(new Dimension(66, 40));
    jToggleButton2.setMinimumSize(new Dimension(66, 40));
    jToggleButton2.setPreferredSize(new Dimension(66, 40));
    // NOI18N
    jToggleButton2.setRolloverIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/full-screen-record-btn_hover.png")));
    // NOI18N
    jToggleButton2.setRolloverSelectedIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/full-screen-record-btn_active.png")));
    // NOI18N
    jToggleButton2.setSelectedIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/full-screen-record-btn_active.png")));
    jToggleButton2.addActionListener(formListener);
    // NOI18N
    jLabel6.setFont(new Font("Arial", 0, 26));
    jLabel6.setForeground(new Color(148, 148, 148));
    jLabel6.setText("00:00");
    // NOI18N
    jToggleButton3.setIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/record-btn_normal.png")));
    jToggleButton3.setToolTipText("Record");
    jToggleButton3.setBorderPainted(false);
    jToggleButton3.setContentAreaFilled(false);
    // NOI18N
    jToggleButton3.setDisabledIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/record-btn_unavailable.png")));
    // NOI18N
    jToggleButton3.setDisabledSelectedIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/record-btn_unavailable.png")));
    jToggleButton3.setMaximumSize(new Dimension(66, 40));
    jToggleButton3.setMinimumSize(new Dimension(66, 40));
    jToggleButton3.setPreferredSize(new Dimension(66, 40));
    // NOI18N
    jToggleButton3.setRolloverIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/record-btn_hover.png")));
    // NOI18N
    jToggleButton3.setSelectedIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/record-btn_active.png")));
    jToggleButton3.addActionListener(formListener);
    soundBar1.setBorderPainted(false);
    soundBar1.setFocusable(false);
    // NOI18N
    jToggleButton4.setIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/pause-btn_normal.png")));
    jToggleButton4.setToolTipText("Pause");
    jToggleButton4.setBorderPainted(false);
    jToggleButton4.setContentAreaFilled(false);
    // NOI18N
    jToggleButton4.setDisabledIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/pause-btn_unavailable.png")));
    // NOI18N
    jToggleButton4.setDisabledSelectedIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/pause-btn_unavailable.png")));
    jToggleButton4.setEnabled(false);
    jToggleButton4.setMaximumSize(new Dimension(66, 40));
    jToggleButton4.setMinimumSize(new Dimension(66, 40));
    jToggleButton4.setPreferredSize(new Dimension(66, 40));
    // NOI18N
    jToggleButton4.setRolloverIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/pause-btn_hover.png")));
    // NOI18N
    jToggleButton4.setSelectedIcon(new ImageIcon(getClass().getResource("/com/bixly/pastevid/resources/sb/recorder3/pause-btn_normal.png")));
    jToggleButton4.addActionListener(formListener);
    GroupLayout recorderPanelBG1Layout = new GroupLayout(recorderPanelBG1);
    recorderPanelBG1.setLayout(recorderPanelBG1Layout);
    recorderPanelBG1Layout.setHorizontalGroup(recorderPanelBG1Layout.createParallelGroup(Alignment.LEADING).addGroup(recorderPanelBG1Layout.createSequentialGroup().addGap(2, 2, 2).addGroup(recorderPanelBG1Layout.createParallelGroup(Alignment.LEADING).addGroup(recorderPanelBG1Layout.createSequentialGroup().addComponent(jLabel5, GroupLayout.DEFAULT_SIZE, 199, Short.MAX_VALUE).addPreferredGap(ComponentPlacement.RELATED).addComponent(jButton2, GroupLayout.PREFERRED_SIZE, 21, GroupLayout.PREFERRED_SIZE).addGap(0, 0, 0).addComponent(jButton1, GroupLayout.PREFERRED_SIZE, 42, GroupLayout.PREFERRED_SIZE).addGap(10, 10, 10)).addGroup(recorderPanelBG1Layout.createSequentialGroup().addComponent(jToggleButton2, GroupLayout.PREFERRED_SIZE, 34, GroupLayout.PREFERRED_SIZE).addGap(1, 1, 1).addComponent(jToggleButton1, GroupLayout.PREFERRED_SIZE, 34, GroupLayout.PREFERRED_SIZE).addPreferredGap(ComponentPlacement.RELATED).addComponent(jLabel6, GroupLayout.PREFERRED_SIZE, 70, GroupLayout.PREFERRED_SIZE).addGap(11, 11, 11).addComponent(soundBar1, GroupLayout.PREFERRED_SIZE, 30, GroupLayout.PREFERRED_SIZE).addGap(3, 3, 3).addComponent(jToggleButton3, GroupLayout.PREFERRED_SIZE, 34, GroupLayout.PREFERRED_SIZE).addPreferredGap(ComponentPlacement.RELATED).addComponent(jToggleButton4, GroupLayout.PREFERRED_SIZE, 34, GroupLayout.PREFERRED_SIZE).addGap(14, 14, 14)))));
    recorderPanelBG1Layout.setVerticalGroup(recorderPanelBG1Layout.createParallelGroup(Alignment.LEADING).addGroup(recorderPanelBG1Layout.createSequentialGroup().addGroup(recorderPanelBG1Layout.createParallelGroup(Alignment.LEADING).addGroup(Alignment.TRAILING, recorderPanelBG1Layout.createSequentialGroup().addGroup(recorderPanelBG1Layout.createParallelGroup(Alignment.LEADING, false).addComponent(jButton1, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addComponent(jButton2, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)).addPreferredGap(ComponentPlacement.RELATED).addGroup(recorderPanelBG1Layout.createParallelGroup(Alignment.LEADING).addComponent(jToggleButton4, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addComponent(jToggleButton3, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addComponent(jLabel6, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addComponent(jToggleButton1, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE).addComponent(jToggleButton2, Alignment.TRAILING, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE).addComponent(soundBar1, Alignment.TRAILING, GroupLayout.PREFERRED_SIZE, 29, GroupLayout.PREFERRED_SIZE))).addGroup(recorderPanelBG1Layout.createSequentialGroup().addGap(3, 3, 3).addComponent(jLabel5, GroupLayout.PREFERRED_SIZE, 17, GroupLayout.PREFERRED_SIZE).addGap(0, 0, Short.MAX_VALUE))).addContainerGap()));
    GroupLayout layout = new GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addGroup(layout.createParallelGroup(Alignment.LEADING).addComponent(jpRecorderRec, GroupLayout.PREFERRED_SIZE, 214, GroupLayout.PREFERRED_SIZE).addComponent(jpUpload, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE).addComponent(jpRecorderNonRec, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE).addComponent(jpRecorderBackup, GroupLayout.PREFERRED_SIZE, 324, GroupLayout.PREFERRED_SIZE).addComponent(recorderPanelBG1, GroupLayout.PREFERRED_SIZE, 286, GroupLayout.PREFERRED_SIZE)).addGap(5, 5, 5)));
    layout.setVerticalGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addComponent(jpUpload, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE).addPreferredGap(ComponentPlacement.RELATED).addComponent(jpRecorderNonRec, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE).addPreferredGap(ComponentPlacement.RELATED).addComponent(jpRecorderRec, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE).addPreferredGap(ComponentPlacement.RELATED).addComponent(jpRecorderBackup, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE).addPreferredGap(ComponentPlacement.RELATED).addComponent(recorderPanelBG1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE).addGap(0, 0, 0)));
}
Also used : JScrollPane(javax.swing.JScrollPane) JPanel(javax.swing.JPanel) ImageIcon(javax.swing.ImageIcon) JTextArea(javax.swing.JTextArea) Insets(java.awt.Insets) Color(java.awt.Color) JButton(javax.swing.JButton) JProgressBar(javax.swing.JProgressBar) JLabel(javax.swing.JLabel) Dimension(java.awt.Dimension) JRoundedPanel(com.bixly.pastevid.util.view.JRoundedPanel) JTextField(javax.swing.JTextField) AbsoluteLayout(org.netbeans.lib.awtextra.AbsoluteLayout) Font(java.awt.Font) AbsoluteConstraints(org.netbeans.lib.awtextra.AbsoluteConstraints) JCheckBox(javax.swing.JCheckBox) JToggleButton(javax.swing.JToggleButton) GroupLayout(javax.swing.GroupLayout)

Example 35 with JToggleButton

use of javax.swing.JToggleButton in project ats-framework by Axway.

the class SwingElementLocator method buildLocator.

private static <T extends Component> GenericTypeMatcher<T> buildLocator(Class<T> componentClass, final UiElementProperties properties, boolean requireVisible, final String[] propertyNamesToUseForMatch) {
    // nested class not to be anonymous in stack traces
    class MyGenericTypeMatcher<Type1 extends Component> extends GenericTypeMatcher<Type1> {

        private int currentIndex = 0;

        public MyGenericTypeMatcher(Class<Type1> componentClass, boolean requireVisible) {
            super(componentClass, requireVisible);
        }

        /**
             * In addition to the type check in constructor adds check by other component properties
             * @param component
             * @return
             */
        @Override
        protected boolean isMatching(Component component) {
            // here we are sure that we do not search by label and
            // also property "visible" and class are tracked additionally by FEST
            // Having several properties means match ALL of them
            int propertiesMatching = 0;
            int currentPropIdxToProcess = 0;
            for (currentPropIdxToProcess = 0; currentPropIdxToProcess < propertyNamesToUseForMatch.length; currentPropIdxToProcess++) {
                String keyName = propertyNamesToUseForMatch[currentPropIdxToProcess];
                if ("visible".equals(keyName) || "class".equals(keyName)) {
                    // already considered as parameter in search
                    propertiesMatching++;
                    continue;
                }
                String propertyValue = properties.getProperty(keyName);
                if (propertyValue != null) {
                    if ("name".equals(keyName)) {
                        if (propertyValue.equals(component.getName())) {
                            propertiesMatching++;
                            log.debug("Found element with 'name' property: " + component);
                            continue;
                        } else {
                            return false;
                        }
                    } else if ("text".equals(keyName)) {
                        // Search by specific component properties
                        if (component instanceof JButton) {
                            JButton button = (JButton) component;
                            if (propertyValue.equals(button.getText())) {
                                propertiesMatching++;
                                log.debug("Found element by 'text' property: " + button);
                                continue;
                            } else {
                                return false;
                            }
                        } else if (component instanceof JMenuItem) {
                            JMenuItem menuItem = (JMenuItem) component;
                            if (propertyValue.equals(menuItem.getText())) {
                                log.debug("Found element by 'text' property: " + menuItem);
                                propertiesMatching++;
                                continue;
                            } else {
                                return false;
                            }
                        } else if (component instanceof JPopupMenu) {
                            JPopupMenu popupMenu = (JPopupMenu) component;
                            if (propertyValue.equals(popupMenu.getLabel())) {
                                log.debug("Found element by 'text' property: " + popupMenu);
                                propertiesMatching++;
                                continue;
                            } else {
                                return false;
                            }
                        } else if (component instanceof JToggleButton) {
                            JToggleButton toggleButton = (JToggleButton) component;
                            if (propertyValue.equals(toggleButton.getText())) {
                                log.debug("Found element by 'text' property: " + toggleButton);
                                propertiesMatching++;
                                continue;
                            } else {
                                return false;
                            }
                        } else if (component instanceof JTextComponent) {
                            JTextComponent textComponent = (JTextComponent) component;
                            if (propertyValue.equals(textComponent.getText())) {
                                log.debug("Found element by 'text' property: " + textComponent);
                                propertiesMatching++;
                                continue;
                            } else {
                                return false;
                            }
                        } else if (component instanceof JLabel) {
                            JLabel label = (JLabel) component;
                            if (propertyValue.equals(label.getText())) {
                                log.debug("Found element by 'text' property: " + label);
                                propertiesMatching++;
                                continue;
                            }
                        }
                        // Attempt to search for 'text' for unsupported component type
                        return false;
                    } else if ("tooltip".equals(keyName)) {
                        // Search by specific component properties
                        if (component instanceof JButton) {
                            JButton button = (JButton) component;
                            if (propertyValue.equals(button.getToolTipText())) {
                                propertiesMatching++;
                                log.debug("Found element by 'tooltip' property: " + button);
                                continue;
                            } else {
                                return false;
                            }
                        }
                    } else if ("index".equals(keyName)) {
                        if (Integer.parseInt(propertyValue) == currentIndex++) {
                            propertiesMatching++;
                            continue;
                        }
                    } else {
                        throw new IllegalStateException("Attempt to search for not supported property: " + keyName + ", component: " + component);
                    }
                }
            // if property != null
            }
            if (propertyNamesToUseForMatch.length == propertiesMatching) {
                return true;
            } else {
                if (propertiesMatching > 0 && log.isDebugEnabled()) {
                    log.debug("Not all properties matched. Only " + propertiesMatching + " instead of " + properties.getPropertiesSize());
                }
                return false;
            }
        }
    }
    return new MyGenericTypeMatcher<T>(componentClass, requireVisible);
}
Also used : JButton(javax.swing.JButton) JLabel(javax.swing.JLabel) JTextComponent(javax.swing.text.JTextComponent) GenericTypeMatcher(org.fest.swing.core.GenericTypeMatcher) JPopupMenu(javax.swing.JPopupMenu) JToggleButton(javax.swing.JToggleButton) Component(java.awt.Component) JTextComponent(javax.swing.text.JTextComponent) JMenuItem(javax.swing.JMenuItem)

Aggregations

JToggleButton (javax.swing.JToggleButton)59 ActionEvent (java.awt.event.ActionEvent)21 ActionListener (java.awt.event.ActionListener)21 ImageIcon (javax.swing.ImageIcon)20 JPanel (javax.swing.JPanel)19 JLabel (javax.swing.JLabel)16 Dimension (java.awt.Dimension)14 JButton (javax.swing.JButton)13 Insets (java.awt.Insets)11 JScrollPane (javax.swing.JScrollPane)8 ChangeEvent (javax.swing.event.ChangeEvent)8 ChangeListener (javax.swing.event.ChangeListener)8 GridBagLayout (java.awt.GridBagLayout)7 BoxLayout (javax.swing.BoxLayout)7 GridBagConstraints (java.awt.GridBagConstraints)6 JCheckBox (javax.swing.JCheckBox)6 JSlider (javax.swing.JSlider)6 JTabbedPane (javax.swing.JTabbedPane)6 Component (java.awt.Component)5 GridLayout (java.awt.GridLayout)5