com.klg.jclass.table
Class ComponentHandlerOld
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractList
|
+--java.util.Vector
|
+--com.klg.jclass.table.JCSeries
|
+--com.klg.jclass.table.ComponentHandler
|
+--com.klg.jclass.table.ComponentHandlerOld
- All Implemented Interfaces:
- Cloneable, Collection, ComponentModel, EventListener, FocusListener, JCScrollListener, KeyListener, List, Moveable, RandomAccess, Serializable, SeriesModel
- public class ComponentHandlerOld
- extends 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.
- See Also:
- Serialized Form
Constructor Summary |
ComponentHandlerOld()
Creates a new ComponentHandler instance. |
ComponentHandlerOld(com.klg.jclass.table.JCTable table)
Creates new ComponentHandler instance linked to table. |
Method Summary |
protected void |
addListeners(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 |
void |
focusGained(FocusEvent event)
Adds a KeyListener to the component when table is managing
component focus. |
void |
focusLost(FocusEvent event)
Removes TraverseHandler as a key listener on the component when it loses focus. |
void |
keyPressed(KeyEvent event)
Tracks TAB/SHIFT-TAB and keypad arrow keys to control navigation when a
component has focus. |
Methods inherited from class com.klg.jclass.table.ComponentHandler |
addComponentsToParent, addKeyAndFocusListeners, afterScroll, findPosition, getDirectionFromKeyEvent, getTable, getTablePosition, isParentSetRequired, keyReleased, keyTyped, reconfigureComponents, removeCellComponents, scroll, setDefault, setParentSetRequired, setTable, setValue, traverseNext, updateTable |
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 |
fm
protected FocusManager fm
ComponentHandlerOld
public ComponentHandlerOld()
- Creates a new ComponentHandler instance.
setTable
must be called
to connect the handler to table.
ComponentHandlerOld
public ComponentHandlerOld(com.klg.jclass.table.JCTable table)
- Creates new ComponentHandler instance linked to table.
- Parameters:
table
- The table for this component handler
addListeners
protected void addListeners(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
- Specified by:
addListeners
in class ComponentHandler
- Parameters:
c
- The component to which to add the listenerskeyListener
- The key listener to addfocusListener
- The focusListener to add
focusGained
public void focusGained(FocusEvent event)
- Adds a
KeyListener
to the component when table is managing
component focus. Cancels any edit and cause a traversal to the underlying
cell.
- Specified by:
focusGained
in interface FocusListener
- Specified by:
focusGained
in class ComponentHandler
- Parameters:
event
- The focus event which caused foucs to be gained.
focusLost
public void focusLost(FocusEvent event)
- Removes TraverseHandler as a key listener on the component when it loses focus.
- Specified by:
focusLost
in interface FocusListener
- Specified by:
focusLost
in class ComponentHandler
- Parameters:
event
- The focus event which caused foucs to be lost.
keyPressed
public void keyPressed(KeyEvent event)
- Tracks TAB/SHIFT-TAB and keypad arrow keys to control navigation when a
component has focus.
- Specified by:
keyPressed
in interface KeyListener
- Specified by:
keyPressed
in class ComponentHandler
- Parameters:
event
- The event from the key press