Package javax.swing

Examples of javax.swing.DefaultCellEditor$EditorDelegate


        DefaultTableColumnModel columns = new DefaultTableColumnModel();
        TableColumn c;
       
        c = new TableColumn(0, 200
                , new DataCellRenderer(javax.swing.SwingConstants.LEFT)
                , new DefaultCellEditor(new JTextField()));
        c.setHeaderValue(AppLocal.getIntString("label.item"));
        columns.addColumn(c);
        c = new TableColumn(1, 75
                , new DataCellRenderer(javax.swing.SwingConstants.RIGHT)
                , new DefaultCellEditor(new JTextField()));
        c.setHeaderValue(AppLocal.getIntString("label.units"));
        columns.addColumn(c);
        c = new TableColumn(2, 75
                , new DataCellRenderer(javax.swing.SwingConstants.RIGHT)
                , new DefaultCellEditor(new JTextField()));
        c.setHeaderValue(AppLocal.getIntString("label.price"));
        columns.addColumn(c);
       
        m_tableinventory.setColumnModel(columns);      
       
View Full Code Here


     * @param elements the elements to choose from when editing
     */
    public void addColumn(String header, int width, ListElement[] elements )
    {
        logger.debug("Add Column [" + header + "]");
        DefaultCellEditor editor = DropFillinFactory.newDropListEditor(elements);
        ListFieldCellRenderer renderer = new ListFieldCellRenderer(new DynamicArray<ListElement>(ListElement.class,elements));
        addColumn(header,width,renderer,editor,true);
    }
View Full Code Here

     * @param elements the elements to choose from when editing
     */
    public void addColumn(String header, int width, ListElement[] elements )
    {
        logger.debug("Add Column [" + header + "]");
        DefaultCellEditor editor = DropFillinFactory.newDropListEditor(elements);
        ListFieldCellRenderer renderer = new ListFieldCellRenderer(new DynamicArray<ListElement>(ListElement.class,elements));
        addColumn(header,width,renderer,editor,true);
    }
View Full Code Here

        _unitsTable.setModel(_unitsTableModel);

        TableColumn _constraintColumn = _unitsTable.getColumnModel().getColumn(
                0);
        JTextField textField = new JTextField();
        final DefaultCellEditor constraintEditor = new DefaultCellEditor(
                textField);
        constraintEditor.setClickCountToStart(1);
        _constraintColumn.setCellEditor(constraintEditor);

        //        textField.addFocusListener(new FocusAdapter() {
        //            public void focusLost(FocusEvent fe) {
        //                constraintEditor.stopCellEditing();
View Full Code Here

        if (_columnNames.contains(ColumnNames.COL_DIRECTION)) {
            int col = _columnNames.indexOf(ColumnNames.COL_DIRECTION);
            TableColumn _portLocationColumn = _portTable.getColumnModel()
                    .getColumn(col);
            _portLocationColumn.setCellEditor(new DefaultCellEditor(
                    _portLocationComboBox));
        }

        if (_columnNames.contains(ColumnNames.COL_TYPE)) {
            int col = _columnNames.indexOf(ColumnNames.COL_TYPE);
View Full Code Here

                BatchViewerTableModel.STEP_COLUMN, 300, comboRenderer,
                comboEditor);
        addColumn(
                BatchViewerTableModel.COLUMN_NAMES[BatchViewerTableModel.COMMENT_COLUMN],
                BatchViewerTableModel.COMMENT_COLUMN, 50,
                defaultBatchCellRenderer, new DefaultCellEditor(
                new JTextField()));
        addColumn(
                BatchViewerTableModel.COLUMN_NAMES[BatchViewerTableModel.COUNT_COLUMN],
                BatchViewerTableModel.COUNT_COLUMN, 50, integerCellRender,
                integerEditor);
View Full Code Here

                BatchViewerTableModel.STEP_COLUMN, 300, comboRenderer,
                comboEditor);
        addColumn(
                BatchViewerTableModel.COLUMN_NAMES[BatchViewerTableModel.COMMENT_COLUMN],
                BatchViewerTableModel.COMMENT_COLUMN, 50,
                defaultBatchCellRenderer, new DefaultCellEditor(
                new JTextField()));
        addColumn(
                BatchViewerTableModel.COLUMN_NAMES[BatchViewerTableModel.COUNT_COLUMN],
                BatchViewerTableModel.COUNT_COLUMN, 50, integerCellRender,
                integerEditor);
View Full Code Here

    JComboBox comboBox = new JComboBox();
    for (String element : ColorListProperty.colorNameList) {
      comboBox.addItem(element);
    }

    table.getColumnModel().getColumn(0).setCellEditor(new DefaultCellEditor(comboBox));
  }
View Full Code Here

        if (aobj != null && aobj.length > 0) {
            final JComboBox comboBox = new JComboBox();
            for (int i = 0; i < aobj.length; i += 2) {
                comboBox.addItem(aobj[i]);
            }
            table.getColumnModel().getColumn(0).setCellEditor(new DefaultCellEditor(comboBox));
        }
    }
View Full Code Here

        if (aobj != null && aobj.length > 0) {
            final JComboBox comboBox = new JComboBox();
            for (int i = 0; i < aobj.length; i += 2) {
                comboBox.addItem(aobj[i]);
            }
            table.getColumnModel().getColumn(0).setCellEditor(new DefaultCellEditor(comboBox));
        }
    }
View Full Code Here

TOP

Related Classes of javax.swing.DefaultCellEditor$EditorDelegate

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.