Example usage for java.awt Cursor getPredefinedCursor

List of usage examples for java.awt Cursor getPredefinedCursor

Introduction

In this page you can find the example usage for java.awt Cursor getPredefinedCursor.

Prototype

public static Cursor getPredefinedCursor(int type) 

Source Link

Document

Returns a cursor object with the specified predefined type.

Usage

From source file:org.sleuthkit.autopsy.casemodule.Case.java

/**
 * TODO: Deprecate this and throw a more general exception.
 *//*from  w  ww  .  ja  va 2s  . c  o m*/
public static void open(String caseMetadataFilePath) throws CaseActionException {

    if (!caseMetadataFilePath.endsWith(CASE_DOT_EXTENSION)) {
        throw new CaseActionException(
                NbBundle.getMessage(Case.class, "Case.open.exception.checkFile.msg", CASE_DOT_EXTENSION));
    }

    logger.log(Level.INFO, "Opening case, case metadata file path: {0}", caseMetadataFilePath); //NON-NLS
    try {
        /**
         * Get the case metadata from the file.
         */
        CaseMetadata metadata = new CaseMetadata(Paths.get(caseMetadataFilePath));
        String caseName = metadata.getCaseName();
        String caseNumber = metadata.getCaseNumber();
        String examiner = metadata.getExaminer();
        CaseType caseType = metadata.getCaseType();
        String caseDir = metadata.getCaseDirectory();

        /**
         * Open the case database.
         */
        SleuthkitCase db;
        if (caseType == CaseType.SINGLE_USER_CASE) {
            String dbPath = Paths.get(caseDir, "autopsy.db").toString(); //NON-NLS
            db = SleuthkitCase.openCase(dbPath);
        } else {
            if (!UserPreferences.getIsMultiUserModeEnabled()) {
                throw new CaseActionException(
                        NbBundle.getMessage(Case.class, "Case.open.exception.multiUserCaseNotEnabled"));
            }
            try {
                db = SleuthkitCase.openCase(metadata.getCaseDatabaseName(),
                        UserPreferences.getDatabaseConnectionInfo(), caseDir);
            } catch (UserPreferencesException ex) {
                logger.log(Level.SEVERE, "Error accessing case database connection info", ex); //NON-NLS
                throw new CaseActionException(
                        NbBundle.getMessage(Case.class, "Case.databaseConnectionInfo.error.msg"), ex);
            }
        }

        /**
         * Do things that require a UI.
         */
        if (RuntimeProperties.coreComponentsAreActive()) {
            /**
             * If the case database was upgraded for a new schema, notify
             * the user.
             */
            if (null != db.getBackupDatabasePath()) {
                SwingUtilities.invokeLater(() -> {
                    JOptionPane.showMessageDialog(null,
                            NbBundle.getMessage(Case.class, "Case.open.msgDlg.updated.msg",
                                    db.getBackupDatabasePath()),
                            NbBundle.getMessage(Case.class, "Case.open.msgDlg.updated.title"),
                            JOptionPane.INFORMATION_MESSAGE);
                });
            }

            /**
             * TODO: This currently has no value if it there is no user to
             * interact with a fid missing images dialog.
             */
            checkImagesExist(db);
        }

        /**
         * Two-stage initialization to avoid leaking reference to "this" in
         * constructor. TODO: Remove use of obsolete XMLCaseManagement
         * class.
         */
        XMLCaseManagement xmlcm = new XMLCaseManagement();
        xmlcm.open(caseMetadataFilePath);
        Case openedCase = new Case(caseName, caseNumber, examiner, caseMetadataFilePath, xmlcm, db, caseType);
        changeCase(openedCase);

    } catch (CaseMetadataException ex) {
        /**
         * Clean-up the case if it was actually opened. TODO: Do this
         * better.
         */
        try {
            Case badCase = Case.getCurrentCase();
            badCase.closeCase();
        } catch (IllegalStateException unused) {
            // Already logged.
        }
        throw new CaseActionException(
                NbBundle.getMessage(Case.class, "Case.open.exception.gen.msg") + ": " + ex.getMessage(), ex); //NON-NLS
    } catch (TskCoreException ex) {
        try {
            Case badCase = Case.getCurrentCase();
            badCase.closeCase();
        } catch (CaseActionException | IllegalStateException unused) {
            // Already logged.
        }
        SwingUtilities.invokeLater(() -> {
            WindowManager.getDefault().getMainWindow()
                    .setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
        });
        throw new CaseActionException(ex.getMessage(), ex); //NON-NLS
    }
}

From source file:org.openmicroscopy.shoola.agents.treeviewer.browser.BrowserComponent.java

/**
 * Implemented as specified by the {@link Browser} interface.
 * @see Browser#sortTreeNodes(int)/*from  w w  w  .j a va  2s.c om*/
 */
public void sortTreeNodes(int sortType) {
    switch (model.getState()) {
    //case COUNTING_ITEMS:
    case LOADING_DATA:
    case LOADING_LEAVES:
    case DISCARDED:
        throw new IllegalStateException(
                "This method cannot be invoked in the LOADING_DATA, " + " LOADING_LEAVES or DISCARDED state.");
    }
    switch (sortType) {
    case SORT_NODES_BY_DATE:
    case SORT_NODES_BY_NAME:
        break;
    default:
        throw new IllegalArgumentException("SortType not supported.");
    }
    view.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
    view.sortNodes(sortType);
    view.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
}

From source file:ca.phon.app.project.ProjectWindow.java

private MultiActionButton createNewSessionButton() {
    MultiActionButton retVal = new MultiActionButton();

    ImageIcon newIcn = IconManager.getInstance().getIcon("mimetypes/text-xml", IconSize.SMALL);
    ImageIcon newIcnL = IconManager.getInstance().getIcon("actions/list-add", IconSize.MEDIUM);
    ImageIcon removeIcnL = IconManager.getInstance().getIcon("actions/list-remove", IconSize.MEDIUM);
    ImageIcon renameIcnL = IconManager.getInstance().getIcon("actions/edit-rename", IconSize.MEDIUM);
    ImageIcon openIcnL = IconManager.getInstance().getIcon("actions/view", IconSize.MEDIUM);

    String s1 = "Session";

    retVal.getTopLabel().setText(WorkspaceTextStyler.toHeaderText(s1));
    retVal.getTopLabel().setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 0));
    retVal.getTopLabel().setFont(FontPreferences.getTitleFont());
    retVal.getTopLabel().setIcon(newIcn);
    retVal.setOpaque(false);/*ww w  . j av a2 s . c o m*/

    PhonUIAction newAct = new PhonUIAction(this, "onSwapNewAndCreateSession", retVal);
    newAct.putValue(Action.LARGE_ICON_KEY, newIcnL);
    newAct.putValue(Action.SMALL_ICON, newIcn);
    newAct.putValue(Action.NAME, "New session");
    newAct.putValue(Action.SHORT_DESCRIPTION, "Create a new session in selected corpus");
    retVal.setDefaultAction(newAct);

    DeleteSessionAction deleteCurrentAct = new DeleteSessionAction(this);
    deleteCurrentAct.putValue(Action.LARGE_ICON_KEY, removeIcnL);

    PhonUIAction renameCurrentAct = new PhonUIAction(this, "onRenameSession");
    renameCurrentAct.putValue(Action.LARGE_ICON_KEY, renameIcnL);
    renameCurrentAct.putValue(Action.NAME, "Rename session");
    renameCurrentAct.putValue(Action.SHORT_DESCRIPTION, "Rename selected session");

    PhonUIAction openCurrentAct = new PhonUIAction(this, "onOpenSession");
    openCurrentAct.putValue(Action.LARGE_ICON_KEY, openIcnL);
    openCurrentAct.putValue(Action.NAME, "Open session");
    openCurrentAct.putValue(Action.SHORT_DESCRIPTION, "Open selected session");

    retVal.setDisplayDefaultAction(true);
    retVal.addAction(deleteCurrentAct);
    retVal.addAction(renameCurrentAct);
    retVal.addAction(openCurrentAct);

    retVal.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));

    return retVal;
}

