Examples of KeyComboBoxCellEditor


Examples of org.objectstyle.wolips.baseforuiplugins.utils.KeyComboBoxCellEditor

    super(viewer);
    _listener = listener;
    _treeViewer = viewer;
    _canEditRoot = canEditRoot;
    String[] items = new String[] { PropertyListPath.Type.Array.getName(), PropertyListPath.Type.Dictionary.getName(), PropertyListPath.Type.Boolean.getName(), PropertyListPath.Type.Data.getName(), PropertyListPath.Type.Date.getName(), PropertyListPath.Type.Number.getName(), PropertyListPath.Type.String.getName() };
    _typeCellEditor = new KeyComboBoxCellEditor(_treeViewer.getTree(), items, SWT.READ_ONLY);
    _typeCellEditor.getComboBox().setVisibleItemCount(items.length);
  }
View Full Code Here

Examples of org.objectstyle.wolips.baseforuiplugins.utils.KeyComboBoxCellEditor

    TableUtils.setCellEditor(EOArgument.class.getName(), AbstractEOArgument.COLUMN_NAME, new WOTextCellEditor(argumentsTable), cellEditors);
    String[] argumentDirectionNames = new String[EOArgumentDirection.ARGUMENT_DIRECTIONS.length];
    for (int argumentDirectionNum = 0; argumentDirectionNum < argumentDirectionNames.length; argumentDirectionNum++) {
      argumentDirectionNames[argumentDirectionNum] = EOArgumentDirection.ARGUMENT_DIRECTIONS[argumentDirectionNum].getName();
    }
    TableUtils.setCellEditor(EOArgument.class.getName(), EOArgument.DIRECTION, new KeyComboBoxCellEditor(argumentsTable, argumentDirectionNames), cellEditors);
    myArgumentsTableViewer.setCellModifier(new EOArgumentsCellModifier(myArgumentsTableViewer));
    myArgumentsTableViewer.setCellEditors(cellEditors);
   
    new StayEditingCellEditorListener(myArgumentsTableViewer, EOArgument.class.getName(), AbstractEOArgument.NAME);
    new StayEditingCellEditorListener(myArgumentsTableViewer, EOArgument.class.getName(), AbstractEOArgument.COLUMN_NAME);
View Full Code Here

Examples of org.objectstyle.wolips.baseforuiplugins.utils.KeyComboBoxCellEditor

    }

    TableUtils.sort(myAttributesTableViewer, AbstractEOArgument.NAME);

    CellEditor[] cellEditors = new CellEditor[TableUtils.getColumnsForTableNamed(EOAttribute.class.getName()).length];
    KeyComboBoxCellEditor prototypeCellEditor = new KeyComboBoxCellEditor(attributesTable, new String[0], SWT.READ_ONLY);
    prototypeCellEditor.getComboBox().setVisibleItemCount(10);
    TableUtils.setCellEditor(EOAttribute.class.getName(), EOAttribute.PROTOTYPE, prototypeCellEditor, cellEditors);
    TableUtils.setCellEditor(EOAttribute.class.getName(), AbstractEOArgument.NAME, new WOTextCellEditor(attributesTable), cellEditors);
    TableUtils.setCellEditor(EOAttribute.class.getName(), AbstractEOArgument.COLUMN_NAME, new WOTextCellEditor(attributesTable), cellEditors);
    updateCellEditors(cellEditors);
    myAttributesTableViewer.setCellModifier(new EOAttributesCellModifier(myAttributesTableViewer, cellEditors));
View Full Code Here

Examples of org.objectstyle.wolips.baseforuiplugins.utils.KeyComboBoxCellEditor

      myPrototypeNames = new LinkedList<String>(entity.getModel().getPrototypeAttributeNames());
      myPrototypeNames.add(0, EOAttributesCellModifier.NO_PROTOYPE_VALUE);
      String[] prototypeNames = myPrototypeNames.toArray(new String[myPrototypeNames.size()]);
      int columnNumber = TableUtils.getColumnNumberForTablePropertyNamed(EOAttribute.class.getName(), _property);
      if (columnNumber != -1) {
        KeyComboBoxCellEditor cellEditor = (KeyComboBoxCellEditor) myCellEditors[columnNumber];
        cellEditor.setItems(prototypeNames);
      }
    }
    return canModify;
  }
View Full Code Here

Examples of org.objectstyle.wolips.baseforuiplugins.utils.KeyComboBoxCellEditor

    CellEditor[] cellEditors = new CellEditor[TableUtils.getColumnsForTableNamed(EOEntity.class.getName()).length];
    TableUtils.setCellEditor(EOEntity.class.getName(), EOEntity.NAME, new WOTextCellEditor(entitiesTable), cellEditors);
    TableUtils.setCellEditor(EOEntity.class.getName(), EOEntity.EXTERNAL_NAME, new WOTextCellEditor(entitiesTable), cellEditors);
    TableUtils.setCellEditor(EOEntity.class.getName(), EOEntity.CLASS_NAME, new WOTextCellEditor(entitiesTable), cellEditors);
    TableUtils.setCellEditor(EOEntity.class.getName(), EOEntity.PARENT, new KeyComboBoxCellEditor(entitiesTable, new String[0], SWT.READ_ONLY), cellEditors);
    myEntitiesTableViewer.setCellModifier(new EOEntitiesCellModifier(myEntitiesTableViewer, cellEditors));
    myEntitiesTableViewer.setCellEditors(cellEditors);
   
    new StayEditingCellEditorListener(myEntitiesTableViewer, EOEntity.class.getName(), EOEntity.NAME);
    new StayEditingCellEditorListener(myEntitiesTableViewer, EOEntity.class.getName(), EOEntity.EXTERNAL_NAME);
View Full Code Here

Examples of org.objectstyle.wolips.baseforuiplugins.utils.KeyComboBoxCellEditor

    setLayout(layout);

    myJoinsTableViewer = TableUtils.createTableViewer(this, SWT.BORDER | SWT.FLAT | SWT.MULTI | SWT.FULL_SELECTION, "EOJoin", EOJoin.class.getName(), new EOJoinsContentProvider(), new EOJoinsLabelProvider(EOJoin.class.getName()), new TablePropertyViewerSorter(EOJoin.class.getName()));

    CellEditor[] cellEditors = new CellEditor[TableUtils.getColumnsForTableNamed(EOJoin.class.getName()).length];
    TableUtils.setCellEditor(EOJoin.class.getName(), EOJoin.SOURCE_ATTRIBUTE_NAME, new KeyComboBoxCellEditor(myJoinsTableViewer.getTable(), new String[0], SWT.READ_ONLY), cellEditors);
    TableUtils.setCellEditor(EOJoin.class.getName(), EOJoin.DESTINATION_ATTRIBUTE_NAME, new KeyComboBoxCellEditor(myJoinsTableViewer.getTable(), new String[0], SWT.READ_ONLY), cellEditors);
    myJoinsTableViewer.setCellModifier(new EOJoinsCellModifier(myJoinsTableViewer));
    myJoinsTableViewer.setCellEditors(cellEditors);

    GridData joinsTableLayoutData = new GridData(GridData.FILL_BOTH);
    joinsTableLayoutData.heightHint = 100;
View Full Code Here

Examples of org.objectstyle.wolips.baseforuiplugins.utils.KeyComboBoxCellEditor

      EOEntity source = myRelationship.getEntity();
      if (source != null) {
        TableColumn sourceColumn = TableUtils.getColumn(myJoinsTableViewer, EOJoin.class.getName(), EOJoin.SOURCE_ATTRIBUTE_NAME);
        if (sourceColumn != null) {
          sourceColumn.setText(source.getName());
          KeyComboBoxCellEditor sourceCellEditor = (KeyComboBoxCellEditor) TableUtils.getCellEditor(myJoinsTableViewer, EOJoin.class.getName(), EOJoin.SOURCE_ATTRIBUTE_NAME);
          sourceCellEditor.setItems(source.getAttributeNames());
        }
      }
      EOEntity destination = myRelationship.getDestination();
      if (destination != null) {
        TableColumn destinationColumn = TableUtils.getColumn(myJoinsTableViewer, EOJoin.class.getName(), EOJoin.DESTINATION_ATTRIBUTE_NAME);
        if (destinationColumn != null) {
          destinationColumn.setText(destination.getName());
          KeyComboBoxCellEditor destinationCellEditor = (KeyComboBoxCellEditor) TableUtils.getCellEditor(myJoinsTableViewer, EOJoin.class.getName(), EOJoin.DESTINATION_ATTRIBUTE_NAME);
          destinationCellEditor.setItems(destination.getAttributeNames());
        }
      }
      TableUtils.packTableColumns(myJoinsTableViewer);
    }
  }
View Full Code Here

Examples of org.objectstyle.wolips.baseforuiplugins.utils.KeyComboBoxCellEditor

      myEntityNames = new LinkedList(model.getModelGroup().getEntityNames());
      myEntityNames.add(0, EOEntitiesCellModifier.NO_PARENT_VALUE);
      String[] entityNames = (String[]) myEntityNames.toArray(new String[myEntityNames.size()]);
      int columnNumber = TableUtils.getColumnNumberForTablePropertyNamed(EOEntity.class.getName(), _property);
      if (columnNumber != -1) {
        KeyComboBoxCellEditor cellEditor = (KeyComboBoxCellEditor) myCellEditors[columnNumber];
        cellEditor.setItems(entityNames);
      }
    }
    return true;
  }
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.