org.jboss.errai.widgets.client
Interface FocusManager

All Known Implementing Classes:
DefaultFocusManager

public interface FocusManager

Defines the operations associated with selecting a range of cells within a grid WSGrid. A start cell is first set and the focus range can be thought to extend from the start cell in one of four directions. A "move" is quite distinct to extending the corresponding edge of a selection range; as the consequence can be dependent upon the position of the focus extent relative to the start cell. For example the classic operation would be for a move left to the left of the start cell to set focus; whereas a move left when to the right of the start cell could clear the focus.


Method Summary
 WSGrid.WSCell getStartCell()
          Return the starting cell.
 boolean isInitialised()
          Returns true if the start cell has been set.
 int moveDownwards()
          A move downwards.
 int moveLeft()
          A move left.
 int moveRight()
          A move right.
 int moveUpwards()
          A move upwards.
 void reset()
          Remove the start cell returning the manager to an uninitialised state
 void setStartCell(WSGrid.WSCell cell)
          The start cell represents the initial selection of a single cell in a range from which the edges can be thought to extend to encompass a greater range
 

Method Detail

moveLeft

int moveLeft()
A move left.

Returns:
The number of cells moved (merged cells have their content counted individually)

moveRight

int moveRight()
A move right.

Returns:
The number of cells moved (merged cells have their content counted individually)

moveUpwards

int moveUpwards()
A move upwards.

Returns:
The number of cells moved (merged cells have their content counted individually)

moveDownwards

int moveDownwards()
A move downwards.

Returns:
The number of cells moved (merged cells have their content counted individually)

setStartCell

void setStartCell(WSGrid.WSCell cell)
The start cell represents the initial selection of a single cell in a range from which the edges can be thought to extend to encompass a greater range

Parameters:
cell -

getStartCell

WSGrid.WSCell getStartCell()
Return the starting cell.

Returns:

isInitialised

boolean isInitialised()
Returns true if the start cell has been set.

Returns:

reset

void reset()
Remove the start cell returning the manager to an uninitialised state



Copyright © 2011 JBoss, a division of Red Hat. All Rights Reserved.