From source file:jhplot.gui.GHPanel.java

/**
 * Print the canvas//from  w  w w. j a  va  2s .co  m
 * 
 */
public void printGraph() {

    if (isBorderShown())
        showBorders(false);
    CanvasPanel.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
    Thread t = new Thread() {
        public void run() {
            try {
                PrinterJob prnJob = PrinterJob.getPrinterJob();
                // set the Printable to the PrinterJob
                prnJob.setPrintable(new Printable() {
                    public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) {
                        if (pageIndex == 0) {
                            Graphics2D g2d = (Graphics2D) graphics;
                            double ratioX = pageFormat.getImageableWidth() / CanvasPanel.getSize().width;
                            double ratioY = pageFormat.getImageableHeight() / CanvasPanel.getSize().height;
                            double factor = Math.min(ratioX, ratioY);
                            g2d.scale(factor, factor);
                            g2d.translate(pageFormat.getImageableX(), pageFormat.getImageableY());
                            disableDoubleBuffering(CanvasPanel);
                            CanvasPanel.print(g2d);
                            enableDoubleBuffering(CanvasPanel);
                            return Printable.PAGE_EXISTS;
                        }
                        return Printable.NO_SUCH_PAGE;
                    }
                });

                if (prnJob.printDialog()) {
                    JHPlot.showStatusBarText("Printing..");
                    prnJob.print();
                }
            } catch (PrinterException e) {
                e.printStackTrace();
            }
        }
    };
    t.start();
    CanvasPanel.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
}

From source file:op.care.supervisor.PnlHandover.java

