JClass DesktopViews 6.3.0 API
Documentation

com.klg.jclass.table
Class FocusManagerOld

java.lang.Object
  |
  +--com.klg.jclass.table.FocusManager
        |
        +--com.klg.jclass.table.FocusManagerOld
All Implemented Interfaces:
FocusModel, Serializable

public class FocusManagerOld
extends FocusManager

A FocusManager object for JDK's prior to 1.4

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.klg.jclass.table.FocusManager
componentHandler, editTraverseHandler, table
 
Method Summary
 com.klg.jclass.table.ComponentModel createDefaultComponentModel()
          Creates the default component handler.
 com.klg.jclass.table.EditTraverseHandler createDefaultEditTraverseHandler()
          Creates the default edit handler for JDKs prior to 1.4
 Component findFocusOwner(Component c)
          Return the child Component of the specified Component that is the focus owner, if any.
 void handleControlTab(boolean isShift, boolean doCommit)
          The user has hit CTRL-TAB or CTRL-SHIFT-TAB.
 boolean isFocusTraversable(Component c)
          Can this component receive the focus
 boolean requestFocus()
          Gets table to request focus.
 boolean requestFocus(Component c)
          Gets the passed in component to request focus.
 void transferFocusCycle()
          In JDK 1.4 or later, we need to make sure that when table has the focus that we are within table's current focus cycle rather than any focus cycle of a container that table happens to be in.
 
Methods inherited from class com.klg.jclass.table.FocusManager
createDefaultComponentModel, getComponentModel, getEditTraverseHandler, getTable, setComponentModel, setEditTraverseHandler, setTable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

requestFocus

public boolean requestFocus(Component c)
Gets the passed in component to request focus.

Specified by:
requestFocus in interface FocusModel
Overrides:
requestFocus in class FocusManager
Parameters:
c - The component who will request the focus.
Returns:
Whether the request will fail or most likely succeed (it only fails under an extraordinary event such as a disposal of the Component's peer).

requestFocus

public boolean requestFocus()
Gets table to request focus.

Specified by:
requestFocus in interface FocusModel
Overrides:
requestFocus in class FocusManager
Returns:
Whether the request will fail or most likely succeed (it only fails under an extraordinary event such as a disposal of the Component's peer).

createDefaultEditTraverseHandler

public com.klg.jclass.table.EditTraverseHandler createDefaultEditTraverseHandler()
Creates the default edit handler for JDKs prior to 1.4

Specified by:
createDefaultEditTraverseHandler in class FocusManager
Returns:
The newly created edit handler for a given model

createDefaultComponentModel

public com.klg.jclass.table.ComponentModel createDefaultComponentModel()
Creates the default component handler.

Specified by:
createDefaultComponentModel in interface FocusModel
Specified by:
createDefaultComponentModel in class FocusManager
Returns:
The newly created component handler for pre JDK1.4

isFocusTraversable

public boolean isFocusTraversable(Component c)
Can this component receive the focus

Specified by:
isFocusTraversable in interface FocusModel
Specified by:
isFocusTraversable in class FocusManager
Parameters:
c - The component whose focusability is in question
Returns:
Whether the component can receive focus

findFocusOwner

public Component findFocusOwner(Component c)
Return the child Component of the specified Component that is the focus owner, if any.

Specified by:
findFocusOwner in interface FocusModel
Specified by:
findFocusOwner in class FocusManager
Parameters:
c - the root of the Component hierarchy to search for the focus owner
Returns:
the focus owner, or null if there is no focus owner, or if the focus owner is not c, or a descendant of c

handleControlTab

public void handleControlTab(boolean isShift,
                             boolean doCommit)
The user has hit CTRL-TAB or CTRL-SHIFT-TAB. Nothing happens in table for JDK's prior to 1.4.

Specified by:
handleControlTab in interface FocusModel
Specified by:
handleControlTab in class FocusManager
Parameters:
isShift - True if the shift key has been hit.
doCommit - Do a commit edit before traversing. This is needed the user is editing a cell when he/she hits CTRL-TAB or CTRL-SHIFT-TAB.

transferFocusCycle

public void transferFocusCycle()
In JDK 1.4 or later, we need to make sure that when table has the focus that we are within table's current focus cycle rather than any focus cycle of a container that table happens to be in.

Specified by:
transferFocusCycle in interface FocusModel
Specified by:
transferFocusCycle in class FocusManager

Copyright © 2004 Quest Software Inc..
All rights reserved.