Examples of ICellEditor


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

        ILayerCell cell = natTable.getCellByPosition(4, 4);
        natTable.doCommand(new EditCellCommand(natTable, natTable
                .getConfigRegistry(), cell));

        ICellEditor cellEditor = natTable.getActiveCellEditor();
        assertNotNull(cellEditor);
        assertTrue(cellEditor instanceof TextCellEditor);
        TextCellEditor textCellEditor = (TextCellEditor) cellEditor;
        assertEquals("Col: 4, Row: 4", textCellEditor.getCanonicalValue());

        Control control = cellEditor.getEditorControl();
        assertNotNull(control);
        assertTrue(control instanceof Text);
    }
View Full Code Here

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

            // register a combo box cell editor for the gender column in the
            // filter row
            // the label is set automatically to the value of
            // FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + column
            // position
            ICellEditor comboBoxCellEditor = new ComboBoxCellEditor(
                    Arrays.asList(Gender.FEMALE, Gender.MALE));
            configRegistry.registerConfigAttribute(
                    EditConfigAttributes.CELL_EDITOR, comboBoxCellEditor,
                    DisplayMode.NORMAL,
                    FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX
View Full Code Here

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

    }

    @Test
    public void testGetLastSelectedCellEditorWithSingleSelection() {
        this.selectionLayer.selectCell(1, 1, false, false);
        ICellEditor editor = EditUtils.getLastSelectedCellEditor(
                this.selectionLayer, this.natTable.getConfigRegistry());
        assertNotNull(editor);
        assertTrue(editor instanceof TextCellEditor);
    }
View Full Code Here

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

    @Test
    public void testGetLastSelectedCellEditorWithMultiSelection() {
        this.selectionLayer.selectCell(1, 1, false, true);
        this.selectionLayer.selectCell(2, 2, false, true);
        this.selectionLayer.selectCell(3, 3, false, true);
        ICellEditor editor = EditUtils.getLastSelectedCellEditor(
                this.selectionLayer, this.natTable.getConfigRegistry());
        assertNotNull(editor);
        assertTrue(editor instanceof TextCellEditor);
    }
View Full Code Here

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

    }

    @Test
    public void testGetLastSelectedCellEditorWithSingleSelection() {
        this.selectionLayer.selectCell(1, 1, false, false);
        ICellEditor editor = EditUtils.getLastSelectedCellEditor(
                this.selectionLayer, this.natTable.getConfigRegistry());
        assertNotNull(editor);
        assertTrue(editor instanceof TextCellEditor);
    }
View Full Code Here

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

    @Test
    public void testGetLastSelectedCellEditorWithMultiSelection() {
        this.selectionLayer.selectCell(1, 1, false, true);
        this.selectionLayer.selectCell(2, 2, false, true);
        this.selectionLayer.selectCell(3, 3, false, true);
        ICellEditor editor = EditUtils.getLastSelectedCellEditor(
                this.selectionLayer, this.natTable.getConfigRegistry());
        assertNotNull(editor);
        assertTrue(editor instanceof TextCellEditor);
    }
View Full Code Here

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

            // register a combo box cell editor for the gender column in the
            // filter row
            // the label is set automatically to the value of
            // FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + column
            // position
            ICellEditor comboBoxCellEditor = new ComboBoxCellEditor(
                    Arrays.asList(Gender.FEMALE, Gender.MALE));
            configRegistry.registerConfigAttribute(
                    EditConfigAttributes.CELL_EDITOR, comboBoxCellEditor,
                    DisplayMode.NORMAL,
                    FilterRowDataLayer.FILTER_ROW_COLUMN_LABEL_PREFIX + 3);
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.