private void createContentPanel4Day(final LocalDate day, final CollapsiblePane cpDay) {

    final JPanel dayPanel = new JPanel(new VerticalLayout());

    OPDE.getDisplayManager().setProgressBarMessage(new DisplayMessage(SYSTools.xx("misc.msg.wait"), -1, 100));
    OPDE.getMainframe().setBlocked(true);

    SwingWorker worker = new SwingWorker() {

        @Override/*w  ww  .j  av a  2s. c o m*/
        protected Object doInBackground() throws Exception {

            //                final JPanel dayPanel = new JPanel(new VerticalLayout());
            dayPanel.setOpaque(false);

            ArrayList<Handovers> listHO = HandoversTools.getBy(day, (Homes) cmbHomes.getSelectedItem());
            ArrayList<NReport> listNR = NReportTools.getNReports4Handover(day,
                    (Homes) cmbHomes.getSelectedItem());

            Collections.sort(listNR, myComparator);

            int max = listHO.size() + listNR.size();
            int i = 0; // for zebra pattern and progress
            for (final Handovers handover : listHO) {
                OPDE.getDisplayManager()
                        .setProgressBarMessage(new DisplayMessage(SYSTools.xx("misc.msg.wait"), i, max));

                String title = "<html><table border=\"0\">" + "<tr valign=\"top\">"
                        + "<td width=\"100\" align=\"left\">"
                        + DateFormat.getTimeInstance(DateFormat.SHORT).format(handover.getPit()) + " "
                        + SYSTools.xx("misc.msg.Time.short") + "</td>"
                        + "<td width=\"100\" align=\"center\">--</td>" + "<td width=\"400\" align=\"left\">"
                        + handover.getText() + "</td>" +

                        "<td width=\"100\" align=\"left\">" + handover.getUser().getFullname() + "</td>"
                        + "</tr>" + "</table>" + "</html>";

                final DefaultCPTitle pnlSingle = new DefaultCPTitle(SYSTools.toHTMLForScreen(title),
                        new ActionListener() {
                            @Override
                            public void actionPerformed(ActionEvent evt) {
                                EntityManager em = OPDE.createEM();
                                if (Handover2UserTools.containsUser(em, handover, OPDE.getLogin().getUser())) {
                                    em.close();
                                    return;
                                }
                                try {
                                    em.getTransaction().begin();
                                    Handovers myHO = em.merge(handover);
                                    Handover2User connObj = em.merge(
                                            new Handover2User(myHO, em.merge(OPDE.getLogin().getUser())));
                                    myHO.getUsersAcknowledged().add(connObj);
                                    em.getTransaction().commit();

                                    createCP4Day(day);
                                    buildPanel();

                                } catch (OptimisticLockException ole) {
                                    OPDE.warn(ole);
                                    if (em.getTransaction().isActive()) {
                                        em.getTransaction().rollback();
                                    }
                                    if (ole.getMessage().indexOf("Class> entity.info.Resident") > -1) {
                                        OPDE.getMainframe().emptyFrame();
                                        OPDE.getMainframe().afterLogin();
                                    }
                                    OPDE.getDisplayManager().addSubMessage(DisplayManager.getLockMessage());
                                } catch (Exception e) {
                                    if (em.getTransaction().isActive()) {
                                        em.getTransaction().rollback();
                                    }
                                    OPDE.fatal(e);
                                } finally {
                                    em.close();
                                }
                            }
                        });

                final JButton btnInfo = new JButton(SYSConst.icon22info);
                btnInfo.setPressedIcon(SYSConst.icon22infoPressed);
                btnInfo.setAlignmentX(Component.RIGHT_ALIGNMENT);
                btnInfo.setAlignmentY(Component.TOP_ALIGNMENT);
                btnInfo.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
                btnInfo.setContentAreaFilled(false);
                btnInfo.setBorder(null);
                btnInfo.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        OPDE.getDisplayManager().setProgressBarMessage(
                                new DisplayMessage(SYSTools.xx("misc.msg.wait"), -1, 100));
                        OPDE.getMainframe().setBlocked(true);

                        SwingWorker worker = new SwingWorker() {

                            @Override
                            protected Object doInBackground() throws Exception {
                                SYSFilesTools.print(Handover2UserTools.getAsHTML(handover), false);
                                return null;
                            }

                            @Override
                            protected void done() {
                                try {
                                    get();
                                } catch (Exception ex1) {
                                    OPDE.fatal(ex1);
                                }
                                OPDE.getDisplayManager().setProgressBarMessage(null);
                                OPDE.getMainframe().setBlocked(false);
                            }

                        };
                        worker.execute();

                    }
                });
                pnlSingle.getRight().add(btnInfo);

                EntityManager em = OPDE.createEM();
                pnlSingle.getButton()
                        .setIcon(Handover2UserTools.containsUser(em, handover, OPDE.getLogin().getUser())
                                ? SYSConst.icon22ledGreenOn
                                : SYSConst.icon22ledRedOn);
                em.close();

                pnlSingle.getButton().setVerticalTextPosition(SwingConstants.TOP);

                JPanel zebra = new JPanel();
                zebra.setLayout(new BoxLayout(zebra, BoxLayout.LINE_AXIS));
                zebra.setOpaque(true);
                if (i % 2 == 0) {
                    zebra.setBackground(SYSConst.orange1[SYSConst.light2]);
                } else {
                    zebra.setBackground(Color.WHITE);
                }
                zebra.add(pnlSingle.getMain());
                i++;
                dayPanel.add(zebra);
            }
            for (final NReport nreport : listNR) {
                OPDE.getDisplayManager()
                        .setProgressBarMessage(new DisplayMessage(SYSTools.xx("misc.msg.wait"), i, max));

                String title = "<html><table border=\"0\">" + "<tr valign=\"top\">"
                        + "<td width=\"100\" align=\"left\">"
                        + DateFormat.getTimeInstance(DateFormat.SHORT).format(nreport.getPit()) + " "
                        + SYSTools.xx("misc.msg.Time.short") + "<br/>" + nreport.getMinutes() + " "
                        + SYSTools.xx("misc.msg.Minute(s)") + "</td>" + "<td width=\"100\" align=\"left\">"
                        + ResidentTools.getTextCompact(nreport.getResident()) + "</td>"
                        + "<td width=\"400\" align=\"left\">" + nreport.getText() + "</td>" +

                        "<td width=\"100\" align=\"left\">" + nreport.getUser().getFullname() + "</td>"
                        + "</tr>" + "</table>" + "</html>";

                final DefaultCPTitle pnlSingle = new DefaultCPTitle(SYSTools.toHTMLForScreen(title),
                        new ActionListener() {
                            @Override
                            public void actionPerformed(ActionEvent evt) {
                                EntityManager em = OPDE.createEM();
                                if (NR2UserTools.containsUser(em, nreport, OPDE.getLogin().getUser())) {
                                    em.close();
                                    return;
                                }

                                try {
                                    em.getTransaction().begin();
                                    NReport myNR = em.merge(nreport);
                                    NR2User connObj = em
                                            .merge(new NR2User(myNR, em.merge(OPDE.getLogin().getUser())));
                                    myNR.getUsersAcknowledged().add(connObj);
                                    em.getTransaction().commit();
                                    createCP4Day(day);
                                    buildPanel();
                                } catch (OptimisticLockException ole) {
                                    OPDE.warn(ole);
                                    if (em.getTransaction().isActive()) {
                                        em.getTransaction().rollback();
                                    }
                                    if (ole.getMessage().indexOf("Class> entity.info.Resident") > -1) {
                                        OPDE.getMainframe().emptyFrame();
                                        OPDE.getMainframe().afterLogin();
                                    }
                                    OPDE.getDisplayManager().addSubMessage(DisplayManager.getLockMessage());
                                } catch (Exception e) {
                                    if (em.getTransaction().isActive()) {
                                        em.getTransaction().rollback();
                                    }
                                    OPDE.fatal(e);
                                } finally {
                                    em.close();
                                }
                            }
                        });

                final JButton btnInfo = new JButton(SYSConst.icon22info);
                btnInfo.setPressedIcon(SYSConst.icon22infoPressed);
                btnInfo.setAlignmentX(Component.RIGHT_ALIGNMENT);
                btnInfo.setAlignmentY(Component.TOP_ALIGNMENT);
                btnInfo.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
                btnInfo.setContentAreaFilled(false);
                btnInfo.setBorder(null);
                btnInfo.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {

                        SYSFilesTools.print(NR2UserTools.getAsHTML(nreport), false);

                        //                            OPDE.getDisplayManager().setProgressBarMessage(new DisplayMessage(SYSTools.xx("misc.msg.wait"), -1, 100));
                        //                            OPDE.getMainframe().setBlocked(true);
                        //
                        //                            SwingWorker worker = new SwingWorker() {
                        //
                        //                                @Override
                        //                                protected Object doInBackground() throws Exception {
                        //
                        //                                    return null;
                        //                                }
                        //
                        //                                @Override
                        //                                protected void done() {
                        //                                    OPDE.getDisplayManager().setProgressBarMessage(null);
                        //                                    OPDE.getMainframe().setBlocked(false);
                        //                                }
                        //
                        //                            };
                        //                            worker.execute();

                    }
                });
                pnlSingle.getRight().add(btnInfo);

                EntityManager em = OPDE.createEM();
                pnlSingle.getButton()
                        .setIcon(NR2UserTools.containsUser(em, nreport, OPDE.getLogin().getUser())
                                ? SYSConst.icon22ledGreenOn
                                : SYSConst.icon22ledRedOn);
                em.close();

                pnlSingle.getButton().setVerticalTextPosition(SwingConstants.TOP);

                JPanel zebra = new JPanel();
                zebra.setLayout(new BoxLayout(zebra, BoxLayout.LINE_AXIS));
                zebra.setOpaque(true);
                if (i % 2 == 0) {
                    zebra.setBackground(SYSConst.orange1[SYSConst.light2]);
                } else {
                    zebra.setBackground(Color.WHITE);
                }
                zebra.add(pnlSingle.getMain());
                i++;

                dayPanel.add(zebra);
            }
            final String key = DateFormat.getDateInstance().format(day.toDate());
            synchronized (cacheHO) {
                cacheHO.put(key, listHO);
            }
            synchronized (cacheNR) {
                cacheNR.put(key, listNR);
            }
            return null;

        }

        @Override
        protected void done() {
            try {
                get();
            } catch (Exception ex2) {
                OPDE.fatal(ex2);
            }
            cpDay.setContentPane(dayPanel);
            OPDE.getDisplayManager().setProgressBarMessage(null);
            OPDE.getMainframe().setBlocked(false);
        }
    };
    worker.execute();

}

From source file:com.mirth.connect.plugins.httpauth.HttpAuthConnectorPropertiesPanel.java

