Package org.eclipse.jface.viewers

Examples of org.eclipse.jface.viewers.ICellModifier


      propertiesViewer.setColumnProperties(new String[] {KEY_PROPERTY, VALUE_PROPERTY});

      propertiesViewer.setCellEditors(new CellEditor[] {new TextCellEditor(propertiesTable, SWT.NONE),
          new TextCellEditor(propertiesTable, SWT.NONE)});
      propertiesViewer.setCellModifier(new ICellModifier() {
        public boolean canModify(Object element, String property) {
          return true;
        }

        public void modify(Object element, String property, Object value) {
View Full Code Here


        cellEditor.setContentAssistant(contentAssistant);

        tableViewer.setCellEditors(new CellEditor[] {
            cellEditor
        });
        tableViewer.setCellModifier(new ICellModifier() {
            public void modify(Object element, String property, Object value) {
                Object el = element;
                if (el instanceof Item)
                    el = ((Item) el).getData();
View Full Code Here

        cellEditor.setContentAssistant(contentAssistant);

        tableViewer.setCellEditors(new CellEditor[] {
            cellEditor
        });
        tableViewer.setCellModifier(new ICellModifier() {
            public void modify(Object element, String property, Object value) {
                if (element instanceof Item)
                    element = ((Item) element).getData();

                ((InterfaceWrapper) element).interfaceName = (String) value;
View Full Code Here

        treeViewer = new TreeViewer( tree );
        treeViewer.setUseHashlookup( true );

        treeViewer.setColumnProperties( COLUMNS );

        ICellModifier cellModifier = new GrantsAndDenialsCellModifier();
        treeViewer.setCellModifier( cellModifier );
        CellEditor[] cellEditors = new CellEditor[]
            { null, new CheckboxCellEditor( tree ), null };
        treeViewer.setCellEditors( cellEditors );
View Full Code Here

        layout.setColumnData(type, new ColumnWeightData(20, true));
        comp.setLayout(layout);

        // activate editing
        tableViewer.setColumnProperties(new String[]{nameString, valueString, typeString});
        tableViewer.setCellModifier(new ICellModifier(){

            public boolean canModify( Object element, String property ) {
                if (property.equals(valueString)) {
                    return false;
                }
View Full Code Here

        };
        textCellEditor.setValidator(validator );
        viewer2.setCellEditors(new CellEditor[] { null, textCellEditor });
        final String scaleColumn = "scaleColumn"; //$NON-NLS-1$
       
        viewer2.setCellModifier(new ICellModifier() {

            public boolean canModify(Object element, String property) {
                return property.equals(scaleColumn);
            }
View Full Code Here

        viewer.setAutoExpandLevel(3);
       
        final String crs="CRS"; //$NON-NLS-1$
        viewer.setColumnProperties(new String[]{"name",crs}); //$NON-NLS-1$
        viewer.setCellEditors(new CellEditor[]{new TextCellEditor(tree), new CRSDialogCellEditor(tree)});
        viewer.setCellModifier(new ICellModifier(){

            public boolean canModify( Object element, String property ) {
                return true;
            }
View Full Code Here

                geomindex = i;
            }
            i++;
        }

        ICellModifier cellModifier = testingGetViewer.getCellModifier();
        assertEquals("geom", cellModifier.getValue(featureType.getDescriptor(0), "0")); //$NON-NLS-1$ //$NON-NLS-2$
        assertEquals(geomindex, cellModifier.getValue(featureType.getDescriptor(0), "1")); //$NON-NLS-1$
        assertEquals("name", cellModifier.getValue(featureType.getDescriptor(1), "0")); //$NON-NLS-1$ //$NON-NLS-2$
        assertEquals(stringindex, cellModifier.getValue(featureType.getDescriptor(1), "1")); //$NON-NLS-1$
    }
View Full Code Here

    @Ignore
    @Test
    public void testCellModifierModify() throws Exception {
        TreeViewer testingGetViewer = editor.testingGetViewer();

        ICellModifier cellModifier = testingGetViewer.getCellModifier();

        cellModifier.modify(testingGetViewer.getTree().getItem(0), "0", "the_new_name"); //$NON-NLS-1$//$NON-NLS-2$

        AttributeDescriptor attributeType = getAttributeDescriptor(0);
        assertEquals("the_new_name", attributeType.getName()); //$NON-NLS-1$

        for( int i = 0; i < FeatureTypeEditor.testingGetTYPES().size(); i++ ) {
            cellModifier.modify(testingGetViewer.getTree().getItem(0), "1", i); //$NON-NLS-1$.
            attributeType = getAttributeDescriptor(0);
            assertEquals(FeatureTypeEditor.testingGetTYPES().get(i).getType(), attributeType
                    .getType());
        }
    }
View Full Code Here

        CellEditor editors [] = new CellEditor[2];
        editors[0] = new TextCellEditor(table);

        ruleTable.setCellEditors(editors);
        ruleTable.setColumnProperties(new String[]{"selectors", "order"});
        ruleTable.setCellModifier(new ICellModifier() {
            public boolean canModify(Object o, String s) {
                return "selectors".equals(s);
            }

            public Object getValue(Object o, String s) {
View Full Code Here

TOP

Related Classes of org.eclipse.jface.viewers.ICellModifier

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.