Package javax.swing

Examples of javax.swing.JFormattedTextField


         @return False if the selection is invalid.  Otherwise,
         *  return whatever super.stopCellEditing() returns.
         */
        public boolean stopCellEditing() {
            // FIXME: do we need to get jTextField like this each time?
            JFormattedTextField jFormattedTextField = (JFormattedTextField) getComponent();

            if (jFormattedTextField.getText() == null) {
                // FIXME: why does the selected item get set to null sometimes?
                jFormattedTextField.setText("");
            }

            boolean valid = true;

            if (_validator != null) {
                valid = _validator.isValid(jFormattedTextField.getText());
            }

            if (!valid) {
                if (_userWantsToEdit) {
                    // User already selected edit, don't ask twice.
                    _userWantsToEdit = false;
                    return false;
                } else {
                    if (!userSaysRevert(jFormattedTextField.getText())) {
                        _userWantsToEdit = true;
                        return false; //don't let the editor go away
                    }
                }
            }
View Full Code Here


        if (_columnNames.contains(ColumnNames.COL_NAME)) {
            int col = _columnNames.indexOf(ColumnNames.COL_NAME);
            TableColumn _portNameColumn = _portTable.getColumnModel()
                    .getColumn(col);
            final ValidatingJTextFieldCellEditor portNameEditor = new ValidatingJTextFieldCellEditor(
                    new JFormattedTextField());
            _portNameColumn.setCellEditor(portNameEditor);
            portNameEditor.setValidator(new CellValidator() {
                /////////////////////////////////////////
                //////////// inner class/////////////////
                public boolean isValid(String cellValue) {
View Full Code Here

     *
     * @param c
     */
    protected void selectItLater(Component c) {
        if (c instanceof JFormattedTextField) {
            final JFormattedTextField ftf = (JFormattedTextField) c;
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    ftf.selectAll();
                }
            });
        }
    }
View Full Code Here

     *
     * @param c
     */
    protected void selectItLater(Component c) {
        if (c instanceof JFormattedTextField) {
            final JFormattedTextField ftf = (JFormattedTextField) c;
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    ftf.selectAll();
                }
            });
        }
    }
View Full Code Here

     *
     * @param c
     */
    protected void selectItLater(Component c) {
        if (c instanceof JFormattedTextField) {
            final JFormattedTextField ftf = (JFormattedTextField) c;
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    ftf.selectAll();
                }
            });
        }
    }
View Full Code Here

     *
     * @param c
     */
    protected void selectItLater(Component c) {
        if (c instanceof JFormattedTextField) {
            final JFormattedTextField ftf = (JFormattedTextField) c;
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    ftf.selectAll();
                }
            });
        }
    }
View Full Code Here

     *
     * @param c
     */
    protected void selectItLater(Component c) {
        if (c instanceof JFormattedTextField) {
            final JFormattedTextField ftf = (JFormattedTextField) c;
            SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    ftf.selectAll();
                }
            });
        }
    }
View Full Code Here

        ray = "0";
        theoricalEnergy = "0";
        energyCalibrationValue = 0;
        calibrationSettingsPanel = new CalibrationSettingsPanel();
        beamLineEnergyDeviceName = "";
        percentField = new JFormattedTextField(NumberFormat.getNumberInstance());
        currentChannelListener = new ChannelListener();
        mainSplitPane = null;
        showAllChannelsInChart = false;
        noDataColor = ColorTool.getCometeColor(getBackground());
        xiaFormat = NumberFormat.getIntegerInstance();
View Full Code Here

        ray = "0";
        theoricalEnergy = "0";
        energyCalibrationValue = 0;
        calibrationSettingsPanel = new CalibrationSettingsPanel();
        beamLineEnergyDeviceName = "";
        percentField = new JFormattedTextField(NumberFormat.getNumberInstance());
        currentChannelListener = new ChannelListener();
        mainSplitPane = null;
        showAllChannelsInChart = false;
        noDataColor = ColorTool.getCometeColor(getBackground());
        xiaFormat = NumberFormat.getIntegerInstance();
View Full Code Here

        ray = "0";
        theoricalEnergy = "0";
        energyCalibrationValue = 0;
        calibrationSettingsPanel = new CalibrationSettingsPanel();
        beamLineEnergyDeviceName = "";
        percentField = new JFormattedTextField(NumberFormat.getNumberInstance());
        currentChannelListener = new ChannelListener();
        mainSplitPane = null;
        showAllChannelsInChart = false;
        noDataColor = ColorTool.getCometeColor(getBackground());
        xiaFormat = NumberFormat.getIntegerInstance();
View Full Code Here

TOP

Related Classes of javax.swing.JFormattedTextField

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.