private void initComponents() {
    setBackground(UIConstants.BACKGROUND_COLOR);

    typeLabel = new JLabel("Authentication Type:");
    typeLabel.setHorizontalAlignment(SwingConstants.RIGHT);

    typeComboBox = new MirthComboBox();
    typeComboBox.setModel(new DefaultComboBoxModel<AuthType>(AuthType.values()));
    typeComboBox.addActionListener(new ActionListener() {
        @Override//from   ww  w .  jav a  2 s  . c  o m
        public void actionPerformed(ActionEvent evt) {
            authTypeChanged();
        }
    });
    typeComboBox.setToolTipText("Select the type of HTTP authentication to perform for incoming requests.");

    basicRealmLabel = new JLabel("Realm:");
    basicRealmField = new MirthTextField();
    basicRealmField.setToolTipText("The protection space for this server.");
    basicCredentialsLabel = new JLabel("Credentials:");

    basicCredentialsPanel = new JPanel();
    basicCredentialsPanel.setBackground(getBackground());

    basicCredentialsTable = new MirthTable();
    basicCredentialsTable.setModel(new RefreshTableModel(new String[] { "Username", "Password" }, 0));
    basicCredentialsTable.setCustomEditorControls(true);
    basicCredentialsTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    basicCredentialsTable.setRowSelectionAllowed(true);
    basicCredentialsTable.setRowHeight(UIConstants.ROW_HEIGHT);
    basicCredentialsTable.setDragEnabled(false);
    basicCredentialsTable.setOpaque(true);
    basicCredentialsTable.setSortable(false);
    basicCredentialsTable.getTableHeader().setReorderingAllowed(false);
    basicCredentialsTable.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
    basicCredentialsTable.setToolTipText(
            "<html>Username and password pairs to authenticate<br/>users with. At least one pair is required.</html>");

    if (Preferences.userNodeForPackage(Mirth.class).getBoolean("highlightRows", true)) {
        Highlighter highlighter = HighlighterFactory.createAlternateStriping(UIConstants.HIGHLIGHTER_COLOR,
                UIConstants.BACKGROUND_COLOR);
        basicCredentialsTable.setHighlighters(highlighter);
    }

    CredentialsTableCellEditor basicCredentialsTableCellEditor = new CredentialsTableCellEditor(
            basicCredentialsTable);
    basicCredentialsTable.getColumnExt(0).setCellEditor(basicCredentialsTableCellEditor);
    basicCredentialsTable.getColumnExt(0).setToolTipText("The username to authenticate with.");
    basicCredentialsTable.getColumnExt(1).setCellRenderer(new PasswordCellRenderer());
    basicCredentialsTable.getColumnExt(1).setCellEditor(new DefaultCellEditor(new JPasswordField()));
    basicCredentialsTable.getColumnExt(1).setToolTipText("The password to authenticate with.");

    basicCredentialsTableScrollPane = new JScrollPane(basicCredentialsTable);

    basicCredentialsNewButton = new MirthButton("New");
    basicCredentialsNewButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent evt) {
            int num = 0;
            String username;
            boolean found;
            do {
                num++;
                username = "user" + num;

                found = false;
                for (int row = 0; row < basicCredentialsTable.getModel().getRowCount(); row++) {
                    if (StringUtils.equals(username,
                            (String) basicCredentialsTable.getModel().getValueAt(row, 0))) {
                        found = true;
                    }
                }
            } while (found);

            ((DefaultTableModel) basicCredentialsTable.getModel()).addRow(new String[] { username, "" });
            basicCredentialsTable.setRowSelectionInterval(basicCredentialsTable.getRowCount() - 1,
                    basicCredentialsTable.getRowCount() - 1);
            PlatformUI.MIRTH_FRAME.setSaveEnabled(true);
        }
    });

    basicCredentialsDeleteButton = new MirthButton("Delete");
    basicCredentialsDeleteButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent evt) {
            int selectedRow = getSelectedRow(basicCredentialsTable);
            if (selectedRow >= 0) {
                if (basicCredentialsTable.isEditing()) {
                    basicCredentialsTable.getCellEditor().cancelCellEditing();
                }

                ((DefaultTableModel) basicCredentialsTable.getModel()).removeRow(selectedRow);

                int rowCount = basicCredentialsTable.getRowCount();
                if (selectedRow < rowCount) {
                    basicCredentialsTable.setRowSelectionInterval(selectedRow, selectedRow);
                } else if (rowCount > 0) {
                    basicCredentialsTable.setRowSelectionInterval(rowCount - 1, rowCount - 1);
                }

                PlatformUI.MIRTH_FRAME.setSaveEnabled(true);
            }
        }
    });
    basicCredentialsTableCellEditor.setDeleteButton(basicCredentialsDeleteButton);

    digestRealmLabel = new JLabel("Realm:");
    digestRealmField = new MirthTextField();
    digestRealmField.setToolTipText("The protection space for this server.");

    digestAlgorithmLabel = new JLabel("Algorithms:");
    ButtonGroup digestAlgorithmButtonGroup = new ButtonGroup();
    String toolTipText = "<html>Specifies the digest algorithms supported by this server.<br/><b>&nbsp;- MD5:</b> The security data A1 will contain the username, realm, and password.<br/><b>&nbsp;- MD5-sess:</b> The security data A1 will also contain the server and client nonces.</html>";

    digestAlgorithmMD5Radio = new MirthRadioButton(Algorithm.MD5.toString());
    digestAlgorithmMD5Radio.setBackground(getBackground());
    digestAlgorithmMD5Radio.setToolTipText(toolTipText);
    digestAlgorithmButtonGroup.add(digestAlgorithmMD5Radio);

    digestAlgorithmMD5SessRadio = new MirthRadioButton(Algorithm.MD5_SESS.toString());
    digestAlgorithmMD5SessRadio.setBackground(getBackground());
    digestAlgorithmMD5SessRadio.setToolTipText(toolTipText);
    digestAlgorithmButtonGroup.add(digestAlgorithmMD5SessRadio);

    digestAlgorithmBothRadio = new MirthRadioButton("Both");
    digestAlgorithmBothRadio.setBackground(getBackground());
    digestAlgorithmBothRadio.setToolTipText(toolTipText);
    digestAlgorithmButtonGroup.add(digestAlgorithmBothRadio);

    digestQOPLabel = new JLabel("QOP Modes:");
    toolTipText = "<html>The quality of protection modes to support.<br/><b>&nbsp;- auth:</b> Regular auth with client nonce and count in the digest.<br/><b>&nbsp;- auth-int:</b> Same as auth, but also with message integrity protection enabled.</html>";

    digestQOPAuthCheckBox = new MirthCheckBox(QOPMode.AUTH.toString());
    digestQOPAuthCheckBox.setBackground(getBackground());
    digestQOPAuthCheckBox.setToolTipText(toolTipText);

    digestQOPAuthIntCheckBox = new MirthCheckBox(QOPMode.AUTH_INT.toString());
    digestQOPAuthIntCheckBox.setBackground(getBackground());
    digestQOPAuthIntCheckBox.setToolTipText(toolTipText);

    digestOpaqueLabel = new JLabel("Opaque:");
    digestOpaqueField = new MirthTextField();
    digestOpaqueField.setToolTipText("A string of data that should be returned by the client unchanged.");
    digestCredentialsLabel = new JLabel("Credentials:");

    digestCredentialsPanel = new JPanel();
    digestCredentialsPanel.setBackground(getBackground());

    digestCredentialsTable = new MirthTable();
    digestCredentialsTable.setModel(new RefreshTableModel(new String[] { "Username", "Password" }, 0));
    digestCredentialsTable.setCustomEditorControls(true);
    digestCredentialsTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    digestCredentialsTable.setRowSelectionAllowed(true);
    digestCredentialsTable.setRowHeight(UIConstants.ROW_HEIGHT);
    digestCredentialsTable.setDragEnabled(false);
    digestCredentialsTable.setOpaque(true);
    digestCredentialsTable.setSortable(false);
    digestCredentialsTable.getTableHeader().setReorderingAllowed(false);
    digestCredentialsTable.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
    digestCredentialsTable.setToolTipText(
            "<html>Username and password pairs to authenticate<br/>users with. At least one pair is required.</html>");

    if (Preferences.userNodeForPackage(Mirth.class).getBoolean("highlightRows", true)) {
        Highlighter highlighter = HighlighterFactory.createAlternateStriping(UIConstants.HIGHLIGHTER_COLOR,
                UIConstants.BACKGROUND_COLOR);
        digestCredentialsTable.setHighlighters(highlighter);
    }

    CredentialsTableCellEditor digestCredentialsTableCellEditor = new CredentialsTableCellEditor(
            digestCredentialsTable);
    digestCredentialsTable.getColumnExt(0).setCellEditor(digestCredentialsTableCellEditor);
    digestCredentialsTable.getColumnExt(0).setToolTipText("The username to authenticate with.");
    digestCredentialsTable.getColumnExt(1).setCellRenderer(new PasswordCellRenderer());
    digestCredentialsTable.getColumnExt(1).setCellEditor(new DefaultCellEditor(new JPasswordField()));
    digestCredentialsTable.getColumnExt(1).setToolTipText("The password to authenticate with.");

    digestCredentialsTableScrollPane = new JScrollPane(digestCredentialsTable);

    digestCredentialsNewButton = new MirthButton("New");
    digestCredentialsNewButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent evt) {
            int num = 0;
            String username;
            boolean found;
            do {
                num++;
                username = "user" + num;

                found = false;
                for (int row = 0; row < digestCredentialsTable.getModel().getRowCount(); row++) {
                    if (StringUtils.equals(username,
                            (String) digestCredentialsTable.getModel().getValueAt(row, 0))) {
                        found = true;
                    }
                }
            } while (found);

            ((DefaultTableModel) digestCredentialsTable.getModel()).addRow(new String[] { username, "" });
            digestCredentialsTable.setRowSelectionInterval(digestCredentialsTable.getRowCount() - 1,
                    digestCredentialsTable.getRowCount() - 1);
            PlatformUI.MIRTH_FRAME.setSaveEnabled(true);
        }
    });

    digestCredentialsDeleteButton = new MirthButton("Delete");
    digestCredentialsDeleteButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent evt) {
            int selectedRow = getSelectedRow(digestCredentialsTable);
            if (selectedRow >= 0) {
                if (digestCredentialsTable.isEditing()) {
                    digestCredentialsTable.getCellEditor().cancelCellEditing();
                }

                ((DefaultTableModel) digestCredentialsTable.getModel()).removeRow(selectedRow);

                int rowCount = digestCredentialsTable.getRowCount();
                if (selectedRow < rowCount) {
                    digestCredentialsTable.setRowSelectionInterval(selectedRow, selectedRow);
                } else if (rowCount > 0) {
                    digestCredentialsTable.setRowSelectionInterval(rowCount - 1, rowCount - 1);
                }

                PlatformUI.MIRTH_FRAME.setSaveEnabled(true);
            }
        }
    });
    digestCredentialsTableCellEditor.setDeleteButton(digestCredentialsDeleteButton);

    jsScriptLabel = new JLabel("Script:");
    jsScriptField = new JTextField();
    jsScriptField.setEditable(false);
    jsScriptField.setBackground(getBackground());
    jsScriptField.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
    jsScriptField.addMouseListener(new MouseAdapter() {
        @Override
        public void mouseReleased(MouseEvent evt) {
            JavaScriptHttpAuthDialog dialog = new JavaScriptHttpAuthDialog(PlatformUI.MIRTH_FRAME, jsScript);
            if (dialog.wasSaved()) {
                PlatformUI.MIRTH_FRAME.setSaveEnabled(true);
                jsScript = dialog.getScript();
                updateJSScriptField();
            }
        }
    });
    jsScriptField.setToolTipText(
            "<html>Click here to open the JavaScript editor dialog.<br/>The return value of this script is used to accept or reject requests.</html>");

    customClassNameLabel = new JLabel("Class Name:");
    customClassNameField = new MirthTextField();
    customClassNameField
            .setToolTipText("The fully-qualified Java class name of the Authenticator class to use.");
    customPropertiesLabel = new JLabel("Properties:");

    customPropertiesPanel = new JPanel();
    customPropertiesPanel.setBackground(getBackground());

    customPropertiesTable = new MirthTable();
    customPropertiesTable.setModel(new RefreshTableModel(new String[] { "Name", "Value" }, 0));
    customPropertiesTable.setCustomEditorControls(true);
    customPropertiesTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    customPropertiesTable.setRowSelectionAllowed(true);
    customPropertiesTable.setRowHeight(UIConstants.ROW_HEIGHT);
    customPropertiesTable.setDragEnabled(false);
    customPropertiesTable.setOpaque(true);
    customPropertiesTable.setSortable(false);
    customPropertiesTable.getTableHeader().setReorderingAllowed(false);
    customPropertiesTable.putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
    customPropertiesTable.setToolTipText(
            "Optional properties to pass into the Authenticator class when it is instantiated.");

    if (Preferences.userNodeForPackage(Mirth.class).getBoolean("highlightRows", true)) {
        Highlighter highlighter = HighlighterFactory.createAlternateStriping(UIConstants.HIGHLIGHTER_COLOR,
                UIConstants.BACKGROUND_COLOR);
        customPropertiesTable.setHighlighters(highlighter);
    }

    CredentialsTableCellEditor customPropertiesTableCellEditor = new CredentialsTableCellEditor(
            customPropertiesTable);
    customPropertiesTable.getColumnExt(0).setCellEditor(customPropertiesTableCellEditor);
    customPropertiesTable.getColumnExt(0).setToolTipText("The name of the property to include.");
    customPropertiesTable.getColumnExt(1).setToolTipText("The value of the property to include.");

    customPropertiesTableScrollPane = new JScrollPane(customPropertiesTable);

    customPropertiesNewButton = new MirthButton("New");
    customPropertiesNewButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent evt) {
            int num = 0;
            String name;
            boolean found;
            do {
                num++;
                name = "Property " + num;

                found = false;
                for (int row = 0; row < customPropertiesTable.getModel().getRowCount(); row++) {
                    if (StringUtils.equals(name,
                            (String) customPropertiesTable.getModel().getValueAt(row, 0))) {
                        found = true;
                    }
                }
            } while (found);

            ((DefaultTableModel) customPropertiesTable.getModel()).addRow(new String[] { name, "" });
            customPropertiesTable.setRowSelectionInterval(customPropertiesTable.getRowCount() - 1,
                    customPropertiesTable.getRowCount() - 1);
            PlatformUI.MIRTH_FRAME.setSaveEnabled(true);
        }
    });

    customPropertiesDeleteButton = new MirthButton("Delete");
    customPropertiesDeleteButton.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent evt) {
            int selectedRow = getSelectedRow(customPropertiesTable);
            if (selectedRow >= 0) {
                if (customPropertiesTable.isEditing()) {
                    customPropertiesTable.getCellEditor().cancelCellEditing();
                }

                ((DefaultTableModel) customPropertiesTable.getModel()).removeRow(selectedRow);

                int rowCount = customPropertiesTable.getRowCount();
                if (selectedRow < rowCount) {
                    customPropertiesTable.setRowSelectionInterval(selectedRow, selectedRow);
                } else if (rowCount > 0) {
                    customPropertiesTable.setRowSelectionInterval(rowCount - 1, rowCount - 1);
                }

                PlatformUI.MIRTH_FRAME.setSaveEnabled(true);
            }
        }
    });
    customPropertiesTableCellEditor.setDeleteButton(customPropertiesDeleteButton);

    oauth2TokenLabel = new JLabel("Access Token Location:");

    oauth2TokenLocationComboBox = new MirthComboBox();
    oauth2TokenLocationComboBox.setModel(new DefaultComboBoxModel<TokenLocation>(TokenLocation.values()));
    oauth2TokenLocationComboBox
            .setToolTipText("Determines where the access token is located in client requests.");

    oauth2TokenField = new MirthTextField();
    oauth2TokenField
            .setToolTipText("The header or query parameter to pass along with the verification request.");

    oauth2VerificationURLLabel = new JLabel("Verification URL:");
    oauth2VerificationURLField = new MirthTextField();
    oauth2VerificationURLField.setToolTipText(
            "<html>The HTTP URL to perform a GET request to for access<br/>token verification. If the response code is >= 400,<br/>the authentication attempt is rejected by the server.</html>");

    for (ConnectorPropertiesPlugin connectorPropertiesPlugin : LoadedExtensions.getInstance()
            .getConnectorPropertiesPlugins().values()) {
        if (connectorPropertiesPlugin
                .isConnectorPropertiesPluginSupported(HttpAuthConnectorPluginProperties.PLUGIN_POINT)) {
            connectorPropertiesPanel = connectorPropertiesPlugin.getConnectorPropertiesPanel();
        }
    }
}

