Package org.eclipse.jface.viewers

Examples of org.eclipse.jface.viewers.ViewerCell


  /* (non-Javadoc)
   * @see net.sf.logsaw.ui.editors.ILogViewEditor#getSelectedLogEntry()
   */
  @Override
  public LogEntry getSelectedLogEntry() {
    ViewerCell cell = focusCellManager.getFocusCell();
    if ((cell != null) && (cell.getColumnIndex() > 0)) {
      return (LogEntry) cell.getElement();
    }
    return null;
  }
View Full Code Here


    _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;
          //isEditorActivationEvent = event.eventType == ColumnViewerEditorActivationEvent.MOUSE_CLICK_SELECTION || (event.eventType == ColumnViewerEditorActivationEvent.KEY_PRESSED && event.keyCode == ' ') || event.eventType == ColumnViewerEditorActivationEvent.PROGRAMMATIC;
        } else {
          isEditorActivationEvent = event.eventType == ColumnViewerEditorActivationEvent.TRAVERSAL || event.eventType == ColumnViewerEditorActivationEvent.MOUSE_DOUBLE_CLICK_SELECTION || (event.eventType == ColumnViewerEditorActivationEvent.KEY_PRESSED && event.keyCode == ' ') || event.eventType == ColumnViewerEditorActivationEvent.PROGRAMMATIC;
          //isEditorActivationEvent = event.eventType == ColumnViewerEditorActivationEvent.TRAVERSAL || event.eventType == ColumnViewerEditorActivationEvent.MOUSE_DOUBLE_CLICK_SELECTION || event.eventType == ColumnViewerEditorActivationEvent.PROGRAMMATIC;
View Full Code Here

    final Table t = tv.getTable();
    return new CellNavigationStrategy() {
      @Override
      public ViewerCell findSelectedCell(ColumnViewer viewer,
          ViewerCell currentSelectedCell, Event event) {
        final ViewerCell cell = super.findSelectedCell(viewer, currentSelectedCell, event);
        if(cell != null) {
          t.showColumn(t.getColumn(cell.getColumnIndex()));
        }
        return cell;
      }
    };
  }
View Full Code Here

          ColumnViewerEditorDeactivationEvent event) {
      }
     
      @Override
      public void beforeEditorActivated(ColumnViewerEditorActivationEvent event) {   
        ViewerCell cell = (ViewerCell) event.getSource();
        t.showColumn(t.getColumn(cell.getColumnIndex()));
      }
     
      @Override
      public void afterEditorDeactivated(ColumnViewerEditorDeactivationEvent event) {       
      }
View Full Code Here

    }

    @Override
    protected void triggerEditorActivationEvent( ColumnViewerEditorActivationEvent event ) {
        super.triggerEditorActivationEvent(event);
        ViewerCell source = (ViewerCell) event.getSource();
        int columnIndex = source.getColumnIndex();
        if (columnIndex == 1) {
            Layer element = (Layer) source.getElement();
            element.setVisible(!element.isVisible());
            refresh();
            pane.redraw();
        } else if (columnIndex == 2) {
            Layer element = (Layer) source.getElement();
            try {
                doSetStyle(element);
            } catch (IOException e) {
                e.printStackTrace();
            }
View Full Code Here

   
    resultViewer.getControl().addMouseTrackListener(new MouseTrackAdapter()
    {
      public void mouseHover(MouseEvent e)
      {
        ViewerCell cell = resultViewer.getCell(new Point(e.x, e.y));
       
        if( cell != null && cell.getElement() instanceof SearchResultDoc )
        {
          SearchResultDoc doc = (SearchResultDoc) cell.getElement();
          resultViewer.getTree().setToolTipText(doc.getFilePath());
        }
        else
        {
          resultViewer.getTree().setToolTipText("");
View Full Code Here

TOP

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

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.