|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.klg.jclass.higrid.Controller
The Controller
class performs the Controller function in the
Model-View-Controller (MVC) paradigm. It handles all mouse and keyboard input
and positions the CellEditors in the GridArea.
Nested Class Summary | |
protected class |
Controller.JColumnHeaderLabel
|
Field Summary | |
protected Vector |
actions
|
protected int |
columnIndexResize
|
protected Controller.JColumnHeaderLabel |
columnLabel
|
protected Point |
columnOrigin
|
protected int |
columnXResize
|
protected int |
currentAction
|
protected com.klg.jclass.higrid.CellPosition |
currentCell
|
protected com.klg.jclass.cell.JCCellEditor |
currentCellEditor
|
protected int |
desiredColumn
|
protected boolean |
duringTraversal
|
protected com.klg.jclass.higrid.HiGridFocusAdapter |
focusListener
|
protected boolean |
inEditMode
|
protected int |
lastKeyProcessed
|
protected com.klg.jclass.higrid.RowNode |
lastSelectedRowNode
|
static int |
MINIMUM_COLUMN_WIDTH
|
static int |
MINIMUM_ROW_HEIGHT
|
protected boolean |
mouseExited
|
protected boolean |
movingColumn
|
protected Class |
nullEditor
|
protected Point |
originalMousePress
|
protected com.klg.jclass.higrid.CellPosition |
resizeCell
|
protected com.klg.jclass.higrid.RowNode |
resizeLevel
|
protected JPanel |
resizer
|
protected boolean |
resizingColumn
|
protected boolean |
resizingRow
|
protected int |
rowYResize
|
static int |
SELECT_TOLERANCE
|
protected com.klg.jclass.higrid.CellPosition |
selectedCell
|
protected Vector |
selectedRowNodes
|
protected boolean |
selectingColumn
|
protected int |
xResizeOffset
|
protected int |
yResizeOffset
|
Constructor Summary | |
Controller(com.klg.jclass.higrid.HiGrid grid)
|
Method Summary | |
protected void |
acquireFocusForCellEditor()
Attempts to acquire keyboard focus for the current CellEditor |
void |
addAction(com.klg.jclass.higrid.ActionInitiator initiator,
int action)
Adds an ActionInitiator /action pair to table. |
void |
addAction(com.klg.jclass.higrid.HiGridAction action)
Adds a HiGridAction to table. |
protected void |
addEditor()
Adds the current CellEditor to the GridArea |
void |
cancelCellEditing()
Tells the current CellEditor to cancel editing. |
protected boolean |
canSelectRowNode(int selectionMode,
com.klg.jclass.higrid.RowNode referenceRowNode,
com.klg.jclass.higrid.RowNode rowNode)
Helper method to determine if selection mode allows the operation to continue. |
protected boolean |
collapseFolder(com.klg.jclass.higrid.RowNode rowNode)
Collapses the passed rowNode. |
protected boolean |
commitAndConvert()
Tries to complete any existing CellEditor edits, validate the result and store the result in the dataModel. |
protected boolean |
containerReserved(com.klg.jclass.cell.JCKeyModifier km)
Determines whether the specified key modifier represents an attempt by an editor to reserve a key that Table reserves for itself. |
protected void |
createColumnLabel()
Creates the moving column header label for run-time user placement of columns. |
void |
createDefaultActions()
Re-creates all standard actions. |
protected void |
createEditor()
Creates a CellEditor for the current cell |
protected void |
createEditor(AWTEvent initialEvent)
Creates a CellEditor for the current cell |
protected boolean |
doRowSelection(com.klg.jclass.higrid.RowNode rowNode,
int selectionMode)
Do row select based on the selection mode. |
protected boolean |
doRowSelection(com.klg.jclass.higrid.RowNode rowNode,
int selectionMode,
boolean groupSelection)
Do row select/deselect based on mouse input |
protected boolean |
doRowSelection(com.klg.jclass.higrid.RowNode rowNode,
int selectionMode,
boolean groupSelection,
boolean refresh)
Do row select/deselect based on mouse input |
protected com.klg.jclass.higrid.CellPosition |
doTheRecordWalk(com.klg.jclass.higrid.RowNode startNode,
int count,
boolean downward)
Walks the RowTree to a CellPosition based on the passed parameters. |
protected boolean |
duringColumnResizing(com.klg.jclass.higrid.NullGraphics nullgc)
Returns true if the mouse is over a column divider. |
protected boolean |
duringRowResizing(com.klg.jclass.higrid.NullGraphics nullgc)
Returns true if the mouse is over a row divider. |
void |
editingCanceled(com.klg.jclass.cell.JCCellEditorEvent e)
Tells the listeners that the editor has cancelled editing. |
void |
editingStopped(com.klg.jclass.cell.JCCellEditorEvent e)
Tells the listeners that the editor has ended editing. |
protected void |
exchangeColumns(com.klg.jclass.higrid.CellPosition oldCell,
com.klg.jclass.higrid.CellPosition newCell)
Exchanges two columns within a given table. |
protected void |
exchangeColumns(Vector dataFormats,
int oldColumn,
int newColumn)
Helper method to exchange two columns within a given table. |
protected boolean |
expandFolder(com.klg.jclass.higrid.RowNode rowNode)
Expands the passed rowNode. |
int |
getAction(AWTEvent event)
Returns the action mapped to the given event. |
int |
getActualIndex(com.klg.jclass.higrid.RowFormat newRowFormat,
int newDesiredColumn)
Retrieves an actual column index given a desired column. |
Enumeration |
getAllActions()
Returns an enumeration of the HiGridActions |
protected com.klg.jclass.higrid.NullGraphics |
getCellFromXY(Point point)
Determines the cell that corresponds to the given point. |
int |
getCurrentAction()
Retrieves the HiGridAction (if any) that is being currently processed. |
protected com.klg.jclass.higrid.CellPosition |
getCurrentCell()
Retrieves the current edit cell |
protected int |
getDesiredColumn()
Retrieves the desired column. |
protected void |
getEditorSize(Component editComponent,
com.klg.jclass.higrid.CellFormat format,
Dimension cellSize)
Gets the CellEditor size based on the EditWidth and EditHeight policies. |
protected com.klg.jclass.higrid.CellPosition |
getFirstCell(com.klg.jclass.higrid.RowNode row)
Returns the first available editable position in the grid |
protected Component |
getFirstTraversable(Component editorComponent)
Retrieves the first traversable component of the CellEditor |
protected com.klg.jclass.higrid.CellPosition |
getLastCell(com.klg.jclass.higrid.RowNode row)
Returns the last available editable position in the grid |
com.klg.jclass.higrid.MouseActionInitiator |
getMouseActionInitiator(int button_mask,
int modifier)
Returns the specified MouseActionInitiator, If no matching ActionInitiator exists, null is returned. |
Vector |
getSelectedRows()
Returns the Vector of selected row items. |
int |
getVisibleIndex(com.klg.jclass.higrid.CellPosition newPosition)
Retrieves the visible column index associated with the given cell. |
protected com.klg.jclass.higrid.NullGraphics |
getXYFromCell(com.klg.jclass.higrid.CellPosition cellPosition)
Determines the point that corresponds to the given cell. |
protected com.klg.jclass.higrid.CellPosition |
goDown()
Traverse to the same column in the next row. |
protected com.klg.jclass.higrid.CellPosition |
goEnd()
Traverse to the last cell in the current row. |
protected com.klg.jclass.higrid.CellPosition |
goHome()
Traverse to the first cell in the current row. |
protected com.klg.jclass.higrid.CellPosition |
goLeft()
Traverse to the previous column in the same row. |
protected com.klg.jclass.higrid.CellPosition |
goLevelDown()
Traverse to the next row of the table associated with the current row. |
protected com.klg.jclass.higrid.CellPosition |
goLevelDown(com.klg.jclass.higrid.RowNode rowNode,
boolean downOneOnly)
Traverse to the next row of the table associated with the passed row. |
protected com.klg.jclass.higrid.CellPosition |
goLevelEnd()
Traverse to the previous row of the table associated with the current row. |
protected com.klg.jclass.higrid.CellPosition |
goLevelEnd(com.klg.jclass.higrid.RowNode rowNode)
Traverse to the last row of the table associated with the passed row. |
protected com.klg.jclass.higrid.CellPosition |
goLevelHome()
Traverse to the first row of the table associated with the current row. |
protected com.klg.jclass.higrid.CellPosition |
goLevelHome(com.klg.jclass.higrid.RowNode rowNode)
Traverse to the first row of the table associated with the passed row. |
protected com.klg.jclass.higrid.CellPosition |
goLevelParent()
Traverse to the parent row of the current row. |
protected com.klg.jclass.higrid.CellPosition |
goLevelUp()
Traverse to the previous row of the table associated with the current row. |
protected com.klg.jclass.higrid.CellPosition |
goLevelUp(com.klg.jclass.higrid.RowNode rowNode,
boolean upOneOnly)
Traverse to the previous row of the table associated with the passed row. |
protected com.klg.jclass.higrid.CellPosition |
goRight()
Traverse to the next column in the same row. |
protected com.klg.jclass.higrid.CellPosition |
goUp()
Traverse to the same column in the previous row. |
protected void |
handleAutoEdit()
Pops up the appropriate CellEditor if HiGrid is in autoEdit mode. |
protected int |
horizontalCellAdjustment(com.klg.jclass.higrid.CellPosition cellPosition)
Computes the number of pixels needed to scroll horizontally to make the passed cellPosition visible. |
protected void |
initializeEditor()
Initializes the current CellEditor |
protected void |
initializeEditor(AWTEvent initialEvent)
Initializes the current CellEditor |
protected boolean |
isSourceEditorComponent(Object source)
Checks whether the passed source object refers to the current CellEditor. |
protected boolean |
isTraversing()
Retrieves whether we are currently traversing |
void |
keyPressed(KeyEvent e)
|
void |
keyReleased(KeyEvent e)
|
void |
keyTyped(KeyEvent e)
|
void |
makeCellEditorVisible()
Scrolls HiGrid so that the current CellEditor is in view. |
protected void |
makeCellEditorVisible(int action)
Scrolls HiGrid so that the current CellEditor is in view. |
void |
mouseClicked(MouseEvent e)
|
void |
mouseDragged(MouseEvent e)
|
void |
mouseEntered(MouseEvent e)
|
void |
mouseExited(MouseEvent e)
|
void |
mouseMoved(MouseEvent e)
|
void |
mousePressed(MouseEvent e)
|
void |
mouseReleased(MouseEvent e)
|
boolean |
moveCurrentCell(com.klg.jclass.higrid.CellPosition newPosition,
int newDesiredColumn)
Moves the current cell to the new row and column. |
boolean |
moveCurrentCell(com.klg.jclass.higrid.CellPosition newPosition,
int newDesiredColumn,
boolean refresh,
boolean moveInDataModel)
Moves the current cell to the new row and column. |
protected boolean |
moveCurrentCellInternal(com.klg.jclass.higrid.CellPosition newPosition,
int newDesiredColumn)
Moves the current cell to the new row and column. |
protected boolean |
moveCurrentCellInternal(com.klg.jclass.higrid.CellPosition newPosition,
int newDesiredColumn,
boolean refresh,
boolean moveInDataModel)
Moves the current cell to the new row and column. |
void |
pasteData(Vector rows,
com.klg.jclass.higrid.RowNode insertBefore)
Pastes a vector of rows before the given cellPosition. |
void |
performCopyAction()
Executes a copy action using the system clipboard. |
void |
performCopyAction(Vector rows)
Executes a copy action using the system clipboard. |
void |
performPasteAction()
Executes a paste action using the system clipboard. |
void |
performPasteAction(com.klg.jclass.higrid.CellPosition cellPosition)
Executes a paste action using the system clipboard. |
protected void |
popupEditor(AWTEvent initialEvent)
Pops up the CellEditor for the current cell |
protected void |
positionColumnLabel(MouseEvent e)
Positions the moving column header label horizontally based on user input, but keeps it from moving vertically. |
protected void |
positionCurrentCell()
Finds a default place to put the current cell when it is uninitialized |
protected void |
positionEditor()
Positions the current CellEditor at the current cell |
protected void |
positionEditor(boolean wantFocus)
Positions the current CellEditor at the current cell |
protected void |
processKey(KeyEvent e)
Processes the KeyEvent from the user. |
void |
removeAction(com.klg.jclass.higrid.ActionInitiator initiator,
int action)
Removes an ActionInitiator /action pair from HiGrid. |
void |
removeAction(com.klg.jclass.higrid.HiGridAction action)
Removes an action from HiGrid. |
void |
removeAction(int action)
Removes any ActionInitiator set for the given action type. |
void |
removeAllActions()
Removes all actions from HiGrid. |
void |
removeAllKeyActions()
Removes all key actions from HiGrid. |
void |
removeAllMouseActions()
Removes all mouse actions from HiGrid. |
protected void |
removeEditor()
Removes the current CellEditor from the GridArea |
protected void |
repositionCurrentCell(com.klg.jclass.higrid.RowNode rowNode,
boolean showEditor,
boolean moveEditor)
Reposition the current cell. |
protected boolean |
resetRowSelection()
Reset all row selection. |
protected boolean |
resetRowSelection(boolean refresh)
Reset all row selection. |
protected boolean |
scrollEditorIntoView(int action)
Scrolls both vertically and horizontally, if necessary, to scroll the current CellEditor into view. |
protected boolean |
selectRows(com.klg.jclass.higrid.RowNode rowNode,
boolean state)
(De-)Select the passed RowNode. |
protected boolean |
selectRows(Vector rows,
boolean state)
(De-)Select the passed Vector of rows. |
protected void |
setCurrentAction(int action)
Sets the HiGridAction (if any) that is being currently processed. |
protected void |
setCurrentCell(com.klg.jclass.higrid.CellPosition pos)
Sets the current edit cell |
protected void |
setDesiredColumn(int column)
Sets the desired column. |
protected void |
setOurCursor(MouseEvent e)
Based on the passed event, sets the appropriate cursor for HiGrid. |
protected void |
setSelectedRows(Vector rowNodes)
Sets the Vector of selected row items. |
protected boolean |
shouldProcessThisKey(int key,
int modifiers)
Determines whether the specified key and modifier represents a combination that HiGrid should process, or whether it is reserved by a CellEditor. |
protected void |
showEditor(boolean show)
Shows or hides the current CellEditor |
protected void |
showPopupMenu(InputEvent e)
Helper method to show the popup menu |
void |
stopCellEditing()
Tells the current CellEditor to (save changes and) stop editing. |
protected boolean |
traverseToCell(com.klg.jclass.higrid.CellPosition newCellPosition,
int newDesiredColumn,
AWTEvent initialEvent)
Traverses to the new cell and displays a CellEditor |
protected boolean |
validateAndTraverse(com.klg.jclass.higrid.CellPosition newCellPosition,
int newDesiredColumn,
AWTEvent initialEvent)
Validates any changes in the CellEditor and traverses to the new cell. |
protected boolean |
validateCell(com.klg.jclass.higrid.CellPosition newCellPosition)
Tries to complete any outstanding edits and validate the passed cellPosition |
protected boolean |
validateCell(com.klg.jclass.higrid.CellPosition newCellPosition,
boolean refresh)
Tries to complete any outstanding edits and validate the passed cellPosition |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int MINIMUM_COLUMN_WIDTH
public static final int MINIMUM_ROW_HEIGHT
public static final int SELECT_TOLERANCE
protected boolean resizingColumn
protected int columnXResize
protected int xResizeOffset
protected int columnIndexResize
protected boolean resizingRow
protected int rowYResize
protected int yResizeOffset
protected com.klg.jclass.higrid.RowNode resizeLevel
protected JPanel resizer
protected com.klg.jclass.higrid.CellPosition resizeCell
protected boolean movingColumn
protected Controller.JColumnHeaderLabel columnLabel
protected boolean mouseExited
protected Point columnOrigin
protected boolean selectingColumn
protected com.klg.jclass.higrid.CellPosition selectedCell
protected Point originalMousePress
protected com.klg.jclass.higrid.CellPosition currentCell
protected com.klg.jclass.cell.JCCellEditor currentCellEditor
protected boolean inEditMode
protected int desiredColumn
protected com.klg.jclass.higrid.RowNode lastSelectedRowNode
protected Vector selectedRowNodes
protected Vector actions
protected int currentAction
protected boolean duringTraversal
protected Class nullEditor
protected com.klg.jclass.higrid.HiGridFocusAdapter focusListener
protected int lastKeyProcessed
Constructor Detail |
public Controller(com.klg.jclass.higrid.HiGrid grid)
Method Detail |
protected boolean isTraversing()
protected com.klg.jclass.higrid.CellPosition getCurrentCell()
protected void setCurrentCell(com.klg.jclass.higrid.CellPosition pos)
pos
- The current cell positionprotected int getDesiredColumn()
protected void setDesiredColumn(int column)
column
- The desired column.protected boolean containerReserved(com.klg.jclass.cell.JCKeyModifier km)
protected boolean shouldProcessThisKey(int key, int modifiers)
protected void processKey(KeyEvent e)
e
- KeyEvent created by user keyPress.protected void setCurrentAction(int action)
action
- the current HiGridAction being processedpublic int getCurrentAction()
HiGridAction.NO_ACTION
is returned if no action is being processed.public void keyPressed(KeyEvent e)
keyPressed
in interface KeyListener
public void keyReleased(KeyEvent e)
keyReleased
in interface KeyListener
public void keyTyped(KeyEvent e)
keyTyped
in interface KeyListener
public int getVisibleIndex(com.klg.jclass.higrid.CellPosition newPosition)
newPosition
- the new CellPosition being traversed to.
public int getActualIndex(com.klg.jclass.higrid.RowFormat newRowFormat, int newDesiredColumn)
newRowFormat
- the new row to move tonewDesiredColumn
- the column to move to
protected com.klg.jclass.higrid.CellPosition goHome()
protected com.klg.jclass.higrid.CellPosition goEnd()
protected com.klg.jclass.higrid.CellPosition goUp()
protected com.klg.jclass.higrid.CellPosition goDown()
protected com.klg.jclass.higrid.CellPosition goLeft()
protected com.klg.jclass.higrid.CellPosition goRight()
protected com.klg.jclass.higrid.CellPosition goLevelHome(com.klg.jclass.higrid.RowNode rowNode)
protected com.klg.jclass.higrid.CellPosition goLevelHome()
protected com.klg.jclass.higrid.CellPosition goLevelUp()
protected com.klg.jclass.higrid.CellPosition goLevelUp(com.klg.jclass.higrid.RowNode rowNode, boolean upOneOnly)
protected com.klg.jclass.higrid.CellPosition goLevelEnd(com.klg.jclass.higrid.RowNode rowNode)
protected com.klg.jclass.higrid.CellPosition goLevelEnd()
protected com.klg.jclass.higrid.CellPosition goLevelDown()
protected com.klg.jclass.higrid.CellPosition goLevelDown(com.klg.jclass.higrid.RowNode rowNode, boolean downOneOnly)
protected com.klg.jclass.higrid.CellPosition goLevelParent()
protected boolean isSourceEditorComponent(Object source)
public void editingStopped(com.klg.jclass.cell.JCCellEditorEvent e)
editingStopped
in interface JCCellEditorListener
e
- public void editingCanceled(com.klg.jclass.cell.JCCellEditorEvent e)
editingCanceled
in interface JCCellEditorListener
e
- public void cancelCellEditing()
public void stopCellEditing()
protected void handleAutoEdit()
public void mouseClicked(MouseEvent e)
mouseClicked
in interface MouseListener
public void mouseEntered(MouseEvent e)
mouseEntered
in interface MouseListener
public void mouseExited(MouseEvent e)
mouseExited
in interface MouseListener
public void mousePressed(MouseEvent e)
mousePressed
in interface MouseListener
public void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
public void mouseDragged(MouseEvent e)
mouseDragged
in interface MouseMotionListener
public void mouseMoved(MouseEvent e)
mouseMoved
in interface MouseMotionListener
protected void setOurCursor(MouseEvent e)
protected void createColumnLabel()
protected void positionColumnLabel(MouseEvent e)
protected boolean duringRowResizing(com.klg.jclass.higrid.NullGraphics nullgc)
protected boolean duringColumnResizing(com.klg.jclass.higrid.NullGraphics nullgc)
protected void exchangeColumns(Vector dataFormats, int oldColumn, int newColumn)
protected void exchangeColumns(com.klg.jclass.higrid.CellPosition oldCell, com.klg.jclass.higrid.CellPosition newCell)
protected boolean expandFolder(com.klg.jclass.higrid.RowNode rowNode)
rowNode
- the RowNode to expand.
protected boolean collapseFolder(com.klg.jclass.higrid.RowNode rowNode)
rowNode
- the RowNode to expand.
protected void showEditor(boolean show)
protected void initializeEditor()
protected void initializeEditor(AWTEvent initialEvent)
initialEvent
- the initial MouseEvent or KeyEventprotected void removeEditor()
protected void addEditor()
protected void createEditor()
protected void createEditor(AWTEvent initialEvent)
initialEvent
- the initial MouseEvent or KeyEventprotected void positionEditor()
protected void positionEditor(boolean wantFocus)
wantFocus
- if true, also tries to acquire keyboard focus for the editorprotected void acquireFocusForCellEditor()
protected void getEditorSize(Component editComponent, com.klg.jclass.higrid.CellFormat format, Dimension cellSize)
editComponent
- the editor's componentformat
- the format for the cell that the editor will be placed atcellSize
- the eventual size of the editorprotected Component getFirstTraversable(Component editorComponent)
editorComponent
- the CellEditor's componentprotected void positionCurrentCell()
protected void repositionCurrentCell(com.klg.jclass.higrid.RowNode rowNode, boolean showEditor, boolean moveEditor)
rowNode
- The row node of the current cell.showEditor
- if true, display the editormoveEditor
- if true, move the editor to this locationprotected com.klg.jclass.higrid.CellPosition getLastCell(com.klg.jclass.higrid.RowNode row)
row
- The row to look on; if null start at the first row of the gridprotected com.klg.jclass.higrid.CellPosition getFirstCell(com.klg.jclass.higrid.RowNode row)
row
- The row to look on; if null start at the first row of the gridprotected boolean commitAndConvert()
protected int horizontalCellAdjustment(com.klg.jclass.higrid.CellPosition cellPosition)
cellPosition
- the CellPosition to scroll into viewprotected boolean scrollEditorIntoView(int action)
action
- the action that initiated the scrollpublic void makeCellEditorVisible()
protected void makeCellEditorVisible(int action)
action
- Action that caused traversalpublic boolean moveCurrentCell(com.klg.jclass.higrid.CellPosition newPosition, int newDesiredColumn)
newPosition
- the new cell to move tonewDesiredColumn
- the default column to move to when moving vertically
Due to cell visibility, the desired column may not be always possible.
public boolean moveCurrentCell(com.klg.jclass.higrid.CellPosition newPosition, int newDesiredColumn, boolean refresh, boolean moveInDataModel)
newPosition
- the new cell to move tonewDesiredColumn
- the default column to move to when moving verticallyrefresh
- if true refresh editStatusmoveInDataModel
- if true, also move current row in dataModel
Due to cell visibility, the desired column may not be always possible.
protected boolean moveCurrentCellInternal(com.klg.jclass.higrid.CellPosition newPosition, int newDesiredColumn)
newPosition
- the new cell to move tonewDesiredColumn
- the default column to move to when moving verticallyprotected boolean moveCurrentCellInternal(com.klg.jclass.higrid.CellPosition newPosition, int newDesiredColumn, boolean refresh, boolean moveInDataModel)
newPosition
- the new cell to move tonewDesiredColumn
- the default column to move to when moving verticallyrefresh
- if true refresh editStatusmoveInDataModel
- if true, also move current row in dataModelprotected boolean validateCell(com.klg.jclass.higrid.CellPosition newCellPosition)
newCellPosition
- the new cell to move to
protected boolean validateCell(com.klg.jclass.higrid.CellPosition newCellPosition, boolean refresh)
newCellPosition
- the new cell to move torefresh
- if true refresh editStatus or current cell
protected boolean traverseToCell(com.klg.jclass.higrid.CellPosition newCellPosition, int newDesiredColumn, AWTEvent initialEvent)
newDesiredColumn
- the default column to move to when moving verticallyinitialEvent
- the initial MouseEvent or KeyEvent
protected void popupEditor(AWTEvent initialEvent)
initialEvent
- the initial MouseEvent or KeyEventprotected boolean validateAndTraverse(com.klg.jclass.higrid.CellPosition newCellPosition, int newDesiredColumn, AWTEvent initialEvent)
newDesiredColumn
- the default column to move to when moving verticallyinitialEvent
- the initial MouseEvent or KeyEvent
protected com.klg.jclass.higrid.NullGraphics getCellFromXY(Point point)
point
- a point on the grid
protected com.klg.jclass.higrid.NullGraphics getXYFromCell(com.klg.jclass.higrid.CellPosition cellPosition)
cellPosition
- a cell in the grid
protected com.klg.jclass.higrid.CellPosition doTheRecordWalk(com.klg.jclass.higrid.RowNode startNode, int count, boolean downward)
startNode
- the initial row to walk fromcount
- the number of units to walkdownward
- if true walk downward verticallyprotected void showPopupMenu(InputEvent e)
public void performCopyAction()
public void performCopyAction(Vector rows)
rows
- The rows to copy to the clipboard.public void performPasteAction()
public void performPasteAction(com.klg.jclass.higrid.CellPosition cellPosition)
cellPosition
- the cell position to insert beforepublic void pasteData(Vector rows, com.klg.jclass.higrid.RowNode insertBefore)
rows
- a vector of row object vectorsinsertBefore
- the row to insert/paste the rows beforepublic Vector getSelectedRows()
protected void setSelectedRows(Vector rowNodes)
rowNodes
- The Vector of RowNodes.protected boolean canSelectRowNode(int selectionMode, com.klg.jclass.higrid.RowNode referenceRowNode, com.klg.jclass.higrid.RowNode rowNode)
selectionMode
- The row selection mode.referenceRowNode
- The reference row node.rowNode
- The row node to check.
protected boolean doRowSelection(com.klg.jclass.higrid.RowNode rowNode, int selectionMode, boolean groupSelection, boolean refresh)
rowNode
- The record row node where the mouse click occurred.selectionMode
- The row selection mode.groupSelection
- True if a group of rows from the last single
row selected should be selected.refresh
- True if the rows are to be repainted.protected boolean doRowSelection(com.klg.jclass.higrid.RowNode rowNode, int selectionMode, boolean groupSelection)
rowNode
- The record row node where the mouse click occurred.selectionMode
- The row selection mode.groupSelection
- True if a group of rows from the last single
row selected should be selected.protected boolean doRowSelection(com.klg.jclass.higrid.RowNode rowNode, int selectionMode)
rowNode
- The record row node where the mouse click occurred.selectionMode
- The row selection mode.
protected boolean resetRowSelection()
protected boolean resetRowSelection(boolean refresh)
refresh
- True if the rows are to be refreshed.protected boolean selectRows(com.klg.jclass.higrid.RowNode rowNode, boolean state)
rowNode
- A RowNode to selectstate
- true for Select, false for Deselect
protected boolean selectRows(Vector rows, boolean state)
rows
- A Vector of RowNodes to selectstate
- true for Select, false for Deselect
public void addAction(com.klg.jclass.higrid.ActionInitiator initiator, int action)
ActionInitiator
/action pair to table.
addAction(HiGridAction)
public void addAction(com.klg.jclass.higrid.HiGridAction action)
HiGridAction
to table. A HiGridAction
maps an event to a particular action on HiGrid.
public int getAction(AWTEvent event)
HiGridAction.NO_ACTION
is returned.
public com.klg.jclass.higrid.MouseActionInitiator getMouseActionInitiator(int button_mask, int modifier)
public void removeAction(com.klg.jclass.higrid.HiGridAction action)
public void removeAction(com.klg.jclass.higrid.ActionInitiator initiator, int action)
ActionInitiator
/action pair from HiGrid.
public void removeAction(int action)
ActionInitiator
set for the given action type.
public void removeAllKeyActions()
public void removeAllMouseActions()
public void removeAllActions()
public Enumeration getAllActions()
public void createDefaultActions()
removeAllActions()
first
if you want to start anew.
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |