|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.KeyboardFocusManager
java.awt.DefaultKeyboardFocusManager
javax.swing.FocusManager
javax.swing.DefaultFocusManager
org.openbp.jaspira.gui.plugin.PluginFocusMgr
public final class PluginFocusMgr
Focus manager which manages the focusation of plugins. This class is a singleton.
| Field Summary | |
|---|---|
protected java.lang.ref.WeakReference |
lastPluginRef
Plugin that had the focus last (contains a VisiblePlugin). |
| Fields inherited from class javax.swing.FocusManager |
|---|
FOCUS_MANAGER_CLASS_PROPERTY |
| Fields inherited from class java.awt.KeyboardFocusManager |
|---|
BACKWARD_TRAVERSAL_KEYS, DOWN_CYCLE_TRAVERSAL_KEYS, FORWARD_TRAVERSAL_KEYS, UP_CYCLE_TRAVERSAL_KEYS |
| Method Summary | |
|---|---|
void |
changeFocus(VisiblePlugin plugin)
Changes the focus from the currently focused plugin to the given plugin. |
boolean |
dispatchEvent(java.awt.AWTEvent e)
|
VisiblePlugin |
getFocusedPlugin()
Returns the currently focused plugin. |
static PluginFocusMgr |
getInstance()
Returns the current focus manager if it is a PluginFocusMgr or some subclass of it or otherwise the only instance of this class. |
void |
resetFocusCache()
Resets the focus cache of the plugin focus manager. |
| Methods inherited from class javax.swing.DefaultFocusManager |
|---|
compareTabOrder, getComponentAfter, getComponentBefore, getFirstComponent, getLastComponent |
| Methods inherited from class javax.swing.FocusManager |
|---|
disableSwingFocusManager, getCurrentManager, isFocusManagerEnabled, setCurrentManager |
| Methods inherited from class java.awt.DefaultKeyboardFocusManager |
|---|
dequeueKeyEvents, discardKeyEvents, dispatchKeyEvent, downFocusCycle, enqueueKeyEvents, focusNextComponent, focusPreviousComponent, postProcessKeyEvent, processKeyEvent, upFocusCycle |
| Methods inherited from class java.awt.KeyboardFocusManager |
|---|
addKeyEventDispatcher, addKeyEventPostProcessor, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, addVetoableChangeListener, clearGlobalFocusOwner, downFocusCycle, firePropertyChange, fireVetoableChange, focusNextComponent, focusPreviousComponent, getActiveWindow, getCurrentFocusCycleRoot, getCurrentKeyboardFocusManager, getDefaultFocusTraversalKeys, getDefaultFocusTraversalPolicy, getFocusedWindow, getFocusOwner, getGlobalActiveWindow, getGlobalCurrentFocusCycleRoot, getGlobalFocusedWindow, getGlobalFocusOwner, getGlobalPermanentFocusOwner, getKeyEventDispatchers, getKeyEventPostProcessors, getPermanentFocusOwner, getPropertyChangeListeners, getPropertyChangeListeners, getVetoableChangeListeners, getVetoableChangeListeners, redispatchEvent, removeKeyEventDispatcher, removeKeyEventPostProcessor, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, removeVetoableChangeListener, setCurrentKeyboardFocusManager, setDefaultFocusTraversalKeys, setDefaultFocusTraversalPolicy, setGlobalActiveWindow, setGlobalCurrentFocusCycleRoot, setGlobalFocusedWindow, setGlobalFocusOwner, setGlobalPermanentFocusOwner, upFocusCycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.ref.WeakReference lastPluginRef
VisiblePlugin).
This is a temporary variable only, so we use weak references here in order to prevent memory leaks.
| Method Detail |
|---|
public static PluginFocusMgr getInstance()
public boolean dispatchEvent(java.awt.AWTEvent e)
dispatchEvent in class java.awt.DefaultKeyboardFocusManagerDefaultKeyboardFocusManager.dispatchEvent(AWTEvent)public void changeFocus(VisiblePlugin plugin)
plugin - Plugin to receive the focuspublic VisiblePlugin getFocusedPlugin()
public void resetFocusCache()
VisiblePlugin.focusPlugin() method is being called.
This is used e. g. if a plugin is dragged to another container to repaint the plugin panel title.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||