From source file:cish.CISH.java

/**
 * Performs the CISH analysis on currently selected TMAspots.
 *//*  w  w w.j a va2 s . c  o m*/
void doCISH() {
    this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
    this.tss = manager.getSelectedTMAspots();
    this.gRatios = new double[tss.size()];
    this.lRatios = new double[tss.size()];
    this.ps = new int[tss.size()][][];

    if (!tss.isEmpty()) {
        if (thread != null) {
            if (thread.isAlive()) {
                thread.interrupt();
            }
        }
        thread = new CISH_Thread((TMARKERPluginManager) manager, this, this.tss, getParam_PointSignalRadius(),
                getParam_nPts(), getParam_darkpoints(), gRatios, lRatios, ps, classifier, dataset);
        thread.start();
    }

    this.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
}

From source file:com.github.fritaly.dualcommander.DualCommander.java

public void setDefaultCursor() {
    setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
}

From source file:com.github.fritaly.dualcommander.DualCommander.java

public void setWaitCursor() {
    setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
}

From source file:org.pf.midea.MainUI.java

private void initComponents() {
    // JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
    menuMain = new JMenuBar();
    menuFile = new JMenu();
    menuItemQuit = new JMenuItem();
    menuTools = new JMenu();
    menuConstellations = new JMenu();
    menuItemASK = new JMenuItem();
    menuItemFSK = new JMenuItem();
    menuItemBPSK = new JMenuItem();
    menuItemQPSK = new JMenuItem();
    menuItem8PSK = new JMenuItem();
    menuItem16PSK = new JMenuItem();
    menuItem32PSK = new JMenuItem();
    menuItem16QAM = new JMenuItem();
    menuItem32QAM = new JMenuItem();
    menuItem64QAM = new JMenuItem();
    menuItem256QAM = new JMenuItem();
    menuHelp = new JMenu();
    menuItemAbout = new JMenuItem();
    labelSource = new JLabel();
    SourceCell[] sourceCells = { new SourceCell(PlanStates.SourceType.ST_TEST),
            new SourceCell(PlanStates.SourceType.ST_RANDOM) };
    chooserSource = new JComboBox(sourceCells);
    chooserSource.setRenderer(new SourceCellRenderer());
    buttonAddToPlan = new JButton();
    panelPlan = new JPanel();
    scrollPane1 = new JScrollPane();
    listPlan = new JList();
    labelCode = new JLabel();
    CodeCell[] codeCells = { new CodeCell(PlanStates.CodeType.CT_NONE),
            new CodeCell(PlanStates.CodeType.CT_HAMMING74), new CodeCell(PlanStates.CodeType.CT_CYCLIC),
            new CodeCell(PlanStates.CodeType.CT_BCH155) };
    chooserCode = new JComboBox(codeCells);
    chooserCode.setRenderer(new CodeCellRenderer());
    labelModulation = new JLabel();
    ModulationCell[] modulationCells = { new ModulationCell(PlanStates.ModulationType.MT_ASK),
            new ModulationCell(PlanStates.ModulationType.MT_FSK),
            new ModulationCell(PlanStates.ModulationType.MT_BPSK),
            new ModulationCell(PlanStates.ModulationType.MT_QPSK),
            new ModulationCell(PlanStates.ModulationType.MT_8PSK),
            new ModulationCell(PlanStates.ModulationType.MT_16PSK),
            new ModulationCell(PlanStates.ModulationType.MT_32PSK),
            new ModulationCell(PlanStates.ModulationType.MT_16QAM),
            new ModulationCell(PlanStates.ModulationType.MT_32QAM),
            new ModulationCell(PlanStates.ModulationType.MT_64QAM),
            new ModulationCell(PlanStates.ModulationType.MT_256QAM) };
    chooserModulation = new JComboBox(modulationCells);
    chooserModulation.setRenderer(new ModulationCellRenderer());
    labelChannel = new JLabel();
    ChannelCell[] channelCells = { new ChannelCell(PlanStates.ChannelType.CHT_AWGN),
            new ChannelCell(PlanStates.ChannelType.CHT_RAYLEIGH) };
    chooserChannel = new JComboBox(channelCells);
    chooserChannel.setRenderer(new ChannelCellRenderer());
    buttonClearPlan = new JButton();
    labelErrors = new JLabel();
    ErrorsCell[] errorCells = { new ErrorsCell(PlanStates.ErrorsType.ET_SER),
            new ErrorsCell(PlanStates.ErrorsType.ET_BER) };
    chooserErrors = new JComboBox(errorCells);
    chooserErrors.setRenderer(new ErrorsCellRenderer());
    labelLineWidth = new JLabel();
    spinnerLineWidth = new JSpinner();
    buttonRemoveFromPlan = new JButton();
    labelLineColor = new JLabel();
    ColorCell[] colorCells = { new ColorCell(null), new ColorCell(Color.black), new ColorCell(Color.red),
            new ColorCell(Color.green), new ColorCell(Color.blue) };
    chooserLineColor = new JComboBox(colorCells);
    chooserLineColor.setRenderer(new ColorCellRenderer());
    labelHSquare = new JLabel();
    spinnerHSquareLow = new JSpinner();
    labelEllipsis = new JLabel();
    spinnerHSquareHigh = new JSpinner();
    panelInner1 = new JPanel();
    labelHSquareStep = new JLabel();
    spinnerHSquareStep = new JSpinner();
    labelMeasurementUnit = new JLabel();
    radioButtonMeasurementUnitTimes = new JRadioButton();
    radioButtonMeasurementUnitdB = new JRadioButton();
    buttonRunSimulation = new JButton();
    labelIterations = new JLabel();
    spinnerIterations = new JSpinner();
    checkBoxShowLineNumbers = new JCheckBox();
    tabbedPaneResults = new JTabbedPane();
    panelChart = new JPanel();
    panelNumeric = new JPanel();
    scrollPane2 = new JScrollPane();
    textAreaNumeric = new JTextArea();
    progressBar = new JProgressBar();

    //======== this ========
    setLayout(new FormLayout("3*(default, $lcgap), 36dlu, $lcgap, 122dlu:grow",
            "[21px,default], 9*($lgap, default), $lgap, default:grow, $lgap, default"));

    //======== menuMain ========
    {// w  w w . j  av  a  2  s  .co m

        //======== menuFile ========
        {
            menuFile.setText("\u0424\u0430\u0439\u043b");

            //---- menuItemQuit ----
            menuItemQuit.setText("\u0412\u0438\u0439\u0442\u0438");
            menuItemQuit.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q, KeyEvent.CTRL_MASK));
            menuItemQuit.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    menuItemQuitActionPerformed(e);
                }
            });
            menuFile.add(menuItemQuit);
        }
        menuMain.add(menuFile);

        //======== menuTools ========
        {
            menuTools.setText("\u0406\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0438");

            //======== menuConstellations ========
            {
                menuConstellations.setText(
                        "\u0421\u0438\u0433\u043d\u0430\u043b\u044c\u043d\u0456 \u0441\u0443\u0437\u0456\u0440\u2019\u044f");

                //---- menuItemASK ----
                menuItemASK.setText("\u0410\u041c\u043d\u2026");
                menuItemASK.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        menuItemASKActionPerformed(e);
                    }
                });
                menuConstellations.add(menuItemASK);

                //---- menuItemFSK ----
                menuItemFSK.setText("\u0427\u041c\u043d\u2026");
                menuItemFSK.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        menuItemFSKActionPerformed(e);
                    }
                });
                menuConstellations.add(menuItemFSK);

                //---- menuItemBPSK ----
                menuItemBPSK.setText("\u0424\u041c\u043d\u2026");
                menuItemBPSK.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        menuItemBPSKActionPerformed(e);
                    }
                });
                menuConstellations.add(menuItemBPSK);

                //---- menuItemQPSK ----
                menuItemQPSK.setText("\u0424\u041c-4\u2026");
                menuItemQPSK.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        menuItemQPSKActionPerformed(e);
                    }
                });
                menuConstellations.add(menuItemQPSK);

                //---- menuItem8PSK ----
                menuItem8PSK.setText("\u0424\u041c-8\u2026");
                menuItem8PSK.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        menuItem8PSKActionPerformed(e);
                    }
                });
                menuConstellations.add(menuItem8PSK);

                //---- menuItem16PSK ----
                menuItem16PSK.setText("\u0424\u041c-16\u2026");
                menuItem16PSK.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        menuItem16PSKActionPerformed(e);
                    }
                });
                menuConstellations.add(menuItem16PSK);

                //---- menuItem32PSK ----
                menuItem32PSK.setText("\u0424\u041c-32\u2026");
                menuItem32PSK.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        menuItem32PSKActionPerformed(e);
                    }
                });
                menuConstellations.add(menuItem32PSK);

                //---- menuItem16QAM ----
                menuItem16QAM.setText("\u041a\u0410\u041c-16\u2026");
                menuItem16QAM.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        menuItem16QAMActionPerformed(e);
                    }
                });
                menuConstellations.add(menuItem16QAM);

                //---- menuItem32QAM ----
                menuItem32QAM.setText("\u041a\u0410\u041c-32\u2026");
                menuItem32QAM.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        menuItem32QAMActionPerformed(e);
                    }
                });
                menuConstellations.add(menuItem32QAM);

                //---- menuItem64QAM ----
                menuItem64QAM.setText("\u041a\u0410\u041c-64\u2026");
                menuItem64QAM.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        menuItem64QAMActionPerformed(e);
                    }
                });
                menuConstellations.add(menuItem64QAM);

                //---- menuItem256QAM ----
                menuItem256QAM.setText("\u041a\u0410\u041c-256\u2026");
                menuItem256QAM.addActionListener(new ActionListener() {
                    @Override
                    public void actionPerformed(ActionEvent e) {
                        menuItem256QAMActionPerformed(e);
                    }
                });
                menuConstellations.add(menuItem256QAM);
            }
            menuTools.add(menuConstellations);
        }
        menuMain.add(menuTools);

        //======== menuHelp ========
        {
            menuHelp.setText("\u0414\u043e\u0432\u0456\u0434\u043a\u0430");

            //---- menuItemAbout ----
            menuItemAbout.setText("\u041f\u0440\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u0443\u2026");
            menuItemAbout.addActionListener(new ActionListener() {
                @Override
                public void actionPerformed(ActionEvent e) {
                    menuItemAboutActionPerformed(e);
                }
            });
            menuHelp.add(menuItemAbout);
        }
        menuMain.add(menuHelp);
    }
    add(menuMain, CC.xywh(1, 1, 9, 1, CC.FILL, CC.FILL));

    //---- labelSource ----
    labelSource.setText("\u0414\u0436\u0435\u0440\u0435\u043b\u043e:");
    add(labelSource, CC.xy(1, 3));
    add(chooserSource, CC.xy(3, 3));

    //---- buttonAddToPlan ----
    buttonAddToPlan.setText("\u2192");
    buttonAddToPlan.setToolTipText(
            "\u0414\u043e\u0434\u0430\u0442\u0438 \u0434\u043e \u043f\u043b\u0430\u043d\u0443 \u0435\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0443");
    buttonAddToPlan.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            buttonAddToPlanActionPerformed(e);
        }
    });
    add(buttonAddToPlan, CC.xywh(5, 3, 1, 5));

    //======== panelPlan ========
    {
        panelPlan.setLayout(new GridLayout());

        //======== scrollPane1 ========
        {
            scrollPane1.setViewportView(listPlan);
        }
        panelPlan.add(scrollPane1);
    }
    add(panelPlan, CC.xywh(7, 3, 3, 13));

    //---- labelCode ----
    labelCode.setText("\u041a\u043e\u0434:");
    add(labelCode, CC.xy(1, 5));
    add(chooserCode, CC.xy(3, 5));

    //---- labelModulation ----
    labelModulation.setText("\u041c\u043e\u0434\u0443\u043b\u044f\u0446\u0456\u044f:");
    add(labelModulation, CC.xy(1, 7));
    add(chooserModulation, CC.xy(3, 7));

    //---- labelChannel ----
    labelChannel.setText("\u041a\u0430\u043d\u0430\u043b:");
    add(labelChannel, CC.xy(1, 9));
    add(chooserChannel, CC.xy(3, 9));

    //---- buttonClearPlan ----
    buttonClearPlan.setText("X");
    buttonClearPlan.setToolTipText(
            "\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u0438 \u043f\u043b\u0430\u043d \u0435\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0443");
    buttonClearPlan.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            buttonClearPlanActionPerformed(e);
        }
    });
    add(buttonClearPlan, CC.xy(5, 9));

    //---- labelErrors ----
    labelErrors.setText("\u041f\u043e\u043c\u0438\u043b\u043a\u0438:");
    add(labelErrors, CC.xy(1, 11));
    add(chooserErrors, CC.xy(3, 11));

    //---- labelLineWidth ----
    labelLineWidth.setText("\u0422\u043e\u0432\u0449\u0438\u043d\u0430 \u043b\u0456\u043d\u0456\u0457:");
    add(labelLineWidth, CC.xy(1, 13));

    //---- spinnerLineWidth ----
    spinnerLineWidth.setModel(new SpinnerNumberModel(2, 1, 5, 1));
    add(spinnerLineWidth, CC.xy(3, 13));

    //---- buttonRemoveFromPlan ----
    buttonRemoveFromPlan.setText("\u2190");
    buttonRemoveFromPlan.setToolTipText(
            "\u0412\u0438\u0434\u0430\u043b\u0438\u0442\u0438 \u0437 \u043f\u043b\u0430\u043d\u0443 \u0435\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0443");
    buttonRemoveFromPlan.addActionListener(new ActionListener() {
        @Override
        public void actionPerformed(ActionEvent e) {
            buttonRemoveFromPlanActionPerformed(e);
        }
    });
    add(buttonRemoveFromPlan, CC.xywh(5, 11, 1, 5));

    //---- labelLineColor ----
    labelLineColor.setText("\u041a\u043e\u043b\u0456\u0440 \u043b\u0456\u043d\u0456\u0457:");
    add(labelLineColor, CC.xy(1, 15));
    add(chooserLineColor, CC.xy(3, 15));

    //---- labelHSquare ----
    labelHSquare.setText("h\u00b2=");
    add(labelHSquare, CC.xy(1, 17));

    //---- spinnerHSquareLow ----
    spinnerHSquareLow.setModel(new SpinnerNumberModel(0.0, null, null, 1.0));
    add(spinnerHSquareLow, CC.xy(3, 17));

    //---- labelEllipsis ----
    labelEllipsis.setText("\u2026");
    add(labelEllipsis, CC.xy(5, 17, CC.CENTER, CC.DEFAULT));

    //---- spinnerHSquareHigh ----
    spinnerHSquareHigh.setModel(new SpinnerNumberModel(15.0, null, null, 1.0));
    add(spinnerHSquareHigh, CC.xy(7, 17));

    //======== panelInner1 ========
    {
        panelInner1.setLayout(new FormLayout("5*(default, $lcgap), default:grow", "default"));

        //---- labelHSquareStep ----
        labelHSquareStep.setText(", \u043a\u0440\u043e\u043a:");
        panelInner1.add(labelHSquareStep, CC.xy(1, 1));

        //---- spinnerHSquareStep ----
        spinnerHSquareStep.setModel(new SpinnerNumberModel(0.5, 0.001, null, 0.1));
        panelInner1.add(spinnerHSquareStep, CC.xy(3, 1));

        //---- labelMeasurementUnit ----
        labelMeasurementUnit.setText(", \u043e\u0434\u0438\u043d\u0438\u0446\u0456:");
        panelInner1.add(labelMeasurementUnit, CC.xy(5, 1));

        //---- radioButtonMeasurementUnitTimes ----
        radioButtonMeasurementUnitTimes.setText("\u0440\u0430\u0437\u0438");
        radioButtonMeasurementUnitTimes.setSelected(true);
        panelInner1.add(radioButtonMeasurementUnitTimes, CC.xy(7, 1, CC.LEFT, CC.DEFAULT));

        //---- radioButtonMeasurementUnitdB ----
        radioButtonMeasurementUnitdB.setText("\u0434\u0411");
        panelInner1.add(radioButtonMeasurementUnitdB, CC.xy(9, 1, CC.LEFT, CC.DEFAULT));

        //---- buttonRunSimulation ----
        buttonRunSimulation.setText("\u0412\u0438\u043a\u043e\u043d\u0430\u0442\u0438");
        buttonRunSimulation.setToolTipText(
                "\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0438 \u043c\u043e\u0434\u0435\u043b\u044e\u0432\u0430\u043d\u043d\u044f");
        buttonRunSimulation.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                buttonRunSimulationActionPerformed(e);
            }
        });
        panelInner1.add(buttonRunSimulation, CC.xy(11, 1, CC.RIGHT, CC.DEFAULT));
    }
    add(panelInner1, CC.xy(9, 17));

    //---- labelIterations ----
    labelIterations.setText("\u0406\u0442\u0435\u0440\u0430\u0446\u0456\u0439:");
    add(labelIterations, CC.xy(1, 19));

    //---- spinnerIterations ----
    spinnerIterations.setModel(new SpinnerNumberModel(200000, 1, null, 50000));
    add(spinnerIterations, CC.xy(3, 19));

    //---- checkBoxShowLineNumbers ----
    checkBoxShowLineNumbers.setText(
            "\u041d\u0443\u043c\u0435\u0440\u0443\u0432\u0430\u0442\u0438 \u0433\u0440\u0430\u0444\u0456\u043a\u0438");
    add(checkBoxShowLineNumbers, CC.xywh(7, 19, 3, 1));

    //======== tabbedPaneResults ========
    {

        //======== panelChart ========
        {
            panelChart.setLayout(new BoxLayout(panelChart, BoxLayout.X_AXIS));
        }
        tabbedPaneResults.addTab("\u0413\u0440\u0430\u0444\u0456\u043a\u0438", panelChart);

        //======== panelNumeric ========
        {
            panelNumeric.setLayout(new FormLayout("default:grow", "default:grow"));

            //======== scrollPane2 ========
            {

                //---- textAreaNumeric ----
                textAreaNumeric.setCursor(Cursor.getPredefinedCursor(Cursor.TEXT_CURSOR));
                textAreaNumeric.setEditable(false);
                scrollPane2.setViewportView(textAreaNumeric);
            }
            panelNumeric.add(scrollPane2, CC.xy(1, 1, CC.DEFAULT, CC.FILL));
        }
        tabbedPaneResults.addTab("\u0427\u0438\u0441\u043b\u043e\u0432\u0456 \u0434\u0430\u043d\u0456",
                panelNumeric);

    }
    add(tabbedPaneResults, CC.xywh(1, 21, 9, 1, CC.DEFAULT, CC.FILL));
    add(progressBar, CC.xywh(1, 23, 9, 1));

    //---- buttonGroupMeasurementUnit ----
    ButtonGroup buttonGroupMeasurementUnit = new ButtonGroup();
    buttonGroupMeasurementUnit.add(radioButtonMeasurementUnitTimes);
    buttonGroupMeasurementUnit.add(radioButtonMeasurementUnitdB);
    // JFormDesigner - End of component initialization  //GEN-END:initComponents
}