Examples of ComboBoxCellEditor


Examples of org.eclipse.jface.viewers.ComboBoxCellEditor

        private String[] values = new String[] { "to", "cc", "bcc" };

        public TypeEditing(TableViewer viewer) {
            super(viewer);
            cellEditor = new ComboBoxCellEditor(viewer.getTable(), values);
        }
View Full Code Here

Examples of org.eclipse.jface.viewers.ComboBoxCellEditor

    private class ReassignmentTypeEditing extends EditingSupport {
        private ComboBoxCellEditor cellEditor;

        public ReassignmentTypeEditing(TableViewer viewer) {
            super(viewer);
            cellEditor = new ComboBoxCellEditor(viewer.getTable(), new String[]{"not-started", "not-completed"});
        }
View Full Code Here

Examples of org.eclipse.jface.viewers.ComboBoxCellEditor

    private class ReassignmentTypeEditing extends EditingSupport {
        private ComboBoxCellEditor cellEditor;

        public ReassignmentTypeEditing(TableViewer viewer) {
            super(viewer);
            cellEditor = new ComboBoxCellEditor(viewer.getTable(), new String[]{"not-started", "not-completed"});
        }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.edit.editor.ComboBoxCellEditor

     *
     * @param configRegistry
     */
    private void registerColumnNineComboBox(IConfigRegistry configRegistry) {
        // register a combobox editor for the street names
        ComboBoxCellEditor comboBoxCellEditor = new ComboBoxCellEditor(
                Arrays.asList(PersonService.getStreetNames()));
        configRegistry.registerConfigAttribute(
                EditConfigAttributes.CELL_EDITOR, comboBoxCellEditor,
                DisplayMode.EDIT, EditorExample.COLUMN_NINE_LABEL);
    }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.edit.editor.ComboBoxCellEditor

     *
     * @param configRegistry
     */
    private void registerColumnTenComboBox(IConfigRegistry configRegistry) {
        // register a combobox for the city names
        ComboBoxCellEditor comboBoxCellEditor = new ComboBoxCellEditor(
                Arrays.asList(PersonService.getCityNames()), -1);
        comboBoxCellEditor.setFreeEdit(true);
        configRegistry.registerConfigAttribute(
                EditConfigAttributes.CELL_EDITOR, comboBoxCellEditor,
                DisplayMode.EDIT, EditorExample.COLUMN_TEN_LABEL);

        configRegistry.registerConfigAttribute(
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.edit.editor.ComboBoxCellEditor

     *
     * @param configRegistry
     */
    private void registerColumnElevenComboBox(IConfigRegistry configRegistry) {
        // register a combobox for the city names
        ComboBoxCellEditor comboBoxCellEditor = new ComboBoxCellEditor(
                Arrays.asList(PersonService.getFoodList()), -1);
        comboBoxCellEditor.setMultiselect(true);
        comboBoxCellEditor.setUseCheckbox(true);

        // change the multi selection brackets that are added to the String that
        // is shown in the editor
        comboBoxCellEditor.setMultiselectTextBracket("", "");
        // register a special converter that removes the brackets in case the
        // returned value is a Collection
        // this is necessary because editing and displaying are not directly
        // coupled to each other
        configRegistry.registerConfigAttribute(
                CellConfigAttributes.DISPLAY_CONVERTER,
                new DefaultDisplayConverter() {

                    @Override
                    public Object canonicalToDisplayValue(Object canonicalValue) {
                        if (canonicalValue instanceof Collection) {
                            // Collection.toString() will add [ and ] around the
                            // values in the Collection
                            // So by removing the leading and ending character,
                            // we remove the brackets
                            String result = canonicalValue.toString();
                            result = result.substring(1, result.length() - 1);
                            return result;
                        }
                        // if the value is not a Collection we simply let the
                        // super class do the conversion
                        // this is necessary to show single values in the
                        // ComboBox correctly
                        return super.canonicalToDisplayValue(canonicalValue);
                    }
                }, DisplayMode.NORMAL, EditorExample.COLUMN_ELEVEN_LABEL);

        comboBoxCellEditor.setIconImage(GUIHelper.getImage("plus"));
        configRegistry.registerConfigAttribute(
                EditConfigAttributes.CELL_EDITOR, comboBoxCellEditor,
                DisplayMode.EDIT, EditorExample.COLUMN_ELEVEN_LABEL);
    }
View Full Code Here

Examples of org.jdesktop.swingx.autocomplete.ComboBoxCellEditor

    }

    private void initTable(RowEditorModel rowModel) {

        DeviceComboBox box = new DeviceComboBox();
        ComboBoxCellEditor cellEditor = new ComboBoxCellEditor(box);
        box.addDeviceClass("Scan");
        box.addDeviceClass("ScanServer");
        rowModel.addEditorForRow(0, cellEditor);

        box = new DeviceComboBox();
        box.addDeviceClass("DataFitter");
        cellEditor = new ComboBoxCellEditor(box);
        rowModel.addEditorForRow(1, cellEditor);

        box = new DeviceComboBox();
        box.addDeviceClass("DataRecorder");
        cellEditor = new ComboBoxCellEditor(box);
        rowModel.addEditorForRow(2, cellEditor);

        box = new DeviceComboBox();
        box.addDeviceClass("BeamLine");
        cellEditor = new ComboBoxCellEditor(box);
        rowModel.addEditorForRow(3, cellEditor);

        box = new DeviceComboBox();
        box.addDeviceClass("RefreshingTime");
        cellEditor = new ComboBoxCellEditor(box);
        rowModel.addEditorForRow(4, cellEditor);

        box = new DeviceComboBox();
        box.addDeviceClass("Control Panel");
        cellEditor = new ComboBoxCellEditor(box);
        rowModel.addEditorForRow(6, cellEditor);
    }
View Full Code Here

Examples of org.jdesktop.swingx.autocomplete.ComboBoxCellEditor

    }

    private void initTable(RowEditorModel rowModel) {

        DeviceComboBox box = new DeviceComboBox();
        ComboBoxCellEditor cellEditor = new ComboBoxCellEditor(box);
        box.addDeviceClass("Scan");
        box.addDeviceClass("ScanServer");
        rowModel.addEditorForRow(0, cellEditor);

        box = new DeviceComboBox();
        box.addDeviceClass("DataFitter");
        cellEditor = new ComboBoxCellEditor(box);
        rowModel.addEditorForRow(1, cellEditor);

        // box = new DeviceComboBox();
        // box.addDeviceClass("DataRecorder");
        // cellEditor = new ComboBoxCellEditor(box);
        // rowModel.addEditorForRow(2, cellEditor);

        BooleanComboBox booleanCombo = new BooleanComboBox();
        box.addDeviceClass("DataRecorder");
        cellEditor = new ComboBoxCellEditor(booleanCombo);
        rowModel.addEditorForRow(2, cellEditor);

        box = new DeviceComboBox();
        box.addDeviceClass("BeamLine");
        cellEditor = new ComboBoxCellEditor(box);
        rowModel.addEditorForRow(3, cellEditor);

        box = new DeviceComboBox();
        box.addDeviceClass("RefreshingTime");
        cellEditor = new ComboBoxCellEditor(box);
        rowModel.addEditorForRow(4, cellEditor);

        box = new DeviceComboBox();
        box.addDeviceClass("Control Panel");
        cellEditor = new ComboBoxCellEditor(box);
        rowModel.addEditorForRow(6, cellEditor);
    }
View Full Code Here

Examples of org.jdesktop.swingx.autocomplete.ComboBoxCellEditor

    }

    private void initTable(RowEditorModel rowModel) {

        DeviceComboBox box = new DeviceComboBox();
        ComboBoxCellEditor cellEditor = new ComboBoxCellEditor(box);
        box.addDeviceClass("Scan");
        box.addDeviceClass("ScanServer");
        rowModel.addEditorForRow(0, cellEditor);

        box = new DeviceComboBox();
        box.addDeviceClass("DataFitter");
        cellEditor = new ComboBoxCellEditor(box);
        rowModel.addEditorForRow(1, cellEditor);

        // box = new DeviceComboBox();
        // box.addDeviceClass("DataRecorder");
        // cellEditor = new ComboBoxCellEditor(box);
        // rowModel.addEditorForRow(2, cellEditor);

        box = new DeviceComboBox();
        box.addDeviceClass("BeamLine");
        cellEditor = new ComboBoxCellEditor(box);
        rowModel.addEditorForRow(3, cellEditor);

        box = new DeviceComboBox();
        box.addDeviceClass("RefreshingTime");
        cellEditor = new ComboBoxCellEditor(box);
        rowModel.addEditorForRow(4, cellEditor);

        box = new DeviceComboBox();
        box.addDeviceClass("Control Panel");
        cellEditor = new ComboBoxCellEditor(box);
        rowModel.addEditorForRow(6, cellEditor);
    }
View Full Code Here

Examples of org.jdesktop.swingx.autocomplete.ComboBoxCellEditor

    }

    private void initTable(RowEditorModel rowModel) {

        DeviceComboBox box = new DeviceComboBox();
        ComboBoxCellEditor cellEditor = new ComboBoxCellEditor(box);
        box.addDeviceClass("Scan");
        box.addDeviceClass("ScanServer");
        rowModel.addEditorForRow(0, cellEditor);

        box = new DeviceComboBox();
        box.addDeviceClass("DataFitter");
        cellEditor = new ComboBoxCellEditor(box);
        rowModel.addEditorForRow(1, cellEditor);

        box = new DeviceComboBox();
        box.addDeviceClass("DataRecorder");
        cellEditor = new ComboBoxCellEditor(box);
        rowModel.addEditorForRow(2, cellEditor);

        box = new DeviceComboBox();
        box.addDeviceClass("BeamLine");
        cellEditor = new ComboBoxCellEditor(box);
        rowModel.addEditorForRow(3, cellEditor);

        box = new DeviceComboBox();
        box.addDeviceClass("RefreshingTime");
        cellEditor = new ComboBoxCellEditor(box);
        rowModel.addEditorForRow(4, cellEditor);

        box = new DeviceComboBox();
        box.addDeviceClass("Control Panel");
        cellEditor = new ComboBoxCellEditor(box);
        rowModel.addEditorForRow(6, cellEditor);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.