Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.jface.viewers
Class CellNavigationStrategy


java.lang.Object
  extended by 
org.eclipse.jface.viewers.CellNavigationStrategy

public class CellNavigationStrategy
extends Object

This class implementation the strategy how the table is navigated using the keyboard.

Subclasses can implement their custom navigation algorithms

Since:
3.3

Constructor Summary
CellNavigationStrategy ()
           
 
Method Summary
 void collapse ( ColumnViewer viewer, ViewerCell cellToCollapse, Event event)
           
 void expand ( ColumnViewer viewer, ViewerCell cellToExpand, Event event)
           
  ViewerCell findSelectedCell ( ColumnViewer viewer, ViewerCell currentSelectedCell, Event event)
           
protected  void init ()
          This method is called by the framework to initialize this navigation strategy object.
 boolean isCollapseEvent ( ColumnViewer viewer, ViewerCell cellToCollapse, Event event)
           
 boolean isExpandEvent ( ColumnViewer viewer, ViewerCell cellToExpand, Event event)
           
 boolean isNavigationEvent ( ColumnViewer viewer, Event event)
          is the given event an event which moves the selection to another cell
 boolean shouldCancelEvent ( ColumnViewer viewer, Event event)
          This method is consulted to decide whether an event has to be canceled or not.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CellNavigationStrategy

public CellNavigationStrategy()
Method Detail

isNavigationEvent

public boolean isNavigationEvent(
ColumnViewer viewer,
                                 
Event event)
is the given event an event which moves the selection to another cell

Parameters:
viewer - the viewer we are working for
event - the key event
Returns:
true if a new cell is searched

isCollapseEvent

public boolean isCollapseEvent(
ColumnViewer viewer,
                               
ViewerCell cellToCollapse,
                               
Event event)
Parameters:
viewer - the viewer we are working for
cellToCollapse - the cell to collapse
event - the key event
Returns:
true if this event triggers collapsing of a node

isExpandEvent

public boolean isExpandEvent(
ColumnViewer viewer,
                             
ViewerCell cellToExpand,
                             
Event event)
Parameters:
viewer - the viewer we are working for
cellToExpand - the cell to expand
event - the key event
Returns:
true if this event triggers expanding of a node

expand

public void expand(
ColumnViewer viewer,
                   
ViewerCell cellToExpand,
                   
Event event)
Parameters:
viewer - the viewer working for
cellToExpand - the cell the user wants to expand
event - the event triggering the expansion

collapse

public void collapse(
ColumnViewer viewer,
                     
ViewerCell cellToCollapse,
                     
Event event)
Parameters:
viewer - the viewer working for
cellToCollapse - the cell the user wants to collapse
event - the event triggering the expansion

findSelectedCell

public 
ViewerCell findSelectedCell(
ColumnViewer viewer,
                                   
ViewerCell currentSelectedCell,
                                   
Event event)
Parameters:
viewer - the viewer we are working for
currentSelectedCell - the cell currently selected
event - the key event
Returns:
the cell which is highlighted next or null if the default implementation is taken. E.g. it's fairly impossible to react on PAGE_DOWN requests

shouldCancelEvent

public boolean shouldCancelEvent(
ColumnViewer viewer,
                                 
Event event)
This method is consulted to decide whether an event has to be canceled or not. By default events who collapse/expand tree-nodes are canceled

Parameters:
viewer - the viewer working for
event - the event
Returns:
true if the event has to be canceled

init

protected void init()
This method is called by the framework to initialize this navigation strategy object. Subclasses may extend.


Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire