Package org.eclipse.nebula.widgets.nattable.edit.editor

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


        private void registerColumnTwoTextEditor(IConfigRegistry configRegistry) {
            // register a TextCellEditor for column two that commits on key
            // up/down
            // moves the selection after commit by enter
            configRegistry.registerConfigAttribute(
                    EditConfigAttributes.CELL_EDITOR, new TextCellEditor(true,
                            true), DisplayMode.NORMAL,
                    _447_EditorExample.COLUMN_TWO_LABEL);

            // configure to open the adjacent editor after commit
            configRegistry.registerConfigAttribute(
View Full Code Here


        private void registerColumnFiveIntegerEditor(
                IConfigRegistry configRegistry) {
            // register a TextCellEditor for column five that moves the
            // selection after commit
            configRegistry.registerConfigAttribute(
                    EditConfigAttributes.CELL_EDITOR, new TextCellEditor(false,
                            true), DisplayMode.NORMAL,
                    _447_EditorExample.COLUMN_FIVE_LABEL);

            // configure to open the adjacent editor after commit
            configRegistry.registerConfigAttribute(
View Full Code Here

        private void registerColumnSixDoubleEditor(
                IConfigRegistry configRegistry) {
            // register a TextCellEditor for column five that moves the
            // selection after commit
            configRegistry.registerConfigAttribute(
                    EditConfigAttributes.CELL_EDITOR, new TextCellEditor(false,
                            true), DisplayMode.NORMAL,
                    _447_EditorExample.COLUMN_SIX_LABEL);

            // configure to open the adjacent editor after commit
            configRegistry.registerConfigAttribute(
View Full Code Here

            // register a TextCellEditor for column two that commits on key
            // up/down
            // moves the selection after commit by enter
            configRegistry.registerConfigAttribute(
                    EditConfigAttributes.CELL_EDITOR,
                    new TextCellEditor(true, true),
                    DisplayMode.NORMAL,
                    _4471_EditorTraversalExample.COLUMN_TWO_LABEL);
        }
View Full Code Here

                .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

        testConfigRegistry.registerConfigAttribute(
                EditConfigAttributes.CELL_EDITOR,
                new ComboBoxCellEditor(Arrays.asList("")), EDIT,
                "COMBO_BOX_EDITOR_LABEL");
        testConfigRegistry.registerConfigAttribute(
                EditConfigAttributes.CELL_EDITOR, new TextCellEditor(), EDIT,
                "TEXT_BOX_EDITOR_LABEL");

        assertEquals("[1, 1]", selectionLayer.getDataValueByPosition(1, 1));
        assertEquals("[2, 1]", selectionLayer.getDataValueByPosition(2, 1));
View Full Code Here

        this.viewportLayer.addConfiguration(new DefaultEditConfiguration() {
            @Override
            public void configureRegistry(IConfigRegistry configRegistry) {
                configRegistry.registerConfigAttribute(
                        EditConfigAttributes.CELL_EDITOR,
                        new TextCellEditor(true, true));
                configRegistry.registerConfigAttribute(
                        EditConfigAttributes.DATA_VALIDATOR,
                        new DefaultDataValidator());
            }
View Full Code Here

        cell.setBounds(new Rectangle(100, 100, 100, 20));
        cell.setConfigLabels(new LabelStack("Cell_Edit"));
        cell.setDataValue("123");
        cell.setDisplayMode(DisplayMode.NORMAL);

        TextCellEditor cellEditor = new TextCellEditor();

        IDisplayConverter dataTypeConverter = new DisplayConverter() {

            public Object canonicalToDisplayValue(Object canonicalValue) {
                return canonicalValue;
View Full Code Here

        private void registerEditors(IConfigRegistry configRegistry) {
            // register a TextCellEditor for column 1 and 2 that moves on commit
            configRegistry.registerConfigAttribute(
                    EditConfigAttributes.CELL_EDITOR,
                    new TextCellEditor(true, true),
                    DisplayMode.NORMAL,
                    COLUMN_ONE_LABEL);

            configRegistry.registerConfigAttribute(
                    EditConfigAttributes.CELL_EDITOR,
                    new TextCellEditor(true, true),
                    DisplayMode.NORMAL,
                    COLUMN_TWO_LABEL);

            registerColumnFourCheckbox(configRegistry);
            registerColumnFiveDateEditor(configRegistry);
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.edit.editor.TextCellEditor

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.