Examples of CellEditor


Examples of org.eclipse.jface.viewers.CellEditor

      if (element instanceof FeatureValue) {
        FeatureValue value = (FeatureValue) element;

        if (value.getFeature().getRange().isPrimitive()) {

          CellEditor editor;

          if (value.getFeature().getRange().getName().equals(CAS.TYPE_NAME_BOOLEAN)) {
            editor = new ComboBoxCellEditor(viewer.getTree(), new String[]{"false", "true"},
                    SWT.READ_ONLY);
          }
          else {
            editor = new TextCellEditor(viewer.getTree());
            editor.setValidator(CellEditorValidatorFacotory.createValidator(Primitives
                    .getPrimitiveClass(value.getFeature())));
          }

          return editor;
        }
        else {
          return null;
        }
      } else if (element instanceof ArrayValue) {

        ArrayValue arrayValue = (ArrayValue) element;

        FeatureStructure arrayFS = arrayValue.getFeatureStructure();

        CellEditor editor;

        if (arrayFS instanceof BooleanArrayFS) {
          editor = new ComboBoxCellEditor(viewer.getTree(), new String[]{"false", "true"},
                  SWT.READ_ONLY);
          editor.setStyle(SWT.READ_ONLY);
        }
        else {
          editor = new TextCellEditor(viewer.getTree());

          if (arrayFS instanceof ByteArrayFS) {
            editor.setValidator(CellEditorValidatorFacotory.createValidator(Byte.class));
          }
          else if (arrayFS instanceof ShortArrayFS) {
            editor.setValidator(CellEditorValidatorFacotory.createValidator(Short.class));
          }
          else if (arrayFS instanceof IntArrayFS) {
            editor.setValidator(CellEditorValidatorFacotory.createValidator(Integer.class));
          }
          else if (arrayFS instanceof LongArrayFS) {
            editor.setValidator(CellEditorValidatorFacotory.createValidator(Long.class));
          }
          else if (arrayFS instanceof FloatArrayFS) {
            editor.setValidator(CellEditorValidatorFacotory.createValidator(Float.class));
          }
          else if (arrayFS instanceof DoubleArrayFS) {
            editor.setValidator(CellEditorValidatorFacotory.createValidator(Double.class));
          }
          else if (arrayFS instanceof StringArrayFS) {
            // no validator needed
          }
          else {
View Full Code Here

Examples of org.eclipse.jface.viewers.CellEditor

    tableViewer.setLabelProvider(new ObservableMapLabelProvider(observeMaps));
    //
    IObservableList methodEditorgetMethodParametersObserveList = BeansObservables.observeList(Realm.getDefault(), method, "parameters");
    tableViewer.setInput(methodEditorgetMethodParametersObserveList);
    //
    CellEditor cellEditor = new TextCellEditor(tableViewer.getTable());
    IValueProperty cellEditorProperty = BeanProperties.value("value");
    IBeanValueProperty valueProperty = BeanProperties.value("name");
    nameColumn.setEditingSupport(ObservableValueEditingSupport.create(tableViewer, bindingContext, cellEditor, cellEditorProperty, valueProperty));
    //
    CellEditor cellEditor_1 = new TextCellEditor(tableViewer.getTable());
    IValueProperty cellEditorProperty_1 = BeanProperties.value("value");
    IBeanValueProperty valueProperty_1 = BeanProperties.value("type");
    typeColumn.setEditingSupport(ObservableValueEditingSupport.create(tableViewer, bindingContext, cellEditor_1, cellEditorProperty_1, valueProperty_1));
    //
    CellEditor cellEditor_2 = new CheckboxCellEditor(tableViewer.getTable());
    IValueProperty cellEditorProperty_2 = BeanProperties.value("value");
    IBeanValueProperty valueProperty_2 = BeanProperties.value("copy");
    copyColumn.setEditingSupport(ObservableValueEditingSupport.create(tableViewer, bindingContext, cellEditor_2, cellEditorProperty_2, valueProperty_2));
    //
    CellEditor parsingCombo = new ComboBoxCellEditor(tableViewer.getTable(), ToolParameter.PT_VALUES);
    IValueProperty cellEditorProperty_3 = BeanProperties.value("value");
    IBeanValueProperty valueProperty_3 = BeanProperties.value("parsingType");
    parsingColumn.setEditingSupport(ObservableValueEditingSupport.create(tableViewer, bindingContext, parsingCombo, cellEditorProperty_3, valueProperty_3));
    //
    CellEditor cellEditor_4 = new TextCellEditor(tableViewer.getTable());
    IValueProperty cellEditorProperty_4 = BeanProperties.value("value");
    IBeanValueProperty valueProperty_4 = BeanProperties.value("defaultValue");
    defaultColumn.setEditingSupport(ObservableValueEditingSupport.create(tableViewer, bindingContext, cellEditor_4, cellEditorProperty_4, valueProperty_4));
    //
    return bindingContext;
View Full Code Here

Examples of org.primefaces.component.celleditor.CellEditor

            encodeColumnSelection(context, table, clientId, column, selected);
           
            writer.endElement("div");
        }
        else {
            CellEditor editor = column.getCellEditor();
            if(editor != null) {
                writer.writeAttribute("class", DataTable.EDITABLE_COLUMN_CLASS , null);
            }

            writer.startElement("div", null);
View Full Code Here

Examples of org.wicketstuff.table.cell.CellEditor

  }

  public CellEditor getCellEditor(int row, int column)
  {
    TableColumn tableColumn = columnsModelAdapter.getColumn(column);
    CellEditor editor = tableColumn == null ? null : tableColumn.getCellEditor();
    if (editor == null)
    {
      editor = getDefaultEditor(getTableModel().getColumnClass(column));
    }
    return editor;
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.