|
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
|
+--java.util.AbstractCollection
|
+--java.util.AbstractList
|
+--java.util.Vector
|
+--com.klg.jclass.table.JCSeries
|
+--com.klg.jclass.table.ComponentHandler
ComponentHandler controls the placement of components within
table and ensures that traverse from a component to table or table to
component flows across and down the cells or to the left and up for reverse
traversal.
| Field Summary | |
protected boolean |
adjustBoundsRequired
|
protected boolean |
controlDown
|
protected boolean |
needsSetParent
|
protected boolean |
shiftDown
|
protected com.klg.jclass.table.JCTable |
table
|
| Fields inherited from class com.klg.jclass.table.JCSeries |
last_index |
| Fields inherited from class java.util.Vector |
capacityIncrement, elementCount, elementData |
| Fields inherited from class java.util.AbstractList |
modCount |
| Constructor Summary | |
ComponentHandler()
Creates a new ComponentHandler instance. |
|
ComponentHandler(com.klg.jclass.table.JCTable table)
Creates new ComponentHandler instance linked to table. |
|
| Method Summary | |
void |
addComponentsToParent()
Ensures that all components are added to their appropriate CellArea. |
protected void |
addKeyAndFocusListeners(Component c,
KeyListener keyListener,
FocusListener focusListener)
Add key and focus listeners to component if it is focusable, otherwise add them the first child which is focusable |
protected abstract void |
addListeners(Component c,
KeyListener keyListener,
FocusListener focusListener)
|
void |
afterScroll(com.klg.jclass.table.JCScrollEvent e)
Controls the visibility of components when scrolled. |
com.klg.jclass.table.JCCellPosition |
findPosition(Component c)
Determines the cell position of the given component. |
abstract void |
focusGained(FocusEvent event)
Adds a KeyListener to the component when table is managing
component focus. |
abstract void |
focusLost(FocusEvent event)
Removes TraverseHandler as a key listener on the component when it loses focus. |
protected int |
getDirectionFromKeyEvent(KeyEvent event)
Compute the direction from a KeyEvent. |
com.klg.jclass.table.JCTable |
getTable()
Returns the JCTable. |
protected com.klg.jclass.table.JCCellPosition |
getTablePosition(Component component)
Get the position of the component within the table. |
boolean |
isParentSetRequired()
Returns true if one or more components have not been added to table yet. |
abstract void |
keyPressed(KeyEvent event)
Tracks TAB/SHIFT-TAB and keypad arrow keys to control navigation when a component has focus. |
void |
keyReleased(KeyEvent event)
Required by KeyListener but not implemented. |
void |
keyTyped(KeyEvent event)
Required by KeyListener but not implemented. |
void |
reconfigureComponents()
Reconfigure components such that components in visible cells are visible and components in invisible cells are invisible. |
void |
removeCellComponents()
Remove components when a span is added. |
void |
scroll(com.klg.jclass.table.JCScrollEvent e)
Required by JCScrollListener but not implemented. |
void |
setDefault(Object value)
Overrides setDefault in order to add key and focus listeners. |
void |
setParentSetRequired(boolean value)
Flags that one or more components do not have a parent yet. |
void |
setTable(com.klg.jclass.table.JCTable table)
Sets the JCTable. |
boolean |
setValue(int row,
int column,
Object value)
Overrides setValue in order to add key and focus listeners. |
void |
traverseNext(com.klg.jclass.table.JCCellPosition cur_pos,
int type)
Traverses to the next cell when a TAB or SHIFT-TAB is detected on the component. |
protected boolean |
updateTable(Component component)
Update table to reflect that the passed in component in its cell is now the new current cell (it has focus). |
| Methods inherited from class com.klg.jclass.table.JCSeries |
getCellRanges, getDefault, getSeriesValues, getUniqueValues, getValue, moveColumns, moveRows, remapColumns, remapRows, remove, setValue, setValue, shiftColumn, shiftRow, swapColumns, swapRows |
| Methods inherited from class java.util.Vector |
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize |
| Methods inherited from class java.util.AbstractList |
iterator, listIterator, listIterator |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.klg.jclass.table.SeriesModel |
getCellRanges, getDefault, getSeriesValues, getUniqueValues, getValue, setValue, setValue |
| Methods inherited from interface com.klg.jclass.table.Moveable |
moveColumns, moveRows, remapColumns, remapRows, shiftColumn, shiftRow, swapColumns, swapRows |
| Methods inherited from interface java.util.List |
iterator, listIterator, listIterator |
| Field Detail |
protected com.klg.jclass.table.JCTable table
protected boolean adjustBoundsRequired
protected boolean needsSetParent
protected boolean shiftDown
protected boolean controlDown
| Constructor Detail |
public ComponentHandler()
setTable must be called to
connect the handler to table.
public ComponentHandler(com.klg.jclass.table.JCTable table)
table - The table for this component handler| Method Detail |
public com.klg.jclass.table.JCTable getTable()
getTable in interface ComponentModelpublic void setTable(com.klg.jclass.table.JCTable table)
setTable in interface ComponentModeltable - The new table for this component handlerpublic boolean isParentSetRequired()
isParentSetRequired in interface ComponentModelsetParentSetRequired(boolean)public void setParentSetRequired(boolean value)
setParentSetRequired in interface ComponentModelvalue - The new value of parentSetRequired which tells us whether one
or more components do not have a parent yet.
protected void addKeyAndFocusListeners(Component c,
KeyListener keyListener,
FocusListener focusListener)
c - The component to which to add the listenerskeyListener - The key listener to addfocusListener - The focusListener to add
protected abstract void addListeners(Component c,
KeyListener keyListener,
FocusListener focusListener)
public void setDefault(Object value)
setDefault in interface SeriesModelsetDefault in class JCSeriesvalue - The component value on which to add listeners.
public boolean setValue(int row,
int column,
Object value)
setValue in interface SeriesModelsetValue in class JCSeriesrow - The row at which the new component is to be addedcolumn - The column at which the new component is to be addedvalue - The new component value
public void addComponentsToParent()
addComponentsToParent in interface ComponentModelpublic void removeCellComponents()
removeCellComponents in interface ComponentModelpublic com.klg.jclass.table.JCCellPosition findPosition(Component c)
findPosition in interface ComponentModelc - The component whose position we want to find
public void scroll(com.klg.jclass.table.JCScrollEvent e)
scroll in interface JCScrollListenere - The event which causes the scrollJCScrollEvent.setValue(int)public void afterScroll(com.klg.jclass.table.JCScrollEvent e)
afterScroll in interface JCScrollListenere - The event which caused the scrollpublic void reconfigureComponents()
reconfigureComponents in interface ComponentModelprotected com.klg.jclass.table.JCCellPosition getTablePosition(Component component)
component - The component whose position we are interested in finding
EditTraverseHandler.getFocusableChild(java.awt.Component)public abstract void focusGained(FocusEvent event)
KeyListener to the component when table is managing
component focus. Cancels any edit and cause a traversal to the underlying
cell.
focusGained in interface FocusListenerevent - The focus event which caused foucs to be gained.public abstract void focusLost(FocusEvent event)
focusLost in interface FocusListenerevent - The focus event which caused foucs to be lost.protected boolean updateTable(Component component)
component - The component that has received the focus.
protected int getDirectionFromKeyEvent(KeyEvent event)
event - The given key event
public abstract void keyPressed(KeyEvent event)
keyPressed in interface KeyListenerevent - The event from the key presspublic void keyReleased(KeyEvent event)
keyReleased in interface KeyListenerevent - The event from the key releasepublic void keyTyped(KeyEvent event)
keyTyped in interface KeyListenerevent - The event from the key being typed
public void traverseNext(com.klg.jclass.table.JCCellPosition cur_pos,
int type)
cur_pos - The current cell positiontype - The desired direction in which to move, one of
JCTableEnum.TRAVERSE_UP, JCTableEnum.TRAVERSE_DOWN,
JCTableEnum.TRAVERSE_LEFT, JCTableEnum.TRAVERSE_RIGHT.
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||