Package org.eclipse.jface.viewers

Examples of org.eclipse.jface.viewers.ColumnViewerEditorActivationStrategy


    _propertyListTree = new TreeViewer(parent, SWT.BORDER | SWT.FULL_SELECTION | SWT.BACKGROUND | SWT.SINGLE | SWT.NO_SCROLL | SWT.V_SCROLL);
    _propertyListTree.getTree().setHeaderVisible(true);
    _propertyListTree.getTree().setLinesVisible(true);
    _propertyListTree.setAutoExpandLevel(2);
    TreeViewerFocusCellManager focusCellManager = new TreeViewerFocusCellManager(_propertyListTree, new FocusCellOwnerDrawHighlighter(_propertyListTree), new WOTreeCellNavigationStrategy());
    ColumnViewerEditorActivationStrategy actSupport = new ColumnViewerEditorActivationStrategy(_propertyListTree) {
      protected boolean isEditorActivationEvent(ColumnViewerEditorActivationEvent event) {
        ViewerCell cell = (ViewerCell) event.getSource();
        boolean isEditorActivationEvent;
        if (cell.getColumnIndex() == 1) {
          isEditorActivationEvent = event.eventType == ColumnViewerEditorActivationEvent.TRAVERSAL || event.eventType == ColumnViewerEditorActivationEvent.MOUSE_CLICK_SELECTION || (event.eventType == ColumnViewerEditorActivationEvent.KEY_PRESSED && event.keyCode == ' ') || event.eventType == ColumnViewerEditorActivationEvent.PROGRAMMATIC;
View Full Code Here


    column.setLabelProvider(new EOModelOutlineColumnLabelProvider(treeViewer));
    column.setEditingSupport(new EOModelOutlineEditingSupport(treeViewer));
    column.getColumn().setWidth(400);
    //outlineTreeLayout.setColumnData(column.getColumn(), new ColumnWeightData(100, true));

    ColumnViewerEditorActivationStrategy strategy = new ColumnViewerEditorActivationStrategy(treeViewer) {
      @Override
      protected boolean isEditorActivationEvent(ColumnViewerEditorActivationEvent event) {
        return event.eventType == ColumnViewerEditorActivationEvent.MOUSE_DOUBLE_CLICK_SELECTION;
      }
    };
View Full Code Here

   * A: http://bingjava.appspot.com/snippet.jsp?id=2213
   */
  private void addEditorSupport(TableViewer tv) {
    final CellNavigationStrategy cellNavigation = createCellNavigationStrategy(tv);
    final TableViewerFocusCellManager focusCellManager = new TableViewerFocusCellManager(tv, new FocusCellOwnerDrawHighlighter(tv), cellNavigation);
    final ColumnViewerEditorActivationStrategy activationStrategy = createEditorActivationStrategy(tv);
    TableViewerEditor.create(tv, focusCellManager, activationStrategy,
        ColumnViewerEditor.TABBING_HORIZONTAL
        | ColumnViewerEditor.TABBING_MOVE_TO_ROW_NEIGHBOR
        | ColumnViewerEditor.TABBING_VERTICAL
        | ColumnViewerEditor.KEYBOARD_ACTIVATION);
View Full Code Here

      }
    };
  }
 
  private ColumnViewerEditorActivationStrategy createEditorActivationStrategy(TableViewer tv) {
    return new ColumnViewerEditorActivationStrategy(tv) {
      protected boolean isEditorActivationEvent(ColumnViewerEditorActivationEvent event) {
        return  event.eventType == ColumnViewerEditorActivationEvent.TRAVERSAL
        ||  event.eventType == ColumnViewerEditorActivationEvent.MOUSE_DOUBLE_CLICK_SELECTION
        || (event.eventType == ColumnViewerEditorActivationEvent.KEY_PRESSED && event.keyCode == SWT.CR);
      }
View Full Code Here

            }
        );
       
        this.columnHandlers = new ArrayList<ColumnHandler>();
       
        final ColumnViewerEditorActivationStrategy activationStrategy = new ColumnViewerEditorActivationStrategy( this.tableViewer )
        {
            protected boolean isEditorActivationEvent( final ColumnViewerEditorActivationEvent event )
            {
                final int columnIndex = ( (ViewerCell) event.getSource() ).getColumnIndex();
                final ColumnHandler columnHandler = getColumnHandler( columnIndex );
View Full Code Here

        }
    }

    public static void prepare(ColumnViewer viewer)
    {
        ColumnViewerEditorActivationStrategy activationStrategy = new ColumnViewerEditorActivationStrategy(viewer)
        {
            protected boolean isEditorActivationEvent(ColumnViewerEditorActivationEvent event)
            {
                return event.eventType == ColumnViewerEditorActivationEvent.TRAVERSAL
                                || event.eventType == ColumnViewerEditorActivationEvent.MOUSE_DOUBLE_CLICK_SELECTION
View Full Code Here

    });

    v.setColumnProperties(new String[] { "1", "2", "3" });

    ColumnViewerEditorActivationStrategy actSupport = new ColumnViewerEditorActivationStrategy(
        v) {
      protected boolean isEditorActivationEvent(
          ColumnViewerEditorActivationEvent event) {
        return event.eventType == ColumnViewerEditorActivationEvent.TRAVERSAL
            || event.eventType == ColumnViewerEditorActivationEvent.MOUSE_DOUBLE_CLICK_SELECTION
View Full Code Here

TOP

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

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.